SimSiam<T>

Models & Types · AiDotNet.SelfSupervisedLearning

SimSiam: Exploring Simple Siamese Representation Learning.

Inheritance: ModelBase<T, Tensor<T>, Tensor<T>> → SelfSupervisedLearningMethodBase<T> → SimSiam<T>

For Beginners

SimSiam shows that simple Siamese networks can learn meaningful representations without negative pairs, momentum encoder, or large batches. The key is the stop-gradient operation applied to one branch.

How It Works

Key innovations:

Architecture:

Why it works: The stop-gradient prevents both branches from collapsing to the same constant output. The predictor makes one branch “predict” the other, creating useful gradients for learning.

Reference: Chen and He, “Exploring Simple Siamese Representation Learning” (CVPR 2021)

Best for: Simplicity, understanding non-contrastive learning.

Pros: Simplest non-contrastive method, no momentum encoder.

Cons: Can be sensitive to hyperparameters.

Constructors

Constructor Summary
SimSiam(INeuralNetwork<T> encoder, SymmetricProjector<T> projector, SelfSupervisedLearningConfig<T> config) Initializes a new instance of the SimSiam class.

Properties

Property Summary
SelfSupervisedLearningMethodCategory Category { get; }
bool RequiresMemoryBank { get; }
bool UsesMomentumEncoder { get; }
string Name { get; }

Methods

Method Summary
SimSiam<T> Create(INeuralNetwork<T> encoder, int encoderOutputDim, int projectionDim, int hiddenDim, int predictorHiddenDim) Creates a SimSiam instance with default configuration.