언어 모델 증류에서의 교사 해킹에 관한 연구
On Teacher Hacking in Language Model Distillation
February 4, 2025
저자: Daniil Tiapkin, Daniele Calandriello, Johan Ferret, Sarah Perrin, Nino Vieillard, Alexandre Ramé, Mathieu Blondel
cs.AI
초록
언어 모델(LMs)의 사후 훈련은 점점 더 다음 두 단계에 의존하고 있습니다: (i) 지식 증류, 여기서 LM은 더 큰 교사 LM을 모방하도록 훈련되고, (ii) 인간 피드백으로부터 강화 학습(RLHF), 여기서 LM은 보상 모델을 최적화하여 정렬됩니다. 두 번째 RLHF 단계에서 잘 알려진 도전 과제는 보상 해킹(reward hacking)인데, 여기서 LM은 보상 모델을 지나치게 최적화합니다. 이러한 현상은 Goodhart의 법칙과 일치하며, 참된 목표에 대한 성능 저하로 이어질 수 있습니다. 본 논문에서는, 우리가 교사 해킹(teacher hacking)이라고 부르는 유사한 현상이 지식 증류 과정 중 발생할 수 있는지 조사합니다. 이는 교사 LM이 참 분포의 불완전한 근사일 수 있기 때문에 발생할 수 있습니다. 이를 연구하기 위해, 우리는 다음을 포함하는 통제된 실험적 설정을 제안합니다: (i) 참 분포를 나타내는 오라클 LM, (ii) 오라클에서 증류된 교사 LM, 그리고 (iii) 교사에서 증류된 학생 LM. 우리의 실험은 다음 통찰을 드러냅니다. 증류를 위해 고정 오프라인 데이터셋을 사용할 때, 교사 해킹이 발생하며, 또한 최적화 과정이 다항 수렴 법칙에서 벗어날 때 이를 감지할 수 있습니다. 반면에 온라인 데이터 생성 기술을 사용하면 교사 해킹을 효과적으로 완화할 수 있습니다. 더 구체적으로, 데이터 다양성을 해킹 방지의 핵심 요소로 확인합니다. 전반적으로, 우리의 결과는 견고하고 효율적인 LM을 구축하기 위한 증류의 이점과 한계에 대한 깊은 이해를 제공합니다.
English
Post-training of language models (LMs) increasingly relies on the following
two stages: (i) knowledge distillation, where the LM is trained to imitate a
larger teacher LM, and (ii) reinforcement learning from human feedback (RLHF),
where the LM is aligned by optimizing a reward model. In the second RLHF stage,
a well-known challenge is reward hacking, where the LM over-optimizes the
reward model. Such phenomenon is in line with Goodhart's law and can lead to
degraded performance on the true objective. In this paper, we investigate
whether a similar phenomenon, that we call teacher hacking, can occur during
knowledge distillation. This could arise because the teacher LM is itself an
imperfect approximation of the true distribution. To study this, we propose a
controlled experimental setup involving: (i) an oracle LM representing the
ground-truth distribution, (ii) a teacher LM distilled from the oracle, and
(iii) a student LM distilled from the teacher. Our experiments reveal the
following insights. When using a fixed offline dataset for distillation,
teacher hacking occurs; moreover, we can detect it by observing when the
optimization process deviates from polynomial convergence laws. In contrast,
employing online data generation techniques effectively mitigates teacher
hacking. More precisely, we identify data diversity as the key factor in
preventing hacking. Overall, our findings provide a deeper understanding of the
benefits and limitations of distillation for building robust and efficient LMs.Summary
AI-Generated Summary