Empty scaffold allocation bias in molecular distribution shift evaluation
This paper reveals that standard scaffold-based evaluation methods introduce a hidden allocation bias by incorrectly treating chemically heterogeneous "no-scaffold" molecules as a single unit, which distorts generalization metrics across common benchmarks, and proposes an "Empty-Scaffold-Aware" repair to restore balanced representation and accurate performance assessment.
Original paper licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you are a chef trying to teach a robot how to cook. You want to know if the robot can actually learn the principles of cooking or if it's just memorizing specific recipes. To test this, you decide to give the robot a set of practice dishes (the training set) and then test it on completely new dishes it has never seen before (the test set).
In the world of AI chemistry, scientists use a method called Scaffold Splitting to do this. They group molecules by their "skeleton"—the core ring-and-linker structure that holds them together. The idea is simple: if you teach the robot about one type of skeleton, you should test it on a different skeleton to see if it really understands chemistry. If the robot fails on the new skeleton, it means it was just memorizing the old one.
But here is the twist: some molecules have no skeleton at all.
The "Ghost" Molecules
In chemistry, there's a standard way to find a molecule's skeleton. But for some weird, floppy, or tiny molecules, this process returns an empty bucket. These are the "no-scaffold" molecules. They don't share a common ring structure; they are a chaotic mix of leftovers.
The paper by Tao Song, Yong Wang, and their team at the China University of Petroleum (East China) and Tiangong University discovered a major glitch in how we test these AI chefs.
The Glitch:
Standard testing rules say: "Put all molecules with the same skeleton in the same group." But since "no-scaffold" molecules all have an empty skeleton, the computer treats them all as one single, giant group. It puts them all in the same bucket.
The Problem:
Because they are treated as one indivisible group, the computer often dumps all of these "ghost" molecules into the test set and leaves none of them in the training set.
- The Analogy: Imagine you are teaching a student to identify fruits. You show them apples, bananas, and oranges. But then, for the final exam, you give them a bowl of "mystery mush" (the no-scaffold molecules) that you never showed them before. You didn't teach them what "mush" looks like, but you expect them to guess the flavor.
- The Result: The student (the AI) fails miserably. But is it because the student is bad at chemistry? Or is it because you cheated by hiding the "mush" category entirely during practice?
How Common is This?
The authors didn't just guess; they looked at the data. They found that this "ghost" problem is everywhere:
- In 8 out of 16 popular datasets (MoleculeNet), more than 10% of the molecules had no skeleton.
- In some specific datasets like FreeSolv and QM7, nearly 50% of the molecules were "ghosts."
- In a massive collection of drug-testing tasks (Deep-PK/ADMET), 40 out of 73 tasks had more than 10% no-scaffold molecules.
The "Empty Bucket" is a Mess
The authors checked if these "ghost" molecules were actually similar to each other. They found they were not.
- Real skeleton groups are like a family of cousins; they look alike.
- The "no-scaffold" group is like a pile of random junk. The average similarity between them is only 0.110, which is barely higher than random noise.
- They are also very far away from the molecules the AI did learn. The closest "neighbor" a ghost molecule has in the training set is only 0.300 similar, whereas real families have neighbors that are 0.477 to 0.573 similar.
Because they are so different from the training data, the AI has no chance to learn them.
The Consequences: Why the Scores Lie
When the AI is tested on these "ghost" molecules without having seen them in training, the results are terrible, but not in a way that tells us the AI is "smart but unlucky."
1. For Classification (Yes/No questions):
The AI stops trying to rank things correctly. Its scores get squashed down to the "prior baseline."
- The Analogy: If you ask a student to rank 100 mystery items from "best" to "worst," and they have no idea what any of them are, they might just guess "medium" for everything.
- The Data: The authors found that the ranking performance dropped significantly. In the MoleculeNet datasets, the median score dropped from 0.259 (normal) to 0.035 (ghosts). In ADMET, it dropped from 0.409 to 0.119.
- The Shock: In the Tox21 dataset, the score plummeted to 0.018 for ghosts, compared to 0.303 for normal molecules. The AI wasn't just failing; it was giving up and guessing randomly.
2. For Regression (Number predictions):
The errors exploded.
- The Data: The relative error (relMAE) increased by 1.35-fold on average.
- The Extremes: In some cases, the error was 2-fold (double) or even 3-fold (triple) higher than normal. In MoleculeNet, 44.8% of the test points had at least double the error. This is huge compared to normal variations, which are usually tiny.
Did Other Methods Fix It?
The authors checked other popular ways to split data, like UMAP clustering, DataSAIL, and LoHi. They hoped these smarter methods would fix the problem.
- The Verdict: They didn't. While they didn't put all the ghosts in the test set like the standard method did, they still left the training set with very few ghosts.
- The Data: With standard splitting, the training set had 0% ghosts in the worst-case scenario. With DataSAIL, the training set still had only 14.7% of the ghosts, while the test set had 81.6%.
- The Conclusion: None of the current methods guarantee that the AI gets to practice on these "ghost" molecules before the test.
The Solution: "Empty-Scaffold-Aware" Repair (ESA)
The authors didn't just point out the problem; they built a patch called ESA.
- How it works: They kept the standard split for the "real" molecules (the ones with skeletons) but took the "ghost" molecules and carefully redistributed them. They made sure the training set got a fair share of the ghosts, while still keeping some in the test set to see if the AI can handle them.
- The Result: This fixed the imbalance. The training set went from having 14.7% ghosts to 26.0%. The test set went from having 81.6% down to 11.5%.
- Safety Check: They made sure this didn't cheat by letting the AI "peek" at the test answers. The similarity between the training ghosts and test ghosts stayed low, so the AI still had to learn them, not just memorize them.
The Takeaway
The paper argues that we can't just look at a high score and say, "Great, the AI is ready!" If the test set is full of "ghost" molecules that the AI never saw in training, that score is misleading. It's not a test of generalization; it's a test of how well the AI handles being thrown into the deep end without a life jacket.
The authors suggest that future tests must report three things clearly:
- How many "ghost" molecules are there?
- How many did the AI get to practice with?
- How many were left for the test?
Until we fix this, we might be overestimating how smart our molecular AI really is.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.