Northeastern University · CS 7150
Interactive visualizations and Jupyter notebooks used in lecture. Everything here lives in github.com/CS7150/classdemos — notebooks open straight into Colab, and the interactive pages run in the browser with nothing to install.
An interactive explainer for each technical question on the starting-points quiz: the matrix–vector product, least squares, the chain rule, expectation and variance, Bayes rule, and what flexibility does to bias and variance.
Open the set → Runs in your browserThe update rule, the margin, and the mistake bound, shown side by side in data space and weight space. Step through a run, scrub forwards and back, or watch the worst case walk the corners of the region the proof still permits.
Open the demo → One explainer so farType a PyTorch-style expression and watch autograd build its graph node by node, run the
forward pass in topological order, then run loss.backward() one node at a time:
the upstream gradient, each local gradient, and the downstream shares added into each input.
The mathematics the lectures lean on, worked interactively. First up: backprop through y = Ax, where the gradient deals its entries to the rows of A, the input gradient comes out as ATg, and the product rule on each wire gives the weight gradient g xT.
Open the set → Six explainersBuilding up to Adam: momentum averaging out noisy gradients, the EMA and bias correction behind it (plus why the recurrence is exactly a geometric series), a single learning rate fighting an anisotropic bowl, the mean/RMS diagnostic, and why Adam's update is scale-invariant.
Open the set → Nine explainersGlorot & Bengio 2010: saturation on a single tanh, what bad initialization looks like while a real network trains, the chain rule behind vanishing gradients one neuron per layer, how tanh, sigmoid, softsign and relu differ, what variance is, where the n and the 1/3 in n·Var(W) = 1/3 come from, the standard vs. normalized uniform inits, and the forward vs. backward compromise.
Open the set → Nine explainersLeCun et al. 1989: why pixel distance fails when a digit moves, Hubel and Wiesel’s oriented detector as a grid of weights, 1D and 2D convolution stepped by hand, convolution as a Toeplitz matrix of shared weights, equivariance and pooling (and how stride breaks them), output sizes through a stack of layers, receptive fields and padding through depth, and the 4D weight tensor.
Open the set → Eight explainersHe 2016 and Ioffe 2015: why deeper plain networks train worse, residual blocks as learning zero, gradients through depth, ResNets as ensembles of paths, basic and bottleneck blocks, and BatchNorm step by step, why it helps, and which axes other normalizations use.
Open the set → Eight explainersSoftmax, cross-entropy and KL, and why cross-entropy beats squared error; then weight decay, dropout, train-with-noise (early stopping, augmentation), batch size and gradient noise, and capacity with double descent.
Open the set → Two explainersElman 1990, trained live: a recurrent network’s error spikes where the next letter can’t be known, one-step training against backprop through time, and word categories from next-word prediction, with controls, the zog test, a probe, and an intervention.
Open the set → Five explainersSzegedy et al. 2014, run live on MNIST networks: backprop carried to the input, the search for a minimal adversarial change, crafted vs. random noise, transfer across networks and data, and units vs. random directions.
Open the set → One explainerIn one dimension: drag a few Dirac targets and weight them. Each has its own conditional flow, and the lines all cross; their weighted average is the single smooth marginal field a network learns, whose trajectories never cross.
Open the set → Six explainersREINFORCE, baselines, GRPO and DPO, live on a language model small enough to see whole: 64 completions, every next-token distribution on screen, and the KL-regularized optimum drawn as the target they all aim at. Plus the optimum itself on a line (the reference tilted by ereward/β), RL as guidance for language models, and Bradley-Terry, the model that turns preferences into probabilities.
Open the set →The perceptron, its learning rule, and the limits of one linear threshold unit.
What one layer cannot do, and what happens once you train two or more.
Watching decision boundaries and loss surfaces move while a small network learns.
Derivatives by hand, and what different losses actually reward.
Convolution as a matrix, and the fully-connected versus convolutional comparison.
Poking at CLIP and Stable Diffusion, and building the sample data they run on.