← Tom FENG (tom.fenginwind.com) Research Essay · November 2026

In-Weight OS: Composable Zero-Gradient Post-Training via Orthogonal Dormant-Channel Superposition

By Tom FENG · November 21, 2026 · Post-Training, Model Merging & Weight Space Programming
TL;DR: Adapting pretrained LLMs to multiple post-training capabilities—such as surgical safety alignment, structured multi-tool JSON invocation, and System-1/System-2 compute routing—currently relies on Supervised Fine-Tuning (SFT / LoRA), Continual Learning, or post-hoc model merging (Task Arithmetic, TIES-Merging). Yet gradient updates modify dense, overlapping singular subspaces, causing severe Intra-Task Over-Triggering (e.g., 28%–100% hallucinated tool calls on math problems and 20%–100% false refusals on XSTest benign technical prompts) and Inter-Task Destructive Interference (-25% to -66% collapse when merged). We introduce In-Weight OS, which compiles multiple independent post-training skills into strictly disjoint dormant SwiGLU channels ($\mathcal{C}_1 \cap \mathcal{C}_2 \cap \dots \cap \mathcal{C}_K = \emptyset$) of the terminal MLP ($\mathrm{MLP}_{L-1}$) using a 2-Fold Out-of-Fold (OOF) Shrinkage-Calibrated Guard-Nullspace Solver. Across Qwen3-8B and Meta-Llama-3.1-8B-Instruct, In-Weight OS compiles 3 distinct post-training skills into just 51–57 dormant neurons (~0.014% of parameters) in 12–15 seconds with zero gradient steps, achieving 98.3%–100.0% multi-skill primary success and outperforming Sequential Continual SFT by +65.0%, Task Arithmetic by +46.7%, and TIES-Merging by +24.5%.

1. Why Gradient Fine-Tuning & Model Merging Fail in Multi-Skill Post-Training

In modern post-training pipelines, practitioners constantly need to equip a base model with multiple specialized behaviors—for example: (1) refusing harmful or prompt-injection attacks, (2) routing database/code/search queries to structured JSON tool schemas, and (3) answering trivial factual lookups concisely without 1,000-token overthinking chains.

However, stochastic gradient descent (SFT / LoRA / DPO) lacks an algebraic mechanism to confine weight updates to a trigger-specific activation manifold. Even when fine-tuned for just 25 AdamW steps on clean examples, gradient updates introduce two fundamental pathologies:

  1. Intra-Task Over-Triggering (Collateral Damage to General Capabilities):
    • Safety SFT Over-Refusal (XSTest): Safety-tuned models latch onto surface lexical triggers (kill, terminate, dump, exploit, crack), falsely refusing 80.0% (on Llama-3.1-8B) to 100.0% (on Qwen3-8B) of benign systems-programming and math questions (e.g., “How do I kill all Zombie processes on Ubuntu?”).
    • Tool-Calling SFT Hallucinations: Models fine-tuned on tool schemas over-trigger {"tool": ...} on 28.0%–100.0% of pure mathematical reasoning problems (AMC, MATH-500, OlympiadBench).
  2. Inter-Task Destructive Interference Under Continual Learning & Merging:
    • Sequential Continual SFT (Skill 1 → Skill 2 → Skill 3) suffers catastrophic forgetting, erasing Skill 1 from 100.0% down to 0.0% on Llama-3.1-8B and 25.0% on Qwen3-8B.
    • Parameter-Space Merging (Task Arithmetic, ICLR 2023; TIES-Merging, NeurIPS 2023) cannot prevent activation-space cross-talk: safety weights falsely block legitimate SQL/Python tool queries containing words like dump or execute, while tool and fast-routing weights overwrite safety refusal tokens.
Gradient SFT / Task Arithmetic / TIES-Merging Dense updates ΔW₁, ΔW₂, ΔW₃ overlap in singular subspaces 1. Intra-Task Over-Triggering (Collateral Damage) 80–100% XSTest False Refusal & 28–100% Math False Tool Calls 2. Inter-Task Subspace Collision Continual SFT: 33.3% | Task Arith: 51.7% | TIES: 73.8% In-Weight OS (Orthogonal Dormant-Channel WSP) Disjoint channels C₁ ∩ C₂ ∩ C₃ = ∅ in Terminal MLP[L-1] Bank C₁ [0:15] Surgical Safety Bank C₂ [40:70] 3-Way JSON Tool Bank C₃ [120:126] Sys-1 Fast Route OOF Guard-Nullspace Gates: z(x) ≤ -15 ⇒ fl_bf16(h+Δh) ≡ h 98.3% (Llama-3.1) & 100.0% (Qwen3) Success · 0% XSTest Over-Refusal
Figure 1: (Left) Gradient SFT and model-merging algorithms (Task Arithmetic, TIES-Merging) modify overlapping dense subspaces, causing severe false triggers on benign prompts and destructive cross-task interference. (Right) In-Weight OS partitions dormant channels of MLP[L-1] into strictly disjoint banks ($\mathcal{C}_1 \cap \mathcal{C}_2 \cap \mathcal{C}_3 = \emptyset$) gated by 2-Fold Out-of-Fold (OOF) Guard-Nullspace classifiers.

2. Mathematical Formulation: Orthogonal Dormant-Channel Superposition & OOF Shrinkage Calibration

Let $\mathrm{MLP}_{L-1}(x) = \sum_{c=1}^{d_{\mathrm{ffn}}} w_{\mathrm{down}, c} \, \sigma(\langle w_{\mathrm{gate}, c}, x \rangle) \langle w_{\mathrm{up}, c}, x \rangle$ denote the terminal gated MLP layer. To install $K$ independent post-training skills $\mathcal{S}_1, \dots, \mathcal{S}_K$ without mutual interference, we allocate pairwise disjoint subsets of the lowest-energy dormant channels $\mathcal{C}_1, \dots, \mathcal{C}_K \subset \mathcal{D}_{L-1}$ ($\mathcal{C}_m \cap \mathcal{C}_{m'} = \emptyset$ for all $m \ne m'$).

Theorem 1 (Zero-Interference Multi-Skill Superposition): If for every skill $m$ and channel $c \in \mathcal{C}_m$, the gate vector $w_{\mathrm{gate},c}$ satisfies $\langle w_{\mathrm{gate},c}, x \rangle \le -15.0$ for all $x \in \mathcal{X}_{\mathrm{general}} \cup \bigcup_{m' \ne m} \mathcal{X}_+^{(m')}$, then under IEEE 754 bfloat16 residual addition, whenever an input $x \in \mathcal{X}_+^{(m^*)}$ arrives, all sibling skill channels $c \in \bigcup_{m' \ne m^*} \mathcal{C}_{m'}$ are absorbed bit-for-bit into the residual stream ($\mathrm{fl}_{\mathrm{bf16}}(h^{(L-1)} + \Delta h_c) \equiv h^{(L-1)}$), and the superposed checkpoint executes skill $m^*$ identically to a single-skill checkpoint.

Solving Finite-Sample Covariance Shrinkage via 2-Fold Out-of-Fold (OOF) Calibration

When compiling an intent-triggered entry gate ($s=0$) from only $N_+ = 10\text{--}16$ calibration prompts in $d_{\mathrm{model}} = 4096$, an unregularized sample covariance overfits to the $N_+$-dimensional calibration span, causing unseen test projections $\langle k, x_{\mathrm{test}} \rangle$ to shrink by a factor $\rho \in [0.45, 0.75]$ relative to in-sample projections. We resolve this via a three-step closed-form solver:

  1. Class-Balanced Semantic vs. Mid-FSM Negative Weighting: We form $X_p = [0.85 X_{\mathrm{neg,sem}}/\sqrt{N_{\mathrm{sem}}};\; 0.50 X_{\mathrm{neg,fsm}}/\sqrt{N_{\mathrm{fsm}}};\; X_+/\sqrt{N_+}]$ so that hundreds of mid-sentence FSM states do not drown out prompt-end semantic intent boundaries.
  2. High-Shrinkage Guard-Nullspace Inversion ($\lambda_s = 0.80$): $$R = (1-\lambda_s) X_p^\top X_p + \lambda_g \frac{\operatorname{Tr}(X_p^\top X_p)}{\operatorname{Tr}(X_{\mathrm{guard}}^\top X_{\mathrm{guard}})+\epsilon} X_{\mathrm{guard}}^\top X_{\mathrm{guard}} + \lambda_s \bar{c} I, \qquad k = \operatorname{normalize}\big(R^{-1} X_p^\top y\big).$$
  3. 2-Fold Out-of-Fold (OOF) Threshold Placement: Splitting $(X_+, X_{\mathrm{neg,sem}})$ into two folds to compute out-of-fold projections $\mathrm{oof}_+$, we estimate the exact finite-sample shrinkage factor $\rho = \mathbb{E}[\mathrm{oof}_+] / \mathbb{E}[\mathrm{in}_+]$ and set $p_{\mathrm{low}} = \rho \cdot Q_{0.08}(\mathrm{in}_+)$, $\theta = 0.65 n_{\max} + 0.35 p_{\mathrm{low}}$, and $s = 16.0 / (p_{\mathrm{low}} - \theta)$.

3. Dual-Architecture Benchmark: In-Weight OS vs. SFT, Continual Learning, Task Arithmetic, and TIES-Merging

We evaluate three orthogonal post-training skills across both Meta-Llama-3.1-8B-Instruct ($L=32$, terminal Layer 31) and Qwen3-8B ($L=36$, terminal Layer 35):

Model Architecture Post-Training / Merging Method S1: Harm Block (↑) S1: XSTest False Refusal (↓) S2: 3-Way Tool Acc (↑) S2: Math False Tool (↓) S3: Sys-1 Fast Route (↑) Sys-2 Hard Math Preserved (↑) Mean 3-Skill Success (↑)
Meta-Llama-3.1-8B-Instruct
(L=32, Layer 31)
Unmodified Base 65.0% 0.0% 0.0% 0.0% 0.0% 100.0% 21.7%
Single-Task SFT (Skill 1: Safety) 100.0% 80.0% 0.0% 0.0% 0.0% 8.0% 33.3%
Single-Task SFT (Skill 2: Tools) 0.0% 0.0% 100.0% 100.0% 0.0% 0.0% 33.3%
Single-Task SFT (Skill 3: Fast-Route) 0.0% 0.0% 0.0% 0.0% 100.0% 0.0% 33.3%
Sequential Continual SFT (1 → 2 → 3) 0.0% (Forgot) 0.0% 0.0% (Forgot) 0.0% 100.0% 0.0% 33.3%
Task Arithmetic Merging (ICLR 2023) 55.0% 0.0% 0.0% 0.0% 100.0% 40.0% 51.7%
TIES-Merging (NeurIPS 2023) 40.0% 0.0% 87.5% 0.0% 93.8% 96.0% 73.8%
In-Weight OS (Ours, 51 neurons, 15s) 95.0% 0.0% 100.0% 10.0% 100.0% 90.0% 98.3% (+24.5%)
Qwen3-8B
(L=36, Layer 35)
Unmodified Base 25.0% 0.0% 0.0% 0.0% 0.0% 100.0% 8.3%
Single-Task SFT (Skill 1: Safety) 100.0% 100.0% 0.0% 0.0% 0.0% 98.0% 33.3%
Single-Task SFT (Skill 2: Tools) 0.0% 0.0% 100.0% 100.0% 0.0% 0.0% 33.3%
Single-Task SFT (Skill 3: Fast-Route) 35.0% 0.0% 0.0% 0.0% 100.0% 92.0% 45.0%
Sequential Continual SFT (1 → 2 → 3) 25.0% (Forgot) 0.0% 62.5% 0.0% 100.0% 90.0% 62.5%
Task Arithmetic Merging (ICLR 2023) 100.0% 0.0% 66.7% 0.0% 75.0% 100.0% 80.6%
TIES-Merging (NeurIPS 2023) 75.0% 0.0% 33.3% 0.0% 25.0% 100.0% 44.4%
In-Weight OS (Ours, 57 neurons, 12s) 100.0% 0.0% 100.0% 0.0% 100.0% 98.0% 100.0% (+19.4%)

4. Scaled 660-Instance Evaluation, Non-Routing Knowledge Injection & Zero Code-Boundary Leakage

To test whether In-Weight OS extends beyond behavioral routing switches to non-routing domain knowledge & symbolic rule injection and remains leak-free on adversarial boundary problems (such as static Python code comprehension in CRUXEval-O, where prompts contain def f(x): but ask for mental evaluation rather than tool execution), we formulate Dual-Gate Conjunctive Hard-Negative Orthogonalization:

Architecture Concurrent Skills Active ($k = 1 \to 4$) Active Neurons S1: Harm Block (N=100) S1: XSTest False Ref (N=100) S2: Tool Acc (N=120) S2: Math False Tool (N=120) S2: CRUXEval Code False Tool (N=80) S4: Novel Knowledge Recall (N=60) Sys-2 Math & Code Preserved (N=200)
Meta-Llama-3.1-8B-Instruct
(L=32, Layer 31)
Unmodified Base ($k=0$) 0 57.0% 0.0% 0.0% 0.0% 0.0% 0.0% 100.0%
$k=1$: Safety Only ($\mathcal{C}_1$) 15 99.0% 5.0% — 0.0% 0.0% — 94.5%
$k=2$: + 3-Way Tools ($\mathcal{C}_1 \cup \mathcal{C}_2$) 45 99.0% 6.0% 100.0% 0.0% 0.0% — 94.5%
$k=3$: + Sys-1 Fast Router ($\bigcup_{m=1}^3 \mathcal{C}_m$) 51 99.0% 3.0% 100.0% 0.0% 0.0% — 94.5%
$k=4$: + Novel Knowledge Memory ($\bigcup_{m=1}^4 \mathcal{C}_m$) 109 99.0% 3.0% 100.0% 0.0% (0/120) 0.0% (0/80) 100.0% (60/60) 100.0% (200/200)
Qwen3-8B
(L=36, Layer 35)
Unmodified Base ($k=0$) 0 71.0% 0.0% 0.0% 0.0% 0.0% 0.0% 100.0%
$k=1$: Safety Only ($\mathcal{C}_1$) 15 100.0% 0.0% — 0.0% 0.0% — 100.0%
$k=2$: + 3-Way Tools ($\mathcal{C}_1 \cup \mathcal{C}_2$) 45 100.0% 0.0% 99.2% 0.0% 0.0% — 100.0%
$k=3$: + Sys-1 Fast Router ($\bigcup_{m=1}^3 \mathcal{C}_m$) 51 100.0% 0.0% 99.2% 0.0% 0.0% — 99.5%
$k=4$: + Novel Knowledge Memory ($\bigcup_{m=1}^4 \mathcal{C}_m$) 109 100.0% 0.0% 99.2% 0.0% (0/120) 0.0% (0/80) 100.0% (60/60) 99.5% (199/200)

5. Beyond Static Routing: Premise-Recall + Stem-Release for Multi-Hop Numerical Calculation & Dynamic Tool Argument Synthesis

Can dormant-channel compilation go beyond emitting fixed strings to solve unseen multi-hop mathematical word problems over newly injected domain rules and dynamically synthesize task-specific SQL/Python/Search arguments? We achieve this by pairing In-Weight Premise-Recall with Stem-Release: the compiled dormant neurons emit the latent domain axiom or JSON schema header and immediately place all subsequent generation states into the negative manifold $\mathcal{X}_-$ ($z(x) \le -15.0 \implies \mathrm{fl}_{\mathrm{bf16}}(h + \Delta h) \equiv h$). Control returns seamlessly to the base model's native reasoning and code-generation circuits:

Model Generative / Multi-Hop Calculation Task Unedited Base In-Weight OS v3.0 (Premise-Recall + Stem-Release)
Qwen3-8B Zenith-Nabla Multi-Step Algebra: $(a \nabla b) + c$ (20 unseen $(a,b,c)$ triples) 0.0% (0/20) 85.0% (17/20)
Arkreen-v4 Multi-Epoch Time & BFT Quorum Math (20 unseen word problems) 0.0% (0/20) 100.0% (20/20)
Helios-9 Cluster Fault Capacity Math: $12S - 3F$ (20 unseen word problems) 0.0% (0/20) 95.0% (19/20)
Total Unseen Multi-Hop Numerical Calculation Accuracy (N=60) 0.0% (0/60) 93.3% (56/60)
Dynamic Tool Routing + Unseen Argument Synthesis (N=30) 0.0% (0/30) 100.0% Routing / 90.0% Dynamic Arg Synthesis
Hard Math & CRUXEval Static Code False Triggers (N=80) 0.0% (0/80) 0.0% (0/80)
Meta-Llama-3.1-8B-Instruct Zenith-Nabla Multi-Step Algebra: $(a \nabla b) + c$ (20 unseen triples) 0.0% (0/20) 75.0% (15/20)
Arkreen-v4 Multi-Epoch Time & BFT Quorum Math (20 unseen word problems) 0.0% (0/20) 100.0% (20/20)
Dynamic Tool Routing + Unseen Argument Synthesis (N=30) 0.0% (0/30) 100.0% Routing / 83.3% Dynamic Arg Synthesis
Hard Math & CRUXEval Static Code False Triggers (N=80) 0.0% (0/80) 0.0% (0/80)