GAVEL

Rule-based safety for LLMs — bringing signature-based cyber defense to AI.

📄 ICLR 2026 · Rank A* 🎤 Black Hat USA 2026 💻 Open Source

 

The Vision

For decades, the cybersecurity world has relied on rules and signatures — firewalls, antivirus, and intrusion detection systems that the community can write, share, and update the moment a new threat appears, without rebuilding the underlying system. We don’t have this in AI safety. Today, keeping a model safe usually means retraining it or bolting on a black-box classifier that nobody can inspect, adjust, or trust.

GAVEL brings rule-based, signature-style security from cyber into AI safety. It is:

 

How It Works

Think of it as a security camera for a model’s mind. As the LLM processes a prompt and drafts a response, GAVEL taps into its internal activations and checks them against a set of rules:

Model activations Cognitive Element probes
e.g. "making a threat", "payment processing"
Logical rule engine
e.g. IF threat AND payment THEN block
Remediation
Stop, Refuse, Disclose, Steer, ...

  1. Cognitive Elements (CEs) are small, interpretable concepts — like “making a threat” or “processing a payment” — each detected by a lightweight probe trained on the model’s own internal activations.
  2. Rules combine CEs with simple logic (“IF this CE AND NOT that CE, THEN flag”) to capture nuanced, domain-specific behavior with much higher precision than a single end-to-end classifier.
  3. Because CEs and rules are separate, modular pieces, anyone can compose a new rule from existing CEs — or contribute a new CE — without retraining anything.

Rules and CEs are model-agnostic — they describe behaviors, not any one model’s internals, so the community can write, share, and reuse them freely across different LLMs. A rule only becomes model-specific the moment a model owner sets up their own GAVEL instance and trains CE probes on that particular model’s activations to classify against it.

 

What We Offer the Community

⚙️ GAVEL

The open-source core engine: extract activations, train Cognitive Element probes, calibrate thresholds, and evaluate rule-based safety policies.

github.com/Offensive-AI-Lab/gavel →

🖥️ GAVEL Studio

A web GUI for authoring rules in plain English, AI-assisted ("agentic") rule and CE generation, live monitoring, and one-click access to the community rule registry.

github.com/Offensive-AI-Lab/gavel-studio-v2.0 →

📚 Rule Registry

A public, community-contributed library of Cognitive Elements and rules — the AI-safety equivalent of a shared signature feed. Browse every rule, CE, and dataset in the live viewer.

Browse the library → Opens at launch

 

Publications & Talks

GAVEL: Towards Rule-Based Safety Through Activation Monitoring
Shir Rozenfeld, Rahul Pankajakshan, Itay Zloczower, Eyal Lenga, Gilad Gressel, Yisroel Mirsky. ICLR 2026. Rank A*

Rules for Neural Traffic: A New Defensive Layer for LLMs
Black Hat USA 2026 Briefing.

GAVEL: Rule-Based Security over LLM Activations
Stanford University, Real World AI Security (USA 2026)

 

Contributors

 

Get Involved

GAVEL is built to grow with its community. Explore the code, try GAVEL Studio, or reach out if you’d like to contribute a rule, a Cognitive Element, or an integration.

Offensive AI Lab on GitHub · Contact Us

 


Funded by the European Union - ERC

Funded by the European Union, ERC Starting Grant AGI-Safety (GA 101222135)

Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or the European Research Council Executive Agency. Neither the European Union nor the granting authority can be held responsible for them.