This position paper from researchers at the University of Toronto and Oxford presents a sobering reality check for the AI safety community: the way we currently "censor" Large Language Models (LLMs) is fundamentally, mathematically broken. By drawing on classical computability theory and cryptography, the authors argue that trying to block "bad" content based on its meaning (semantics) is a losing game. Instead, they propose a shift toward "syntactic censorship"—restricting models to rigid, verifiable output structures.
The Illusion of Semantic Censorship
As LLMs are integrated into tools like APIs, web browsers, and code interpreters, the risk of malicious use—such as generating malware or crafting social engineering attacks—grows exponentially. Currently, the industry attempts to prevent this through semantic censorship: using Reinforcement Learning from Human Feedback (RLHF) to align models or deploying external moderation models to scan inputs and outputs for harmful meaning.
The authors argue these methods are "leaky" by design. We are treating censorship as a fuzzy machine learning problem when it actually faces hard theoretical limits similar to those found in cybersecurity and computer science theory.
1. The Undecidability Trap
If an LLM is capable of writing code, a censor trying to determine if that code is "malicious" is effectively trying to solve the Halting Problem. Drawing on Rice’s Theorem, the authors point out that any non-trivial property of a program's behavior is mathematically undecidable. It is theoretically impossible to build a perfect, universal semantic censor.
2. The Encryption Loophole
Modern LLMs like GPT-4 are highly capable of following complex instructions, including using ciphers. Because they can perform invertible transformations (like encryption), an LLM can effectively create a private, encrypted channel with a user. A third-party moderation model cannot distinguish between a "safe" string and an "encrypted harmful" string without knowing the key.
In qualitative probing, the authors demonstrated that while GPT-3.5 often fails to follow complex encrypted instructions, GPT-4-turbo successfully provided steps for creating an explosive device when the conversation was conducted in a Caesar cipher. While GPT-4 could identify the harmful nature of the decrypted text, moderation models failed to flag the encrypted version.
3. Mosaic Prompts and Compositionality
Another critical vulnerability is the inability of semantic censors to detect compositional threats. An attacker does not need to explicitly ask for a "phishing site." Instead, they can ask for a "professional email template," then a "login form UI," and finally a "script to save form data to a file."
Each individual request is permissible and will pass semantic filters. However, the combination of these benign outputs creates a severe threat. Since LLMs and their censors often lack global context across different sessions or queries, they cannot detect this assembly.
The Proposed Solution: Syntactic Censorship
The authors argue that "alignment" (making the model want to be good) is not a true security guarantee. Real security requires syntactic censorship, where the model is physically unable to output anything that does not fit a pre-approved, safe template.
Instead of trying to understand what a model says, syntactic censorship strictly controls the structure of what it is allowed to output. By restricting outputs to a finite set of pre-approved structures where only specific, safe variables can be filled, developers can provide mathematical guarantees against certain types of malicious use.
Limitations and Future Directions
The primary limitation of Syntactic Censorship is that it severely restricts the model's capabilities. Forcing an LLM into a set of pre-approved templates turns a creative, generative agent into a sophisticated lookup table, sacrificing the very utility that makes LLMs valuable in the first place.
To address this, the authors suggest several future directions:
- Access Control Frameworks: Developing systems (similar to the Bell-LaPadula model in cybersecurity) to manage how information flows between different security levels within LLM applications.
- Balancing Utility and Security: Exploring the trade-off between the open-ended utility of LLMs and the verifiable security provided by syntactic templates.
- Representation Engineering: Investigating new methods that sit between fuzzy semantic alignment and rigid syntactic templates to offer better security without completely nerfing the model.
Ultimately, this paper serves as a call to action: we must re-evaluate the goals of LLM censorship and move toward security paradigms that offer verifiable guarantees rather than relying on fallible semantic understanding.
Summary updated