🧠 MCA: teaching 7B LLMs when *not* to answer I built MCA (Metacognitive Control Architecture), an open-source neuro-symbolic layer that wraps any LLM. Before an answer goes out, MCA asks: is the question itself sound? 5 layers: 1️⃣ Premise validator: an NLI cross-encoder checks the question's hidden assumptions 2️⃣ Semantic entropy: samples the model several times and measures how much the meanings disagree 3️⃣ Z3 logic engine: finds paradoxes and contradictions 4️⃣ Evidence verifier: grounds claims in a retrieval knowledge base 5️⃣ Policy gate: returns PASS / CHALLENGE / ABSTAIN / EXPLAIN_PARADOX 📊 Benchmark: 100 adversarial questions (paradoxes, false premises, missing data, control facts), Kaggle 2×T4 ▪️ Qwen2.5-7B: accuracy 0.48 → 0.94 | false acceptance 56% → 0% ▪️ DeepSeek-R1-Distill-7B: accuracy 0.36 → 0.90 | false acceptance 65% → 0% ▪️ Llama-3-8B: accuracy 0.30 → 0.85 | false acceptance 89% → 1% Raw Llama-3 happily answered 89% of the trap questions. Wrapped in MCA, it caught every paradox (25/25). ⚖️ Honest caveats: • MCA refuses more ordinary facts (20–52%) • It adds 4–10× latency • The knowledge base was written with the benchmark topics in mind Calibrating the thresholds is next. 🔗 Try it and break it: 🚀 Demo: Mati83moni/mca-metacognitive-explorer 📚 Dataset: Mati83moni/mca-adversarial-benchmarks 💻 Code: https://github.com/Mati83mon/MCA 📓 Kaggle: https://www.kaggle.com/code/mateuszpiesiak/mca-gpu-evaluator 🔗 https://www.kaggle.com/discussions/general/759501 Feedback and adversarial questions very welcome! 🙏 #LLM #Hallucination #NeuroSymbolic #AISafety #OpenSource