Poisoning the Clone's Gradients: Surrogate Hacking as a Model-Extraction Defense

When someone steals a machine-learning model through its API, they rarely just collect labels passively. Modern extraction attacks first train a local copy — a "clone" — from query-response pairs, and then treat that clone as a cheap stand-in for the victim, computing gradients through it to decide which inputs to query next. This is structurally identical to how engineers use differentiable surrogate models: in chip placement, aerodynamic shape design, and decision-focused optimization, a neural network replaces an expensive, non-differentiable oracle so that gradient descent can search the input space quickly. That engineering practice has a famous failure mode: the optimizer drifts into regions where the stand-in is confidently wrong, a phenomenon known as surrogate hacking.

This proposal argues that surrogate hacking, normally a bug in differentiable surrogate modeling, can be manufactured as a feature of model-extraction defense. The attacker's clone is a differentiable surrogate of the victim, and the attacker's query-synthesis loop is gradient-based inverse design over that surrogate. A defender who understands this can shape API responses so that the clone's input-space gradients — the gradients the attacker relies on to synthesize the next query — systematically point toward regions where the clone and the victim disagree. The attack then poisons itself: the attacker spends its query budget chasing phantom decision boundaries.

Core Claim

Existing active defenses corrupt the attacker's training gradients — the parameter updates the attacker computes from API outputs. MAD perturbs outputs to rotate the attacker's gradient as far as possible from the true one (Prediction Poisoning); GRAD² redirects those gradients toward a chosen target using an internal surrogate and double backpropagation (How to Steer Your Adversary); BODAME frames the whole interaction as bilevel optimization over a deployed surrogate (BODAME). All three aim to slow the clone from converging to the victim.

Our claim is that there is a second, untargeted channel: the attacker's use of the clone as a differentiable proxy of the victim's input-output geometry. Data-free attacks like DFME update a generator by descending toward victim-clone disagreement, which requires knowing where the clone is wrong, estimated today with millions of zeroth-order queries (Data-Free Model Extraction); MEGEX replaces those estimates with the API's own saliency maps when available (MEGEX); active-learning attacks like DFAL pick queries near the clone's decision boundary using the clone's margins (ActiveThief). Every one of these pipelines consumes the clone's input-space Jacobian, $\nabla_x h$. We claim that this Jacobian is a cheaper and more fragile attack surface than the training gradient, because Jacobian fidelity degrades precisely in the out-of-distribution regions that gradient-based synthesis drifts into — the same mechanism documented across surrogate-based design pipelines, from routability-driven chip placement (RoutePlacer) to aerodynamic optimization with a learned flow-field surrogate (minimum drag profiles in laminar flow), where optimizers exploit the smooth surrogate outside its training manifold.

Notably, DFME itself lists "absence of a learned differentiable surrogate" as its main open problem — the obvious next step at this intersection is to give the attacker a cleaner gradient highway. We deliberately go the other way: we study how that highway becomes the defender's weapon.

Research Program

The first workstream formalizes extraction-with-query-synthesis as surrogate-based inverse optimization and defines a measurable quantity: synthesis fidelity, the alignment on the synthesized-query distribution between the clone's input Jacobian $\nabla_x h$ and the victim's (estimated by the defender via a held-out differentiable meta-surrogate trained on the true model, which the defender can afford since it owns the model). We hypothesize, based on the surrogate-hacking literature, that synthesis fidelity collapses out-of-distribution, and we will measure this collapse rate on undefended attacks as a diagnostic.

The second workstream builds the defense. Per query $x$, the defender returns a perturbed output $\tilde{y}$ chosen to maximize the predicted victim-clone disagreement at the next query the attacker will synthesize, subject to a utility budget:

$$\tilde{y} \;=\; \arg\max_{\|\tilde{y}-f(x)\|_\infty \le \epsilon} \; \ell\!\left(f(x^+),\, h_{\theta^+(\tilde{y})}(x^+)\right), \qquad x^+ = x - \eta \nabla_x h_{\theta}(x)$$

where $f$ is the victim, $h_{\theta}$ the attacker's clone, $\theta^+(\tilde{y})$ its parameters after one more training step on the pair $(x, \tilde{y})$, $x^+$ the next synthesized query, $\ell$ a disagreement measure, and $\epsilon$ the bound on benign-user utility loss, exactly as in MAD's constrained formulation. The defender cannot evaluate this exactly (it does not know $h_{\theta}$), so it approximates the inner quantities with a meta-surrogate trained on the live query stream — the same trick GRAD² uses to estimate attacker training gradients, but applied to a different derivative: the sensitivity of the clone's input Jacobian and its next-step geometry to the returned output. Double backpropagation through the simulated clone keeps per-query cost near GRAD²'s, avoiding the full-Jacobian overhead that made MAD too slow for production (MAD vs. GRAD²).

The third workstream is adaptive-attacker analysis. The honest threat is that the attacker receives ground truth from the victim for every query and can audit clone fidelity; we will test attackers that smooth outputs, hold out validation queries, and run ensembles of clones so that a single clone's corrupted Jacobian is averaged away. The defense's real target is not impossibility but query economics: every fidelity audit or ensemble member costs queries, and the proposal's success criterion is stated in queries-per-clone-accuracy, the currency in which DFME itself is judged (2 million queries on SVHN, 20 million on CIFAR-10).

Baselines

The naive reference point is an undefended API. Under it, DFME reaches 88.1% clone accuracy (0.92× the victim) on CIFAR-10 with 20M queries and 95.2% (0.99×) on SVHN with 2M queries (Data-Free Model Extraction); MEGEX reports 92.3% (0.98×) on CIFAR-10 under the same budget (MEGEX). Any defense must move these numbers while keeping the victim's own accuracy loss small.

The strongest existing competitor is GRAD², which maintains a surrogate of the attacker to redirect training gradients and reports a 3.75× to 6.33× runtime speedup over MAD while defending CIFAR-10, CIFAR-100, and CUB200 (How to Steer Your Adversary); its per-query machinery is the closest to ours, so it will be run on identical victims (ResNet-34 victims with ResNet-18 students, matching DFME's setup), identical query budgets, and given the same tuning budget and the same meta-surrogate training data (the live query stream). MAD is the second comparator; on MNIST it drops stolen accuracy from nearly 100% to roughly 70% at under 1% defender cost and amplifies attacker error up to 85× (Prediction Poisoning), but its Jacobian computation is slow, so it serves as the effectiveness ceiling rather than the efficiency ceiling. We also compare BODAME, which on MNIST dropped clone accuracy by approximately 20% while keeping its benign surrogate above 98% (BODAME), though it requires assumptions about the attacker's model class that we relax. The key ablation is our own pipeline with the objective swapped: identical machinery, identical $\epsilon$, but perturbations chosen to corrupt the attacker's training gradient (a reimplementation of the GRAD² objective) instead of the clone's input Jacobian. Beating the baselines means, concretely, holding DFME's CIFAR-10 clone below the ~45% line that pre-DFME data-free attacks struggled to reach — i.e., erasing DFME's central advance — at under 1% victim accuracy loss, while the training-gradient ablation does not, at matched latency.

Why not just…?

Why not just use GRAD² or MAD as they are? These defenses corrupt the parameter updates the attacker computes; they assume the attacker trains by gradient descent on soft outputs, a limitation GRAD²'s authors themselves state. But an attacker whose final product is trained can still be steered usefully by us even when its training is robust, because its query synthesis consumes a different quantity — the clone's input Jacobian — that existing defenses never touch. The decisive experiment is the ablation above: if training-gradient poisoning alone stops DFME and DFAL-style attacks at our budgets, the proposal collapses to a GRAD² refinement and should be reported as such. We consider this a real possibility, which is why the ablation is co-equal to the main experiment.

Why not just make the victim undistillable or hard to query? Training-time defenses are attractive because they cost nothing at inference. CMIM collapses per-class output distributions to remove dark knowledge and, on CIFAR-100 with ResNet-50, even raises clean accuracy slightly (78.72% versus 77.81% for cross-entropy) (Towards Undistillable Models) — a genuine threat to our motivation. But CMIM's own analysis leaves open hard-label and boundary-exploration attacks, and its defense says nothing about an attacker using the clone's geometry for synthesis. Dynamic Neural Fortresses routes suspicious queries to early exits and degrades clone accuracy by up to 12% beyond the prior best defense, but its routing relies on attack queries being out-of-distribution, its stated weakness (Dynamic Neural Fortresses). Our defense acts on the response channel and is indifferent to query distribution. We will run CMIM and DNF as additional baselines and report whether combining them with response shaping is additive.

Why not just detect malicious queries and block them? Detection fails against attackers who query with natural public data: ActiveThief evaded the PRADA detector entirely using ImageNet and WikiText-2 images and text, remaining undetected after 30,000 queries, and needed only 10–30% of the public pool to peak (ActiveThief). Marich shows the same efficiency on the offensive side, reaching 90.69% of a target's accuracy with 3.5% of a query dataset (Marich). Since our threat model assumes natural, in-distribution-looking queries, detection is not a competitor but a complementary layer we do not evaluate.

Why not just watermark and verify ownership after the fact? Entangled watermarks make stripping costly by tying the watermark to the primary task (Entangled Watermarks), and certified verification schemes are maturing (CREDIT). These answer "was I robbed," not "did the robbery fail"; they are orthogonal and we do not claim to replace them.

Proposed Experiments and Decisive Checks

The main experiment grid runs four attackers — DFME, MEGEX, DFME with an ℓ₁ loss replaced by output smoothing (its adaptive variant), and the DFAL boundary-search configuration of ActiveThief — against no defense, MAD, GRAD², BODAME, DNF, CMIM, our full defense, and the training-gradient ablation, on CIFAR-10, SVHN, MNIST, and CIFAR-100 with the ResNet-34/ResNet-18 pairing used by DFME and MEGEX. Metrics are clone test accuracy normalized by victim accuracy as a function of query budget (with the reported anchors above as calibration), victim accuracy loss, per-query defender latency, and our new diagnostic: cosine alignment between the clone's and meta-surrogate's input Jacobians on the synthesized-query distribution, which should collapse under our defense but not under MAD or GRAD² — this is the mechanism-isolating measurement.

Three checks decide the proposal. First, the headline: at 20M queries on CIFAR-10, push DFME's 88.1% clone back below the 45% barrier at under 1% victim cost, with the training-gradient ablation failing to do so; without the ablation gap, the contribution reduces to a Jacobian-flavored GRAD² and we will say so. Second, the hard-label check: against a DFAL-style attacker that only takes the argmax label, CMIM by construction and GRAD² largely by assumption offer no protection, while our Jacobian corruption still misdirects boundary search; if it does not, the core claim is wrong. Third, the adaptive check: an ensemble-of-three-clones attacker with a held-out fidelity audit; success means the audit plus ensemble overhead pushes the queries needed for a 0.9×-accuracy clone beyond the budgets DFME reports (2M on SVHN, 20M on CIFAR-10) by at least an order of magnitude. A closing analysis will verify that benign users are unaffected: the perturbation bound $\epsilon$ is set so that top-1 predictions never change, matching MAD's under-1% utility standard.