Non-Commutative Geometry for Relational Reasoning

You are reading version 1 of this direction, frozen 2026-10-04. The latest version is version 2.

Version 1 of 238 papers70 conceptsfrozen 2026-10-04

In the logic of the real world, the order of operations is everything. If you take the "spouse of" your "father," you arrive at your mother (or stepmother). If you reverse that sequence—the "father of" your "spouse"—you arrive at your father-in-law. These two paths involve the same relationships but yield fundamentally different results.

In mathematics, this property is called non-commutativity. While simple addition ($2+3 = 3+2$) and 2D rotations are commutative, complex logical chains are not. Yet, for years, the dominant models for Knowledge Graph Embedding (KGE) relied on commutative operations, effectively treating "father of spouse" and "spouse of father" as identical. A new wave of research is fixing this by moving relational reasoning into non-commutative geometric spaces.

The Commutativity Trap in Two Dimensions

Early successful models like RotatE represented relations as rotations in a 2D complex plane. While elegant, 2D rotations are inherently commutative: rotating an object by 30 degrees and then 60 degrees is the same as 60 then 30.

As Hidetoshi Shimodaira and Yihua Zhu point out in their work on OrthogonalE, this mathematical constraint forces the model to ignore the directional logic of the graph. When a model cannot distinguish between different sequences of relations, it suffers from "semantic confusion," where distinct logical paths are collapsed into the same mathematical representation. Huaiyu Wan and Shuhan Wu argue in RUN-GNN that treating these sequences as commutative prevents models from capturing the "sequentiality" inherent in human reasoning.

Escaping to Higher Dimensions

To model non-commutative logic, researchers have turned to more sophisticated algebraic structures where the order of multiplication matters ($A \times B \neq B \times A$).

Quaternions and 3D Rotations

The most direct solution is moving from 2D to 3D. In three dimensions, rotations do not commute (imagine rotating a book 90 degrees around its vertical axis, then 90 degrees around its horizontal axis; then try the reverse).

Models like DensE, proposed by Haonan Lu and Hailin Hu, use unit quaternions to perform these 3D rotations (DensE). By representing relations as elements of the $SO(3)$ group, these models naturally preserve the order of relational compositions. Hidetoshi Shimodaira further extended this in 3H-TH by combining 3D rotations with hyperbolic geometry, allowing the model to capture both non-commutative paths and the hierarchical "tree-like" structure of many datasets.

Non-Abelian Groups and Reflections

Beyond simple rotations, Canran Xu and Ruijiang Li introduced the use of Dihedral groups (Relation Embedding with Dihedral Group). By incorporating reflections alongside rotations, they created a non-Abelian (non-commutative) framework that can model complex symmetries and directional dependencies that rotations alone might miss. Similarly, Kossi Amouzouvi and colleagues developed SMART, which dynamically learns whether a relation should be modeled as a rotation, reflection, or translation (SMART).

Why Order Matters for Graphs and Logic

The need for non-commutativity extends beyond static Knowledge Graphs into dynamic reasoning and specialized domains:

  • Spatial and Temporal Reasoning: Ling Cai and Gengchen Mai demonstrate in HyperQuaternionE that qualitative spatial relations (like "North of" or "Inside") are strictly order-dependent. Swapping the order of spatial compositions leads to entirely different locations.
  • Source Code Analysis: In software, the sequence of operations defines the program's behavior. Ammar Ahmed and Anwar Said show that standard GNNs fail to detect vulnerabilities because they treat neighboring code blocks as an unordered set. Their SEGNN model (Sequential Graph Neural Networks) uses recurrent mechanisms to respect the non-commutative nature of execution paths.
  • LLM Reasoning Flows: Even inside Large Language Models, logic appears to have a geometric signature. Yufa Zhou and Shuyan Zhou found that the "velocity" and "curvature" of a model's internal representations are sensitive to the sequence of logical steps (The Geometry of Reasoning). If the logical order is disrupted, the geometric flow collapses.

Binding Information with Matrices

In Hyperdimensional Computing (HDC), a traditional challenge is "binding" two vectors together without losing their identity. Calvin Yeung and Mohsen Imani proposed GHRR, which replaces scalar binding with matrix multiplication (Generalized Holographic Reduced Representations).

Because matrix multiplication is non-commutative, the resulting "hypervector" inherently encodes the order in which the information was bound. This allows models to distinguish between a "red square" and a "square red" (if such a distinction were semantically useful) or, more importantly, to encode nested data structures like trees and dictionaries without needing external positional encodings.

Conclusion

The shift toward non-commutative embeddings represents a move from "bag-of-relations" modeling to true sequential reasoning. By aligning the mathematical properties of the embedding space—using quaternions (Cao et al.), non-Abelian groups (Xu & Li), or orthogonal matrices (Shimodaira et al.)—with the directional logic of the real world, these models can finally distinguish between a "wife's father" and a "father's wife."

Papers in this version

History & citationVersion 2 · 2026-10-04

Current · Permanent link

  1. Version 2 (latest) · 2026-10-04 · 36 papers
  2. Version 1 · 2026-10-04 · 38 papers
Cite this direction

Latest version (a living page):

@misc{lacuna_non_commutative_relation_composition_315d3411,
  title = {non-commutative relation composition},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/non-commutative-relation-composition/rdr_315d34119a0a4159ad6da348e34192d6},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-22},
}

This exact version (version 1, frozen text):

@misc{lacuna_non_commutative_geometry_for_relational__315d3411_v1,
  title = {Non-Commutative Geometry for Relational Reasoning},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/non-commutative-geometry-for-relational-reasoning/rdr_315d34119a0a4159ad6da348e34192d6/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-22},
}