Key terms in two registers: a plain-language definition for language professionals and a technical one for IT/ML readers.
Loading glossary…
47 terms shown
A
Acceleration
How fast a body's velocity changes: the change in velocity divided by the time taken, in metres per second, per second (m/s²). It measures change, not speed: a steady cruise, however fast, has none.
Example: A dropped apple gains about 9.8 m/s of speed every second: an acceleration of 9.8 m/s².
ⓘ Technical definition
The rate of change of velocity, a = dv/dt = d²x/dt²; over measured intervals, Δv/Δt. A vector, pointing the way the velocity is changing. By Newton's second law, a = F/m.
The amount of turning motion a moving or spinning object carries, which keeps a planet going round the Sun or a spinning top spinning. It is torque's sibling: a torque is what changes it.
Example: A 2 kg ball moving at 3 m/s straight across a 0.5 m string from the pivot has |L| = 0.5 × 2 × 3 = 3 kg·m²/s.
ⓘ Technical definition
L = r × p, the cross product of the position vector r from the pivot and the momentum p = mv. A torque τ changes L at the rate τ per unit of time; with no torque, L stays constant.
The mechanism that lets a model look at all other words in the sentence when deciding how to interpret any one word — so 'bank' in 'river bank' can draw on 'river' for context.
ⓘ Technical definition
Computes a weighted sum of value vectors V, where the weights come from softmax-normalised query–key dot products: Attention(Q, K, V) = softmax(QKᵀ/√d_k)V.
One copy of the attention mechanism. A model runs several of these in parallel, each learning to notice a different kind of word relationship (subject–verb, adjective–noun, coreference, etc.).
ⓘ Technical definition
A single (Q, K, V) triplet with its own weight matrices Wᵠ, Wᴷ, Wᵛ; produces a d_head-dimensional output vector. d_head = d_model / h, where h is the total number of heads.
A language model, published by Google in 2018, that reads a whole sentence at once, looking both left and right of every word, and turns each word (or piece of a word) into a list of numbers that carries its meaning in context. It is trained by hiding words and guessing them back.
ⓘ Technical definition
Bidirectional Encoder Representations from Transformers: a stack of Transformer encoder blocks (12 in BERT-base, 24 in BERT-large) with no causal mask, pre-trained on masked language modelling and next-sentence prediction, then fine-tuned or used as a source of contextual token vectors.
A special placeholder word added at the very start of every sentence before it enters the model. After all the processing layers, the model uses this placeholder's final vector to represent the meaning of the whole sentence.
ⓘ Technical definition
A learned special token [CLS] prepended to every input sequence. After pre-training with masked language modelling and next-sentence prediction, its encoder output is used as the sequence-level representation for classification.
Speeding code up without changing its algorithm — fewer copies, better data structures, vectorised or compiled inner loops.
ⓘ Technical definition
Reducing the constant multiplier of an algorithm's cost (caching, avoiding per-item overhead, contiguous data, C/NumPy inner loops) without changing its Big-O; matters once complexity is already appropriate.
A score between −1 and +1 that measures how similar two word or sentence meanings are. A score of 1 means they point in the same direction (very similar); 0 means unrelated; −1 means opposite.
ⓘ Technical definition
cos θ = (a · b) / (‖a‖ · ‖b‖); measures the angle between two vectors in ℝⁿ independently of their magnitude. Used to compare embeddings because direction encodes meaning while magnitude often encodes frequency.
A way to multiply two vectors in space that gives a third vector, at right angles to both. Its length is the area of the parallelogram the two vectors span.
u × v = (u₂v₃ − u₃v₂, u₃v₁ − u₁v₃, u₁v₂ − u₂v₁); |u × v| = |u||v| sin θ; direction by the right-hand rule. Anticommutative (v × u = −(u × v)) and not associative.
Making a very long list of numbers shorter while keeping the most important information — like compressing a photo without losing the recognisable shapes.
ⓘ Technical definition
Projecting data from ℝⁿ into a lower-dimensional subspace ℝᵏ (k ≪ n). Truncated SVD retains the top k singular vectors; PCA maximises explained variance. Reduces noise and computational cost.
displacement
The change of place from a start to a finish, as the crow flies: how far, and in which direction. It ignores the route taken.
Example: Walk 3 km east then 4 km north: the displacement is (3, 4), 5 km long, although the walk was 7 km.
ⓘ Technical definition
The vector from the initial position to the final position, Δr = r_final − r_initial. Successive displacements add as vectors.
A way to multiply two vectors that gives a single number: their lengths multiplied together and by the cosine of the angle between them, so it is largest when they point the same way, zero when they are at right angles and negative when they point apart. It is also what you get by multiplying each pair of matching components and adding them up. In machine learning it measures how alike two embeddings are: words with similar meanings tend to have high dot products.
ⓘ Technical definition
a · b = Σᵢ aᵢbᵢ = |a| |b| cos θ (magnitudes also written ‖a‖ ‖b‖), where θ is the angle between a and b; a · b = 0 exactly when a and b are perpendicular (or one is zero). In physics, the work of a force F over a displacement d is F · d; in attention, the score of how strongly a query matches a key.
A list of numbers that represents the meaning of a word. Words with similar meanings get similar lists of numbers, so the model can detect that 'cat' and 'kitten' are related.
ⓘ Technical definition
A dense vector in ℝ^d_model that encodes semantic and contextual information. Produced by looking up a learned embedding matrix E ∈ ℝ^{|V| × d_model} at the row indexed by the token ID.
A push or a pull on a body. A force is what changes a body's motion: without one, the motion goes on unchanged. Measured in newtons.
Example: Friction is the force that stops a pushed box on the floor.
ⓘ Technical definition
A vector quantity F that produces an acceleration a = F/m on a body of mass m (Newton's second law). Forces come in equal and opposite pairs acting on two different bodies (the third law).
A sketch of one body, shrunk to a dot, with an arrow for every force acting on it, each labelled with what exerts it. Forces the body exerts on other things are left out.
Example: A book on a table: two arrows, its weight (19.62 N for 2 kg) down and the table's normal force up.
ⓘ Technical definition
A diagram of all external forces on a single body, drawn as vectors from one point; their vector sum is the net force F_net = m a.
A technique that keeps the numbers flowing through the model from becoming too large or too small, making training more stable. It rescales each layer's output to a standard range.
ⓘ Technical definition
Normalises a vector to zero mean and unit variance across its features: (x − μ) / (σ + ε), then rescales with learnable gain γ and shift β. Applied after attention and FFN sublayers in the encoder block.
The size of a vector, the length of its arrow, written |v|: how far it reaches, whatever its direction. By Pythagoras, the vector (3, 4) has magnitude 5. Two vectors can point in the same direction but have different magnitudes; in machine learning, cosine similarity ignores magnitude.
ⓘ Technical definition
The Euclidean or L2 norm |v| = √(Σᵢ vᵢ²), also written ‖v‖ or ‖v‖₂, never negative and zero only for the zero vector. Normalising a vector to unit magnitude (|v| = 1) is called L2-normalisation and is commonly applied before cosine comparisons.
A rectangular table of numbers arranged in rows and columns. Multiplying a vector by a matrix transforms it — rotating, scaling, or mixing its components.
ⓘ Technical definition
A 2D array W ∈ ℝ^{m×n}. Matrix–vector multiplication Wx maps ℝⁿ → ℝᵐ. The embedding lookup table, the Q/K/V weight matrices, and the output projection are all matrices.
How much motion a body carries: its mass times its velocity, with the velocity's direction. A heavy slow body and a light fast one can have the same momentum.
Example: A 1000 kg car at 20 m/s has a momentum of 20 000 kg·m/s.
ⓘ Technical definition
p = m v, a vector in kg·m/s; Newton's second law in its general form is F = dp/dt.
The words whose meaning vectors are closest to a given word. Finding nearest neighbours is how we check whether word embeddings have learned sensible meanings.
ⓘ Technical definition
The k words with the highest cosine similarity to a query vector: top-k argmax_{w ≠ q} cos(v_q, v_w). Used for analogy evaluation and embedding quality diagnostics.
Net force
All the forces on a body added together, taking their directions into account. It is the force that sets the body's acceleration; when it is zero, the motion does not change.
Example: A 40 kg crate pushed with 200 N against 117.72 N of friction feels a net force of 82.28 N forwards.
ⓘ Technical definition
The vector sum F_net = Σ F_i of the forces acting on a body, added component by component; Newton's second law reads F_net = m a.
BERT's second training task: it is shown two sentences, A and B, and learns to say whether B really came after A in the original text or was picked at random.
Example: "The cat sat." followed by "It fell asleep." is IsNext; followed by "Paris is in France." it is NotNext.
ⓘ Technical definition
A binary classification objective on sentence pairs: the final [CLS] vector goes through the pooler (dense layer + tanh) and a two-way classifier, trained with cross-entropy on IsNext / NotNext labels (50 % each).
The fixed point from which positions are measured, where every coordinate is zero. In the plane, distances across and up are both counted from it, along two axes at right angles.
Example: With the origin on the centre spot of an ice rink, a puck 3 m east and 4 m north of it is at (3, 4).
ⓘ Technical definition
The point O of a coordinate system, with coordinates (0, 0) in the plane or (0, 0, 0) in space; a position vector is the arrow from O to the body. A frame of reference fixes an origin, its axes and a clock.
A four-sided shape whose opposite sides are parallel and equal in length, like a rectangle pushed over sideways. Its area is its base times its height.
Example: Sides (2, 0, 0) and (0, 3, 0) span a 2 by 3 rectangle of area 6, and (2, 0, 0) × (0, 3, 0) = (0, 0, 6) has length 6.
ⓘ Technical definition
Two vectors u and v laid from one corner span a parallelogram with sides u and v. With θ the angle between them, its base is |u|, its height |v| sin θ, and its area |u||v| sin θ = |u × v|.
A small layer on top of BERT that takes the final vector of the [CLS] token, mixes its numbers with one weight matrix and squeezes each into the range −1 to 1. Its output is what the next-sentence task reads. It is not the same as pooling, which averages or picks rows without changing them.
ⓘ Technical definition
pooled = tanh(h_[CLS] · W_pool + b_pool): one dense layer and a tanh applied to the [CLS] row of the last encoder layer, trained by next-sentence prediction. Distinct from mean or [CLS] pooling, which combine the encoder rows as they are.
Collapsing all the individual word vectors in a sentence into a single sentence vector. Different pooling methods take different approaches: average all, use the first, or take the maximum.
ⓘ Technical definition
Aggregating token representations across the sequence dimension. Mean pooling: (1/T) Σₜ hₜ. CLS pooling: h₀. Max pooling: max over t dimension, element-wise.
Where a body is: its distance from a chosen starting point, along a chosen direction, in metres. The same instant can be described from different starting points, so the choice is written down once and kept.
Example: An apple 0.2 m below the hand is also 1.5 m above the floor: the same position, from two starting points.
ⓘ Technical definition
The coordinate x(t) of a body relative to an origin and an axis (in the plane or in space, a position vector r(t)). Kinematics describes a motion as position given as a function of time.
The arrow from a fixed origin to where a point or a body is. Its components are the point's coordinates, so giving the position vector says exactly where the point is.
Example: The point (3, 4) has position vector (3, 4), an arrow 5 long from the origin.
ⓘ Technical definition
r = (x, y) or (x, y, z), the vector from the origin O to the point P. For a moving body r(t) is a function of time; its derivative r′(t) is the velocity.
A pattern added to each word's numbers to tell the model where that word sits in the sentence. Without it, 'The dog bit the man' and 'The man bit the dog' would look identical to the model.
ⓘ Technical definition
A deterministic or learned vector p_i added to the embedding at position i: input_i = embedding_i + p_i. Enables the model to distinguish order without recurrence.
The convention that fixes which way a cross product points: fingers of the right hand along the first vector, curled towards the second, and the thumb points along the product.
Example: The x-axis crossed with the y-axis points along the z-axis, not against it.
ⓘ Technical definition
The orientation convention of a right-handed coordinate system, in which x̂ × ŷ = ẑ, ŷ × ẑ = x̂ and ẑ × x̂ = ŷ.
A single plain number with a size but no direction, like a temperature, a mass or −7, as opposed to a vector, which also has a direction. Multiplying a vector by a scalar stretches or shrinks it. In machine learning the temperature and the learning rate are scalars, beside the lists (vectors) and tables (matrices) of numbers.
ⓘ Technical definition
An element of ℝ, a rank-0 tensor. Scalar multiplication, written kv with the scalar beside the vector, scales every component of v by k, and its magnitude by |k|. Scalars arise as outputs of dot products, norms and loss functions.
The core calculation that produces an attention-weighted mix of all word vectors. Scaling prevents the dot products from becoming so large that the softmax saturates.
ⓘ Technical definition
Attention(Q, K, V) = softmax(Q Kᵀ / √d_k) V. Dividing by √d_k keeps the dot products in a stable range as d_k grows, preventing near-zero softmax gradients.
A single list of numbers that captures the meaning of an entire sentence. Two sentences with similar meanings will have similar sentence embeddings.
ⓘ Technical definition
A fixed-length vector in ℝ^d_model obtained by pooling the encoder output across the sequence dimension. Enables semantic similarity search and sentence-level classification.
A way of turning word vectors into one vector for a sentence: average the words, but let very common words count for less, then remove the one direction that every sentence shares.
ⓘ Technical definition
Arora, Liang and Ma (2017): v_s = (1/|s|) Σ_w a/(a + p(w)) · v_w with a ≈ 1e-3 and p(w) the word's corpus frequency, then v_s ← v_s − u uᵀ v_s, where u is the first singular vector of the stacked sentence vectors. No new objective and no labels: it changes how word vectors are combined, not what they know.
A mathematical operation that breaks a large table of numbers into three simpler parts, capturing the most important structure. It is used to compress word co-occurrence data into compact word vectors.
ⓘ Technical definition
Factorises M ∈ ℝ^{m×n} as M = U Σ Vᵀ, where U ∈ ℝ^{m×m} and V ∈ ℝ^{n×n} are orthogonal and Σ is diagonal with non-negative entries. Truncated SVD keeps the top k singular values to produce a rank-k approximation.
T
TF-IDF
A way of comparing texts by the words they share, giving more weight to words that are rare across the whole collection. Two sentences that share an unusual word look close; two sentences that say the same thing in different words look unrelated.
ⓘ Technical definition
Term frequency times inverse document frequency: tf(t, d) · idf(t), with idf(t) = ln((1 + N)/(1 + df(t))) + 1 in the smoothed form. Each document becomes a sparse vector over the vocabulary, compared by cosine. Nothing is learned, so the score is exactly the weighted word overlap.
A quantity with a size and a direction, drawn as an arrow and written as its components, an ordered list of numbers: a walk of 3 km east and 4 km north is the vector (3, 4), an arrow 5 km long. In machine learning the same lists stand for words or sentences as points in a space, and words with similar meanings end up as nearby points.
ⓘ Technical definition
An element of ℝⁿ, written by its components (v₁, …, vₙ); geometrically an arrow with a magnitude and a direction, added tip to tail. Operations: addition (component-wise), scalar multiplication, dot product, L2-norm. In this app, token embeddings are d_model-dimensional vectors, rank-1 tensors.
How fast a body's position changes, with a sign for its direction: the distance moved divided by the time taken. Positive moving away from the starting point, negative coming back.
Example: A cyclist who goes from 10 m to 30 m in 2 s has a velocity of 10 m/s.
ⓘ Technical definition
The rate of change of position, v = dx/dt; over a measured interval, the average Δx/Δt, which is the slope of the position-time graph. A vector in two or three dimensions.
A pattern like 'king is to queen as man is to woman' that good word embeddings can solve by doing arithmetic on the word vectors. It shows that the model has learned meaningful structure.
ⓘ Technical definition
Vector arithmetic in embedding space: v(king) − v(man) + v(woman) ≈ v(queen). Works because direction in embedding space encodes semantic relationships as a parallelogram structure.
Word embedding
A list of numbers that represents the meaning of one specific word. Unlike sentence embeddings, word embeddings do not take context into account — the word 'bank' has the same vector regardless of sentence.
ⓘ Technical definition
A static vector e_w ∈ ℝ^d produced by looking up word w in an embedding matrix E ∈ ℝ^{|V| × d}. Context-independent, unlike contextualised representations from Transformer encoder layers.
A number that measures how related two words are in meaning. Words like 'cat' and 'kitten' should score high; 'cat' and 'democracy' should score near zero.
ⓘ Technical definition
Typically cosine similarity between word embedding vectors: sim(a, b) = cos(v_a, v_b). Correlation with human judgements (e.g. WordSim-353, SimLex-999) is a standard evaluation benchmark.
Z
zero vector
The vector whose components are all 0. It goes nowhere: its magnitude is 0 and it has no direction. Adding it to a vector changes nothing.
Example: (3, 4) + (−3, −4) = (0, 0).
ⓘ Technical definition
0 = (0, 0) in the plane, (0, 0, 0) in space: v + 0 = v and v + (−v) = 0. It is the only vector of magnitude 0, and the only one without a unit vector.