Make LLMs read graphs by converting them into meaningful text sequences
π https://arxiv.org/abs/2410.19494
π― Original Problem:
LLMs can't directly process graph data as they only understand text. Converting graphs into sequences (linearization) while preserving structural information remains an unsolved challenge.
-----
π§ Solution in this Paper:
β’ Developed graph linearization methods using:
- Graph centrality (PageRank and degree)
- Graph degeneracy (k-core decomposition)
- Node relabeling schemes
β’ Created edge ordering strategies based on node importance
β’ Applied node relabeling to maintain global alignment
β’ Tested on synthetic dataset with 3000 graphs using Llama 3 Instruct 8B
-----
π‘ Key Insights:
β’ Graphs need local dependency and global alignment properties for LLMs to process them effectively
β’ Centrality-based methods consistently outperform random baselines
β’ Node relabeling shows mixed effects across different tasks
β’ Edge ordering significantly impacts LLM's graph understanding
-----
π Results:
β’ Node Counting: Degree-based method achieved 62.28% accuracy
β’ Max Degree: Degree centrality reached 30.89% accuracy
β’ Motif Classification: PageRank method hit 47.27% accuracy
β’ All proposed methods consistently outperformed random baselines










