Learning at the margin
Every lesson starts at the edge of what you know and moves it out one small step at a time. Prerequisites arrive just when a lesson needs them, and spaced reviews bring each idea back just before you would forget it. 1,906 lessons in one knowledge graph.
Three ideas behind every lesson
Hard subjects are hard because every idea leans on others. Marginal keeps each step small, makes sure what it leans on is in place right then, and keeps it in place afterwards.
Small, incremental steps
Each step adds one new idea and nothing more. A lesson states its goal, then climbs toward it one small step at a time, and you practise each idea until it holds before the next one builds on it. The next step is never a leap.
Features as directions
Goal: read how strongly a feature is present by projecting an activation onto its direction, and weigh the evidence for and against representing concepts as directions.
- The linear representation hypothesis
- Reading a feature
- Evidence and exceptions
Prerequisites just in time
Learn what you need, when you need it. Every lesson knows what it builds on, so instead of finishing whole courses first, you learn each prerequisite right before the lesson that needs it. The ground under the next step is always solid.
Spaced repetition
Each idea comes back just before you would forget it, at longer and longer intervals as it settles. Every review asks you to rebuild the idea rather than recognize an answer, so what you learn stays learned.
Four fields, one knowledge graph
73 courses and 1,906 lessons, from first principles to the research frontier. The fields share their foundations, so progress in one carries over to the others.
Machine Learning
Machine learning, deep learning and reinforcement learning, together with the mathematics beneath them: multivariable calculus, linear algebra, measure and probability, information theory, computation and logic.
Economics
A full undergraduate major and the start of graduate study: micro, macro and econometrics, a dozen field courses, game and decision theory, mechanism design, asset pricing and the advanced methods behind them.
Complexity Science
How order emerges from many interacting parts: statistical physics, stochastic processes, dynamical systems and ergodic theory, networks, control and cybernetics, agent-based and multi-agent models, bounded rationality and active inference.
AI Alignment Theory
The curriculum of the Iliad Intensive (not affiliated): alignment, deep learning theory, data attribution, singular learning theory, interpretability, condensation, computational mechanics, universal AI, agent foundations and the limits of safety guarantees.
Machine Learning11 courses
Complex Numbers & Transforms
The mathematics of oscillation and signals: trigonometry and radians, derivatives of sine and cosine, complex numbers, Euler's formula, roots of unity, complex eigenvalues, second-order linear differential equations, Fourier series, the discrete Fourier transform, convolution and the Laplace transform.
Multivariable Calculus
Calculus in many dimensions, as used in machine learning and physics: gradients and directional derivatives, Jacobians and the chain rule, second-order Taylor expansions, big-O notation, multiple integrals and change of variables, the Gaussian integral, geometry of high dimensions, the implicit function theorem, Laplace's method, Stirling's formula, divergence and line integrals.
Advanced Linear Algebra
The linear algebra of machine learning and physics: null spaces and rank–nullity, orthogonal projections and Gram–Schmidt, orthogonal matrices, trace and determinant, the spectral theorem, the singular value decomposition, low-rank approximation, PCA, norms and conditioning, matrix calculus, einsum index notation, the matrix exponential and the multivariate normal.
Measure & Integration
The rigorous foundation of probability: σ-algebras and measures, Lebesgue measure and null sets, measurable functions and the Lebesgue integral, monotone and dominated convergence, modes of convergence, Fubini's theorem, densities and the Radon–Nikodym theorem, conditional expectation, measures on infinite sequences and martingales.
Information Theory
Shannon's theory of information: surprisal and entropy, joint and conditional entropy, mutual information, KL divergence and cross-entropy (the loss behind most of machine learning), the data-processing and Pinsker inequalities, maximum entropy, differential entropy, prefix codes and the source coding theorem, Huffman codes, typical sequences, channel capacity, the channel coding theorem and rate–distortion theory.
Theory of Computation
What can be computed, and at what cost: finite automata and regular languages, Turing machines and the Church–Turing thesis, the halting problem and reductions, Kolmogorov complexity, time complexity, P, NP and NP-completeness, PSPACE, randomized algorithms, interactive proofs, one-time pads and pseudorandomness.
Mathematical Logic
Formal logic from truth tables to self-reference: propositional logic and normal forms, first-order logic and its structures, soundness and completeness, Peano arithmetic and Gödel numbering, the incompleteness theorems, the provability predicate, Löb's theorem and the modal logic of provability.
Probabilistic Models & Causality
Structured probability and cause and effect: conditional independence, Bayesian networks and d-separation, exact inference, Markov random fields and Gibbs distributions, latent variables and the EM algorithm, variational inference and the evidence lower bound, causal graphs and interventions, the backdoor adjustment and counterfactuals.
Machine Learning
The foundations of modern machine learning: supervised learning and loss functions, logistic and softmax regression, gradient descent, stochastic gradients, momentum and Adam, convexity and convergence rates, train–validation–test splits, bias and variance, regularization and weight decay, hyperparameters, kernels, Gaussian processes and generalization bounds.
Deep Learning
Neural networks from neurons to transformers: activation functions and multilayer perceptrons, universal approximation, backpropagation and automatic differentiation, initialization and vanishing gradients, normalization and residual connections, convolutional networks, embeddings, attention, the transformer architecture, next-token prediction, memory and compute arithmetic, and fine-tuning.
Reinforcement Learning
Learning to act from reward: Markov decision processes, policies and value functions, the Bellman equations and their contraction property, policy and value iteration, temporal-difference learning, Q-learning and stochastic approximation, exploration, policy gradients and actor–critic methods, PPO, deriving rewards from preferences and reward shaping.
Economics38 courses
Mathematics for Economics
Lines, exponents, logs, derivatives, partial derivatives and constrained optimization, all with economic examples.
Principles of Microeconomics
The Econ 101 sequence: scarcity and trade, supply and demand, elasticities, welfare and policy, costs and competition, monopoly and oligopoly, and labor markets and income. Start here if you are new.
Principles of Macroeconomics
The Econ 102 sequence: measuring GDP, inflation and unemployment, money and banking, growth and saving, aggregate demand and supply, fiscal and monetary policy, and the open economy.
Intermediate Microeconomics
Calculus-based consumer and producer theory, general equilibrium, game theory, risk and asymmetric information.
Intermediate Macroeconomics
The Solow model, IS–LM and AD–AS, Phillips curves and policy rules, consumption and investment, debt, and the open economy.
Statistics
Describing data, probability and its distributions, and statistical inference: sampling distributions, the central limit theorem, confidence intervals, hypothesis tests, power and chi-square tests.
Econometrics
Regression from OLS to causal designs: interpreting and testing coefficients, specification, omitted variables, heteroskedasticity, logit and maximum likelihood, experiments, instruments, difference-in-differences, discontinuities, panel data and time series.
International Trade
Why countries trade and how much they gain: Ricardian and Heckscher–Ohlin models, gravity, firms and intra-industry trade, and what tariffs, quotas, subsidies and trade agreements do.
International Finance
How exchange rates, interest parity and the balance of payments fit together: purchasing power parity, the monetary approach, exchange-rate regimes and intervention, currency crises, optimum currency areas and global imbalances.
Public Economics
How taxes should be designed, when governments should spend, and how to measure and reduce inequality and poverty.
Labor Economics
Labor demand and supply, monopsony and minimum wages, human capital, wage gaps, and job search.
Industrial Organization
How firms compete when markets aren't perfect: concentration, oligopoly models, collusion, pricing strategy, antitrust and logit demand estimation.
Finance
Valuing financial assets: bond pricing and the yield curve, duration and credit risk, risk and diversification, the CAPM and factor models, stock valuation, options, forwards and Black–Scholes, and corporate finance.
Money & Banking
How banks work and fail: balance sheets and leverage, why intermediaries exist, bank runs and deposit insurance, capital and liquidity regulation, shadow banking and 2008, how central banks implement policy, and payments and digital money.
Behavioral Economics
Where people depart from the textbook model: present bias, loss aversion, probability weighting, heuristics, fairness and nudges.
Environmental Economics
Efficient pollution, carbon taxes versus cap-and-trade, discounting climate damage, and managing fisheries and exhaustible resources.
Development Economics
Why some countries are rich and others poor: Malthusian traps, convergence, migration, credit, institutions and evaluating programs.
Urban Economics
Why people and firms cluster in cities, how land rents and land use vary across space, how housing markets work, and the economics of zoning, rent control, property taxes, congestion and segregation.
Health Economics
Why health care markets are different: health as capital, the demand for medical care, cost sharing and moral hazard, risk adjustment, paying doctors and hospitals, cost-effectiveness and QALYs, drug pricing and rising spending.
Law & Economics
Legal rules as incentives: property rights, Coase and transaction costs, property versus liability rules, negligence and strict liability, efficient breach and contract damages, the economics of crime, and why most lawsuits settle.
Economic History
How the world got rich and what went wrong along the way: growth before and after the Industrial Revolution, the Great Divergence, the gold standard and Great Depression, Bretton Woods, the Great Inflation and Moderation, two great crises, globalization and China's rise.
History of Economic Thought
Where economic ideas came from: mercantilists and physiocrats, Smith, Ricardo, Malthus, Mill and Marx, the marginal revolution, Marshall, Pigou and Pareto, Keynes, Hayek, Friedman, Lucas and the modern synthesis.
Game Theory
Non-cooperative game theory beyond the basics: larger games, iterated and weak dominance, symmetric and zero-sum games, correlated equilibrium, game trees, subgame perfection and the folk theorem, and Bayesian games: equilibrium bidding, perfect Bayesian equilibrium and signaling.
Decision Theory
How to choose well under uncertainty: rational preferences, decision rules, the expected-utility axioms, measuring risk aversion, stochastic dominance, the value of information and where EU breaks down.
Social Choice Theory
How groups decide: voting rules and their quirks, Condorcet cycles and agenda power, single-peaked preferences, Arrow and Gibbard–Satterthwaite, welfare criteria, fair division and apportionment.
Cooperative Game Theory
What groups can achieve together and how they should split it: bargaining solutions, alternating offers, coalitions and the core, cost sharing, the Shapley value and power indices.
Mechanism Design
Designing rules so that self-interested people with private information reach good outcomes: incentive compatibility, optimal auctions, VCG and the Clarke tax, screening contracts, and matching markets like the residency match and school choice.
Evolutionary Game Theory
Games played by populations rather than perfectly rational players: evolutionarily stable strategies, hawks and doves, replicator dynamics, basins of attraction and risk dominance, learning rules, and how cooperation evolves.
Real Analysis
The mathematics behind rigorous economic theory: logic and proof, suprema and completeness, sequences and series, continuity, compactness and the extreme value theorem, metric spaces, convexity, separating hyperplanes, contraction mappings and the fixed-point theorems that prove equilibria exist.
Linear Algebra & Dynamics
The linear algebra behind modern economics: independence and rank, eigenvalues and eigenvectors, matrix powers, definiteness of quadratic forms, Markov chains, input–output analysis, systems of difference and differential equations, saddle paths, and linear programming with duality.
Dynamic Optimization
Optimizing over time, the core method of modern macroeconomics: multi-period choice, the Bellman equation, value function iteration, stochastic dynamic programming, job search and investment under uncertainty, continuous-time discounting, the Hamiltonian, the Keynes–Ramsey rule, the Ramsey–Cass–Koopmans model and Tobin's q.
Probability Theory
The probability and statistical theory underneath econometrics: probability spaces and counting, densities and expectations by integration, exponential, order-statistic, bivariate normal, truncated normal and extreme-value distributions, moment generating functions, transformations, bias and MSE, convergence and the law of large numbers, the delta method, Fisher information, conjugate priors and normal shrinkage.
Advanced Econometrics
Econometrics at the level of a first graduate course: OLS in matrix form, projections and Frisch–Waugh–Lovell, the variance matrix and GLS, consistency and asymptotic bias, method of moments and GMM, Wald, LR and LM tests, maximum-likelihood logit, the bootstrap, quantile and kernel regression.
Time Series Econometrics
Modeling data that arrive over time: autocorrelation, MA and ARMA processes, AR(2) dynamics and stationarity, forecast uncertainty, unit roots and Dickey–Fuller tests, cointegration and error correction, vector autoregressions, impulse responses, structural identification, variance decompositions, GARCH volatility, HAC standard errors and the Kalman filter.
Microeconometrics
Econometrics for individual and firm data: random utility and multinomial logit, IIA and welfare measurement, Tobit and Heckman selection models, the Roy model, count and duration models, random effects and the Hausman test, dynamic panels, ridge and LASSO, and double machine learning.
Advanced Microeconomics
Graduate microeconomic theory: excess demand and Walras' law, stability and uniqueness of equilibrium, contingent commodities and efficient risk sharing, aggregation and the representative consumer, the Slutsky matrix, the profit function, monotone comparative statics, principal–agent contracts with risk aversion, linear contracts and Bayesian persuasion.
Advanced Macroeconomics
Graduate macroeconomics: log-linearization and the speed of convergence, the real business cycle model and its calibration, Blanchard–Kahn determinacy, undetermined coefficients, the Taylor principle and Calvo pricing, the Diamond–Mortensen–Pissarides search model, precautionary saving and incomplete markets, tax smoothing, the Friedman rule, Schumpeterian growth and the intertemporal current account.
Asset Pricing
The theory of asset prices: state prices and complete markets, no arbitrage and risk-neutral pricing, the stochastic discount factor, consumption-based asset pricing, the Lucas tree, the equity premium puzzle and the Hansen–Jagannathan bound, mean–variance portfolios with many assets, arbitrage pricing theory, the Merton credit model and growth-optimal portfolios.
Complexity Science13 courses
Networks
The mathematics of connected systems: graphs and adjacency matrices, paths and distances, centrality, betweenness and PageRank, Erdős–Rényi random graphs and the giant component, clustering, small worlds and communities, scale-free networks, strategic network formation, threshold cascades, epidemics on networks, and graph Laplacians with consensus dynamics.
Classical Mechanics
Newtonian physics as the entry point to physics and dynamical systems: kinematics, Newton's laws, work and kinetic energy, potential energy and conservation, momentum and collisions, the harmonic oscillator, damped and driven oscillations and resonance, angular momentum and orbits, and the phase-space view of motion.
Analytical Mechanics
The elegant reformulations of mechanics that underlie modern physics and optimal control: the calculus of variations, the Lagrangian and the principle of least action, generalized coordinates, Noether's theorem, the Legendre transform, Hamilton's equations, Poisson brackets, Liouville's theorem, canonical transformations, action–angle variables and normal modes.
Statistical Physics
How macroscopic behavior emerges from microscopic randomness: temperature, heat and the laws of thermodynamics, heat engines, microstates and Boltzmann entropy, the microcanonical, canonical and grand canonical ensembles, partition functions, free energy and fluctuations, equipartition and the Maxwell–Boltzmann distribution, quantum statistics, the Ising model, mean-field theory, phase transitions, Landauer's principle and fluctuation theorems.
Stochastic Processes
Randomness unfolding in time: classifying Markov chains, stationary distributions and detailed balance, absorption and hitting times, mixing and the spectral gap, the Markov-chain ergodic theorem, hidden Markov models, Markov chain Monte Carlo, the Poisson process, continuous-time chains and queues, branching processes, random walks, Brownian motion and Itô's lemma, stochastic differential equations, the Fokker–Planck equation and Langevin sampling.
Dynamical Systems
The qualitative theory of systems that evolve in time: one-dimensional flows, linear systems in the plane, linearization and stability, predator–prey dynamics, Lyapunov functions, limit cycles, bifurcations including Hopf, the logistic map and period doubling, chaos and Lyapunov exponents, strange attractors, fractal dimension and Poincaré maps.
Ergodic Theory
When do time averages equal space averages? Measure-preserving transformations, Poincaré recurrence and Kac's lemma, ergodicity, Birkhoff's ergodic theorem, mixing, Bernoulli shifts and symbolic dynamics, Kolmogorov–Sinai entropy, the Shannon–McMillan–Breiman theorem and the ergodic hypothesis of statistical mechanics.
Control Theory
How to make systems behave: feedback and block diagrams, transfer functions, poles and stability, first- and second-order responses, steady-state error, PID control, state-space models, controllability and observability, pole placement, the linear–quadratic regulator, state estimation and the separation principle, frequency response and stability margins.
Cybernetics
The science of control and communication in animals, machines and organizations: circular causality and feedback, homeostasis, Ashby's law of requisite variety, the good regulator theorem, black boxes and system identification, ultrastability, the information cost of control (Touchette–Lloyd), second-order cybernetics and autopoiesis, and Beer's viable system model.
Agent-Based Modelling
Simulating societies and ecosystems from the bottom up: what agent-based models are, cellular automata and the Game of Life, Schelling's segregation model, flocking, stochastic epidemics, percolation, the El Farol bar and minority games, zero-intelligence traders, exchange models of wealth inequality, calibration and validation, and emergence.
Multi-Agent Systems
Many interacting learners and decision-makers: agents and environments, stochastic (Markov) games, no-regret learning and multiplicative weights, multi-agent reinforcement learning, consensus and distributed averaging, task allocation by auction, coalition formation, communication and signaling, social dilemmas among agents, and mean-field games.
Information-Theoretic Bounded Rationality
Decision-making with limited information-processing resources: the free-energy (KL-regularized) principle of choice, free energy as a certainty equivalent, rationality as inverse temperature, rational inattention, the Blahut–Arimoto algorithm, abstraction through information constraints, quantal response equilibrium, KL-regularized and maximum-entropy reinforcement learning, and the sampling cost of deliberation.
Active Inference
The free-energy principle as a theory of perception and action: the Bayesian brain, generative models with A, B, C and D matrices, variational free energy and surprise, perception as inference, predictive coding and precision, Markov blankets, expected free energy with its risk and ambiguity terms, epistemic and pragmatic value, policy selection, learning, and how active inference relates to reinforcement learning and bounded rationality.
AI Alignment Theory11 courses
AI Alignment
Why advanced AI might not do what we intend, and what labs do about it: capability trends, alignment targets, outer and inner alignment, specification gaming, goal misgeneralization and Goodhart's law, goal-directedness and deceptive alignment, forecasting risk, the training pipeline, reward models from human preferences and RLHF, constitutional AI and RLVR, reward over-optimization, evaluations, chain-of-thought monitoring, AI control, and reward learning when evaluators see only part of the picture.
Deep Learning Theory
Why deep learning works, and what we can prove about it: approximation and depth, the generalization puzzle, double descent, the implicit bias of gradient descent, optimization in high dimensions, in-context learning, exact dynamics of deep linear networks, conserved quantities, saddle-to-saddle and lazy regimes, the neural tangent kernel, the edge of stability and SGD noise.
Data Attribution
Which training data made a model behave this way? Leave-one-out and Shapley attribution, influence functions and their effect on test loss, Bayesian influence functions, and unrolling training.
Singular Learning Theory
Why degeneracy is central to how neural networks learn: the parameter–function map and its symmetries, statistical models and true parameters, the Bayesian posterior and free energy, singular versus regular models, the local learning coefficient via volume scaling, Watanabe's free energy formula, Bayesian phase transitions, estimating the learning coefficient with SGLD, and developmental interpretability.
Physics of Deep Learning
Tools from statistical physics for understanding neural networks: learning as statistical mechanics and partition functions, the Ising perceptron and storage capacity, wide networks as Gaussian processes, signal propagation and the edge of chaos, the constant neural tangent kernel, mean-field scaling and feature learning, μP, grokking, dynamical mean-field theory, empirical and theoretical scaling laws, and the replica method.
Mechanistic Interpretability
Understanding what neural networks compute: features and the linear representation hypothesis, superposition, probes and steering, the residual stream and logit lens, activation patching, circuits and induction heads, sparse autoencoders, attribution graphs, automated interpretability and its uses for safety.
Condensation
When do two models of the same observations have matching latent variables? Latent models, reconstruction and the Markov condition, the two-witness lemma, the correspondence theorem, and how condensation relates to natural latents and interpretability.
Computational Mechanics
What a predictor must remember about the past: entropy rate and excess entropy, causal states and ε-machines, statistical complexity, belief states and mixed-state presentations, the geometry of beliefs in the probability simplex, generalized hidden Markov models, and evidence that transformers trained on next-token prediction represent belief-state geometry in their residual streams.
Universal Artificial Intelligence
Idealized prediction and action: Bayesian mixture predictors over hypothesis classes, dominance and cumulative error bounds, the Solomonoff prior as a formal Occam's razor, Pinsker-based prediction bounds, Pareto optimality and misspecification, history-based reinforcement learning, the AIXI agent and its expectimax form, on-policy value convergence, exploration and asymptotic optimality, and the limits of AIXI as a model of real agents.
Agent Foundations
The theory of agents that are part of the world they act in: embedded agency and Vingean reflection, logical uncertainty, robustness to optimization pressure, optimization as entropy reduction and its thermodynamic costs, Maxwell's demon and the information cost of steering, causal, evidential and functional decision theory, program equilibrium and Löbian cooperation, commitment races and safe Pareto improvements, formal power-seeking, instrumental convergence and corrigibility (the off-switch game), world models and natural abstractions.
Safety Guarantees & Their Limits
What can and can't be guaranteed about powerful AI: scalable oversight, proof checking, AI safety via debate and its complexity theory (debate = PSPACE, cross-examination), obfuscated arguments and prover–estimator debate, eliciting latent knowledge, safety cases, steganography in model outputs, perfect versus computational undetectability, undetectable backdoors, certified robustness, and compact proofs of model performance as worst-case interpretability.
Your first two weeks are free
$19 / month or $149 / year after that
- All 73 courses and 1,906 lessons in all four fields
- Placement tests, spaced reviews and mixed quizzes
- Progress saved to your account on every device
- No card needed for the trial, and you can cancel any time
Not ready to subscribe? The 11 AI alignment courses stay free after your trial.
Questions
Why is it called Marginal?
Economists decide at the margin: they weigh one more unit, one small step beyond where they stand. Marginal teaches the same way. Each step takes you a little past the edge of what you already know, and the edge moves out with you.
How is this different from flashcards?
Flashcards space out the recall of facts you already wrote down. Marginal spaces out problems: every review asks fresh questions on the topic, with new numbers and often a different kind of question, so you rebuild the reasoning rather than recognize a card. Lessons that build on a topic count as reviewing it, and reviews that a lesson already covers are folded into it.
What background do I need?
None for the foundation courses. Each course starts with an optional placement test, and whenever a lesson needs something you haven't learned yet, from any of the four fields, it comes up first.
Do I need a card to start?
No. Your first two weeks are free with full access to every course, and you only enter payment details if you decide to subscribe.
What happens when the free trial ends?
Your account becomes a free account. The 11 AI alignment courses stay open, and the other courses lock until you subscribe. Your progress in all of them stays saved, so you pick up exactly where you left off.
If I subscribe during the trial, do I lose the rest of it?
No. Your first payment is taken when your free trial ends.
Can I cancel?
Yes, any time from your account page. You keep access until the end of the period you've paid for.
Where is my progress stored?
In your account, so it follows you to any device you sign in on.