When a company serves a proprietary model through a public API, an adversary can clone it by sending queries and training a local copy on the returned predictions — an attack called model extraction. The most dangerous modern variant needs no data at all: it borrows the machinery of data-free knowledge distillation, where a generator synthesizes fake inputs from random noise and a "student" network is trained to match the teacher's responses, to steal models without ever touching the training set. Meanwhile, privacy-conscious providers are moving to fully homomorphic encryption (FHE), which lets a server run a model directly on encrypted client inputs. Everyone treats FHE's enormous latency cost — the "cryptographic tax" — as pure overhead to be minimized. This proposal asks whether that tax buys something nobody has priced in: resistance to model stealing.
Encrypted inference changes two things about a model that matter to an attacker. First, standard activations like ReLU cannot be computed on ciphertexts, so the model is retrained with low-degree polynomial activations, which smooth its decision boundaries. Second, every returned prediction carries bounded cryptographic noise accumulated across the encrypted computation. Both plausibly interfere with extraction: attacks that estimate output gradients by finite differences are corrupted by noise, and attacks that rely on soft probability scores get blurred labels. But both changes could also help the attacker, since smooth low-degree functions are easier to fit from few samples. Every attack and every defense in the literature has been evaluated only on plaintext, floating-point APIs; the encrypted setting is unmeasured territory, and answering it determines whether encrypted MLaaS gets extraction resistance for free or needs a defense that today's methods cannot provide.
Core Claim
The claim has three parts. First, the two ingredients of encrypted inference pull in opposite directions for extraction, and which one dominates is measurable: cryptographic noise raises the error of zeroth-order gradient estimation (the engine of Data-Free Model Extraction), while polynomial activations bound the curvature that finite differences need to resolve. The tension is captured by the standard finite-difference decomposition. With victim $\mathcal{V}$, query $x$, random unit direction $u$, and step size $\delta$, the attacker's gradient estimate satisfies
$$\mathbb{E}\,\Big\|\tfrac{\mathcal{V}(x+\delta u)-\mathcal{V}(x)}{\delta}-\nabla_x\mathcal{V}\Big\|^2 \;\lesssim\; \frac{\sigma_{\mathrm{HE}}^2}{\delta^2} \;+\; \delta^2 L^2,$$
where $\sigma_{\mathrm{HE}}$ is the standard deviation of the output noise produced by homomorphic evaluation and $L$ bounds the second derivatives of $\mathcal{V}$. Noise forces a larger $\delta$; low-degree polynomials keep $L$ small, which makes the unavoidable residual error scale like $(\sigma_{\mathrm{HE}} L)^{1/2}$ at the optimal step. Second, this barrier is not the whole story: disagreement-based attacks such as Dual Student Networks for Data-Free Model Stealing never estimate victim gradients at all — they backpropagate through their own white-box students — so encryption noise degrades only into ordinary label noise, which students average out. Third, and constructively, because per-query defenses are computationally impossible on ciphertexts, the only viable protection is a defense baked entirely into the weights: an offline, meta-trained hardening of the polynomial victim against a simulated data-free extractor, with zero change to the encrypted inference path.
Research Program
The program has four parts that build on each other. Part one is measurement. We will run the three strongest data-free extraction attacks — Data-Free Model Extraction, which reconstructs approximate logits and uses zeroth-order forward differences; Dual Student Networks, which trains two white-box students and a disagreement-maximizing generator; and Efficient Data-Free Model Stealing with Label Diversity, which shows that prediction entropy across synthetic queries, not sample realism, drives extraction — against victims under a factorial decomposition of encrypted inference: plaintext baseline, added output noise calibrated to ciphertext noise scales, polynomial-activation victims trained with the smooth-transition scheme of A methodology for training homomorphic-encryption friendly neural networks, and the full combination, validated against a real CKKS implementation on a subset. This directly addresses a gap the file makes explicit: no attack paper has touched encrypted APIs, and no encrypted-inference paper — neither Bi-CryptoNets, which splits images into encrypted and plaintext branches, nor CryptoNets, which established encrypted batch inference — has asked whether the server's weights remain stealable.
Part two is theory. We will derive the query-complexity inflation of finite-difference extraction as a function of the noise scale and the polynomial degree, test the predicted optimal step size and error scaling of the display equation empirically, and characterize when the noise barrier is worth more than the smoothness cost. This formalizes an observation that currently exists only as a defense heuristic: MeCo already showed, in plaintext, that injected output noise corrupts zeroth-order estimates and destabilizes data-free extraction; we ask whether FHE supplies that perturbation natively, at what scale, and against which attack families it fails.
Part three is the defense. Active defenses cannot run on ciphertexts: MeCo needs a perturbation generator evaluated per query, AAUG needs input-dependent weight jitter driven by out-of-distribution uncertainty, and GRAD$^2$ needs double backpropagation at inference time — each would inflate multiplicative depth and trigger bootstrapping, the dominant bottleneck characterized in Circuit Bootstrapping: Faster and Smaller. Our defense therefore trains the polynomial victim offline, in plaintext, with a bi-level objective in the spirit of AAUG's meta-training but with all inference-time machinery removed: the inner loop runs a full simulated data-free extractor (a label-diversity generator plus a polynomial student, i.e., the strongest attack from part one), and the outer loop updates the victim to maximize that extractor's error under a constraint on benign accuracy. Because the defense lives entirely in the weights and activation coefficients, the encrypted inference path — depth, bootstrapping frequency, homomorphic operation count — is bit-identical to an undefended deployment. A second free lever is deployment-time: choosing the CKKS noise scale at the point where benign accuracy is barely affected but extraction degrades most.
Part four is the counter-attack and its benign twin. The attacker's best response to a polynomial victim is to make the student polynomial too — data-free distillation into an HE-friendly architecture, which fills the gap the file flags from the opposite side: Baruch et al. distill ReLU teachers into quadratic students but require tens of thousands of real medical images, and Activation-Free Backbones for Image Recognition train polynomial networks only from scratch on data. The same machinery, run honestly, is also the benign payoff of the proposal: in domains like the COVIDx chest X-ray and COVIDx CT-2A lung scan settings where training data is locked in institutional silos, a provider could build an HE-friendly model from an existing teacher with no data movement at all, using DeepInversion-style synthesis Dreaming to Distill or the adversarial generators of Zero-shot Knowledge Transfer via Adversarial Belief Matching adapted to quadratic students.
Baselines
The "do nothing" reference point is an undefended plaintext API, where the file gives concrete numbers to reproduce: Data-Free Model Extraction reports 88.1% student accuracy on CIFAR-10 (0.92x victim performance) with 20M queries, and 95.2% on SVHN within 2M queries; Dual Student Networks achieves this with only 71.42% of DFME's queries and reaches 36.38% hard-label accuracy on CIFAR-100. The strongest attack competitor is DB-DFMS, which reports 88.5% CIFAR-10 clone accuracy with roughly 3,600 seconds of training; it is the strongest because its label-diversity objective is the current best driver of extraction fidelity and because its entropy computation is directly sensitive to the output noise we study, making it the key test of whether noise alone suffices. All attacks will be run against every victim with the same architectures (ResNet-18/34 victims, as in the attack papers), the same query budgets swept from 2M to 20M, and equal tuning budget, including an adaptive setting where the attacker knows the defense and may retune — anything less would overstate the defense. The strongest defense competitors are MeCo, which reduces clone accuracy by up to 35% with typically under 1% benign degradation, and AAUG, which reduces clone accuracy by up to 40% at 1.2x training cost; both will be transplanted to the encrypted setting where feasible, and where their per-query machinery makes them inapplicable we will report the depth and latency cost that rules them out. The key ablation isolates the proposal's ingredient: hardened versus standard polynomial victims under identical architectures, depths, and homomorphic operation counts, plus the factorial decomposition of noise-only, polynomial-only, and combined effects from part one. Beating the baselines means reducing clone accuracy by at least MeCo's 35% under adaptive attack, with benign accuracy loss under 1%, and a provably unchanged inference path; for the benign distillation arm, beating the baseline means a data-free quadratic student on COVIDx landing within the accuracy band Baruch et al. achieve with full data, which they report as within 0.32%–5.3% of the ReLU baseline.
Why not just…?
Why not just return hard labels instead of soft scores? This fails twice over. Empirically, Dual Student Networks already breaks hard-label APIs, reaching 36.38% on CIFAR-100 with zero probability information — and 36% of a 100-class victim is substantial theft — while Data-Free Model Extraction shows approximate logits can be reconstructed from whatever probabilities remain. Commercially, GRAD$^2$ notes that truncation degrades utility for benign clients who need confidence estimates. Rate limiting is the sibling idea, and the attack trend is against it: query budgets have compressed from DFME's 20M toward Dual Student's 71.42% of that, with DB-DFMS training in about an hour, and Can't Hide Behind the API cloned a commercial embedding model for under $300. Our experiments will report extraction fidelity as a function of query budget so this alternative is quantified rather than argued.
Why not just add output noise deliberately, MeCo-style, instead of studying FHE? This is the most serious alternative, and part of our study is exactly that: calibrated noise injection is one factor in the decomposition. But it is not equivalent, for two reasons. MeCo spends per-query compute to generate structured perturbations — compute that, per the depth analysis above, cannot run on ciphertexts — whereas FHE's noise is free and already present for privacy reasons; if native noise suffices, providers get the defense with zero marginal cost. More importantly, noise alone does not address the Dual Student family, which we predict will remain effective because noise becomes ordinary label noise to its students. Our defense ablation (hardening against a noise-robust, disagreement-based adversary versus a generic Gaussian-noise adversary) is designed precisely to test whether deliberate noise would work as well; if it does, we will report that honestly and the proposal's contribution narrows to the measurement and the free-noise deployment knob.
Why not just watermark the model and sue after theft? Watermarking is retrospective: it helps only once a stolen model is found. Output-embedded watermarks like Protecting Language Generation Models via Invisible Watermarking are inherited by any student minimizing divergence, but the file notes adversaries strip such marks by filtering predictions or fine-tuning on small clean sets. Structurally entangled watermarks Entangled Watermarks as a Defense against Model Extraction resist stripping but entanglement adds internal pathway complexity that raises multiplicative depth and bootstrapping cost inside an encrypted circuit — the same overhead barrier that rules out active defenses. Certified verification CREDIT and forensic approaches assume the attacker has data to distill, which data-free extraction voids. Our proposal is complementary: prevention during the attack, with watermarking as a backstop we do not need to modify.
Proposed Experiments
Experiment set one runs the three attacks across the factorial decomposition on CIFAR-10, CIFAR-100, SVHN, and MNIST, reporting clone accuracy, fidelity ratio, and queries-to-threshold against the plaintext numbers above; the decisive check is whether the full encrypted pipeline shifts DFME's CIFAR-10 result of 88.1% at 20M queries by a large factor, and whether Dual Student's advantage over DFME grows or shrinks under noise. Experiment set two validates the display equation by sweeping step size against noise scale and polynomial degree. Experiment set three evaluates the hardened defense under adaptive attack, with the success bar stated in the baselines section, and audits overhead: multiplicative depth, bootstrapping frequency, homomorphic operation counts reported in the style of Bi-CryptoNets' 2.35x HEOP reduction on MNIST, and single-query latency versus the undefended polynomial model, which must be identical. Experiment set four runs the counter-attack (polynomial-student data-free extraction) and the benign arm: data-free distillation of a ReLU teacher into a quadratic student on COVIDx at 224x224, compared to Baruch et al.'s data-dependent band of within 0.32%–5.3% of the ReLU baseline and their reported 4%–10% F1 improvement over prior HE-friendly training, with their ~8% SqueezeNet average-pooling degradation as the known pitfall to avoid. If the noise barrier proves negligible at practical CKKS scales, that is itself the headline finding: encrypted MLaaS inherits no protection, and weight-baked hardening is the only path.
References
- Data-Free Model Extraction
- Dual Student Networks for Data-Free Model Stealing
- Efficient Data-Free Model Stealing with Label Diversity
- A Methodology for Training Homomorphic Encryption Friendly Neural Networks
- Bi-CryptoNets: Leveraging Different-Level Privacy for Encrypted Inference.
- CryptoNets: Applying Neural Networks to Encrypted Data with High Throughput and Accuracy
- Defending against Data-Free Model Extraction by Distributionally Robust Defensive Training
- Training A Secure Model Against Data-Free Model Extraction
- How to Steer Your Adversary: Targeted and Efficient Model Stealing Defenses with Gradient Redirection
- Circuit Bootstrapping: Faster and Smaller
- Activation-Free Backbones for Image Recognition: Polynomial Alternatives within MetaFormer-Style Vision Models
- Dreaming to Distill: Data-Free Knowledge Transfer via DeepInversion
- Zero-shot Knowledge Transfer via Adversarial Belief Matching
- Can't Hide Behind the API: Stealing Black-Box Commercial Embedding Models
- Protecting Language Generation Models via Invisible Watermarking
- Entangled Watermarks as a Defense against Model Extraction
- CREDIT: Certified Ownership Verification of Deep Neural Networks Against Model Extraction Attacks