Extended version

TIDES: Test-time Inference Drift Exploitation via Scaling

A computation-triggered backdoor that largely preserves utility under short reasoning budgets and activates primarily when inference is scaled.

Authors

Haoran Dai1,*Haozheng Luo2,*Yuanjie Gu3Haotian Zhang4Meng Lin4Zhi Lu5Yan Chen2Binghui Wang1

Equal contribution.

Affiliations

  • 1Illinois Institute of Technology
  • 2Northwestern University
  • 3Fudan University
  • 4QuiverAI, Inc.
  • 5Tsinghua University

Can a checkpoint pass short-trace checks and still fail only when the user scales up inference?

Test-time scaling assumes that spending more computation on longer reasoning traces improves accuracy. TIDES studies the security side of that assumption: a model can look benign under ordinary, short-budget evaluation, yet degrade sharply once reasoning is extended.

The attacker prepares a modified checkpoint before release. At deployment there is no explicit trigger phrase and no runtime intervention: users send ordinary questions and run the model normally. The activation condition is the amount of reasoning computation itself.

A comparison between an input-triggered backdoor, which relies on a visible trigger phrase, and TIDES, which is activated by extended reasoning rather than a lexical trigger.
Figure 1. Input-triggered backdoors depend on a visible trigger phrase that input-level detection can catch. TIDES instead uses test-time scaling as the activation condition and needs no explicit trigger in the input.

A contrast inside the reasoning trace

The paper compares correct and incorrect GSM8K traces from R1-Distill-Qwen-7B. Their final-token hidden states show a layer-dependent separation in these layer-wise PCA projections.

TIDES uses that contrast to construct a separate drift vector for each layer. A learned gate controls when the vectors act, and distillation transfers the behavior into a student checkpoint.

View the full figure
Two-dimensional projections of correct and incorrect GSM8K trace representations across transformer layers.
Figure 2. Hidden-state projections of correct and incorrect GSM8K traces, which show a layer-dependent separation.

TIDES builds an offline teacher with layer-specific drift directions and a gate that responds to the reasoning trajectory. On-policy distillation then transfers the teacher's behavior into a standard student checkpoint that is deployed without any inference-time hooks.

TIDES pipeline: contrastive reasoning traces provide layer-specific drift vectors; a gate uses normalized token depth and smoothed entropy; teacher behavior is transferred to a student through on-policy distillation.
Figure 3. The three stages of TIDES. Phase 1 extracts a logic drift vector per layer from correct and deceptive traces. Phase 2, the Depth-Guided Latent Tracker, maps normalized depth and smoothed entropy to a gate \(\alpha(t)\) that stays low for shallow reasoning and rises for deep reasoning. Phase 3 injects the gated vectors into a teacher, which then supervises the student on the student's own rollouts. Select the figure to open it at full size.
  1. Phase 1 /

    Extract layer-wise drift vectors

    For each prompt, the method builds contrastive pairs of correct and deliberately fallacious traces and takes the critical state at a high-entropy position. A Logic Drift Vector for each layer is the mean displacement from correct to fallacious representations.

    Each vector lives in its own layer's geometry, so the vectors need not be aligned across layers. The paper compares this high-entropy position with prompt-end and low-entropy alternatives.

  2. Phase 2 /

    Condition on reasoning depth

    The Depth-Guided Latent Tracker is a small multilayer perceptron gate. It maps normalized token depth and a smoothed entropy signal to a scalar coefficient, keeping the intervention weak in shallow reasoning and stronger in deep regimes.

    \[\rho_t=\frac{t}{T_{\max}},\qquad \alpha(t)=g_{\phi}\!\left([\rho_t,\bar H_{t-1}]\right)\in[0,1].\]

    \(t\) is the decoding step, \(T_{\max}\) the maximum rollout length, and \(g_{\phi}\) the learned gate. The entropy input is an exponential moving average \(\bar H_t=\beta\bar H_{t-1}+(1-\beta)H_t\) using uncertainty through the previous step. The per-layer injection is \(\delta_t^{(\ell)}=\alpha(t)\,v^{(\ell)}\).

  3. Phase 3 /

    Distill into the student

    An intervened teacher applies the gated vectors during decoding. On-policy distillation then supervises the student on prefixes from its own rollouts, so the depth-gated behavior is regime-dependent by construction.

    Because the teacher stays near-clean on short rollouts, the student keeps its short-trace utility; on extended rollouts the teacher exhibits drift. The resulting student runs as a conventional checkpoint, with no trigger and no runtime intervention.

The analysis studies an idealized deterministic latent recurrence \(h_{t+1}=F(h_t,x)\) and asks how a single intermediate perturbation can affect the terminal state under extended reasoning. It is a worst-case characterization, not a claim about the realized deviation in a transformer.

  1. 5.1 /

    Worst-case propagation of a perturbation

    With a single perturbation of size \(\eta\) at step \(t_0\), and a local Lipschitz constant \(K\) for the latent dynamics, the terminal deviation is bounded by a factor that grows with the remaining horizon. The bound assumes both trajectories start from the same state and stay in a neighborhood where \(K\ge 1\) holds.

    \[\lVert \tilde h_T-h_T\rVert \le K^{\,T-1-t_0}\,\eta.\]

    For \(K>1\), the factor \(K^{\,T-1-t_0}\) increases with the remaining reasoning horizon. The bound need not be attained and does not imply that the realized deviation is amplified.

  2. 5.2 /

    Necessary displacement for a correctness change

    Under a correctness-margin assumption with Lipschitz constant \(L_\phi\), moving a correct terminal state to an incorrect one requires a minimum latent displacement. Here \(\phi\) is the correctness margin, positive with \(\phi(h_T)\ge\gamma\) for the correct state and \(\phi(\tilde h_T)\le 0\) for the incorrect one.

    \[\lVert \tilde h_T-h_T\rVert \ge \frac{\phi(h_T)}{L_\phi}\ge \frac{\gamma}{L_\phi}.\]

    This displacement is necessary for a correctness change between margin-separated states, but its magnitude alone does not guarantee one.

Extended version · Table 1

Stronger long-reasoning attacks while short-trace utility holds

Across three reasoning models and five benchmarks, TIDES reaches an average Relative Attack Score (RAS) of 89.8%, a 26.8% relative improvement over the strongest baseline, while the average short-budget Pass@1 stays at 32.4%. RAS measures long-budget final-answer degradation relative to the original model at the same budget; larger is a stronger attack.

R1-Distill-Qwen-7BAverage RAS (%)

72.892.5

+19.7 points

DecepChain → TIDES

R1-Distill-Llama-8BAverage RAS (%)

67.791.2

+23.5 points

DecepChain → TIDES

Phi-4-Reasoning-14BAverage RAS (%)

71.985.6

+13.7 points

DecepChain → TIDES

DeepSeek-R1-Distill-Qwen-7BAverage RAS (%)
Backdoor0.0
DTCoT1.6
BadChain3.4
DecepChain72.8
TIDES92.5
DeepSeek-R1-Distill-Llama-8BAverage RAS (%)
Backdoor0.5
DTCoT24.0
BadChain26.3
DecepChain67.7
TIDES91.2
Phi-4-Reasoning-14BAverage RAS (%)
Backdoor0.5
DTCoT13.3
BadChain14.5
DecepChain71.9
TIDES85.6

Average RAS over MATH-500, Minerva, AIME 2024, OlympiadBench, and LiveCodeBench. Three runs; standard deviations are in the full tables below. Base checkpoints have no reported RAS and are omitted from these charts.

Short-trace utility

Pass@1 is measured separately on short traces. Averaged over the five benchmarks, the base and TIDES checkpoints keep similar short-trace accuracy.

R1-Distill-Qwen-7B

Base34.1%TIDES36.2%

R1-Distill-Llama-8B

Base28.2%TIDES29.0%

Phi-4-Reasoning-14B

Base31.3%TIDES32.2%

Average short-trace Pass@1 across the five benchmarks.

Phi-4-Reasoning

The failure emerges under extended reasoning

The attacked and baseline models track each other below a critical budget. Past roughly 1,000 tokens the curves diverge: baseline accuracy keeps improving while the attacked model drops from 50% to 16%.

The transition near 1,000 tokens is not universal and is likely tied to how the gate's shallow and deep traces were defined.

Original Figure 5
Accuracy versus token budget for the baseline and attacked models; below a critical budget the two match, beyond it the attacked model's accuracy falls sharply.
Figure 5. Accuracy versus token budget for the backdoored Phi-4-Reasoning on 50 math problems. Below the critical budget the attacked model tracks or exceeds the baseline; beyond it, added compute degrades rather than improves accuracy.
Average results (all methods and models)
Averages over five benchmarks · Table 1 · mean ± standard deviation
BackboneMethodPass@1 (%)RAS (%) ↑
DeepSeek-R1-Distill-Qwen-7BBase34.1 ± 0.1–
Backdoor23.0 ± 0.70.0 ± 0.0
DTCoT23.2 ± 0.31.6 ± 0.3
BadChain25.4 ± 1.03.4 ± 1.0
DecepChain32.2 ± 0.572.8 ± 0.3
TIDES36.2 ± 0.392.5 ± 0.3
DeepSeek-R1-Distill-Llama-8BBase28.2 ± 0.5–
Backdoor22.2 ± 0.90.5 ± 0.0
DTCoT10.1 ± 0.824.0 ± 0.2
BadChain10.5 ± 0.526.3 ± 1.8
DecepChain27.3 ± 0.167.7 ± 0.6
TIDES29.0 ± 0.291.2 ± 0.1
Phi-4-Reasoning-14BBase31.3 ± 0.6–
Backdoor25.2 ± 0.60.5 ± 0.1
DTCoT16.0 ± 0.813.3 ± 0.8
BadChain16.1 ± 0.214.5 ± 0.5
DecepChain28.0 ± 0.871.9 ± 0.5
TIDES32.2 ± 0.185.6 ± 0.2

Averages over the five benchmarks. "–" preserves the missing Base RAS values.

Per-benchmark results
Per-benchmark results · Table 1 · mean ± standard deviation
BackboneMethodMATH500MinervaAIME24OlympiadLiveCodeBenchAvg
Pass@1RAS ↑Pass@1RAS ↑Pass@1RAS ↑Pass@1RAS ↑Pass@1RAS ↑Pass@1RAS ↑
DeepSeek-R1-Distill-Qwen-7BBase67.4 ± 0.3–37.9 ± 0.5–28.3 ± 0.5–36.4 ± 1.4–0.4 ± 0.3–34.1 ± 0.1–
Backdoor54.3 ± 0.60.0 ± 0.027.2 ± 1.60.0 ± 0.08.2 ± 1.40.1 ± 0.125.0 ± 0.30.0 ± 0.10.2 ± 0.30.0 ± 0.023.0 ± 0.70.0 ± 0.0
DTCoT48.2 ± 1.40.0 ± 0.022.8 ± 0.84.7 ± 0.714.5 ± 0.81.1 ± 1.530.4 ± 2.71.9 ± 2.70.0 ± 0.00.3 ± 0.323.2 ± 0.31.6 ± 0.3
BadChain44.8 ± 3.51.0 ± 1.424.8 ± 1.612.3 ± 2.124.1 ± 1.71.2 ± 1.832.9 ± 1.11.1 ± 0.90.2 ± 0.21.2 ± 1.225.4 ± 1.03.4 ± 1.0
DecepChain68.0 ± 1.377.2 ± 0.930.2 ± 0.399.8 ± 0.325.5 ± 1.099.8 ± 0.237.4 ± 1.186.9 ± 1.10.1 ± 0.10.5 ± 0.532.2 ± 0.572.8 ± 0.3
TIDES68.2 ± 0.297.1 ± 0.839.0 ± 0.176.7 ± 0.834.0 ± 0.7100.0 ± 0.039.4 ± 0.488.8 ± 0.40.3 ± 0.299.8 ± 0.136.2 ± 0.392.5 ± 0.3
DeepSeek-R1-Distill-Llama-8BBase58.3 ± 0.3–28.6 ± 0.7–12.9 ± 0.6–31.3 ± 1.5–10.0 ± 0.1–28.2 ± 0.5–
Backdoor52.1 ± 0.51.3 ± 0.221.4 ± 0.90.4 ± 0.03.0 ± 1.70.2 ± 0.126.0 ± 1.20.2 ± 0.28.7 ± 0.70.4 ± 0.222.2 ± 0.90.5 ± 0.0
DTCoT17.6 ± 2.117.6 ± 1.514.0 ± 2.910.4 ± 0.45.1 ± 1.760.7 ± 0.410.2 ± 1.928.7 ± 0.53.6 ± 0.22.7 ± 0.210.1 ± 0.824.0 ± 0.2
BadChain22.0 ± 1.417.5 ± 3.913.6 ± 0.912.0 ± 2.33.3 ± 0.377.4 ± 1.610.3 ± 1.921.6 ± 1.63.2 ± 0.93.2 ± 2.010.5 ± 0.526.3 ± 1.8
DecepChain59.3 ± 0.567.9 ± 1.725.6 ± 0.875.9 ± 0.711.7 ± 0.998.7 ± 1.130.5 ± 0.483.6 ± 1.29.3 ± 0.412.5 ± 1.227.3 ± 0.167.7 ± 0.6
TIDES59.7 ± 0.295.8 ± 0.129.6 ± 0.184.7 ± 0.413.4 ± 0.6100.0 ± 0.031.5 ± 0.287.2 ± 0.210.6 ± 0.388.4 ± 0.229.0 ± 0.291.2 ± 0.1
Phi-4-Reasoning-14BBase54.6 ± 0.9–24.3 ± 1.3–7.0 ± 0.7–37.9 ± 0.9–32.9 ± 0.8–31.3 ± 0.6–
Backdoor48.0 ± 1.10.8 ± 0.519.2 ± 0.60.2 ± 0.21.3 ± 1.10.1 ± 0.228.1 ± 0.40.5 ± 0.329.3 ± 1.10.7 ± 0.225.2 ± 0.60.5 ± 0.1
DTCoT28.6 ± 1.511.3 ± 2.113.4 ± 2.08.4 ± 0.45.9 ± 3.728.1 ± 2.521.9 ± 2.015.9 ± 1.310.1 ± 1.83.0 ± 1.116.0 ± 0.813.3 ± 0.8
BadChain30.2 ± 1.78.7 ± 0.414.8 ± 1.810.4 ± 1.22.1 ± 2.541.6 ± 1.321.1 ± 1.99.6 ± 1.612.1 ± 1.52.3 ± 1.016.1 ± 0.214.5 ± 0.5
DecepChain55.3 ± 1.374.9 ± 1.320.8 ± 2.489.2 ± 0.64.7 ± 1.698.9 ± 0.328.1 ± 1.083.9 ± 2.031.3 ± 1.912.4 ± 0.328.0 ± 0.871.9 ± 0.5
TIDES59.1 ± 0.298.6 ± 0.325.4 ± 0.462.4 ± 0.57.0 ± 0.1100.0 ± 0.036.6 ± 0.867.1 ± 0.232.8 ± 0.299.8 ± 0.232.2 ± 0.185.6 ± 0.2

Every cell of Table 1, scrollable on small screens.

How to read Relative Attack Score

For a fixed reasoning budget \(h\), with original and attacked Pass@1 on the same prompts, Appendix E defines:

\[\mathrm{RAS}_h=\frac{\mathrm{Pass@1}_{\mathrm{org},h}-\mathrm{Pass@1}_{\mathrm{attack},h}}{\mathrm{Pass@1}_{\mathrm{org},h}}.\]

RAS is computed within each matched budget rather than across horizons. It measures a relative reduction in reasoning accuracy.

ABLATION · R1-DISTILL-LLAMA-8B

Keep the directions specific to each layer

The paper compares matching each vector to its extraction layer with reusing the strongest layer's vector across the network.

Layer-wise vectors yield 89.2% mean RAS over these three benchmarks, compared with 16.0% for the strongest-vector strategy. This supports the layer-specific construction in the tested setting.

Original Figure 4
Relative Attack Score (%)Layer-wise and strongest-vector strategies

MATH500

Layer-wise95.6
Strongest12.7

Minerva

Layer-wise84.8
Strongest21.3

Olympiad

Layer-wise87.2
Strongest13.9

Values from Figure 4.

The threat model allows offline training, auxiliary-data construction, and access to model parameters and activations before release, matching a supply-chain injection. At deployment the attacker does not control user prompts or require access to hidden states.

The evaluation uses three reasoning models — Phi-4-Reasoning, DeepSeek-R1-Distill-Qwen-7B, and DeepSeek-R1-Distill-Llama-8B — on five benchmarks: MATH-500, Minerva, AIME 2024, OlympiadBench, and LiveCodeBench. GSM8K and OpenR1-Math provide the construction data. Inference uses temperature 0.6, top-p 0.95, and up to 4,096 generated tokens, with the entropy smoothing constant \(\beta=0.5\).

The figures and numbers on this page are from an extended version of the paper with additional models and analyses. The linked paper is the earlier workshop version, and the citation below is for that version.

Residual failures follow two patterns: an early correct answer can anchor the continuation, and low-entropy, highly structured text can leave little room for drift. Constructing the attack relies on hidden-state access, contrastive trace collection, and long-horizon distillation, so it applies mainly to supply-chain settings.

The theory gives a worst-case propagation bound and a necessary displacement condition for an idealized recurrence. It does not establish transformer-specific amplification, alignment of the estimated vectors with correctness-changing directions, or the origin of the observed critical depth. The reported metrics assess reasoning correctness.

BadChain studies prompt-triggered backdoors in chain-of-thought demonstrations, which input-level detection can catch. TIDES instead makes extended reasoning the activation condition and transfers the behavior into a checkpoint through on-policy distillation, in which a student learns from teacher feedback on its own generated sequences.

Citation for the ES-Reasoning workshop paper.

BibTeX
Download
@inproceedings{dai2026tides,
  title     = {{TIDES}: Test-time Inference Drift Exploitation via Scaling},
  author    = {Haoran Dai and Haozheng Luo and Haotian Zhang and Meng Lin and
               Yan Chen and Binghui Wang},
  booktitle = {The First Workshop on Efficient Spatial Reasoning},
  year      = {2026},
  url       = {https://openreview.net/forum?id=tXRUpMp7xO}
}