Transparent Language Models via Learned Pseudo-Riemannian Metrics
We replace standard dot-product attention with a pseudo-Riemannian metric distance — a signed, input-dependent weighted squared distance over a shared embedding space. Unlike standard attention, where rotational invariance renders per-dimension analysis meaningless, the shared center space makes each metric dimension independently readable.Training a 152M-parameter model on 3B tokens of FineWeb-Edu at a cost of 3.5% perplexity, we find that the metric structures the entire model. In attention, the metric tensor spontaneously organizes a processing hierarchy from token classification through positional encoding to a multi-dimensional genre manifold. In the MLP, tracing the bigram "the light" through the final layer reveals two distinct computations at adjacent positions: sign-changing semantic disambiguation on the content word, and magnitude-varying predictive loading on the function word. Both attention and MLP internals are readable directly from the model's own values, without probing classifiers or sparse autoencoders.
Authors
- Richard Smith
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-03-23
- DOI
- https://doi.org/10.5281/zenodo.19198031
- Primary Topic
- Face recognition and analysis
- Type
- article
- Field-Weighted Citation Impact
- 0.00