Post
116
π§ 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
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