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.

    11 min read 2,039 words Category: AI Research Tags: neuroai, bci, signal processing

  • 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.

    8 min read 1,558 words Category: AI Research Tags: representation learning, self supervised, contrastive

  • 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.

    10 min read 1,931 words Category: AI Research Tags: llm, inference, transformers

  • 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.

    8 min read 1,556 words Category: AI Research Tags: nlp, transformers, attention

  • 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.

    8 min read 1,535 words Category: AI Research Tags: computer vision, convolution, deep learning

  • 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.

    8 min read 1,437 words Category: AI Research Tags: deep learning, backpropagation, numpy

  • 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.

    7 min read 1,386 words Category: AI Research Tags: machine learning, regularization, statistics

  • 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.

    8 min read 1,570 words Category: AI Research Tags: reinforcement learning, policy gradient, numpy