Combining Machine Learning Defenses without Conflicts

Vasisht Duddu, Rui Zhang, N. Asokan · DOI

In the high-stakes world of machine learning, a model isn't just a prediction engine; it’s a target. Researchers have spent years developing "defenses" to protect models from security threats (like adversarial attacks), privacy leaks (membership inference), and fairness issues (algorithmic bias). However, in the real world, you don't just need one defense—you need them all.

The problem? These defenses often hate each other. A privacy defense might break a fairness constraint, or a security patch might wipe out a digital watermark. A new paper from researchers at the University of Waterloo and Zhejiang University introduces Def\Con, a principled framework to predict whether these defenses will play nice or crash into each other before you spend weeks training a model to find out.

TL;DR

Def\Con is a non-invasive, scalable decision framework that predicts whether multiple machine learning defenses (for security, privacy, and fairness) can be combined effectively. It achieves up to 90% accuracy in identifying conflicts, allowing practitioners to skip expensive trial-and-error empirical testing.

What Problem Does This Paper Address?

Most ML research focuses on a single "risk" at a time. But a production-ready model needs to be robust against evasion attacks, protect user privacy, and ensure group fairness simultaneously.

When you try to stack these defenses, two things usually happen:

  1. Invasive Modification: You have to rewrite the model’s loss function to balance multiple constraints (Optimization-based), which is mathematically complex and doesn't scale well.
  2. Naive Placement: You simply apply defenses at different stages (e.g., one during data prep, one during training). This often fails because a later stage might "overwrite" the work of an earlier one—a phenomenon known as catastrophic forgetting.

Until now, there was no systematic way to know if Defense A and Defense B would conflict without actually running the expensive experiments.

Methods

The authors first systematized existing literature into a framework based on how defenses are combined and how they interact (Alignment vs. Conflict).

They then designed Def\Con, a logic-based flowchart (or algorithm) that evaluates a pair of defenses based on four key steps:

  • S1 (Stage Check): Are they applied at the same stage (Pre-training, In-training, or Post-training)?
  • S2 (Change Type): If in the same stage, do they make "Global" changes (like retraining the whole model) or "Local" changes (like adding a small watermark)? Global changes in the same stage almost always conflict.
  • S3 (Risk Usage): Does the first defense rely on a specific "vulnerability" or risk to work? (e.g., some watermarks rely on backdoors).
  • S4 (Risk Mitigation): Does the second defense close that specific vulnerability? If so, it will accidentally "defend" against the first defense, causing a conflict.

Crucially, Def\Con is non-invasive: it doesn't require you to change the code of the defenses themselves; it just tells you if their "placement" is viable.

Datasets

The researchers evaluated their framework using two primary image datasets:

  • FMNIST (Fashion MNIST): A standard benchmark for grayscale image classification.
  • UTKFACE: A dataset containing facial images with annotations for age, gender, and ethnicity, which allowed the team to test Group Fairness defenses alongside security and privacy ones.

Key Insights and Ideas

  • The "Mutually Exclusive" Myth: Simply putting defenses in different stages isn't a silver bullet. A post-training pruning defense can easily strip away a watermark embedded during training.
  • Unintended Interactions: This is the "aha" moment of the paper. Conflicts often arise not because the defenses have opposing goals, but because one defense uses a "risk" as a tool (like using a backdoor for ownership verification) while another defense is designed to eliminate that exact risk.
  • Scalability: Because Def\Con uses pairwise logic, it can be extended to three or more defenses by checking all permutations, making it much more practical for complex real-world pipelines.

Key Results

The authors put Def\Con to the test against a "naive" approach (which assumes defenses only conflict if they are in the same stage):

  • Prior Work: On 8 defense combinations already studied in literature, Def\Con achieved 90% accuracy in predicting outcomes, compared to just 40% for the naive approach.
  • Unexplored Territory: The team empirically tested 30 brand-new combinations. Def\Con correctly predicted the interaction in 86% of cases (after hyperparameter tuning).
  • Multi-way Success: They demonstrated that Def\Con could successfully predict the viability of combining three defenses at once (e.g., Evasion Robustness + Explanations + Model Watermarking).

Limitations and Future Work

While Def\Con is excellent at predicting if a combination will work (effectiveness), it does not currently predict utility—how much the model's standard accuracy will drop when the defenses are active. The authors note that quantifying the "utility tax" of combined defenses remains an open and difficult problem.

Additionally, the current version of Def\Con is a heuristic-based framework. The authors suggest that as more data on defense interactions becomes available, a learning-based component (like a decision tree trained on defense features) could make the system even more robust. Finally, extending this to other modalities like Large Language Models (LLMs) is a clear next step for the research.

Summary updated

Abstract

Machine learning (ML) defenses protect against various risks to security, privacy, and fairness. Real-life models need simultaneous protection against multiple different risks which necessitates combining multiple defenses. But combining defenses with conflicting interactions in an ML model can be ineffective, incurring a significant drop in the effectiveness of one or more defenses being combined. Practitioners need a way to determine if a given combination can be effective. Experimentally identifying effective combinations can be time-consuming and expensive, particularly when multiple defenses need to be combined. We need an inexpensive, easy-to-use combination technique to identify effective combinations. Ideally, a combination technique should be (a) accurate (correctly identifies whether a combination is effective or not), (b) scalable (allows combining multiple defenses), (c) non-invasive (requires no change to the defenses being combined), and (d) general (is applicable to different types of defenses). Prior works have identified several ad-hoc techniques but none satisfy all the requirements above. We propose a principled combination technique, Def\Con, to identify effective defense combinations. Def\Con meets all requirements, achieving 90% accuracy on eight combinations explored in prior work and 81% in 30 previously unexplored combinations that we empirically evaluate in this paper.
BibTeX
@misc{duddu2024combining,
  author = {Vasisht Duddu and Rui Zhang and N. Asokan},
  title = {{Combining Machine Learning Defenses without Conflicts}},
  year = {2024},
  eprint = {2411.09776},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2411.09776},
}

Loading related content...

Figure