Pith. sign in

REVIEW 3 cited by

CodeGraph: Enhancing Graph Reasoning of LLMs with Code

Not yet reviewed by Pith; the record is open.

This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.

SPECIMEN: schema-true, not a live event

T0 review · schema-true

One-sentence machine reading of the paper's core claim.

pith:XXXXXXXX · record.json · timestamp

arxiv 2408.13863 v1 pith:Y2RZC3GX submitted 2024-08-25 cs.CL cs.AI

classification cs.CLcs.AI
keywords graphreasoningllmscodegraphmethodsproblemstasksinstruct
verification ladder T0 review T1 audit T2 compute T3 formal

Signed reviews

No signed human review yet.

0 comments
read the original abstract

With the increasing popularity of large language models (LLMs), reasoning on basic graph algorithm problems is an essential intermediate step in assessing their abilities to process and infer complex graph reasoning tasks. Existing methods usually convert graph-structured data to textual descriptions and then use LLMs for reasoning and computation. However, LLMs often produce computation errors on arithmetic parts in basic graph algorithm problems, such as counting number of edges. In addition, they struggle to control or understand the output of the reasoning process, raising concerns about whether LLMs are simply guessing. In this paper, we introduce CodeGraph, a method that encodes graph problem solutions as code. The methods solve new graph problems by learning from exemplars, generating programs, and executing them via a program interpreter. Using the few-shot setting, we evaluate CodeGraph with the base LLM being GPT-3.5 Turbo, Llama3-70B Instruct, Mixtral-8x22B Instruct, and Mixtral-8x7B Instruct. Experimental results on six tasks with six graph encoding methods in the GraphQA dataset demonstrate that CodeGraph can boost performance on graph reasoning tasks inside LLMs by 1.3% to 58.6%, depending on the task. Compared to the existing methods, CodeGraph demonstrates strong performance on arithmetic problems in graph tasks and offers a more controllable and interpretable approach to the reasoning process.

Discussion (0). Continue with ORCID to comment.

Forward citations

Cited by 3 Pith papers

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score. Full citation record

  1. RTL++: Graph-enhanced LLM for RTL Code Generation

    cs.PL 2025-05 conditional novelty 6.0 of 10

    RTL++ encodes RTL code as textualized CFG/DFG graphs to generate richer instructions for fine-tuning CodeLlama-7B, claiming improved VerilogEval pass@k over comparable open-source models.

  2. Graph Counselor: Adaptive Graph Exploration via Multi-Agent Synergy to Enhance LLM Reasoning

    cs.AI 2025-06 conditional novelty 5.0 of 10

    A multi-agent GraphRAG framework with self-reflection improves LLM accuracy on knowledge graph question answering.

  3. Assessing Large Language Models in Comprehending and Verifying Concurrent Programs across Memory Models

    cs.SE 2025-01 conditional novelty 5.0 of 10

    Five LLMs, including GPT-4, handle many simple concurrency checks but cannot reliably verify small programs under TSO and PSO relaxed memory models.

Pith tools