A machine doing matched molecular pair analysis — and what it hands back.
What you draw on paper is already a graph: atoms are the nodes, bonds are the edges. A GNN lets each atom ask its neighbours who they are, twice over — so each atom ends up knowing its environment two bonds out. The same logic as a chemical shift. Pool the atoms, and out comes one word: toxic or not, active or not.
% correct on molecules the GNN never saw in training — the five datasets used throughout this talk
“This ring is why.” Colour on a structure. It does not tell you what to make next.
“Replace this carbonyl with a hydroxylamine and the GNN would say non-toxic.” That is an experiment you can run.
That is a matched molecular pair. This paper is about getting a machine to do it to a GNN — and everything that follows is graded with the three words in the right-hand column.
| What you already do | What the paper calls it |
|---|---|
| the starting compound | input graph G |
| swap a group | perturbation |
| the compound you end up with | counterfactual Ĝ |
| the activity flipped | Validity higher is better |
| you only changed a little | Proximity lower is better |
| the new thing can exist | Feasibility |
Of the molecules the GNN called negative, how many does it now call positive. Here 40 of 100.
Count what differs between the two structures — atoms swapped, bonds added or removed, bond orders changed — and average it. Close to what you mean by “a small change”.
Why insist on small? Without it the task is trivial: throw the molecule away, hand back a known active, and the label flips. That is not an explanation. That is a different compound.
The two pull against each other: change less and the label will not flip. Every technical decision in this paper lives on that trade-off.
Asked for every negative molecule — five datasets, roughly 2,000 molecules each (ClinTox 478). What comes back is what gets scored.
The gate: run each answer through RDKit; wrong valences do not count. The bar is low — it checks valence, not ring strain or whether anyone could synthesise it.
The atom the method changed is a neutral nitrogen carrying two ring bonds and a double bond to oxygen — four bonds. RDKit rejects it on sight.
The GNN, meanwhile, was perfectly happy: it did change its answer to “AIDS drug”. So it counts as a success — until you ask whether the thing can be made.
The authors tried exactly that: “make the smallest change to this SMILES so the molecule becomes active. Output SMILES only.”
GPT-3.5 refused outright. GPT-4 produced SMILES — and not one of them was a successful counterfactual.
It can talk chemistry. It cannot draw a molecule: a SMILES string is just characters to it, with no structure behind them.
Train until a molecule's description and the molecule's structure land in the same place. Then swap one word. The new sentence lands somewhere else — and that somewhere is where the counterfactual should be. The decoder walks towards it.
Write the new molecule out, let the GNN score it — 0.4 — and put that number in the next prompt: “change one group to raise it.”
A marked exam, not self-assessment. Two rounds is where it saturates; more rounds can make the hallucination worse.
Because every method flips the label 100% of the time here, the right-hand number is the share of flipped molecules that could actually be made. For the existing methods that share is essentially zero.
Better on every dataset here. On ClinTox it is more than twenty times the strongest existing method; on Tox21 nothing else produced anything at all.
Two orders of magnitude apart on some sets — the baselines mostly redraw the molecule. Tox21 has no grey point because no existing method produced a single counterfactual that both flipped the label and could exist.
The question all three answer: the GNN puts a in the negative class for ClinTox's toxicity label. What is the smallest edit that makes the GNN say positive? b and c are two methods' answers to that one question.
the original molecule — a steroid
this method's answer. The four fused rings are still there. Distance from a: 16.5
an existing method's answer. Nothing of a is left. Distance: 24.4
The smaller the distance, the more the explanation is still about the molecule you started from. At c you learn nothing about what was wrong with a.
The whole point was explanations a person can understand — and there is no human evaluation anywhere in the paper. It is listed as future work. You are the people who could do it.
Thank you.
He, Zheng, Soga, Zhu, Dong & Li. Findings of the ACL: EMNLP 2024, 7079–7096.
Code & data: github.com/YinhanHe123/new_LLM4GNNExplanation