Shuffle the Questions to Catch an LLM That Memorized Its Benchmark
Benchmark scores you rely on may reflect memorisation, and this gives practitioners a cheap test to detect it.
A Towards Data Science tutorial presents a method for spotting when a language model has memorised the questions used to test it, rather than genuinely learning the skill. The trick is to shuffle the question order and see if results shift suspiciously. The author provides two short Python functions that run on a free Google Colab GPU and score a model in about half an hour. Anyone who compares AI models using standard benchmarks is affected.
This tutorial addresses the risk that published benchmark scores overstate a model's real ability because the model memorised the test set. The author ships two short Python functions that flag such contamination, scoring a model in about half an hour on a free Colab GPU. A score above a z-value of 3 warrants investigation; near zero suggests nothing is wrong. Teams buying or selecting models on benchmark evidence gain a low-cost verification step.
The method rearranges benchmark questions and computes a z-score on the resulting metric distribution to detect answer patterns consistent with memorisation rather than generalisation. Implementation is two Python functions runnable on a free Colab GPU, completing a scoring run in roughly 30 minutes. The author's decision rule: z above 3 merits a look; a near-zero score is unremarkable. The excerpt does not name the models or benchmarks tested.