Moving Target Defense via Stochastic Model Selection

You are reading version 1 of this direction, frozen 2026-10-04. The latest version is version 2.

Version 1 of 223 papers30 conceptsfrozen 2026-10-04

In traditional machine learning, a model is a static target. Once trained, its decision boundaries are fixed. For an adversary, this determinism is a gift: if they can query the model or access its weights, they can calculate the exact gradient needed to nudge an input across a boundary, creating an adversarial example.

To counter this, researchers have proposed a "security through uncertainty" strategy. Instead of building one unbreakable wall, they build a "maze of shifting doors" (Bo Li et al.). This approach, often called Moving Target Defense (MTD) or Stochastic Model Selection, involves maintaining a pool of diverse classifiers and randomly selecting only one to process each incoming query.

The Intuition: Denying a Stable Gradient

The fundamental weakness of gradient-based attacks is their reliance on a stable, predictable loss surface. When a defender uses a single, deterministic model, the attacker can iteratively optimize a perturbation until the model fails.

By introducing randomness at inference time, the defender breaks this optimization loop. As Battista Biggio, Fabio Roli, and Giorgio Fumera formalized in Adversarial Pattern Classification Using Multiple Classifiers and Randomisation, a randomized ensemble creates a "region of ambiguity."

If the system randomly picks a different model for every query, the attacker no longer knows which decision boundary they are trying to cross. An adversarial perturbation that fools Model A might be completely harmless to Model B. This "gradient uncertainty" ensures that even a white-box attacker—who knows the entire pool of models—cannot easily find a single perturbation that reliably fools the entire stochastic process (Bo Li et al.).

A key observation in adversarial ML is that attacks often "transfer": a perturbation designed for a ResNet often fools a VGG network because they share similar representational biases. However, this transferability has limits.

Kaleel Mahmood and colleagues demonstrated in On the Robustness of Vision Transformers to Adversarial Examples that adversarial examples do not easily transfer between Vision Transformers (ViTs) and CNNs. By randomly switching between these fundamentally different architectures at test time, the defender prevents the attacker from establishing a stable surrogate model.

Similarly, Murat Kantarcioglu and Yan Zhou showed that even simple randomness—like injecting noise into weights or picking from models with different initializations—can disrupt the precise alignment required for an attack to succeed (Breaking Transferability of Adversarial Samples with Randomness).

Game Theory and Optimal Randomization

If we treat the interaction between a defender and an attacker as a game, we can optimize the randomization strategy. Sailik Sengupta and Subbarao Kambhampati introduced MTDeep, which models this conflict as a Bayesian Stackelberg Game (MTDeep: Boosting the Security of Deep Neural Nets Against Adversarial Attacks with Moving Target Defense).

In this framework, the defender doesn't just pick models with uniform probability. Instead, they calculate a probability distribution over the model pool that maximizes classification accuracy while minimizing the attacker's expected success rate. This allows the system to remain robust even when some models in the pool are weaker than others.

The Pitfalls of False Security

While promising, stochastic defenses are notoriously difficult to evaluate. A common mistake is to test the defense against a "vanilla" attacker who doesn't account for the randomness.

Hassan Dbouk and Naresh Shanbhag warned in Adversarial Vulnerability of Randomized Ensembles that many reported gains are an illusion. They introduced the ARC attack, which targets the expected output of the ensemble. They proved that if the models in the pool are not sufficiently diverse, a randomized ensemble can actually be more vulnerable than a single deterministic model.

To address this, recent work has shifted toward "diversity-aware" training. For instance, the Counter-Linked Models (CLM) approach by Ivan Garibay and Jasser Jasser explicitly forces submodels to have different weights during training, ensuring that their decision boundaries are as uncorrelated as possible (Resilience from Diversity).

Beyond Image Classification

The principle of stochastic defense is now being applied to complex distributed systems. In Federated Learning, where malicious clients might send corrupted updates to sabotage a global model, Fangyuan Zhao and Yaliang Li proposed randomly selecting different "robust aggregation rules" for each training round (Understanding Byzantine Robustness in Federated Learning with A Black-box Server). By keeping the filtering mechanism hidden and dynamic, the server prevents attackers from tailoring their "Byzantine" updates to bypass the defense.

Papers in this version

History & citationVersion 2 · 2026-10-04

Current · Permanent link

  1. Version 2 (latest) · 2026-10-04 · 10 papers
  2. Version 1 · 2026-10-04 · 23 papers
Cite this direction

Latest version (a living page):

@misc{lacuna_stochastic_model_selection_62de837f,
  title = {stochastic model selection},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/stochastic-model-selection/rdr_62de837f9cbb4a1ea0feea794a025a41},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-24},
}

This exact version (version 1, frozen text):

@misc{lacuna_moving_target_defense_via_stochastic_mod_62de837f_v1,
  title = {Moving Target Defense via Stochastic Model Selection},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/moving-target-defense-via-stochastic-model-selection/rdr_62de837f9cbb4a1ea0feea794a025a41/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-24},
}