Equivalent DNA Should Not Change The Answer
Reverse complements and small window shifts preserve the local sequence event, yet a classifier can react to orientation or absolute position instead of biology.
strandshift enumerates both strands and configurable offsets, evaluates one prediction function, and turns disagreement into a release gate.
The Demo
Nine offsets on two strands create 18 equivalent views. Their predictions span 0.7309 around a 0.5855 consensus, so the fixture correctly fails its invariance budget.
This audits a supplied predictor. It does not establish biological validity, calibration, or robustness to unseen sequence families.
Research Basis
Nucleotide Transformer highlights the growing use of foundation models across diverse genomic prediction tasks, making invariance checks a practical deployment requirement.
Read the Nucleotide Transformer.