Concepts
Concept notes
186 concept notes, alphabetical within each subcategory. Each follows the same template: one-line definition, why it matters, the mechanism, what an interviewer expects, common confusions. Press / to search.
Linear Algebra & Math 6
- Determinant and volume
The determinant of a matrix is the signed volume scaling factor of the linear map. Zero determinant means the map collapses dimensions.
- Eigenvalues and the spectral theorem
Eigenvectors are directions a matrix only stretches. The spectral theorem says symmetric matrices have a full orthogonal eigenbasis with real eigenvalues.
- Matrices as linear maps
A matrix sends input basis vectors to its columns. Weight those columns to find any output and identify directions that collapse.
- Matrix calculus for ML
Gradients, Jacobians, and Hessians for vector- and matrix-valued functions. The minimum needed to derive backprop and second-order methods.
- Positive (semi-)definite matrices
Matrices that define inner products and proper covariances. The geometry of PSD: ellipsoids, not arbitrary shapes.
- SVD and PCA
Separate singular directions of a linear map from principal directions of centered data, then choose rank using reconstruction error.
Probability & Statistics 15
- Bayes' rule and the posterior
Normalize prior-weighted likelihoods over the right evidence population, then distinguish changed base rates from genuinely new evidence.
- Bias and variance of estimators
An estimator has bias (systematic error) and variance (sample-to-sample wobble). Mean-squared error decomposes into the two.
- Bootstrap and resampling
Estimate uncertainty by resampling the observed units. Preserve pairing and dependence, report the resampling unit, and know when the bootstrap can fail.
- Causal inference for ML decisions
Prediction estimates what will happen; causal inference estimates what an intervention will change. Define the estimand, assumptions, assignment process, and identification strategy.
- Central limit theorem: what becomes Gaussian?
Calculate the spread of repeated sample means, compare exact and Gaussian tails, and check what changes under dependence.
- Entropy and mutual information: a noisy observation
Derive uncertainty removed from a joint table, then change the prior and the observation grouping without confusing information with causation.
- Epistemic vs aleatoric uncertainty
Decompose a specified predictive mixture into within-model variation and disagreement, then test what new inputs, data and categorical outputs change.
- Expectation, variance, covariance, and correlation
Use moments to describe location, uncertainty, and dependence. Know what covariance measures, how transformations change it, and why correlation does not establish causation.
- Exponential family
A unified family of distributions (Gaussian, Bernoulli, Poisson, Beta, Gamma, etc.) with shared properties: sufficient statistics, conjugate priors, simple MLE.
- Hypothesis testing and confidence intervals
Quantify paired model gains under sampling assumptions, then compare uncertainty with a predeclared useful-effect threshold.
- KL divergence: which distribution weights the error?
Score fixed candidates in both directions, derive the cross-entropy identity, and test support and approximation-family changes.
- Markov chains
Stochastic processes where the future depends only on the present, not the past. Foundation of HMMs, MCMC, and many sequence models.
- Maximum likelihood estimation
Compare parameter values using fixed observed data, derive a Bernoulli estimate, and distinguish likelihood, priors, and asymptotic guarantees.
- Monte Carlo and importance sampling
Estimate expectations by averaging over random samples. The simplest way to compute integrals you can't compute analytically.
- Probability distributions used in ML
Choose a distribution from the data type and generation process. Connect its support, parameters, mean, variance, likelihood, and common ML use.
Classical ML 11
- DBSCAN
Density-based clustering: form clusters from regions of high point density, label sparse points as noise. Handles arbitrary cluster shapes; no k to specify.
- Decision trees
Compute weighted split improvement, trace a root-to-leaf region, and test larger leaves, regression targets, and a greedy XOR failure.
- Gradient boosting: fit the next correction
Trace a residual stump, recompute losses after shrinkage, and distinguish loss gradients, binary logits, and regularized Newton leaf weights.
- k-means clustering
Partition n points into k clusters by minimizing within-cluster variance. Lloyd's algorithm: alternate assigning points to nearest center and recomputing centers.
- Kernel methods and the kernel trick
Compute inner products in a high-dimensional feature space without ever materializing the features. The mathematical move that lets a linear classifier draw nonlinear boundaries.
- Linear regression
Fit an affine prediction by squared residuals, verify its projection, and separate solver, sampling, penalty, and variance assumptions.
- Logistic regression
Compute a Bernoulli likelihood and gradient, separate probability fitting from decision costs, and test interactions, separation, and odds interpretation.
- Naive Bayes
A trivially simple generative classifier that assumes features are conditionally independent given the class. Fast, parameter-light, surprisingly hard to beat on text.
- Random forests
Bag deep decision trees plus random feature subsets per split. Variance averaging beats any single tree; the dominant out-of-the-box ensemble before GBDT.
- SVM and the kernel trick
Solve a margin classifier, price violations, and change the feature space without confusing a score with a probability.
- t-SNE and UMAP: nonlinear dimensionality reduction
Both project high-dimensional data to 2D for visualization by preserving local neighborhoods. Both are easy to misread. Know what they show and what they hide.
Deep Learning Foundations 10
- Activation functions
Trace how activations introduce breakpoints, change gradients and constrain outputs. Compare ReLU, GELU, sigmoid and gated projections.
- Autoregressive vs. diffusion generation
Two paradigms for generative modeling: predict the next element step-by-step (autoregressive) or iteratively denoise from pure noise (diffusion). Different costs, different strengths.
- Backpropagation
Reverse-mode automatic differentiation applied to a computation graph. The algorithm that computes gradients for every parameter in one backward pass.
- Contrastive and self-supervised learning
Learn useful representations from unlabeled data by defining which views should agree and which examples should stay apart.
- Encoder-decoder architectures
An encoder summarizes the input into a representation; a decoder generates the output conditioned on it. The structure behind translation, T5, summarization, and many multimodal models.
- Exploding and vanishing gradients
Why deep networks were untrainable before residuals, normalization, and ReLU. The math of gradient magnitudes through depth and the standard fixes.
- Graph neural networks: message passing as A·X·W
Neighbors carry signal. A graph neural network averages each node's neighborhood and projects with a learned matrix. The same matmul as a CNN, on irregular structure.
- Residual connections
Trace addition through a residual block, including both gradient contributions, projection shortcuts, normalization and cancellation.
- The attention mechanism
Compute a weighted sum of values, weights derived from query-key similarity. The single operation that powers transformers, retrieval, and most of modern ML.
- Universal approximation theorem
Construct a ReLU approximation with a checked uniform error, then separate existence, training, generalization and extrapolation.
Generative Models 5
- Diffusion models
Construct one noisy training pair, recover a clean estimate, and distinguish noise prediction from dependent reverse sampling.
- Discrete gradient estimators
How to get gradients through a sampling step over discrete variables, where the reparameterization trick doesn't apply. Covers the score-function (REINFORCE) estimator, the straight-through estimator, and Gumbel-Softmax.
- Generative adversarial networks (GANs)
Two networks compete: a generator produces samples, a discriminator distinguishes them from real data. Sharp samples, training instability, mostly displaced by diffusion in 2026.
- Normalizing flows
Transport a base density through invertible maps and track local volume. Likelihood and sampling costs depend on the architecture.
- Variational autoencoders: calculate the bound and its gap
Evaluate a complete Gaussian ELBO, improve the approximate posterior, and test why changing the KL weight changes the guarantee.
Probabilistic Models 8
- Belief propagation (message passing)
Belief propagation computes graphical-model marginals through local messages. Sum-product is exact on trees and approximate on graphs with cycles.
- Expectation-Maximization (EM)
Compute posterior expected complete-data statistics, then improve a touching likelihood bound. Trace one exact two-coin EM iteration.
- Factor analysis and probabilistic PCA
Factor analysis uses latent factors with per-feature noise. Probabilistic PCA uses isotropic noise and recovers classical PCA in its zero-noise limit.
- Forward-backward and Viterbi: dynamic programming on chains
Sum and max over exponentially many paths in linear time. Forward-backward computes posteriors over hidden states; Viterbi finds the most likely state sequence. The same idea, two semirings.
- Gaussian mixture models
Model data as a weighted sum of K Gaussians. Soft clustering, density estimation, and the canonical EM example.
- Gaussian processes
A distribution over functions defined by a mean and covariance kernel. Predicts a mean and kernel-conditional uncertainty. Beautiful theory, brutal scaling.
- Hidden Markov models
A latent Markov chain emits observations through a per-state distribution. Forward-backward, Viterbi, Baum-Welch. The classical sequence model toolkit.
- Probabilistic graphical models
Express joint distributions as graphs whose structure encodes conditional independence. Bayesian networks (directed) and Markov random fields (undirected).
Reinforcement Learning 14
- Actor-critic methods
Policy gradient with a learned value baseline. The actor picks actions; the critic estimates how good they were. The architecture under PPO, A3C, SAC, and most modern RL.
- Advantage estimation and GAE
Policy gradients need a low-variance estimate of how much better an action was than average. GAE is the standard answer: an exponentially weighted blend of n-step returns.
- Contextual bandits
Choose actions from context while balancing reward and uncertainty. The bridge between supervised prediction, experimentation, and reinforcement learning.
- Exploration vs exploitation: epsilon-greedy, UCB, Thompson sampling
An RL or bandit agent has to keep trying new actions to learn while taking the best-known action to score. Three classical strategies, each with a different way of resolving the tension.
- Markov decision processes and Bellman equations
Define sequential decisions with states, actions, transitions, rewards, and value functions before choosing an RL algorithm.
- Multi-agent reinforcement learning
Learning when other agents change the environment: non-stationarity, credit assignment, coordination, competition, and evaluation.
- Policy gradient methods
Directly optimize the policy by following the gradient of expected return. REINFORCE, actor-critic, and the foundation of modern RL.
- Proximal Policy Optimization (PPO)
Constrain policy updates with a clipped surrogate objective. The default actor-critic algorithm in 2026. For robotics, games, and RLHF.
- Q-learning
Learn the action-value function Q(s, a) by Bellman backups. The foundation of value-based RL. DQN, Rainbow, and the original Atari breakthroughs.
- Reward shaping
Modify learning signals without accidentally changing the task, creating reward hacking, or hiding specification failure.
- RL environments and graders for language-model agents
The environment defines what behavior is possible; the grader defines what optimization values. Both need versioning, adversarial tests, and evidence.
- RL with verifiable rewards and GRPO
Train a model from outcomes that can be checked, using grouped samples to estimate relative advantage without a separate value model.
- Robotics policy learning
Learn actions from demonstrations, rewards, or world models while respecting partial observability, control frequency, safety, and sim-to-real shift.
- Value-based vs. policy-based RL
Trace values, action selectors, actors and critics; choose data reuse and learned dynamics independently of the action interface.
Computer Vision 10
- Adversarial robustness
Small worst-case perturbations, threat models, adversarial training, robust evaluation, and the difference between security and ordinary distribution shift.
- Anchor boxes and non-maximum suppression
Decode reference-box offsets, trace exact score-ordered suppression and separate training, inference and evaluation overlap rules.
- CNN architecture
Calculate convolution shapes, shared parameters, arithmetic, and receptive fields, then distinguish spatial information from channel capacity.
- Convolution as matrix multiplication (im2col)
Lower convolution patches into matrix columns, verify the filter product, and distinguish explicit storage, implicit kernels and backward overlap accumulation.
- Domain adaptation
Transfer a model across related but shifted data distributions without assuming unlabeled target data makes the problem identifiable.
- Multimodal foundation models
Align modality encoders, token budgets, fusion, objectives, and evaluation without pretending text, image, audio, and video share one natural representation.
- Object detection: Faster R-CNN, YOLO, DETR
Localize and classify objects in an image. The three main architectural families: two-stage proposal-based, one-stage grid-based, and transformer-based.
- ResNet
Residual connections enabled networks deeper than 30 layers to train. Still the dominant backbone for transfer learning in 2026.
- Semantic segmentation
Assign a class to every pixel: encoder-decoder architectures, losses, IoU, class imbalance, boundaries, and deployment constraints.
- Vision transformers (ViT)
Apply a standard transformer to a sequence of image patches. Beats CNNs at scale; the dominant backbone for foundation vision models in 2026.
NLP & Speech 10
- Automatic speech recognition (ASR)
Connect audio timing to transcript alignment, compare CTC/RNN-T/attention context, and evaluate text errors separately from delivery delay.
- BERT and masked language modeling
Train a transformer to fill in randomly masked tokens. The result is a bidirectional encoder that broke a dozen NLP benchmarks at once and defined the pretrain-then-finetune era.
- Conditional random fields (CRFs)
A CRF models labels for a whole sequence and scores transitions jointly. Linear-chain CRFs improve taggers when neighboring labels constrain each other.
- Connectionist Temporal Classification (CTC)
How you train a sequence model to map audio (or pixels) to text without knowing the alignment. CTC marginalizes over every possible alignment with a blank symbol and a forward-backward sum.
- Hybrid versus end-to-end speech recognition
Compare modular acoustic-pronunciation-language pipelines with CTC, attention, and transducer systems across data, control, latency, and operations.
- LSTM and GRU: gating as Hadamard products
Recurrent networks fail because gradients vanish through repeated matmul. Gates fix this by using elementwise multiplication to control information flow. Then transformers replaced them anyway.
- RNN-Transducer (RNN-T)
The streaming-ASR workhorse. RNN-T fixes CTC's biggest weakness (its frame-independence assumption) by adding a prediction network that conditions on previously emitted tokens, while staying naturally streamable.
- Speaker recognition
Speaker verification and identification using embeddings, metric learning, calibration, anti-spoofing, and operating-point evaluation.
- Streaming automatic speech recognition
Emit transcripts with bounded latency using chunked encoders, monotonic alignment, endpointing, and stability-aware evaluation.
- Word embeddings: Word2Vec, GloVe, and the geometry of meaning
Map words to dense vectors so that similar words land near each other. The breakthrough that proved meaning lives in geometry, not symbols.
Retrieval & Recommenders 12
- Alternating least squares for collaborative filtering
Factorize the user-item matrix into two low-rank factors. Each is a linear regression given the other, so alternate. The classical recsys workhorse before deep learning.
- Approximate nearest neighbors: HNSW, IVF, and product quantization
Separate candidate routing from vector compression, then measure neighbor recall, task quality, latency and complete index memory against exact search.
- Content-based filtering
Content-based filtering scores item features against a user profile. It handles item cold-start and often complements collaborative filtering.
- Embedding spaces and similarity metrics
Choose dot product, cosine, or distance from the retrieval objective, then verify normalization and approximate indexing.
- Factorization machines
Share vectors across feature pairs, derive sparse interaction evaluation, and separate available unseen-pair estimates from validated generalization.
- Knowledge-graph embeddings
Knowledge-graph embeddings turn link prediction into vector scoring. Compare TransE, DistMult, ComplEx, and RotatE by the relation patterns they can represent.
- Learning-to-rank losses and objectives
Ranking metrics are not differentiable training losses. Compare pointwise, pairwise, listwise, and lambda-weighted objectives by label quality, query structure, and target metric.
- Matrix factorization for recsys
Predict missing user-item ratings from shared factors, while separating observed targets, implicit-feedback assumptions, and cold-item support.
- Multi-task learning and objective interference
Shared training can improve data efficiency or cause negative transfer. Diagnose task balance through labels, loss scales, gradients, calibration, and per-task outcomes.
- Position bias and counterfactual learning to rank
Clicks reflect relevance and exposure. Use randomized data, propensities, IPS, self-normalization, or doubly robust estimates without hiding support and variance limits.
- TF-IDF and BM25
TF-IDF and BM25 are lexical retrieval baselines for search and RAG. BM25 adds term-frequency saturation and document-length normalization.
- Two-tower retrieval
Separate query and catalog encoding, preserve candidate and model-version contracts, and measure approximate retrieval before reranking.
LLM Internals 28
- Chain-of-thought monitorability
Measure whether visible reasoning contains useful evidence of behavior, while remembering that the trace may be incomplete, unfaithful, or changed by training.
- Continuous batching for LLM serving
Reuse finished request positions between iterations while preserving per-request state and respecting token and KV budgets.
- Decoding strategies: greedy, beam, top-k, top-p, temperature
Calculate eligible tokens, normalized probabilities and sequence scores under a declared decoding pipeline.
- FlashAttention
Derive a mergeable softmax row, rescale its numerator and denominator across tiles, and distinguish mathematical equivalence, storage, traffic, and latency.
- Grouped-query and multi-query attention (GQA, MQA)
Share K and V heads across query heads to shrink the KV cache 4-8x with negligible quality loss. Standard in modern decoder LLMs.
- KV cache: reuse past projections, retain growing reads
Trace cached projections, growing attention reads, and exact storage costs during causal decoding.
- Linear attention (Linformer, Performer, kernel methods)
Approximate the softmax attention matrix with a low-rank or kernel factorization so cost is linear in sequence length.
- LLM security threat models
Map assets, actors, trust boundaries, and attack paths across prompts, retrieval, tools, memory, generated code, and tenants.
- Long-context LLMs: training and serving techniques
What makes a 1M-token context model work. Position-encoding extension, attention kernels, KV-cache management, and the tradeoffs.
- Mechanistic interpretability
Use causal interventions, not attractive visualizations, to identify internal computations that produce model behavior.
- Mixture of Experts (MoE)
Replace one large feed-forward block with N smaller experts and a router that activates only k of them per token. Trades parameter count for compute.
- Model organisms of misalignment
Create controlled models with known problematic behavior to test detection and mitigation, while keeping the induced behavior bounded and measurable.
- Multi-head attention: why one head is not enough
Run h independent attention computations in parallel, then concatenate. Each head specializes in a different relation. The mechanism most senior candidates can write but few can motivate.
- PagedAttention and the vLLM serving model
Resolve logical KV positions through block tables, calculate shared allocation and tail waste, and preserve ownership during release or branching.
- Positional encoding: where does position enter attention?
Compare embeddings, rotary geometry, and score biases; compute ALiBi probabilities and test slope, visibility, and common-shift changes.
- Preference data and reward models
Preference optimization is a measurement system: sampling policy, annotator protocol, disagreement, calibration, and shift determine the signal.
- Prefill vs. decode: the two phases of LLM inference
LLM inference has two cost regimes with very different bottlenecks. Mixing them up leads to wrong cost models and bad serving decisions.
- Quantization: INT8, INT4, FP8, and the inference cost picture
Trace low-bit codes, rounding error, clipping, and scale overhead before measuring task quality or kernel-dependent speed.
- RAG: retrieval-augmented generation
Trace an authorized, versioned passage from corpus to answer, then distinguish citation existence from actual claim support.
- RLHF, DPO, and the alignment training stack
Compare supervised tuning, offline preference optimization, reward-model RL, and task-specific verification by their data, objectives, costs, and failure modes.
- Rotary position embeddings (RoPE)
The dominant position encoding for modern LLMs. Encodes relative position by rotating Q and K in 2D subspaces and supports several context-extension methods.
- Scalable oversight and AI control
Oversight tries to judge work beyond unaided human ability; control tries to keep systems safe even when the model may be strategically untrusted.
- Self-attention vs cross-attention
Self-attention reads from one sequence; cross-attention reads from another. This input choice determines encoder-only, decoder-only, and encoder-decoder structures.
- Sparse attention (BigBird, Longformer)
Replace the dense n×n attention mask with a sparse pattern that has O(n) non-zeros while preserving information flow across the full sequence.
- Speculative decoding
Draft and verify tokens while preserving the target sampling law. Determine when acceptance outweighs drafting and verification cost.
- Test-time compute, search, and verifiers
Spend extra inference compute on several candidate solutions, search, tools, or revision, then select results with evidence.
- Tokenization: BPE, WordPiece, and the LLM era
Trace ranked BPE merges, byte coverage and the versioned text-to-ID contract shared by training and serving.
- Transformer architecture: trace one complete block
Compute both residual updates, test causal visibility, and distinguish token communication, feature projections, normalization, and architectural variants.
Training Fundamentals 24
- Activation checkpointing
Trade compute for memory: drop activations during the forward pass and recompute them during the backward pass. The cheapest way to fit a larger model on the same GPU.
- Adam: trace direction and coordinate scale
Compute two moment updates, reconstruct a step with zero current gradient, and separate bias correction, epsilon, decay, and state memory.
- BatchNorm and LayerNorm: which values share statistics?
Normalize the same four values by columns and rows, then change companion examples, inference state, and RMS scaling.
- Calibration: make probabilities match their event
Name the predicted event, check held-out frequencies, calculate temperature scaling, and separate calibration, ranking, accuracy, and probability-based actions.
- Cross-entropy and softmax
Derive categorical negative log-likelihood and its logit gradient, then change target smoothing and temperature without losing the normalization contract.
- Dropout
Randomly zero out a fraction of activations during training. The simplest stochastic regularizer; still standard in vision and many NLP architectures.
- Foundation-model data curation
Source, filter, deduplicate, decontaminate, mix, and audit data as a versioned model input rather than a pile of tokens.
- Gradient accumulation
Hold parameters fixed, weight gradients by examples or valid tokens, flush partial windows, and distinguish accumulation from changing optimizer or batch statistics.
- Gradient clipping
Project a finite global gradient onto a norm ball, then distinguish that bound from the optimizer's final parameter displacement.
- L2 and weight decay: follow the shrinkage path
Derive the vanilla-SGD equivalence, isolate adaptive scaling, and work changes to parameter groups and cumulative decay exposure.
- Label smoothing
Replace one-hot targets with a softened distribution that puts ε mass on the wrong classes. Improves calibration, sometimes hurts retrieval.
- Learning rate schedules: warmup and cosine decay
Why almost every modern training run linearly warms up the LR over a few hundred steps and then decays it on a cosine to near zero.
- Loss spikes at scale
A training spike is a first-bad-transition problem across data, numerics, optimizer, distributed state, software, and hardware.
- Microannealing and midtraining
Compare matched late-checkpoint continuations to test a data-mixture change, without confusing domain loss, task gains or full-training evidence.
- Mixed precision training: FP16, BF16, and FP8
Track tensor precision through computation, scaling, guarded updates, and optimizer memory without assuming every tensor shares one dtype.
- Mixup and CutMix
Two data-augmentation schemes that train on convex combinations of pairs of inputs and their labels. Strong regularization for image classification; sometimes used in audio and tabular.
- Neural scaling laws and compute-optimal training
Use small training runs to estimate how loss changes with model size, data, and compute, then choose a training plan within a fixed budget.
- Regularization: diagnose the gap and choose a constraint
Check train/validation comparability, distinguish sparse and small coefficients, and return the best validated state instead of stacking penalties.
- SGD with momentum: keep the update history
Trace the saved gradient sum from startup to steady behavior, then change history length and learning-rate placement.
- Synthetic data generation and verification
Generate training examples for a clear capability, verify them with independent evidence, and protect diversity and held-out evaluation.
- The neural-network training recipe
Inspect data, verify updates, fit a known signal, then test generalization and tune within a declared budget.
- Weight initialization: trace signal scale through a layer
Derive ReLU second-moment scaling, compare fan-in and fan-out, and recompute the rule when the activation or path structure changes.
- WSD and WSD-S learning rate schedules
Warmup-Stable-Decay keeps the learning rate flat before a final decay. WSD-S adds single-path decay-and-return checkpoints when the final token budget is uncertain.
- Z-loss
Z-loss penalizes the squared softmax log-partition value. It limits logit growth and can improve stability during long training runs or cooldowns.
Systems & Infrastructure 17
- Accelerator network topology for distributed ML
Place each parallelism axis on hardware links that can carry its message size, frequency, and latency needs.
- All-reduce and other collectives
Choose a collective from each rank's required output, then account for reduction, shard ownership, traffic, latency and overlap.
- Context parallelism and ring attention
Shard a long sequence across devices while preserving exact attention and controlling activation memory.
- Fault-tolerant collectives
What happens when a rank fails, stalls, diverges, or corrupts data inside all-reduce, and which guarantees recovery can actually preserve.
- Floating-point formats: FP32, FP16, BF16, FP8, TF32
Separate exponent range, local rounding, accumulation and storage using checked FP16, BF16 and integer examples.
- FSDP and ZeRO: budget shards and temporary gathers
Derive persistent bytes at each sharding stage, trace one gathered unit, and test communication and activation-memory changes.
- GPU memory hierarchy: HBM, SRAM, and roofline reasoning
Decide whether an accelerator operation is limited by compute or by data movement across HBM, caches, and on-chip memory.
- Knowledge distillation
Train a small student to match a large teacher's outputs. The student gets richer signal than from hard labels because the teacher's soft probabilities encode similarity structure.
- ML data lineage, versioning, and reproducibility
Trace a model from raw data through transforms, features, labels, training, evaluation, and deployment. Version each contract for replay, rollback, deletion, and incident response.
- Pipeline parallelism
Split the model across GPUs by layer; pipeline mini-batches through the stages. The way to scale across slow interconnects when TP isn't viable.
- Profiling distributed ML workloads
Use step traces, roofline limits, and communication timelines to find the exposed bottleneck in training and inference.
- Pruning: structured vs unstructured sparsity
Set unimportant weights to zero, recover most of the accuracy. Unstructured pruning shrinks model size; structured pruning shrinks inference time. They solve different problems.
- Sequence packing with block-diagonal masks
Pack short examples without cross-example attention. Separate padding savings, position handling, loss masking, and measured throughput.
- Sharded matrix multiplication
Predict which collective communication a distributed matrix multiplication needs from its sharded axes.
- Strong scaling, MFU, and parallelism selection
Choose data, tensor, pipeline, and sharded parallelism by checking memory, communication, topology, and scaling efficiency.
- Tensor parallelism
Split a single matrix multiplication across multiple GPUs. The way to fit one transformer layer that doesn't fit on a single device.
- Transformer compute and memory accounting
Estimate parameters, training FLOPs, activation memory, and KV-cache memory from a small set of model dimensions.
ML Systems & Evaluation 15
- A/B testing for ML systems
The framework for proving a model change actually helps. Statistical power, novelty effects, network effects, all the things people get wrong.
- Confusion matrix and classification metrics
A confusion matrix counts predicted labels against actual labels. Read precision, recall and other fixed-threshold metrics from their correct populations.
- Cross-validation strategies
Hold-out, k-fold, stratified, grouped, and time-series CV. And when each one is and isn't appropriate.
- Data leakage and point-in-time correctness
A feature is valid only if it was available when the prediction was made. Prevent target, temporal, group, preprocessing, and evaluation leakage.
- Decision thresholds, asymmetric costs, and abstention
Choose actions from calibrated probabilities, error costs, and capacity constraints. Use separate thresholds for automatic action, human review, and abstention.
- Delayed labels, selective labels, and feedback loops
Production policies control which labels arrive and when. Track label maturity, selection, action propensities, and feedback before training or evaluating a model.
- Evaluation validity and benchmark contamination
Check that an evaluation measures the claimed ability, uses independent data, and still predicts performance on the target task.
- Expected Calibration Error (ECE)
How well do predicted probabilities match empirical frequencies? Bin predictions by confidence, compare bin-mean confidence to bin-accuracy.
- LLM-as-judge evaluation
Use a model to score open-ended outputs only after testing its rubric, bias, agreement, and resistance to manipulation.
- Model interpretability
How to explain a model's predictions: the split between intrinsic and post-hoc methods, global vs local, and the four techniques interviewers expect (feature importance, SHAP, LIME, and saliency / Grad-CAM).
- Perplexity and bits per token
The standard intrinsic metric for language models. What it measures, what units to use, and why it's a poor end-product evaluation.
- Precision, recall, and F1
The three metrics every classifier interview asks about. Their definitions, when to optimize which, and the F-beta generalization.
- Ranking metrics: NDCG, MAP, MRR
Beyond binary precision-recall: how to measure ranking quality when order matters and labels are graded.
- Reproducibility and fair model comparison
Compare models with matched resources, repeated runs, complete records, and tests that another person can reproduce.
- ROC, PR curves, and AUC
What ROC-AUC and PR-AUC measure, when to use which, and why ROC-AUC is misleading on heavy class imbalance.
Other
- Chinchilla scaling, MoE, and fused Triton kernels
Derive Chinchilla limits for dense and MoE models, implement an MoE layer in PyTorch, and fuse projections in Triton when F exceeds D.