Negative Log-likelihood function
This is the expected number of Shannon entropy needed to compress some data samples drawn from using a code based on distribution .
Also not commutative like KL.
posterior prior KL Divergence 를 minimize하는 건 log likelihood를 maximize하는 것과 같다
Cross Entropy Notion
Softmax와 Cross-Entropy 구현의 두 가지 Numerical Stability Bug를 분석하고 수정 방법을 제안.
bf16·`fp32`·`fp64` 같은 부동소수점 타입의 정밀도와 계산 방식 때문에 생기는 문제 Numerical Implementation (floating-point numerical instability) Mathematically equivalent ≠ Numerically equivalent- Softmax Collapse: 정답 Logit이 다른 Logit보다 지나치게 커지면 Floating-point Rounding 때문에 정답 클래스의 Gradient가 0으로 소실된다. 결과적으로 Gradient의 합이 0이라는 이론적 성질이 깨진다.
- Softmax Cancellation: Knowledge Distillation에서 Student와 Teacher의 Logit이 거의 같을 때, 두 Softmax 결과를 빼면 Cancellation Error가 발생한다. 심지어 같은 Logit에서도 Gradient가 0이 아닐 수 있다.
- 수정된 연산은 확률값을 계산한 뒤 빼는 대신 더 안정적인 식으로 Gradient를 직접 계산한다.
- 실험에서는 Slingshot 현상 제거, Grokking 가속, Weight Decay가 없는 환경의 Accuracy Collapse 방지, Distillation 안정화를 보고했다.
Optimization Dynamics와 학습 결과 자체에 영향을 주는 문제다. 특히 KL Loss나 Teacher–Student Distillation에 직접적으로 관련된다

Seonglae Cho