Meta Learning

Siraj Raval · Intermediate ·🛠️ AI Tools & Apps ·7y ago

Key Takeaways

The video discusses meta learning techniques, including neuro evolution, evolutionary algorithms, and gradient descent, to optimize AI systems and learn neural architectures.

Full Transcript

can we learn to learn to learn hello world it's Suraj and what if neural networks could learn how to learn the process of learning to learn we're a top-level AI optimizes a bottom level AI or several of them is considered meta learning and it's currently a very popular topic in AI the reason being meta level AI algorithms generally make AI systems learn faster adapt to changes in their environments in a more robust way and generalize to more tasks and they can be used to optimize a models architecture its parameters the type of data set it uses or some combination of all of them if we look at the literature there are some pretty hilariously named meta learning papers that demonstrate these techniques like learning to learn by gradient descent by gradient descent gotta love it and darts or differentiable architecture search algorithm but in this video I want to focus on a specific meta learning technique called neuro evolution this is the process of using what's called an evolutionary algorithm to learn neural architectures the reason this technique piqued my interest is because just this year Google published some research detailing their effort at using an evolutionary algorithm to learn the architecture of a neural image classifier and it ended up becoming the state of the art which was somewhat surprising to many in the research community since evolutionary algorithms haven't shown nearly as much promise for real-world use cases as supervised and unsupervised methods have so far and don't forget brute forcing neural networks can perform tasks that would be difficult for humans if they're given large amounts of training data but discovering the optimal architectures for these networks is non-trivial and takes researchers a lot of trial and error image classification is a well-known problem in the community as deep learning researchers established the state of the art a couple years ago researchers worked hard on developing newer architectures that progressively brought the state of the art to new were level's year after year ambitiously Google decided to try an evolutionary algorithm to try to learn what a neural architecture would look like for image classification instead of hand designing it and it outperformed the rest and it wasn't just Google neuro-evolutionary strategies have started to see more adoption as popular tech companies like uber have started adopting them to help improve the performance of their products Uber's dispatch algorithm has to analyze thousands of features in real time to generate more than 30 million rider driver matched pair predictions per minute and neuro evolution helps them speed up this crucial process they've got a great blog post on this as well that lists several examples so why apply evolution to neural network design well to quote the contemporary poet Marshall Mathers we ain't nothing but mammals and nature demonstrates this when the evolutionary biologist Charles Darwin visited the Galapagos Islands decades ago he noticed that some birds appear to have evolved from a single ancestral flock they shared common features but were characterized by their unique beak forms which sprung from their unique DNA we can think of DNA as a meta-level construct it's a blueprint that guides the replication of cells a long-term memory store that captures instructions necessary to recreate biological systems that transcend their death his hypothesis was that the isolation of each species to a different Island caused this diversity eventually he turned this hypothesis into his now-famous theory of natural selection this process is algorithmic and we can simulate it on silicon processors by creating evolutionary algorithms an evolutionary algorithm creates a population of randomly generated members each of these members are represented by some algorithm it could be any kind not just a machine learning algorithm even blockchain no then it will give each member a score based on an objective function this score is called the fitness function it's a measure of how well a member did in relation to the goal once all members are scored the algorithm will select the highest-scoring members by some predefined threshold and breed them to produce more members like them breeding involves some interpolation of each members features that is application-specific in addition to breeding will mutate some members randomly to attempt to find even better candidates the rest of the members die off in a very Darwinian survival of the fittest way this process repeats for as many iterations as necessary actually in this context we call them generations as we define at the end the idea is that we'll be left with the very best possible members of a population these steps are all inspired by Darwin's theory of natural selection we can think of them as optimizers searching the possible space of solutions for the right one they're all a part of the broader class of algorithms called evolutionary computation if we again look at the animal kingdom will observe that there is a complex interplay in two intertwined processes inter life learning and intra life learning we can think of inter life learning as a process of evolution via natural selection traits epigenetics and microbiomes are passed on between animal generations and intra life learning relates to how an animal learns during its lifetime that is this is conditioned on its interaction with the world things like recognizing objects learning to communicate and walking both of these natural approaches are mirrored in computer science evolutionary algorithms can be considered inter life learning where as neural networks can be thought of as intra life learning or any gradient based optimization strategy really where specific experiences results in an update in behavior so how do we perform neuro evolution using both of these processes to complete a goal let's say we have a very simple fully connected neural network our goal will be to find the best parameters for image classification our four main ones the number of layers our network will have the number of neurons in each layer what the activation function will be and what the optimization algorithm will be to start we'll initialize our neural network with random weights but not just one neural network like we usually do let's initialize several to create a population we'll need to train the weights of each Network using an image data set then benchmark how well it performs at classifying test data well use its classification accuracy on the test set as our fitness function if we sort all of our networks by their accuracy we can see which ones are the lowest performing and remove them we'll only select the top scoring networks to be a part of the next generation we'll also select a few of the lower scoring networks since it could potentially result in us not getting stuck in a local maximum as we optimize we can also randomly mutate some of our network parameters as well both of these methods are like an evolutionary way of preventing overfitting now we're going to breed our top picks in our neural network case we'll create a new network or child by combining a random assortment of parameters from its parent networks so a child could have the same number of layers as one parent and the rest of its parameters are from another parent another child could have the opposite this mirrors how biology works in real life and helps our algorithm converge on an optimized Network if we test out our algorithm and compare it to a brute-force search we'll find that our algorithm gives us the same result as brute force but in seven hours of training instead of 63 as the parameter complexity of the network increases evolutionary algorithms provide exponential speed ups Google did this as well but with lots more data and computing power they used hundreds of GPUs and TP use for days they initialized a thousand identical convolutional neural networks with no hidden layers then through the evolutionary process networks with higher accuracies are selected as parents copied and mutate to generate children while the rest die out it progressively discovered better and better network architectures in a later experiment they used a fixed stack of repeated modules called cells the number of cells stay the same but the architecture of each cell mutated over time they also decided to use a specific form of regularization to improve the networks accuracy instead of letting the lowest-scoring networks die they removed the oldest ones regardless of how well they scored and it ended up improving the accuracy because their networks didn't utilize weight inheritance and they all needed to train from scratch this technique selects for networks that remain accurate when they are retrained so only architectures that remain accurate through each generation survive in the long run which means we'll get networks that retrain really well they call their model amoeba net and it's the new state of the art in image classification so what have we learned here meta learning is the process of learning to learn where an AI optimizes one or several other AIS evolutionary algorithms use concepts from the evolutionary process like mutation and natural selection to solve complex problems and a meta learning technique called neuro evolution uses evolutionary algorithms to optimize neural networks specifically please subscribe for more programming videos and for now I've got to find a gradient so thanks for watching

Original Description

Meta learning describes the concept of 'learning to learn'. What if we could have AI learn how to optimize itself? An AI could learn the optimal hyper-parameters, architecture, and even dataset! Its a really interesting topic, and in this video I'll describe some meta learning techniques and focus on one in particular; deep neuro-evolution. We'll build an image classifier using a deep neuro-evolutionary algorithm. Enjoy! Code for this video: https://github.com/harvitronix/neural-network-genetic-algorithm Please Subscribe! And like. And comment. That's what keeps me going. Want more education? Connect with me here: Twitter: https://twitter.com/sirajraval Facebook: https://www.facebook.com/sirajology instagram: https://www.instagram.com/sirajraval More learning resources: http://nn.cs.utexas.edu/?neuroevolution-tutorial-ijcnn2013 https://blog.coast.ai/lets-evolve-a-neural-network-with-a-genetic-algorithm-code-included-8809bece164 https://towardsdatascience.com/paper-repro-deep-neuroevolution-756871e00a66 https://www.youtube.com/watch?v=lu5ul7z4icQ Join us in the Wizards Slack channel: http://wizards.herokuapp.com/ School of AI: https://www.theschool.ai And please support me on Patreon: https://www.patreon.com/user?u=3191693 Signup for my newsletter for exciting updates in the field of AI: https://goo.gl/FZzJ5w Hiring? Need a Job? See our job board!: www.theschool.ai/jobs/ Need help on a project? See our consulting group: www.theschool.ai/consulting-group/ Hit the Join button above to sign up to become a member of my channel for access to exclusive content! Join my AI community: http://chatgptschool.io/ Sign up for my AI Sports betting Bot, WagerGPT! (500 spots available): https://www.wagergpt.xyz
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from Siraj Raval · Siraj Raval · 0 of 60

← Previous Next →
1 What is Bitcoin?
What is Bitcoin?
Siraj Raval
2 5 Ways to Use Bitcoin
5 Ways to Use Bitcoin
Siraj Raval
3 BTC Fever - Siraj [Music Video]
BTC Fever - Siraj [Music Video]
Siraj Raval
4 5 Reasons to Build Decentralized Apps
5 Reasons to Build Decentralized Apps
Siraj Raval
5 The Interplanetary File System
The Interplanetary File System
Siraj Raval
6 How to Build a Dapp in 3 min
How to Build a Dapp in 3 min
Siraj Raval
7 Life Before Smartphones
Life Before Smartphones
Siraj Raval
8 4 Ways to Use Smart Contracts
4 Ways to Use Smart Contracts
Siraj Raval
9 3 Dapps You HAVE to See
3 Dapps You HAVE to See
Siraj Raval
10 Char's Life as a BitTorrent Engineer
Char's Life as a BitTorrent Engineer
Siraj Raval
11 4 Reasons AlphaGo is a Huge Deal
4 Reasons AlphaGo is a Huge Deal
Siraj Raval
12 Build a Neural Net in 4 Minutes
Build a Neural Net in 4 Minutes
Siraj Raval
13 Sentiment Analysis in 4 Minutes
Sentiment Analysis in 4 Minutes
Siraj Raval
14 The Hackathon Life
The Hackathon Life
Siraj Raval
15 Your First ML App - Machine Learning for Hackers #1
Your First ML App - Machine Learning for Hackers #1
Siraj Raval
16 Build an AI Composer - Machine Learning for Hackers #2
Build an AI Composer - Machine Learning for Hackers #2
Siraj Raval
17 Build a Game AI - Machine Learning for Hackers #3
Build a Game AI - Machine Learning for Hackers #3
Siraj Raval
18 Build a Movie Recommender - Machine Learning for Hackers #4
Build a Movie Recommender - Machine Learning for Hackers #4
Siraj Raval
19 Build an AI Artist - Machine Learning for Hackers #5
Build an AI Artist - Machine Learning for Hackers #5
Siraj Raval
20 Build a Chatbot - ML for Hackers #6
Build a Chatbot - ML for Hackers #6
Siraj Raval
21 Build an AI Reader - Machine Learning for Hackers #7
Build an AI Reader - Machine Learning for Hackers #7
Siraj Raval
22 Build an AI Writer - Machine Learning for Hackers #8
Build an AI Writer - Machine Learning for Hackers #8
Siraj Raval
23 Build a Chatbot w/ an API - ML for Hackers #9
Build a Chatbot w/ an API - ML for Hackers #9
Siraj Raval
24 One-Shot Learning - Fresh Machine Learning #1
One-Shot Learning - Fresh Machine Learning #1
Siraj Raval
25 Generative Adversarial Nets - Fresh Machine Learning #2
Generative Adversarial Nets - Fresh Machine Learning #2
Siraj Raval
26 Tone Analysis - Fresh Machine Learning #3
Tone Analysis - Fresh Machine Learning #3
Siraj Raval
27 Generate Rap Lyrics - Fresh Machine Learning #4
Generate Rap Lyrics - Fresh Machine Learning #4
Siraj Raval
28 Build an Autoencoder in 5 Min - Fresh Machine Learning #5
Build an Autoencoder in 5 Min - Fresh Machine Learning #5
Siraj Raval
29 Build a Self Driving Car in 5 Min - Fresh Machine Learning #6
Build a Self Driving Car in 5 Min - Fresh Machine Learning #6
Siraj Raval
30 Build an Antivirus in 5 Min - Fresh Machine Learning #7
Build an Antivirus in 5 Min - Fresh Machine Learning #7
Siraj Raval
31 TensorFlow in 5 Minutes (tutorial)
TensorFlow in 5 Minutes (tutorial)
Siraj Raval
32 Build a Recurrent Neural Net in 5 Min
Build a Recurrent Neural Net in 5 Min
Siraj Raval
33 Build a Simulation in 5 Min
Build a Simulation in 5 Min
Siraj Raval
34 Build a TensorFlow Image Classifier in 5 Min
Build a TensorFlow Image Classifier in 5 Min
Siraj Raval
35 Tensorboard Explained in 5 Min
Tensorboard Explained in 5 Min
Siraj Raval
36 Generate Music in TensorFlow
Generate Music in TensorFlow
Siraj Raval
37 Build a Game Bot (LIVE)
Build a Game Bot (LIVE)
Siraj Raval
38 Deep Learning Frameworks Compared
Deep Learning Frameworks Compared
Siraj Raval
39 Introduction - Learn Python for Data Science #1
Introduction - Learn Python for Data Science #1
Siraj Raval
40 Build a Neural Network (LIVE)
Build a Neural Network (LIVE)
Siraj Raval
41 Twitter Sentiment Analysis - Learn Python for Data Science #2
Twitter Sentiment Analysis - Learn Python for Data Science #2
Siraj Raval
42 Recommendation Systems - Learn Python for Data Science #3
Recommendation Systems - Learn Python for Data Science #3
Siraj Raval
43 Predicting Stock Prices - Learn Python for Data Science #4
Predicting Stock Prices - Learn Python for Data Science #4
Siraj Raval
44 Pong Neural Network (LIVE)
Pong Neural Network (LIVE)
Siraj Raval
45 Deep Dream in TensorFlow - Learn Python for Data Science #5
Deep Dream in TensorFlow - Learn Python for Data Science #5
Siraj Raval
46 Visualizing Data with D3.js (LIVE)
Visualizing Data with D3.js (LIVE)
Siraj Raval
47 Genetic Algorithms - Learn Python for Data Science #6
Genetic Algorithms - Learn Python for Data Science #6
Siraj Raval
48 Enter Siraj [Music Video]
Enter Siraj [Music Video]
Siraj Raval
49 Build a Web Scraper (LIVE)
Build a Web Scraper (LIVE)
Siraj Raval
50 Why is P vs NP Important?
Why is P vs NP Important?
Siraj Raval
51 How to Make a Neural Network (LIVE)
How to Make a Neural Network (LIVE)
Siraj Raval
52 How to Make an Amazing Tensorflow Chatbot Easily
How to Make an Amazing Tensorflow Chatbot Easily
Siraj Raval
53 How to Make an Amazing Video Game Bot Easily
How to Make an Amazing Video Game Bot Easily
Siraj Raval
54 How to Make a Tensorflow Neural Network (LIVE)
How to Make a Tensorflow Neural Network (LIVE)
Siraj Raval
55 How to Make a Simple Tensorflow Speech Recognizer
How to Make a Simple Tensorflow Speech Recognizer
Siraj Raval
56 Joel Shor - Really Quick Questions with an Awesome Google Engineer
Joel Shor - Really Quick Questions with an Awesome Google Engineer
Siraj Raval
57 How to Make a Path Planning Algorithm Easily (LIVE)
How to Make a Path Planning Algorithm Easily (LIVE)
Siraj Raval
58 The Best Way to Prepare a Dataset Easily
The Best Way to Prepare a Dataset Easily
Siraj Raval
59 Catherine Olsson - Really Quick Questions with an OpenAI Engineer
Catherine Olsson - Really Quick Questions with an OpenAI Engineer
Siraj Raval
60 How to Make a Tic Tac Toe Neural Network Easily (LIVE)
How to Make a Tic Tac Toe Neural Network Easily (LIVE)
Siraj Raval

This video teaches meta learning techniques, including neuro evolution and evolutionary algorithms, to optimize AI systems and learn neural architectures. It provides examples of how these techniques can be used to improve image classification and discusses the benefits of meta learning, such as exponential speed-ups in parameter complexity.

Key Takeaways
  1. Initialize a population of neural networks with random weights
  2. Train the weights of each network using an image data set
  3. Benchmark how well each network performs at classifying test data
  4. Sort all networks by their accuracy and remove the lowest performing ones
  5. Select the top-scoring networks to be part of the next generation
💡 Evolutionary algorithms can be used to optimize neural networks and provide exponential speed-ups as parameter complexity increases.

Related AI Lessons

Up next
I Asked ChatGPT to Apply to 500 Jobs (8 Interviews in 48 Hours)
Sabrina Ramonov 🍄
Watch →