AI

Quick reference for key AI/ML/DL terms. See Concepts for detailed explanations.


Machine Learning

Supervised Learning

Learning from labeled data where inputs are mapped to known outputs. The model learns a function that maps inputs to correct outputs through training on example pairs.

  • Classification: Predicting discrete categories/labels
  • Regression: Predicting continuous values
  • Training data: input-output pairs (x, y)
  • Goal: minimize prediction error on unseen data

Unsupervised Learning

Learning patterns from unlabeled data without explicit labels. The model discovers structure, patterns, or representations inherent in the data.

  • Clustering: Grouping similar data points
  • Dimensionality Reduction: Reducing feature complexity while preserving structure
  • Density Estimation: Modeling data distribution
  • No labeled outputs - model finds patterns autonomously

Semi-Supervised Learning

Learning from both labeled and unlabeled data. Leverages abundant unlabeled data alongside limited labeled data to improve model performance.

Weakly-Supervised Learning

Learning from coarse or incomplete labels. Uses inexact, imprecise, or noisy labels rather than exact annotations.


ML Models

Linear Regression

Predicting continuous values using a linear function: y = w^T x + b

  • Minimizes Mean Squared Error (MSE)
  • Highly interpretable baseline
  • Assumes linear relationship between features and target

Logistic Regression

Binary classification using a sigmoid function to output probabilities: P(y=1|x) = sigmoid(w^T x + b)

  • Output values between 0 and 1
  • Decision boundary is linear
  • Foundation for neural networks

Decision Tree

Hierarchical structure that makes decisions by splitting data based on feature values.

  • Interpretable, handles both numerical and categorical data
  • Prone to overfitting (mitigated by pruning, ensembling)
  • Split criteria: Gini impurity, information gain

Random Forest

Ensemble of decision trees trained on random subsets of data and features.

  • Reduces overfitting through averaging
  • Handles missing values, high-dimensional data
  • Robust to outliers

Gradient Boosting

Sequential ensemble method that builds trees to correct errors of previous trees.

  • XGBoost, LightGBM, CatBoost are popular implementations
  • Excellent performance on structured data
  • Requires careful hyperparameter tuning

k-NN (k-Nearest Neighbors)

Instance-based learning that classifies based on k closest training examples.

  • Simple, no training phase
  • Sensitive to noise and high dimensionality
  • Lazy learning - stores all training data

SVM (Support Vector Machine)

Finds the maximum-margin hyperplane between classes.

  • Support vectors define the decision boundary
  • Kernel trick handles non-linear boundaries
  • Effective in high-dimensional spaces

ML Evaluation

Overfitting

Model learns training data too well, including noise, failing to generalize.

Signs: High train accuracy, low validation accuracy

Remedies: More data, regularization, dropout, early stopping, simpler model

Underfitting

Model fails to capture patterns in training data.

Signs: Low accuracy on both train and validation

Remedies: More complex model, more features, more training time

Bias-Variance Tradeoff

Low Variance High Variance
High Bias Underfitting Good
Low Bias Overfitting Good
  • Bias: Error from overly simplistic assumptions
  • Variance: Error from sensitivity to training data
  • Goal: minimize total error = bias² + variance + irreducible error

Cross-Validation

Training technique that splits data into k folds, training k times and validating on different fold each time.

  • k-fold CV, leave-one-out, stratified CV
  • Provides more reliable performance estimate
  • Helps detect overfitting

Precision / Recall

See Metrics → Precision / Recall for the full definition and manufacturing context.


ML Features

Feature Engineering

Creating new input features from raw data to improve model performance.

  • Domain knowledge is crucial
  • Transformations: log, polynomial, encoding
  • Interaction features

Feature Selection

Choosing the most relevant features for the model.

  • Filter methods (correlation, chi-square)
  • Wrapper methods (forward, backward selection)
  • Embedded methods (Lasso, tree-based importance)

Dimensionality Reduction

Reducing feature count while preserving structure.

  • PCA: Principal Component Analysis - orthogonal projections
  • t-SNE: Non-linear embedding for visualization
  • UMAP: Preserves both local and global structure

Hand-Crafted Features

Features designed by domain experts.

  • HOG (Histogram of Oriented Gradients)
  • SIFT (Scale-Invariant Feature Transform)
  • LBP (Local Binary Patterns)

Deep Learning

Neural Network

Computing system inspired by biological neural networks, consisting of interconnected nodes (neurons) that process information through weighted connections.

  • Neuron: Basic unit that computes weighted sum + activation
  • Layer: Group of neurons
  • Deep: Multiple hidden layers

Activation Function

Non-linear function applied to neuron output that enables networks to learn complex patterns.

  • ReLU: max(0, x) - most common
  • Sigmoid: 1/(1+e^-x) - outputs 0 to 1
  • Tanh: (e^x - e^-x)/(e^x + e^-x) - outputs -1 to 1
  • GELU: Gaussian Error Linear Unit - used in Transformers

Weights and Bias

Learnable parameters in neural networks.

  • Weights (w): Control strength of connections between neurons
  • Bias (b): Offset added to weighted sum
  • Learned through backpropagation

Backpropagation

Algorithm for training neural networks by computing gradients of loss with respect to weights.

  • Forward pass: compute output
  • Backward pass: compute gradients
  • Update weights using gradient descent

Loss Function

Measures difference between predicted and actual values.

  • MSE: Mean Squared Error - regression
  • Cross-Entropy: Classification
  • Binary Cross-Entropy: Binary classification

Batch Normalization

Technique that normalizes layer inputs to have zero mean and unit variance.

  • Stabilizes training
  • Allows higher learning rates
  • Acts as regularizer

Dropout

Regularization technique that randomly sets a fraction of neuron outputs to zero during training.

  • Prevents co-adaptation of neurons
  • Reduces overfitting
  • Typically 0.1-0.5 dropout rate

DL Architectures

MLP (Multilayer Perceptron)

Fully connected feedforward neural network with multiple layers.

  • Each neuron connects to all neurons in next layer
  • No spatial awareness
  • Foundation for all deep learning

CNN (Convolutional Neural Network)

Deep learning architecture designed for processing grid-like data (images).

  • Convolution: Local pattern detection with shared weights
  • Feature maps: Activation patterns for learned features
  • Pooling: Downsampling for spatial invariance
  • Early layers learn edges, deeper layers learn objects

RNN (Recurrent Neural Network)

Network with loops allowing information to persist, processing sequential data.

  • Processes one element at a time
  • Maintains hidden state
  • Suffers from vanishing gradients (long sequences)

LSTM / GRU

Advanced RNNs that handle long-term dependencies through gating mechanisms.

  • LSTM: Long Short-Term Memory - input, forget, output gates
  • GRU: Gated Recurrent Unit - simpler, fewer gates
  • Solves vanishing gradient problem

Transformer

Architecture based on self-attention, processing sequences in parallel.

  • Self-Attention: Computes relationships between all positions
  • Multi-head Attention: Multiple attention patterns in parallel
  • Positional Encoding: Adds sequence order information
  • Foundation of modern NLP and vision models

Vision Transformer (ViT)

Applying Transformer architecture to image recognition.

  • Splits images into patches
  • Processes patches as sequence
  • Requires more data than CNNs but scales better

GAN (Generative Adversarial Network)

Two networks competing: generator creates fake samples, discriminator distinguishes real from fake.

  • Generator: Creates synthetic samples
  • Discriminator: Classifies real vs fake
  • Training is a minimax game

Diffusion Models

Generative models that learn to reverse a gradual noising process.

  • Forward process: Adds noise to data
  • Reverse process: Removes noise to generate
  • Denoising Diffusion Probabilistic Models (DDPM)

ResNet

CNN with residual connections (skip connections) enabling very deep networks.

  • Residual block: Output = F(x) + x
  • Allows gradient flow in deep networks
  • Enables training of 100+ layer networks

VGGNet

Simple, uniform architecture with 3x3 convolutions throughout.

  • 16-19 layers deep
  • Proven that deeper networks work better
  • Foundation for modern architectures

AlexNet

Early deep CNN that revolutionized computer vision (2012).

  • 8 layers, ReLU activation
  • Dropout for regularization
  • Won ImageNet competition

GoogLeNet

Inception module architecture with parallel pathways at different scales.

  • Inception modules: multiple filter sizes in parallel
  • 22 layers deep
  • Parameter efficient

MobileNet

Efficient architecture designed for mobile/edge devices.

  • Depthwise separable convolutions
  • Very few parameters
  • Trade-off: accuracy vs efficiency

EfficientNet

Architecture that uniformly scales depth, width, and resolution.

  • Compound scaling
  • State-of-the-art efficiency
  • Balanced model design

DenseNet

Each layer connects to every other layer in a feedforward manner.

  • Feature reuse
  • Reduces parameters
  • Strong gradient flow

YOLO (You Only Look Once)

Single-stage object detection that predicts bounding boxes directly.

  • Single forward pass
  • Real-time detection
  • Trade-off: speed vs accuracy

UNet

Encoder-decoder architecture with skip connections for image segmentation.

  • Symmetric encoder-decoder
  • Skip connections preserve spatial information
  • Used in medical imaging, semantic segmentation

Swin Transformer

Hierarchical Vision Transformer with shifted window attention.

  • Linear complexity
  • Local and global attention
  • State-of-the-art for many vision tasks

DL Training

Optimizer

Algorithm that updates model parameters to minimize loss.

  • SGD: Stochastic Gradient Descent
  • Adam: Adaptive moment estimation - most popular
  • AdamW: Adam with weight decay

Learning Rate

Controls how much model weights change during each update.

  • Too high: unstable training, divergence
  • Too low: slow convergence
  • Learning rate schedules: warmup, decay

Initialization

Setting initial weights before training.

  • Xavier/Glorot: for tanh, sigmoid
  • He initialization: for ReLU
  • Pre-training can help

Batch Size

Number of samples processed before updating weights.

  • Small: noisy gradient, better generalization
  • Large: stable gradient, faster training
  • GPU memory constraint

Regularization

Techniques to prevent overfitting.

  • L1/L2 weight decay
  • Dropout
  • Data augmentation
  • Early stopping

DL Tasks

Classification

Predicting a categorical label for input data.

  • Binary: two classes
  • Multi-class: more than two classes
  • Output: probability distribution over classes

Object Detection

Finding and classifying objects in images with bounding boxes.

  • Single-stage: YOLO (fast)
  • Two-stage: Faster R-CNN (accurate)
  • Output: bounding boxes + class labels

Segmentation

Pixel-level classification in images.

  • Semantic segmentation: class per pixel
  • Instance segmentation: distinguish individual objects
  • Panoptic segmentation: both

Anomaly Detection

Identifying unusual or rare patterns in data.

  • One-class SVM
  • Autoencoder reconstruction error
  • Industrial defect detection

Vision-Specific Concepts

Convolution

Operation that slides a kernel over input to produce feature maps.

  • Kernel: small learned filter (e.g., 3x3)
  • Stride: step size of sliding
  • Padding: border handling

Pooling

Downsampling operation that reduces spatial dimensions.

  • Max pooling: takes maximum value in region
  • Average pooling: takes average value
  • Provides translation invariance

Kernel

Small learnable filter in convolution operations.

  • Detects specific patterns (edges, textures)
  • Shared across spatial locations
  • Stacking creates hierarchical features

Attention

Mechanism that allows model to focus on relevant parts of input.

  • Self-attention: relationships within input
  • Cross-attention: relationships between different inputs
  • Key-query-value (QKV) computation

Data Augmentation

Creating modified versions of training data to increase diversity.

  • Random crop, flip, rotation
  • Color jittering
  • Cutout, mixup, cutmix
  • Improves generalization

Receptive Field

Region of input that influences a particular neuron's output.

  • Shallow layers: small receptive field (local patterns)
  • Deep layers: large receptive field (global structure)
  • Stacking 3x3 convolutions is more efficient than one large kernel

GenAI & LLMs

Large Language Model (LLM)

A neural network (typically Transformer-based) trained on large text corpora to predict and generate language. Scales to billions of parameters.

  • Examples: GPT-4, Claude, Llama, Mistral
  • Capabilities: text generation, reasoning, code, summarization
  • Deployed via API (cloud) or locally (Ollama, llama.cpp)

Prompt Engineering

Designing inputs to an LLM to elicit accurate, useful, or structured outputs — without changing model weights.

  • Zero-shot: no examples provided
  • Few-shot: a few examples in the prompt
  • Chain-of-thought: ask the model to reason step by step
  • Directly relevant to agentic system design

Retrieval-Augmented Generation (RAG)

Pattern that augments LLM responses by retrieving relevant documents from an external knowledge base at query time.

  • Reduces hallucinations on factual queries
  • Keeps knowledge base updatable without retraining
  • Components: retriever (embedding + vector DB) + generator (LLM)

Embedding

A dense vector representation of text (or other data) that captures semantic meaning.

  • Similar meaning → vectors close in space
  • Used in semantic search, RAG, and clustering
  • Produced by embedding models (e.g., text-embedding-ada-002, nomic-embed-text)

Vector Database

A database optimized for storing and querying high-dimensional vectors (embeddings) by similarity.

  • Query type: "find the k nearest vectors"
  • Examples: Chroma, Qdrant, Pinecone, pgvector
  • Core infrastructure for RAG pipelines

Fine-tuning

Continuing training of a pre-trained model on a smaller, task-specific dataset to adapt its behavior.

  • Updates model weights (unlike prompt engineering)
  • Requires labeled data and compute
  • Risk of catastrophic forgetting on original capabilities

Agent / Agentic AI

An LLM-based system that autonomously decides which actions to take (tool calls, reasoning steps) to complete a goal, rather than responding in a single pass.

  • Maintains a loop: observe → reason → act
  • Can call tools, read/write files, browse, execute code
  • Reliability depends on the model's instruction-following quality

ReAct (Reasoning + Acting)

A prompting pattern for agents that interleaves chain-of-thought reasoning with action execution.

  • Thought: model reasons about what to do next
  • Action: model calls a tool or takes a step
  • Observation: result is fed back into context
  • Used in the Coding Agent project

Tool Calling / Function Calling

A capability where an LLM outputs a structured request to invoke an external function, rather than generating free text.

  • Model outputs: function name + arguments (JSON)
  • Host code executes the function and returns the result
  • Enables agents to interact with APIs, filesystems, databases

Context Window

The maximum number of tokens an LLM can process in a single forward pass (input + output combined).

  • Determines how much prior conversation or document text can be included
  • Typical range: 8K–200K tokens depending on model
  • Exceeding it requires chunking, summarization, or retrieval