Riemannian Geometry for Pre-trained Language Model Embeddings
Summary
A new method, Riemannian Mean Pooling (RMP), investigates whether sentence-level classification signals reside in the Riemannian geometry of contextual token embeddings. RMP extracts per-token pullback metrics from a learned encoder's analytical Jacobian and aggregates them using the Fréchet mean on the symmetric positive definite (SPD) manifold. Evaluated across CoLA, CREAK, and RTE datasets, RMP consistently outperformed Euclidean mean pooling, achieving 0.778 AUC on CoLA, 0.703 AUC on CREAK, and 0.635 AUC on RTE. On FEVER-Symmetric, a negative control dataset, RMP correctly performed at chance (0.508 AUC). Ablation studies revealed that the geometric aggregation, rather than the trained encoder, is the primary source of performance gains on CoLA and RTE, with the trained encoder contributing additional signal specifically on the knowledge-heavy CREAK dataset.
Key takeaway
For NLP Engineers developing sentence representation models, this research suggests that incorporating Riemannian geometry can significantly enhance classification performance beyond traditional Euclidean pooling. You should consider implementing Riemannian Mean Pooling (RMP) to leverage the local geometric structure of token embeddings, especially for tasks requiring nuanced linguistic understanding. This approach offers a robust alternative to standard aggregation methods, even with randomly initialized encoders, indicating a fundamental improvement in how sentence-level signals are captured.
Key insights
Riemannian aggregation of token embeddings improves sentence-level classification by capturing local geometric structure.
Principles
- Geometric aggregation can outperform Euclidean pooling.
- Local manifold-like structure carries classification signal.
- Encoder training is less critical than geometric aggregation for some tasks.
Method
Riemannian Mean Pooling (RMP) extracts per-token pullback metrics via an encoder's Jacobian, aggregates them using the Fréchet mean on the SPD manifold, and classifies in the tangent space.
In practice
- Use RMP for improved sentence-level classification.
- Apply Fréchet mean for geometric aggregation on SPD manifolds.
Topics
- Riemannian Geometry
- Language Model Embeddings
- Sentence Representation
- Fréchet Mean
- Pullback Metrics
- NLP Classification
Code references
Best for: AI Scientist, NLP Engineer, Machine Learning Engineer
Related on AIssential
See Counsel's argued verdicts on the open AI decisions leaders are weighing →
Editorial summary, takeaway, and curation by AIssential. Original article published by cs.CL updates on arXiv.org.