GraphAdapter
A graph neural network that acts as an adapter between a text-attributed graph and a large language model.
Graphs and geometry · 50 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Task
- Graphs and geometry
- Parameters
- 1.2M
- Operations
- 50
- Framework
- PyTorch
- Recurrent
- No
- Published
- The Web Conference (WWW) 2024
- Cited by
- 47 (as of 27 October 2026)
- Authors
- Xuanwen Huang, Kaiqiao Han, Yang Yang and others
- Source
- GitHub: hxttkl/GraphAdapter
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m17121
- Graph hash
- 000e6cfa03d95bdeff5f61d5622b3a89ea4f8b63226a6277b401d9dd1edaef6c
- Skeleton hash
- 5259c94a6257842a562ff994801d9e5f9a33d546df994061e6fe7a0cdf6a9bd8
- Architecture hash
- a10b04e2b14b1fc8765c60141ae2bb4c181dd02289b2cc3f999419bea7ddaac4
- Diagram SHA-256
- 883e88da025874d086d6a2cbb9ac77a48ed66caad856d64c9689e87275818f50
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
GraphAdapter uses a graph neural network (GNN) as an adapter that works together with a large language model on text-attributed graphs, graphs whose nodes are described by text and which appear in social media and recommendation systems. The paper's starting point is that earlier methods for these graphs were built on million-scale language models, face large computational costs when scaled to billion-scale ones, and ignore the zero-shot inference abilities of large models.
The GNN adapter introduces only a few trainable parameters and can be trained at low computational cost. The whole framework is trained by next token prediction on the text of the nodes, and once trained it can be fine-tuned with task-specific prompts for downstream tasks. In the released code a preprocessing step turns the node text into token embeddings with Llama 2 and saves them, and GraphAdapter is then trained on the saved embeddings.
Across multiple real-world text-attributed graphs, the paper reports that GraphAdapter based on Llama 2 gains an average improvement of approximately 5% in node classification. It also reports that GraphAdapter can adapt to other language models, including RoBERTa and GPT-2.
Key idea. The paper shows that a graph neural network with few trainable parameters can serve as an adapter that lets a large language model handle text-attributed graphs.
- graphadapter
- can gnn be good adapter for llms
- text-attributed graph
- tag
- gnn adapter
- llm adapter
- node classification
- graph neural network
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{huang2024gnngoodadapterllms,
title={Can GNN be Good Adapter for LLMs?},
author={Xuanwen Huang and Kaiqiao Han and Yang Yang and Dezheng Bao and Quanjin Tao and Ziwei Chai and Qi Zhu},
year={2024},
eprint={2402.12984},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2402.12984},
}