Every transformer layer uses RMSNorm, which constrains hidden states near a sphere of radius
The LM head gives every token a direction on that sphere. A single tangent step reaches 91β98% of them at rank 1, and never lowers any token's rank.
Hidden state h
β
βΌ
g_t = W_t β (W_tΒ·Δ₯)Δ₯ β tangent toward token t
β
βΌ
h' β normalize on sphere
β
βΌ
logits β 91β98% chance t ranks #1
Why this matters: with weight access, generation can be biased toward any token direction β no training, no data, no retraining.
Some tokens are self-reinforcing: feeding them to the model induces indefinite repetition.
| Token | Triggers a loop of... | Real-world example |
|---|---|---|
0 (digit) |
||
000000... |
||
Phone number 000-000-0000 |
||
| NULL byte | \x00\x00\x00... |
|
| Invisible page footer | ||
cut |
||
cut cut cut... |
||
| Repeated delimiter | ||
ere |
||
ereereere... |
||
| Common substring |
Defensive encoding: put a pit trigger at the end of a page and a scraper that terminates on it falls into a repetition loop. Invisible to humans (NULL bytes), it degrades automated scraping without affecting human readers.
| Measurement | Result |
|---|---|
| Tokens reachable at rank 1 | 91β98% across 4 model families |
| Rank improvement guaranteed | 100% (never lowers) |
| Cow tipping permanence | 15/15 steps locked |
| Defensive encodings verified | 3 (NULL, cut, phone) |
| Edge of chaos clustering | 13 architectures mapped |
.
βββ paper/
β βββ paper_steer.pdf # compiled 5-page preprint
β βββ paper_steer.tex # LaTeX source (compiles with pdflatex)
β βββ steeronasphere.png # the cow
βββ pit_engine.py # β
reverse-engineer pits + defensive encoding
βββ steer_sphere_proof.py # sphere steering reproduction
βββ sphere_test_suite.py # batch geometry verification
βββ safety_toolkit.py # Ξ» diagnostics + steer-away
βββ requirements.txt # pip dependencies
βββ CITATION.cff # machine-readable citation
βββ LICENSE # CC BY 4.0
Reverse-engineers self-consistent tokens ("pits") from model weights and encodes them into data.
python pit_engine.py --model Qwen/Qwen2.5-7B-Instruct --scan
python pit_engine.py --model Qwen/Qwen2.5-7B-Instruct --encode data.txt
PitReverseEngineer
β scans the vocabulary, computess(T) = softmax(WΒ·h_T)[T]
, tests 15-step permanence, finds minimal triggers.PitEncoder
β frames data chunks with pit triggers so any truncation boundary falls into a fixed-point loop.
Reproduces the tangent traversal: computes g_t = W_t β (W_tΒ·Δ₯)Δ₯
, steps, renormalizes, and hooks the hidden state to steer the first generated token. Produces the GSM8K results.
Batch-checks the sphere geometry across cached models: per-layer norms (Proof 1), attention contraction (Proof 2), Lyapunov Ξ» (Proof 3), and steering (Proof 5).
Geometric safety tools: Lyapunov health check, fine-tuning monitor, sphere steer-away, and per-zone stability report.
π paper/paper_steer.pdf β full preprint π
paper/paper_steer.tex
Cite as:
Trillard, N. (2026).
Steer on a Sphere: Geometric Control of Transformer Outputs. Zenodo.[10.5281/zenodo.21954871]
Preprint. The geometric picture is approximate, not a theorem. Steering is a white-box traversal primitive. CC BY 4.0.