arXiv:2610.22734cs.AIOct 2026

Manuscript Offprint

arXiv:2610.22734

Graph Serializations for Reasoning LLMs: A Study Across Knowledge Extraction and Structural Reasoning

Julien Yu, Mihaela Bornea, Avirup Sil, Katrin Kirchhoff

Abstract

The way a knowledge graph is serialized as text for inclusion into LLM context can substantially affect downstream LLM performance, with prior work reporting tens of percentage points variations across formats. However, existing studies consider only a limited set of representations and predate frontier reasoning models, which now offer stronger reasoning, instruction-following, and long-context capabilities. We evaluate 15 graph representation formats across nine frontier LLM configurations on ontology-based knowledge extraction and structural graph reasoning tasks. While knowledge extraction is relatively insensitive to different serialization formats, the choice of the optimal format for structural reasoning tasks significantly affects accuracy. We demonstrate that the optimal representation choice depends on model, query, and task and propose to approach graph serialization as a dynamic orchestration decision.

1 Introduction

LLMs increasingly serve as reasoning components in systems that consume symbolic structure, including ontologies, knowledge graphs (KGs), and graph-derived retrieval contexts. Applications include ontology-guided extraction (Mihindukula-sooriya et al., 2023), multi-hop reasoning over KGs (Sun et al., 2024; Ma et al., 2025; Zhou et al., 2025), and generation grounded in retrieved graph evidence (Edge et al., 2024). While it is possible to connect LLMs to dedicated graph query engines, it is increasingly common to inject graph representations directly into LLM context, via serialization of nodes, edges, types, relations, and constraints into a sequence of tokens. Prior work shows that the representation choice can substantially affect downstream task accuracy while holding the model and task fixed (Fatemi et al., 2024; Markowitz et al., 2025; Sclar et al., 2024; He et al., 2024; Sui et al., 2024). However, previous studies only investigated a small number of possible graph representations, did not test frontier reasoning models, and did not analyze the relationship between query/task type, graph properties, models, and reasoning level. In particular, it remains unclear whether frontier reasoning models render serialization less important (by being able to infer structure from most reasonable representations), or more important by exploiting semantic, constraint, or layout cues when exposed explicitly.

We organize the study around three research questions: RQ1: Representation selection. Which graph representations are the most effective across different tasks, graph types, frontier models, and reasoning effort? RQ2: Semantic versus structural representation. Are the most effective representations aligned with the task type, with semantically rich representations favoring semantic extraction and connectivity-focused representations favoring structural reasoning? RQ3: Reasoning capacity and cost. As model reasoning strength increases, does serialization become less important, and how does the preferred representation move along the accuracy-token-cost frontier?

We make three contributions: First, we introduce a broad empirical evaluation of graph representations for frontier LLMs. We compare 15 representations spanning semantic-web formats, constraint-style renderings, structured natural language, tabular views, diagrammatic formats, compact connectivity encodings, and verbalization of graph structures. Second, we evaluate representation choices across both ontology-driven semantic knowledge extraction and structural graph reasoning. We use Text2KGBench (Mihindukula-sooriya et al., 2023) for ontology-based extraction and extend GraphQA (Fatemi et al., 2024) with harder graph sizes, structural operators, and topology variation. Third, we analyze graph representation selection as a model- and cost-aware orchestration decision. We evaluate nine frontier LLM configurations, including reasoning-enabled models, and measure both task accuracy and token-cost behavior. We show that a query-dependent selector model can increase the average performance by 9.52 pp over the best fixed format. Together, these contributions position graph serialization as an explicit, dynamic system design choice for KG-augmented LLM pipelines rather than a static prompt-formatting detail.

References (22)