Let Your Graph Do the Talking: Encoding Structured Data for LLMs

Bryan Perozzi, Bahare Fatemi, Dustin Zelle, Anton Tsitsulin, Mehran Kazemi +2 more
2/8/2024
cs.LGcs.AIcs.SI

No official code found. Best implementation: google-research/talk-like-a-graph (173 stars, Apache-2.0, last commit 2024-08-25).

Abstract

How can we best encode structured data into sequential form for use in large language models (LLMs)? In this work, we introduce a parameter-efficient method to explicitly represent structured data for LLMs. Our method, GraphToken, learns an encoding function to extend prompts with explicit structured information. Unlike other work which focuses on limited domains (e.g. knowledge graph representation), our work is the first effort focused on the general encoding of structured data to be used for various reasoning tasks. We show that explicitly representing the graph structure allows significant improvements to graph reasoning tasks. Specifically, we see across the board improvements - up to 73% points - on node, edge and, graph-level tasks from the GraphQA benchmark.

View on arXivView PDF

Code Implementations(1)

Apache-2.0
17321Python, Jupyter NotebookJul 10, 20242 years agoApache-2.0

Cite this paper

@article{perozzi2024your,
  title  = {Let Your Graph Do the Talking: Encoding Structured Data for LLMs},
  author = {Bryan Perozzi and Bahare Fatemi and Dustin Zelle and Anton Tsitsulin and Mehran Kazemi and Rami Al-Rfou and Jonathan Halcrow},
  year   = {2024},
  eprint = {2402.05862},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2402.05862v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2402.05862.svg)](https://codeofpaper.com/paper/2402.05862)

Discussion