Machine learning types describe how a model learns from data and feedback. Choosing the wrong type is expensive: it changes your data requirements, training loop, evaluation criteria, and operational complexity from day one. The decision is driven by what signal you have, not by what architecture is fashionable.

Supervised Learning

Train on labeled input-output pairs and optimize prediction quality directly against known targets.

Mechanism: At each step, the model predicts an output, computes loss against the ground-truth label, and updates parameters via backpropagation. Training continues until validation loss plateaus or a business metric threshold is met.

Concrete example: Label 50k support tickets with owning team (Billing, Security, Platform). Train a text classifier. Route new tickets automatically with human override for low-confidence cases. Measure precision/recall per team.

Data requirements: Labeled examples for every class or target range. Quality matters more than quantity — 10k clean labels outperform 100k noisy ones.

Key limitations: Label cost scales with problem complexity. Distribution shift between training and production degrades performance silently. Global metrics (AUC, accuracy) can hide failures on high-value slices.

When to use: Any time you have reliable labels and an explicit prediction target. Default choice for classification, regression, and ranking.

Unsupervised Learning

Find structure in data without target labels — segmentation, anomaly detection, or compact representations.

Mechanism: The model optimizes an objective that captures structure in the input space: grouping similar points (k-means, DBSCAN), reconstructing inputs with fewer dimensions (PCA, autoencoders), or flagging observations that deviate from baseline (isolation forest).

Concrete example: A payments team clusters merchants by transaction behavior (volume, velocity, category mix) using k-means. Discovered segments reveal a hidden high-risk cohort that manual review missed. Segments guide policy review and prioritize future labeling.

Data requirements: No labels needed. Large unlabeled datasets work well. Feature engineering matters more than in supervised settings because there is no loss signal to guide representation learning.

Key limitations: No ground truth to validate against — cluster quality is subjective. Different seeds or hyperparameters can produce different results. Downstream utility must be validated separately.

When to use: Exploratory analysis, anomaly detection, dimensionality reduction before a supervised task, or when labeling is infeasible.

Self-Supervised Learning

Build supervision from raw data by creating proxy prediction tasks. Pretrain on unlabeled corpora, then fine-tune on small labeled datasets.

Mechanism: Design a proxy objective that the model can optimize without human labels — masked token prediction (BERT), next-token prediction (GPT), contrastive image pairs (SimCLR). The learned representation transfers to downstream tasks with limited labels.

Concrete example: An enterprise search system pretrains embeddings on 10M internal documents using a contrastive objective (similar documents should be close in embedding space). Fine-tuned on 2k relevance-labeled query-document pairs. Retrieval quality improves 18% over a supervised-only baseline trained on the same 2k pairs.

Data requirements: Large unlabeled corpus for pretraining. Small labeled dataset for fine-tuning. Pretraining data quality and diversity matter — domain mismatch between pretraining and target task reduces transfer.

Key limitations: Pretraining is compute-intensive. Proxy objective may not capture structure relevant to the target task. Pretraining loss improving does not guarantee downstream quality improving.

When to use: Language, vision, and multimodal systems where labels are scarce but unlabeled data is abundant. Foundation of modern LLMs and vision transformers.

Semi-Supervised Learning

Combine a small labeled dataset with a larger unlabeled dataset to reduce labeling cost while maintaining supervised-level performance.

Mechanism: Train an initial model on labeled data. Generate pseudo-labels for high-confidence unlabeled examples. Retrain on the combined set. Repeat. Variants include consistency regularization (predictions should be stable under augmentation) and graph-based label propagation.

Concrete example: A moderation team has 8k labeled toxic comments and 2M unlabeled comments. Initial classifier achieves 82% precision. Accept pseudo-labels with confidence >0.95 (adds 180k examples). Retrain: precision rises to 87%. Validation guards prevent minority-class recall from dropping.

Data requirements: Small labeled set + large unlabeled set. Pseudo-label quality depends on initial model quality — a weak initial model produces noisy pseudo-labels that compound errors.

Key limitations: Pseudo-labeling amplifies majority classes unless explicitly constrained. Incorrect pseudo-labels reinforce errors. Requires careful threshold tuning and class-conditional calibration.

When to use: When labeling is expensive but you have abundant unlabeled data and a clear target variable. Common in NLP, medical imaging, and content moderation.

Reinforcement Learning

Train an agent to choose actions that maximize long-term reward through interaction with an environment.

Mechanism: At each step, the agent observes state, takes an action, receives reward, and transitions to a new state. Training optimizes expected cumulative reward (not immediate reward). Reward design and simulator quality are critical — the agent will find shortcuts if the reward function is incomplete.

Concrete example: A customer-support routing policy optimizes escalation decisions across multiple steps. Immediate reward: resolution probability. Long-term reward: customer satisfaction score and handling cost. The RL policy learns to delay escalation for borderline cases, reducing cost by 12% while maintaining satisfaction.

Data requirements: A simulator or real environment to interact with. Reward signal for each action. Large amounts of interaction data (orders of magnitude more than supervised learning for equivalent performance).

Key limitations: Reward design is hard — proxy rewards lead to specification gaming. Exploration is expensive and risky in production. Evaluation requires online A/B testing, not offline metrics. Debugging is difficult.

When to use: Sequential decision-making where outcome quality depends on multiple steps and delayed feedback. Avoid for one-step prediction problems where supervised learning works — RL adds operational risk without benefit.

Comparison

TypeLabeled DataCompute CostTypical ApplicationsKey Libraries
SupervisedRequired (all)Low–mediumClassification, regression, rankingscikit-learn, XGBoost, PyTorch
UnsupervisedNoneLow–mediumClustering, anomaly detection, dimensionality reductionscikit-learn, UMAP
Self-SupervisedPretraining: none; Fine-tuning: smallHigh (pretraining)LLMs, vision transformers, embeddingsHugging Face, PyTorch
Semi-SupervisedSmall labeled + large unlabeledMediumNLP, medical imaging, moderationscikit-learn, PyTorch
ReinforcementReward signal onlyVery highRobotics, game AI, recommendationStable Baselines3, RLlib

Decision Rule

flowchart TD
    A{Do you have reliable labels?} -->|Yes| B{Genuinely sequential, delayed-reward task?}
    A -->|No| C{Abundant unlabeled data?}
    B -->|Yes| D[Reinforcement learning]
    B -->|No| E[Supervised learning]
    C -->|No| F[Collect data or use rules]
    C -->|Yes| G{Any labels available at all?}
    G -->|No| H[Unsupervised learning]
    G -->|A few, scarce| I{Language or vision task?}
    I -->|Yes| J[Self-supervised: pretrain then fine-tune]
    I -->|No| K[Semi-supervised: supervised baseline first]

Start with supervised learning whenever you have reliable labels and an explicit target; it is the simplest to evaluate, debug, and operate. Drop to unsupervised when there are no labels, self-supervised when unlabeled data is abundant but labels are scarce (especially language and vision), and semi-supervised when labeling is expensive but a clear target exists. Reserve reinforcement learning for genuinely sequential, delayed-reward problems, since it adds reward design complexity, exploration risk, and operational overhead rarely justified for single-step decisions.

References

0 items under this folder.