Papers
Topics
Authors
Recent
Search
2000 character limit reached

Are Large Language Models Suitable for Graph Computation? Progress and Prospects

Published 5 Jun 2026 in cs.CL | (2606.06865v1)

Abstract: LLMs have been increasingly explored for graph computation, where tasks require reasoning over structured relationships and algorithmic operations. Yet, it remains unclear when LLMs can reliably support such computation and how they should be incorporated into graph-solving pipelines. Existing surveys at the intersection of LLMs and graphs primarily focus on graph learning, text-attributed graphs, or graph-language modeling. To bridge this gap, we provide a comprehensive review of LLMs for graph computation through a role-based taxonomy. Specifically, we identify two major paradigms: i) LLMs as executors, where models directly solve graph tasks from graph descriptions and instructions; and ii) LLMs as planners, where models formulate problems, decompose reasoning steps, and invoke external tools or agents for execution. Based on this taxonomy, we analyze the strengths and limitations of current methods. Our review indicates that LLMs are promising for simple, small-scale tasks, but remain unreliable for large-scale and exactness-demanding tasks. Finally, we summarize available datasets and suggest four future directions.

Summary

  • The paper introduces a taxonomy distinguishing LLMs as Executors and Planners for graph tasks, clarifying their roles and methodologies.
  • The study benchmarks executor-based methods on small graphs and planner-based approaches using code generation and APIs for scalable performance.
  • The paper highlights limitations such as context window constraints and pattern memorization, advocating domain adaptation and privacy safeguards.

LLMs for Graph Computation: Capabilities, Limitations, and Prospects

Introduction

The intersection of LLMs and graph computation has emerged as a key focus in AI research, given the ubiquity of graphs in domains such as social networks, bioinformatics, recommendation systems, and knowledge management. While LLMs excel at open-ended natural language processing, their suitability for algorithmic tasks on graph-structured data remains an open question. "Are LLMs Suitable for Graph Computation? Progress and Prospects" (2606.06865) provides a comprehensive, taxonomy-driven synthesis of the current landscape, systematically analyzing LLMs as both direct executors and planners (orchestrators) for graph computational tasks.

Taxonomy of LLM-based Graph Computation

The paper introduces a role-based taxonomy that anchors the discussion:

  • LLMs as Executors: Models directly consume graph descriptions and task instructions, attempting to output solutions autonomously. This encompasses:
    • Prompting: Crafting descriptive or algorithmic prompts to guide LLM reasoning.
    • Encoding: Innovations in representing graphs textually, including advanced ordering and multimodal encodings.
    • Post-training: Instruction-tuning or reinforcement-based adaptation of LLMs to improve performance on specific graph tasks.
  • LLMs as Planners: Models decompose and orchestrate solutions, leveraging external tools, APIs, or collaborating multi-agent systems for execution. This comprises:
    • Code Generation: Producing and executing code to solve graph problems.
    • Function Calling: Structured API calls to graph toolkits.
    • Multi-agent Systems: Collaboration between LLM-based agents specializing in different sub-tasks or graph partitions.

This taxonomy brings vital clarity, separating algorithmic computation (requiring exactness and scalability) from tasks more readily addressed through pattern recognition.

LLMs as Executors: Capabilities and Systemic Bottlenecks

Prompting

Embedding graph structures and algorithmic steps in prompts enables LLMs to solve basic tasks (e.g., neighbor queries, small shortest paths, triangle counts) [wang2023can, guo2023gpt4graph]. However, methods struggle as graph order grows (typically n>50n > 50), as the sequential text interface and context window quickly saturate. Prompt design (e.g., zero-shot, CoT, Build-a-Graph, algorithmic prompting) can elicit reasoning over small samples but relies heavily on manual crafting and task-specific expertise.

Encoding

Graph encoding is nontrivial—choice of representation (adjacency lists, edge lists, specialized ordering, or hybrid motifs/visual modalities) directly impacts comprehension [fatemi2023talk, ge2025can, das2024modality]. Strategies such as placing key subgraph information at contextual edges, RL-based adaptive encodings, and linearization by centrality or motif patterns can improve token efficiency and task accuracy. However, when the sequence exceeds the working memory of the model, 'lost-in-the-middle' failures are prevalent [liu2024lost, cao2025graphinsight].

Post-training

Instruction tuning and reinforcement learning from code or preference feedback can enhance model reliability and consistency [chen2024graphwiz, peng2025rewarding]. While post-training improves in-domain accuracy, issues remain: fine-tuned LLMs often memorize frequent patterns rather than abstract reasoning rules, resulting in poor out-of-distribution generalization [zhang2025generalizable]. The computational expense of preparing sufficiently large and diverse graph datasets is another practical barrier.

Summary

In the executor paradigm, state-of-the-art LLMs typically perform well (up to 80%80\% token-level accuracy) only for simple, small-scale deterministic tasks. Context window limitations and reasoning complexity restrict applicability to real-world, correctness-critical scenarios. Notably, the strongest post-trained models (e.g., GraphWiz, G1, GraphPRM) occasionally outperform base LLMs by 20-40% on synthetic datasets but do not scale successfully to large or dense graphs [chen2024graphwiz, guo2025g1].

LLMs as Planners: Orchestration Paradigms and Strengths

Code Generation

By decomposing natural language questions into code, LLMs leverage external interpreters to handle the 'execution bottleneck' [zhang2024gcoder, gong2025pseudocode]. This mitigates issues with iterative computation, backtracking, and memory overload, enabling successful reasoning over real-world graphs with hundreds of thousands to millions of nodes—orders of magnitude beyond pure textual prompting. Compiler/runner feedback (e.g., RLCF in GCoder) and retrieval-augmented generation with graph libraries further enhance reliability [zhang2024gcoder, li2025grraf].

Function Calling

Structured tool APIs (NetworkX, custom graph solvers) allow LLMs to act as high-level controllers, parsing task requirements, selecting relevant procedures, and invoking them iteratively [zhang2023graph, wang2025graphtool]. Recent systems (e.g., GraphChain, GraphTool-Instruction) showcase high accuracy (>90%>90\%) and scalability (up to n=106n=10^6) on diverse graph tasks [wei2026graphchain]. Limiting factors include tool/library coverage and brittleness to unseen algorithms or API misuse.

Multi-Agent Collaboration

For complex or compositional tasks, multi-agent architectures divide computation across cooperating LLM instances (e.g., vertex- or subgraph-level workers managed by a master planner) [li2024graphteam, wang2026graphcogent]. This structure enables both parallelization and workload specialization, reducing memory constraints and handling distributed data sources. The communication overhead, risk of error propagation, and increased inference latency remain open challenges [tran2026single].

Summary

Planner-based systems, particularly those combining code generation and structured tool invocation, best approximate professional-grade algorithmic reasoning. They demonstrate superior numerical performance, high reliability on large graphs, and robustness to complex queries. Multi-agent systems extend this to scenario-specific specializations, including memory-constrained, domain-adapted, and real-time settings.

Empirical Performance and Benchmarking

The paper compiles an extensive benchmark meta-analysis. Strong planner-based systems (GCoder, GraphChain, GraphSkill, GraphTool-Instruction) achieve consistently high performance on synthetic and real-world benchmarks, handling graphs with up to millions of nodes and dozens of complex problem types—whereas executor-based LLMs are limited to much smaller graphs:

  • Executor-based: SOTA up to n=200n=200, polynomial and NP-hard tasks solved only in toy settings, ~40-80% top-1 accuracy [chen2024graphwiz, graCoRe].
  • Planner-based: Up to n=106n=10^6, >90% accuracy for both linear, polynomial, and NP-complete queries (when algorithmic tool support exists) [zhang2024gcoder, wei2026graphchain].
  • Multi-agent: Effective for real-world noisy/implicit graph settings, but with computational tradeoffs [wang2026graphcogent, han2026graphvista].

Limitations, Open Challenges, and Future Directions

The survey identifies acute theoretical and practical limitations:

  • Scalability: Text-only LLMs cannot process large graphs due to context windows, memory loss, and O(n2n^2) token scaling.
  • Generalization: Fine-tuned models often exhibit pattern memorization and fail on domains or graph types outside the training set.
  • Exactness and Reliability: LLMs (as sequence predictors) frequently hallucinate, omit steps, or introduce logical inconsistencies in deterministic settings [heyman2025reasoning, dziri2023faith].
  • Privacy: Prompt leakage and training-data exposure pose risks, especially with personal/sensitive relationship data [das2025security, chen2025survey, priyanshu2023chatbots].
  • Domain Specialization: Extension to graphs with complex semantics (e.g., biochemical, financial) or dynamic/evolving topologies is nascent and remains error-prone.

The paper advocates the following research directions:

  • Benchmarks for Implicit Graphs: Tasks where graphs are hidden within narrative/discursive texts, documents, or logs, testing LLM abilities in extraction and adaptive execution [wang2024microstructures, bai2025longbenchv2].
  • Pipeline Optimization for Multi-step Graph Operations: Automated subgraph extraction, task decomposition, routing, and workload optimization for scalable, efficient agentic computation [lyu2025modular, wei2026graphchain].
  • Privacy and Safety: Comprehensive defenses against prompt inversion, membership inference, and differential privacy attacks in both prompts and training corpora [yao2024survey, tang2023privacy, imola2022differentially].
  • Domain Adaptation: Transfer learning, modular encoders, and hybrid systems for application-specific, richly attributed, or temporally indexed graphs (e.g., molecular networks, attack graphs) [lu2025fine, cao2025instructmol].

Conclusion

The suitability of LLMs for graph computation depends critically on the system design paradigm. While direct executor-based approaches are limited to small, lightweight tasks due to inherent context and reasoning limitations, planner-based approaches—especially those integrating code execution, tool calling, and multi-agent collaboration—achieve high reliability, scalability, and accuracy for a wide array of graph problems. The field is advancing toward more robust, modular architectures supporting real-world, privacy-aware, domain-specialized graph analytics, though challenges remain in generalization, efficiency, and trustworthiness.

Future research should prioritize the construction of challenging, realistic benchmarks, development of privacy-preserving architectures, scalable pipeline optimization, and deep domain adaptation to further expand the boundaries of LLM-based graph computation.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Collections

Sign up for free to add this paper to one or more collections.