ResNet is a deep neural network architecture that solves the vanishing gradient problem in very deep networks through the use of skip connections or residual blocks. These blocks implement identity mappings that allow gradients to flow directly through the network, enabling the successful training of architectures with over 1,000 layers. This breakthrough won the ImageNet Large Scale Visual Recognition Challenge (ILSVRC) in 2015 and became a standard backbone for computer vision tasks.
Glossary
ResNet

What is ResNet?
ResNet (Residual Network) is a foundational deep convolutional neural network architecture that introduced residual connections to enable the training of networks with hundreds or thousands of layers.
The core innovation is the residual function F(x) = H(x) - x, where the network learns the difference from the identity, rather than the complete transformation H(x). This formulation makes it easier to optimize extremely deep models. ResNet variants (ResNet-50, ResNet-101) are ubiquitous feature extractors in modern multimodal architectures, providing robust visual representations for downstream tasks like object detection and image segmentation.
Key Architectural Features
ResNet's core innovation lies in its architectural design, which introduced a simple yet powerful mechanism to enable the training of networks that are substantially deeper than was previously feasible.
Residual Blocks & Skip Connections
The fundamental unit of a ResNet is the residual block. Instead of a stack of layers learning a desired underlying mapping H(x), the block is designed to learn a residual function F(x) = H(x) - x. The original input x is passed forward via an identity skip connection and added to the output of the block's layers: Output = F(x) + x. This structure mitigates the vanishing gradient problem by providing a direct, unmodified path for gradients to flow backward through the network during training.
- Identity Mapping: The skip connection performs an element-wise addition, not a concatenation.
- Ease of Optimization: The network can learn to drive the residual F(x) towards zero, making it easier to train layers as the network depth increases.
Bottleneck Design
For very deep networks (e.g., ResNet-50, 101, 152), a bottleneck block is used to improve computational efficiency. This design reduces the number of parameters and FLOPs. A standard bottleneck block for ResNet-50/101/152 has the structure:
- 1x1 Convolution: Reduces the channel dimensionality (e.g., from 256 to 64).
- 3x3 Convolution: Performs spatial feature extraction on the reduced channel set.
- 1x1 Convolution: Expands the channel dimensionality back up (e.g., from 64 to 256).
This 1x1 -> 3x3 -> 1x1 pattern creates a computational bottleneck, allowing for deeper networks without a prohibitive increase in cost. The skip connection connects the input to the output of this three-layer stack.
Downsampling & Projection Shortcuts
When the spatial dimensions are halved (e.g., from 56x56 to 28x28) and the number of channels is doubled, the identity mapping from the input x cannot be directly added to the output F(x) due to dimension mismatch. ResNet handles this in two ways:
- Option A: The shortcut still performs an identity mapping, but extra zero entries are padded to increase channels. This adds no extra parameters.
- Option B (Projection Shortcut): A 1x1 convolutional layer with a stride of 2 is used in the shortcut path. This layer projects the input to the correct dimensions (channels and spatial size) and is parameterized. This is the more common approach in modern implementations as it provides a learned projection.
These mechanisms allow the residual learning framework to be applied consistently across the entire network, even when changing feature map dimensions.
Global Average Pooling
Prior architectures like VGG and AlexNet used one or more fully connected (dense) layers at the end of the convolutional feature extractor for classification. ResNet popularized the use of Global Average Pooling (GAP) as the final layer before the classification head. Instead of flattening the feature map, GAP takes the spatial average of each channel in the final convolutional feature map.
- Reduces Parameters: Eliminates the need for massive dense layers, drastically cutting the number of parameters.
- Improves Generalization: Acts as a regularizer, reducing overfitting.
- Input Size Flexibility: Makes the network more robust to varying input spatial sizes, as the pooling operation is adaptive.
The output of GAP is a single vector per channel, which is then fed into a single, small fully connected layer for final class prediction.
Batch Normalization Integration
ResNet architectures integrate Batch Normalization (BN) after every convolutional layer and before the activation function (typically ReLU). This was a key design choice for stable training of very deep networks.
- Standard Order: The common pattern within a residual block is
Conv -> BN -> ReLU. - Stabilizes Activations: BN normalizes the activations of the previous layer, reducing internal covariate shift. This allows for higher learning rates and provides a mild regularization effect.
- Critical for Depth: The combination of BN and residual connections was instrumental in enabling the successful training of networks with over 100 layers. The original ResNet paper placed BN after the addition of the skip connection, but common practice now places it inside the residual path before the addition.
Architecture Variants & Depth
The ResNet design spawned a family of models defined by their depth, measured in the number of weighted layers. The key variants demonstrate the scalability of the architecture:
- ResNet-18/34: Use basic blocks containing two 3x3 convolutional layers.
- ResNet-50/101/152: Use bottleneck blocks (1x1, 3x3, 1x1 convs) for efficiency.
- Performance Scaling: Deeper models (ResNet-152) generally achieve higher accuracy on benchmarks like ImageNet, showing that the residual framework effectively counteracts degradation.
Later Evolutions:
- ResNeXt: Introduces a cardinality dimension, using grouped convolutions within the bottleneck block for a multi-branch design.
- Wide ResNet: Increases the width (number of filters) per layer instead of depth, often yielding better performance with fewer layers.
- ResNet-D: A refined version that tweaks the downsampling block and stem for improved accuracy.
How ResNet Works: The Residual Learning Framework
ResNet (Residual Network) is a seminal deep convolutional neural network architecture that introduced residual connections to solve the vanishing gradient problem, enabling the training of networks with hundreds or thousands of layers.
A Residual Network (ResNet) is defined by its core innovation: the residual block. Instead of a stack of layers learning an underlying mapping H(x), the block is designed to learn a residual function F(x) = H(x) - x. The original input x is added back to the output of the block via a skip connection (or identity connection), producing H(x) = F(x) + x. This simple reformulation allows gradients to flow directly through the identity path, mitigating the vanishing gradient problem that stunts the training of very deep networks.
The architecture popularized the bottleneck block for deeper variants, which uses 1x1 convolutions to reduce and then restore dimensionality, making the 3x3 convolution more computationally efficient. ResNet's residual learning framework demonstrated that extremely deep networks (e.g., ResNet-152) could be optimized effectively, leading to state-of-the-art performance on ImageNet and establishing a foundational design pattern used in nearly all subsequent deep architectures, including those for natural language processing and beyond.
Common ResNet Variants and Applications
The original ResNet architecture has been adapted into numerous variants, each optimized for specific computational constraints, data types, or performance objectives. These variants demonstrate the flexibility of the residual learning principle.
ResNet vs. Other CNN Architectures
A technical comparison of ResNet's core innovations against preceding and contemporary convolutional neural network architectures, focusing on mechanisms for enabling depth and feature reuse.
| Architectural Feature | ResNet (Residual Networks) | VGGNet | Inception (GoogLeNet) |
|---|---|---|---|
Core Innovation | Residual connections (skip connections) | Very deep stacks of small (3x3) convolutional filters | Inception modules with parallel convolutions |
Primary Goal | Solve vanishing/exploding gradients to enable extreme depth (>100 layers) | Increase depth with simple, uniform layers for better representation | Increase width and computational efficiency within layers |
Key Building Block | Residual block: F(x) + x | Stack of 3x3 conv layers + ReLU | Inception module: 1x1, 3x3, 5x5 conv & pooling in parallel |
Gradient Flow | Unimpeded via identity shortcut paths | Sequential, can degrade with depth | Dispersed across parallel paths |
Parameter Efficiency | High (reuses features via identity mapping) | Low (very high parameter count in FC layers) | Moderate (uses 1x1 conv for dimensionality reduction) |
Representative Depth | ResNet-50, ResNet-101, ResNet-152 | VGG-16, VGG-19 | GoogLeNet (22 layers with inception modules) |
ILSVRC 2015 Result | 1st place (3.57% top-5 error) | 2nd place (7.3% top-5 error in 2014) | 1st place (6.67% top-5 error in 2014) |
Frequently Asked Questions
ResNet (Residual Network) is a foundational deep learning architecture that revolutionized the training of very deep neural networks. These questions address its core mechanics, applications, and significance.
ResNet (Residual Network) is a deep convolutional neural network architecture that introduced residual connections (or skip connections) to enable the successful training of networks with hundreds or thousands of layers. It works by reformulating the layers as learning residual functions with reference to the layer inputs, instead of learning unreferenced functions. A residual block implements this by adding the input of the block (x) to the output of a stack of layers (F(x)), producing H(x) = F(x) + x. This identity shortcut connection allows gradients to flow directly through the network during backpropagation, mitigating the vanishing gradient problem that previously prevented the training of extremely deep models.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
ResNet's design introduced fundamental building blocks for deep learning. These related concepts are essential for understanding modern neural network architectures.
Residual Connection
A residual connection, or skip connection, is the core innovation of ResNet. It creates a direct pathway for the gradient to flow through the network by adding the input of a block to its output via an identity mapping. This formulation, expressed as (F(x) + x), allows the network to learn residual functions (F(x)) relative to the input, making it easier to optimize very deep architectures by mitigating the vanishing gradient problem.
Vanishing Gradient Problem
The vanishing gradient problem is a challenge in training deep neural networks where gradients calculated during backpropagation become exponentially small as they are propagated backward through many layers. This prevents weights in the earlier layers from updating effectively, stalling learning. ResNet directly addresses this by providing shortcut paths (residual connections) that allow gradients to flow unimpeded, enabling the stable training of networks with hundreds or even thousands of layers.
Batch Normalization
Batch Normalization is a technique that normalizes the inputs to a layer for each mini-batch during training. It stabilizes learning by reducing internal covariate shift—the change in the distribution of layer inputs. While not invented for ResNet, it is a critical companion technology. In the original ResNet paper, batch normalization is applied after each convolution and before activation, which works synergistically with residual connections to enable the training of extremely deep networks.
DenseNet
DenseNet (Densely Connected Convolutional Network) is an architecture that extends the concept of shortcut connections. Instead of adding the input to the output of a block, DenseNet concatenates the feature maps of all preceding layers to the inputs of all subsequent layers. This creates dense connectivity, encouraging feature reuse, reducing the number of parameters, and improving gradient flow. It represents an evolution of the connectivity principles first popularized by ResNet.
Highway Networks
Highway Networks are a precursor to ResNet that introduced adaptive gated shortcut connections. They use learned gating mechanisms to regulate how much information flows through a transformation path versus a carry (skip) path. While ResNet simplified this concept by using fixed, ungated identity shortcuts (with optional projection for dimension matching), Highway Networks demonstrated the feasibility of training very deep networks with bypass pathways, directly inspiring the ResNet architecture.
Architectural Variants (ResNet-50, ResNet-101)
ResNet is defined by a family of models with different depths, primarily distinguished by the number of layers:
- ResNet-18/34: Use basic blocks with two 3x3 convolutions.
- ResNet-50/101/152: Use bottleneck blocks with a 1x1 convolution for dimensionality reduction, a 3x3 convolution, and a 1x1 convolution for restoration. This design increases depth while being computationally more efficient. The number (e.g., 50) refers to the count of weight layers. These variants provide a clear trade-off between accuracy, computational cost, and model size for different applications.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us