cs.LGJul 29, 2026

Labeled Incidence Structures for Native Transformer Modeling of Text, Knowledge Graphs, and Hypergraphs

Authors: Mahesh Godavarti

Organizations: A Carrot, Inc

Abstract

Current Transformer interfaces index tokens by one or more integer coordinates, which determine their addresses inside attention. In RoPE and its multi-axis or hierarchical variants, the resulting address has the form A(i)=R1i1R2i2R3i3A(i)=R_1^{i_1}R_2^{i_2}R_3^{i_3}, where the exponents are integer coordinates assigned after choosing a serialized token layout. When Transformers process new or large collections of data, this addressing scheme can produce unseen offsets or coordinate combinations, push repositories toward retrieve-and-serialize pipelines, and force new entities, records, or repository items to be represented by long token strings or identifier embeddings not seen in training. We introduce labeled incidence structures (LIS), in which each participating token or value is an endpoint with content xx and a structural index ii. The index can include local position, relation role, relation instance, text unit, field, or content-derived identity. The model maps this index to a structural address A(i)A(i), so adding new tokens, facts, text units, or repository items applies the same learned address rule to structural and content coordinates rather than requiring larger integer coordinates, unseen coordinate combinations, or new identifier embeddings. Attention scores endpoints i,ji,j using qi⊤Pj→ikjq_i^\top P_{j\to i}k_j, where journey consistency forces Pj→i=A(i)−1A(j)P_{j\to i}=A(i)^{-1}A(j). When ii has several coordinates, such as position, role, and instance, coordinate independence is equivalent to factoring A(i)A(i) into one address factor per coordinate. This recovers RoPE, RoPE-2D, and HiRoPE as special cases. This allows knowledge-graph (KG) roles, fact instances, and text units to enter the attention score directly. In controlled shallow diagnostics, the LIS address interface is implemented inside ordinary Transformer attention and yields promising results across text, KG, and nn-ary settings.

Figures & tables

Appendix figures & tables10 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Rotary Position Encodings for Graphs

    Sep 26, 2025Isaac Reid, Arijit Sehanobish, Cederik Höfs +7Positional EncodingTransformer Architectures

  2. Lost in Tokenization: Fundamental Trade-offs in Graph Tokenization for Transformers

    May 21, 2026Maya Bechler-Speicher, Gilad Yehudai, Gil Harari +3Multiplex Graph TransformersTransformer Architectures

  3. Teaching LLMs to See Graphs: Unifying Text and Structural Reasoning

    May 11, 2026Dario VajdaMultiplex Graph TransformersGraph-Llm Integrations