AI Research
Posts in this category
Posts
-
EEG Basics for Machine Learners: Sampling, Filtering and Band Power
The signal-processing vocabulary needed before training anything on EEG, worked through on a clearly synthetic signal in NumPy, with the pitfalls that quietly inflate reported accuracies.
-
Contrastive Learning Intuition: InfoNCE, Temperature, Alignment and Uniformity
What the InfoNCE loss actually optimizes, why the temperature matters, and a NumPy experiment that trains a two-dimensional embedding with a hand-derived gradient and shows the before and after.
-
What Happens at Generation Time: KV Cache, RoPE and Sampling
The decode loop of a decoder-only transformer explained from the memory up, with KV-cache arithmetic for 7B-class models, a NumPy check of rotary embeddings, and temperature and top-p sampling.
-
Attention in NumPy: Scaled Dot-Product, Masks and Multiple Heads
Implementing scaled dot-product and multi-head attention from scratch, explaining the square-root scaling with a measurement, and reading attention heatmaps on a toy sequence.
-
Convolutions, Receptive Fields, and Why Stacked 3×3 Kernels Work
A NumPy conv2d, the arithmetic of receptive-field growth, an edge-detection example on a synthetic image, and the parameter count that explains why modern CNNs use small kernels.
-
Backpropagation by Hand: A Two-Layer MLP in NumPy with a Gradient Check
Deriving every gradient of a small multilayer perceptron, implementing it in NumPy, and proving the implementation right with a finite-difference check before training it.
-
Bias and Variance in Practice: Ridge Regression on Polynomial Features
The bias–variance decomposition measured instead of assumed, with ridge regression on a degree-12 polynomial, a regularization path and learning curves from a NumPy experiment.
-
Policy Gradients from First Principles: REINFORCE, Variance and Baselines
Deriving the REINFORCE estimator step by step, seeing where its variance comes from, and checking the baseline argument numerically on a tiny NumPy environment.