Introduction: The Geometry of Language
In recent years, AI researchers have increasingly utilized "curved" geometries—such as hyperbolic spaces—to model the hierarchical and compositional nature of language. However, curvature has almost exclusively been treated as an architectural prior (an engineering choice) rather than an intrinsic property (a measurable characteristic of the text itself). While well-developed notions of discrete curvature exist for graphs (e.g., Ollivier-Ricci curvature), no such formalism has existed for raw text.
This paper bridges that foundational gap by introducing Texture, the first "text-native" discrete curvature signal. By treating curvature as a measurable property of two-sided inference, the authors demonstrate how to detect, define, and utilize the natural shape of language, yielding significant improvements in large language model (LLM) prompt compression and retrieval-augmented generation (RAG) without requiring any additional geometric training.
Defining Texture: A Text-Native Curvature Signal
The core premise of Texture is that curvature is a property of two-sided inference. If you imagine a blank slot in a sentence, both the preceding words (prefix) and the succeeding words (suffix) provide evidence for what belongs in that slot.
Before defining a metric, the authors first proved that natural text is inherently "non-flat" using two existence certificates:
- Holonomy: Verifying if the order in which context is added changes the final semantic belief.
- Product-of-Experts: Checking if prefix and suffix evidence combine linearly.
Natural text systematically violates these "flatness" nulls compared to shuffled or swapped control texts.
Building on this, the authors define curvature ($\kappa$) at a specific slot by measuring how the "reconciliation" between prefix and suffix changes as the surrounding context expands. This is quantified using a debiased Schrödinger/Sinkhorn transport divergence to measure semantic "motion" between belief distributions extracted from a frozen masked language model (like DistilRoBERTa).
This yields two distinct curvature states:
- Positive Curvature (Focus): Adding context from one side makes the other side's evidence more certain, causing the meaning to "contract" into a single basin.
- Negative Curvature (Fan-out): Adding context expands the possibilities into competing continuations, causing the meaning to "branch."
Key Insights
- Curvature is not Surprisal: A common misconception is equating high curvature with a "surprising" or rare word. The authors demonstrate that Texture is only weakly correlated with token self-information. Curvature is a second-order interaction—it measures how left and right evidence interact, not just the rarity of a single token.
- Actionable Geometry Without Training: You do not need to train a specialized "Hyperbolic LLM" to leverage curvature. A small, frozen "belief oracle" (e.g., an 82M parameter DistilRoBERTa) can generate a curvature map to guide how a massive black-box LLM (like Llama-3) processes its context.
- The "Bridge" Structure: Curvature is particularly high in "bridge" regions—text segments that connect disparate ideas. In multi-hop reasoning, these tokens are critical, and Texture identifies them automatically.
Practical Applications: Compression and RAG
To demonstrate utility, the authors implemented two plug-in tools tested on the LongBench suite (including HotpotQA, 2WikiMultiHopQA, Qasper, QMSum, and GovReport):
- CURVPRUNE (Prompt Compression): Uses curvature to identify and retain the most structurally important tokens in long contexts.
- CURVFLAG (RAG Routing): Uses curvature signals to route queries efficiently in Retrieval-Augmented Generation systems.
Key Results:
* Massive Gains in Multi-hop Reasoning: On HotpotQA, adding Texture to a standard BM25 retriever improved performance by +65% relative F1.
* Efficiency: The CurvFlag system achieved higher accuracy than strong adaptive baselines (like Self-Route) while consuming ~2x fewer tokens.
* Portability: The curvature signal is generator-agnostic. Curvature measured by a small RoBERTa model successfully enhanced the performance of Llama-3, Mistral, and Qwen models.
Limitations and Future Work
While Texture establishes a new paradigm, it has limitations. The absolute magnitude of the curvature depends on the specific "belief oracle" used, even though the sign (focus vs. fan-out) remains stable. Additionally, measuring curvature requires multiple forward passes of a masked language model, introducing computational overhead—though sparse sampling and caching can mitigate this.
Future research directions include exploring "heat-kernel limits" to develop a continuous Ricci curvature for language, and transitioning Texture from a control signal for selecting text to one that actively guides the generation process itself.
Summary updated