Compiling deterministic and continuous programs into pretrained Transformer weightsCompiling Deterministic and Continuous Programs into Pretrained Transformer Weights
The authors propose a zero-gradient compilation method, DBOP, that writes stateful programs into MoE cold experts; the authors state that standard capability screening is difficult to identify, but blind pruning and static spectral forensics can remove or detect them.
The upstream party modifies the pretrained sparse MoE checkpoint before release, keeping the tensor structure, parameter count, and standard inference compatibility. Defenses are divided into reference-available and checkpoint-only; the stealth claims target the latter, which has only suspicious weights and can perform black-box perplexity, capability benchmarks, fine-tuning, white-box static inspection, and post-hoc removal. A further distinction is made between unknown-trigger backdoor and known-trigger guardrail settings.
- Open-weight supply chains often check third-party checkpoints using perplexity and capability benchmarks. The authors investigate whether multi-layer stateful programs can be hidden in the calibration cold experts of a sparse MoE without changing tensor shapes, parameter counts, or the vocabulary, and whether subsequent fine-tuning and static auditing can detect or remove them.
- DBOP implements gating, squaring and multiplication using closed-form gated MLP algebra; when triggered, the entry expert writes an orthogonal beacon, preempts subsequent routing, and passes cross-token state through unmodified attention. The authors also compare cold-expert camouflage, blind pruning, spectral forensics and hot-expert overwriting.
- The authors report nine MoE builds covering arithmetic, quantum simulation, backpropagation, cellular automata, ray casting and a game engine. The confidence intervals for the 15 capability benchmarks of the three Qwen3.6 builds all cross zero; blind pruning can remove cold-expert payloads, and hot-expert entanglement builds bypass fixed-threshold scanning but are removed by fine-tuning with a trigger.
- The authors note that natural language triggers are still less reliable than explicit triggers, long rollouts accumulate errors, and the MoE construction has not obtained formal static certification; the hot-expert experiments only cover shallow two-expert guardrails. The clean false-positive audit only includes official checkpoints, and does not cover community fine-tunes and merged derivative models.
- Metrics
- exact accuracyΔPPLBlind F1Strict F1AUROCTPR@0FPbit-exact logitstop-1 agreementcrosstalk
The author Mark Marosi proposes Dominant-Beacon Orthogonal Preemption, a closed-form, zero-gradient compilation method that exploits the hundreds of inactive routed experts that sparse MoE models leave on calibration text to embed stateful deterministic and continuous programs into these cold expert weights, while keeping tensor shapes, parameter counts, attention layers, shared experts, and the vocabulary matrix bit-for-bit unchanged. Triggered by orthogonal routing beacons, these circuits execute multi-tenant arithmetic, continuous quantum simulation, in-weight backpropagation, cellular automata, 3D ray casting, and a three-map game engine across multiple MoE architectures; across three compiled versions screened on five capability benchmarks and held-out web text, capability changes are small and all paired confidence intervals cross zero.
Related events and news
1 events · 0 news mentions
- This event's paper
将确定性与连续程序编译进预训练Transformer权重
Paper analysis
What problem does this paper attempt to solve?
Studies how to zero-gradient compile multi-layer stateful programs into MoE cold experts, and audits their stealthiness, persistence and removability.
The core question is: can multi-layer deterministic, continuous and stateful programs be compiled into the pretrained sparse MoE weights of a fixed architecture, while conventional open-weight screening cannot distinguish it from the original model.
- Supply chain scenario: the authors focus on the case where a third-party checkpoint, before deployment or fine-tuning, only undergoes perplexity, capability benchmarks and static weight checks; the dense-host construction requires subspace eviction, which the authors state harms language modeling and reasoning.
- Core observation: heavy-tailed top-K routing causes some experts to have zero routing on calibration text. On WikiText-2, Qwen3.6 has 362/10,240 zero-hit experts, and Gemma-4-it has 270/3,840 (Section 2.2).
- Proposed content: the authors propose Dominant-Beacon Orthogonal Preemption (DBOP), which writes programs into cold experts using closed-form algebra, and systematically test capacity, fine-tuning persistence, blind pruning, spectral forensics and hot-expert adaptive overwriting.
- Threat model:
- Attacker goals and capabilities: the upstream party modifies the checkpoint before release, can overwrite expert weights and routing rows, but preserves tensor structure, parameter count and standard inference compatibility.
- Victim system: the downstream adopter checks, deploys, quantizes or fine-tunes the open-weight MoE; the program is triggered by symbols, ordinary ASCII " =" or mid-layer safety features.
- Defender knowledge: reference-available defenders can directly discover modifications using the original weights or hashes, and the paper does not claim undetectability against them.
- checkpoint-only defenders: have only the suspicious weights, and can perform black-box evaluation, white-box static inspection, blind dead-expert pruning and targeted spectral reinitialization; the paper also distinguishes unknown-trigger backdoor and known-trigger guardrail settings.
What related research exists?
Related work spans Transformer compilation, weight-implanted backdoors and MoE routing backdoors, as well as pruning and weight forensics.
Transformer compilation and in-weight computation
- Tracr / RASP / ALTA (Weiss et al., 2021; Lindner et al., 2023; Shaw et al., 2025): compile formal sequence programs into standalone small Transformers rather than pretrained language models.
- Percepta Research Team (2026): compiles a WebAssembly virtual machine into custom Transformer weights; Tracr-Injection (Vergara Browne and Soto, 2025) instead uses gradient fine-tuning to distill algorithmic behavior into a pretrained dense checkpoint.
- Sah (2026): grafts zero-gradient circuits into a pretrained dense host via width expansion; the paper positions DBOP as sparse-MoE compilation under fixed tensor shapes.
Weight editing and backdoors
- Lazarus (Zeng et al., 2026): training-free reprogramming of dormant dense MLP neurons for agent backdoors with short fixed tokens; the paper notes that its object is not multi-layer numerical or continuous programs.
- Yin et al. (2026): compiles single-step activation-steering vectors into dense weights using null-space constraints; Liu et al. (2026) studies LLM-guided autonomous parameter surgery to implant selective backdoors.
- Tanveer (2026): studies cross-architecture weight-space backdoors and blind weight-level forensic scanning.
MoE backdoors and removal defenses
- BadMoE (Wang et al., 2025a): uses gradient optimization to route triggers and infect dormant experts; BadSwitch (Zhao et al., 2025) trains a dynamic expert-routing backdoor that exploits sparse MoE gating.
- Fine-Pruning (Liu et al., 2018): defends against backdoors by pruning dormant neurons, and analyzes pruning-oriented entanglement of active neurons; this paper extends the two ideas to blind pruning of dead experts and hot-expert entanglement, respectively.
Experimental controls and data
- The main control is the authors' own dense-host subspace eviction build, with Qwen3-8B as host; capability screening uses MMLU, ARC-Challenge, HellaSwag, WinoGrande, GSM8K, and additionally WikiText-2 and FineWeb-Edu to measure perplexity and routing (Table 3).
The authors summarize the distinction of this paper as: analytic, zero-gradient multi-layer numerical, continuous, and stateful computation on a pretrained sparse MoE, together with static spectral forensics, blind dead-expert pruning, and hot-expert overwrite analysis (Table 1).
How does the paper address this problem?
DBOP preempts cold-expert routing with an orthogonal beacon, executes programs with closed-form gated arithmetic, and passes state through unmodified attention.
DBOP separates trigger recognition from multi-layer execution: ordinary text does not enter the compiled experts; after a trigger, an entry expert writes a private beacon, causing subsequent dedicated cold experts to take over routing; the entire process involves no host gradient updates and no runtime hooks.
Fixed-architecture constraints and cold-expert selection
- Compilation keeps the parameter count, tensor schema, and both vocabulary matrices unchanged, adds no layers, experts, or custom tokens, and uses standard causal decoding (Definition 1).
- The MoE version also keeps all attention, shared-expert, and normalization weights bit-identical, and does not perform dense output-projection eviction; it overwrites only the Wgate, Wup, Wdown, and routing rows of cold experts, accounting for 0.02%–1.17% of routed experts.
- Routing is counted on a strictly separated WikiText-2 train calibration set, preferring experts with zero hits; the canonical build reads the first 128 chunks in order and breaks ties by lowest expert index (Section 4.4).
Beacon routing and cross-architecture adaptation
- A program-private bus Usub is constructed from low-energy directions of the calibration residuals, with each tenant using mutually orthogonal unit beacons; inverse-gain read vectors are used to read residual coordinates after RMSNorm.
- The entry layer is usually Layer 1; natural-language parsing can use Layer 0. Entry routing rows are aligned to the trigger representation via ridge covariance whitening; after the trigger, a large beacon and input routing are written.
- Subsequent routing rows are parallel to the beacon direction, pushing the target expert toward top-1 while suppressing host experts and other tenants. Proposition 2 gives sufficient separation conditions for zero misrouting and trigger dominance on a bounded host envelope.
- Gemma-4's post-MLP RMSNorm and per-layer scalars attenuate the writes; sandwich-norm DBOP inverts the pre- and post-normalization gains, tracks the scalar product, and uses bipolar regenerative repeater experts to restore logic levels (Appendix C).
Three classes of closed-form computational primitives
- Bias-free experts construct thresholds using a constant reference orthogonal to the bus. A two-neuron saturated step gate is formed by subtracting two shifted SiLU branches, with out-of-threshold leakage decaying exponentially with separation.
- For SwiGLU/GeGLU satisfying Φ(u)+Φ(−u)=1, two neurons implement squaring exactly: σΦ(u)u+σΦ(−u)(−u)=u2; this applies to SiLU, exact GeLU, and GeLUtanh.
- Four neurons implement bilinear multiplication via the polarization difference of two squares, with scale b balancing the two operands; the authors choose this form to reuse the same squaring unit and calibration scale.
Cross-token state and fixed-vocabulary decoding
- Qwen3.6's partial rotary attention preserves a non-rotary subspace. Early cold experts write a perturbation in the non-rotary key direction at the source token, and the query position writes a matching query direction, transmitting up to 64 packed state and phase bits via the unmodified WV and WO.
- The final cold expert writes along the mean-centered, gain-corrected unembedding direction of the target token; the sufficient condition is δt=minj≠ t(at−aj)⊤ ut>0 and the write magnitude covers the host logit margin. The authors empirically check this margin over all vocabulary rows.
Capacity, camouflage, and defense auditing
- Nine builds cover multi-tenant ALU, 4-qubit simulation, 5-epoch in-weight backpropagation, cellular automata, 3D graphics, a three-map game, a natural-language math coprocessor, and a two-expert guardrail (Table 2).
- Forensic statistics include routing-row norms, neuron product norms, layer-normalization spectral norms, gauge-balanced norms, and cross-layer subspace coherence; adaptive variants include router matching, fan-out, and dispersion across M∈{1,2,4,8} layers.
- Defense tests include blind pruning of the bottom 1% of routed experts, reinitializing top-K experts by spectral or combined scores, and oracle-guided excision with a clean-host control. Proposition 3 gives only an amplitude-dependent lower bound on the spectral product, and the authors explicitly do not interpret it as a general undetectability theorem.
What experiments did the paper conduct?
The experiments cover nine program builds, host capability, quantization, and fine-tuning, and compare cold-expert camouflage, static forensics, and hot-expert overwrites.
Experimental setup
- Hosts under test: Qwen/Qwen3.6-35B-A3B, google/gemma-4-26B-A4B and their -it versions; the dense control is Qwen/Qwen3-8B. The clean false-positive audit additionally includes diffusiongemma-26B-A4B-it and deepseek-ai/DeepSeek-V4.1-Flash-1017.
- Program evaluation: Table 2 summarizes nine single-build checkpoints, reporting k/n, Wilson 95% CI when n<50, ΔPPL, bit-exact logits, and top-1 agreement; three builds additionally use seeds {42,137,2026}, for nine independent compilations in total.
- Capability benchmarks: MMLU 570, ARC-Challenge 1,172, HellaSwag 1,000, WinoGrande 1,267, GSM8K 200, 4,209 items in total; paired-bootstrap 95% CI is used (Table 3, Table A1).
- Text and routing: WikiText-2 and unscreened FineWeb-Edu are used; the three capability-screening builds together check 0/671,744 modified-expert routing opportunities, and FineWeb-Edu has 16,320 predictions.
- Guardrail judging: 30 unseen prompt-injection attacks plus 40 benign prompts, greedy generation of 160 tokens; Blind and Strict F1 are both computed by a deterministic rule-based scorer, with no LLM judge (Section 4.3).
- Fine-tuning and forensics: LoRA, full-parameter SFT, Switch load-balancing loss, and trigger-bearing training are tested; static detection reports AUROC and TPR at the zero-false-positive threshold, and blind pruning, spectral reinitialization, and oracle excision are also measured.
Main results
The table below lists the main results for the nine builds in Table 2; the graphics build's values are PSNR, the guardrail's are Blind/Strict F1, and the rest are the accuracies listed in the text.
Build (host) Modified experts Main result (Table 2) Three-tenant ALU (Qwen3.6) 15/10,240 total 143/144 (99.31%); unseen 77/78 Eight-tenant ALU (Qwen3.6) 40/10,240 total 321/336 (95.54%); unseen 167/181 QPU+Trainer (Qwen3.6) 48/10,240 QPU 27/27; Trainer queries 80/80 Rule-110+Game of Life (Qwen3.6) 10/10,240 10-step trajectories 50/50 and 26/50 respectively RGB+Whitted (Qwen3.6) 33/10,240 25.61 dB, 18.28 dB Three-map game engine (Qwen3.6) 29/10,240 local 76/80; continuous paths 35/80 NL “ =” math coprocessor (Qwen3.6) 14/10,240 guarded 468/720; unguarded 539/720 Sandwich-norm three-tenant (Gemma-4) 45/3,840 total 144/144; unseen 78/78 Two-expert Guardrail (Qwen3.6) 2/10,240 F1 0.9091/0.9655; benign false refusals 0/40 - Multi-tenant isolation: the three-tenant, eight-tenant, and Gemma-4 builds all report 0.0% crosstalk; the three-tenant ALU's Bank A linear baseline is 31.25% (Section 4.2).
- Continuous computation: QPU achieves mean state fidelity 0.9923 on Grover-16; the Trainer's final weights have r=0.9989 relative to the FP32 reference. With W1 frozen the XOR loss is 0.3682, and with live hidden-layer updates it is 0.2135 (Section 4.1).
- Failure boundaries: Game of Life's 52.0% exact 10-step trajectories is above the all-dead baseline of 14.69%; the game engine succeeds on only 2/4 full campaigns. The authors use this to distinguish single-step accuracy from autoregressive trajectory reliability.
Host capability, quantization, and fine-tuning persistence
- Capability screening: the pooled changes for the three Qwen3.6 builds are −0.35, +0.07, and +0.10 percentage points, with 15/15 individual CIs crossing zero; FineWeb-Edu PPL changes from −0.02% to +0.05% (Table 3). The authors note that cold experts do not execute anyway, so host preservation is not unexpected.
- Dense control: the four Qwen3-8B dense builds show pooled drops of 2.42–4.89 percentage points and FineWeb-Edu PPL increases of +8.19% to +15.79%; the 16×9 raycaster's GSM8K goes from 87.00% to 70.00% (Table 3).
- Quantization: Gemma-4 is 141/144 under both FP8 per-channel and INT8 per-channel; Qwen3.6 naive is 75/144 under FP8 per-channel and 109/144 under INT8. Under dense INT4-g128 all three programs are 0 (Table A2).
- Short-horizon fine-tuning: after 50 steps of benign full SFT, the three-tenant build is 128/144 and 131/144 at lr=1e-5 with wd=0 and wd=0.01 respectively; at lr=3e-5 it is 90/144. After 500 steps the former learning-rate settings drop to 25/144, while the shallower guardrail keeps Blind/Strict F1 0.696/0.750 (Table 4).
- Trigger exception: full SFT with triggers clears the cold-expert guardrail within 5–10 steps, ending at 30/30 hijack; after 50 steps of Routed+Router LoRA it is still Blind/Strict F1 0.9655/1.0000 with 1/30 hijack (Table 4).
Static forensics, adaptive camouflage, and hot-expert overwrites
- Cold experts are removable: global bottom-1% blind pruning removes 17/17 compiled experts on 16,384 FineWeb-Edu tokens, dropping three-tenant accuracy to 2.78%, with a FineWeb-Edu PPL change of −0.0045 (Section 7.3).
- Camouflage still leaves spectral signal: standard DBOP has layer-normalization spectral AUROC 1.000 and TPR@0FP 15/15; router-matched is 14/15. With cross-layer dispersion M=1/2/4/8, the combined-score AUROC is 1.000 in all cases, but fixed-threshold recall is 9/15, 19/30, 38/60, and 90/120 respectively, and program accuracy falls from 93.8% to 54.2% (Table 5).
- Hot-expert trade-off: the two-hot-expert overwrite has TPR 0/2 at τ=50.04, and both 10% blind pruning and K=200 reinitialization remove 0/2; the shared-entanglement build is 0/9, but K=200 can remove 8/9, with Strict F1 dropping to 0.065 and FW PPL 11.40 (Table A8).
- Fails when the trigger is known: both hot-expert builds are cleared within 5–10 steps under trigger-bearing full SFT; the shared-entanglement build has Strict F1 0.846 after 100 steps of benign SFT+Laux=0.10 under an unknown trigger (Section 7.4).
Other ablations and analyses
- Clean calibration: the four layer-normalization spectral rules give 0/37,120 FP on the five official checkpoints; raw router L2 gives 15,093/37,120 FP (Table 6).
- Threshold margin: the spectral z threshold of 50.04 is only above the Qwen3.6 clean maximum of 49.67; the authors state that a larger E would push up the extremes and requires per-architecture calibration.
- Drift decomposition: after 100 steps of SFT, restoring only the cold experts gives 119/144, restoring only attention gives 99/144, and restoring both gives 139/144, i.e., recovering 97.7% of the lost accuracy (Table A6).
- Frozen controls: in 50 steps of SFT, freezing attention gives 137/144 and freezing routing gives 128/144; the authors therefore attribute drift to coupling between cold experts and attention representations (Table A6).
- Seed variation: the three-tenant three-seed mean is 96.06±1.18%, and guardrail Blind F1 is 0.875±0.020; 8/9 of the nine builds have ΔPPL CIs crossing zero (Table A7).
- Formal verification: although DBOP_MOE_XOR_ALU passes 96/96 domain inputs and 500/500 prefix tests, the static verifier still returns FAIL because 19 gate bounds are exceeded (Table A4).
What are some points that can be further explored?
The authors list issues of natural language triggering, long-range errors, hot-expert auditing and formal verification, and the experimental scope also has clear boundaries.
Limitations and future directions noted by the authors
- Natural-language triggers remain relatively fragile: after repair, they reach 65.00%–74.86% on six held-out templates, still below the 95%–100% of explicit triggers, and depend on a diverse pool of training prefixes (Section 8.2, Limitation 1).
- Error accumulation in long-horizon rollouts: the authors use Game of Life and the three-map game to show that single-step accuracy does not guarantee exact full trajectories (Section 8.2, Limitation 2).
- Hot-expert defenses still have open problems: defending against backdoors in actively hot experts under unknown triggers, and the feasibility of hiding deep multi-layer programs in hot experts, are both listed as open problems (Section 8.2, Limitation 3).
- Clean-scanner coverage needs to be extended: the authors list measuring false-positive rates on community benign fine-tunes and merge-derived models as a follow-up question; the current audit includes only official checkpoints (Section 8.2, Limitation 3).
- No formal static certification for MoE: the static verifier returns FAIL for DBOP_MOE_XOR_ALU, so the authors make no formal certification claim for any MoE build (Section 8.2, Limitation 4; Appendix D).
Scope of experimental coverage
- Hosts and builds: the program-capacity experiments cover nine canonical MoE builds on Qwen3.6 and Gemma-4; the dense control is on Qwen3-8B. The five-benchmark capability screening covers only three of these Qwen3.6 builds (Table 2, Table 3).
- Hot-expert scope: the two hot-expert constructions are tested only on the shallow two-expert guardrail, and are not used for the 15-expert ALU or the 29-expert game engine (Section 7.4).
- Clean false-positive audit: includes five official public MoE models, 37,120 routed experts, of which four checkpoints are the held-out transfer set (Table 6, Table A5).
- Repeats and sample sizes: three-seed reproduction covers only the three-tenant ALU, QPU+Trainer, and the two-expert guardrail; the guardrail uses 30 attacks and 40 benign prompts each time (Table A7, Section 4.3).
- Judging and verification: the guardrail uses a rule-based scorer; the paper reports no human scoring or human agreement; the MoE circuits have empirical stress tests but do not pass static gate-bound verification (Section 4.3, Appendix D).
Summarize the main content of the paper
DBOP shows that fixed-shape MoE weights can carry multiple types of programs, while also giving its screening blind spots and multiple removable paths.
This is a study of open-weight supply-chain security and in-weight computation: the authors propose DBOP and investigate whether the calibration cold experts of a sparse MoE can carry multi-layer programs without changing the model architecture, and whether downstream screening, fine-tuning, and white-box forensics can handle these payloads.
- Core method: closed-form gated MLP primitives implement thresholds, exact squaring, and multiplication; after a trigger, orthogonal beacons seize routing to dedicated cold experts, cross-token state is transmitted through unmodified attention, and output is still decoded through the fixed unembedding.
- Program capacity: the Qwen3.6 three-tenant ALU uses 15/10,240 experts with total accuracy 143/144; the Gemma-4 sandwich-norm version uses 45/3,840 experts and reaches 144/144, with both reporting 0.0% crosstalk (Table 2).
- Continuous and stateful tasks: in the same checkpoint, QPU is 27/27 and Trainer queries are 80/80; however, Game of Life has only 26/50 fully correct 10-step trajectories, and the three-map game has 35/80 continuous paths and 2/4 full campaigns.
- Host screening: all 15 five-benchmark paired-bootstrap CIs for the three Qwen3.6 builds cross zero, and FineWeb-Edu PPL changes from −0.02% to +0.05%; the authors emphasize that this host preservation is structurally expected when cold experts do not execute (Table 3, Section 8.1).
- Forensics and adaptation: bottom-1% blind pruning removes 17/17 cold experts; the layer-normalization spectral rule gives 0/37,120 FP on five clean official models. The shared-expert entanglement build bypasses fixed-threshold scanning and 10% blind pruning, but K=200 reinitialization can remove 8/9, and trigger-bearing SFT can clear it quickly.
The authors' conclusion is not “undetectable backdoor” or “irremovable guardrail”: cold-expert payloads can bypass routine black-box screening and tolerate some benign fine-tuning, yet are exposed to routing statistics and static spectral inspection; hot-expert overwrites only change this trade-off. The authors plan to release the audit ledger, scanner, removal routines, and an end-to-end reproduction script, while retaining tooling that can directly package them covertly.
Research lineage
4 foundations · 0 follow-ups in library- Cites2024-12On Evaluating the Durability of Safeguards for Open-Weight LLMs§ 6 Persistence Under Benign and Adversarial Fine-Tuning
- Cites2018-05Fine-Pruning: Defending Against Backdooring Attacks on Deep Neural Networks§ 7 Static Weight-Space Forensics, Adaptive Evasion, and Removal
- Cites2024-01Sleeper Agents: Training Deceptive LLMs that Persist Through Safety Training§ 6 Persistence Under Benign and Adversarial Fine-Tuning
No later in-library follow-ups recorded yet.
“Downstream adopters routinely adapt open-weight checkpoints with LoRA (Hu et al., 2022) or full-parameter supervised fine-tuning (SFT), which is known to erase behavioral guardrails and dense weight edits rapidly (Qi et al., 2024b; Qi et al., 2024a), even as certain training-i…”