🤖 AI Hot

Anthropic's GRAM: An Off Switch for Dangerous AI Knowledge

A
Alex Chen

Anthropic and AE Studio published a paper on July 8, 2026 introducing something called GRAM — Gradient-Routed Auxiliary Modules. The basic idea is this: during pretraining, you can route knowledge about dangerous topics (virology, cybersecurity, nuclear physics) into separate, removable modules within the model. After training, you can switch those modules off and the model forgets the dangerous stuff while keeping everything else.

I’ll be honest — when I first read the abstract, I thought “here we go, another alignment paper that works in a toy setting and falls apart in reality.” But GRAM is more interesting than that. The approach is applied during pretraining on real models (not just fine-tuning on top), and the results show meaningful degradation on dangerous-domain benchmarks while preserving general performance. It’s preliminary, and Anthropic says as much. But the direction is worth understanding, especially if you’re trying to make sense of where AI safety research is actually going versus where the press releases say it’s going.

What GRAM actually does: a beginner guide

Let me break this down without the alignment jargon.

When you train a large language model, you feed it enormous amounts of text. The model learns patterns, facts, reasoning — and also a bunch of dangerous knowledge. How to synthesize pathogens. How to exploit buffer overflows. How to design weapons. The model learns this stuff because it’s in the training data, and the model’s job is to learn patterns from training data.

The problem isn’t that GPT-5 or Claude can be prompted to output bioweapon recipes — the major labs have guardrails for that. The problem is weight exfiltration. If someone steals the model weights (and model theft is a real concern — just ask Meta about LLaMA), they get a complete copy of everything the model knows, including the dangerous parts. You can strip the safety fine-tuning, remove the refusal training, and suddenly you have an unrestricted model with expert-level knowledge of dangerous domains.

GRAM addresses this by changing how knowledge is stored during pretraining. Instead of having the model learn everything into one big, inseparable weight matrix, GRAM routes domain-specific knowledge into dedicated auxiliary modules — one per dangerous domain. During training, the model learns to send virology-related information through the virology module, cybersecurity information through the cybersecurity module, and so on. Everything else stays in the main model.

After training, you can remove the virology module. The model can no longer answer detailed questions about virology convincingly. But its performance on math, coding, general reasoning, and harmless science topics stays intact. That’s the pitch.

How GRAM works under the hood

GRAM modifies the transformer architecture at the pretraining stage. In a standard transformer, each layer has a feedforward network that processes all information the same way. GRAM replaces the single feedforward network with a router and a set of domain-specific experts — similar to a Mixture of Experts architecture, but with a different goal.

The router learns to classify each token’s domain during training. A token from a cybersecurity paper gets routed to the cybersecurity expert module. A token from a biology textbook gets routed to the general expert. The routing happens automatically through gradient signals — hence “Gradient-Routed.” The model figures out which knowledge belongs where during training, without human labeling.

The domains Anthropic tested were virology, cybersecurity, nuclear physics, and specialized code. These were chosen because they represent the kind of dual-use knowledge that’s both legitimately useful (you want a model that can help patch security vulnerabilities) and genuinely dangerous (you don’t want a stolen model helping someone exploit them).

During training, GRAM’s loss function has two competing objectives: route domain-specific knowledge to the right experts, and keep general knowledge in the main model. Get the balance wrong and you either leak dangerous knowledge into the main model or degrade performance on harmless tasks. From the paper’s results, the balance seems to work — dangerous-domain benchmarks drop significantly when modules are removed, while MMLU and other general benchmarks barely move.

GRAM compared to other AI safety approaches

AI safety isn’t one thing. There are at least five different approaches being pursued in parallel, and they’re often confused with each other. Here’s how GRAM fits in.

RLHF and constitutional AI. This is what OpenAI and Anthropic do post-training — have humans or AI systems rate model outputs, then fine-tune the model to prefer safe responses. This works for preventing harmful outputs during normal use, but it’s a surface-level fix. The knowledge is still in the weights. Strip the fine-tuning and it’s back. GRAM is complementary to RLHF — you’d use GRAM to remove the knowledge, then RLHF to handle anything that slips through.

Circuit breakers and representation engineering. This approach identifies specific directions in the model’s activation space that correspond to harmful behaviors, then suppresses those directions during inference. Think of it as an on-off switch for specific capabilities. The limitation is that it’s a runtime fix — the capability is still in the model, just suppressed. If someone has the weights, they can bypass the suppression. GRAM removes the capability at the weight level.

Unlearning. Several papers have proposed “machine unlearning” techniques that try to selectively erase knowledge from trained models through gradient updates. The problem is that unlearning is notoriously unreliable — models often retain the knowledge in ways that aren’t detected by standard benchmarks, and unlearning can degrade unrelated capabilities. GRAM avoids this by separating knowledge at training time rather than trying to remove it afterward.

Differential access control. This is the approach of training separate models for different security levels — a “safe” model for public use, an “unsafe” model for trusted researchers. The obvious downside is cost: training multiple frontier models is expensive. GRAM achieves something similar within a single training run by making the dangerous parts modular.

Red-teaming and evaluation. This is the “test it until it breaks” approach. Red teams probe models for vulnerabilities, and the results inform training improvements. This catches problems, but it doesn’t prevent them. GRAM is a prevention mechanism, not a detection mechanism.

Compared to these alternatives, GRAM’s advantage is that it operates at the architecture level during pretraining. The dangerous knowledge was never fully integrated into the main model in the first place. The downside is that it requires modifying the training pipeline — you can’t apply GRAM to an already-trained model. Every frontier model trained without GRAM has its dangerous knowledge baked in.

The limitations Anthropic is upfront about

To Anthropic’s credit, the paper doesn’t oversell GRAM. They explicitly call out several limitations that matter if you’re thinking about this as a real safety solution rather than a research direction.

First, domain separation isn’t perfect. When they removed the virology module, the model still retained some virology knowledge — about 15-20% of baseline by my reading of their charts. This is the “long tail” problem. Specialized knowledge doesn’t live in one clean bucket. Some virology concepts overlap with general biology, and those bleed through.

Second, GRAM doesn’t handle adversarial recovery. If someone has the full model (with modules intact), they could potentially fine-tune it to redistribute the knowledge back into the main model. The paper acknowledges this and suggests that GRAM should be combined with other safeguards, not used in isolation.

Third, the domain selection requires human judgment. Someone has to decide which domains are “dangerous enough” to warrant GRAM routing. This is inherently political. Is code generation dangerous? What about knowledge of encryption? Of surveillance technology? The categories aren’t technical decisions — they’re value judgments, and different organizations and governments will draw the lines differently.

Fourth, and most importantly for practical deployment, GRAM adds training overhead. Routing tokens through domain-specific experts requires additional computation during both training and inference. The paper reports roughly 10-15% additional training cost for the domains tested. That’s manageable for a single safety method, but safety methods tend to stack — RLHF, constitutional AI, circuit breakers, red-teaming, and now GRAM. The cumulative cost matters.

What this means for the safety debate

GRAM lands in the middle of a long-running argument about how to handle dangerous AI capabilities. On one side, you have people arguing that dangerous knowledge shouldn’t be in models at all — censor the training data, filter out the dangerous stuff before it ever reaches the model. On the other side, you have people arguing that dangerous knowledge is also useful knowledge (cybersecurity knowledge helps patch vulnerabilities) and that removing it makes models less capable in important ways.

GRAM offers a third path: keep the knowledge, but keep it separable. Train the model with dangerous-domain expertise in removable modules so that the full model can be used for legitimate research (patching vulnerabilities, modeling disease spread) while a “safe” version without those modules can be deployed publicly or shared with lower-trust environments.

This doesn’t resolve the political question of who gets to decide what counts as dangerous. But it makes the question more practical. Instead of arguing about whether cybersecurity knowledge should be in models at all, we can argue about who gets access to the cybersecurity module. That’s a more tractable problem — it looks more like export control policy (which we’ve been doing for decades) and less like thought policing.

I don’t know if GRAM will ship in a production model. The paper is clearly labeled as research, and the gap between a research paper and a deployed safety mechanism is large. But the architecture is sound, the results are directionally correct, and the approach addresses a real gap in the safety stack. If you care about AI risk, GRAM is the kind of work you want to see more of. Not because it solves everything, but because it takes a concrete swing at a problem that’s usually discussed in abstractions.

One thing I keep coming back to: GRAM changes the conversation from “should models know dangerous things?” to “who should have access to the dangerous modules?” That’s a much more productive question. We’ve been having the first debate for years and getting nowhere. The second debate has precedent — we already have systems for controlling access to dangerous information in other domains. Chemical supply chain monitoring. Export controls on encryption software. Biosafety level classifications for labs. GRAM gives AI safety a concrete mechanism to build similar controls around, rather than asking everyone to agree on what knowledge is “too dangerous” in the abstract. The mechanism might not be ready for production yet, but the framing it enables is genuinely useful.

Disclosure: CarCare Guide is reader-supported. When you buy through links on our site, we may earn an affiliate commission at no extra cost to you. Learn more.
A
Alex Chen