End-to-End Graph Flattening Method for Large Language Models

Bin Hong,Jinze Wu,Jiayu Liu,Liang Ding,Jing Sha,Kai Zhang,Shijin Wang,Zhenya Huang
2024-09-23
Abstract:In recent years, the breakthrough of Large Language Models (LLMs) offers new ideas for achieving universal methods on graph data. The common practice of converting graphs into natural language for LLMs, which refers to graph flattening, exhibits good generalizability and interpretability. However, the poor organization of the textual format results in poor performance in long-distance scenario understanding. Inspired by human cognitive reasoning habits, we propose a novel method for graph flattening to fit LLMs, termed as End-to-End DAG-Path prompting (EEDP). Experiments on real-world datasets show that EEDP enhances the reasoning performance of LLMs in long-distance scenarios while maintaining excellent performance in short-distance scenarios, demonstrating good robustness in the face of distance variations.
Computation and Language,Artificial Intelligence
What problem does this paper attempt to address?
The problem that this paper attempts to solve is the poor performance of existing graph - to - text conversion methods when dealing with long - distance dependencies. Specifically, although existing graph flattening methods perform well in short - distance scenarios, they are less effective when handling tasks that require understanding long - distance contexts. This is mainly because after graph data is converted into a text format, its organization is not conducive to the reasoning ability of large language models (LLMs) in long - distance situations. To solve this problem, the paper proposes a new graph flattening method - End - to - End DAG - Path prompting (EEDP). The EEDP method generates text descriptions by utilizing the backbone paths in the graph, aiming to improve the reasoning performance of LLMs in long - distance scenarios while maintaining excellent performance in short - distance scenarios. The main contributions of the paper include: 1. **Proposing the EEDP method**: Combining human cognitive habits and the actual graph structure, optimize the text representation of the graph by extracting the backbone paths in the graph. 2. **Experimental verification**: Conduct experiments on two benchmark datasets (Merged 1000 and ZINC test 2500) constructed based on real - world data, proving the effectiveness and robustness of the EEDP method in long - distance and short - distance scenarios. 3. **Zero - sample performance**: Pay special attention to the zero - sample learning scenario and demonstrate the reasoning ability of the EEDP method on unseen data. In summary, this paper aims to improve the performance of LLMs in handling tasks with complex graph structures, especially in understanding long - distance dependencies, by improving the text representation method of graph data.