Riemannian Geometry for Pre-trained Language Model Embeddings

Szczepan Konior, Alexandre Quemy, Przemysław Klocek, Grégoire Cattan, Bartłomiej Sobieski
7/8/2026
cs.CLcs.AI

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

Understanding the geometric structure of pre-trained language model embeddings matters for interpretability and safety. We ask whether sentence-level classification signal lives in the Riemannian geometry of contextual token embeddings, and probe it by extracting per-token pullback metrics from a learned encoder's analytical Jacobian and aggregating them with the Fréchet mean on the symmetric positive definite (SPD) manifold; we call this procedure Riemannian Mean Pooling (RMP). Across three datasets with non-trivial linguistic structure (CoLA, CREAK, RTE), RMP outperforms Euclidean mean pooling, while on FEVER-Symmetric, a benchmark constructed to remove annotation-driven lexical artifacts, the method correctly stays at chance. Ablations show that a randomly initialised encoder combined with Fréchet aggregation already beats Euclidean pooling on two of the three signal-bearing datasets, localising the source of the gain to the geometric aggregation rather than to learned manifold structure; the trained encoder contributes additional signal specifically on CREAK, the most knowledge-heavy of the three signal-bearing datasets.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{konior2026riemannian,
  title  = {Riemannian Geometry for Pre-trained Language Model Embeddings},
  author = {Szczepan Konior and Alexandre Quemy and Przemysław Klocek and Grégoire Cattan and Bartłomiej Sobieski},
  year   = {2026},
  eprint = {2607.07047},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2607.07047v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2607.07047.svg)](https://codeofpaper.com/paper/2607.07047)

Discussion