Riemannian Geometry for Pre-trained Language Model Embeddings

· Source: cs.CL updates on arXiv.org · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Natural Language Processing · Depth: Expert, extended

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

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

Topics

Code references

Best for: AI Scientist, NLP Engineer, Machine Learning Engineer

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by cs.CL updates on arXiv.org.