Colorful Talks with Graphs: Human-Interpretable Graph Encodings for Large Language Models
Angelo Zangari, Peyman Baghershahi, Sourav Medya

TL;DR
This paper presents a human-interpretable graph encoding method for large language models, improving their ability to solve graph problems by translating graph structure into natural language prompts with color tokens.
Contribution
The authors introduce a novel graph-to-text encoding strategy using WL similarity classes mapped to color tokens, enhancing LLM reasoning over graph structures.
Findings
Significant performance improvements on multiple graph tasks.
Effective encoding captures local and global graph dependencies.
Method works on both synthetic and real-world datasets.
Abstract
Graph problems are fundamentally challenging for large language models (LLMs). While LLMs excel at processing unstructured text, graph tasks require reasoning over explicit structure, permutation invariance, and computationally complex relationships, creating a mismatch with the representations of text-based models. Our work investigates how LLMs can be effectively applied to graph problems despite these barriers. We introduce a human-interpretable structural encoding strategy for graph-to-text translation that injects graph structure directly into natural language prompts. Our method involves computing a variant of Weisfeiler-Lehman (WL) similarity classes and maps them to human-like color tokens rather than numeric labels. The key insight is that semantically meaningful and human-interpretable cues may be more effectively processed by LLMs than opaque symbolic encoding. Experimental…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
