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 0.9 for node classification and above 0.8 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
Figure 1: Overview of TACO-Graph. (1) A relational dataset’s columns are mapped to a generalized schema and characterized using automated statistical and validity checks. These dataset level properties are stored for each dataset, and train/test subsets are sampled. (2) For a specified downstream task, TACO-Graph enumerates the space of potential TAG constructions (variants) by defining node, edge, and text-fidelity choices. (3) Each construction is evaluated on representative subsamples by scoring (via lightweight GNN or small-sample GraphRAG), yielding Score(variant,subsample) . (4) A decision tree is fit to variant construction scores and validated on separately drawn data using Spearman correlation and tree edit distance. (5) The interpretable ranking from the tree reveals optimal and suboptimal graph construction choices, informing the practitioner.
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
Table 1: TAG construction search space ΩM with citation network examples .
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)
Table 2: Fixed Scoring configurations.
Figure 2: Construction performance results for Sports. We visualize 6 of 26 variants, revealing a clear performance split between N2 and N1/N3 for the GNN task (top row). The bottom row has less extreme scoring differences, but similar superiority among variants. The thick lines represent means; thin lines are subsets (top) and question orderings (bottom). On the right, heatmaps show the final scores for each variant and subsample or question bucket. T6e represents the no text control.
ρ
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*
Table 3: Decision Tree Structural Consistency Checks
Figure 4: Construction ranking stability versus evaluation budget for GNN and GraphRAG. Left: GNN Spearman ρ against n train-pool subsets across five datasets. Right: GraphRAG stability against question counts with 20 random seeds. Both pipelines show increasing ranking stability with larger evaluation budgets, with GNN starting high and GraphRAG climbing gradually.
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
2.7×
26.4×
Sports
39
26
0.16
3.4
0.05
0.12
3.0×
27.5×
History
12
8
0.04
0.8
0.02
0.10
2.5×
8.0×
Electronics
39
26
0.16
2.8
0.02
0.11
6.9×
24.5×
Toys
39
26
0.16
2.8
0.02
0.10
9.3×
26.8×
Table 4: Construction space evaluation cost.
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
Figure 5: Construction performance for the four datasets not shown in the main body. Rows are datasets; the left column is node classification and the right column is GraphRAG retrieval. Within each panel, scores accumulate over evaluation on the left and final per-variant scores appear as a heatmap on the right.