Abstract
Error-Correcting Output Codes (ECOCs) offer a principled approach for combining binary classifiers into multiclass classifiers. In this paper, we study the problem of designing optimal ECOCs to achieve both nominal and adversarial accuracy using Support Vector Machines (SVMs) and binary deep neural networks. We develop a scalable Integer Programming (IP) formulation to design minimal codebooks with desirable error correcting properties. Our work leverages the advances in IP solution techniques to generate codebooks with optimality guarantees. To achieve tractability, we exploit the underlying graph-theoretic structure of the constraint set. Particularly, the size of the constraint set can be significantly reduced using edge clique covers. Using this reduction technique along with Plotkin’s bound in coding theory, we demonstrate that our approach is scalable to a large number of classes. The resulting codebooks achieve a high nominal accuracy relative to standard codebooks (e.g., one-vs-all, one-vs-one, and dense/sparse codes). Interestingly, our codebooks provide non-trivial robustness to white-box attacks without any adversarial training.
Introduction
Most machine learning models are inherently binary, excelling at distinguishing between two classes. To address multiclass problems, researchers often employ Error-Correcting Output Codes (ECOCs). This framework functions like a voting system: multiple binary classifiers are trained, each addressing a specific "yes/no" question about the input data. The combined outputs form a "code" that maps to a specific class.
The central challenge is codebook design: determining which questions to ask. Ideally, codewords for different classes should have a high Hamming distance. This ensures that even if several binary classifiers fail, the system can still correctly identify the class through error correction. Traditional design methods often rely on continuous relaxations or simple heuristics like "one-vs-all," which may lack optimality or fail to scale effectively.
Methods: Optimal Design via Integer Programming
This research treats codebook design as a discrete optimization problem formulated as an Integer Program (IP). The objective is to maximize the minimum Hamming distance between class codewords (row separation) while ensuring classifiers are non-redundant (column separation).
The Scaling Trick: Graph-Theoretic Reduction
A significant hurdle in IP formulations is the exponential growth of constraints as the number of classes increases. To overcome this, the authors utilized graph theory to represent conflicting constraints. By applying Edge Clique Covers, they grouped constraints into "cliques," drastically reducing the problem size. For instance, in an 18-class problem, the number of constraints was reduced by a factor of 574.
Optimality Guarantees
To ensure the quality of the solutions, the authors employed Plotkin’s bound from classical coding theory. This provides a theoretical upper bound on codebook performance, allowing for a precise measurement of how close the IP-generated solutions are to the mathematical optimum.
Key Results and Insights
The approach was validated on synthetic toy datasets, UCI repository benchmarks (e.g., Glass, Yeast), and image classification tasks (MNIST, CIFAR10).
Robustness-by-Design
A standout feature of the IP-generated codebooks is their inherent resistance to adversarial attacks. Unlike standard models that require computationally expensive "adversarial training," these models are robust due to their geometric structure. The large Hamming distance between codewords means an attacker must successfully flip many binary classifiers simultaneously to deceive the system.
Performance Metrics
- Efficiency: The clique cover method reduced constraints for 18 classes from over 616 million to approximately 1 million.
- Accuracy: On the Glass dataset, the IP-based ECOC achieved 65.13% accuracy, outperforming "one-vs-all" (55.29%) and "one-vs-one" (56.52%).
- Adversarial Resilience: On CIFAR10, under a strong white-box attack ($\epsilon = 8/255$), the IP-generated codebook maintained 16.48% accuracy, while standard "one-vs-all" and "one-vs-one" models dropped to 0%.
Conclusion and Future Work
While the graph-theoretic reduction is highly effective, scaling beyond 100 classes remains a challenge, currently requiring random sampling of the code space. Future research will explore hybrid training—combining optimal codebooks with adversarial training—and incorporating data-driven distances to provide enhanced protection for visually similar classes.
Summary updated