Papers › Circle Loss: A Unified Perspective of Pair Similarity Optimization

Circle Loss: A Unified Perspective of Pair Similarity Optimization

25 Feb 2020CVPR 2020 6arXiv:2002.10857archive 2025-07-28

Yifan Sun, Changmao Cheng, Yuhan Zhang, Chi Zhang, Liang Zheng, Zhongdao Wang, Yichen Wei

This paper provides a pair similarity optimization viewpoint on deep feature learning, aiming to maximize the within-class similarity sₚ and minimize the between-class similarity sₙ. We find a majority of loss functions, including the triplet loss and the softmax plus cross-entropy loss, embed sₙ and sₚ into similarity pairs and seek to reduce (sₙ-sₚ). Such an optimization manner is inflexible, because the penalty strength on every single similarity score is restricted to be equal. Our intuition is that if a similarity score deviates far from the optimum, it should be emphasized. To this end, we simply re-weight each similarity to highlight the less-optimized similarity scores. It results in a Circle loss, which is named due to its circular decision boundary. The Circle loss has a unified formula for two elemental deep feature learning approaches, i.e. learning with class-level labels and pair-wise labels. Analytically, we show that the Circle loss offers a more flexible optimization approach towards a more definite convergence target, compared with the loss functions optimizing (sₙ-sₚ). Experimentally, we demonstrate the superiority of the Circle loss on a variety of deep feature learning tasks. On face recognition, person re-identification, as well as several fine-grained image retrieval datasets, the achieved performance is on par with the state of the art.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 2 code samples harvested from 2 repositories linked to this paper: 2 ran (of which 0 constructed an object rather than computing a result; 0 with no instrument failure: 0 honoured, 0 violated, 0 with no contract checked; 2 where Syntology's instrument failed) · 0 unverified. Where Syntology's instrument failed: 1 where our contract draft was wrong; 1 where the contract check could not run; failures of Syntology's instrument, not of the code. Every run on this page is a failure of Syntology's instrument, not of the code.

By repository: community (archive-listed): 2 samples from 2 repositories, 2 ran (0 with no instrument failure; 2 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

No sample is linked to this paper from 7 of its repositories that Syntology harvested for other papers:

Levels written on 2026-09-22 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

16 repositories listed; official and paper-mentioned ones first.

FEIfei-coder/circle-loss-for-reid mentioned on GitHubpytorchSyntology: 1 sample, 1 ran (1 instrument-failed) · 0 unverified report
TinyZeaMays/CircleLoss mentioned on GitHubpytorchSyntology: 1 sample, 1 ran (1 instrument-failed) · 0 unverified report
XuyangBai/D3Feat mentioned on GitHubtfMITSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to D3Feat: Joint Learning of Dense Detection and Description of 3D Local Features (arXiv:2003.03164; that paper's own run record: 6 ran (of which 0 constructed an object rather than computing a result; 6 with no instrument failure: 0 honoured, 0 violated, 6 with no contract checked; 0 where Syntology's instrument failed) · 2 unverified); nothing checks that they implement this paper's method. report
layumi/Person_reID_baseline_pytorch mentioned on GitHubpytorchSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Swin Transformer: Hierarchical Vision Transformer using Shifted Windows (arXiv:2103.14030; that paper's own run record: 123 ran (of which 45 constructed an object rather than computing a result; 79 with no instrument failure: 6 honoured, 3 violated, 70 with no contract checked; 44 where Syntology's instrument failed) · 84 unverified); nothing checks that they implement this paper's method. report
lzx551402/ASLFeat mentioned on GitHubtfMITSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to ASLFeat: Learning Local Features of Accurate Shape and Localization (arXiv:2003.10071; that paper's own run record: 6 ran (of which 0 constructed an object rather than computing a result; 6 with no instrument failure: 0 honoured, 0 violated, 6 with no contract checked; 0 where Syntology's instrument failed) · 10 unverified); nothing checks that they implement this paper's method. report
qianjinhao/circle-loss mentioned on GitHubpytorchMITSyntology: not harvested report
wujpbb7/caffe_circleloss mentioned on GitHubSyntology: not harvested report
yujiacheng333/CircleLossMNIST mentioned on GitHubtfSyntology: not harvested report
zhen8838/Circle-Loss mentioned on GitHubtfMITSyntology: not harvested report
MindCode-4/code-11 mindsporeSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Entropy Law: The Story Behind Data Compression and LLM Performance (arXiv:2407.06645; that paper's own run record: 4 ran (of which 0 constructed an object rather than computing a result; 3 with no instrument failure: 2 honoured, 1 violated, 0 with no contract checked; 1 where Syntology's instrument failed) · 1 unverified); nothing checks that they implement this paper's method. report
MindCode-4/code-6 mindsporeSyntology: not harvested report
MindSpore-scientific/code-3 mindsporeSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Coneheads: Hierarchy Aware Attention (arXiv:2306.00392; that paper's own run record: 7 ran (of which 0 constructed an object rather than computing a result; 1 with no instrument failure: 0 honoured, 1 violated, 0 with no contract checked; 6 where Syntology's instrument failed) · 0 unverified); nothing checks that they implement this paper's method. report
alibaba/EasyCV pytorchSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to End-to-End Object Detection with Transformers (arXiv:2005.12872; that paper's own run record: 70 ran (of which 45 constructed an object rather than computing a result; 62 with no instrument failure: 2 honoured, 1 violated, 59 with no contract checked; 8 where Syntology's instrument failed) · 22 unverified), Training data-efficient image transformers & distillation through attention (arXiv:2012.12877; that paper's own run record: 12 ran (of which 1 constructed an object rather than computing a result; 9 with no instrument failure: 1 honoured, 0 violated, 8 with no contract checked; 3 where Syntology's instrument failed) · 7 unverified), Masked Autoencoders Are Scalable Vision Learners (arXiv:2111.06377; that paper's own run record: 86 ran (of which 40 constructed an object rather than computing a result; 68 with no instrument failure: 8 honoured, 0 violated, 60 with no contract checked; 18 where Syntology's instrument failed) · 51 unverified) and 1 more (every one in this page's JSON twin); nothing checks that they implement this paper's method. report
nanzhaogang/contrib mindsporeSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Hyperspherical Consistency Regularization (arXiv:2206.00845; that paper's own run record: 3 ran (of which 1 constructed an object rather than computing a result; 3 with no instrument failure: 1 honoured, 1 violated, 1 with no contract checked; 0 where Syntology's instrument failed) · 0 unverified); nothing checks that they implement this paper's method. report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

A paper named beside a repository with no sample linked to this paper is shown with that paper's own run record, not this paper's: “ran” means executed on a synthesized input, not that the code is correct, and “where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Papers are listed in arXiv-id order, at most three per repository.

Code Syntology ran Syntology

2 samples harvested: 2 ran (of which 0 constructed an object rather than computing a result; 0 with no instrument failure: 0 honoured, 0 violated, 0 with no contract checked; 2 where Syntology's instrument failed) · 0 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Every run on this page is a failure of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

1ran · our draft was wrong
1ran; the contract check could not run

Licence: 1 of the 2 samples is pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 2 repositories linked to this paper, official or community; the list below is grouped by repository, each group headed by its name and what it is to the paper. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of six reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

FEIfei-coder/circle-loss-for-reid community (archive-listed) 1 sample, 1 ran (1 instrument-failed) · 0 unverified
DeepSupervision losses.py ran · our draft was wrong MIT (permissive) · b33437b2fbf7912a · report fixture: signature criterion:callable/0/?, xs:tuple/1/Tensor, y:Tensor/2/float · returned Tensor · level recorded 2026-09-22
TinyZeaMays/CircleLoss community (archive-listed) 1 sample, 1 ran (1 instrument-failed) · 0 unverified
convert_label_to_similarity circle_loss.py ran; the contract check could not run (RAISES) · metamorphic tier: deterministic fingerprinted no licence file found · pointer only · 05c14581c9d9da1d · report fixture: signature normed_feature:Tensor/2/float, label:Tensor/1/int · returned tuple · level recorded 2026-09-22

Tasks

Face RecognitionFace VerificationImage RetrievalMetric LearningPerson Re-IdentificationRetrieval

1 archive task tag without a task page not shown.

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Face Recognition CFP-FP CircleLoss(ours) Accuracy 0.9602 #5 of 8 Archive leaderboard report
Face Recognition LFW CircleLoss Accuracy 0.9973 #9 of 16 Archive leaderboard report
Face Verification IJB-C circle loss TAR @ FAR=1e-3 96.29% #11 of 26 Archive leaderboard report
Face Verification IJB-C circle loss TAR @ FAR=1e-4 93.95% #11 of 26 Archive leaderboard report
Face Verification IJB-C circle loss TAR @ FAR=1e-5 89.60% #11 of 26 Archive leaderboard report
Face Verification IJB-C circle loss model R100 #11 of 26 Archive leaderboard report
Face Verification IJB-C circle loss training dataset MS1M Cleaned #11 of 26 Archive leaderboard report
Metric Learning CARS196 CircleLoss R@1 83.4 #30 of 36 Archive leaderboard report
Metric Learning Stanford Online Products Circle Loss R@1 78.3 #28 of 33 Archive leaderboard report
Person Re-Identification MSMT17 MGN + CircleLoss(ours) Rank-1 76.9 #35 of 43 Archive leaderboard report
Person Re-Identification MSMT17 MGN + CircleLoss(ours) mAP 52.1 #35 of 43 Archive leaderboard report
Person Re-Identification MSMT17 ResNet50 + CircleLoss(ours) Rank-1 76.3 #36 of 43 Archive leaderboard report
Person Re-Identification MSMT17 ResNet50 + CircleLoss(ours) mAP 50.2 #36 of 43 Archive leaderboard report
Person Re-Identification Market-1501 MGN + CircleLoss(ours) Rank-1 96.1 #32 of 135 Archive leaderboard report
Person Re-Identification Market-1501 MGN + CircleLoss(ours) mAP 87.4 #32 of 135 Archive leaderboard report
Person Re-Identification Market-1501 ResNet50 + CircleLoss(ours) Rank-1 94.2 #80 of 135 Archive leaderboard report
Person Re-Identification Market-1501 ResNet50 + CircleLoss(ours) mAP 84.9 #80 of 135 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

SoftmaxTriplet Loss

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections