Эффект Гидры: Возникающий самовосстановление в вычислениях языковых моделей
The Hydra Effect: Emergent Self-repair in Language Model Computations
July 28, 2023
Авторы: Thomas McGrath, Matthew Rahtz, Janos Kramar, Vladimir Mikulik, Shane Legg
cs.AI
Аннотация
Мы исследуем внутреннюю структуру вычислений языковых моделей с использованием причинного анализа и демонстрируем два ключевых механизма: (1) форму адаптивных вычислений, при которой удаление одного слоя внимания в языковой модели приводит к компенсации со стороны другого слоя (что мы называем эффектом Гидры), и (2) уравновешивающую функцию поздних слоев MLP, которые снижают вероятность токена с максимальным правдоподобием. Наши исследования с удалением слоев показывают, что слои языковых моделей обычно слабо связаны между собой (удаление одного слоя влияет лишь на небольшое количество последующих слоев). Удивительно, что эти эффекты наблюдаются даже в языковых моделях, обученных без какого-либо использования dropout. Мы анализируем эти эффекты в контексте воспроизведения фактов и рассматриваем их значение для атрибуции на уровне схем в языковых моделях.
English
We investigate the internal structure of language model computations using
causal analysis and demonstrate two motifs: (1) a form of adaptive computation
where ablations of one attention layer of a language model cause another layer
to compensate (which we term the Hydra effect) and (2) a counterbalancing
function of late MLP layers that act to downregulate the maximum-likelihood
token. Our ablation studies demonstrate that language model layers are
typically relatively loosely coupled (ablations to one layer only affect a
small number of downstream layers). Surprisingly, these effects occur even in
language models trained without any form of dropout. We analyse these effects
in the context of factual recall and consider their implications for
circuit-level attribution in language models.