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
50.85±0.81
52.01
83.53±0.23
84.31
ConCutMix
51.71±0.80
53.16
83.84±0.41
86.07
SKCL
50.29±1.51
54.02
83.19±0.10
87.50
Table 1: Top-1 accuracy (%), β=100 , ResNet-32, my framework; mean ± SD over three seeds of the last-10-epoch mean. Published values from [ 1 ] .
Figure 1: Per-seed results (open circles), mean ± SD (bars) and published values (diamonds). Numbers give ours minus published. SKCL + adapt. is the adaptive graph of Section 4.5 .
Figure 2: SKCL variants added to the official ConCutMix code, CIFAR-100-LT, 200 epochs, best epoch. Filled markers: mean of two seeds; open markers: single seeds; shaded band: the two ConCutMix seeds.
Best epoch
Last-10 mean
ConCutMix, 200 epochs (2 seeds)
52.42±0.30
52.20±0.27
ConCutMix, 300 epochs
53.46±0.38
53.23±0.38
ConCutMix + SKCL, 300 epochs
53.69±0.25
53.44±0.29
SKCL, published (300 epochs)
54.02
Table 2: ConCutMix with and without SKCL on the official ConCutMix code, CIFAR-100-LT, three seeds. Top-1 accuracy (%).
Step
Source
Gain
BCL → ConCutMix
published ( 52.01→53.16 )
+1.15
200→300 epochs
measured, official code ( 52.42→53.46 )
+1.04
+ semantic graph
measured, official code ( 53.46→53.69 )
+0.23
Sum
+2.42
Claimed by SKCL
published ( 52.01→54.02 )
+2.01
Table 3: Breakdown of SKCL’s claimed gain over BCL on CIFAR-100-LT (best epoch, as in the original papers).
Figure 3: Best-epoch accuracy against training epochs on CIFAR-100-LT. Open markers: published values (official ConCutMix logs at 200 and 400 epochs, SKCL paper at 300 ). Filled markers: my runs of the official code.
Figure 4: Effect of the graph and of interventions on it, CIFAR-100-LT (and CIFAR-10-LT where marked), mean ± 1 SE of the difference over three seeds. The shaded band marks ±1 point of seed noise; the red marker is the published claim.
Change
Setting
Reference → changed
Gain
+ CutMix branch
own, C100
50.29→51.35
+1.06
+ CutMix branch
own, C10
83.19→84.13
+0.94
paper’s member sets
own, C100
50.29→50.92
+0.63
adaptive graph
own, C100
50.29→50.63
+0.34
adaptive graph
official, C100
52.10→52.38
+0.28
graph weight 0.5 instead of 1
official, C100
52.10→52.69
+0.59
Table 4: Changes that improve SKCL. Own: my framework, last-10 mean, three seeds. Official: official ConCutMix code, best epoch, 200 epochs, two seeds.
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
—
Appendix
Table 5: Per-seed results of all corrected-pipeline runs, β=100 . Last-10: mean top-1 over the final ten epochs (the reported metric); Best: maximum top-1 over all epochs (shown for comparison only); Many, Med. (Medium) and Few are last-10 group accuracies. C100/C10: CIFAR-100-LT/CIFAR-10-LT, which has no Few classes at β=100 . Run-name prefixes: bcl = BCL, ccm = ConCutMix, ccm_g0 = ConCutMix with γ=0 , skcl = SKCL, adapt = SKCL + adaptive graph, cutmixcombo(_nowt) = frequency-gated (binary) SKCL graph + CutMix, full/surprising/redundant/random = graph-filtering variants; PF_joint, PF_nocc, PF_graph, PF_full = paper-faithful paper-text variants: joint member sets, no class-complement, both, both + CutMix branch; s n = seed n .
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
Appendix
Table 6: Per-seed results on the official ConCutMix code (official ConCutMix code, CIFAR-100-LT, β=100 ). Best: best-epoch top-1 on the full test set; Last-10: last-10 mean; A/B: last-10 mean on the two test halves; Many, Med., Few: last-10 group accuracies. OCCM = ConCutMix; SK_ = ConCutMix + SKCL variant (full: coarse head, joint member sets, w=1 ; full05: w=0.5 ; coarse: coarse head only; fine: fine-level Term 1; adapt: full + adaptive graph; ls: graph label smoothing; all: full + ls); 200/300: epochs; s n : seed.
Contrastive learning trains representations by bringing related examples together and separating unrelated ones for recognition, retrieval, and transfer.
While Contrastive Learning (CL) has revolutionized self-supervised representation learning, its latent representations remain highly entangled and opaque, limiting their interpretability in safety-critical applications. We identify that a fundamental cause of this entanglement is the reliance on deterministic similarity measures, which treat all feature dimensions equally. In compositional scenes, this creates an Optimization Conflict: common background features, such as, "blue sky", are encouraged to align in positive pairs but simultaneously repelled in negative pairs, causing gradient oscillations that hinder precise semantic disentanglement. To address this, we propose BayesNCL (Bayesian Gated Non-Negative Contrastive Learning). Unlike standard approaches, BayesNCL introduces a probabilistic gating mechanism that dynamically filters out task-irrelevant, high-frequency common features while selectively retaining discriminative semantics. By formalizing feature selection as a variational inference problem with a sparse Bernoulli prior, our method effectively resolves the optimization conflict. Empirical experimental results on Imagenet-100 demonstrate that BayesNCL achieves a remarkable 142.1% improvement in semantic consistency compared to state-of-the-art baselines, yielding highly interpretable representations without compromising downstream task performance. Code is available at https://github.com/Cui-Peng-624/BayesNCL.
Peng Cui, Jiahao Zhang, Lijie Hu
Mohamed bin Zayed University of Artificial Intelligence (MBZUAI).
Contrastive vision-language models continue to be the dominant approach for image-text retrieval. Contrastive Language-Image Pre-training (CLIP) trains two neural networks to align their image and text embeddings in a shared latent space. As a challenging case-study for neurosymbolic AI, recent results evaluating CLIP on negated or paraphrased text have shown mixed performance as these are difficult to define formally for text data. Negation produces the opposite meaning using various possible but small lexical changes. Paraphrasing may use very different textual expressions to denote essentially the same thing. As a result, learning of paraphrasing and negation together poses a significant challenge because of the above mismatch between changes in syntax and intended meaning expected to be captured by distances in embedding space. This paper proposes a new CLIP contrastive loss function capable of balancing the requirements of having both paraphrasing and negation. It applies training triplets consisting of original, paraphrased and negated text generated by multiple large language models to the evaluation of CLIP models. The approach, called SemCLIP, aims to learn semantically-relevant and simple embeddings, placing paraphrased captions nearer to the original image embeddings while at the same time pushing negated captions farther away. Empirically, SemCLIP is shown to be capable of preserving roughly the same performance as CLIP augmented with either negation or paraphrasing. Although direct comparisons are difficult to make because the problem of learning with both negation and paraphrasing is different, an expected benefit of SemCLIP should be robustness when applied zero-shot to downstream image classification tasks. Our experiments confirm such robustness as measured by difference in accuracy (mean-accuracy delta) between original and negated captions on five downstream datasets.
Kwun Ho Ngan, Saman Sadeghi Afgeh, Joe Townsend +1
Fujitsu Research of Europe · United Kingdom · City St George’s, University of London
Neuron labeling assigns textual descriptions to internal units of deep networks. Existing approaches typically rely on highly activating examples, often yielding broad or misleading labels by focusing on dominant but incidental visual factors. Prior work such as FALCON introduced contrastive examples -- inputs that are semantically similar to activating examples but elicit low activations -- to sharpen explanations, but it primarily addresses subspace-level interpretability rather than scalable neuron-level labeling. We revisit contrastive explanations for neuron-level labeling in two stages: (1) candidate label generation with vision language models (VLMs) and (2) label assignment with CLIP-like encoders. First, we show that providing contrastive image sets to VLMs yields candidate labels that are more specific and more faithful. Second, we introduce Contrastive Semantic Projection (CSP), an extension of SemanticLens that incorporates contrastive examples directly into its CLIP-based scoring and selection pipeline. Across extensive experiments and a case study on melanoma detection, contrastive labeling improves both faithfulness and semantic granularity over state-of-the-art baselines. Our results demonstrate that contrastive examples are a simple yet powerful and currently underutilized component of neuron labeling and analysis pipelines.
Oussama Bouanani, Jim Berend, Wojciech Samek +2
Fraunhofer Heinrich Hertz Institute, Berlin, Germany · Technische Universität Berlin, Berlin, Germany · BIFOLD – Berlin Institute for the Foundations of Learning and Data, Berlin, Germany +1