Writing

Published notes, tutorials, and research logs from personal machine learning projects.

Research Log

Short, question-first notes on papers, derivations, experiments, and ideas I want to understand better.

Research Log

When the VAE Meets Monte Carlo

Why averaging sampled reconstruction losses estimates an expectation in a VAE, through the law of large numbers and an indicator-variable approach to integration.

Read note

Research Log

In Search of PCA’s Lost Variance

A geometric derivation of why PCA reconstruction mean-squared error equals the sum of the discarded eigenvalues, through orthogonal projections and a 2D example.

Read note

Research Log

KL Divergence Is Not a Distance

A daily-life example using car and train commute-time distributions to understand why KL divergence is asymmetric and how it can be used to compare distributions.

Read note

Research Log

Two Ways to Learn the Same Score Field

A small experiment comparing two ways to train a toy neural network to learn the score of a noisy three-component Gaussian mixture.

Read note

Research Log

Denoising Is Not Inversion

A conditional-expectation note on why denoising under squared error is estimation, not exact inversion.

Read note

Research Log

Score of a Gaussian

A derivation-driven note on why the score of a one-dimensional Gaussian points toward higher log-density, which means back toward the mean.

Read note

Articles and Tutorials

Tutorial

Using Hugging Face to Train a GPT-2 Model for Music Generation

A practical walkthrough for preparing symbolic-music data, training a tokenizer and GPT-2-style model, and deploying an interactive music demo.

Read article