Back to CatalogID: GlYgs6v2YfU
Module 1
Chapter 9 of 10: But what is cross-entropy?
3Blue1Brown

But what is cross-entropy? | Information theory, part 2

0:00/7:30Part 1
Strict Focus Mode

Enable camera attention tracking to prevent passive scrolling

Roadmap

Topic Checkpoints

0/4 Cleared

Active Topic: 1. Information Theory, Surprise & Optimal Codes

Measuring information in bits: why rare events convey high surprise (-log2 p) and how optimal coding minimizes expected message lengths.

Turn This Lesson Into A Hands-on Project

Apply concepts taught in this video to a structured implementation roadmap.

Part 1

1. Information Theory, Surprise & Optimal Codes

Measuring information in bits: why rare events convey high surprise (-log2 p) and how optimal coding minimizes expected message lengths.

Part 2

2. Defining Cross-Entropy: True vs Model Distributions

What happens when you encode events from distribution P using an imperfect code optimized for model distribution Q.

Part 3

3. Why Cross-Entropy is the Standard LLM Loss

For a one-hot training target (p_target = 1), cross-entropy simplifies to -log(q_target), providing smooth, steep gradients for gradient descent.

Part 4

4. KL Divergence & Knowledge Distillation

Understanding Relative Entropy (Kullback-Leibler divergence) as the excess bits wasted, and how student models learn from teacher distributions.