1. Why is entropy constant in supervised cross-entropy minimization?
참고 답변과 평가 기준
The target distribution is fixed with respect to model parameters; the prediction distribution changes.
Understand entropy, cross-entropy, both KL directions and support mismatch.
로컬 계산과 합성 예제입니다. 유료 API나 실제 모델 벤치마크를 사용하지 않습니다.기술 본문은 영어와 중국어로 제공됩니다. 이 언어에서는 영어 기술 본문을 표시합니다.
Goal: explain the mechanism in this lesson, reproduce one example and test a failure case. Reading alone does not mark mastery.
사전 지식 · Discrete probabilities, logarithms, expectations.
For fixed target P, minimizing cross-entropy minimizes forward KL because H(P) is constant. Reversing KL changes which distribution weights the penalty. Inputs are weights normalized to sum to one; all outputs use nats.
H(P) = −Σ pᵢ ln pᵢ H(P,Q) = −Σ pᵢ ln qᵢ KL(P||Q) = H(P,Q) − H(P) JS(P,Q) = [KL(P||M)+KL(Q||M)]/2, M=(P+Q)/2
Common pitfall: Changing temperature at inference is not automatically calibration: fit and validate against labeled held-out data.
What is the entropy of a uniform distribution over 4 categories, in nats?
−4 × 0.25 × ln(0.25) = ln(4) ≈ 1.386294
Set
Deliver: input configurations, exported results, controlled variables, observations, alternative explanations and the next validation step.
A positive pᵢ at
실행하면 결과가 표시됩니다.
변수를 통제하여 결과를 비교하세요. 내보내기에는 입력과 방법이 포함됩니다.
자기 평가: 원리와 가정을 설명하고 구별 가능한 실험을 제안하세요. LLM 자동 채점은 없습니다.
The target distribution is fixed with respect to model parameters; the prediction distribution changes.
Yes. It can confidently concentrate mass on the wrong class. Evaluate accuracy, calibration and task costs separately.
The expectation and support penalties change. Statements about mode coverage depend on the approximating family and target, not just a slogan.
This compares categorical distributions, not empirical model calibration. Calibration also needs predictions paired with observed outcomes; entropy alone is not correctness.
arXiv:1706.04599 · 2017
Guo et al. · Year denotes first arXiv submission
Read: Reliability diagrams, calibration metrics, temperature scaling.
Reading checkpoint: Distinguish class ranking from confidence quality; fit temperature on validation data, never the final test set.
@misc{arxiv170604599,
title = {On Calibration of Modern Neural Networks},
year = {2017},
eprint = {1706.04599},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/1706.04599}
}arXiv:2305.18290 · 2023
Rafailov et al. · Year denotes first arXiv submission
Read: KL-constrained reward objective, policy reparameterization and preference loss.
Reading checkpoint: Identify the reference-policy log ratio and β. The current information lab teaches KL, not a DPO trainer.
@misc{arxiv230518290,
title = {Direct Preference Optimization: Your Language Model is Secretly a Reward Model},
year = {2023},
eprint = {2305.18290},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2305.18290}
}This compares categorical distributions, not empirical model calibration. Calibration also needs predictions paired with observed outcomes; entropy alone is not correctness.
Objective, derivatives, worked examples and implementation reviewed. A passing finite-difference or manifest check is not a paper reproduction certificate.
Set
Keep the baseline input fixed, change one parameter or boundary, and compare both the numerical result and the claimed units. A passing example verifies this fixture only.
Save the example and linked modules in one folder. Use Node.js 22 or newer, then run node information-theory.mjs. No third-party runtime dependencies.
import {runPhd} from './phd-core.mjs';
const params={
"p": "0.7,0.2,0.1",
"q": "0.5,0.3,0.2"
};
console.log(runPhd('information-theory',params));Set
Record input, code version, expected result and observed result in the notebook below. Then construct a counterexample that violates the assumption above and explain why the original conclusion no longer follows.
Download complete kit (.tar.gz) · Complete reference kit and regression checksBefore revealing an answer, predict one result. After the exercise, record the discrepancy and a transfer test. Saved locally across language editions.
Open notebook / export / clear →The mathematical review scope is recorded per lesson. It does not establish empirical paper reproduction; report suspected errors in your notes. Review scope