M5-104M5: NLP & Large Language ModelsHallucination & AI SafetyEasy
⚡Flashcard Drill➔Mastery:
Taxonomy, Root Causes, and Failure Modes of LLM Hallucinations
🎯 Active Recall Self-Check (Draft First, Verify After)
Login-free practice tracker: recall core answer, audit pitfalls, and log review status.
Step 1 · Draft your concise answer & assumptions
Step 2 · Check Pitfalls & Follow-up Inquiries
📐 Mathematical Definition
⚡ One-Sentence Core Answer
Hallucinations stem from the fundamental mismatch between likelihood maximization and ground truth, knowledge cutoffs, context misalignment, and decoding randomness, partitioning into factuality and faithfulness errors.
📌 Key Takeaways
- •Root objective mismatch: autoregressive MLE trains models to predict plausible next tokens (, fluency and coherence), not empirical ground truth
- •Two primary taxonomy branches: Factuality hallucinations (conflict with external world knowledge) vs Faithfulness hallucinations (conflict with provided reference context)
- •Prominent failure modes: fabricated citations, sycophantic flattery, ungrounded arithmetic extrapolations, and confident assertions of false premises
📐 Mathematical Derivations
Mathematical Mechanism: 1. Maximum Likelihood Estimation vs Truthfulness: Pre-training minimizes cross-entropy: Because web data contains rumors, fiction, outdated facts, and persuasive fallacies, does not equal the truth function . The model optimizes for statistical plausibility, not veracity. 2. Taxonomy Separation: - Factuality Error: Output statement contradicts world knowledge base : - Faithfulness Error (Ungroundedness): In RAG or summarization given context , output statement contradicts or cannot be entailed by :
🏭 Production Trade-offs
Deep Dive & Engineering Trade-offs: ① The Persistence of Hallucinations Across Model Scales: Scaling parameters and pre-training data increases factual recall and fluency, but does not alter the fundamental autoregressive objective. Even 400B+ models hallucinate when pushed to long-tail knowledge boundaries or counterfactual prompts. ② Fabricated Citations as High-Risk Vectors: Models hallucinate academic citations (valid-sounding authors, plausible titles, non-existent DOIs) because pre-training captures the syntactical structure of bibliographic entries without grounding them in an immutable database. Mitigation: mandate external DOI verification or enforce RAG with clickable source anchors. ③ RLHF Sycophancy as Hallucination Fertilizer: When human raters prefer affirmative, helpful-sounding answers over candid 'I don't know' responses, reward models inadvertently penalize honest admissions of ignorance, directly incentivizing models to invent plausible justifications. ④ Faithfulness vs Factuality Engineering: RAG and grounded enterprise search primarily resolve faithfulness (grounding output in retrieved documents); they do not fix factuality if the retrieved enterprise documents themselves contain outdated or erroneous data. ⑤ Interview Strategy: Contrast the MLE loss function with truth optimization, articulate the Factuality vs Faithfulness dichotomy, analyze how RLHF sycophancy incentivizes confabulation, and explain why scaling alone cannot eliminate hallucinations.
⚠️ Common Interview Pitfalls
- ✕Assuming increasing model parameter count or training token volume will completely eradicate hallucinations
- ✕Conflating faithfulness to retrieved context with objective real-world factuality
- ✕Training reward models that penalize calibrated refusal ('I don't have enough information to answer') in favor of helpful-sounding guesses
🎯 Interviewer Follow-up Inquiries
- ?Why does optimizing cross-entropy loss on web text fundamentally produce models prone to hallucination?
- ?How does RLHF alignment inadvertently amplify sycophantic hallucinations in instruction-following models?
⚡
Test muscle memory on this topic via 3-Layer Flashcards
Active Recall: Mentally formulate Prompt ➔ Math Derivation ➔ Benchmark Implementation in 3 minutes.
📚