Detoxifying LLMs via Representation Erasure-based Preference Optimization

Nazanin Mohammadi Sepahvand, Eleni Triantafillou, Hugo Larochelle, Doina Precup, Daniel M. Roy, Gintare Karolina Dziugaite · 2026

Read Detoxifying LLMs via Representation Erasure-based Preference Optimization by Nazanin Mohammadi Sepahvand, Eleni Triantafillou, Hugo Larochelle, Doina Precup, Daniel M. Roy, Gintare Karolina Dziugaite (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2602-23391.txt.

Description

Nazanin Mohammadi Sepahvand and five co-authors propose REPO, a detox method that erases toxic codes instead of merely muting toxic outputs. Large language models trained on web data can produce toxic outputs, and prior shields based on DPO, NPO, and similar methods reduce harmful endings but not well. They fall to hostile prompting and are easily undone by fine-tuning-based re-learning attacks. Linear probing shows why: harmful paths remain present in model codes, so the edits are shallow.

REPO recasts detox as a token-level preference problem with a novel goal and liking data, forcing codes of toxic endings to converge toward their benign twins. Inner analysis shows the fine approach induces deep, local edits to toxin-holding neurons while keeping model utility. Tests report state-of-the-art toughness, stopping re-learning attacks and tuned GCG jailbreaks where older code- and output-based methods fail.

Catalog record

CREATORNazanin Mohammadi Sepahvand, Eleni Triantafillou, Hugo Larochelle, Doina Precup, Daniel M. Roy, Gintare Karolina Dziugaite
YEAR2026
COLLECTIONPAPERS
FORMATTXT
FILE SIZE55 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2602-23391

Browse the full library · About the Tower of Babel