WAQS: Weight Absorption for Quadratic Probing and Affine Steering

Ding Zhu, Mohammad Mahdi KhaliliarXiv 2026

TL;DR

WAQS (Weight Absorption for Quadratic Probing and Affine Steering) allows Large Language Models to be steered using input-dependent, "curved" boundaries without any additional inference-time latency. By using a quadratic probe, the authors derive a steering direction that is a simple linear (affine) function of the model's activations, allowing the intervention to be "baked" directly into the model's existing weights.

What Problem Does This Paper Address?

Controlling LLM behavior—like making them more truthful or resistant to "jailbreaks"—usually involves activation steering. Standard methods typically use Linear Steering: they find a single "concept vector" (like a "truthfulness" direction) and add it to the model's internal states. While computationally "free" (it's just one vector addition), it assumes that the boundary between "truthful" and "untruthful" is a flat plane. In reality, these boundaries are often curved.

To fix this, researchers have tried Nonlinear Steering, which uses complex, curved classifiers. However, these require the model to calculate a brand-new steering direction for every single token it generates, which significantly slows down inference. The authors of WAQS sought a "middle ground": a method as expressive as nonlinear steering but as fast as linear steering.

Methods

The core innovation of WAQS is the use of Quadratic Probes. A quadratic function $f(x)$ can represent curved boundaries, but its gradient $\nabla f(x)$ is affine (a linear transformation plus a bias).

  1. Quadratic Probing: They train a probe $f_Q(x) = x^\top W_p x + w_p^\top x + b_p$ to identify a concept.
  2. Affine Steering: The steering direction is the gradient of this probe: $2W_p x + w_p$. Because this is an affine function of the current activation $x$, the steering operation looks like $x_{new} = M_{steer}x + b_{steer}$.
  3. Weight Absorption: Since the steering is just a linear map, it can be mathematically folded (absorbed) into the model's existing weight matrices ($W_{layer}$) offline. Once absorbed, the model runs at its original speed with no custom code or "hooks" required.
Figure 2: Weight absorption folds the steering map Msteer = I + 2αWp and bias bsteer = αwp into the surrounding static weights, for every point a quadratic probe can be attached to within a transformer block. (a) after a linear projection, (b) before a linear projection, and (c) through an RMS-norm/LayerNorm scale. In every case the runtime rule Tα(x) = x + α∇fQ(x) = Msteerx + bsteer is realized entirely offline, at zero inference-time cost.

To make this work for massive models like Llama-3 (where the hidden dimension $D$ is 4096), they use a low-rank parameterization for the quadratic matrix $W_p$. This prevents the number of parameters from exploding from $O(D)$ to $O(D^2)$.

Datasets

The authors evaluated WAQS across several critical alignment tasks:

  • Truthfulness: Evaluated on TruthfulQA using GPT-4o as a judge.
  • Refusal/Safety: Tested against jailbreak attacks like GCG, TAP, and GPTFuzz using datasets like AdvBench, HarmBench, and MaliciousInstruct.
  • Sycophancy & Corrigibility: Used Anthropic’s Advanced AI Risk dataset to see if they could reduce the model's tendency to simply agree with the user.
  • General Utility: Monitored performance on MMLU, GSM8k, and ARC-Challenge to ensure steering didn't "break" the model's basic reasoning abilities.

Key Insights and Ideas

  • The "Sweet Spot" of Mathematics: The authors prove a "Maximality" proposition: quadratic functions are the only smooth functions whose gradients result in an affine steering map. Any higher-order polynomial (like a cubic) would reintroduce the recomputation costs they are trying to avoid.
  • Mahalanobis Pulls: Under a Gaussian assumption, quadratic steering acts as a "difference of Mahalanobis pulls." Instead of just pushing an activation in one direction, it pulls it toward the "truthful" cluster and pushes it away from the "untruthful" cluster, with the force and direction varying based on where the activation currently sits.
  • Dynamic vs. Static: Figure 1 beautifully illustrates why this matters. Linear steering uses the same arrow everywhere. Quadratic steering "bends" the arrows to point toward the heart of the target concept cluster, regardless of the starting point.
Figure 1: Only the quadratic gra- dient adapts to the activation. The quadratic probe’s gradient field varies with position.

Key Results

WAQS consistently outperformed linear baselines while maintaining model utility:

  • Truthfulness: On Llama-2-7B, WAQS achieved a True*Info score of 20.43%, significantly higher than Linear Probing (13.28%) and Difference-in-Means (18.82%).
  • Safety: In refusal tasks, WAQS achieved the lowest Attack Success Rate (ASR) across multiple jailbreak methods (see Table 2), suggesting that curved boundaries are much harder for attackers to bypass than flat ones.
Table 2: Quadratic steering yields the most robust refusal behavior without sacrificing utility. Safety and utility of refusal steering on Llama-2-7B. Steering directions are estimated from harmful and harmless prompts built from AdvBench, MaliciousInstruct, TDC2023, HarmBench, and Alpaca, following Chhabra & Khalili (2025). Quadratic Probe uses a rank-1 probe. Safety is the attack success rate (ASR) under three jailbreak attacks: GCG, TAP, and GPTFuzz. Utility is accuracy on MMLU, GSM8k, and ARC-Challenge.
  • Sycophancy: WAQS was roughly 2.2x stronger at suppressing sycophancy and 6.4x stronger at enhancing positive traits compared to linear steering.
  • Zero Overhead: As shown in Table 6 (in the appendix), the "absorbed" version of WAQS has the exact same token-per-second generation speed as the base model.

Limitations and Future Work

  • Residual Stream Absorption: The authors note that while absorption is easy for linear layers (like Attention or MLP projections), it is "less straightforward" when steering is applied directly to the residual stream. Because the residual stream is an identity path with no weights, you can't "absorb" a transformation there without adding a new matrix multiplication.
  • Rank Selection: While low-rank approximations work well, choosing the optimal rank ($R$) for different concepts remains an empirical process.
  • Multi-Concept Steering: Future work could explore how to absorb multiple quadratic interventions for different behaviors simultaneously without them interfering with each other.

Summary updated

Abstract

Activation steering provides a lightweight alternative to fine-tuning for controlling large language model behavior. Existing methods, however, often face a trade-off between efficiency and expressiveness: fixed steering vectors incur negligible inference overhead but cannot adapt to the current model input, whereas input-dependent nonlinear interventions provide greater flexibility at additional runtime cost. We introduce \textbf{WAQS} (\textbf{W}eight \textbf{A}bsorption for \textbf{Q}uadratic probing and affine \textbf{S}teering), a framework that obtains state-dependent steering, without additional inference-time computation. WAQS models a concept with a quadratic probe, whose gradient yields an affine, activation-dependent steering direction. We show that this affine intervention can be folded exactly into adjacent linear transformations through an offline weight update. Moreover, we prove that quadratic functions form the maximal class of smooth concept scores whose gradient-based interventions are affine and therefore exactly absorbable into linear layers. Under a Gaussian representation model, our formulation admits an interpretation as the difference of class-conditional Mahalanobis pulls and naturally generalizes linear discriminant and difference-in-means steering. To scale to high-dimensional representations, we introduce a low-rank parameterization of the quadratic term. Across truthfulness, refusal, and sycophancy steering tasks, quadratic steering matches or improves upon constant linear steering while preserving model utility, with the absorbed implementation introducing no additional inference-time operations. Our results suggest that quadratic probes provide a practical middle ground between static linear steering and computationally expensive dynamic nonlinear interventions.
BibTeX
@misc{zhu2026waqs,
  author = {Ding Zhu and Mohammad Mahdi Khalili},
  title = {{WAQS: Weight Absorption for Quadratic Probing and Affine Steering}},
  year = {2026},
  eprint = {2610.24367},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.24367},
}
Figure