Inferensys

Glossary

SimSiam

SimSiam (Simple Siamese Network) is a self-supervised learning architecture that learns representations using a siamese network with a stop-gradient operation and a predictor head, eliminating the need for negative pairs, large batches, or momentum encoders.
Isolated secure server room with network cables physically disconnected, minimal lighting, security-focused environment.
SELF-SUPERVISED CONTINUAL LEARNING

What is SimSiam?

SimSiam (Simple Siamese Network) is a foundational self-supervised learning architecture that learns visual representations without negative pairs, momentum encoders, or large batch sizes.

SimSiam is a self-supervised learning method that trains a siamese network on two differently augmented views of the same image. Its core innovation is the stop-gradient operation, which prevents a collapse to trivial solutions. The architecture uses a predictor head on one branch to match the output of the other, creating a simple yet effective learning signal from positive pairs alone.

This approach eliminates the need for negative pairs (as in contrastive learning) and the momentum encoder used in methods like BYOL. It demonstrates that architectural asymmetry, via the predictor and stop-gradient, is sufficient for learning useful representations. SimSiam is a key reference in the study of non-contrastive learning and provides a simple baseline for continual self-supervised learning on data streams.

ARCHITECTURAL PRINCIPLES

Key Features of SimSiam

SimSiam (Simple Siamese Network) is a minimalist self-supervised learning architecture that achieves competitive representation learning without the complexity of negative pairs, large batch sizes, or momentum encoders. Its core innovation lies in architectural asymmetry and a stop-gradient operation.

01

Siamese Network Architecture

SimSiam uses a siamese network, a structure with two identical subnetworks (encoders) that process two different augmented views of the same input image. The encoders share weights. The core objective is to make the representations of these two views agree with each other, learning an invariant representation to the applied augmentations. This architecture is the foundation for defining the positive pair without external data.

02

Predictor Head & Architectural Asymmetry

A critical component preventing representational collapse is the predictor head, a small multi-layer perceptron (MLP) attached to one side of the siamese network. This creates architectural asymmetry: one view passes through the encoder and predictor, while the other passes only through the encoder. The predictor learns to output a projection that matches the target projection from the other view. This asymmetry prevents a trivial, collapsed solution where both networks output constant vectors.

03

Stop-Gradient Operation

The stop-gradient (stopgrad) operation is the mechanism that makes SimSiam's asymmetric learning stable. In the loss calculation, the gradient is not backpropagated through the target branch's encoder. Formally, the loss is: L = -sim(p(z₁), sg(z₂)), where p() is the predictor, z are projections, and sg() is stopgrad. This treats one side's output as a constant target, akin to a slowly moving teacher in distillation, which empirically prevents collapse without negative samples.

04

Elimination of Negative Pairs

Unlike contrastive methods like SimCLR or MoCo, SimSiam is a non-contrastive method. It does not require negative pairs—explicit examples of dissimilar data used to push representations apart. This simplifies the training objective and removes the need for large batch sizes or memory banks, which are typically used to provide a rich set of negatives. Learning is driven purely by maximizing similarity between positive views, enabled by the stopgrad and predictor.

05

Symmetrized Loss

The training loss is symmetrized to ensure both augmented views contribute equally to learning. For a batch of images, two random augmentations are created for each. The loss is computed twice: first with view A predicting view B, then with view B predicting view A. The final loss is the average of these two terms: L = ½ [L(A→B) + L(B→A)]. This ensures the encoder learns a consistent representation regardless of which view serves as the predictor input.

06

Relation to Continual Learning

SimSiam's simplicity makes it a compelling candidate for continual self-supervised learning. Its lack of a dynamic dictionary or negative queue avoids complications with non-stationary data streams. However, applying it continually introduces challenges:

  • Feature Drift: The encoder's representation space can drift over time.
  • Predictor Forgetting: The predictor head may become misaligned with the evolving encoder.
  • Augmentation Consistency: Maintaining a consistent augmentation strategy across tasks is critical for stable learning. Research explores integrating SimSiam with experience replay or regularization to mitigate catastrophic forgetting.
ARCHITECTURAL COMPARISON

SimSiam vs. Other Self-Supervised Methods

A technical comparison of SimSiam's design against other prominent self-supervised learning frameworks, highlighting key architectural differences, resource requirements, and training mechanisms.

Architectural Feature / RequirementSimSiamContrastive (SimCLR, MoCo)Non-Contrastive (BYOL, Barlow Twins)

Requires Negative Pairs

Requires Large Batch Sizes

Uses a Momentum Encoder

Core Asymmetry Mechanism

Stop-Gradient + Predictor

Negative Sample Contrast

Momentum Encoder (BYOL) / Redundancy Reduction (Barlow Twins)

Primary Loss Function

Cosine Similarity (Negative MSE)

InfoNCE / NT-Xent

MSE (BYOL) / Redundancy Loss (Barlow Twins)

Typical Batch Size for 100-epoch ImageNet Pretraining

256

4096+ (SimCLR), 256 (MoCo w/ dictionary)

4096 (BYOL), 2048 (Barlow Twins)

Key Innovation for Stability

Stop-gradient operation on one branch

Large batch size or dynamic dictionary (MoCo)

Momentum encoder (BYOL), Cross-correlation matrix (Barlow Twins)

Risk of Model Collapse

Mitigated by stop-gradient & predictor

Mitigated by negative pairs

Mitigated by architectural asymmetry (BYOL) or covariance regularization (Barlow Twins)

SELF-SUPERVISED CONTINUAL LEARNING

Frequently Asked Questions

Key questions about SimSiam, a foundational architecture for learning representations from unlabeled data without negative pairs or momentum encoders.

SimSiam (Simple Siamese Network) is a self-supervised learning architecture that learns useful visual representations from unlabeled images without requiring negative pairs, large batch sizes, or a momentum encoder. It works by applying two different random augmentations to the same image, creating two views. These views are processed by an identical encoder network (a Siamese architecture). One branch's output passes through a predictor head—a small MLP—which tries to predict the representation of the other branch. Critically, a stop-gradient operation is applied to the target branch, meaning its weights are not updated based on the predictor's loss. This asymmetry prevents a representational collapse where both branches output constant vectors. The model is trained to minimize the negative cosine similarity between the prediction and the target, effectively pulling the representations of the two augmented views together.

Prasad Kumkar

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.