AI & ML Glossary
Every important term in Artificial Intelligence and Machine Learning, explained clearly for students of all levels.
A set of rules or instructions a computer follows to solve a problem or perform a task. Machine learning algorithms learn from data rather than from hard-coded rules.
In machine learning models, bias is the systematic error introduced when assumptions are made to simplify learning. High bias causes underfitting, where the model misses relevant patterns.
The error introduced by sensitivity to small fluctuations in the training set. High variance causes overfitting, where the model memorizes noise instead of generalizing to new data.
The labeled dataset used to teach a model the mapping from inputs to outputs. The larger and more representative the training data, the better the model generalizes.
A portion of data held back from training, used only to evaluate a model's final performance on unseen examples.
When a model learns the training data too precisely, including its noise and outliers, resulting in poor performance on new, unseen data.
When a model is too simplistic to capture patterns in the data, resulting in high error on both training and test sets.
The process of using domain knowledge to extract and transform raw variables into informative input features that improve model performance.
One complete pass through the entire training dataset. Models are typically trained for many epochs to converge to an optimal set of weights.
The number of training examples used in one forward/backward pass. Smaller batches provide noisier but more frequent updates; larger batches are smoother but slower to converge.
A mathematical function that quantifies how far the model's predictions are from the actual targets. Training minimizes this function (e.g., Mean Squared Error, Cross-Entropy).
Parameters set before training begins, such as learning rate or number of layers. Unlike model weights, hyperparameters are not learned from data.
A technique for evaluating model generalization by splitting data into k folds, training on k-1 folds, and testing on the remaining fold, repeated k times.
Techniques (like L1/L2 penalties or Dropout) added to the loss function to prevent overfitting by penalizing model complexity.
An iterative optimization algorithm that moves model weights in the direction of steepest descent of the loss surface, reducing prediction error over many steps.
A mathematical function applied to a neuron's output to introduce non-linearity. Common examples include ReLU, Sigmoid, Tanh, and GELU.
The algorithm that computes gradients of the loss with respect to each weight using the chain rule. These gradients are then used by gradient descent to update the network.
A regularization technique that randomly zeroes out a fraction of neurons during each training pass, forcing the network to learn redundant, robust representations.
A technique that normalizes layer activations for each mini-batch, stabilizing and accelerating training of deep networks.
Skip connections that add a layer's input directly to its output. Introduced in ResNet, these enable training of very deep networks by mitigating vanishing gradients.
The method used to set initial values for a network's weights before training. Good initialization (e.g., Xavier, He) prevents vanishing/exploding gradient problems from the start.
Rectified Linear Unit: f(x) = max(0, x). The default activation for hidden layers due to its simplicity, sparsity, and avoidance of vanishing gradients for positive inputs.
A problem in deep networks where gradients become extremely small as they propagate backward, causing early layers to learn very slowly or not at all.
A hyperparameter controlling how large of a step the optimizer takes per gradient update. Too high causes divergence; too low causes painfully slow convergence.
Adaptive Moment Estimation: a popular optimizer that maintains per-parameter learning rates based on moving averages of first and second gradient moments.
The atomic unit of text processed by language models. Tokens can be words, sub-word chunks, or characters depending on the tokenizer. GPT-4 processes roughly 4 characters per token.
The mechanism in Transformers that allows each token to attend to all other tokens in the sequence, computing dynamic weighted sums of values based on query-key similarity.
A dense, low-dimensional vector representation of a token or phrase that captures semantic meaning. Similar concepts cluster together in embedding space.
The maximum number of tokens an LLM can attend to at once. GPT-4 has a 128k token context window, allowing it to process entire books in one pass.
A sampling parameter that scales output logits before Softmax. Higher temperature (>1) produces more random and creative outputs; lower temperature (<1) makes responses more deterministic.
The process of continuing to train a pre-trained model on a smaller, task-specific dataset to specialize its capabilities (e.g., medical QA, legal summarization).
Reinforcement Learning from Human Feedback. Human raters score model outputs, and a reward model is trained on these ratings to align LLM behavior with human preferences.
When an LLM confidently generates plausible-sounding but factually incorrect information. A core safety and reliability challenge in LLM deployment.
Retrieval-Augmented Generation: a technique that retrieves relevant documents from a knowledge base at inference time, grounding the LLM's responses in factual sources.
The art and science of designing inputs (prompts) to guide LLM behavior. Techniques include few-shot examples, chain-of-thought, persona assignment, and output format constraints.
Byte-Pair Encoding: a tokenization algorithm that iteratively merges the most frequent adjacent pairs of bytes/characters to build a compact sub-word vocabulary.
A method to inject information about token positions into Transformer inputs. Since self-attention is permutation-invariant, positional encodings allow the model to understand word order.
A neural network layer that slides learned filter kernels across the input image, computing local dot products to produce feature maps highlighting edges, textures, and shapes.
A small matrix of learnable weights (e.g., 3×3 or 5×5) that slides across an image during convolution, detecting specific local patterns such as horizontal edges or corners.
A downsampling operation that selects the maximum value within each region of the feature map, reducing spatial dimensions while retaining the most prominent feature activations.
The output of a convolutional layer — a 2D activation map that highlights which spatial locations strongly activated a particular filter.
The task of identifying and localizing multiple objects within an image by predicting bounding boxes and class labels simultaneously (e.g., YOLO, Faster R-CNN).
Assigning a class label to every pixel in an image. Semantic segmentation labels pixels by category; instance segmentation also distinguishes individual object instances.
Artificially expanding a training dataset by applying transformations (rotations, flips, crops, color jitter) to existing images, improving model generalization.
The decision-making entity in RL. It perceives the environment's state and takes actions to maximize cumulative reward over time.
Scalar feedback from the environment indicating how desirable the last action was. Positive rewards reinforce behavior; negative rewards (penalties) discourage it.
The agent's strategy: a mapping from states to actions. It can be deterministic (always pick action a in state s) or stochastic (probability distribution over actions).
Q(s, a): the expected total future reward the agent will receive by taking action a in state s and following the optimal policy thereafter.
A fundamental RL tradeoff. Exploration tries new actions to discover potentially higher rewards; exploitation uses current knowledge to maximize immediate reward.
A value between 0 and 1 controlling how much the agent values future rewards. γ close to 1 makes the agent far-sighted; γ close to 0 makes it myopic.
Systematic and unfair discrimination in AI outputs caused by biased training data or model design. Can perpetuate or amplify existing societal inequalities.
The degree to which the internal workings and decisions of an AI model can be understood and interpreted by humans. Critical for trust and accountability in high-stakes domains.
A mathematical framework that adds calibrated noise to datasets or model outputs, providing provable guarantees that individual data subjects cannot be identified from results.
A document accompanying a published ML model that describes its intended uses, performance across demographic groups, limitations, and potential misuse scenarios.
An adversarial attack where malicious actors inject corrupted samples into a model's training data, intentionally causing misbehavior on specific inputs at inference time.