If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

How neural networks work

Did you know that the networks that support the development of artificial intelligence are based off of the human nervous system? In this video, you'll learn how AI scientists built artificial neural networks that can gather information from various sources and synthesize them into an insight, and how additional inputs can be used to train an AI neural network.

Start learning at http://code.org/

Stay in touch with us!
• on Twitter https://twitter.com/codeorg
• on Facebook https://www.facebook.com/Code.org
• on Instagram https://instagram.com/codeorg
• on Tumblr https://blog.code.org
• on LinkedIn https://www.linkedin.com/company/code-org
• on Google+ https://google.com/+codeorg.
Created by Code.org.

Want to join the conversation?

Video transcript

Hi! I'm Dion. I'm one of the creators  of Forethought AI. At Forethought,   we build artificially intelligent tools that  people can use at work to be more productive. To make a learning machine, early computer  scientists looked for clues by studying   other things that are good at learning,  and it turns out that nothing is better   at learning than the human brain! Our brains  are made up of special cells called neurons.   A neuron has two ends: input  signals enter in on one end,   they're combined together inside the neuron,  and leave out the other end as a single output. All of the billions of neurons in your brain  are connected to each other, in what's called   a biological neural network. It's how your brain  processes information and recognizes patterns.   Early AI scientists decided to mimic human neurons  by making their own simple artificial neurons in   software. Nothing fancy, just multiple signals  going in as inputs, passing through the neuron,   and getting combined and processed by some  simple math into a new signal going out. It's a good start, but one  neuron alone doesn't do much.   The full potential of this idea is only  unleashed when the artificial neurons   are connected together to make an artificial  neural network. This is what allows computers to   recognize images, drive cars,  and make some truly weird art.   To see how a neuron works, let's build a movie  recommendation system, that uses critics reviews   to guess how much you'll like a movie. Then,  we'll use your feedback to make the system better! Here are three movie critics: Ali, Bowie,  and Casey. Each one rates a movie anywhere   from one to five stars. Now, let's  build a single artificial neuron. Each of the critics ratings enters on this side  as input, some calculations are done in here,   and we get a single output. In  this case, it's a movie rating.   Here's the first movie. Ali gives it one star,  Bowie gives it five, and Casey gives it a four   star review. At first, the critics opinions all  carry the same weight, and are counted equally.   The inputs enter, there's some basic  math, and out comes a recommendation.   Now, let's watch the movie so  we can give it our own rating! Uh, okay. That was weird! Let's let's pretend you  really liked it, and gave it a five star rating.   The rating you just provided is now used to  train the neuron. Based on your rating, the   weight of each critic's opinion is recalculated.  Your rating is closer to that of Bowie and Casey,   so their opinions get more weight. You  didn't agree with Ali's single star review,   so that weight goes down. Now  let's train the neuron again. Here's another movie, and here are new  ratings from our critics. And this time,   the neuron will give more weight to these two  ratings when calculating its recommendation. And here's the output! Now let's give it a watch. Well, at least that was  short! Let's give it a rating.   Our new rating adjusts the weights again.  This process repeats over and over, until   we've trained a system to know our preferences,  and recommend movies that we'll probably enjoy. In this example, there's just one neuron.  That's far more simplistic than most systems.   Powerful neural networks have millions  of neurons arranged in layers.   There are input layers, any number  of hidden layers, and output layers. The output of one layer of neurons, becomes  the input to the next layer, and so on.   Many real world media music and shopping  recommendation systems work like this,   using ratings for millions of everyday users   in those neural networks. Everyone  has a hand in modifying the weights. Neural networks have so many other uses.  They're working behind the scenes on big   problems, like growing healthier food,  predicting floods and forest fires,   aiding wildlife conservation, and  even detecting and curing disease.