CLOUD CONCEPT

Neural Networks

Neural networks are machine learning models that learn patterns through interconnected layers of computational units with adjustable parameters.

Cloud Concepts Hub →

What is Neural Networks

A neural network transforms inputs into outputs using learned weights, biases, and mathematical operations. Neural networks support applications such as image recognition, speech transcription, prediction, and generative AI, making them an important foundation for understanding modern cloud AI workloads.

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.

Key aspects of Neural Networks

Neural networks learn layered transformations from data, requiring task-appropriate architectures, reliable evaluation, and separate planning for training and inference.

Learned parameters and nonlinear transformations

Weights and biases determine how inputs are transformed into outputs, while nonlinear activation functions enable complex relationships. Training learns these parameter values rather than requiring engineers to write an explicit rule for every input.

Layered representations

Hidden layers learn intermediate representations useful for the task. Networks with multiple hidden layers underpin deep learning, but neural networks can also have shallow architectures.

Separate training and inference

Training adjusts parameters using an optimization objective; inference uses the resulting model on new data. Plan their compute, scaling, and cost requirements separately because ordinary prediction requests do not retrain the model.

Architecture matched to the task

Different architectures suit different data and objectives, such as convolutional networks for many vision tasks and transformers for many language tasks. Compare a neural approach with simpler baselines before committing to its operational complexity.

Generalization and responsible evaluation

Success means performing well on representative unseen data, not merely achieving low training error. Test for overfitting, consequential errors, and uneven performance across relevant groups.

Compute and deployment trade-offs

Model size, hardware, batching, and numerical precision affect inference latency, throughput, memory use, and cost. Accelerators can help, but their value depends on the workload and utilization.

Cloud services for Neural Networks

These services offer different levels of control over neural network workloads. Amazon SageMaker AI supports custom training and deployment when engineers need control over architecture, data, and evaluation. Amazon Bedrock exposes foundation models for generative applications, while Amazon Rekognition and Amazon Transcribe provide task-specific vision and speech capabilities. An application might transcribe a recording and then use a foundation model to summarize the transcript. These services are alternatives or building blocks, not mandatory components of one pipeline; select them according to task, customization needs, privacy requirements, latency, and cost.

Amazon Bedrock

Amazon Bedrock provides managed access to foundation models, including neural models for language and other modalities. Applications can perform generative inference without operating the underlying model-serving infrastructure.

Open Amazon Bedrock →
Amazon Rekognition image Amazon Rekognition

Amazon Rekognition applies deep learning to image and video analysis through managed APIs. It illustrates using pretrained neural capabilities for tasks such as detecting objects without building a network from scratch.

Open Amazon Rekognition →
Amazon Transcribe image Amazon Transcribe

Amazon Transcribe uses deep learning for automatic speech recognition. Applications can convert speech into text without training and hosting their own speech recognition network.

Open Amazon Transcribe →