Skip to content

On the Expressive Power of Transformers for Contextual Relations

Mar 2026 · 1 citation · 20 references
Mathematics Computer Science

TL;DR

This work develops a mathematical framework based on probability and optimal transport that provides a mathematical characterization of the expressive power of Transformers for contextual relations and shows how the choice of normalization determines the probabilistic structure of the relations represented by attention.

Abstract

Transformers have revolutionized machine learning by making attention a central mechanism for modeling interactions within a context. Despite the central role of attention, the theoretical capabilities of Transformers for representing contextual relations remain unclear. In this work, we address this question by developing a mathematical framework based on probability and optimal transport. We view a text as a distribution of its representations and attention as a probabilistic relation between them. This perspective reveals a connection between attention normalization and optimal transport: standard softmax normalization produces conditional relations, while Sinkhorn normalization produces joint relations with prescribed marginals. Thus, both mechanisms provide structured probabilistic relations from attention scores. Under mild conditions, we establish universal approximation results for both settings. We show that Transformer architectures with Sinkhorn normalization can approximate arbitrary contextual relations represented as joint probabilities, while standard softmax Transformers can approximate arbitrary contextual relations represented as conditional probabilities. These results provide a mathematical characterization of the expressive power of Transformers for contextual relations and show how the choice of normalization determines the probabilistic structure of the relations represented by attention.

View source

Similar papers

The Geometry of Logic: Stratification Induces Semantic Structure and Robust Reasoning

STRAT is introduced, which partitions the residual stream into orthogonal Data and Type subspaces and uses Type-based attention and gating to govern Data transformations and in arithmetic, STRAT reduces median OOD error 35-fold relative to a Transformer baseline.

Cristina V. Lopes, Yuan-Gang Li, Justin Tian Jin Chen et al. · 0 citations
#artificial intelligence Preprint Sep 2026

Causal and Interpretable Structures in LLM Compositional Tasks

This work studies activations from ensembles of prompts that require inferring relationships between three tokens corresponding to a cyclic concept to correctly predict the next token and finds a consistent layerwise progression in how the joint dependence among the tokens is geometrically organized and causally used.

Gurbir Arora, To-Ni J. B. Liu, Jiajun Bao et al. · 0 citations
#natural language process... Conference Open access Sep 2026

From Token Probabilities to Semantic Constraints: Towards Declarative Probabilistic Evaluation of Language Models

A declarative probabilistic framework for pre-training evaluation that makes the semantic structure of model behavior explicit and provides new formal tools for relating evaluation to learning, and links evaluation and learning through a shared semantics.

Kyle Richardson, C. Anderson, Pranav Balakrishnan et al. · 1 citation
Preprint Aug 2026

Align, Unify, Suppress, Route: A Coherentist View of Transformer Computation

Coherentist Probabilistic Compositionalism (CPC), an interpretive framework that grounds transformer computation in coherentist theories of interpretation and describes it through four operator roles, is introduced.

N. Aljaafari, André Freitas · 0 citations

A Comparative Analysis of Attention versus State-Space Models for In-Context Learning

Transformers and state-space models (SSMs) are two prominent sequential learning architectures, yet their comparison remains largely empirical and existing theoretical analyses are typically task-specific or architecturally restricted. In this paper, we develop belief geometry, a unified analytical framework for compar...

Enes Arda, Semih Cayci, Atilla Eryilmaz · 0 citations
#artificial intelligence Preprint Oct 2026

Learning Probabilistic Logic Programs with Functional Gradient Guided Language Models

Declarative logic programs offer a powerful and interpretable abstraction for encoding relational structure and neurosymbolic reasoning, by expressing dependencies as weighted compositional rules. However, inducing them from data remains fundamentally hard, bottlenecked by the combinatorial explosion of symbolic search...

Saurabh Mathur, Sahil Sidheekh, Bhavan Kumar Vasu et al. · 0 citations

Related blog posts

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.