Post
107
๐ง 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