Where Does the Semantic Gain Come From? A Reproduction and Extension of Semantic Knowledge-driven Contrastive Learning for Long-Tailed Recognition
Organizations: Friedrich-Alexander-Universität Erlangen-Nürnberg (FAU), Germany
Abstract
Semantic Knowledge-driven Contrastive Learning (SKCL) uses a language model to decide which classes are related, and pulls each image towards the prototypes of its semantic neighbours. On CIFAR-100-LT (beta = 100) it reports 54.02% top-1 accuracy, 2.01 points above Balanced Contrastive Learning (BCL), the method it builds on. The code and the class descriptions are not public. I reimplement SKCL, BCL and ConCutMix in one framework, check it against the public baseline code, and run every configuration with three seeds. The two baselines reproduce within 1.5 points, but SKCL built on BCL, as the paper describes it, ends up 0.56 points below BCL. To find out why, I add SKCL to the authors' own ConCutMix code. Trained for the paper's 300 epochs, it reaches 53.69, only 0.33 below the published number. At the same budget, however, the semantic graph adds just 0.23 points over ConCutMix, while training ConCutMix for 100 more epochs adds 1.04. Together with ConCutMix's published lead over BCL (1.15), this explains the claimed gain. A BCL model that never sees the graph already shares 41.2% of the graph's top-2 neighbours with its own most-confused classes (2.0% by chance), which shows why the graph adds so little on these benchmarks. I also test several changes to SKCL. Combining it with the CutMix branch improves it by 1.06 points, and an adaptive version of the graph improves it slightly (+0.34 and +0.28 in two codebases), although these gains are within seed noise.
Figures & tables
| CIFAR-100-LT | CIFAR-10-LT | |||
|---|---|---|---|---|
| Method | Ours | Published | Ours | Published |
| BCL | 52.01 | 84.31 | ||
| ConCutMix | 53.16 | 86.07 | ||
| SKCL | 54.02 | 87.50 | ||
| Best epoch | Last-10 mean | |
|---|---|---|
| ConCutMix, 200 epochs (2 seeds) | ||
| ConCutMix, 300 epochs | ||
| ConCutMix + SKCL, 300 epochs | ||
| SKCL, published (300 epochs) |
| Step | Source | Gain |
|---|---|---|
| BCL ConCutMix | published ( ) | |
| epochs | measured, official code ( ) | |
| + semantic graph | measured, official code ( ) | |
| Sum | ||
| Claimed by SKCL | published ( ) |
| Change | Setting | Reference changed | Gain |
|---|---|---|---|
| + CutMix branch | own, C100 | ||
| + CutMix branch | own, C10 | ||
| paper’s member sets | own, C100 | ||
| adaptive graph | own, C100 | ||
| adaptive graph | official, C100 | ||
| graph weight instead of | official, C100 |
Appendix figures & tables2 assets
Supplementary material from the paper’s appendix.
Appendix
| Run | Data | Last-10 | Best | Many | Med. | Few |
|---|---|---|---|---|---|---|
| FIX_adapt_c100_s0 | C100 | 51.34 | 51.60 | 68.77 | 51.54 | 30.78 |
| FIX_adapt_c100_s1 | C100 | 48.83 | 49.09 | 65.95 | 49.25 | 28.37 |
| FIX_adapt_c100_s2 | C100 | 51.72 | 51.84 | 66.65 | 52.05 | 33.92 |
| FIX_adapt_c10_s0 | C10 | 83.14 | 83.72 | 85.03 | 75.56 | — |
| FIX_adapt_c10_s1 | C10 | 82.70 | 83.14 | 84.64 | 74.95 | — |
| FIX_adapt_c10_s2 | C10 | 83.25 | 83.98 | 84.87 | 76.79 | — |
| Run | Best | Last-10 | A | B | Many | Med. | Few |
|---|---|---|---|---|---|---|---|
| OCCM200_s0 | 52.63 | 52.39 | 52.69 | 52.08 | 64.91 | 49.91 | 40.68 |
| OCCM200_s1 | 52.21 | 52.01 | 52.19 | 51.84 | 64.45 | 50.22 | 39.60 |
| SK_full05_200_s0 | 52.74 | 52.61 | 52.32 | 52.90 | 64.68 | 50.29 | 41.25 |
| SK_full05_200_s1 | 52.64 | 52.47 | 52.22 | 52.71 | 65.60 | 49.27 | 40.87 |
| SK_coarse_200_s0 | 52.90 | 52.54 | 52.84 | 52.25 | 65.14 | 49.51 | 41.39 |
| SK_coarse_200_s1 | 52.34 | 52.17 | 52.90 | 51.44 | 64.53 | 50.12 | 40.13 |
Contrastive Learning
Contrastive learning trains representations by bringing related examples together and separating unrelated ones for recognition, retrieval, and transfer.
See all 318 papers