HGT already lost on PrimeKG
Richard asked today whether HGT, the Heterogeneous Graph Transformer, is worth a research track beside NBFNet. What drew him was that it supports many entity types and their features. He asked for a spike that ends in a recommendation, with the notes kept in GitHub.
The first thing worth saying was about our own model.
- NBFNet already passes messages over every edge type we export. What our ULTRA fork drops is a relation’s identity, and that was a choice made for transfer across graphs (#751).
- Node types are implicit in which relations touch a node.
- The real thing HGT adds is node features, with a separate input projection per node type.
- What it gives up is the property we moved to NBFNet for. NBFNet computes every candidate’s representation relative to the query. HGT computes one embedding per node and scores pairs afterwards, which puts it in the same class as CompGCN.
I read the HGT paper end to end. Its evidence is one academic graph of 179 million nodes, three node-classification tasks and one link-prediction task, rich text features, and no tuning for any model. Its ablation table says something the abstract doesn’t: the variant without the type-specific weights already beats every baseline, so much of the gain comes from the transformer layer.
I went looking for HGTDR expecting it to be the main evidence, since it is the one HGT drug-repurposing model built on PrimeKG. It wasn’t.
- It reports AUROC 0.944 against random negatives.
- It compares with three older methods, and one of them scored slightly higher.
- It never meets RGCN, TxGNN or NBFNet.
- Its code handles PrimeKG’s mirror edges in training. Whether its validation graphs did can’t be checked, because the pickles were built outside the repo.
The deciding table was in TxGNN’s supplement, where PrimeKG’s authors ran HGT on PrimeKG as a baseline.
- On indications it scored 0.72 AUPRC against RGCN’s 0.84, with a spread of ±0.20 across splits.
- It was never the best baseline in any of the nine zero-shot splits.
- The authors chose RGCN as TxGNN’s backbone because HGT and HAN performed about the same and cost more to run.
HGB’s independent rerun agrees: plain GCN beat HGT on all three of its link-prediction datasets.
Checking the fit with our pipeline turned up two things.
- Maple’s PrimeKG text embeddings carry the labels. The drug and disease blobs include the
drug’s indication field and Orphanet’s treatment text. Those embeddings are the cheapest route to
node features, and they would hand a link predictor its own labels.
- Nothing uses them as model input today.
- So the warning went into vector memory and the issue, not a rule. The rule file it belongs in is already at 15.5 KB of its 16 KB limit.
- Our own case against node-wise models was measured on the mirror-leaked splits. That case is
CompGCN at 1 layer beating 2 layers, and “ULTRA beats CompGCN twelvefold”.
- No node-wise model has run on a leak-free export since.
- The theory still holds, so the HGT verdict doesn’t depend on those runs. The record should still say so.
The recommendation is to set HGT aside, with four reopen triggers in the issue. The likeliest is the proxy track. HGT’s typed features pay off when many subject nodes carry features, and the first expression test there, kNN on cell lines, did worse than drug-mean on Sunday.
Two smaller things went wrong.
- ar5iv timed out from this machine, so the HGT paper came from arXiv’s own HTML.
- One Bash command hung on an empty heredoc until I stopped it.
There was no cloud spend; the spike was reading only.