Detecting Bibliographic Leakage in Materials Science ML Models
The materials-confounding-check CLI applies the Clever Materials falsification test to reveal whether materials science ML models secretly learn from author, journal or year metadata instead of real chemistry.
Machine learning models trained on materials science datasets can sometimes learn to classify by bibliographic metadata—author, journal, publication year—rather than actual chemical structure. This pattern, known as bibliographic confounding or metadata leakage, makes models look accurate on paper while failing in real-world use. The Clever Materials paper (Jablonka et al., 2026) demonstrated this issue is widespread across five real materials science benchmark tasks.
To operationalize this finding, the materials-confounding-check CLI tool (invoked via mcc check) runs four falsification sub-tests: a metadata classifier that checks if bibliographic info can be predicted from chemical descriptors, a 'bibliographic footprint' test comparing a metadata-only model against one using real descriptors, a group/time-based split test measuring performance collapse when splitting by author or year, and a final verdict scoring confounding risk as low, medium, or high.
To avoid the trap of arbitrarily tuned thresholds (the Clever-Hans anti-pattern), the tool relies on a deterministic null distribution built from 100 permutations, using the 95th percentile to make decisions, and validates its detection logic against an independently constructed fixture with injected confounding, remaining stable across four different seeds. Since generic tabular leakage scanners like Giskard don't cover this materials-science-specific bibliographic test, the project fills a real gap for the field. It is released under the AGPL-3.0 license with roughly 88% test coverage.