Skip to content

Single vector or multiple vectors? Clustered optimal transport activation steering under quantizationOne Vector or Many? Clustered Optimal-Transport Steering under Quantization

arXiv: Interpretability· arXiv:2610.40055· Illia MakarovFaculty of Informatics, National University of Kyiv-Mohyla AcademyIndexed by this site · 24 days ago· Originally publishedAlignment

Quick read

Interpretability

Based on the paper PDF (AI-generated); refer to the original

The authors prove that the displacement of clustering optimal-transport steering, averaged with weights by cluster size, is always equal to DiM, and find that the token-level selective map at α=3 leaves 39% (Gemma-2-2B) and 61% (Granite-3.1-2B) less toxicity than DiM.

Questions
Activation steering commonly uses a single-vector DiM, treating all tokens the same. The cluster optimal transport method CHaRS claims to exploit concept heterogeneity, but what it does beyond DiM and whether it remains effective after quantization were previously unclear.
Methods
The authors prove an identity: under any transport plan, the displacement averaged with weights by cluster occupancy is always equal to DiM, and a map can differ from DiM only by having routing weights deviate from cluster size. On this basis they construct a token-level selective map with 32 clusters, narrow routing, and a sharp plan, perform toxicity mitigation on Gemma-2-2B and Granite-3.1-2B, and measure transfer and refitting under INT8/NF4 quantization.
Experiments and results
The CHaRS code default setting shows no statistical difference from mean-pooled DiM, and under the layer-wise protocol it is equivalent to Mean-AcT on all 8 equivalence tests. The selective map at α=3 leaves 39% (Gemma) and 61% (Granite) less toxicity than DiM, is more fluent at matched toxicity, and the advantage holds under INT8/NF4; but the nearly constant no-occupancy map also leaves 14–30% less toxicity.
Limitations and future work
Only two ~2B models and one behavior, toxicity, were tested, with no human evaluation; configurations were selected on the same set of prompts, with no held-out set; the roles of per-token processing and a better global direction were not separated, nor was whether optimal transport itself is necessary verified.
Experimental setupGemma-2-2B、Granite-3.1-2B · Jigsaw toxic-comment data、RealToxicityPrompts · mean toxicity (toxic-bert)、median perplexity et al.
Evaluated models
Gemma-2-2BGranite-3.1-2B
Benchmarks
Jigsaw toxic-comment dataRealToxicityPrompts
Metrics
mean toxicity (toxic-bert)median perplexitydistinct-4input dependenceoffset from DiM
AI summaryThe per-token fitted clustered optimal transport activation steering variant leaves less residual toxicity than single-vector DiM on Gemma-2-2B and Granite-3.1-2B, and the advantage holds under INT8 and NF4 quantization. At steering strength 3 (toxic-bert), this variant leaves 37-39% (Gemma) and 51-61% (Granite) less residual toxicity than DiM. However, a near-constant mapping based on the same clusters also leaves about 30% less residual toxicity than DiM, so the effect of treating tokens differently remains undetermined.

The per-token fitted clustered optimal transport activation steering variant leaves less residual toxicity than single-vector DiM on Gemma-2-2B and Granite-3.1-2B, and the advantage holds under INT8 and NF4 quantization. At steering strength 3 (toxic-bert), this variant leaves 37-39% (Gemma) and 51-61% (Granite) less residual toxicity than DiM. However, a near-constant mapping based on the same clusters also leaves about 30% less residual toxicity than DiM, so the effect of treating tokens differently remains undetermined.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    What cluster optimal transport steering does beyond single-vector DiM, and whether this difference survives under INT8/NF4 quantization.

    Core question: what exactly does clustering optimal-transport activation steering do beyond the single-vector DiM baseline, and does this difference still exist after INT8/NF4 quantization.

    • Setting and motivation: activation steering edits hidden states at inference time without changing weights; the most common form adds the difference of the means of two classes of samples (DiM) to every hidden state. The authors point out that DiM is a strong baseline, but it is a single vector that treats every token the same, and its effect varies with the input.
    • Shortcomings of existing methods (per the paper): CHaRS assumes a concept has multiple ways of being expressed, and uses inter-cluster optimal transport to move different regions differently; but on the toxicity task it compares against Linear-AcT rather than DiM, and its evidence for "different regions" comes from another setting (the last-token representation of harmful instructions).
    • Core observation: DiM itself is the optimal transport map between equal-covariance Gaussians; the authors prove an identity (Proposition 1)—regardless of the plan, the displacement averaged with weights by cluster size is always equal to DiM, so a clustering map can differ from DiM only when the routing weights deviate from cluster size.
    • Paper's contribution: guided by this identity, they construct a token-level selective map that can deviate from DiM, measure toxicity mitigation on Gemma-2-2B and Granite-3.1-2B, and examine the transfer and refitting of the map under quantization.
    • Threat model: this is not an attack/defense paper and has no adversarial threat model; the object of study is the behavior of inference-time steering methods under toxicity mitigation and quantized deployment, and the victim scenario is the risk that the steering map is distorted after the deployed model is quantized (INT8/NF4).
  2. What related research exists?

    Related work falls into four groups: single-vector steering, input-dependent steering, optimal transport steering, and quantization and steering; this paper directly compares CHaRS with DiM and extends to quantization.

    Single-vector steering

    • Turner et al. (2023), Panickssery et al. (2024)—activation addition: adding a fixed vector obtained from contrastive prompt pairs to the residual stream.
    • Li et al. (2023), Zou et al. (2023)—moving attention heads along probe directions or reading and controlling concepts via directions.
    • Wu et al. (2025), Im & Li (2025)—DiM remains a strong baseline on a wide range of benchmarks; Tan et al. (2024), Braun et al. (2025) point out that the effect of a single direction varies with the input, and Venkatesh & Kurapath (2026) point out that a steering vector cannot be uniquely determined by its effect.

    Input-dependent steering

    • Lee et al. (2025)—conditional steering: apply the vector only when a condition is detected.
    • Li et al. (2026)—steering vector fields: the direction itself is a function of the hidden state.
    • Pham et al. (2026), Abdullaev et al. (2026a), Nguyen et al. (2026), Skifstad et al. (2026)—go beyond fixed vectors using random projections, kernel methods, and control theory, respectively.

    Optimal-transport steering

    • Rodriguez et al. (2025)—Activation Transport (AcT): per-coordinate transport, Linear-AcT performs affine shift and scaling, and its simplest case Mean-AcT is equivalent to adding DiM at each layer.
    • Dalili et al. (2026)—Riemannian activation steering using conditional optimal bridges.
    • Abdullaev et al. (2026b)—CHaRS, the object of study in this paper: solves entropy-regularized optimal transport (Sinkhorn) between cluster centroids, obtains a map via barycentric projection, and routes hidden states with a Gaussian kernel; the paper points out that it is not compared with DiM on the toxicity task.

    Quantization and steering

    • Dettmers et al. (2022, 2023) et al.—INT8/NF4 quantization preserves most benchmark accuracy; Kadadekar (2026) points out that safety behaviors such as refusal may still change when quality is preserved.
    • Chhabra & Khalili (2025)—the refusal direction is nearly collinear under 8-bit quantization.
    • Bhandari & Wade (2026)—re-extract DiM-style vectors per precision on four 7–9B models, equivalent (iso-effect) under INT8, inconclusive under NF4; they leave transfer of full-precision vectors as future work.

    Baselines and benchmarks: the baselines in this paper are DiM under each pooling method (k=1 map) and Mean-AcT and Linear-AcT in the layer-wise protocol; the data are Jigsaw toxic comments (fitting) and RealToxicityPrompts (evaluation). The authors' positioning: directly compare clustering maps such as CHaRS with DiM, and extend Bhandari & Wade's quantization study to clustering maps and full-precision transfer.

  3. How does the paper address this problem?

    First prove the identity that "the occupancy-weighted average of displacements always equals DiM", then use it to construct a selective map that can deviate from DiM, and then measure on toxicity tasks and under quantization settings.

    Overall approach: formalize the CHaRS-style cluster-entropy optimal transport map as a five-parameter family, prove that within this family the plan does not enter the occupancy-weighted average (Proposition 1), and that the map differs from DiM only when routing weights deviate from cluster sizes; based on this, select a selective map that can deviate, compare it with DiM on toxicity mitigation under two criteria, equal strength and equal toxicity, and measure transfer and refitting under INT8/NF4 quantization.

    Map family and formalization

    • Fitting data are activations of two groups of texts, toxic (source) and non-toxic (target), with three pooling methods: text mean, token-level (at most 16 content tokens per text), and last token; ∆ = mT − mS is the mean difference.
    • Three-step construction: k-means splits each group into k clusters; solve entropy-regularized optimal transport with squared distance as cost to obtain the plan πε = argminπ∈Π(p,q) ⟨ π, C⟩ − ε H(π), where ε = c·median(C); each source cluster gets a displacement Di = bi − µi, where bi is its barycenter target.
    • At generation, hidden state x is replaced by x + α·d(x), with push d(x) = ∑i wi(x) Di, routing weights from a Gaussian kernel with relative bandwidth σ, and optional occupancy weighting (multiply by cluster occupancy pi then renormalize).

    Core identity and the role of routing

    • Proposition 1: for any coupling π, the occupancy-weighted average of displacements satisfies Σ pi·Di = ∆; the plan only determines how displacements are distributed around that mean (Figure 1).
    • Corollary 2: d(x) − ∆ = Σ (wi(x) − pi)·Di; if each token's routing weight equals occupancy, the map is DiM, regardless of the plan.
    • Lemma 1: bandwidth determines kernel selectivity—at σ=1 the weight ratio between nearby clusters is at most e≈2.7, at σ=0.1 it can reach e^10≈22,000, so only narrow routing can distinguish tokens.

    Three representative configurations (Table 1)

    • CHaRS code default: mean pooling, k=4, c=1, σ=1, occupancy weighting on (taken from the released CHaRS code; the paper does not state the toxicity experiment setting).
    • Selective map: token-level, k=32, c=0.01 (sharp plan), σ=0.1 (narrow routing), occupancy weighting on; the push varies with token, but the authors note this does not mean toxic tokens are pushed harder.
    • Occupancy-free map: k=32, c=0.01, σ=10, occupancy weighting off, approximating a single global vector, as a control.

    Evaluation method

    • Single-layer steering (half-depth layer: Gemma layer 13, Granite layer 20), greedy decoding up to 50 tokens, strength α∈{0.5,1,2,3}, with DiM additionally run at 4–6 to match toxicity.
    • Metrics: toxic-bert mean toxicity, Qwen2.5-1.5B median perplexity, distinct-4 repetition; independent evaluation also uses offensive, ToxiGen classifiers, and the commercial model JEV.
    • Statistics: paired comparison by prompt, Holm correction; iso-effect comparison interpolates DiM's quality–log toxicity curve to the toxicity reached by the map; equivalence uses TOST, with the 90% interval falling within preset bounds (toxicity ±10%, perplexity ±2%).
    • Quantization: bitsandbytes INT8 (LLM.int8()) and NF4; the map is either transferred (full-precision fit used directly) or refitted (refit on quantized model activations, with ε frozen).
  4. What experiments did the paper conduct?

    At α=3, the selective map leaves 39% (Gemma)/61% (Granite) less toxicity than DiM and this holds under quantization; the CHaRS default setting shows no difference from DiM.

    Experimental setup

    • Models tested: Gemma-2-2B (26 layers, base) and Granite-3.1-2B (40 layers, base), in bfloat16 full precision and INT8 and NF4 quantized versions.
    • Data: fitting used 2,000 toxic + 2,000 non-toxic comments from the Jigsaw training set (truncated to 128 tokens); evaluation used 3,000 toxic prompts (prompt toxicity ≥0.5) and 3,000 clean prompts (<0.5) from RealToxicityPrompts.
    • Baselines: DiM corresponding to each pooling method (k=1); in the layer-wise protocol, Mean-AcT and Linear-AcT.
    • Metrics and judges: main metric is toxic-bert mean toxicity; fluency is Qwen2.5-1.5B median perplexity; repetition is distinct-4; independent judges are the offensive (twitter-roberta-base-offensive) and ToxiGen (toxigen_roberta) classifiers and the commercial model JEV.
    • Statistics: 3,000 prompts paired; Holm correction (main family 54 tests); iso-toxicity comparisons use 95% intervals from 2,000 bootstrap resamples (uncorrected); equivalence tests use preset ±10% (toxicity)/±2% (perplexity) bounds, specified in advance but not registered.
    • Geometric measurements: input dependence and displacement are measured on the hidden states of 4,000 prompt tokens (set Q), without generating text.

    Main results

    According to Table 2 (main layer, toxic prompts, ratio of map minus DiM to the DiM value; toxicity is iso-strength, perplexity is iso-toxicity; negative values favor the map):

    Swipe horizontally to read the table

    MapαGemma toxicityGemma perplexityGranite toxicityGranite perplexity
    CHaRS code default3+2%−1.4%+1%−0.3%
    selective, c=0.012−16%−3.4%−29%−7.2%
    selective, c=0.013−39%−7.2%−61%−12.5%
    selective, c=0.13−36%−6.5%−62%−9.8%
    selective, k=43−31%−2.9%−18%+1.9%
    no occupancy, c=0.013−30%−2.0%−29%−7.5%
    • The authors state that the CHaRS code default and mean-pooled DiM show no statistical difference at strengths 1–3 (Holm p=1), and the 95% interval excludes a difference exceeding about 10% of the DiM residual toxicity; at α=2 the two generate exactly the same continuations for 54% (Gemma) and 46% (Granite) of prompts.
    • The authors report that the selective map's toxicity advantage holds after Holm correction in 27 of 28 checks (across layers, seeds, quantization), the exception being Gemma at quarter depth with α=3; at iso-strength it has higher perplexity (Granite α=3 is 17% higher), but at iso-toxicity it is more fluent.
    • The no-occupancy map (approximately a single vector) also leaves 14–30% less toxicity, so the authors consider that the role of "treating tokens differently" has not been isolated.

    Equivalence of the layer-wise protocol

    • Running the layer-wise protocol with the CHaRS authors' code (52 hooks for Gemma, 40 for Granite), λ∈{0.5,1}; CHaRS and Mean-AcT are judged equivalent on all 8 equivalence tests (two models × two strengths × toxicity/perplexity) (Table 3, e.g., Gemma λ=1 toxicity difference −0.8% [−5.6, +3.9]).
    • The authors state they did not reproduce the 21% advantage over Linear-AcT reported in the CHaRS paper (Gemma-2-2B), nor did they test its larger advantage on Llama3-8B and Qwen2.5-7B.

    Strong regularization breaks the selective map

    • At c=1 (the value in the CHaRS code), the selective map degrades from α=2 and destroys text at α=3: distinct-4 drops from about 0.9 for DiM to 0.53 (Gemma) and 0.63 (Granite) (Figure 6).
    • The distinct-4 of c=0.1 and c=0.01 differ by at most 0.010, from which the authors judge that text breaks down somewhere between c=0.1 and c=1; perplexity does not reflect this (for Gemma at c=1 median perplexity drops from 7.0 to 6.5 while the text is worse).

    Quantization experiments

    • Model level: NF4 raises the toxicity of the unsteered model by 12% (Granite, holds after Holm correction) and 8% (Gemma, holds only before correction); INT8 has no statistical effect on toxicity or repetition.
    • Map level: under occupancy weighting, NF4 moves the mean push by 11–13%, within 2% of the movement magnitude of DiM; INT8 only 2–3%; without occupancy weighting, merely changing the k-means seed moves it by 12–29%, and the NF4 displacement cannot be distinguished from this noise (Figure 7).
    • Steering level: at α=3 the selective map under INT8/NF4 still removes 88–92% of the unsteered model's toxicity, and its advantage over DiM holds (Gemma 29–46%, Granite 56–60%, Table 12); on NF4, transfer instead of refitting shows no toxicity increase in any of 24 comparisons that holds after Holm correction, and the 95% interval bounds extra toxicity to at most 14% of the DiM residual; the no-occupancy map is the exception, with its refitted version showing higher toxicity in 4 of 6 comparisons.

    Other ablations and analyses

    • Bandwidth is the main lever for input dependence: shrinking σ from 10 to 0.1 increases it 71–90 times; k, c, occupancy weighting, and pooling change it only 1.1–4 times (Figure 3).
    • Under other judges (Table 4): on Granite the selective map wins all 18 comparisons; on Gemma only the offensive classifier confirms the advantage at α=3, and ToxiGen has the same sign but does not hold.
    • Word-class analysis: the selective map's push on function words and punctuation is 11–17% less along the ∆ component, 1–6% more on toxicity-marker words, plus an orthogonal component of 0.3–0.4‖∆‖ (Figure 10).
    • Per prompt: at α=2 the selective map lowers toxicity by more than 0.05 for 5.9% (Gemma)/10.2% (Granite) of prompts, and raises it by more than 0.05 for 4.5%/7.0% (Figure 11).
    • Last-token map: at α=3 the selective last-token map leaves 38–52% (Gemma) less toxicity than last-token DiM, but on Granite it has higher repetition at iso-toxicity (Table 10).
  5. What are some points that can be further explored?

    The authors list limitations including scope, selection bias, evaluation, and unseparated mechanisms; experiments cover only two 2B models and one behavior, toxicity.

    Limitations and future directions noted by the authors

    • Scope (Section 7): only two ~2B models and one behavior, toxicity; CHaRS's richest results are on jailbreak tasks, which this paper does not test, and conclusions about its code default settings may not transfer to that task.
    • Decoding and benchmark criteria (Section 7): continuations are all greedy and at most 50 tokens, whereas RealToxicityPrompts is usually evaluated with sampling, so toxicity numbers cannot be directly compared with published results; greedy continuations often loop and repeat, and part of the toxicity reduction may come from breaking toxic loops.
    • Quantization coverage (Section 7): only bitsandbytes INT8 and NF4 were tested, not fewer bits or other methods; among token-level selective maps, only the one with k=32, c=0.01 was run on quantized models.
    • Selection bias (Section 7): configurations were chosen from Section 5.1 measurements and pilot runs, sharing the same 3,000 prompts as evaluation, with no held-out prompt set; confidence intervals cover only prompt sampling, not fitting randomness.
    • Evaluation and quality (Section 7): both the map and toxic-bert are based on Jigsaw data, so it may only learn to remove what that classifier measures; on Gemma the advantage is weaker under ToxiGen and may rely mainly on profanity and slurs; fluency, repetition, and relevance are only indirect metrics, with no human evaluation.
    • Untested mechanistic questions (Section 7): the components of the push were not ablated; other cluster pairings (nearest cluster, random plan), a single vector equal to the selective map's average push, or per-cluster DiM were not tried, so it cannot be asserted that optimal transport itself is necessary; the selective map and the occupancy-free map differ simultaneously in bandwidth and occupancy weighting, and their effects were not separated.
    • Layer-wise protocol (Section 7): each method was fitted only once, and equivalence tests do not cover differences between fits; Granite's hook location is the authors' own choice; on Gemma the perplexity increase from layer-wise steering is 3–17 times the published value, for untested reasons.

    Experimental coverage

    • The models tested are Gemma-2-2B and Granite-3.1-2B, 2 in total (base versions), and the only behavior is toxicity mitigation.
    • Evaluation scale is 3,000 prompts per slice, greedy up to 50 tokens; fitting data is 2,000+2,000 Jigsaw comments.
    • Evaluation includes toxic-bert (primary), offensive, ToxiGen classifiers, and JEV; the paper does not report agreement between evaluators and human judgment (no human evaluation).
    • Robustness covers two additional k-means seeds, quarter and three-quarter depth layers, INT8/NF4 transfer and NF4 refitting; the paper does not report refitting noise of the selective map under quantization.
    • The equivalence test bounds (±10%/±2%) were specified in advance in the experimental notes but not externally registered.
  6. Summarize the main content of the paper

    The plan of cluster optimal transport steering does not enter the occupancy-weighted average; the CHaRS default setting is equivalent to DiM, while the sharp-plan selective map is stronger and robust to quantization.

    An analysis paper on activation steering: the authors study what a CHaRS-style cluster-entropy optimal transport map does beyond a single-vector DiM baseline, and whether that difference survives under INT8/NF4 quantization.

    • Problem: DiM treats every token the same; CHaRS assumes concepts are heterogeneous and uses inter-cluster transport to treat different regions differently, but it had never been directly compared with DiM on toxicity tasks.
    • Method highlights: The authors prove Proposition 1—under any transport plan, the occupancy-weighted average of cluster displacements is always equal to DiM, so the map can differ from DiM only through routing weights deviating from cluster sizes; based on this they construct a token-level selective map with 32 clusters, narrow routing (σ=0.1), and a sharp plan (c=0.01), and compare it with DiM under two criteria: equal strength and equal toxicity.
    • Result one: Under the CHaRS code default settings (mean pooling, k=4, σ=1), routing weights barely deviate from occupancy, and the average push differs from ∆ by 0.7–2.7%; single-layer and mean-pooled DiM show no statistical difference, and under the layer-wise protocol it is equivalent to Mean-AcT on all 8 preset equivalence tests.
    • Result two: At α=3, the selective map leaves 39% (Gemma-2-2B) and 61% (Granite-3.1-2B) less toxicity than DiM, and at equal toxicity perplexity is 7.2% and 12.5% lower; however, an occupancy-free map approximating a single vector also leaves 14–30% less, and the authors consider the effect of per-token processing not separated.
    • Result three: The advantage holds under INT8/NF4 (removing 88–92% of the unsteered model's toxicity); on NF4, transferring the full-precision map instead of refitting, the extra toxicity does not hold after correction, with the 95% interval upper bound at 14% of DiM's residual; NF4 itself raises the unsteered model's toxicity (12% on Granite).
    • Authors' conclusion: Under the CHaRS code default settings the answer is "one vector"; beyond the default settings, whether multiple vectors help (relative to a better single direction or other cluster pairings) remains open; the authors recommend re-checking model toxicity after quantization.
Read originalarxiv.org