Skip to main content
QUICK REVIEW

[논문 리뷰] HomoDistil: Homotopic Task-Agnostic Distillation of Pre-trained Transformers

Liang Chen, Haoming Jiang|arXiv (Cornell University)|2023. 02. 19.
Topic ModelingComputer Science인용 수 9
한 줄 요약

HomoDistil은 교사로부터 학생을 초기화하고 증류하는 동안 점진적으로 뉴런을 가지치기하는 반복적 가지치기 기반의 비특정 작업(distillation) 방법을 도입하여, 강력한 다운스트림 성능을 보이는 작고 BERT 기반 모델을 얻는다.

ABSTRACT

Knowledge distillation has been shown to be a powerful model compression approach to facilitate the deployment of pre-trained language models in practice. This paper focuses on task-agnostic distillation. It produces a compact pre-trained model that can be easily fine-tuned on various tasks with small computational costs and memory footprints. Despite the practical benefits, task-agnostic distillation is challenging. Since the teacher model has a significantly larger capacity and stronger representation power than the student model, it is very difficult for the student to produce predictions that match the teacher's over a massive amount of open-domain training data. Such a large prediction discrepancy often diminishes the benefits of knowledge distillation. To address this challenge, we propose Homotopic Distillation (HomoDistil), a novel task-agnostic distillation approach equipped with iterative pruning. Specifically, we initialize the student model from the teacher model, and iteratively prune the student's neurons until the target width is reached. Such an approach maintains a small discrepancy between the teacher's and student's predictions throughout the distillation process, which ensures the effectiveness of knowledge transfer. Extensive experiments demonstrate that HomoDistil achieves significant improvements on existing baselines.

연구 동기 및 목표

  • 지연 및 메모리 제약하에서 사전 학습된 트랜스포머의 효율적 배치를 목표로 한다.
  • 훈련 중 예측 차이를 낮게 유지하는 작업 비특이적 증류 프레임워크를 개발한다.
  • 반복적 뉴런 가지치기와 증류를 결합하여 작고도 일반화가 잘 된 학생 모델을 생성한다.
  • GLUE 및 SQuAD 벤치마크 전반에서 HomoBERT 변형을 통해 BERT-base에서 효과를 시연한다.

제안 방법

  • 초기 단계에서 예측 차이를 작게 유지하기 위해 교사로부터 학생을 초기화한다.
  • 총 손실로부터 계산된 민감도 기반 점수를 사용하여 가장 중요도가 낮은 뉴런을 반복적으로 가지치기한다.
  • 출력에 대한 Kullback–Leibler 손실과 함께 은닉 표현, 임베딩, 주의(attention)를 맞추는 증류 규칙을 적용한다.
  • 구조적 가지치기를 사용하여 뉴런(열/뉴런)을 가지치고 이어지는 계층으로 가지치기를 전달한다.
  • 고정 가중치를 가진 MLM, KL 증류 및 트랜스포머 증류 항을 결합한 총 손실을 최적화한다.
  • 성능을 유지하면서 점진적으로 희소성을 증가시키기 위해 큐빅 감소 함수로 가지치기 희소도 r(t)를 스케줄링한다.

실험 결과

연구 질문

  • RQ1교사로부터 학생이 점진적으로 가지치기될 때 작업 비특이적 증류가 낮은 예측 차이를 유지할 수 있는가?
  • RQ2GLUE 및 SQuAD에서 증류와 결합된 반복적 뉴런 가지치기가 한 번의 가지치기나 증류만 사용하는 기준선보다 성능이 우수한가?
  • RQ3여러 매개변수 규모에 걸쳐 기존의 작업 비특이적 증류 기준선과 HomoDistil은 어떻게 비교되는가?
  • RQ4증류에서 중간 표현과 주의를 보존하는 것이 다운스트림 미세 조정 성능을 향상시키는가?

주요 결과

  • HomoDistil은 GLUE 및 SQuAD v1.1/2.0에서 여러 HomoBERT 크기에 대해 파인튜닝 최상위 성능을 달성한다.
  • 증류된 HomoBERT 변형은 동일한 매개변수 수에서 SQuAD v2.0에서 최상 기준선 MiniLM보다 3포인트 이상(평균 SQuAD v1.1/2.0에서) 우수하다.
  • 훈련 전반에 걸쳐 작은 예측 차이를 유지하는 것이 작업 전반에서 더 나은 일반화로 이어진다.
  • 증류 손실(L_total)은 MLM만 학습하는 것보다 작업별 파인튜닝 성능을 지속적으로 향상시킨다.
  • 민감도 기반 및 PLATON 기반 중요도 지표는 이 설정에서 크기 기반 가지치기와 이동 가지치기보다 우수하다.
  • 교사로부터의 초기화를 통한 반복적 가지치기는 효과적인 지식 전달을 가능하게 하면서 작고도 컴팩트한 모델을 달성한다(예: 약 14-15M 매개변수의 HomoBERT-tiny).

이 논문 읽기

누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.

누빈트에서 이 논문 읽기

이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.