Large Language Models (LLMs) are fundamentally built to process sequences. From the perspective of a Transformer, information is a one-dimensional stream of tokens where position is defined by a linear index. However, the real world is rarely linear. Knowledge bases, social networks, and molecular structures are defined by non-linear topologies where the "distance" between two points is a function of connectivity, not sequence order.
This creates a fundamental architectural mismatch. When we ask an LLM to reason about a graph, we are forcing a multi-dimensional web into a narrow, one-dimensional pipe. Recent research focuses on bridging this "structural gap" through three primary levers: how we describe graphs in text, how we align graph embeddings with language space, and how we prompt models to navigate topological paths.
The Flattening Problem
The most immediate challenge is "linearization"—the process of turning a graph into a string. As Bryan Perozzi and Jonathan Halcrow demonstrate in Talk like a Graph, the way we describe a graph can swing model performance by over 60%.
If you describe a graph as a raw list of edges, the model must mentally reconstruct the connections. If you describe it as a social network ("Alice is friends with Bob"), the model can leverage its linguistic priors about human relationships to "guess" the structure. Furthermore, Yuyao Ge found that the order of description matters immensely; presenting edges in a Breadth-First Search (BFS) or Depth-First Search (DFS) order significantly improves accuracy because it aligns the text sequence with a logical traversal path, reducing the cognitive load on the model's attention mechanism.
Bridging Modalities with Soft Tokens
While clever prompting helps, it doesn't solve the underlying efficiency problem. Representing a large graph as text is "wordy" and consumes massive context windows. To address this, researchers are moving toward hybrid architectures that treat graphs as a distinct modality, similar to how vision-language models treat images.
In GraphToken, Bryan Perozzi and Dustin Zelle introduce a method to encode graph structures directly into "soft tokens" using a Graph Neural Network (GNN). Instead of reading "Node A is connected to Node B," the LLM receives a dense vector that captures the local neighborhood's geometry. Similarly, Runjin Chen and Tong Zhao developed LLaGA, which maps these structural embeddings into the LLM’s existing word-embedding space. This allows the model to "see" the graph's shape without the noise of a flattened text description.
Reasoning via Path Enumeration
Even when an LLM understands the structure, it often fails at multi-hop reasoning—tasks like finding the shortest path or detecting a cycle. Standard Chain-of-Thought (CoT) prompting, which works well for word problems, often falters here because it doesn't force the model to maintain a consistent state of the graph.
To combat this, Palaash Agrawal and Shavak Vasania proposed PathCompare in Can LLMs perform structured graph reasoning?. This technique requires the model to explicitly enumerate and compare multiple possible paths before committing to an answer. By forcing the model to "trace" the edges in its output, it prevents the model from skipping over critical connections. For more complex, hierarchical graphs, Ziyu Zheng and Yaming Yang introduced MSGCOT, which uses a coarse-to-fine approach, allowing the model to reason about high-level clusters before diving into specific node-to-node links.
Benchmarking the Structural Leap
The field is currently in a transition from "can they do it?" to "how well can they do it?" Early benchmarks like GPT4Graph showed that LLMs lagged far behind specialized GNNs. However, the landscape is shifting.
Zike Yuan and Ming Liu note in GraCoRe that newer models with scaled inference-time reasoning, such as OpenAI’s o1, represent a massive leap forward. These models appear to perform internal "search" or "backtracking" that mimics the algorithmic traversals (like BFS) previously only possible for specialized software. This suggests that while the architectural mismatch remains, sufficiently deep reasoning can compensate for the linear nature of the input.