[논문 리뷰] NoiseFormer -- Noise Diffused Symmetric Attention Transformer
NoiseFormer는 일반적인 어텐션을 대칭 어텐션의 노이즈 버전으로 모델링하고, 대칭 어텐션 스코어에 학습 가능한 노이즈를 추가하여 매개변수 및 계산 오버헤드를 최소화하면서, GPT-2 기반 NanoGPT 및 GLUE 벤치마크에서 검증됩니다.
Transformer architecture has been very successful long runner in the field of Deep Learning (DL) and Large Language Models (LLM) because of its powerful attention-based learning and parallel-natured architecture. As the models grow gigantic in terms of memory footprint, difficulties in fitting the model on a device like a GPU or an AI accelerator give rise to the need for multiple computing devices thereby escalating the computing cost. This increased training/inference cost paved the way for efficient model size reduction/parametric reduction deploying Sparse Attention techniques. In this paper, we start analyzing one of the techniques of Sparse Attention called Symmetric Dot-Product Attention (referred to as Symmetric Attention) and propose a novel unified model architecture called Noise Diffused Symmetric Attention Transformer to enhance the model's performance. While maintaining the memory gains of Symmetric Attention, with minute overhead in terms of model parameters and computational overhead, the proposed model brings in enhanced performance in terms of accuracy and inference-time sampling. The proposed model is validated upon GPT2 base model and the results reflect the performance gains falling between plain Symmetric attention and GPT2 base model on a variety of GLUE benchmark tasks in terms of accuracy, with significant model size reduction with respect to the base model.
연구 동기 및 목표
- 대형 트랜스포머 모델의 메모리 및 계산 비용을 희소하고 대칭적인 어텐션 메커니즘을 활용해 해결한다는 동기 부여
- 대칭 도트 프로덕트 어텐션에 학습 가능한 노이즈를 주입해 표현력을 회복하는 통합 NoiseFormer 아키텍처를 제안
- NoiseFormer가 GLUE 벤치마크에서 사전학습된 GPT-2 기반 모델에 대해 메모리 절감과 경쟁력 있는 성능을 달성함을 보인다
제안 방법
- 일반 어텐션을 QK^T = QQ^T + noise'라는 노이즈 버전의 대칭 어텐션으로 재정의하고, noise'를 가우시안으로 모델링
- 대칭 어텐션 계산 이후에 추가 노이즈를 주입하는 NoiseFormer 아키텍처를 제안하며, 헤드 간 공유 또는 헤드별 변형으로 사용
- 전역 손실을 사용해 시퀀스 음의 로그 우도와 KL 발산 항을 결합하여 노이즈가 표준 가우시안에 수렴하도록 정규화
- 오토레그레이시브 프레임워크 내에서 일반 어텐션 스코어의 노이즈 모델링과 추정치를 위한 일관된 학습 목표를 채택
- 메모리 및 계산 오버헤드를 평가하고 OpenWebText에서 사전학습된 NanoGPT 기본 모델로 GLUE 작업에 대해 파인 튜닝 수행
실험 결과
연구 질문
- RQ1일반 어텐션을 학습 가능한 노이즈 통계치를 가진 대칭 어텐션의 노이즈 버전으로 효과적으로 근사할 수 있는가?
- RQ2공유 노이즈와 헤드별 노이즈의 영향이 모델 성능과 파라미터 효율성에 어떤 차이를 주는가?
- RQ3NoiseFormer가 GLUE 벤치마크에서 기본 GPT-2 변형 및 대칭 어텐션과 비교하여 정확도 및 메모리 사용 측면에서 어떤 차이를 보이는가?
주요 결과
- NoiseFormer 변형은 기본 NanoGPT 모델에 대해 약 5.77%의 파라미터 수 감소를 달성, 대칭 어텐션 기준선과 유사한 수준으로 감소합니다.
- 노이즈의 구조가 공유 또는 헤드별인 경우 대칭 어텐션에 비해 추가 메모리 오버헤드가 거의 없고 계산 비용도 최소화됩니다.
- GLUE 작업에서 NoiseFormer 변형은 일반적으로 기본 모델과 대칭 어텐션 사이의 격차를 메워주며, V2가 V1을 능가하고 여러 작업에서 기본 모델 성능에 근접하는 경향이 있습니다.
- 헤드별 변형(V2)이 공유 헤드 변형(V1) 및 대칭 어텐션 기준선보다 예비 학습 손실 결과를 더욱 잘 나타내는 경향이 있습니다.
- GLUE 작업 전반에서 작업에 따라 다르게 나타나며, NoiseFormer가 MRPC 및 QQP에서 기본 모델을 자주 능가하고 때로는 대칭 어텐션과 근접한 성능을 보입니다
이 논문 읽기
누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.
누빈트에서 이 논문 읽기이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.