Skip to content

Methods · Machine learning · Metric learning

Siamese Network Similarity Learning

A siamese network learns a similarity measure by passing both members of a pair of rows through the same neural network and comparing the resulting embeddings. Training uses the contrastive loss, which pulls same-class pairs together and pushes different-class pairs at least a margin apart, so distances in the learned space reflect class membership.

샴 신경망은 한 쌍의 행을 같은 신경망에 각각 통과시켜 얻은 임베딩을 비교하는 방식으로 유사도 척도를 학습합니다. 학습에는 대조 손실을 써서 같은 범주의 쌍은 가깝게, 다른 범주의 쌍은 정해진 여유 이상 멀어지도록 하므로 학습된 공간의 거리가 범주 소속을 반영합니다.

Can I learn a low-dimensional representation in which rows of the same class are close and rows of different classes are far apart?

같은 범주의 행은 가깝고 다른 범주의 행은 멀어지는 저차원 표현을 학습할 수 있습니까?

The method reports, on held-out rows, how well embedding distance separates same-class from different-class pairs (pair-verification AUC) and the k-nearest-neighbour accuracy in the embedding, each compared with plain distances on the standardised features, along with the training loss and convergence.

When to use Siamese Network Similarity Learning

When to use something else

Assumptions and requirements

What the analysis reports

How to report it

A siamese network with a [value]-dimensional embedding trained with the contrastive loss on [value] pairs verified held-out pairs with AUC = [value] (raw-feature distance: [value]).

Related methods

How this method is validated

이 방법의 검증 근거

  • Independent computation. 1 reference test compares the results with scikit-learn.

    독립 계산. scikit-learn 대조 참조 시험 1건 통과.

Tolerances are relative differences (absolute differences for values near zero). R comparisons and reference tests are re-run before each release of the analysis engine.

허용오차는 상대 차이입니다(0 근처 값은 절대 차이). R 대조와 참조 시험은 분석 엔진을 배포할 때마다 다시 돌립니다.

Run Siamese Network Similarity Learning on Quorant

Data you need
a table (CSV or Excel) with an outcome variable and predictor (feature) columns
Price
600 credits for one analysis up to 10,000 rows (complexity level 4); larger or wider data costs more. Optional methodologist review: 2400 credits.
Checking
Compared with independent computations
Before you pay
A free pre-analysis diagnosis checks your data and gives an exact quote; nothing is deducted until you approve it.

Method ID Q71148 · Reviewed 2026-10-25