Home Knowledge Base DExperts

DExperts is the decoding-time controllable generation method that combines an expert language model (trained on desired text) with an anti-expert model (trained on undesired text) to steer generation — developed at the Allen Institute for AI as a simple yet effective approach to controlling attributes like toxicity, sentiment, and formality by ensembling contrasting models during token-level decoding.

What Is DExperts?

Why DExperts Matters

How DExperts Works

Expert Training: Fine-tune a small LM on text with the desired attribute (e.g., non-toxic, formal, positive sentiment).

Anti-Expert Training: Fine-tune a small LM on text with the undesired attribute (e.g., toxic, informal, negative sentiment).

Decoding: At each generation step: 1. Get base model next-token distribution. 2. Get expert model next-token distribution. 3. Get anti-expert model next-token distribution. 4. Combine: multiply base by expert, divide by anti-expert. 5. Sample the next token from the adjusted distribution.

Performance on Detoxification

MethodToxicity ↓FluencyDiversity
Base Model0.52HighHigh
PPLM0.32MediumMedium
GeDi0.17HighMedium
DExperts0.14HighHigh

Advantages Over Alternatives

DExperts is a clean, effective framework for controlled text generation — demonstrating that the contrast between expert and anti-expert models provides a powerful, interpretable signal for steering language model outputs toward desired attributes at decoding time.

dexpertstext generation

Explore 500+ Semiconductor & AI Topics

From EUV lithography to CUDA optimization — search the full knowledge base or chat with our AI assistant.