Machine learning
Model building blocks, data, classical ML, reinforcement learning and evaluation.
Foundations
The pieces every model is made of.
Loss functions
The scalar a model minimizes: cross-entropy for classes and tokens, MSE or Huber for values, each with a stable form and simple gradient.
Weight initialization
Pick initial weight variance so activations and gradients keep their scale through depth; He for ReLU, Glorot for tanh, scaled-down residual outputs for transformers.
Normalization layers
Standardize activations per batch, token or group with a learned scale so deep nets train fast and stably; RMSNorm in LLMs, BatchNorm in convnets.
Regularization
Techniques that trade training fit for generalization: weight decay, dropout, early stopping, label smoothing and data mixing, with the exact update rules and defaults.
Contrastive learning
Train an encoder so two views of the same thing score higher than every other pair in the batch; InfoNCE with a temperature, no labels needed.
Modern layers
What sits inside today's networks.
Attention variants
Multi-head, multi-query, grouped-query, sliding-window and latent attention; same softmax(QKᵀ/√d)V core, different trade-offs between quality and KV-cache size.
Rotary position embedding (RoPE)
Encode position by rotating pairs of query and key dimensions by position-dependent angles, so attention scores depend only on relative distance; the LLM default.
Mixture of experts (MoE)
Replace one FFN with many expert FFNs and a router sending each token to its top-k; parameters scale with E, per-token compute with k.
Embeddings
A learned table mapping discrete ids to dense vectors: gather forward, sparse scatter-add backward, row-wise optimizers to keep huge tables cheap.
recurrent networks
Planned.
matryoshka embeddings
Planned.
graph neural networks
Planned.
se3 equivariant networks
Planned.
knowledge graph embeddings
Planned.
Data
Turning raw data into training batches.
Byte-pair encoding (BPE) tokenization
Learn a subword vocabulary by repeatedly merging the most frequent adjacent pair; byte-level BPE encodes any input losslessly with 32k-200k tokens.
Data loading pipelines
Turn files on disk into shuffled, sharded, resumable GPU batches fast enough that the accelerator never waits.
Near-duplicate detection with MinHash LSH
Estimate set Jaccard similarity from k min-hashes and find similar pairs with banded LSH buckets; the standard dedup for web crawls, training corpora and sequence collections.
Data augmentation
Generate label-preserving variants of each training example on the fly to enlarge the effective dataset and bake in invariances.
Symmetry-group augmentation
Transform each input and its target together with a symmetry group to multiply training data, or average predictions over the group at test time.
active learning
Planned.
Negative sampling
Train by contrasting each observed positive with a few sampled negatives instead of normalising over every candidate; the choice of sampler decides bias and quality.
Feature store
One definition per feature feeds a history store for training and a latest-value store for serving, so training and inference see the same values as of the same moment.
Classical ML
Often the right tool, and much cheaper.
Linear and logistic regression
Fit a weighted sum of features to a number (least squares) or a probability (logistic); the baseline every model must beat.
Gradient-boosted decision trees (GBDT)
Add small regression trees one at a time, each fitted to the loss gradient; histogram splits over 256 bins make it the strongest tabular default.
k-means clustering
Partition points into k clusters by alternating nearest-centroid assignment and centroid averaging; k-means++ seeding makes it dependable.
PCA and SVD
Find orthogonal directions of maximum variance by an SVD of the centred data; randomized SVD gets the top k components in a few passes.
Naive Bayes classifier
Count how often each feature occurs per class and score a new item by summed log-likelihoods; trains in one pass, updates and merges by adding counts.
Isolation forest
Score each record by how few random axis-aligned splits it takes to isolate it in a small forest of random trees; anomalies are few and different, so they isolate fast.
Density-based clustering (DBSCAN)
Group points that are packed densely, label the rest as noise: no k, arbitrary shapes, two parameters (eps, minPts), cost set by the neighbour index.
gaussian processes
Planned.
Generalized linear models (GLMs)
Linear model for counts, rates, positive amounts and proportions: a linear score pushed through a link, fitted by iteratively reweighted least squares.
quantile regression
Planned.
ftrl online learning
Planned.
Feature hashing (the hashing trick)
Hash each feature name to an index in a fixed-size vector, with a second hash for the sign, so no vocabulary is needed and memory is fixed.
weight of evidence binning
Planned.
belief propagation
Planned.
Reinforcement learning
Learning from reward instead of labels.
Q-learning and DQN
Learn action values by bootstrapping toward r + γ·max Q(s′, ·); DQN adds a replay buffer, a frozen target network and Huber loss.
Policy gradient and PPO
Raise the log-probability of actions in proportion to their advantage; PPO clips the probability ratio so several epochs on one rollout stay safe.
AlphaZero self-play
A policy-value net guides PUCT search; search visit counts and game results become its training targets, so it learns from its own improved play.
Experience replay
A fixed-size ring buffer of past experience, sampled uniformly or by priority, so an online learner trains on decorrelated mini-batches and reuses each item.
imitation learning
Planned.
domain randomization
Planned.
action chunking
Planned.
action tokenization
Planned.
off policy evaluation
Planned.
Multi-armed bandits
Choose among K options repeatedly while learning their payoffs: epsilon-greedy, UCB1 and Thompson sampling keep total regret low where a fixed split or a fixed exploration rate pays forever.
Evaluation
Knowing whether a model is actually better.
Evaluation metrics
Precision, recall, ROC AUC, average precision, log loss, NDCG and pass@k computed correctly, plus paired confidence intervals for comparing models.
Calibration
Make predicted probabilities match observed frequencies: measure with ECE, fix post hoc with temperature, Platt or isotonic scaling on held-out data.
LLM-as-judge
Grade open-ended outputs with a language model under a rubric, then correct its known biases by order swapping, voting and calibration against human labels.
pass at k
Planned.
loglikelihood scoring
Planned.
fairness metrics
Planned.
shapley values treeshap
Planned.
benchmark contamination detection
Planned.
distribution drift detection
Planned.
Recommendation & ranking
Retrieving and ranking items for users, and modelling what they will remember.
Two-tower retrieval
Two separate encoders map users/queries and items into one vector space; item vectors are precomputed and searched by nearest neighbour, so recall over millions costs one small forward pass.
Learning to rank
Train a scorer on query-grouped data so that the order it induces maximizes NDCG; LambdaMART (boosted trees with NDCG-weighted pair gradients) is the production default.
Matrix factorization for collaborative filtering
Learn a short latent vector per row and per column from the observed cells only; a missing cell is predicted by the dot product of its two vectors.
Deep ranking models for recommendation
Embedding tables plus a feature-interaction net predict several feedback signals per candidate; a weighted sum of them is the ranking score.
Click-probability prediction (CTR models)
Learn p(action | user, item, context) from hashed categorical features with interaction terms (FM, Wide & Deep, DCN, DLRM), then keep it calibrated, since downstream multiplies it.
knowledge tracing
Planned.
spaced repetition
Planned.
Vision models
Detecting, segmenting, tracking and recognizing things in images and point clouds.
Object detection
A network turns an image into scored, classified boxes in one pass; anchor-based, anchor-free and set-prediction heads differ in how they assign labels and remove duplicates.
Non-maximum suppression
Keep the best-scoring candidate in each neighbourhood and drop the rest; greedy NMS, Soft-NMS and 1-D peak picking share one loop.
image segmentation
Planned.
Multi-object tracking
Turn per-frame detections (camera boxes or radar plots) into persistent IDs by predicting each track, gating, assigning and managing track births and deaths.
bev perception
Planned.
point cloud processing
Planned.
face embeddings
Planned.
facial landmark alignment
Planned.
liveness detection
Planned.
biometric template matching
Planned.
image forensics
Planned.
trajectory prediction
Planned.
Document understanding
Getting text and structure out of scans, PDFs and web pages.
Optical character recognition (text recognition)
Find text lines in an image, read each crop with a CTC or attention model, then correct with a lexicon and score confidence for review routing.
layout analysis
Planned.
table structure recognition
Planned.
Document image preprocessing
Turn a scan or phone photo into an upright, evenly lit, binarised or normalised grey page so layout analysis and OCR read it reliably.
PDF text extraction
Rebuild words, lines, columns and reading order from the glyph positions a born-digital PDF stores, and route pages without usable text to OCR.
HTML main-text extraction
Decode bytes, tolerate broken markup, drop non-content nodes and score text blocks by length and link density to keep the main run, with headings, metadata and offsets for citation.
Text chunking
Cut documents into token-bounded pieces along structure boundaries, keeping offsets and section paths, so each piece embeds well and can be cited.
Language processing
Classic NLP components: tagging, linking, classification, normalization, dialogue.
Named entity recognition
Find the character spans of entities in text and give each a type, by labelling every token and decoding a valid label sequence.
Entity linking
Map each mention to a knowledge-base id, or to NIL, by generating candidates from an alias table, scoring them on prior and context, and thresholding.
relation extraction
Planned.
Text classification
Assign one or more labels to a text; climb a ladder from regexes to linear models on n-grams, embeddings, fine-tuned encoders and LLM prompts, only as far as the data and budget demand.
Language identification
Score a text's character n-grams against per-language statistics, after a cheap script check, and return an ISO 639 code with a confidence or "und".
Text normalization
Rewrite messy text into one canonical form for matchers and models, or into spoken words for speech output (and back), keeping a map to the original offsets.
ngram language model
Planned.
back translation
Planned.
Template-based text generation
Realise facts as sentences by filling slots in alternative templates, with agreement, referring expressions and seeded variation; every word traces to data or a template.
Intent classification and slot filling
Turn one utterance into an intent label and typed slot values with a joint model: a sentence-level classifier plus a token-level BIO tagger on a shared encoder.
Dialogue state tracking
Keep a structured belief of the user's goal (slot → value, plus requests) and update it every turn from NLU output, the old state and the last system action.
Speech
Recognizing, segmenting and synthesizing speech.
Voice activity detection
Per-frame speech/non-speech decision with smoothing, from an energy threshold over a tracked noise floor up to small neural nets.
end of turn detection
Planned.
wake word detection
Planned.
RNN transducer (RNN-T)
Streaming sequence model that sums all monotone alignments in a frame-by-label lattice and conditions each label on earlier ones.
Connectionist temporal classification (CTC) loss
Alignment-free sequence loss that sums the probability of every frame-to-label alignment with a blank symbol, using a dynamic program.
chunked streaming attention
Planned.
forced alignment
Planned.
speaker diarization
Planned.
speaker embeddings
Planned.
grapheme to phoneme
Planned.
neural vocoders
Planned.