A neural network is a machine learning model composed of interconnected computational units, often called neurons. These units process numerical inputs using learned weights and biases, typically followed by activation functions that allow the network to represent nonlinear relationships. The structure is loosely inspired by biological nervous systems, but a neural network is a mathematical model, not a simulation of human understanding.
A typical network has an input layer, one or more hidden layers, and an output layer. For example, a network used to detect manufacturing defects might receive numerical representations of image pixels and produce scores for defective and acceptable products. Hidden layers learn intermediate representations that help distinguish the classes. Engineers choose the architecture and training approach, while training determines the model's parameter values.
Training and inference are different activities. During training, an optimization algorithm adjusts parameters to reduce a loss function, which measures how well the model meets its learning objective. Backpropagation commonly calculates the gradients used to make these updates. During inference, the trained model processes new inputs to produce predictions or generated outputs. Ordinary inference does not update the model's weights, so sending more requests does not automatically teach a deployed model new facts.
Artificial intelligence is the broader field of building systems that perform tasks associated with intelligence. Machine learning is an approach within AI that learns patterns from data, and neural networks are one family of machine learning models. Deep learning uses neural networks with multiple hidden layers. Not every neural network is deep, and not every machine learning algorithm is a neural network: decision trees and linear regression are other model families.
Neural networks can support classification, regression, and generative tasks. Computer vision applies AI to images and video, while natural language processing applies it to human language; both can use neural networks. Large language models are typically deep neural networks based on transformer architectures. However, a network that classifies product images is neither an LLM nor necessarily generative AI. Agentic AI describes systems that select actions and use tools toward goals; a neural network can power part of such a system without being an agent by itself.
In the cloud, engineers can train custom networks on managed compute or invoke pretrained models through APIs. A custom workflow might store labeled images in object storage, train a model using a machine learning framework, evaluate it on held-out data, and deploy an inference endpoint. GPUs and other accelerators can improve performance for suitable workloads, but small networks may run economically on CPUs. Online endpoints serve interactive requests, while batch inference processes accumulated data when immediate responses are unnecessary.
The main trade-offs include data requirements, compute cost, latency, and explainability. Larger networks are not automatically more accurate or more cost-effective, especially for small tabular datasets where simpler models can be competitive. Overfitting occurs when a network learns training-specific patterns that do not generalize; validation data, regularization, and early stopping help manage it. Underfitting occurs when the model fails to capture important patterns even in the training data.
Data quality and responsible evaluation remain essential. Networks can reproduce statistical biases in training data, and good aggregate accuracy does not guarantee fair performance across groups. A learned bias parameter is a numerical offset, not the same concept as unfair bias. Before deployment, evaluate task-specific metrics, error costs, subgroup performance, and inference latency. After deployment, monitor input changes and model performance, and retrain deliberately when needed.