This repository contains the official implementation of our paper:
"Your Dissimilarities Define You: Complementary Learning Exploiting Class Diversities" (CVPR 2026).
Deep neural networks are typically trained using cross-entropy with one-hot targets, which only supervises "what class a sample belongs to". Our work introduces a complementary learning paradigm that explicitly models class dissimilarities, supervising the model with "what classes a sample does NOT belong to". By exploiting complementary information, CDL provides informative gradients even when samples are already correctly classified and improves the geometry of learned representations.
We provide example scripts to train a ResNetV2-50 (timm) on ImageNet-1K on a single GPU (Table 3 of the paper).
# Train ResNetV2-50 with standard cross-entropy
python train.py \
--model resnetv2_50 \
--data /path/to/imagenet \
--w_cdl 0.0 \
--batch_size 512 \
--epochs 250
--seed 0
# Train ResNetV2-50 with uniform CDL
python train.py \
--model resnetv2_50 \
--data /path/to/imagenet \
--w_cdl 1.0 \
--batch_size 512 \
--epochs 250
--seed 0
Training for 250 epochs on ImageNet produces the following validation accuracy curves for different
The proposed method consistently improves both Top-1 and Top-5 validation accuracy compared to the baseline training objective.
The work presented here is supported by the RoboSAPIENS project funded by the European Commission’s Horizon Europe programme under grant agreement number 101133807. This publication reflects the authors’ views only. The European Commission is not responsible for any use that may be made of the information it contains.
GCP resources were provided by the National Infrastructures for Research and Technology GRNET and funded by the EU Recovery and Resiliency Facility.

