Devreal

Scale By The Bay 2020: Anima Anandkumar, Keynote: Next-generation frameworks for Large-scale AI

Scale By The Bay 2020: Anima Anandkumar, Keynote: Next-generation frameworks for Large-scale AI

Recording: Scale By The Bay 2020: Anima Anandkumar, Keynote: Next-generation frameworks for Large-scale AI

[Music] uh yeah so today i'll talk about uh you know the exciting times we live in with ai and uh how do we go next and what are the frameworks that make it scalable right because this is after all scale by the way and it's hard to believe that a year just went by you know was there last year we were all there in person uh in berkeley and uh yeah time flies yeah so i always like to emphasize that this deep learning revolution is a trinity you know it's not just the deep learning algorithms but the data and compute infrastructure is really essential for this revolution it started with the imagenet dataset and the nvidia gpus coming together with neural networks and so when we want to know as what is the next uh level here how do we go to generalizable ai beyond just the narrow ai we need to think of the synergy you know what kinds of data to collect better how to design better algorithms especially those that can work with unlabeled data and also how to have better compute you know get even more compute power but also move that more to the edge and also to the smaller devices there's a lot of exciting innovation on all these three fronts and so to me to think about designing the next generation algorithms we need to think of how to break down a new method and for that what we need is to think about what an algorithm does with data what kind of data does it expect is it labeled or unlabeled what is the quality of data with which it can work with and then the other aspect are the priors what kind of prior knowledge can we embed in an algorithm for instance if we are working on images we use convolutional neural network because convolutions give us this translation and variance of features but what if it's an application involving control systems there's safety requirements how do we bring in that prior knowledge of safety into the algorithm that's an open problem and then the last aspect is decision making like you know first of all to design any ai algorithm you need to specify a task right what is the task upon which you can do learning and then what are the actions to take here can we take actions in terms of interacting with the environment for instance if it's a reinforcement learning method and if you look at the current uh ai systems most of them require label data and that too at a massive scale and this is not tenable and this is not something we can keep up with especially as we go to video and all this higher dimensional data you just cannot get enough of them to learn good models so that's one aspect of dependence on data and having weak priors right so if you're not uh having uh enough robust priors that's when it leads to brittleness and you can easily fool the current ai systems for instance uh having these blocks here means that you can modify the image and still the human can identify it's a stop sign but not an ai and so the question is are there better priors with which we can get better robustness and one of the works we've been doing is to bridge the gap with neuroscience and ask can we think of brain mechanisms that can inspire us to design better neural networks in the artificial realm and one example is the use of feedback like how in our brain we hallucinate we dream and that's because of the feedback system can we put such feedback also into our feed forward neural network models and lead to robustness that's another aspect we've been looking at and then the last aspect is the task design the current task design is very simplistic usually it's a single task it's a limited benchmark right the data set is collected beforehand and many times it's not just simplistic it's also dangerous we now see a much more awareness in terms of bias in these ai systems the data being extremely imbalanced in its collection you know face recognition has seen the most uh has received the most attention because it's so visible in its bias and it's also present in so many other systems especially these large-scale language models such as gpd3 are extremely biased so this is a hugely important but also hugely difficult problem to solve and so what is the next frontier here you know i've shown you all these limitations what do we do to overcome this where do we go next and that's where i'd like to propose the next frontier in ai being unsupervised incorporating robust priors and having adaptive task design right unsupervised means that you need to now be able to work with unlabeled data but also be able to disentangle different factors of variations learn new concepts and ultimately reason with them like we do and we also need to think about uh good uh priors like uh i mentioned how do we incorporate domain knowledge better and how do we incorporate better structural priors as well can we design better neural network architectures that are more robust and that's some prior knowledge right so and i'll show you some examples of that using tensors and the last part is task design how can we design adaptive tasks that can incorporate many different capabilities but also many different domains and what i'll show you is simulation to reality or sim to real so how we can train especially robotic tasks in simulation and go to the real world i think these are aspects that are really critical for us to make the next big leap in ai and to do that we also need good frameworks and at nvidia we're building large-scale infrastructure we're building platforms for many different domains and verticals and that's what enables us then researchers to work on them and design new algorithms because without the compute infrastructure without the software and hardware frameworks we cannot realize our algorithms and what ultimately we need to do is more and more of this co-design right like how to foresee these developments and algorithms and design better hardware for it and better software for it i think that's an exciting journey we are seeing now happen more and in terms of the uh now for recent works i want to show you uh how we can do very efficient multi-task learning and also multi-domain learning uh because of the use of high fidelity simulations and this is where nvidia isaac is very effective fights the platform for robot learning and what it is is part of the edge ecosystem that is the egx stack right so with egx stack the benefit is you can now seamlessly go from training on the cloud or training uh you know in your cluster to going to on device right with the jetsons or the xavier platform so you can now have this in your robots in your scanners all kinds of devices that are enabled at the edge and then there is also the 5g capabilities with the aerial this is the radio access network that's now accelerated by gpus and now you can also get really good connectivity of the next generation and then the last aspect that's especially useful to us researchers is nvidia isaac which is the robot learning platform and this example here is the bmw factory right so this the actual factory and the data from that is limited so if we can create a digital twin and have one in simulation then we can work with it and train these models at scale in the isaac platform and so this ability to go from sim to real is very powerful and one of the um and you know we've seen that also with the kitchen robot you know there is the kitchen robot in the seattle lab at nvidia and what we see here is the robot being able to do many different tasks such as picking up and also opening drawers and so on and you can train this in simulation uh you can learn to open different drawers and you can do it at scale right because this is now all gpu accelerated and parallelized you can do many different instances of this simulation run you know this would be impossible in the real world and this would also be impossible with the traditional simulators on cpus so that's the benefit that isaac gives and in a recent work that will appear in conference of robot learning what we show is you know we can train this four-legged robot in simulation so this is the baseline with no learning right whereas what we designed was this hierarchical reinforcement learning which can you know handle like slippery surfaces without ever having seen it and to do that we did multitask learning in simulation you know it could now run walk right on treadmills of various different speeds and the other important thing is the hierarchy that we only design learning at the higher level and the low level controller is still done by traditional control right there's no learning there and so the primitives like walking trotting uh standing still so if what the learner is doing is just to mix these uh very well and so that's what will lead us to uh having robust learning not just in simulation but also taking to the real world we have additional videos uh in the paper and in the website to show how you can go from the simulation to the real world that's also the case with nvidia drive going from you know not only collecting real on-road data but also simulation especially for safety testing and one of the works we'll be doing is scenario generation can you generate failure modes and have a diverse set of failure modes for the current policies for the current perception systems and that's really important to have at all disposal because you can't just have all real data right you can't possibly generate all the unsafe scenarios because most of the time you're avoiding unsafe scenarios in the real world and that's where simulation can be powerful yeah so this aspect uh to wrap up right is that uh having platforms like isaac and drive sim can be very powerful for learning and simulation getting large scale data having that to be gpo accelerated and getting physically valid simulations and going from there to the real world if you're having hierarchy then the low level controllers are still robust and hence you can incorporate any changes going from sim to real but you still need high fidelity physically valid simulation right it can't be a really bad one so i think this combination of having really good simulation with also hierarchy so that the low level controllers are robust was critical to make it work um in this case of legged robots so that's one aspect that i wanted to cover the other aspect as in terms of thinking about good priors right for our models that can lead to better robustness generalization and also potentially compression because if you're having good prior knowledge you can come up with much smaller models because of the embedding of prior knowledge and also potentially less data because you have better prior knowledge and so there's so many different ways to uh incorporate prior knowledge and you know in terms of structural priors graphs are very common right if you're for instance uh learning uh the uh calculate energy in molecules right how atoms are connected to one another is really important and that's a graph so so many cases graphs become natural ways to model the data that's one aspect the other aspect is looking at multi-dimensionality and that's where tensors can be very powerful and i've dedicated a large part of my research career to advancing tensors even before deep learning came along and the benefit is multi-fold right so but we also need good frameworks to easily test out uh these tensor methods and so for that the building block is taking now matrix products to more dimensions so now what you see is pictorially a generalization of matrix product to tensor contractions so you can now multiply tensors along these different dimensions and contract and if these primitives can be done efficiently in hardware and if we can have now good apis to easily specify these kind of operations in our neural networks then we can design a whole family of new architectures so in one of the works uh that was done by my collaborator jean-claude is thinking about speeding up higher order convolutions so if you go to three dimensions and higher it's really expensive to do the full convolution right so can you do separable convolutions and hence get speed ups and efficiency and this is now nothing but a tensor decomposition this kind of tensor factorization is known as cp tensor factorization and this is enabled uh intensely which i'll show in a minute but the idea is you can now get a much smaller model with better performance this is now tracking emotions over time and whereas the other state-of-the-art models are much bigger right so you're getting better performance with a smaller model because so much of like the popular uh now thinking is bigger is better let's build the biggest gpt3 model out there but why you know if you could do with a smaller model if you could design a better architecture such as with tensors you can get a smaller model with better generalization and that's what these tensor methods can give you we also see that uh with uh early activity detection and long-term forecasting for that we go beyond uh uh just standard lstm models to tensor train and lstm models what it does is take a window of hidden states and you want to look at the higher order correlations among these hidden states and because that is too high dimensional an object we can decompose that into low rank forms and that's called a tensor train form and you can train this end to end and hence doing this means that we can do this early detection so you know you can see the tensor train model detected it correctly much quicker than the baseline models and also i know some of the baseline models and other competing models can be wrong and we see that also with um you know video prediction tasks again bigger is not better right so you now have a much more compact model uh you know more than an order of magnitude compact and in fact smaller than even the baseline model right which never happens with a better performance and that's the power of tensors that you can get all these multiple qualities at the same time better generalization more compression also better robustness i didn't show here but we have work showing that how if you do tensor drop out that is you drop out in terms of these tensor factors you can get much better robustness than standard architectures and that's because we are building the right inductive bias into our neural networks in our data is multi-dimensional right the correlations we want to incorporate are higher order correlations tensors or natural structures to incorporate this so you know being at nvidia also means we get to further optimize these extensor models right do the right form of operator fusion be able to also incorporate automatic mixed precision for training and inference so what this means is we can get even more compact models because we can combine the compression of tensor methods uh with mixed precision and we can also like uh do activation checkpointing and other methods to further get speedups and memory efficiency and also trained like models that require meat videos required multi-node training so we can use uh multiple cuda streams and get this scaled up but indeed for large-scale training there still needs to be good infrastructure and framework support to enable this and i think the you know moral of the story here is bigger is not always better by building in good priors you can now make do with smaller more compressed models this can be hugely beneficial for edge devices that don't have the same level of memory or you could now train even bigger models but with better inductive buyers right because when it comes to videos and large-scale uh video tasks having the right inductive bias is still very crucial and i think that's where it's not just the data that wins or landscape models that win and there's a lot of room for algorithmic design and there's also a lot of room for having better primitives for tensors in gpus because if you think about it theoretically having tensor to tensor operation is much more efficient because there's more higher level of parallelism there compared to matrix to matrix operations and so that means we also need to think of a new foundation in terms of hardware to do this and q tensor library is a great uh aspect there because they're looking at or rather we're looking at transpose free contractions so if in place can you do efficient transfer sorry efficient contractions then now we can get uh a lot more speed up because you know the bottleneck we're doing tensor operations carries mostly in terms of right transposing and creating copies whereas if you build the right primitives you can avoid that and get also hardware speedups and in ampere and the you know latest generation course there is much more higher level of tensor operations there so ultimately you know what i showed you are many examples of how tensors can provide to great priors for deep learning in our data is multi-dimensional the correlations we want to incorporate are higher order correlations and so why limit to just matrix computations in our neural network layers by going to tensors we can get more compressed models better generalization better robustness and also ultimately better hardware speed ups so it's a lot of good things coming together in one shot and yeah to conclude i showed you nvidia isaac that can enable large-scale training and simulation and then the ability to take it to egx platform and serve it on edge devices i also showed you how tensors can be very effective for learning i forgot to mention tensorly is the framework on which we could easily build on top of pytorch so these layers are already available as a torch layer so you can just drop in and be able to explore all range of architectures so we made it really easy to use so it's tensorly it's tensor with ly at the end uh check it out it's open source and the other important aspect is rapids which i haven't mentioned here but again it's an open source end-to-end gpu acceleration all the way from data wrangling to training and ultimately even visualization all being done end-to-end in gpus with no cpu to gpu uh overhead and so it's a lot of exciting infrastructure being developed at nvidia that can really help us design next generation ai algorithms and get the scale of operations thank you