TACO-Graph: Automated Construction of Text-Atributed Graphs
Organizations: MIT CSAIL · New Jersey Institute of Technology
Abstract
Graph-structured representations of text data have become foundational across machine learning, yet it remains unclear how to systematically construct a graph from a given dataset for a target task. Choices about which entities become nodes, which relationships become edges, and what text each node contains can substantially affect downstream performance. In practice, finding optimal constructions often requires expert knowledge or manual trial and error. We introduce TACO-Graph, a decision tree framework for learning which graph construction choices are most effective for a given dataset and task. Specifically, we focus on text-attributed graphs (TAGs) constructed from multi-attribute tabular data. TACO-Graph enumerates valid TAG representations, scores each using fast proxy evaluation on small representative subsets, and trains an interpretable decision tree on those scores. Across five datasets spanning citation networks, product reviews, and bibliographic relationships, our decision trees predict construction quality on separately drawn evaluation samples with mean Spearman above for node classification and above for GraphRAG retrieval. Our trees systematically identify which constructions perform better across both GNN and GraphRAG tasks, and the full pipeline is released as an open-source library to support evaluation on new tasks and datasets at https://github.com/AmiriHayes/text_attributed_graphs. TACO-Graph provides a systematic and interpretable guide for determining how to convert tabular data to text-attributed graphs for downstream tasks.
Figures & tables
| Tasks (M) | Nodes (N) |
|---|---|
| 1. Node Classification : predict the category labels of nodes. — e.g. paper subject classification text 2. GraphRAG Retrieval : answer questions over graph-structured context. — e.g. author queries | N1 Primary Entity: the fundamental unit of information with core textual content. — e.g. Paper N2 Secondary Entity: hub node connecting primary entities through shared participation. — e.g. Author N3 Aggregate Entity: a higher-order grouping of primary entities by category or family. — e.g. Journal |
| Edges (E) | Text (T) |
| Ground Truth Metrics: E4a Categorical edges — e.g. same category E4b Scalar edges — e.g. similar citation count E4c Participation edges — e.g. coauthorship Calculated Similarity Metrics: E5a Semantic edges — e.g. similar abstract E5b Structural edges — e.g. similar degree | T6a Contextual: node text including both primary content and its surrounding semantic context — e.g. title + abstract T6b Standard: primary content only with no surrounding context — e.g. title T6e Baseline: no text features, serving as a structure-only control. — e.g. no text |
| Architecture | 2-layer GraphSAGE |
| Aggregation | Mean |
| Node features | SBERT all-MiniLM-L6-v2 (384-d) |
| Hidden dim | 256 |
| Output dim | Dataset- and task-specific |
| Epochs | 100 |
| Early stopping | Patience 30 (on validation) |
| Hist | Sports | ArXiv | Elec | Toys | |
|---|---|---|---|---|---|
| Hist | +0.97* | +0.72* | +0.75* | +0.65* | +0.68* |
| Sports | +0.86* | +0.98* | +0.48 | +0.92* | +0.92* |
| ArXiv | +0.86* | +0.50* | +0.97* | +0.48 | +0.48 |
| Elec | +0.48 | +0.95* | +0.50 | +0.98* | +0.94* |
| Toys | +0.65 | +0.93* | +0.47 | +0.93* | +0.95* |
| Variants | Total scoring (hr) | Full-scale run (hr) | Whole-space cost | |||||
|---|---|---|---|---|---|---|---|---|
| Dataset | GNN | RAG | GNN | RAG | GNN | RAG | GNN | RAG |
| ArXiv | 24 | 16 | 0.14 | 2.8 | 0.05 | 0.11 | ||
| Sports | 39 | 26 | 0.16 | 3.4 | 0.05 | 0.12 | ||
| History | 12 | 8 | 0.04 | 0.8 | 0.02 | 0.10 | ||
| Electronics | 39 | 26 | 0.16 | 2.8 | 0.02 | 0.11 | ||
| Toys | 39 | 26 | 0.16 | 2.8 | 0.02 | 0.10 | ||
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.