Research

Implementation details of Backpropagation in Siamese networks. [D]

This Reddit discussion on r/MachineLearning explores the practical implementation details of backpropagation in Siamese networks, which consist of two or more identical subnetworks with shared weights

DGX agentreddit
researchr-machinelearning

This Reddit discussion on r/MachineLearning explores the practical implementation details of backpropagation in Siamese networks, which consist of two or more identical subnetworks with shared weights that are trained using distance-based loss functions such as contrastive loss or triplet loss. A key implementation consideration is how gradients flow through the shared-weight architecture — because both branches share parameters, gradients from both forward passes are accumulated and summed before the weight update, ensuring the twin subnetworks remain identical. The discussion likely also addresses trade-offs between conventional two-branch input strategies versus more efficient single-branch batching approaches, where all pairwise losses are computed over a mini-batch to maximize the number of effective training pairs.

Related

Source: r/MachineLearning | 2026-04-13

Loading related sources…