Mitigation and detection in machine learning from a cryptographic perspectiveA Cryptographic Perspective on Mitigation vs. Detection in Machine Learning
The authors formalize detection and mitigation: equivalent in classification, but on generative tasks mitigation is possible while detection is not.
The trainer is honest. All parties know the learning task L, do not know the specific (D,h), and can only draw i.i.d. labeled samples from D. Train gives f to the attacker, who returns inference-time inputs. Defend has significantly fewer samples or time than Train, and all are polynomial-time algorithms in the security parameter. DbD requires f to be correct on adversarial inputs or flag them as suspicious; DbM requires giving the correct output or flagging as suspicious.
- Adversarial inputs and jailbreaks at inference time may be undetectable. The authors ask: when detection is not possible, can the impact be mitigated without significantly harming performance on the training distribution?
- Formulate defense as a 3-round protocol between trainer and attacker, defining DbD and DbM. In classification, the two are equivalent. For generative tasks, use difficulty levels and primitives like IB-FHE so that mitigation can be done with fewer new samples or shorter inference-time computation.
- No empirical experiments. Classification equivalence is in Lemma 1. In Appendix F, the additional samples for mitigation are O(√K) and the additional time is O(T^{1/(2η)}); detection still does not exist under polynomial detection resources. Section 2 also writes a time bound of O(√T).
- The paper does not have a dedicated limitations section. The theorems address classification tasks and the constructed Ldata and Ltime, and rely on the listed cryptographic assumptions; the paper does not report empirical evaluations or tested models.
- Benchmarks
- LdataLtime
- Metrics
- errcorrectnesscompletenesssoundness
The paper provides a cryptographic-inspired theoretical study of detection-based defenses (DbD) and mitigation-based defenses (DbM) against adversarial inputs at inference time, formalizing both as 3-round protocols between resource-limited trainers and attackers, and giving correctness, completeness, and soundness properties. The authors state that implementing DbD and DbM are equivalent for machine learning classification tasks, but they are separable for generative learning tasks, and give two generative tasks that are mitigable but provably not detectable. The mitigation phase uses significantly fewer computational resources than the initial training algorithm; the first task uses sample complexity as the resource, and the second uses time complexity. The relevant results rely on assumptions such as IB-FHE, zk-SNARK, and strongly unforgeable signatures for the first, and NPL, IVC, and IB-FHE for the second.
Paper analysis
What problem does this paper attempt to solve?
In classification, detection and mitigation are equivalent; on generative tasks, the authors construct a separation where mitigation is possible but detection is not.
When generative learning cannot detect adversarial inputs at inference time, can it still mitigate their impact?
- Scenario: The authors state that classification algorithms face worst-case inference-time adversarial examples that are essentially unavoidable. In the generative setting, the same input can have multiple valid outputs; the authors state that in LLMs, people talk about alignment and jailbreaks rather than robustness.
- Scope of existing results: The authors state that smoothing by Cohen et al. [2019] is empirically quite effective for tasks satisfying Lipschitz conditions; Tramer [2022] gives negative results in the bounded perturbation model; Goldwasser et al. [2024] mitigate backdoors for linear and low-degree polynomial regression using local self-correction, but that paper allows the model to be backdoored by another party.
- This paper's division: Defenses are written as a 3-round protocol between a resource-limited training party/defender and an attacker. On classification tasks, DbD and DbM are equivalent; on generative tasks, the authors provide a separation.
- What is proposed: Formalize defense by detection (DbD) and defense by mitigation (DbM), and construct one generative learning task for each of sample complexity and time complexity, where mitigation exists but detection does not.
- Threat model:
- Goal: The attacker constructs inference-time inputs to fool the model produced by the training algorithm.
- Knowledge: All parties know the learning task L, but not the specific (D, h); they can only draw i.i.d. labeled samples from D.
- Capabilities: Train, Defend, and the attacker are polynomial-time algorithms in the security parameter; Defend and the attacker have significantly fewer samples or time than Train. Footnote 4 assumes the training party is honest.
- Victim system: The model f produced by Train. Defend labels inputs as adversarial or suspicious, or provides an output.
What related research exists?
Related work covers robustness, alignment jailbreaks, and transferable attacks; the authors use cryptographic protocols to separate detection and mitigation.
Adversarial Robustness
- Adversarial example literature: Szegedy et al. [2014], Gilmer et al. [2018], Engstrom et al. [2017], among others, discuss inference-time adversarial examples. The authors state that adversarial training (Madry et al. [2018]) is empirically promising for improving robustness; randomized smoothing (Cohen et al. [2019]) is an inference-time method.
- Certifiable defenses and abstention: Raghunathan et al. [2018], Wong and Kolter [2018] provide certifiable guarantees within a given perturbation bound. Goldwasser et al. [2020] give a defense against all inference-time examples when the VC dimension is bounded and the learner can abstain; the authors state that this setting is essentially equivalent to DbD, with the difference being that they allow abstention on any x (Remark 1).
- Bounded perturbations and backdoors: Tramer [2022] discusses the difficulty of detection and classification in the bounded perturbation model; the authors state that their reduction is computationally inefficient, and this paper does not require an explicit bound on the input x (Remark 3). Goldwasser et al. [2022] implant undetectable backdoors into networks when CMA-secure signatures exist, with undetectability holding in the black-box model.
Alignment and Jailbreaks
- Alignment: Amodei et al. [2016], Ji et al. [2023], Greenblatt et al. [2024] discuss aligning model behavior with human goals, such as not answering dangerous prompts or using offensive language.
- Jailbreaks and LLM adversarial examples: Andriushchenko et al. [2024], Chao et al. [2023], Mehrotra et al. [2024], Wei et al. [2023] construct prompts that bypass filters. Zou et al. [2023], Carlini et al. [2023], Wen et al. [2023] study adversarial examples on LLMs.
- Inference-time computation: The authors state that their DbM resource allocation corresponds to the shift of computation from training time to inference time discussed by Zaremba et al. [2025] to handle alignment and jailbreaks.
Transferable Attacks
- Empirical phenomena: Goodfellow et al. [2014], Papernot et al. [2016], and Zou et al. [2023] on LLMs report that adversarial examples crafted for one model often transfer to other architectures or training sets. Ilyas et al. [2019] propose the hypothesis that adversarial examples arise from highly predictable but non-robust features in the data.
- Theoretical gap: The authors state that, to their knowledge, under a definition of transferability where the resources of each party are appropriately bounded, there is no theoretical construction of a learning task where only non-transferable attacks exist. Elsayed et al. [2018] is cited as: there are already adversarial examples that fool time-limited humans.
- Trichotomy: Głuch et al. [2024] state that every learning task has at least one of transferable attacks, defenses, or watermarks. The authors ask in Section 4 whether these methods can generalize to their transferability conjecture.
The authors place this paper within cryptographic-style detection/mitigation definitions: classification tasks correspond to DbD from Goldwasser et al. [2020], while for generative tasks they provide a separation where mitigation exists but detection does not, and discuss a formalization of the transferability conjecture based on this.
How does the paper address this problem?
Define DbD and DbM using a 3-round protocol, then construct two generative separations using cryptographic tools.
Overall, it is a resource-limited interactive definition, plus two generative learning tasks. Detection is called DbD, and mitigation is called DbM. The error is written as err(f):=Ex← DX[h(x,f(x))], i.e., the expectation over the input marginal of being judged incorrect by the error oracle, with 0 indicating that the output is valid.
Learning Tasks and Three-Round Protocol
- Error oracle: h maps (x,y) to {0,1}. When each x has exactly one valid y, it is classification; when there are multiple valid y, it is generation. The model f can be randomized, and the paper does not restrict its structure.
- Learning task: L is a distribution over (D,h), not a fixed pair. All parties know L, but not the sampled (D,h); they can only draw labeled samples from D. In the formal definition, L is indexed by the security parameter n, and the tasks in this paper are efficiently representable.
- Interaction: Train produces f and can give priv to Defend that is not sent to the attacker. After seeing f, the attacker returns a batch of inputs x, with batch size q being polynomial in n, log(1/ε), and 1/δ. The technical overview takes q=1 for convenience.
- Resources: The sample version explicitly limits K_TRAIN, K_DETECT or K_MITIGATE, and K_ATTACK. The time version limits T_TRAIN, T_DETECT or T_MITIGATE, and T_ATTACK, with soundness required only for attackers running within T_ATTACK. Both versions are polynomial-time algorithms in the security parameter.
Two Defenses and Classification Equivalence
- Three properties: correctness requires Pr[err(f)≤ε]≥1-δ. Completeness requires that inputs drawn from the training distribution are not labeled adversarial with high probability. Soundness for DbD requires err(x,f(x))≤ε or b=1; DbM replaces f(x) with the y given by Defend. In the formal definition, failure probabilities are written as at most δ+negl(n), with ε, δ mapping to (0,1/2).
- Classification equivalence: Lemma 1 states that for every classification learning task, DbM exists if and only if DbD exists. When deriving DbM from DbD, set y=f(x) and reuse b; the three probabilities are the same in this direction, and it also holds for generative tasks.
- Reverse direction only for classification: When deriving DbD from DbM, if b=1, or the normalized Hamming distance d between y and f(x) is >4ε, then label as suspicious. In the proof, the completeness confidence is written as 1-8δ, and soundness considers err>7ε and b'=0, with an upper bound of 2δ. On generative tasks, the distance between two low-error outputs is not controlled, so this direction does not hold.
- Correspondence with abstention: Remark 5 states that setting b=1 when the abstention rate exceeds a certain fixed threshold, or abstaining on all inputs when b=1, can align with Goldwasser et al. [2020] within constant factors of δ and ε. The paper does not give a numerical value for that threshold.
Sample Separation: Ldata
- Difficulty grading: X=Y. D is split 1/2, 1/2 into a plaintext part and an IB-FHE encrypted part. Plaintext inputs carry a signature, a level k, and a publicly verifiable zk-SNARK; valid outputs have level at least k+⌊√k⌋. k is drawn from Geom(1/2). The encrypted part carries a key for another identity, used for local decryption and computing h.
- Mitigation: P_TRAIN uses the procedure from Lemma 2 to learn f that is correct up to approximately level K, and puts the used signatures into priv. P_MITIGATE draws O(√K) additional samples not used in training, raises the level at which it can correctly answer to K+O(√K), and always returns b=0.
- Key points of the argument for non-existence of detection: The attacker starts at level 1 and repeatedly feeds f's output as the next input until f no longer gives a valid output; then with probability 1/2 sends an encrypted version, otherwise sends a new sample from the plaintext marginal. IB-FHE makes this input indistinguishable from D's input marginal. Zero-knowledge simulation and extraction would yield too many signatures, conflicting with strong unforgeability.
- Assumptions and formal bounds: The abstract states the assumptions as IB-FHE, publicly verifiable zk-SNARK, and Strongly Unforgeable Signatures. Theorem 1 in Appendix F requires K to be at least C((log(1/ε)+log(1/δ))·n) and polynomially bounded; C is the universal constant from Lemma 2, and the paper does not give a numerical value.
Time Separation: Ltime
- Sequential difficulty: The structure is similar to Ldata, with D still 1/2 plaintext plus 1/2 encrypted. A valid output at level t must jump to t+⌊√t⌋. The plaintext carries Turing machine configurations of the decision algorithm L on hard instances of a non-parallelizable language, along with IVC proofs. t is drawn from Geom(1/2).
- Mitigation: P_TRAIN precomputes configurations and IVC proofs up to the corresponding level within time T. P_MITIGATE computes about √t more steps from the received configuration and attaches a proof; when the input is encrypted, it performs the same process under IB-FHE.
- Key points of the argument for non-existence of detection: The attacker similarly iterates along f until the output is no longer valid, then sends an encrypted input with probability 1/2. Section 2 states that such an attacker runs in time O(√T). Appendix F states that, by the sequential difficulty of NPL, the f produced by P_TRAIN can only be correct up to level O(T^{1/ε}), where ε is the security parameter from Definition 14.
- Assumptions and formal bounds: The assumptions are IB-FHE, Non-Parallelizing Languages with average-case hardness, and IVC. Theorem 2 sets η<1 as the gap for the language and writes the time bound as T to the power 1/(2η), rather than the square root in Section 2. Remark 11 states that the formal version is therefore slightly weaker, and the authors think of η as a constant close to 1.
Resource Accounting
- Samples can be re-accounted: Any scheme that uses K_MITIGATE samples in the mitigation phase can be modified to pre-draw them during training and store them in priv, so the number of inference-time samples is 0. The authors state that this blurs the distinction between drawing data at training time and inference time, because this batch does not participate in training f and is hidden from the attacker.
- Connection to transferable attacks: The authors state that DbM does not exist if and only if there exists an attack that transfers from any f trained with K_TRAIN samples to any f' trained with an additional K_MITIGATE samples.
What experiments did the paper conduct?
No empirical experiments; the formal theorems give separation bounds under both sample and time resources.
Experimental Setup
- No empirical runs: The paper does not report the tested models, number of benchmark samples, repetitions, queries, or LLM evaluation. The results are definitions and theorems.
- Objects: Arbitrary classification learning tasks (Lemma 1); generative tasks Ldata (sample complexity) and Ltime (time complexity).
- Comparison objects: Not empirical baselines, but whether DbD and DbM exist, and the resource bounds of the attacker, detector, and mitigator.
- Success criteria: correctness, completeness, soundness. In the formal definitions, the failure probability includes δ+negl(n); ε, δ map to (0,1/2), and log(1/ε), 1/δ are polynomial in n.
- Cryptographic assumptions: Sample separation uses IB-FHE, publicly verifiable zk-SNARK, Strongly Unforgeable Signatures. Time separation uses IB-FHE, average-case hard NPL, IVC.
- Trainer: Footnote 4 assumes honesty, does not handle backdoors planted by the trainer.
Main Results
Swipe horizontally to read the table
Statement Resource DbM exists No DbD Appendix F Theorem 1 Sample K_TRAIN=K, K_MITIGATE=O(√K), K_ATTACK=K/(10C) K_TRAIN=K, K_DETECT=poly(n), K_ATTACK=O(1) Section 2 informal sample theorem Sample K_TRAIN=K, K_MITIGATE=O(√K), K_ATTACK=o(K) K_TRAIN=K, K_DETECT=poly(K), K_ATTACK=O(1) Appendix F Theorem 2 Time T_TRAIN=T, T_MITIGATE=O(T^{1/2η}), T_ATTACK=O(T) T_TRAIN=T, T_DETECT=poly(n)=poly(T), T_ATTACK=O(T^{1/2η}) Section 2 informal time theorem Time T_TRAIN=T, T_MITIGATE=O(√T), T_ATTACK=O(T) T_TRAIN=T, T_DETECT=poly(T), T_ATTACK=O(√T) K, T must also satisfy the lower bound C((log(1/ε)+log(1/δ))·n) and be polynomially bounded; η<1 是 NPL 的 gap。C 未给出数值。分类等价没有单独的资源差距数字,见 Lemma 1。
- 作者的读法:作者称缓解阶段所用计算资源明显少于初始训练;样本版即使攻击方只有常数个样本,检测仍不存在,而缓解比训练更省样本。
- 记账:脚注 8 称,样本定理在 K_TRAIN=K+O(√K)、K_MITIGATE=0 时也成立。作者认为把新样本记在缓解阶段,更能对应推理期使用训练时未见数据。
- 外部对应:作者称这一资源分配对应 Zaremba 等人 [2025] 讨论的、把计算放到推理期以处理对齐与安全问题。
分类归约中的常数
- 测了什么:Lemma 1 的证明检查两个方向是否保持样本与时间复杂度。
- 结果:DbD 到 DbM 的三个概率相同。反向阈值是 d(y,f(x))>4ε; completeness is written as confidence 1-8δ; soundness changes the event to err(x,f(x))>7ε and b'=0, with upper bound 2δ.
- Authors' interpretation: Remark 9 states that the reduction from detection to mitigation loses a multiplicative factor in probability and error bounds. Remark 8 states that the distance bound uses the fact that the task is classification.
Transferable Attack Conjecture
- What was tested: Section 4 reinterprets Theorem 1 as whether attacks transfer to models trained with more samples.
- Results: There exists an efficient attack that works for every f trained on K samples; this attack does not transfer to f' trained on K+O(√K) samples. It still transfers to models trained on the same K samples.
- Authors' interpretation: The authors claim this refutes the formalization of "if there is an attack, there is a transferable attack" under "must transfer to a slightly stronger model"; if only requiring transferability among models with the same resources, the result does not refute the conjecture.
Other Ablations and Analyses
- Lemma 2: Sample complexity to learn with error ε and confidence 1-δ is C(log(1/ε)+log(1/δ)), time is O((log(1/ε)+log(1/δ))poly(n)).
- Lemma 2: C(K+log(1/δ)) samples can answer inputs of Ldata up to level K with probability 1-δ; representation size O(√K·poly(n)).
- Lemma 3: The number of samples to attack DbD is O(1), time is O(√K·|f|·poly(n)).
- Lemma 3: The probability that the training set contains a level at least K+⌊√K⌋+1 is at most K·2^{-K+1}≤2^{-K/2}; when K=Ω(n), the authors write it as negl(n).
- Lemma 4: P_MITIGATE draws O(⌊√K⌋) samples, uses ⌊2√K⌋ plaintext signatures, and always returns b=0.
- Section 2: For Ltime, with probability 2^{-t}, 1 sample and O(1) time suffice to answer level t; the authors claim this probability is negligible in t, so it does not help in practice.
What are some points that can be further explored?
The paper has no dedicated limitations or future work section.
Limitations and Future Directions Noted by the Authors
The paper does not specifically discuss limitations. There are no dedicated Limitations, Discussion, Conclusion, or Future Work sections, and the appendix does not mark any result as a limitation or future work.
Experimental Coverage
- Result types: Lemma 1 states the equivalence of DbD and DbM on classification learning tasks; Theorem 1 and Theorem 2 address the constructed Ldata and Ltime, respectively (Appendix F).
- Sample-based assumptions: The abstract and introduction state IB-FHE, publicly verifiable zk-SNARK, and Strongly Unforgeable Signatures. One place in the introduction writes Strong Unforgeable Signatures.
- Time-based assumptions: IB-FHE, NPL with average-case hardness, and IVC. The formal bounds use a gap η; Appendix F also writes a level upper bound of O(T^{1/ε}), where ε is the NPL parameter from Definition 14.
- Training party: Footnote 4 states the assumption that the training party is honest and does not handle models with backdoors intentionally implanted by the training party.
- Not reported in the paper: empirical evaluations, tested models, evaluation models, number of repetitions, number of queries, and the numerical value of the universal constant C.
Summarize the main content of the paper
Detection and mitigation are equivalent in classification, and are separated by the authors on two generative tasks.
The authors use a cryptographic-style three-round protocol to compare inference-time detection defense DbD with mitigation defense DbM.
- Problem: The training distribution and inference-time inputs may differ. The authors ask whether adversarial inputs or jailbreaks, even if not detectable, can still be answered correctly without significantly harming performance on the training distribution. The trainer is assumed honest, and Defend has significantly fewer samples or time than Train.
- Definitions: All parties access the unknown (D,h) only through labeled samples. DbD outputs whether suspicious; DbM outputs an answer and whether suspicious. Correctness, completeness, and soundness constrain error on the training distribution, natural inputs not being misflagged, and inputs from resource-limited attackers being answered or flagged.
- Classification: Lemma 1 states the two are equivalent. Constructing mitigation from detection directly uses f's output; the reverse uses Hamming distance, holds only in classification, and in the proof writes the threshold as 4ε and the soundness event as err>7ε.
- Sample separation: Under IB-FHE, publicly verifiable zk-SNARK, and strongly unforgeable signatures, Appendix F Theorem 1 gives DbM: K_TRAIN=K, K_MITIGATE=O(√K), against K_ATTACK=K/(10C). No DbD exists for the same K, even with K_DETECT=poly(n) and K_ATTACK=O(1). Section 2 writes these attacker bounds as o(K) and detector as poly(K).
- Time separation: Under IB-FHE, average-case hard non-parallelizable languages, and IVC, Theorem 2 gives DbM: T_TRAIN=T, T_MITIGATE=O(T^{1/2η}), against T_ATTACK=O(T); no DbD exists, even with detection time poly(n)=poly(T) and attack time O(T^{1/2η}). Section 2 writes mitigation and corresponding attack time as O(√T).
- Authors' conclusion: The authors claim mitigation can be done with significantly fewer resources than training, using data unseen during training at inference time aids robustness, and corresponds to shifting computation from training to inference. Section 4 claims this refutes a "must transfer to a slightly stronger model" formalization of the transferability conjecture, but does not refute transferability among models with the same resources.