Contents
  1. Prediction tasks, features, and targets
  2. Training, fitted state, and inference
  3. Supervision, baselines, and loss
  4. Model families and inductive assumptions
  5. Gradients and parameter updates
  6. Structure learning and data-derived targets
  7. Actions, rewards, and learning from interaction
  8. Generalization and independent assessment
  9. Overfitting, regularization, and residual uncertainty
  10. Distribution shift and prediction coverage
  11. Prediction and causal effects
  12. From predictive performance to system usefulness
  13. Check understanding
  14. Open questions
  15. Selected talks
  16. References
  17. Talk library
← All topics

Machine Learning Fundamentals

Machine learning fits a model to examples or feedback according to an objective. The central challenge is making useful predictions beyond that experience. Predicting software-build duration connects the essential decisions: what information enters the model, how learning changes it, how independent assessment checks it, and why predicting an outcome differs from changing that outcome.

Prediction tasks, features, and targets

A learning task specifies an input, an output, and the circumstances in which the output will be used. Statistical learning discovers predictive patterns from examples. Unlike a programmer-authored rule, the resulting behavior depends on the examples and fitting procedure. Both execute code; neither a successful fit nor executable code alone establishes useful predictions.

A build-duration predictor might estimate one job's build-command runtime, in minutes, immediately before execution, to inform a waiting-time estimate. A job is one execution within a potentially larger build. Whole-build duration, setup time, and command runtime are different targets. The TravisTorrent schema distinguishes these measurements; choosing one is part of specifying the task.

An example is one recorded job. These fields illustrate their different roles.
FieldRoleAvailable before execution
Project and job identifiersIdentify the observation and related recordsYes
Source size and configured test suitesCandidate features, captured before executionRequired by this task design
Build-command runtime, minutesObserved targetNo
Final status and test resultsOutcomes, not pre-build inputsNo

A feature is an input attribute; a feature vector collects one example's inputs. A label, or target, is its recorded answer. Parameters are fitted values shared across examples. The prediction is the model's computed answer, distinct from the observed target. These are the basic objects of supervised learning.

y^=b+j=1dwjxj\hat y=b+\sum_{j=1}^{d}w_jx_j Here xjx_j is feature jj, dd is the feature count, wjw_j is its fitted weight, and bb is a fitted intercept. The prediction y^\hat y estimates the recorded duration yy; the weights are not fields of each job.

Numeric inputs need a defined representation. One-hot encoding gives each category a binary column, avoiding an invented ordering such as compiler A < compiler B. Standardization subtracts a training-fitted mean and divides by a training-fitted standard deviation. Retain those values for later inputs. Preprocessing documentation explains both transformations.

Recorded durations can contain measurement noise. Missing or canceled jobs also require a declared inclusion rule: an absent duration is not a measured zero. Otherwise the dataset silently changes what the predictor estimates.

Training, fitted state, and inference

The training set contains examples used for fitting: determining model parameters from data. Inference applies the fitted function to another input. Saving a model preserves its learned state; restoring it requires the corresponding computational structure. An evaluation may compare predictions with labels and calculate loss without updating anything.

Fitted preprocessing belongs with the predictor. A new build must use the retained encoding and scaling, rather than recomputing them from itself or an evaluation batch. Otherwise the same numerical coordinate can acquire a different meaning.

Create state once, reuse it for predictions

Only fitting creates learned state.

Training creates transformations and parameters. New inputs consume both. Evaluation labels support scoring, with no update path.
Read the diagram as text
  • Training pairs.
  • Fit.
  • Fitted artifact. Transformations and parameters.
  • New features.
  • Transform and predict.
  • Withheld target.
  • Evaluate prediction.
  • Training pairsFit: data: examples.
  • FitFitted artifact: writes fitted state.
  • Fitted artifactTransform and predict: data: retained state.
  • New featuresTransform and predict: data: input.
  • Transform and predictEvaluate prediction: data: prediction.
  • Withheld targetEvaluate prediction: data: target.
  • Input changesSupplying another example changes what the model computes. Few-shot demonstrations placed in a language model's input also condition predictions while its weights remain fixed.
  • Parameter changesTraining changes stored fitted values through an update procedure. Computing gradients, selecting evaluation behavior, and applying an optimizer update are distinct operations.
  • Learned representationsAn embedding is a learned numerical representation of an input. Its parameters can be trained, then reused to produce features. Embeddings and Representation Learning develops how these representations acquire useful structure.

Supervision, baselines, and loss

Supervised learning uses paired inputs and recorded targets. Target choice determines the task: predicting duration is regression, while predicting failure is classification. Encoding success as 0 and failure as 1 does not turn category prediction into duration regression.

TaskOutputSimple training-fitted baseline
Duration regressionA quantity in minutesReturn the training targets' mean for every job; ignore features.
Failure classificationA category or failure scoreAlways choose the most frequent training category. Accuracy can still conceal poor minority-class performance.

A loss assigns a numerical penalty to a prediction. Empirical risk minimization means minimizing average loss on observed examples. The training objective may add penalties or constraints. Comparing a feature-dependent model with a baseline on the same new cases tests whether its added complexity buys predictive value.

LMSE=1ni=1n(y^iyi)2L_{\mathrm{MSE}}=\frac{1}{n}\sum_{i=1}^{n}(\hat y_i-y_i)^2 For nn examples, the residual y^iyi\hat y_i-y_i is prediction minus target. Mean squared error averages squared residuals; for minute-valued targets, its unit is minutes squared.
Example error patterns with the same mean absolute error.
Residuals, minutesMean absolute errorMean squared error
2, 22 minutes4 minutes²
0, 42 minutes8 minutes²

Classification can produce a probability score rather than only a label. Logistic regression transforms a weighted input score through a sigmoid, mapping any finite score between zero and one. For failure labels, this estimates failure probability under the modeled distribution. A probability-shaped output is not automatically calibrated: its numerical confidence still needs checking against outcomes.

(p,y)=ylogp(1y)log(1p)\ell(p,y)=-y\log p-(1-y)\log(1-p) Binary log loss, also called binary cross-entropy, compares failure probability pp with label y{0,1}y\in\{0,1\}. Using natural logarithms, a failed job contributes about 0.105 when p=0.9p=0.9, but 2.303 when p=0.1p=0.1. Confident mistakes receive larger penalties.

Label ambiguity differs from measurement noise. A paper may reasonably fit several subject categories even when the dataset records only its author's chosen primary category. Exact-match scoring then penalizes another defensible answer. Annabell Schäfer's classification example illustrates why a deterministic scoring rule does not make the underlying target unambiguous.

  • ObjectiveThe quantity optimization directly improves, such as average log loss. Incorrect targets remain incorrect even when the optimizer fits them successfully.
  • Reported metricThe chosen assessment summary, such as classification accuracy. Different scoring rules measure different properties.
  • User goalThe useful consequence, such as better scheduling or helpful edits. Zed's edit-model work distinguishes offline reference similarity from editor acceptance and latency; one score cannot stand in for all three.

Model families and inductive assumptions

A hypothesis class is the set of functions available to the learner. Model capacity describes how flexibly that class can fit patterns. An inductive bias is a restriction or preference favoring some solutions. Examples constrain predictions where observations exist; assumptions determine much of what happens elsewhere.

ModelPrediction structureFitted choices
Linear predictorOne weighted relationship across the input spaceWeights and intercept
Decision treeThresholds partition inputs into constant-prediction regionsSplit features, thresholds, and leaf predictions

Agreement on examples leaves choices elsewhere

Example

Two functions exactly fit the same observations.

Same fit, different predictions

One input varies; both functions use the same two observations.

Scroll sideways if the figure extends beyond the screen.

01.1252.253.3754.502.557.510Source size (thousand lines)Duration (minutes)LinearTree: lower regionTree: upper regionObserved
  • 1. Linear
  • 2. Tree: lower region
  • 3. Tree: upper region
  • 4. Observed
Read coordinates and regions as data

X: 04.5 thousand lines; Y: 010 minutes, increasing up. Axes scaled independently; screen angles and distances are not comparable.

Linear (polyline)

(0, 1); (4, 9)

Tree: lower region (polyline)

(0, 3); (1.99, 3)

Tree: upper region (polyline)

(2, 7); (4, 7)

Observed (points)

(1, 3); (3, 7)

The constructed line and threshold rule agree at both recorded points but differ elsewhere. The tree has a jump, not intermediate predictions at its threshold.

A hyperparameter controls fitting or the available model family rather than being learned by an ordinary fitting update. A tree's maximum depth is a hyperparameter; its selected split thresholds are fitted values. Learning rate is another hyperparameter. Choosing such settings uses validation evidence, not the final test results.

Gradients and parameter updates

A gradient describes local sensitivity: how a small change in each parameter would change the objective. Gradient descent moves opposite that direction. The learning rate scales the move. Local information does not guarantee that a large step helps, and reducing training loss does not guarantee better predictions on future examples.

θt+1=θtηθLB(θt)\theta_{t+1}=\theta_t-\eta\nabla_\theta L_B(\theta_t) The parameter vector θt\theta_t is updated at step tt; η>0\eta>0 is the learning rate. LBL_B is average loss on batch BB, and θLB\nabla_\theta L_B is its parameter gradient.

Step size changes the result

Example

The same gradient can lead to lower or higher loss.

Learning rate 0.1

Parameter 0.4; loss 2.56.

Scroll sideways if the figure extends beyond the screen.

-10.6252.253.8755.5-0.52.1254.757.37510Parameter w (dimensionless)Loss (dimensionless)LossStartUpdate
  • 1. Loss
  • 2. Start
  • 3. Update
Read coordinates and regions as data

X: -15.5 dimensionless; Y: -0.510 dimensionless, increasing up. Axes scaled independently; screen angles and distances are not comparable.

Loss (polyline)

(-1, 9); (-0.5, 6.25); (0, 4); (0.5, 2.25); (1, 1); (1.5, 0.25); (2, 0); (2.5, 0.25); (3, 1); (3.5, 2.25); (4, 4); (4.5, 6.25); (5, 9)

Start (points)

(0, 4)

Update (polyline)

(0, 4); (0.4, 2.56)

Learning rate 0.5

Parameter 2; loss 0.

Scroll sideways if the figure extends beyond the screen.

-10.6252.253.8755.5-0.52.1254.757.37510Parameter w (dimensionless)Loss (dimensionless)LossStartUpdate
  • 1. Loss
  • 2. Start
  • 3. Update
Read coordinates and regions as data

X: -15.5 dimensionless; Y: -0.510 dimensionless, increasing up. Axes scaled independently; screen angles and distances are not comparable.

Loss (polyline)

(-1, 9); (-0.5, 6.25); (0, 4); (0.5, 2.25); (1, 1); (1.5, 0.25); (2, 0); (2.5, 0.25); (3, 1); (3.5, 2.25); (4, 4); (4.5, 6.25); (5, 9)

Start (points)

(0, 4)

Update (polyline)

(0, 4); (2, 0)

Learning rate 1.25

Parameter 5; loss 9.

Scroll sideways if the figure extends beyond the screen.

-10.6252.253.8755.5-0.52.1254.757.37510Parameter w (dimensionless)Loss (dimensionless)LossStartUpdate
  • 1. Loss
  • 2. Start
  • 3. Update
Read coordinates and regions as data

X: -15.5 dimensionless; Y: -0.510 dimensionless, increasing up. Axes scaled independently; screen angles and distances are not comparable.

Loss (polyline)

(-1, 9); (-0.5, 6.25); (0, 4); (0.5, 2.25); (1, 1); (1.5, 0.25); (2, 0); (2.5, 0.25); (3, 1); (3.5, 2.25); (4, 4); (4.5, 6.25); (5, 9)

Start (points)

(0, 4)

Update (polyline)

(0, 4); (5, 9)

All panels share the quadratic and initial parameter. Arrows connect evaluated endpoints; they do not trace the loss surface.

For the dimensionless example L(w)=(w2)2L(w)=(w-2)^2, the gradient at w=0w=0 is −4. A learning rate of 0.1 gives w=00.1(4)=0.4w'=0-0.1(-4)=0.4, lowering loss from 4 to 2.56. A rate of 1.25 instead reaches 5, where loss is 9. The direction was useful; the displacement was excessive.

Illustrative pseudocode Python-like pseudocode
for x_batch, y_batch in training_batches:
    optimizer.zero_grad()
    predictions = model(x_batch)
    loss = loss_fn(predictions, y_batch)
    loss.backward()
    optimizer.step()

Backpropagation computes gradients through composed differentiable operations using the chain rule. The optimizer uses those gradients to change parameters. Clearing gradients matters because frameworks such as PyTorch accumulate them. The forward pass produces predictions; neither that pass nor loss calculation alone performs the parameter update.

A minibatch is a subset processed for one update. Minibatch stochastic gradient descent uses its average gradient instead of the entire dataset's gradient. Smaller batches introduce more sampling variation; larger batches can exploit vectorized computation but change update frequency. An epoch is one pass through the training examples, potentially containing many updates.

  • Optimization difficultyFailure to find a good training fit can reflect the update procedure, not just insufficient model capacity.
  • Other fitting proceduresLeast squares also admits analytic solutions. Trees select discrete splits rather than differentiating their thresholds.

Structure learning and data-derived targets

Unsupervised learning fits structure without externally supplied answer labels. K-means clustering assigns observations to a chosen number of centroids—the groups' mean vectors—to reduce within-group squared distances. Compactness under those coordinates is its objective, not discovery of authoritative categories.

The clustering illustration uses four fixed records.
RecordSource size, thousand linesTest suites
A11
B13
C51
D53

Scaling changes the preferred partition

Example

Fixed records form different minimum-distance groups.

Size divided by 1 thousand lines

Suites divided by 1 suite. Vertical groups: total squared distance 4.

Scroll sideways if the figure extends beyond the screen.

01.534.5601.534.56Scaled source size (dimensionless)Scaled suites (dimensionless)Group 1Group 2ABCDABCD
  • 1. Group 1
  • 2. Group 2
  • 3. A
  • 4. B
  • 5. C
  • 6. D
Read coordinates and regions as data

X: 06 dimensionless; Y: 06 dimensionless, increasing up. Equal scale on both axes.

Group 1 (polygon)

(0.6, 0.6); (1.4, 0.6); (1.4, 3.4); (0.6, 3.4)

Group 2 (polygon)

(4.6, 0.6); (5.4, 0.6); (5.4, 3.4); (4.6, 3.4)

A (points)

(1, 1)

B (points)

(1, 3)

C (points)

(5, 1)

D (points)

(5, 3)

A: (1.1, 1.2)

B: (1.1, 3.2)

C: (5.1, 1.2)

D: (5.1, 3.2)

Size divided by 4 thousand lines

Suite scale unchanged. Horizontal groups: total squared distance 1.

Scroll sideways if the figure extends beyond the screen.

01.534.5601.534.56Scaled source size (dimensionless)Scaled suites (dimensionless)Group 1Group 2ABCDABCD
  • 1. Group 1
  • 2. Group 2
  • 3. A
  • 4. B
  • 5. C
  • 6. D
Read coordinates and regions as data

X: 06 dimensionless; Y: 06 dimensionless, increasing up. Equal scale on both axes.

Group 1 (polygon)

(0.1, 0.6); (1.6, 0.6); (1.6, 1.4); (0.1, 1.4)

Group 2 (polygon)

(0.1, 2.6); (1.6, 2.6); (1.6, 3.4); (0.1, 3.4)

A (points)

(0.25, 1)

B (points)

(0.25, 3)

C (points)

(1.25, 1)

D (points)

(1.25, 3)

A: (0.35, 1.2)

B: (0.35, 3.2)

C: (1.35, 1.2)

D: (1.35, 3.2)

Two clusters throughout. Shading shows membership; letters retain record identity.

Relative feature scaling changes distance and therefore can change clustering. Subtracting the same mean cancels in pairwise differences; dividing one coordinate by a larger scale reduces its contribution. The illustration changes only the source-size scale, retaining records and cluster count. Scaling is a modeling choice, not evidence of meaningful feature importance.

MethodWhat it fitsInterpretive limit
Principal component analysis, or PCAPerpendicular directions capturing input variation; retaining fewer directions reduces dimension.High retained variation need not preserve prediction-relevant information. PCA centers inputs but does not automatically standardize their scales.
Density estimationHow observations are distributed across values; kernel methods combine smoothed contributions around observations.Bandwidth controls smoothing. Apparent structure depends on this choice, and high dimensions can make estimation difficult.
Self-supervised predictionTargets constructed from the data itself, such as predicting original text at corrupted positions.Targets still exist. BERT's masked-token training derives answers from original text rather than manual labels for each prediction.

These methods can be composed. A self-supervised model can supply frozen features for a supervised predictor; a linear probe trains only a final linear mapping to test what those features already contain. Embeddings and Representation Learning develops representation geometry, while Pretraining and Midtraining covers large-scale data-derived training.

Cluster interpretation still requires domain judgment. A group of price-related agent traces might combine incorrect quotations with incorrect refund calculations, despite different causes. Ben Hylak's trace-analysis example shows why a coherent-looking cluster is not automatically a stable, actionable issue.

Actions, rewards, and learning from interaction

Reinforcement learning improves action choices using rewards from interaction. The environment responds to actions; a scheduler's environment includes jobs and resources. Its observation exposes current allocations and waiting jobs. A state is sufficient information for predicting subsequent transitions; an observation may reveal only part of that state.

ObjectRole
PolicyChooses an action, possibly probabilistically, from available information.
RewardImmediate numerical feedback, such as a penalty for unfinished jobs.
ReturnAccumulated, possibly discounted future rewards.
Value estimatePredicts expected return under a policy; it is not itself the action-selection rule.

Scheduling changes later availability

Example

Completion frees the resource for another action.

1 / 4 · Choose A

0–1: A runs; reward −2.

One slot; fixed demands; known durations A=1 and B=2 ticks; no arrivals or preemption. Reward is minus unfinished jobs at each tick's start.
Read the diagram as text
  • Job A.
  • Job B.
  • A running.
  • A completed.
  • B waiting.
  • B running.
  • B completed.
  • Job AA running: status.
  • Job AA completed: status.
  • Job BB waiting: status.
  • Job BB running: status.
  • Job BB completed: status.
  • A runningB waiting: occupies slot.
  • A completedB running: frees slot.
  1. Choose A. 0–1: A runs; reward −2. Active: Job A, Job B, A running, B waiting. New: Job A, Job B, A running, B waiting.
  2. A completes. At 1: B remains waiting. Active: Job A, Job B, A completed, B waiting. New: A completed.
  3. Choose B. 1–3: B runs; rewards −1, −1. Active: Job A, Job B, A completed, B running. New: B running.
  4. Episode ends. At 3: both completed. Active: Job A, Job B, A completed, B completed. New: B completed.
Gt=k=0Tt1γkRt+k+1G_t=\sum_{k=0}^{T-t-1}\gamma^kR_{t+k+1} For an episode ending at TT, return GtG_t sums future rewards RR. The discount 0γ10\leq\gamma\leq1 controls their relative weight. With γ=1\gamma=1, the illustrated rewards −2, −1, −1 give return −4.

A Markov decision process assumes that current state and action suffice to determine the next-state and reward distributions. Compressed observations can violate that sufficiency. DeepRM's scheduling formulation explicitly acknowledges partial observability; a job summary should not automatically be treated as a complete environment state.

  • Credit assignmentA delayed reward follows many decisions and external events. Credit assignment determines how earlier choices should be updated; temporal order alone does not establish causal responsibility.
  • Exploration and exploitationExploitation chooses currently promising actions. Exploration collects experience about less-understood alternatives. The acting policy determines which state–action pairs become data, so repeatedly choosing familiar actions can leave important alternatives poorly estimated.
  • Consequences change later inputsChanging a scheduling action requires recomputing subsequent resource states and observations. Replaying the old observations to a changed policy generally does not simulate its outcome.

Rewards can also train generated behavior when outcomes are automatically checkable. Stefano Fiorucci's game example scores outcomes and invalid moves, illustrating that environment rules determine which behavior receives credit. Post-training and Alignment develops these methods for model behavior; a checkable score still needs to express the intended goal.

Generalization and independent assessment

Generalization means performing well on new cases from a specified population or process. A sample contains finitely many such cases. Population risk is expected loss—the average under that process over repeated draws. Empirical risk averages the observed sample. Different samples yield different estimates even when the predictor is fixed.

A lookup table can reproduce recorded job durations while having no answer for a new job. Low training loss therefore does not establish low population risk. The generalization gap separates those quantities. A fresh representative test sample estimates new-case performance; deterministic repetition of a prediction says nothing about whether it is correct.

Selection determines independence

A score used for revision becomes development feedback.

Training fits candidates; validation selects one. Test results assess the frozen choice. Revising from those results compromises untouched assessment.
Read the diagram as text
  • Training data.
  • Fitted candidates.
  • Validation data.
  • Selected, frozen model.
  • Untouched test data.
  • Test result.
  • Assessment retained.
  • Test becomes development data.
  • Training dataFitted candidates: data: fitting examples.
  • Fitted candidatesSelected, frozen model: selection: candidate choice.
  • Validation dataSelected, frozen model: selection: validation scores.
  • Selected, frozen modelTest result: data: predictions.
  • Untouched test dataTest result: data: assessment pairs.
  • Test resultAssessment retained: if used only for assessment.
  • Test resultTest becomes development data: if used to revise choices.
PartitionPermitted influence
TrainingFits parameters.
ValidationSelects models, settings, and checkpoints.
TestAssesses the selected, frozen choice.

Leakage occurs when information crosses a boundary needed for realistic prediction or independent assessment. It includes preprocessing fitted on test data. During cross-validation, a fold is one partition used in repeated training–validation rounds. Fit transformations separately inside each training fold, then apply them unchanged to that round's validation fold.

The split must match the claim. Holding out projects tests transfer to unseen projects. Predicting future builds of existing projects requires chronological separation. Related retries should not straddle a boundary that claims independent cases. Group separation and time separation address different dependencies; some tasks need both.

  • Scores can leak influenceHidden test records are not enough if their aggregate scores guide revisions. Adaptive selection makes later candidates depend on the reused data. Retain discovered failures for regression checks, then use fresh representative cases for an ordinary untouched-holdout claim.
  • Interfaces can enforce boundariesIn Zhengyao Jiang's fraud-preprocessing example, a shared training/testing function allowed leakage. Separating test access from training preprocessing removed the observed contamination. Such a boundary addresses that information path, not every possible evaluation defect.

Overfitting, regularization, and residual uncertainty

Underfitting means the fitted model misses useful structure, potentially because its family is too restrictive. High training loss can also reflect unsuccessful optimization. Overfitting means fitting sample-specific patterns that fail to transfer. Improving training loss while validation loss worsens is a warning, provided the losses and evaluation conditions are comparable.

In a small language-model training exercise, Angelos Perivolaropoulos describes validation loss eventually rising despite continued training improvement. Validation loss was a useful signal, but task behavior still required inspection. The plotted example expresses that possible divergence without prescribing a universal curve.

Continued fitting can worsen validation

Example

The best validation checkpoint precedes the best training fit.

A possible overfitting pattern

Validation improves initially, then deteriorates.

Scroll sideways if the figure extends beyond the screen.

02.254.56.75901.252.53.755Training progress (updates)Mean loss (dimensionless)TrainingValidationSelected checkpoint
  • 1. Training
  • 2. Validation
  • 3. Selected checkpoint
Read coordinates and regions as data

X: 09 updates; Y: 05 dimensionless, increasing up. Axes scaled independently; screen angles and distances are not comparable.

Training (polyline)

(0, 4.5); (1, 3.2); (2, 2.3); (3, 1.7); (4, 1.2); (5, 0.9); (6, 0.7); (7, 0.5); (8, 0.4)

Validation (polyline)

(0, 4.6); (1, 3.4); (2, 2.6); (3, 2.2); (4, 2); (5, 2.1); (6, 2.4); (7, 2.8); (8, 3.2)

Selected checkpoint (points)

(4, 2)

One run, fixed datasets, identical loss definitions. Update 4 minimizes the shown validation loss. It is a selection result, not a final test estimate.
J(w,b)=L(w,b)+λjwj2J(w,b)=L(w,b)+\lambda\sum_jw_j^2 L2 regularization adds a penalty on weight magnitude to predictive loss LL. Here the intercept bb is unpenalized. The hyperparameter λ0\lambda\geq0 controls shrinkage: zero removes the penalty, while excessive shrinkage can impair predictions.
InterventionWhat it addressesCondition
Change model family or optimizationInsufficient fitDistinguish restricted expressiveness from failure to fit the available family.
Increase regularizationSample-specific fittingSelect strength on validation; stronger is not always better.
Early stoppingDeterioration during continued fittingSelect the checkpoint using validation, then assess independently.
Collect relevant independent examplesLimited sample coverageRepeated copies add no new situations; target mismatch remains.

For squared-error prediction, bias describes how the average fitted prediction differs from the best prediction for the problem. Variance describes how fitted predictions change across newly sampled training datasets. Irreducible noise is outcome variability remaining beyond those differences. Prediction variance here is not randomness from repeatedly sampling outputs of one fixed model.

expected squared error=bias2+variance+noise\text{expected squared error}=\text{bias}^2+\text{variance}+\text{noise} This decomposition averages over training samples and outcome variability for the squared-error setting. More examples can stabilize fitted predictions without removing unpredictable outcome variation.

The decomposition does not impose one universal relationship between capacity and test error. Some settings show error falling again after an initial rise as capacity increases. Model size alone therefore cannot diagnose overfitting or select a remedy; separated predictive evidence must decide.

Distribution shift and prediction coverage

A data distribution describes how often inputs and outcomes occur together. A conditional distribution describes outcomes for a given input, or inputs for a given outcome. Distribution shift changes those patterns between training and deployment.

ShiftDefining conditionBuild interpretation
Covariate shiftInput frequencies change; outcomes conditional on inputs remain stable.Large projects become more frequent, without changing the duration relationship.
Label shiftOutcome frequencies change; inputs conditional on outcomes remain stable.Failure prevalence changes under this stronger modeling assumption.
Concept shift or driftOutcomes conditional on inputs change.A compiler change alters duration at the same recorded project size.

Within coverage and beyond it

Example

Changed input frequency need not imply extrapolation.

Interpolation

New size remains inside the historical range.

Scroll sideways if the figure extends beyond the screen.

01.1252.253.3754.502.557.510Source size (thousand lines)Duration (minutes)Fixed predictorHistorical observationsNew prediction
  • 1. Fixed predictor
  • 2. Historical observations
  • 3. New prediction
Read coordinates and regions as data

X: 04.5 thousand lines; Y: 010 minutes, increasing up. Axes scaled independently; screen angles and distances are not comparable.

Fixed predictor (polyline)

(0, 1); (4, 9)

Historical observations (points)

(1, 3); (2, 5); (3, 7)

New prediction (points)

(2.8, 6.6)

Extrapolation

New size exceeds historical coverage.

Scroll sideways if the figure extends beyond the screen.

01.1252.253.3754.502.557.510Source size (thousand lines)Duration (minutes)Fixed predictorHistorical observationsNew prediction
  • 1. Fixed predictor
  • 2. Historical observations
  • 3. New prediction
Read coordinates and regions as data

X: 04.5 thousand lines; Y: 010 minutes, increasing up. Axes scaled independently; screen angles and distances are not comparable.

Fixed predictor (polyline)

(0, 1); (4, 9)

Historical observations (points)

(1, 3); (2, 5); (3, 7)

New prediction (points)

(4, 9)

The predictor and historical observations stay fixed. Orange points are new predictions, not observed outcomes. Neither location guarantees accuracy.

Interpolation predicts within the observed input domain; extrapolation extends outside it. More frequent large projects can remain inside historical coverage. Unprecedented sizes require extrapolation. In multiple dimensions, each feature being individually within range does not establish coverage of their combination.

An accuracy change alone does not identify a shift mechanism. Data Quality and Curation develops collection and coverage practices; Evals develops assessment under changed conditions.

Prediction and causal effects

An intervention sets an action. A counterfactual describes its possible outcome. A causal effect compares interventions; confounding arises from shared causes of action and outcome.

Predicting duration under historical worker assignment differs from estimating what additional workers would accomplish. Random assignment can replace an assignment mechanism driven by difficulty, making comparable treatment groups in expectation. The intervention and outcome must still be specified, and the experiment must address the intended population. Observational comparisons require additional identification assumptions.

Difficulty creates a second explanation

Example

Allocation and duration share a cause.

Assumed build mechanism: harder jobs receive more workers and take longer. Setting allocation by intervention replaces the incoming assignment mechanism; the allocation–duration effect remains to be estimated.
Read the diagram as text
  • Build difficulty.
  • Worker allocation.
  • Build duration.
  • Build difficultyWorker allocation: influences assignment.
  • Build difficultyBuild duration: influences runtime.
  • Worker allocationBuild duration: possible causal effect.

For observational adjustment, three requirements matter.

  • ConsistencyThe recorded allocation corresponds to the sufficiently specified intervention whose effect is sought.
  • ExchangeabilityMeasured pre-allocation information removes allocation–outcome confounding. Unmeasured difficulty can defeat this requirement.
  • PositivityEach compared allocation occurs in relevant conditions. Historical records cannot supply comparisons for allocations never used there.

Feature importance describes a fitted predictor under a chosen attribution procedure. It does not identify what changing the corresponding real-world quantity would cause. Even changing the worker-count input and observing a smaller model prediction establishes only a computational response. Real-world effects depend on the assignment and outcome mechanisms, not just the predictor's accuracy.

From predictive performance to system usefulness

A model test supports a bounded predictive claim. Integration tests establish that the surrounding software passes the right inputs and handles outputs correctly. Deployed-system evaluation asks whether the resulting workflow achieves its intended outcome. A duration forecast may be accurate while the scheduling rule that consumes it remains ineffective.

Zed's edit-prediction work adds production acceptance and latency measurements because offline scores need not reflect editor preferences. Acceptance itself does not establish increased productivity. Evals develops intended-use criteria, uncertainty, offline versus live evidence, and failure investigation needed to connect model behavior with useful consequences.

Open questions

  1. Efficient assessment under repeated adaptation remains difficult: each revealed score can influence subsequent choices. Progress would preserve a defensible future-performance estimate under a declared query budget, without requiring a prohibitively large fresh dataset for every revision.

  2. Separating ambiguous labels from missing information remains a practical learning problem. More optimization cannot recover an author preference absent from the input. Progress would demonstrate that revised labels or additional available features improve independent agreement and task usefulness, rather than only the development score.

  3. Choosing model structure under a limited data budget remains uncertain because expressive capacity and generalization do not follow one universal curve. Progress would predict which structural assumptions transfer to new tasks under matched data and compute, then confirm those predictions independently.

  4. Learning policies from narrow experience leaves unvisited actions poorly understood. Exploration matters because it changes future training data, but informative actions can have costs. Progress would demonstrate improved held-out policy performance while explicitly bounding exploration costs and measuring coverage beyond familiar trajectories.

Follow the curated reading path through the speakers and demonstrations behind this entry.

Explore more talks

The rest of the library, beyond the curated path. Cited talks support this entry; reviewed transcripts were processed in full. Metadata candidates have not been reviewed as sources or verified as topic members.

24 matching talks

TalkSpeakerEventYear
Brendan RappazzoAI Engineer World's Fair 20262026
Charles FryeAI Engineer Summit 20232023
Merve NoyanAI Engineer Europe 20262026
Ilan BigioAI Engineer World's Fair 20252025
Vibhor KumarAI Engineer World's Fair 20242024
Eugene YanAI Engineer Summit 20232023
Isaac RobinsonAI Engineer Europe 20262026
Sina ShahandehAI Engineer World's Fair 20262026
Ishan AnandAI Engineer World's Fair 20252025
Phil HetzelAI Engineer Europe 20262026
Shafik QuoraisheeAI Engineer World's Fair 20252025
Ben HylakAI Engineer World's Fair 20262026
Daniel HanAI Engineer World's Fair 20252025
Gaurav MishraAI Engineer World's Fair 20262026
Robotics: why now?

Transcript reviewed

Quan Vuong, Jost Tobias SpringenbergAI Engineer World's Fair 20252025
Preetika Bhateja, Daniel BumpAI Engineer World's Fair 20262026
Low Level Technicals of LLMs

Transcript reviewed

Daniel HanAI Engineer World's Fair 20242024
Louis-François Bouchard, Paul Iusztin, Samridhi VaidAI Engineer Europe 20262026
Jesse HuAI Engineer Code 20252025
Parth AsawaAI Engineer World's Fair 20262026
Justin ReockAI Engineer Code 20252025
Angel Ortmann LeeAI Engineer World's Fair 20262026
LLM Evals That Work IRL

Cited in this entry

Aparna Dhinkaran, Aparna DhinakaranAI Engineer World's Fair 20242024
Tomas ReimersAI Engineer World's Fair 20252025

References

Coverage and source review
Processed transcripts
30 processed in full · 6 in the curated path
Automated source review
Passed
Metadata candidates
0 unreviewed; not verified topic membership
Corpus version
1bd8e407b26a07b33815594e1b2db5f41827119a2b3cb6fbf240f9fc571fc767

Automated review checks source support; it is not publication approval.

A synthesis of selected conference talks and technical references. Citations link to the source material; they do not imply that every talk on this subject is included.

  1. scikit-learn: Decision Trees

    Introduction, tree algorithms, and mathematical formulation. Supports the linear-versus-threshold-rule comparison without an algorithm catalog.

  2. Dive into Deep Learning: Generalization in Deep Learning

    Introduction and Revisiting Overfitting and Regularization. Supports plain-language inductive bias and limits of simple capacity narratives.

  3. PyTorch: Optimizing Model Parameters

    Hyperparameters; Optimization Loop; Loss Function; Optimizer; Full Implementation, including train_loop and test_loop. Formula summarizes the documented SGD mechanism.

  4. scikit-learn: Clustering

    K-means description, inertia equation, and limitations. Supports clustering vocabulary and the role of representation and distance.

  5. scikit-learn: Preprocessing data

    Sections 8.3.1 and 8.3.4. The distance equation is an algebraic consequence of documented standardization and the reused k-means objective, not a measured clustering result.

  6. Training an LLM from Scratch, Locally

    Falling training loss can coexist with worsening held-out loss; validation and generated samples should be checked during training.

  7. L2 regularization and generalization

    L2 penalty formula, Regularization rate, Picking the regularization rate and Early stopping sections; the combined logistic objective is a teaching construction using the companion log-loss note.

  8. NIST/SEMATECH e-Handbook: How do we Use the Model Beyond the Data Domain?

    Interpolation and extrapolation; Predict with caution; Do confirmation runs. The build-size contrast is an illustrative application, combined with the reused covariate-shift foundation, not an empirical build study.

  9. Google: Supervised learning foundations

    Foundational supervised learning concepts: Data, Dataset characteristics, Model, Training, Evaluating, and Inference. Formula and rule comparison are explanatory illustrations of the documented mechanism.

  10. TravisTorrent: Data Format

    General Data Structure and Data Description. Supports the running example's record design and target vocabulary, not a measured build-duration predictor.

  11. scikit-learn: Common pitfalls and recommended practices

    Inconsistent preprocessing; Data leakage; preprocessing and cross-validation pipeline examples.

  12. Dive into Deep Learning: Linear Regression

    Sections 3.1.1.1–3.1.1.4: model, loss, analytic solution, and minibatch optimization. Adds numerical-target noise, squared loss, and noniterative fitting to reused foundations.

  13. PyTorch Quickstart: forward computation, training, and loading

    Working with data; Creating Models; Optimizing the Model Parameters; Saving Models; Loading Models.

  14. Language Models are Few-Shot Learners

    Section 2, Approach, and figure 2.1; section 4, Measuring and Preventing Memorization of Benchmarks; appendix C, overlap methodology and results.

  15. How LLMs work for Web Devs: GPT in 600 lines of Vanilla JS

    Learning extends beyond MLP weights and biases to embeddings, attention parameters, and normalization parameters.

  16. Scikit-learn: scoring rules and baseline estimators

    Section 3.4.3 scoring parameter; 3.4.4.2 Accuracy score; 3.4.4.4 Balanced accuracy; 3.4.8 Dummy estimators.

  17. scikit-learn: DummyRegressor

    Estimator description, strategy parameter, and constant_ attribute. Complements the reused majority-class baseline.

  18. Logistic regression: features, parameters and conditional probabilities

    Sigmoid function, logistic-regression equation, log-odds derivation and worked calculation; click interpretation is an application of the documented binary model.

  19. Logistic regression: binary log loss

    Log Loss equation and variable definitions; Regularization discussion. The click-versus-utility distinction follows from the explicitly defined target.

  20. Stop Burning Tokens: Why self-improvement needs domain expertise first - Annabell Schäfer, Langfuse

    Deterministic scoring can conceal ambiguity in the labels being treated as ground truth.

  21. How We Built Zeta2: Training an Edit Prediction Model in Production — Ben Kunkle, Zed

    Zeta2 evaluation uses held-out inputs, multiple teacher references, text-similarity scoring, and a separate reversal metric.

  22. How We Built Zeta2: Training an Edit Prediction Model in Production — Ben Kunkle, Zed

    Offline scores may not reflect editor users' preferences, so deployed experiments expose models to adjustable traffic shares and track acceptance and latency.

  23. Google ML Crash Course: Dividing Datasets

    Training, validation, and test sets; repeated-test-use exercise; test-set quality guidance.

  24. Minibatch Stochastic Gradient Descent — Dive into Deep Learning

    Foundational update rule and batching mechanism, sections 12.5.2–12.5.4.

  25. PyTorch: Training a Classifier

    Training an image classifier, steps 1–5, especially Net.forward, CrossEntropyLoss, training loop, and test-set evaluation.

  26. Dive into Deep Learning: Model Selection, Underfitting, and Overfitting

    Training Error and Generalization Error; Underfitting or Overfitting; Model Complexity; Dataset Size; Polynomial Regression.

  27. scikit-learn: Principal component analysis

    Section 2.5.1, especially Exact PCA and probabilistic interpretation. Introduces dimensionality reduction through variance preservation.

  28. scikit-learn: Density Estimation

    Density Estimation: Histograms and Kernel Density Estimation.

  29. BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding

    Sections 3.1–3.2, especially Task #1: Masked LM. Use only the supervision mechanism, with further pretraining detail delegated to /topics/pretraining-and-midtraining.

  30. How Transformers Finally Ate Vision

    Frozen pretrained features can be evaluated with a learned linear projection, isolating how much useful information the representation already contains.

  31. Designing Agents (The Floor Is the Frontier)

    Clusters can support one-off error analysis but do not automatically provide stable, actionable issue identities.

  32. Resource Management with Deep Reinforcement Learning

    Sections 2–3: RL background, scheduling model, observations, actions, and rewards. Provides a concrete resource-scheduling foundation, not build-duration prediction evidence.

  33. Reinforcement Learning: An Introduction — second-edition draft

    Sections 1.1, 3.2–3.3 Goals/Rewards and Returns, 4.2 Policy Improvement, and 6.1 TD Prediction.

  34. Counterfactual Credit Assignment in Model-Free Reinforcement Learning

    Sections 1, 2.1 and 3; appendix F.1 structural causal model.

  35. Dive into Deep Learning: Q-Learning

    Sections 17.3.2–17.3.3, data collection and exploration. Use the feedback and coverage explanation, not the algorithm derivation.

  36. Let LLMs Wander: Engineering RL Environments — Stefano Fiorucci

    Reinforcement learning with verifiable rewards uses automatically checked outcomes to reinforce successful sampled trajectories rather than only imitating supplied responses.

  37. Let LLMs Wander: Engineering RL Environments — Stefano Fiorucci

    For weak models, allowing recovery from invalid actions can preserve learning opportunities that immediate termination removes.

  38. Dive into Deep Learning: generalization in classification

    Section 4.6 introduction and 4.6.1 The Test Set; equations 4.6.1–4.6.2.

  39. Cross-validation and held-out evaluation

    Section 3.1 introductory discussion of overfitting, validation and test sets; Section 3.1.1 Data transformation with held-out data.

  40. scikit-learn: Cross-validation for grouped and time-series data

    Sections 3.1.2.4–3.1.2.6, newly inspected beyond the introductory sections covered by web-heldout-evaluation-separation.

  41. Generalization in Adaptive Data Analysis and Holdout Reuse

    Dwork et al., 2015, version 2; introduction and section 1.2, Thresholdout section 4.1, and section 5 discussion of fresh validation. Read original full HTML.

  42. How Autoresearch Is Changing ML Research — Zhengyao Jiang, Weco AI

    In the reported fraud-detection experiment, separating test-data access from training preprocessing removed observed leakage that had inflated scores under a shared API.

  43. scikit-learn: Single estimator versus bagging—bias-variance decomposition

    Example introduction, component explanation, and repeated-dataset simulation. Provides locally understandable vocabulary without requiring an ensemble tutorial.

  44. Dive into Deep Learning: environment and distribution shift

    Section 4.7 introduction; 4.7.1 Types of Distribution Shift; covariate-shift and label-shift subsections.

  45. Dive into Deep Learning: Concept Shift

    Section 4.7.1.3, newly inspected beyond the covariate- and label-shift support in web-d2l-distribution-shift.

  46. Hernán and Robins: Causal Inference—What If

    Chapter 1, section 1.1, and chapter 7, section 7.1. Adds elementary definitions to web-finance-causal-identification-assumptions.

  47. The Target Trial Framework for Causal Inference From Observational Data: Why and When Is It Helpful?

    Hernán et al., 2025; inspected PubMed abstract and figure caption on identification assumptions. Full article was inaccessible.

  48. When observational action records identify causal effects

    Hernán and Robins, November 2019 manuscript; Technical Point 2.3 and chapter 3, sections 3.1–3.5, including Technical Point 3.1.

  49. Feature attribution is not a real-world intervention effect

    Section 2 attribution setup; section 3 observational versus interventional distributions, irrelevant-feature example and equation 14.

  50. LLM Evals That Work IRL

    Model evals compare model capabilities; task evals test whether the application performs its intended job.

  51. Rolling-origin forecast evaluation

    Section 5.10: rolling forecasting origin, multi-step forecast errors and stretch_tsibble example.

  52. How Evals and Prompts Shape Agent Behavior — Preetika Bhateja & Daniel Bump, YouTube Ads

    Maintain tests for edge cases and broader capabilities, use the test set sparingly, and refresh evaluation data with production examples.

  53. Why Your Agent Disagrees With Itself (And What To Do About It)

    Active learning selects potentially problematic examples for human clarification, then incorporates corrected labels or additional features into the next training cycle.

  54. Stop Burning Tokens: Why self-improvement needs domain expertise first - Annabell Schäfer, Langfuse

    Use separate fit, validation, and untouched test datasets, with distinct roles in the optimization loop.