Improving Language Understanding by
Generative Pre-Training
(2025_Undergraduated)
2025.1.23
Joonghui Cho
Brain Reverse Engineering and Imaging Laboratory
Department of Electrical Engineering
KAIST
1
Introduction
•
• 라벨(정답)이 붙어 있는 데이터가 부족한 분야에서는 적용하기 어려움.
•
2
Introduction
①
②
① unlabeled data에 대한 모델링 초기 신경망 파라미터들을 학습
② labeled data에 대한 supervised learning 특정 task에 ①의 파라미터를 적용
•
•
3
Method
𝑃 𝑢𝑖 𝑢𝑖−𝑘 , … , 𝑢𝑖−1 ; Θ
𝑘
Θ
𝑈 = 𝑢1 , 𝑢2 , … , 𝑢𝑛 ,
한 번에 처리할 수 있는 토큰 개수
가중치 편향
4
Method
𝑙𝑜𝑔 𝑃 𝑢𝑖 𝑢𝑖−𝑘 , … , 𝑢𝑖−1 ; Θ
𝐿1 (𝑈) =
𝑖
𝑈
𝑘=2
L(U) = logP("The") + logP("cat" ∣ "The")+. . . +logP("mat" ∣ "on, the")
Θ는
5
Method
𝑙𝑜𝑔 𝑃 𝑢𝑖 𝑢𝑖−𝑘 , … , 𝑢𝑖−1 ; Θ
𝐿1 (𝑈) =
𝑖
ℎ0 = 𝑈𝑊𝑒 + 𝑊𝑃
𝑈 𝑢𝑖−𝑘 , … , 𝑢𝑖−1 𝑊𝑒
𝑊𝑃
ℎ𝑙 = 𝑡𝑟𝑎𝑛𝑠𝑓𝑜𝑟𝑚𝑒𝑟𝑏𝑙𝑜𝑐𝑘 ℎ𝑖−1 𝑓𝑜𝑟 𝑎𝑛𝑦 𝑖 ∈ 1, 𝑛
𝑃 𝑈 = 𝑠𝑜𝑓𝑡𝑚𝑎𝑥 (ℎ𝑛 𝑊𝑒 𝑇 )
6
Method
𝐶 = {(𝑥 1 ; 𝑥 2 ; … ; 𝑥 𝑚 ), 𝑦}
𝑥1; 𝑥 2; … ; 𝑥 𝑚
ℎ𝑚
𝑃(𝑦|𝑥 1 , 𝑥 2 , … , 𝑥 𝑚 ) = 𝑠𝑜𝑓𝑡𝑚𝑎𝑥(ℎ𝑚 ∗ 𝑊𝑦 ) −> 𝑐𝑎𝑙𝑐𝑢𝑙𝑎𝑡𝑒 𝑦
𝐿2 𝐶 = Σ 𝑥,𝑦 ∈ 𝐶 log 𝑃 𝑦 𝑥 1 , … , 𝑥 𝑚 −> 𝑚𝑎𝑥𝑖𝑚𝑖𝑧𝑒 −> 𝑚𝑖𝑛𝑖𝑚𝑖𝑧𝑒 𝑡ℎ𝑒 𝑑𝑖𝑓𝑓𝑒𝑟𝑒𝑛𝑐𝑒 𝑏𝑒𝑡𝑤𝑒𝑒𝑛 𝑌 𝑎𝑛𝑑 𝑃 𝑌
7
Method
•
•
𝑳𝟑 (𝑪) = 𝑳𝟐 (𝑪) + 𝝀𝑳𝟏 (𝑪)
𝐿3 (𝐶): 최종적인 손실 함수
𝐿2 (𝐶): 지도 학습 손실
→ 특정 task에 대한 예측 정확도를 높이는 손실 함수
λ: 두 손실 함수 간의 가중치를 조절하는 hyperparameter
→ 특정 task에 overfitting되는 것을 방지하고 언어 표현 능력을 유지하는 역할
8
Method
⟨⟨ ⟩⟩
⟨⟨ ⟩⟩
9
Method
1. Textual Entailment
⟨⟩
두 문장을 특정한 순서 없이 비교해야 하므로 문장1과 문장2를 연결한 형태로 입력 (반대 형태도 입력)
이후 두 경우를 요소별 덧셈을 통해 결합
10
Method
3. Multiple Choice
11
Experiments
Experiments set
12
Experiments
Experiments set
13
Experiments
Experiments set
14
Results (1)
Natural Language Inference, NLI
)
15
Results (2)
Question Answering & Commonsense Reasoning
16
Results (3)
Semantic Similarity
17
Results (4)
Text Classification
18
Analysis (1)
Impact of number of layers transferred
19
Analysis (2)
Zero-shot 성능 분석
20
Analysis (3)
Ablation study
21
Conclusion & Contribution
22
Thank you
23