Graph data delivery: nodes, edges and splits travel together
The unit of acceptance for graph data is not node count or edge count but a trio — split, negatives, feature timestamp; if the split does not ship with the data, the offline metrics cannot be interpreted and cannot be reproduced by anyone.
On this page
The vendor delivers a graph: two million nodes, a hundred million edges, node features and labels attached, with one line in the description — randomly split 8:1:1. You ask a second question: at training time, were the neighbours of a test node still in the graph. Yes, comes the answer, it is the same graph, we split the nodes. Nothing about that is wrong, and it means the model can receive information from a test node's neighbours while predicting it, some of which carry training labels. This is not a bug. It is the default state of graph data. This article is about what you are actually accepting when that default state was never written down.
One edge crossing both sides
Tabular data is split by rows, and afterwards train and test have nothing to do with each other. Graphs do not work that way. A graph is a connected net; what you split is a set of nodes, and the edges still connect them. If a test node has one training neighbour, the first round of message passing carries training-side information across. In a transductive setting that is allowed, even intended. But if the description never says transductive, you will read the number as inductive generalisation. Those two numbers cannot be compared.
Link prediction is more direct. The task is to predict whether an edge exists, and if that edge already sits in the training graph, the model does not need to learn anything; it looks it up. So an edge-level split has to remove test edges from the training graph, not divide the edges into three parts while leaving them all in place. In the files those differ by one field. In the metric they differ by everything.
Graph-level tasks look cleanest and still have a trap. In molecular datasets, if train and test contain molecules with the same scaffold, the model learns the scaffold rather than the property, and scores inflate. Some datasets therefore split by scaffold so that no test scaffold appears in training.[1] The point is not to make the task harder. It is to make the metric answer a specific question: can this generalise to a scaffold it has never seen.
All three share one property: none of them is visible in the data file. You open a parquet and see a node table, an edge table, a label table. All three are clean, every field populated. The leak lives in the relations between the three tables, and relations are exactly what gets documented least.
OGB made the split part of the dataset
Open Graph Benchmark starts from a plain observation: existing graph datasets tend to be small, and their splits often do not resemble real use, so numbers reported across papers are not comparable.[1] Its response was to release datasets together with fixed splits and an evaluation protocol, covering node-level, edge-level and graph-level prediction.
The part most useful to a buyer is how it treats splitting. Some datasets use a temporal split: training may only use edges before a cutoff, validation and test use edges after it, so the model never sees future connections during training.[1] Some graph-level datasets split by scaffold, so test scaffolds do not overlap training scaffolds.[1] Neither of these is the vague claim that a split is "fairer". Each targets one specific leakage shape with one specific fix.
One layer is often missed: the evaluation protocol is fixed too, including which metric is used and how candidates are constructed. That matters in procurement. On the same graph, link prediction scored against random negatives and against a fixed negative set are not comparable, and both numbers will be written as AUC or Hits on a slide. So delivering a split really means delivering three things: the split file, the negatives, and the evaluation script.
The paper's insistence that splits resemble real use implies something for the buyer: you have to know your task first. Node classification, link prediction and graph classification need three different splits of the same graph, and one delivery rarely satisfies all three. If the vendor supplies a single random split, the data supports at most one of them — and the vendor usually cannot say which.
Three levels, three leakage shapes
| Level | Typical task | Leakage shape | What must be in the delivery |
|---|---|---|---|
| Node | Node classification, node regression | A test node's neighbours carry training labels; or several nodes of one entity cross the boundary | Node ID to split mapping; transductive or inductive; entity-level grouping note |
| Edge | Link prediction, recommendation | Test edges left in the training graph; negatives sharing an endpoint with positives; temporal leakage through edge time | Training graph with test edges removed, test edge list, negative strategy and random seed |
| Graph | Graph classification, property prediction | Train and test graphs share substructure or scaffold; many graphs generated from one source cross the boundary | Split basis (scaffold, source, time) and the graph count per group |
| Cross-level | Heterogeneous and multi-relational graphs | A relation type itself leaks the label: one edge type appears only in positives | Per-relation statistics, and whether labels were involved when the graph was built |
The entity grouping note in row one deserves its own paragraph. If nodes are accounts and one person holds three of them, a random node split puts that person on both sides. This is the same problem as multiple records from one patient in tabular data, and it is harder to spot on a graph: nodes are supposed to be connected, so nobody suspects that a connection is a leak.
Negatives in row two are the easiest thing to fake. If the supplied negatives are random node pairs, they are probably pairs that obviously do not exist, and the model learns to separate obvious from plausible rather than relevant from irrelevant. Where the negatives came from, what share are hard negatives, and whether any share an endpoint with the test set — all three must be written down, or you cannot say what the metric measures.
Row four is the most hidden. In a heterogeneous graph, if construction used an edge like "user complained about merchant" while the label is "merchant violated policy", that edge is a downstream product of the label. Of course the model is accurate with it, but that is hindsight, not prediction. No split check can see this. Only asking about the graph construction can.
A delivery checklist you can verify
- Ask for three files, not one: the node and edge tables, the split file mapping IDs to splits, and the negatives file. Bundled into one file, you cannot tell whether the split was edited after the fact.
- Establish the setting: transductive or inductive. In the first, test nodes are visible during training, structure and features both; in the second they are not. Metrics from the two cannot be compared with each other or with published numbers.
- Check the training graph for edge tasks: were test edges deleted. Easy to run — look up every test edge in the training graph and the hit count should be zero.
- Check the feature timestamp: on what date were node features aggregated. If a feature is "transactions in the last thirty days" and the label is "fraudulent", confirm that window closes before the label time.
- Check how the graph-level split was grouped: by scaffold, by source, or at random. A random split on molecular data leaks almost by construction.
- Ask for the evaluation script, not just the metric. Only numbers from the same script are comparable, and only then can you tell whether a change came from the data or from the harness.
Item three is the only fully automatable check and the one least often run. It is a single query, provided the vendor exported test edges separately. If they are flagged inside one large edge table, the query still runs with one extra filter. The real obstacle is usually not technical: if test edges were never exported on their own, nobody on the vendor side has run this check either.
Item five needs some domain judgment. Molecular data splits by scaffold because scaffold determines much of the property, so a test molecule sharing a training scaffold is an open-book exam. Move to a social or transaction network and it is unclear what a scaffold corresponds to. A fallback is to split by source: by community, by merchant, by time slice, so that each test group has no same-origin sample on the training side. The principle is general; the concrete cut follows the data.
{
"graph_id": "tx-graph-2023",
"nodes": 2000000,
"edges": 100000000,
"task": "link_prediction",
"setting": "transductive",
"split": {
"file": "split.parquet",
"train_edges": 80000000,
"val_edges": 10000000,
"test_edges": 10000000,
"test_edges_removed_from_train_graph": true
},
"negatives": {
"file": "negatives.parquet",
"strategy": "hard_negative_by_common_neighbor",
"seed": 42
},
"features": {"aggregated_until": "2023-06-30", "label_at": "2023-07-31"}
}What actually does work in this manifest is two booleans and two dates: test_edges_removed_from_train_graph, negatives.seed, features.aggregated_until and label_at. The first two decide whether the metric is reproducible; the last two decide whether the model looked into the future. All four can be filled in wrongly, and all four look fine when they are wrong.
What a split cannot fix
The limits of the material matter. OGB supplies public datasets and an evaluation protocol. It demonstrates that fixed splits make methods comparable; it does not demonstrate that a model trained under its splits will do well on your business graph.[1] Its scale and domains may be far from yours, and using its leaderboard as procurement evidence is a category error: the leaderboard measures relative method performance on those graphs, not data quality.
A second limit: a split cannot fix a feature problem. If node features include a downstream product of the label — a field like "flagged by risk control" — no split will stop the model learning that field. This is especially hidden on graphs because features are joined from several upstream tables and nobody can state the generation time of each column. The only move is to walk the feature list asking whether each was generated before the label time, and demote whatever fails to analysis-only.
A third limit: graph consistency is hard to verify. Between two exports of the same graph, the node ID mapping may change, edge directions may be added, deduplication rules may differ. None of that raises an error; all of it moves your metrics. So besides the split, ask for the export script or at least the export parameters. Otherwise you cannot tell whether a difference between runs came from the model or from the graph.
One thing you can do today: load the edge table, take every edge flagged test, and look each one up in the training graph. A hit count of zero means the split is clean at least at this layer. A non-zero count means no later metric is worth reading. The check takes ten minutes, needs no GPU and no labels, and it is the best value you will get from this batch.
