[ICLR 2020] ALBERT: A Lite BERT for Self-supervised Learning of Language Representations 논문 정리

Jiwung Hyun
5 min readMay 20, 2020

--

ICLR 2020 NLP 논문 읽기 (1)

[paper] [code]

Abstract만 읽고 정리해보기

  • BERT의 경량화 모델
  • 두 가지의 parameter-reduction 기술을 적용 → 적은 메모리 소모 + 빠른 학습 속도
  • self-supervised loss을 적용 (inter-sentence coherence을 모델링하는 데에 집중해주는 objective) → multi-sentence inputs의 downstream task에 좋은 효과를 보임
  • GLUE, RACE, SQuAD에서 SOTA면서 BERT-large보다 적은 파라미터

Factorized Embedding Parameterization

“ large vocabulary embedding matrix → two small matrices ”

BERT, XLNet, RoBERTa에서 WordPiece embedding size E와 hidden layer size H는 항상 같게 설정하였다. 이러한 결정은 modeling 측면과 practical 측면으로 보았을 때, suboptimal한 것으로 보인다. (즉, 이러한 결정은 안 좋다)

Modeling 측면,
WordPiece embeddings
: context-independent representations 을 학습
Hidden-layer embeddings : context-dependent representations 을 학습
H >> E 로 untying하여 모델 파라미터를 보다 효율적으로 사용할 수 있다.

Practical 측면,
vocab size V가 큰 것은 당연한 것인데, 이때 EH를 같게 하면 embedding matrix의 크기가 V×E 가 된다. 이는 무지막지하게 큰 파라미터 개수를 요구하고, 사실상 학습 중 sparse하게 update된다.

Therefore,
Embedding parameter를 두 개의 작은 matrix로 분해하였다. V에서 바로 H로 projection하는 것이 아니라, E로 projection하고 E에서 H로 projection하는 것. 요약하자면, O(V×H)를 O(V×E + E×H)로 reduce.

Cross-layer Parameter Sharing

“ prevents the parameter from growing with the depth of the network ”

FFN 파라미터만 공유, Attention 파라미터만 공유하는 여러 방법이 있지만, ALBERT에서는 모든 파라미터를 공유한다.

smoother 하면서 0으로 수렴하지도 않는다

BERT보다 smoother하다 : weight-sharing이 네트워크 파라미터를 안정화하는 효과를 보여준 것이다.
24 layer동안 0으로 수렴하지 않았다 : ALBERT의 solution space가 DQE의 solution space와 다르다는 것을 보인다.
* cross-layer parameter sharing의 related work에 Deep Equilibrium models (DQE)가 있는데, DQE는 layer의 입력과 출력이 동일한 평형점에 도달한다고 한다.

Inter-sentence Coherence Loss

BERT의 loss 함수는 masked language modeling (MLM) 외에도 추가적으로 next-sentence prediction (NSP)가 있다. 하지만, 후속 연구에서 NSP가 unreliable하고 결국 제거하기로 결정하였다.
NSP의 비효율성은 MLM loss에 비해서 task를 수행하는데에 어려움이 없었기 때문에로 보여진다. NSP의 objective는 topic predictioncoherence prediction의 융합인데, topic predictioncoherence prediction에 비해 학습이 쉽고 MLM loss로도 학습이 된다.

따라서, coherence에 집중된 loss를 고안하였고, sentence-order prediction (SOP) loss이다. NSP는 SOP task를 수행하지 못했지만, SOP는 NSP task를 수행하였다.
* NSP에서는 positive example을 학습 corpus의 연속적인 segment를 가져왔고, negative example은 서로 다른 document에서 가져왔다.
* 한편, SOP에서는 positive example은 NSP와 동일하지만, negative example은 두 문장의 순서를 바꿔서 주었다.

My Discussion

컴퓨터 비전에서 인간 성능에 버금가는 모델들이 개발된 이후, 경량화 및 모바일에서의 딥러닝이 연구 trend가 되었듯이 자연어처리에서도 BERT의 등장 이후로 경량화된 모델 연구도 활발해지고 있다. ICLR 2020 이전에도 이미 많이 화제가 되었던 모델로 기억한다. 예전에 한 번 읽어보고 다시 정리하고자 읽어본다.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Jiwung Hyun
Jiwung Hyun

No responses yet

Write a response