Technical
Working notes and math.
- The Mathematics of Hidden Markov ModelsHidden Markov Model mathematics from first principles: forward filtering, forward-backward smoothing, and Baum-Welch EM for parameter estimation.
- Self-taught reasoning via post-rationalization fine-tuning approximates policy gradient optimizationSTaR bootstraps system 2 reasoning by fine-tuning on self-generated rationales and post-hoc rationalizations, which approximates policy gradient RL on filtered correct trajectories.
- Variational autoencoders learn structured low-dimensional manifolds by optimizing the evidence lower boundVAEs force the encoder to map inputs to latent distributions rather than points, balancing reconstruction against a Gaussian prior via the evidence lower bound.
- Conway's Game of Life is embarrassingly parallel, so one CUDA thread per cell gives a 70x speedup over PythonPorting Game of Life from Python to C to CUDA at the AGI House Hardcore CUDA Hackathon: one thread per cell, a block-wide barrier to swap states, and why copying every frame back to the host halves the speedup.
- Dr Claude: Monte Carlo tree search plans the diagnostic interview whilst Claude conducts itHow we combined AlphaGo-style MCTS over a disease–symptom probability model with Claude 2 to ask the fewest questions on the way to a diagnosis. Third place at Anthropic's Claude 2 hackathon, built in 24 hours.
- Embedding-based entity resolution turns noisy LLM triples into a queryable knowledge graphKnowNet crawls a news frontpage, extracts triples with an LLM, merges near-duplicate entities in embedding space, and answers questions over the graph with cited source URLs.
- Coffee bean weighing scale from scratchBit-banging the HX711 from a Raspberry Pi Pico, mapping 24-bit ADC counts to grams with two-point calibration, and displaying live weight on a small SPI LCD.
- Monte Carlo dropout is approximate Bayesian inferenceKeeping dropout active at test time samples an approximate posterior over network weights, yielding uncertainty estimates and better predictions without changing the architecture.
- Tobit models handle left-censored data by combining cumulative probability mass with continuous normal densitiesDeriving the Tobit log-likelihood: a discrete probability mass at the censoring threshold for clamped observations, a normal density for the rest, joined by an indicator into one differentiable objective.