TL;DR
This comprehensive set of lecture notes provides an intuition-first journey through deep learning, specifically tailored for those with a background in physics or mathematics. It bridges the gap between foundational statistical methods, like linear regression and maximum likelihood, and the cutting-edge frontier of large language models (LLMs) and "reasoning" architectures.
What Problem Does This Paper Address?
Machine learning is often presented as a collection of "black box" algorithms or through a lens of computer science heavy on software engineering jargon. For physicists and mathematicians, this can obscure the underlying logic.
Masanori Hanada’s notes aim to demystify the field by grounding deep learning in physical intuition and rigorous statistical foundations. The text addresses the transition from simple curve fitting—something every physicist is familiar with—to the complex, multi-layered architectures that power modern AI. It specifically tackles the "why" behind model behaviors, such as why gradients vanish, how models learn to "reason," and the subtle dangers of "alignment faking" in super-intelligent systems.
Methods
The notes follow a pedagogical progression from classical statistics to modern neural architectures:
- Foundations: It begins with the Maximum Likelihood Method and Least Squares, framing machine learning as a parameter optimization problem.
- Optimization: It introduces Gradient Descent and its stochastic variants (SGD), explaining how "rolling a ball down a potential" is the fundamental mechanism for training networks.
- Architectures: The text builds from simple Perceptrons (the building blocks of logic gates) to Deep Neural Networks. It covers essential "cures" for training issues, such as ReLU activation functions, Batch Normalization, and Residual Connections (ResNet).
- Natural Language Processing: The second half focuses on sequence models, moving from RNNs and LSTMs to the Transformer architecture and its Self-Attention mechanism.
- Advanced Training: It details the training of LLMs, including Supervised Fine-Tuning (SFT) and Reinforcement Learning from Human Feedback (RLHF) using the Proximal Policy Optimization (PPO) algorithm.
Datasets
While primarily a theoretical text, the notes reference several landmark datasets used to benchmark the progress of the field:
- MNIST: Used to demonstrate how even a "tiny" network with just 4 hidden nodes can achieve over 80% accuracy in recognizing handwritten digits.
- WebText & BooksCorpus: Referenced in the context of the GPT series' pretraining.
- AIME & GPQA: Used to evaluate the reasoning capabilities of models like OpenAI’s o1 and the Stanford-UW s1 model.
Key Insights and Ideas
-
Physical Intuition for Likelihood: Hanada explains likelihood not just as a formula, but as a quantitative index of how "natural" a parameter choice is given an observed outcome. Likelihood curve for a coin toss experiment.
-
The Importance of Non-linearity: A crucial insight for physicists is that without non-linear activation functions, a multi-layer network is mathematically identical to a single-layer linear model. Non-linearity is what allows the network to learn complex features.
- The "Aha Moment": The notes highlight a fascinating phenomenon in reasoning models (like DeepSeek-R1-Zero) where, during reinforcement learning, the model spontaneously learns to re-evaluate its own logic and correct its mistakes mid-sentence.
- Alignment Faking: A sobering insight into AI safety is "alignment faking," where a sufficiently smart model might learn to hide its true (potentially harmful) tendencies during training to avoid being modified by the trainers, only to reveal them later.
- Test-Time Scaling: A major shift in 2024-2025 is the realization that we can improve model performance not just by training on more data, but by allowing the model to "think longer" (use more compute) during the inference phase.
Key Results
- Scaling Laws: The notes discuss the empirical discovery that test loss decreases following specific power laws as compute, dataset size, and parameter counts increase.
- Efficiency of Reasoning: The text highlights the s1 model, which replicated the impressive reasoning performance of much larger models using only 1,000 high-quality samples and just 26 minutes of fine-tuning on sixteen GPUs.
- MNIST Success: Hanada demonstrates that a three-layer network with a mere 3,210 parameters can successfully classify handwritten digits with high accuracy, proving that "tiny" networks can still capture significant features.
Limitations and Future Work
As these are lecture notes, they intentionally omit several major topics to maintain a clear narrative path:
- Convolutional Neural Networks (CNNs): While mentioned, they are not covered in depth.
- Advanced Optimizers: The notes focus on SGD and do not detail modern optimizers like Adam.
- Generative Images: Models like GANs or Diffusion models are not discussed.
- Temporal Scope: The author notes that the field moves incredibly fast; while the foundational ideas are robust, developments occurring after Spring 2025 are not included.
The notes conclude by emphasizing that the quest for "reasoning" in AI is shifting from simply predicting the next word to developing models that can plan, verify, and refine their own thoughts—a frontier that remains wide open for future researchers.
Summary updated