[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-82515-en":3,"doc-seo-82515-105":29,"detail-sidebar-cat-0-en-105":90},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":4,"is_deleted":4,"is_public":20,"is_downloadable":20,"audit_status":20,"page_count":21,"language":22,"language_code":23,"site_id":24,"html_lang":23,"table_of_contents":25,"faqs":26,"seo_title":13,"seo_description":14,"update_tm":27,"read_time":28},82515,687197100911,"Himbo","https://ap-avatar.wpscdn.com/avatar/a000239b6f1da00475?x-image-process=image/resize,m_fixed,w_180,h_180&k=1782698725881665579",8,"Research & Report","Understanding Why Language Models Hallucinate: Testing Reasoning Against Priors","Large language models often generate hallucinated answers that violate constraints stated in prompts. A core diagnostic issue is whether such failures stem from missing knowledge or from correct facts being used along an incorrect inference route. The work frames hallucination as inference misalignment, proposing a latent key–task model where pretraining-frequency imbalance makes shortcut paths dominate constraint-sensitive reasoning. It formalizes two failure modes and introduces TRAPQA with SCIENTISTQA and REAL-LIFE CONSTRAINED QA to test them under tool-free conditions.","Understanding Why Language Models Hallucinate: Testing Reasoning Against Priors  \nYangfan Hu* Xuhan Tong∗ Haoyue Bai∗† Xi Ding Shashank Muralidhar Bharadwaj Siyang Cao  \nRobert Nowak Jiawei Zhang†  \nUniversity of Wisconsin–Madison  \nProject page  \narXiv :2607 .00447v 1 [ cs .CL] 1 Jul 2026  \nAbstract  \nLarge language models often produce hallucinated answers that violate prompt-level constraints. A key diagnostic question is whether these failures reflect missing knowledge, or whether the model has the relevant information but follows the wrong inference path. We study this phenomenon as inference misalignment: a mismatch between the answer supported by the prompt and the answer favored by statistically salient latent associations. We formalize this view with a latent key–task model, in which pretraining-frequency imbalance can cause a shortcut path to dominate the constraint-sensitive path and induce positive inference loss. The framework predicts two failure modes: task-retrieval bias in entity disambiguation and key-selection bias in action choice. We introduce TRAPQA, a controlled diagnostic testbed with two components. SCIENTISTQA tests disambiguation among similar scientists with supplementary factual probes, while REAL-LIFE CONSTRAINED QA tests everyday constraint following under salient shortcuts. Our results show that hallucination can arise from biased latent inference rather than absent knowledge alone.  \n1 Introduction  \nLarge language models (LLMs) have achieved strong performance across many tasks (OpenAI et al., 2024 ; Team et al., 2025 ; DeepSeek-AI et al., 2025 ; Grattafiori et al., 2024) . They are also increasingly integrated with tools and agentic workflows, such as web search and external services (Nakano et al., 2022 ; Liu et al., 2023 ; Steinberger, 2026) . As model outputs become more tightly coupled to real-world actions, hallucination remains a central reliability risk.  \n*Equal contribution. Author order was randomly determined.  \n†Correspondence to: {haoyue.bai,jiawei.zhang}@wisc.edu.  \nHallucination broadly refers to fluent but factually incorrect, unsupported, or context-unfaithful outputs (Ji et al., 2023 ; Huang et al., 2025) . Such errors are difficult to detect when models sound confident or when users lack domain expertise, and they can be amplified in agentic settings through downstream tool calls or transactions. Importantly, hallucinations can arise even under benign inputs, making them an intrinsic reliability problem rather than only a failure under adversarial attack (Zhang et al., 2025b ; Huang et al., 2025) .  \nPrior work studies hallucination through training-data bias, decoding dynamics, and attribution or mechanistic analysis (Dziri et al., 2022 ; Zhang et al., 2023 ; Sun et al., 2025a ; Gao et al., 2025) . Existing evaluations such as TruthfulQA and HaluEval measure important aspects of truthfulness and hallucination behavior (Lin et al., 2022 ; Li et al., 2023) . However, a central mechanistic question remains underexplored: when a model fails, did it lack the needed knowledge, or did it possess the relevant facts but retrieve and apply the wrong inference path?  \nWe address this question by interpreting hallucination as inference misalignment: a mismatch between the answer logically supported by the prompt and the answer favored by statistically salient learned associations. In our framework, a prompt activates latent key–task paths. A model hallucinates when a high-frequency shortcut path receives greater posterior weight than the constraintsensitive path required by the prompt. This view predicts that errors can occur even when the relevant facts or constraints are available: the failure lies not only in stored knowledge, but in selecting and composing the appropriate inference path.  \nGuided by this theory, we introduce TRAPQA, a closed-book diagnostic benchmark suite with two complementary settings. SCIENTISTQA targets task-retrieval bias, where a salient entity– relation as","cbCaipbnjmtAwqv0","https://ap.wps.com/l/cbCaipbnjmtAwqv0","pdf",1430278,1,24,"English","en",105,"# Introduction\n## Hallucination as inference misalignment\n## TRAPQA: SCIENTISTQA\n## TRAPQA: REAL-LIFE CONSTRAINED QA","[{\"question\":\"What question does the paper address about hallucinations in language models?\",\"answer\":\"It investigates whether hallucinated failures come from missing knowledge or from using the relevant facts but following the wrong inference path.\"},{\"question\":\"How does the paper explain hallucination using its proposed theory?\",\"answer\":\"It treats hallucination as inference misalignment, where a latent shortcut path favored by salient learned associations outweighs the constraint-sensitive path implied by the prompt.\"},{\"question\":\"What is TRAPQA and what are its main components?\",\"answer\":\"TRAPQA is a controlled diagnostic benchmark with two parts: SCIENTISTQA tests entity disambiguation retrieval bias, and REAL-LIFE CONSTRAINED QA tests everyday constraint following key-selection bias.\"}]",1784181071,60,{"code":4,"msg":30,"data":31},"ok",{"site_id":24,"language":23,"slug":32,"title":13,"keywords":33,"description":14,"schema_data":34,"social_meta":85,"head_meta":87,"extra_data":89,"updated_unix":27},"understanding-why-language-models-hallucinate-testing-reasoning-against-priors","",{"@graph":35,"@context":84},[36,53,67],{"@type":37,"itemListElement":38},"BreadcrumbList",[39,43,47,50],{"item":40,"name":41,"@type":42,"position":20},"https://docshare.wps.com","Home","ListItem",{"item":44,"name":45,"@type":42,"position":46},"https://docshare.wps.com/document/","Document",2,{"item":48,"name":12,"@type":42,"position":49},"https://docshare.wps.com/document/research-report/",3,{"item":51,"name":13,"@type":42,"position":52},"https://docshare.wps.com/document/understanding-why-language-models-hallucinate-testing-reasoning-against-priors/82515/",4,{"url":51,"name":13,"@type":54,"author":55,"headline":13,"publisher":57,"fileFormat":60,"inLanguage":23,"description":14,"dateModified":61,"datePublished":61,"encodingFormat":60,"isAccessibleForFree":62,"interactionStatistic":63},"DigitalDocument",{"name":9,"@type":56},"Person",{"url":40,"name":58,"@type":59},"DocShare","Organization","application/pdf","2026-07-16",true,{"@type":64,"interactionType":65,"userInteractionCount":4},"InteractionCounter",{"@type":66},"ViewAction",{"@type":68,"mainEntity":69},"FAQPage",[70,76,80],{"name":71,"@type":72,"acceptedAnswer":73},"What question does the paper address about hallucinations in language models?","Question",{"text":74,"@type":75},"It investigates whether hallucinated failures come from missing knowledge or from using the relevant facts but following the wrong inference path.","Answer",{"name":77,"@type":72,"acceptedAnswer":78},"How does the paper explain hallucination using its proposed theory?",{"text":79,"@type":75},"It treats hallucination as inference misalignment, where a latent shortcut path favored by salient learned associations outweighs the constraint-sensitive path implied by the prompt.",{"name":81,"@type":72,"acceptedAnswer":82},"What is TRAPQA and what are its main components?",{"text":83,"@type":75},"TRAPQA is a controlled diagnostic benchmark with two parts: SCIENTISTQA tests entity disambiguation retrieval bias, and REAL-LIFE CONSTRAINED QA tests everyday constraint following key-selection bias.","https://schema.org",{"og:url":51,"og:type":86,"og:title":13,"og:site_name":58,"og:description":14},"article",{"robots":88,"canonical":51},"index,follow",{"doc_id":7,"site_id":24},{"code":4,"msg":5,"data":91},[92,96,100,104,108,113,118,121,126,129,133],{"id":20,"doc_module":4,"doc_module_name":45,"category_name":93,"show_sort_weight":94,"slug":95},"Story & Novel",90,"story-novel",{"id":46,"doc_module":4,"doc_module_name":45,"category_name":97,"show_sort_weight":98,"slug":99},"Literature",80,"literature",{"id":52,"doc_module":4,"doc_module_name":45,"category_name":101,"show_sort_weight":102,"slug":103},"Exam",70,"exam",{"id":105,"doc_module":4,"doc_module_name":45,"category_name":106,"show_sort_weight":28,"slug":107},5,"Comic","comic",{"id":109,"doc_module":4,"doc_module_name":45,"category_name":110,"show_sort_weight":111,"slug":112},6,"Technology",50,"technology",{"id":114,"doc_module":4,"doc_module_name":45,"category_name":115,"show_sort_weight":116,"slug":117},7,"Healthcare",40,"healthcare",{"id":11,"doc_module":4,"doc_module_name":45,"category_name":12,"show_sort_weight":119,"slug":120},30,"research-report",{"id":122,"doc_module":4,"doc_module_name":45,"category_name":123,"show_sort_weight":124,"slug":125},9,"Religion & Spirituality",20,"religion-spirituality",{"id":124,"doc_module":4,"doc_module_name":45,"category_name":127,"show_sort_weight":124,"slug":128},"World Cup","world-cup",{"id":130,"doc_module":4,"doc_module_name":45,"category_name":131,"show_sort_weight":130,"slug":132},10,"Lifestyle","lifestyle",{"id":134,"doc_module":4,"doc_module_name":45,"category_name":135,"show_sort_weight":105,"slug":136},19,"General","general"]