Controllable generation requires language models to realize output characteristics such as reading level, politeness, and toxicity. Existing steering methods are often indirect, require access to internal activations, or depend on auxiliary trained models. We propose SWAI, a training-free inference-time method that addresses these limitations by steering directly in logit space using corpus-derived token statistics. SWAI computes z-normalized one-vs-rest log-odds scores from labeled corpora and biases high-scoring tokens only within the model's top-K candidate set, allowing control to favor target-characteristic tokens while preserving contextually plausible choices. Across readability, politeness, and toxicity control, SWAI consistently improves over prompt-based and prior logit-level baselines without modifying model parameters, accessing internal layers, or training an auxiliary model. Selectivity and lookup-table ablations show that the gains come from target-specific statistical scores rather than generic logit perturbation. These results indicate that effective steering does not require learned controllers when the logit intervention is guided by target-specific statistics under high-probability candidates.
Figures & tables
Figure 1: Overview of SWAI . It first derives token-level statistical scores from labeled corpora via smoothed one-vs-rest log-odds with variance normalization. During decoding, intervention is confined to a top- K candidate set, where a fixed logit offset is applied to the highest-scoring tokens before sampling from the modified distribution.
Model
Method
Acc
F1
Precision
Recall
Perplexity
κ
MCC
OSE (Rewriting)
Llama3.1 8B
Prompting
37.11%
0.363
36.20%
36.48%
11.99
0.052
0.052
GeDi
38.96%
0.392
41.14%
39.16%
11.88
0.091
0.093
DExperts
35.06%
0.173
33.33%
11.69%
13.12
0.000
0.000
SWAI (ours)
84.53%
0.845
84.53%
84.53%
8.88
0.768
0.768
Llama3.2 1B
Prompting
28.87%
0.289
29.36%
28.99%
13.49
-0.063
-0.064
Table 1: Main results on OSE and WikiPol datasets. Across both datasets, SWAI consistently outperforms prompt-based baselines.
Figure 2: Class-wise Accuracy on OSE and WikiPol datasets. Reference denotes the Judge LLM performance on the original data before logit steering.
Method
Acc.
F1
Prec.
Recall
Prompting
50.25%
0.010
100.00%
0.50%
GeDi
52.56%
0.461
54.92%
52.56%
DExperts
76.92%
0.585
72.22%
58.28%
SWAI (ours)
78.33%
0.552
97.56%
38.46%
Table 2: Results on the RealTox dataset. Performance is reported for prompt-based toxicity control and SWAI .
Figure 3: Effect of the steering bias δ on OSE (Llama3.1 8B). Accuracy and F1 (×100) peak at δ=1.5 , showing a clear trade-off between steering strength and generation quality.
Figure 4: Distinctive-token share of each class in generated text, as a function of set size N . Across all N , SWAI raises the target-class share (Target) above Baseline while pushing the others (Off-target) below it.
Figure 5: Lookup-table ablation on OSE and WikiPol . Each cell reports per-class one-vs-rest accuracy. Random shuffles the score values across token IDs, preserving the score distribution while breaking the token-to-score mapping; Flipped steers with another class’s table and is run on one class pair per dataset ( OSE : E and A; WIKIPOL : I and P), so the remaining class is left blank.
Dataset
zr(v)<0
zr(v)=0
zr(v)>0
OSE
0.1–2.4%
14.3–19.4%
79.8–85.0%
WikiPol
1.1–2.2%
28.3–36.1%
62.8–70.6%
RealTox
0–7.0%
12.6–17.9%
80.4–82.1%
Table 3: Distribution of statistical score signs among favored tokens across datasets. Ranges are taken across target classes.
Judge
Acc.
F1
Prec.
Recall
κ
MCC
GPT-4o
84.53%
0.845
84.53%
84.53%
0.768
0.768
Gemini 3.5 Flash
85.19%
0.852
85.19%
85.19%
0.778
0.779
Table 4: Cross-LLM evaluation on OSE. Both judge models yield highly comparable performance on SWAI -generated text.
Elementary
Intermediate
Advanced
Annotator 1
88.24
76.47
76.47
Annotator 2
76.47
52.94
70.59
Annotator 3
70.59
58.82
70.59
Overall
78.43
62.75
72.55
Table 5: Human evaluation accuracy (%) for SWAI -generated text across the three reading levels in OSE.
Appendix figures & tables6 assets
Supplementary material from the paper’s appendix.
Appendix
Model
Level
Accuracy
F1
Precision
Recall
κ
MCC
Llama3.1 8B
Ele
88.93%
0.834
83.40%
83.40%
0.672
0.672
Int
78.93%
0.684
68.40%
68.40%
Adv
88.40%
0.826
82.60%
82.60%
Total
78.13%
0.781
78.13%
78.13%
Llama3.2 1B
Ele
85.56%
0.783
78.52%
78.00%
0.553
0.553
Int
72.00%
0.583
57.89%
58.67%
Appendix
Table 6: Results of open-ended generation on OSE . The model freely continues the input text and the generated outputs are evaluated for reading difficulty using the Judge LLM.
Figure 6: Per-condition selectivity. Change in each class’s distinctive-token share relative to Baseline ( Δ , top- N =500). Steered rows show positive on-diagonal and negative off-diagonal entries, whereas prompt-only rows are near zero.
Rank
T
NT
Rank
T
NT
1
·you (39.69)
·· (38.40)
26
·idiot (16.86)
·state (9.87)
2
·shit (34.99)
·the (28.48)
27
·breasts (16.22)
200 (9.86)
3
·“ (34.68)
. (22.60)
28
·raped (16.02)
3 (9.48)
4
·sex (31.20)
·in (22.14)
29
·rape (15.89)
·season (9.38)
5
·stupid (30.47)
201 (18.74)
30
·suck (15.72)
9 (9.32)
6
·her (29.19)
·its (14.47)
31
·crap (15.63)
.S (9.26)
Appendix
Table 7: Top-50 tokens by statistical score for RealTox . T : toxic; NT : non-toxic. The leading dot (·) marks a token-internal word boundary. Scores are z-normalized one-vs-rest log-odds.
Rank
P
I
N
Rank
P
I
N
1
Thanks (11.89)
·why (10.07)
·< (5.08)
26
·happy (3.64)
And (3.50)
·one (2.38)
2
·help (10.29)
·Why (8.59)
url (4.71)
27
. (3.59)
How (3.48)
·Do (2.36)
3
·for (9.31)
’t (7.29)
·has (4.21)
28
·OK (3.57)
·exactly (3.45)
·( (2.35)
4
·please (8.69)
Why (7.11)
>, (3.91)
29
·By (3.52)
·all (3.45)
·where (2.34)
5
·you (8.20)
·not (6.09)
> (3.59)
30
·good (3.51)
·off (3.42)
I (2.30)
6
·Would (7.53)
·And (5.52)
·changed (3.49)
31
·me (3.51)
·" (3.40)
·official (2.28)
Appendix
Table 8: Top-50 tokens by statistical score for WikiPol . P : polite; I : impolite; N : neutral. The leading dot (·) marks a token-internal word boundary.
Rank
E
I
A
Rank
E
I
A
1
·people (13.74)
·However (3.02)
·being (6.86)
26
·It (4.77)
·due (1.60)
·across (3.34)
2
. (12.93)
m (2.87)
·as (6.65)
27
·good (4.75)
·celebrate (1.58)
·set (3.28)
3
·very (8.46)
bn (2.62)
·by (6.12)
28
·started (4.70)
·confidential (1.58)
·having (3.26)
4
·they (8.36)
·mainly (2.11)
·out (5.76)
29
·big (4.69)
·been (1.57)
·to (3.25)
5
·million (7.96)
·charge (1.98)
, (5.60)
30
·give (4.60)
·chosen (1.55)
·those (3.24)
6
·says (7.60)
·had (1.96)
ed (5.44)
31
·lot (4.56)
·corner (1.54)
·into (3.15)
Appendix
Table 9: Top-50 tokens by statistical score for Ose . E : elementary; I : intermediate; A : advanced. The leading dot (·) marks a token-internal word boundary.
Figure 7: Qualitative promoted-token examples for OSE on the shared topic of ‘Amazon’. Dark highlights indicate tokens promoted by the logit bias; light highlights indicate biased tokens that were already top-ranked before intervention.