Neural network (machine learning)
| Part of a series on |
| Machine learning and data mining |
|---|
In machine learning, a neural network (NN) or artificial neural network (ANN) is a computational model inspired by the structure and functions of biological neural networks.
A neural network consists of connected units or nodes called artificial neurons, which loosely model the neurons in the brain. These are connected by edges, which model the synapses in the brain. Each artificial neuron receives signals from connected neurons, then processes them and sends a signal to other connected neurons. The "signal" is a real number, and the output of each neuron is computed by some non-linear function of the totality of its inputs, called the activation function. The strength of the signal at each connection is determined by a weight, which adjusts as part of the training process.
Groups of neurons are aggregated into layers. Each layer performs a transformation on its inputs. Signals travel from the first layer (the input layer) to the last layer (the output layer), typically passing through multiple intermediate layers (hidden layers). A network is typically called a deep neural network if it has at least two hidden layers. Deep neural networks are capable of learning sophisticated hierarchical representations.
Training neural networks is a compute-intensive process, accelerated by the use of graphics processing units (GPUs), and large datasets.
- Simplified example of training a neural network in object detection: The network is trained by multiple images known to depict starfish and sea urchins, which are correlated with "nodes" representing visual features. Starfish match with a ringed texture and star outline, whereas most sea urchins match with a striped texture and oval shape.
- The resulting model contains weighted associations between visual features and output categories. Because one training image depicts a ring-textured sea urchin, the model also develops a weak association between ringed texture and sea urchin.
- Subsequent run of the model on an input image (left): The network correctly detects the starfish. However, the weak association between ringed texture and sea urchin also gives a weak signal to the latter from one of two intermediate nodes. In addition, a shell not included in the training gives a weak signal for the oval shape, also resulting in a weak signal for the sea urchin output. These weak signals may result in a false positive result for sea urchin.
In reality, such textures and outlines would not be represented by single nodes, but rather by associated weight patterns of multiple nodes.
Architectural innovations such as convolutional neural networks (CNNs) significantly improved performance in computer vision tasks, while recurrent neural networks (RNNs) enabled modeling of sequential data such as speech and time-series information. Transformer architectures introduced attention mechanisms that allow neural networks to model long-range dependencies in data and have been the basis of large language models.
Artificial neural networks are used for myriad tasks including chatbots, large-scale text, image, and video generation, and robotics.