# Contrastive ECOC: Learning Output Codes for Adversarial Defense

arXiv: https://arxiv.org/abs/2508.10491 · HTML: https://mlsanity.com/paper/2508.10491/

## Key facts

- Cited by 1 papers in the map (data through 14 Oct 2026).
- Builds on 7 of its 10 references that are in the map.
- First posted on arXiv 14 Aug 2025.

## Builds on (most cited first, 7 of 7)

- [A Simple Framework for Contrastive Learning of Visual Representations](https://mlsanity.com/paper/2002.05709/) (2020)
- [Explaining and Harnessing Adversarial Examples](https://mlsanity.com/paper/1412.6572/) (2014)
- [Towards Deep Learning Models Resistant to Adversarial Attacks](https://mlsanity.com/paper/1706.06083/) (2017)
- [Intriguing properties of neural networks](https://mlsanity.com/paper/1312.6199/) (2013)
- [Distillation as a Defense to Adversarial Perturbations against Deep Neural Networks](https://mlsanity.com/paper/1511.04508/) (2015)
- [Error-Correcting Output Codes with Ensemble Diversity for Robust Learning in Neural Networks](https://mlsanity.com/paper/1912.00181/) (2019)
- [Improved Robustness Against Adaptive Attacks With Ensembles and Error-Correcting Output Codes](https://mlsanity.com/paper/2303.02322/) (2023)

## Built on by (most cited first, 1 of 1)

- [Fundamental limits of distributed multiclass classification from simple binary decisions](https://mlsanity.com/paper/2607.19334/) (2026)

## Abstract (arXiv)

Although one-hot encoding is commonly used for multiclass classification, it is not always the most effective encoding mechanism. Error Correcting Output Codes (ECOC) address multiclass classification by mapping each class to a unique codeword used as a label. Traditional ECOC methods rely on manually designed or randomly generated codebooks, which are labor-intensive and may yield suboptimal, dataset-agnostic results. This paper introduces three models for automated codebook learning based on contrastive learning, allowing codebooks to be learned directly and adaptively from data. Across four datasets, our proposed models demonstrate superior robustness to adversarial attacks compared to two baselines. The source is available at https://github.com/YuChou20/Automated-Codebook-Learning-with-Error-Correcting-Output-Code-Technique.
