Embedding
An embedding represents an item as a numeric vector learned or designed so useful relationships can be expressed geometrically.
The coordinates need not correspond to named human concepts. Nearby vectors can suggest similarity under the training objective, but proximity does not establish truth or identity.
A search system can compare a question vector with document vectors using cosine similarity.
Residual network
A residual network learns an adjustment to a representation while retaining a direct path for the original representation.
A block can compute h + f(h). Starting f at zero preserves the previous function, which can make adding a new trainable block less disruptive. It does not guarantee better answers.
HuLaHo can add a zero-initialized residual hidden layer before its next-word output layer.
Backpropagation
Backpropagation applies the chain rule to compute how each trainable parameter affects a loss.
An optimizer then uses those derivatives to change parameters. Computing gradients and deciding how to update weights are related but separate operations.
A wrong next-word prediction produces gradients through the output layer, hidden layers and word embeddings.
Catastrophic forgetting
Catastrophic forgetting is a substantial loss of earlier capabilities when a neural model trains on new data.
Replaying older examples and checking their performance can reduce forgetting. A good average score can still hide damage to a particular topic, so separate retention checks matter.
A learner trained only on recent sales messages may become worse at earlier technical wording.
Experience replay
Experience replay revisits stored examples while learning from new ones.
The selection policy affects which past information is retained. A buffer containing only the newest examples offers weak protection for older material.
A training batch can mix a new passage with examples sampled across the retained history.
Validation set
A validation set helps choose training settings or select checkpoints without using those examples for gradient updates.
Because model choices depend on validation results, validation performance is not an independent estimate after extensive tuning. A separate test set serves a different purpose.
Choose a checkpoint with validation loss, then report its result on a held-out audit set once.
Test set
A test set estimates performance on examples excluded from training and model selection.
Repeatedly changing the model in response to test results makes the test part of the selection process. Representativeness matters as well as separation.
A small unseen grammar set measures those examples; it does not establish general conversational intelligence.
Data leakage
Data leakage occurs when information unavailable in the intended prediction setting influences training or evaluation.
Duplicate passages across training and testing, future information in historical predictions, and preprocessing fitted on the full dataset can all inflate results.
Split near-duplicate documents together before measuring how well a model handles new documents.
Calibration
Probability calibration asks whether predicted probabilities agree with observed frequencies over comparable cases.
A next-token probability concerns a token under a language model. It is not automatically the probability that the sentence is factually correct.
Among many predictions assigned 80% probability, about 80% should occur for that event definition if the model is calibrated.
Precision
Classification precision is the fraction of predicted positive cases that are actually positive.
Precision equals true positives divided by true positives plus false positives. It is undefined when there are no predicted positives unless a reporting convention is declared.
If ten alerts contain eight real issues, precision is eight divided by ten: 80%.
Recall
Classification recall is the fraction of actual positive cases that are found.
Recall equals true positives divided by true positives plus false negatives. Increasing recall can reduce precision, depending on the decision threshold and data.
Finding eight of twenty real issues gives 40% recall, even if all eight alerts are correct.
Likelihood
Likelihood treats observed data as fixed and compares how different parameter values would account for those data under a model.
It uses the probability or density of the observations as a function of the parameters. It is not generally a normalized probability distribution over the parameters.
After observing eight heads in ten flips, compare the binomial likelihood for different assumed coin probabilities.
Normal distribution
A normal distribution is a continuous probability distribution specified by a mean and a positive standard deviation.
Its density is symmetric around the mean. Density at a point and probability over an interval differ: probabilities are integrals of density, not density heights.
For a standard normal variable, the probability of being at or below zero is 0.5.
Confidence interval
A frequentist confidence interval comes from a procedure designed to cover a fixed parameter at a stated long-run rate under its assumptions.
A particular computed interval either contains that fixed parameter or does not. The confidence level describes repeated use of the procedure, not a posterior probability for this one interval.
A Wilson interval estimates uncertainty around a proportion from independent Bernoulli observations.
Markov chain
A Markov chain models state transitions where the next-state distribution depends on the current state under the specified model.
For a row-stochastic transition matrix, each row contains nonnegative probabilities summing to one. Repeated multiplication propagates an initial state distribution.
A two-state weather model can propagate today's probabilities to tomorrow, assuming its supplied transitions remain applicable.
Pagerank
PageRank assigns scores to nodes in a directed graph using a random-walk model with teleportation.
Handling nodes with no outgoing edges and choosing a damping factor are part of the model. A computed score on your graph does not reveal a search engine's actual ranking score.
Apply the pagerank tool to a supplied link graph to inspect relative centrality.
Topological order
A topological order places every prerequisite before the nodes that depend on it in a directed acyclic graph.
A directed cycle prevents a complete topological order. Nodes blocked by a cycle need not themselves belong to that cycle.
Compile a library before compiling the application that imports it.
Cosine similarity
Cosine similarity measures the cosine of the angle between two nonzero vectors.
It compares direction independently of positive rescaling. A zero vector has no direction. For arbitrary real vectors the value ranges from minus one to one.
Vectors [1,0] and [0,1] have cosine similarity zero; [1,0] and [2,0] have similarity one.
Cross entropy
Cross entropy measures the expected negative log probability assigned by a predicted distribution to outcomes from a target distribution.
Its units depend on the logarithm base. Natural logarithms give nats. Assigning zero probability to a possible target outcome yields infinite cross entropy.
For one observed token, cross-entropy loss is minus the logarithm of its predicted probability.
Kl divergence
KL divergence measures an expected log probability ratio between two distributions.
It is nonnegative when defined, generally asymmetric and not a distance metric. It can be infinite if the second distribution assigns zero probability where the first assigns positive probability.
Comparing a distribution with itself yields KL divergence zero.
Idempotence
An operation is idempotent when repeating it has the same effect as applying it once.
This can make retries safer, but it does not mean the operation has no side effects. The relevant state and operation semantics must be defined.
Setting a flag to true repeatedly is idempotent; incrementing a counter repeatedly is not.
Race condition
A race condition occurs when behavior depends on the timing or ordering of concurrent operations in an unintended way.
Transactions, locks, immutable data or compare-and-swap checks can protect particular invariants. The right technique depends on the shared state and failure model.
Two workers reading the same counter and both writing an increment can lose an update.
Invariant
An invariant is a property intended to remain true at specified points as a system changes.
Naming invariants makes tests and design decisions more concrete. A passing example is evidence for that example, not proof that the property always holds.
A probability vector should contain nonnegative entries whose sum is one.
Root cause analysis
Root cause analysis investigates the mechanisms and conditions that produced a failure.
Reproduce the failure, collect evidence, distinguish symptoms from causes and test a proposed fix against both the failure and nearby cases. Multiple contributing causes may exist.
A share page showing the homepage can be a routing failure even when its HTML template contains a correct canonical URL.