Skip to content

What Is a Neural Network?

A neural network is a type of AI model made of many simple, connected units arranged in layers. It learns to recognize patterns by studying examples. Information goes in one side, passes through the layers and comes out as a result, such as a label for a photo or the next word in a sentence. During training, the network adjusts the strength of its connections until its results become accurate.

What a neural network is

A neural network is a way of building a machine learning model. Its design was loosely inspired by the brain, where nerve cells pass signals to one another. In a neural network, the "neurons" are not cells. Each one is a small calculation: it takes in numbers, combines them and passes a new number along.

One of these units on its own does very little. The power comes from connecting large numbers of them through millions or billions of connections, and from letting the strength of every connection be learned from data rather than set by hand.

The idea is older than most people expect. Warren McCulloch and Walter Pitts published a mathematical model of neurons in 1943. In 1958, psychologist Frank Rosenblatt demonstrated the perceptron, an early learning machine that taught itself to tell cards marked on the left from cards marked on the right. It took decades of research, far more data and much faster computers before neural networks became the foundation of modern AI.

How a neural network works

A neural network passes information through layers, with each layer transforming what it receives before handing it on. Here is how a network might read a handwritten number, a task neural networks were performing commercially by the 1990s.

  1. The input layer receives the data. A photo of a handwritten digit is converted into numbers, one for the brightness of each pixel.
  2. Hidden layers process it. Each unit in the first hidden layer combines many pixel values, giving some more influence than others. The results pass to the next layer, which combines them again.
  3. Patterns build up in stages. Early layers tend to respond to simple features, such as edges and short strokes. Later layers combine those into larger shapes, such as loops and lines.
  4. The output layer gives an answer. The final layer produces a score for each possible digit, 0 through 9. The digit with the highest score is the network's prediction.

The layers between input and output are called hidden layers because their values are neither the input you provide nor the output you see. They are where the pattern recognition happens.

Weights: what the network actually learns

Every connection between units has a weight: a number that controls how strongly one unit's signal affects the next. A large weight means "pay close attention to this signal." A weight near zero means "mostly ignore it."

Weights are a type of parameter, a value the model learns during training. Everything a neural network "knows" is stored in these numbers. There are no written rules inside it, only a very large collection of learned weights.

Networks have grown enormously. AlexNet, the image recognition network that won a major competition in 2012, had 60 million parameters. OpenAI's GPT-3 language model, released in 2020, had 175 billion. Stanford's 2026 AI Index notes that the developers of today's most capable models, including OpenAI, Anthropic and Google, no longer disclose parameter counts for several of their largest systems.

How does a neural network learn?

A neural network learns by making predictions, measuring its mistakes and adjusting its weights to make fewer mistakes next time. This happens during training, repeated across a very large number of examples.

  1. It makes a guess. At the start, the weights are close to random, so the network's answers are mostly wrong.
  2. The error is measured. The network's output is compared with the correct answer, and the difference is turned into a single error score.
  3. Responsibility is traced backward. A method called backpropagation works backward from the output through each layer, calculating how much each weight contributed to the error.
  4. Weights are adjusted slightly. Each weight is nudged in the direction that reduces the error. This step-by-step improvement is called gradient descent.
  5. The cycle repeats. After millions of small adjustments, the weights settle into values that produce accurate results. Testing the network on examples it has never seen shows whether it learned general patterns or simply memorized its training data.

David Rumelhart, Geoffrey Hinton and Ronald Williams described backpropagation in a 1986 paper in Nature. The procedure, in their words, "repeatedly adjusts the weights of the connections in the network" to shrink the difference between the network's actual output and the desired output.

For how this fits into machine learning more broadly, including how models are tested before use, see What Is Machine Learning?.

Deep learning: neural networks with many layers

Deep learning means using neural networks with many layers. Google's machine learning glossary defines a deep model as a neural network with more than one hidden layer. In practice, modern deep networks can have dozens or hundreds.

More layers let a network build more complex patterns in stages. Three developments made deep networks practical in the 2010s: huge labeled datasets, much faster chips for the calculations, and improved training methods.

A turning point came in 2012. A University of Toronto team entered a deep neural network, later known as AlexNet, in the ImageNet image recognition challenge. Its top-5 error rate was 15.3%, compared with 26.2% for the next-best team. Progress in image recognition, speech recognition and, later, language accelerated quickly after that.

Yoshua Bengio, Geoffrey Hinton and Yann LeCun received the 2018 ACM Turing Award for breakthroughs that made deep neural networks a critical part of computing, and John Hopfield and Geoffrey Hinton shared the 2024 Nobel Prize in Physics "for foundational discoveries and inventions that enable machine learning with artificial neural networks."

Common types of neural networks

Neural networks come in different designs, called architectures, suited to different kinds of data.

TypeBest suited toExample use
Basic fully connected networkSimple input-to-output predictionsScoring a loan application
Convolutional neural network (CNN)Images and other grid-like dataReading handwritten checks, recognizing objects in photos
Recurrent neural network (RNN)Sequences, processed one step at a timeEarlier speech recognition and translation systems
TransformerLanguage and other long sequencesChat assistants and large language models

The transformer, introduced by Google researchers in the 2017 paper "Attention Is All You Need," is the architecture behind today's large language models. It processes relationships between many pieces of information at once. What Is a Large Language Model? explains how these networks generate text.

Examples of neural networks in everyday life

Neural networks power many everyday tools:

  • Translation. In 2016, Google began using a neural network system for all Chinese-to-English translations in Google Translate, about 18 million translations a day at the time.
  • Navigation. DeepMind, now Google DeepMind, reported in 2020 that graph neural networks improved the accuracy of Google Maps' real-time arrival estimates by up to 50% in some cities.
  • Chat assistants. ChatGPT, Gemini, Claude and similar tools run on large language models, which are deep neural networks trained on vast amounts of text.
  • Banking. A system described in 1998 used convolutional neural networks to read several million bank checks per day.
  • Science. Demis Hassabis and John Jumper of Google DeepMind shared half of the 2024 Nobel Prize in Chemistry for protein structure prediction, work that used artificial intelligence.

Neural networks vs AI

Artificial intelligence is the broad field of building systems that perform tasks associated with human intelligence. A neural network is one specific technique for building those systems. Neural networks are the most important technique in AI today, but they are not the only one.

Here is how the terms nest together:

  • AI is the overall field.
  • Machine learning is the part of AI where systems learn from data.
  • Neural networks are one family of machine learning models.
  • Deep learning is machine learning with many-layered neural networks.

Some AI uses no neural networks at all, such as systems built from hand-written rules, or simpler machine learning methods like decision trees. For the full comparison of these overlapping terms, see AI vs Machine Learning vs Deep Learning.

Where the brain comparison breaks down

The name "neural network" invites a comparison with the human brain. The comparison is useful for one idea, simple units connected in large numbers, and misleading for most others.

  • Artificial neurons are basic math. Each one does a small calculation. Biological neurons are living cells with far more complex behavior.
  • They learn differently. Neural networks learn through backpropagation over huge numbers of examples. That is not how people learn to recognize a face or a word.
  • They do not understand what they process. A network that labels photos of dogs has learned statistical patterns in pixels. It has no concept of what a dog is.
  • They can fail in unhuman ways. Small, carefully designed changes to an image, invisible to people, can make a network misclassify it. These inputs are called adversarial examples.

Why neural networks matter, and their limits

Neural networks are why AI can now handle messy, real-world information: photos, voices, handwriting and ordinary language. If you use face recognition on your phone, voice typing, photo search or a chat assistant, you are relying on them.

Their strengths come with real limits:

  • They need a lot of data and computing power. Training large networks is expensive and energy-intensive.
  • They are hard to explain. Knowledge spread across millions or billions of weights does not translate into clear reasons for a specific answer. Research on interpretability aims to change that.
  • They reflect their training data. Gaps and biases in the examples can show up in the results.
  • They can be confidently wrong. A network always produces an output, even for inputs unlike anything it was trained on.

For how neural networks fit into the full process of building and using AI, see How Does AI Work?.

  • Neural network: the short LATHIC Glossary definition
  • Deep learning: machine learning with many-layered neural networks
  • Weight: a learned number that sets how strongly one signal affects another
  • Parameter: any value a model learns during training
  • Backpropagation: the method for working out how to adjust a network's weights
  • Transformer: the neural network design behind large language models

Frequently Asked Questions

Is ChatGPT a neural network?

Yes. The models behind ChatGPT are deep neural networks that use the transformer architecture. They were trained on large amounts of text to predict likely next words, and they generate responses using the patterns stored in their learned weights.

Is every AI a neural network?

No. Neural networks are the most widely used approach in AI today, but AI also includes systems built from hand-written rules and machine learning methods that do not use neural networks, such as decision trees. A neural network is one technique within AI, not a synonym for it.

What is the difference between AI and neural networks?

AI is the broad goal of making computers do things that normally need human intelligence, and a neural network is one kind of model used to reach it, made of connected layers that learn patterns from data. Neural networks are a tool within AI, and AI includes other tools too.

How does a neural network learn?

A neural network learns by trial and correction. It makes a prediction, compares it with the correct answer, uses a method called backpropagation to work out which connections contributed to the error, and adjusts their weights slightly. Repeating this across huge numbers of examples gradually makes its predictions accurate.

What is a convolutional neural network?

A convolutional neural network, or CNN, is a type of neural network designed for images and other grid-like data. It scans small regions of an image to detect local features such as edges and textures, then combines them into larger patterns. CNNs are widely used for recognizing objects in photos and reading handwriting.

Sources

  1. McCulloch and Pitts, "A logical calculus of the ideas immanent in nervous activity," Bulletin of Mathematical Biophysics 5, 1943. https://link.springer.com/article/10.1007/BF02478259
  2. Cornell Chronicle, "Professor's perceptron paved the way for AI – 60 years too soon," September 25, 2019. https://news.cornell.edu/stories/2019/09/professors-perceptron-paved-way-ai-60-years-too-soon
  3. LeCun, Bottou, Bengio and Haffner, "Gradient-Based Learning Applied to Document Recognition," Proceedings of the IEEE, November 1998. https://proceedingsoftheieee.ieee.org/gradient-based-learning-applied-to-document-recognition/
  4. Krizhevsky, Sutskever and Hinton, "ImageNet Classification with Deep Convolutional Neural Networks," NeurIPS 2012. https://papers.nips.cc/paper_files/paper/2012/hash/c399862d3b9d6b76c8436e924a68c45b-Abstract.html
  5. ImageNet, "ILSVRC2012 results." https://image-net.org/challenges/LSVRC/2012/results.html
  6. Brown et al., "Language Models are Few-Shot Learners," arXiv 2005.14165, May 2020. https://arxiv.org/abs/2005.14165
  7. Stanford HAI, AI Index Report 2026, Chapter 1: Research and Development. https://hai.stanford.edu/assets/files/ai_index_report_2026_chapter_1_research_development.pdf
  8. Rumelhart, Hinton and Williams, "Learning representations by back-propagating errors," Nature 323, October 9, 1986. https://www.nature.com/articles/323533a0
  9. Google for Developers, "Machine Learning Glossary." https://developers.google.com/machine-learning/glossary
  10. ACM (via EurekAlert!), "Fathers of deep learning revolution receive the ACM A.M. Turing Award," March 27, 2019. https://www.eurekalert.org/news-releases/508417
  11. NobelPrize.org, 2024 Nobel Prize in Physics, announcement. https://www.nobelprize.org/prizes/physics/2024/prize-announcement/
  12. NobelPrize.org, "The Nobel Prize in Chemistry 2024: Popular information." https://www.nobelprize.org/prizes/chemistry/2024/popular-information/
  13. Vaswani et al., "Attention Is All You Need," arXiv 1706.03762, June 2017. https://arxiv.org/abs/1706.03762
  14. Google Research, "A Neural Network for Machine Translation, at Production Scale," September 27, 2016. https://research.google/blog/a-neural-network-for-machine-translation-at-production-scale/
  15. Google DeepMind, "Traffic prediction with advanced Graph Neural Networks," September 3, 2020. https://deepmind.google/discover/blog/traffic-prediction-with-advanced-graph-neural-networks/