Defend LLMs Through Self-Consciousness
Boshi Huang, Fabio Nonato de Paula

TL;DR
This paper presents a self-consciousness framework for LLMs that uses their reasoning abilities to autonomously defend against prompt injection attacks, improving security without external classifiers.
Contribution
It introduces a novel self-consciousness mechanism with Meta-Cognitive and Arbitration Modules enabling LLMs to self-regulate and defend against prompt injections.
Findings
Significant increase in defense success rates across seven LLMs.
Some models achieved perfect defense in Enhanced Mode.
Trade-off identified between defense effectiveness and computational overhead.
Abstract
This paper introduces a novel self-consciousness defense mechanism for Large Language Models (LLMs) to combat prompt injection attacks. Unlike traditional approaches that rely on external classifiers, our method leverages the LLM's inherent reasoning capabilities to perform self-protection. We propose a framework that incorporates Meta-Cognitive and Arbitration Modules, enabling LLMs to evaluate and regulate their own outputs autonomously. Our approach is evaluated on seven state-of-the-art LLMs using two datasets: AdvBench and Prompt-Injection-Mixed-Techniques-2024. Experiment results demonstrate significant improvements in defense success rates across models and datasets, with some achieving perfect and near-perfect defense in Enhanced Mode. We also analyze the trade-off between defense success rate improvement and computational overhead. This self-consciousness method offers a…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsWikis in Education and Collaboration · Law, AI, and Intellectual Property
