ElemedexA pocket encyclopedia of AI architectures
Clever Hans

Legendary · L03 · 1907

Clever Hans

Shortcut

It taps its hoof until it reaches the right number, as long as someone in the room knows it. It cannot do arithmetic; it can read the questioner's head. Every so often it reappears, in the shape of a neural network, at the top of some benchmark.

Origin: Oskar Pfungst, Clever Hans (The Horse of Mr. von Osten) (1907; English translation 1911)

Hans was a horse that, in the early twentieth century, appeared to solve additions, multiplications and divisions by tapping its hoof. His story left the most quoted lesson in AI evaluation: a system can give the right answer for the wrong reasons.

The story

His owner, Wilhelm von Osten, a former mathematics teacher at a Gymnasium, exhibited him to crowds in Berlin. In September 1904 a commission that included the psychologist Carl Stumpf found no tricks and no intentional signals: the horse answered even when his owner was away. Oskar Pfungst, of the Berlin Psychological Institute, then designed the decisive control. He compared the "procedure with knowledge" (the questioner knows the answer) with the "procedure without knowledge" (nobody does). With numbers written on cards that none of those present could see, Hans was right 8% of the time; when the questioner knew them, 98% (Pfungst, 1907/1911).

The explanation, in Stumpf's words, lay in the "unintentional minimal movements of the horse's questioner" (Pfungst, 1907/1911). Questioners leaned slightly forward when Hans began to tap and, when the right number was reached, made a small involuntary upward movement of the head: the signal to stop. Pfungst confirmed this in the laboratory by playing the horse himself with twenty-five people; all but two produced the same movements without noticing.

The Hans effect in AI

M. Mitchell (2019) tells how the analogy became common currency in deep learning, with examples such as a network that seemed to recognize animals but had in fact learned that animal photos tend to have blurred backgrounds (2019, ch. 6). The most literal case was documented by Lapuschkin et al. (2019): a classifier trained on the PASCAL VOC dataset recognized "horses" largely by a source tag present in about one fifth of those photos; paste the tag onto a picture of a car, and the car became a horse. The general phenomenon is known as shortcut learning, a label popularized by Geirhos et al. (2020).

In language, the canonical case is BERT. Niven & Kao (2019) showed that its strong performance on an argument-comprehension task dropped to chance once certain lexical cues were neutralized, and McCoy et al. (2019) that in natural language inference it relied on syntactic heuristics such as "if every word of the hypothesis appears in the premise, it is an entailment" (Bender & Koller, 2020, p. 5186). Their test set, HANS, includes pairs such as "The doctor was paid by the actor" / "The doctor paid the actor," where that heuristic fails (2019, p. 3429); the acronym, though the paper does not say so, is hardly an accident. A 2019 piece cited by Bender and Koller is titled, bluntly, "NLP's Clever Hans moment has arrived" (Bender & Koller, 2020, p. 5192).

The lesson

Pfungst's control is still the template: remove the suspect cue and see whether the competence survives. Its current equivalents are adversarial datasets, out-of-distribution tests (see generalization), interpretability analyses, and vigilance about data contamination. Chollet (2019) gives the general version: once an objective is fixed, developing a solution will tend to take every shortcut available, "whether this process is gradient descent or human-driven research" (2019, sec. II.1.1). But the story has a second, less quoted moral: Hans was not stupid. He was an extraordinary reader of human behavior. He had a real skill, just not the one he was credited with.

Sources

  • Bender, E. M., & Koller, A. (2020). Climbing towards NLU: On meaning, form, and understanding in the age of data. In D. Jurafsky, J. Chai, N. Schluter, & J. Tetreault (Eds.), Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics (pp. 5185–5198). Association for Computational Linguistics. https://doi.org/10.18653/v1/2020.acl-main.463 §
  • Buckner, C. J. (2024). From deep learning to rational machines: What the history of philosophy can teach us about the future of artificial intelligence. Oxford University Press. https://doi.org/10.1093/oso/9780197653302.001.0001 §
  • Chollet, F. (2019). On the measure of intelligence (arXiv:1911.01547). arXiv. https://doi.org/10.48550/arXiv.1911.01547 §
  • Geirhos, R., Jacobsen, J.-H., Michaelis, C., Zemel, R., Brendel, W., Bethge, M., & Wichmann, F. A. (2020). Shortcut learning in deep neural networks. Nature Machine Intelligence, 2(11), 665–673. https://doi.org/10.1038/s42256-020-00257-z §
  • Lapuschkin, S., Wäldchen, S., Binder, A., Montavon, G., Samek, W., & Müller, K.-R. (2019). Unmasking Clever Hans predictors and assessing what machines really learn. Nature Communications, 10(1), Article 1096. https://doi.org/10.1038/s41467-019-08987-4 §
  • McCoy, R. T., Pavlick, E., & Linzen, T. (2019). Right for the wrong reasons: Diagnosing syntactic heuristics in natural language inference. In A. Korhonen, D. Traum, & L. Màrquez (Eds.), Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics (pp. 3428–3448). Association for Computational Linguistics. https://doi.org/10.18653/v1/P19-1334 §
  • Mitchell, M. (2019). Artificial intelligence: A guide for thinking humans. Pelican Books. §
  • Niven, T., & Kao, H.-Y. (2019). Probing neural network comprehension of natural language arguments. In A. Korhonen, D. Traum, & L. Màrquez (Eds.), Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics (pp. 4658–4664). Association for Computational Linguistics. https://doi.org/10.18653/v1/P19-1459 §
  • Pfungst, O. (1911). Clever Hans (the horse of Mr. von Osten): A contribution to experimental animal and human psychology (C. L. Rahn, Trans.). Henry Holt and Company. https://doi.org/10.5962/bhl.title.56164 (Original work published 1907) §