{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/overthinking-the-truth-understanding-how","title":"Overthinking the Truth: Understanding how Language Models Process False Demonstrations","arxiv_id":"2307.09476","date":"2023-07-18","proceeding":null,"authors":["Danny Halawi","Jean-Stanislas Denain","Jacob Steinhardt"],"abstract":"Modern language models can imitate complex patterns through few-shot learning, enabling them to complete challenging tasks without fine-tuning. However, imitation can also lead models to reproduce inaccuracies or harmful content if present in the context. We study harmful imitation through the lens of a model's internal representations, and identify two related phenomena: \"overthinking\" and \"false induction heads\". The first phenomenon, overthinking, appears when we decode predictions from intermediate layers, given correct vs. incorrect few-shot demonstrations. At early layers, both demonstrations induce similar model behavior, but the behavior diverges sharply at some \"critical layer\", after which the accuracy given incorrect demonstrations progressively decreases. The second phenomenon, false induction heads, are a possible mechanistic cause of overthinking: these are heads in late layers that attend to and copy false information from previous demonstrations, and whose ablation reduces overthinking. Beyond scientific understanding, our results suggest that studying intermediate model computations could be a promising avenue for understanding and guarding against harmful model behaviors.","url_abs":"https://arxiv.org/abs/2307.09476v3","url_pdf":"https://arxiv.org/pdf/2307.09476v3.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"overthinking-the-truth-understanding-how","repo_url":"https://github.com/dannyallover/overthinking_the_truth","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok"}}],"tasks":[{"task_slug":"few-shot-learning","task_name":"Few-Shot Learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2307.09476","atlas_url":"https://app.syntology.ai/?focus=2307.09476","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2307.09476"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/dannyallover/overthinking_the_truth","reach":{"status":"ok"}}],"summary":{"ran":8,"unverified":2},"by_repo_kind":{"official":{"samples":10,"ran":8,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":10,"samples":[{"code_sha256_prefix":"83c304ef49938669","entry":"get_correct_label_probs","repo":"dannyallover/overthinking_the_truth","repo_kind":"official","path":"dev/metrics.py","file_url":"https://github.com/dannyallover/overthinking_the_truth/blob/HEAD/dev/metrics.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"83c304ef49938669"}},{"code_sha256_prefix":"83378be3b09b1a03","entry":"get_layernorm","repo":"dannyallover/overthinking_the_truth","repo_kind":"official","path":"dev/model.py","file_url":"https://github.com/dannyallover/overthinking_the_truth/blob/HEAD/dev/model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"83378be3b09b1a03"}},{"code_sha256_prefix":"4aa463daadda3949","entry":"get_thresholds","repo":"dannyallover/overthinking_the_truth","repo_kind":"official","path":"dev/metrics.py","file_url":"https://github.com/dannyallover/overthinking_the_truth/blob/HEAD/dev/metrics.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4aa463daadda3949"}},{"code_sha256_prefix":"5564ba63fcde3983","entry":"get_unembed_matrix","repo":"dannyallover/overthinking_the_truth","repo_kind":"official","path":"dev/model.py","file_url":"https://github.com/dannyallover/overthinking_the_truth/blob/HEAD/dev/model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5564ba63fcde3983"}},{"code_sha256_prefix":"a8aa84fc7b81d121","entry":"mean_up_low","repo":"dannyallover/overthinking_the_truth","repo_kind":"official","path":"dev/utils.py","file_url":"https://github.com/dannyallover/overthinking_the_truth/blob/HEAD/dev/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a8aa84fc7b81d121"}},{"code_sha256_prefix":"3a1448e195c2dc72","entry":"to_numpy","repo":"dannyallover/overthinking_the_truth","repo_kind":"official","path":"dev/utils.py","file_url":"https://github.com/dannyallover/overthinking_the_truth/blob/HEAD/dev/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3a1448e195c2dc72"}},{"code_sha256_prefix":"3796bfbf111f4a87","entry":"zero_ablate","repo":"dannyallover/overthinking_the_truth","repo_kind":"official","path":"dev/hooks.py","file_url":"https://github.com/dannyallover/overthinking_the_truth/blob/HEAD/dev/hooks.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3796bfbf111f4a87"}},{"code_sha256_prefix":"ad24679c103d2075","entry":"zero_ablate_heads","repo":"dannyallover/overthinking_the_truth","repo_kind":"official","path":"dev/hooks.py","file_url":"https://github.com/dannyallover/overthinking_the_truth/blob/HEAD/dev/hooks.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ad24679c103d2075"}},{"code_sha256_prefix":"4a0acd62bd43241e","entry":"get_dataset","repo":"dannyallover/overthinking_the_truth","repo_kind":"official","path":"dev/prefixes.py","file_url":"https://github.com/dannyallover/overthinking_the_truth/blob/HEAD/dev/prefixes.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4a0acd62bd43241e"}},{"code_sha256_prefix":"f09803076d415f74","entry":"get_model_and_tokenizer","repo":"dannyallover/overthinking_the_truth","repo_kind":"official","path":"dev/model.py","file_url":"https://github.com/dannyallover/overthinking_the_truth/blob/HEAD/dev/model.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f09803076d415f74"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}