Contrastive ECOC: Learning Output Codes for Adversarial Defense

📅 2025-08-14
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
Traditional ECOC methods rely on handcrafted or random codebook design, suffering from poor generalization and limited data adaptivity, thereby failing to enhance adversarial robustness. To address this, we propose CL-ECOC—the first end-to-end differentiable ECOC framework grounded in contrastive learning—that automatically learns data-adaptive, semantically discriminative, and error-correcting codebooks. Our key innovation lies in embedding inter-class contrastive constraints directly into the ECOC encoding space, enabling joint optimization of encoding representations and classifiers, which significantly improves robustness against adversarial attacks. Extensive experiments on four benchmark datasets demonstrate that CL-ECOC consistently outperforms classical ECOC variants and state-of-the-art adversarial training baselines. The source code is publicly available.

Technology Category

Application Category

📝 Abstract
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.
Problem

Research questions and friction points this paper is trying to address.

Improving multiclass classification with adaptive codebook learning
Enhancing adversarial robustness via contrastive ECOC models
Automating codebook generation to replace manual or random designs
Innovation

Methods, ideas, or system contributions that make the work stand out.

Automated codebook learning via contrastive learning
Adaptive ECOC codewords from data
Enhanced robustness against adversarial attacks
🔎 Similar Papers
No similar papers found.
C
Che-Yu Chou
Computer Science and Information Engineering, National Central University, Taoyuan, Taiwan
Hung-Hsuan Chen
Hung-Hsuan Chen
Associate Professor of National Central University
machine learningdeep learninginformation retrieval