AI Notes
Comprehensive glossary. Key terms, definitions. Reference 2024.
Core AI Concepts
Artificial Intelligence (AI)
The science and engineering of creating intelligent machines that can perform tasks typically requiring human intelligence—reasoning, learning, perception, language understanding, and decision-making. AI ranges from narrow systems (chess engines, spam filters) to the theoretical goal of artificial general intelligence (AGI) that matches human cognitive ability across all domains.
Machine Learning (ML)
A subset of AI where systems learn patterns from data rather than following explicitly programmed rules. Given training examples, ML algorithms adjust internal parameters to minimize prediction error, discovering patterns that generalize to unseen data. Key paradigms: supervised learning (labeled data), unsupervised learning (unlabeled data), and reinforcement learning (trial-and-error with rewards).
Deep Learning
Machine learning using neural networks with many layers (deep architectures). Deep networks learn hierarchical representations—early layers detect simple patterns (edges, phonemes), later layers compose them into complex concepts (faces, sentences). Enabled by GPUs, large datasets, and architectural innovations (ReLU, batch normalization, residual connections).
Neural Network Terms
Neuron (Node)
The fundamental computational unit: receives inputs, applies weights, sums them with a bias, passes through an activation function to produce an output. Inspired by (but not identical to) biological neurons.
Activation Function
A nonlinear function applied after the weighted sum in each neuron. Without nonlinearity, any depth of network collapses to a single linear transformation. Common choices: ReLU (max(0,x)), sigmoid (1/(1+e^(-x))), tanh, softmax (for output probabilities).
Backpropagation
The algorithm for computing gradients of the loss function with respect to all network weights, using the chain rule of calculus applied backward from the output layer. Enables gradient descent optimization by determining how to adjust each weight to reduce prediction error.
Gradient Descent
Iterative optimization algorithm that updates parameters in the direction that decreases the loss function. Variants include SGD (one sample), mini-batch (subset), and adaptive methods (Adam, RMSprop) that adjust learning rates per parameter.
Epoch
One complete pass through the entire training dataset. A model typically trains for 10-100+ epochs, seeing each example multiple times. Distinct from "iteration" (one weight update) and "batch" (one subset of data).
Overfitting / Underfitting
Overfitting: Model memorizes training data including noise, performing well on training but poorly on new data (high variance). Underfitting: Model is too simple to capture patterns, performing poorly on both training and test data (high bias).
Dropout
Regularization technique that randomly sets a fraction (typically 0.1-0.5) of neurons to zero during training. Forces the network to develop redundant representations, preventing co-adaptation between neurons. Disabled during inference.
Architecture Terms
CNN (Convolutional Neural Network)
Architecture using convolutional layers that slide learned filters across spatial inputs (images). Exploits spatial locality (nearby pixels are related) and weight sharing (same filter everywhere). Hierarchical: early layers → edges, deeper layers → objects.
RNN (Recurrent Neural Network)
Architecture with loops that maintain hidden state across timesteps, processing sequential data (text, audio, time series). State at time t depends on input at t and state at t-1. Suffers from vanishing gradients for long sequences.
LSTM (Long Short-Term Memory)
RNN variant with gating mechanisms (forget, input, output gates) that control information flow through a cell state. Solves the vanishing gradient problem by creating gradient highways, enabling learning over hundreds of timesteps.
Transformer
Architecture based entirely on self-attention mechanisms, processing all sequence positions in parallel. Replaced RNNs for most sequence tasks due to superior parallelization and long-range dependency modeling. Foundation of BERT, GPT, and modern LLMs.
Attention Mechanism
Mechanism allowing models to focus on relevant parts of the input when producing each output element. Computed as weighted sum of values, where weights are determined by query-key similarity. Self-attention relates different positions within the same sequence.
Training Terms
Loss Function
Mathematical function measuring how wrong the model's predictions are. Cross-entropy for classification (measures distribution divergence), MSE for regression (measures average squared error). Training minimizes this function.
Learning Rate
Hyperparameter controlling the step size in gradient descent. Too large: overshoots optima, diverges. Too small: converges extremely slowly. Typically 1e-5 to 1e-2, often scheduled (warmup + decay).
Batch Size
Number of training examples processed together before one weight update. Larger batches: more stable gradients, better GPU utilization. Smaller batches: more noise (can help generalization), less memory. Typical: 32-256.
Transfer Learning
Using knowledge from one task/domain to improve performance on another. Pre-train a model on large general data, then fine-tune on specific task with limited data. Dramatically reduces data requirements (ImageNet → medical imaging, WebText → sentiment analysis).
NLP Terms
Tokenization
Converting raw text into discrete units (tokens) for model input. Word-level ("running" → 1 token), subword (BPE: "running" → "run" + "##ning"), character-level. Modern models use subword (30K-50K vocabulary).
Embedding
Dense vector representation of discrete items (words, tokens, entities) in continuous space. Learned such that semantically similar items have similar vectors. word2vec, GloVe (static) vs. BERT, GPT (contextualized—same word gets different embeddings in different contexts).
Fine-tuning
Adapting a pre-trained model to a specific task by training on task-specific data with a small learning rate. Modifies the pre-trained weights slightly rather than training from scratch. Standard paradigm since BERT (2018).
Reinforcement Learning Terms
Agent, Environment, State, Action, Reward
Agent observes state from environment, takes action, receives reward and new state. Goal: learn policy (state→action mapping) that maximizes cumulative discounted reward over time.
Policy (π)
The agent's strategy: mapping from states to actions. Can be deterministic (π(s) = a) or stochastic (π(a|s) = probability). The goal of RL is finding the optimal policy π*.
Q-Function / Value Function
Q(s,a): Expected cumulative reward from taking action a in state s, then following optimal policy. V(s): Expected cumulative reward from state s under a given policy. Bellman equations relate values recursively.
Generative AI Terms
LLM (Large Language Model)
Transformer-based model trained on massive text corpora (billions to trillions of tokens) that can generate, understand, and reason about natural language. Examples: GPT-4, Claude, Llama, Gemini.
RAG (Retrieval-Augmented Generation)
Architecture that combines retrieval (searching relevant documents) with generation (LLM producing answers). Reduces hallucination by grounding responses in retrieved factual content.
Hallucination
When an LLM generates plausible-sounding but factually incorrect information. Occurs because models learn to produce fluent text, not necessarily truthful text. Mitigated by RAG, fact-checking, and calibration training.
Prompt Engineering
The art of crafting input text (prompts) to elicit desired behavior from LLMs. Techniques include few-shot examples, chain-of-thought reasoning, role assignment, and structured output formatting.
RLHF (Reinforcement Learning from Human Feedback)
Training methodology aligning LLMs with human preferences. Humans rank model outputs, a reward model learns these preferences, and RL (PPO) optimizes the model to generate preferred responses.
Evaluation Metrics
Accuracy, Precision, Recall, F1
Accuracy: correct/total. Precision: true positives / predicted positives (few false alarms). Recall: true positives / actual positives (few misses). F1: harmonic mean of precision and recall (balances both).
BLEU, ROUGE
BLEU: N-gram overlap for machine translation (precision-oriented). ROUGE: N-gram overlap for summarization (recall-oriented). Both compare generated text to human references.
Perplexity
Measures how well a language model predicts text. Lower = better predictions. Perplexity of k means the model is as uncertain as choosing uniformly among k options at each step.
Exam Focus
Revise definitions, diagrams, examples, and short-answer points for AI Glossary - Terms & Definitions.
Interview Use
Prepare one clear explanation, one practical example, and one common mistake for this Artificial Intelligence topic.
Search Terms
artificial-intelligence, artificial intelligence, artificial, intelligence, resources, glossary, ai glossary - terms & definitions
Related Artificial Intelligence Topics