Marginal
Machine learning · Economics · Complexity science · AI alignment theory

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.

Start your free trialNo card needed.
How it works

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.

1

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.

Lesson · Interpretability

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.

  1. The linear representation hypothesis
  2. Reading a feature
  3. Evidence and exceptions
2

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.

Orthogonal projectionEmbedding matricesGram–SchmidtEmbedding similarityFeatures as directionsLinear probesSuperpositionSteering vectors
LearnedReview firstYour next lessonOpens later
3

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.

100%0 0102030days since the lessonrecall reviewreviewreview
with spaced reviews without · an illustration
The catalog

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.

11 courses · 319 lessons

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.

38 courses · 1,064 lessons

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.

13 courses · 285 lessons

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.

11 courses · 238 lessons

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.

36 lessons

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.

33 lessons

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.

34 lessons

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.

24 lessons

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.

38 lessons

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.

31 lessons

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.

19 lessons

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.

21 lessons

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.

29 lessons

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.

28 lessons

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.

26 lessons

Economics38 courses

Mathematics for Economics

Lines, exponents, logs, derivatives, partial derivatives and constrained optimization, all with economic examples.

52 lessons

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.

59 lessons

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.

36 lessons

Intermediate Microeconomics

Calculus-based consumer and producer theory, general equilibrium, game theory, risk and asymmetric information.

69 lessons

Intermediate Macroeconomics

The Solow model, IS–LM and AD–AS, Phillips curves and policy rules, consumption and investment, debt, and the open economy.

57 lessons

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.

28 lessons

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.

40 lessons

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.

24 lessons

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.

15 lessons

Public Economics

How taxes should be designed, when governments should spend, and how to measure and reduce inequality and poverty.

29 lessons

Labor Economics

Labor demand and supply, monopsony and minimum wages, human capital, wage gaps, and job search.

32 lessons

Industrial Organization

How firms compete when markets aren't perfect: concentration, oligopoly models, collusion, pricing strategy, antitrust and logit demand estimation.

36 lessons

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.

26 lessons

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.

9 lessons

Behavioral Economics

Where people depart from the textbook model: present bias, loss aversion, probability weighting, heuristics, fairness and nudges.

25 lessons

Environmental Economics

Efficient pollution, carbon taxes versus cap-and-trade, discounting climate damage, and managing fisheries and exhaustible resources.

26 lessons

Development Economics

Why some countries are rich and others poor: Malthusian traps, convergence, migration, credit, institutions and evaluating programs.

24 lessons

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.

15 lessons

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.

15 lessons

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.

13 lessons

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.

15 lessons

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.

16 lessons

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.

27 lessons

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.

28 lessons

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.

26 lessons

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.

23 lessons

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.

23 lessons

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.

25 lessons

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.

27 lessons

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.

20 lessons

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.

17 lessons

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.

26 lessons

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.

16 lessons

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.

37 lessons

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.

27 lessons

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.

18 lessons

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.

34 lessons

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.

29 lessons

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.

19 lessons

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.

23 lessons

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.

20 lessons

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.

32 lessons

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.

31 lessons

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.

26 lessons

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.

18 lessons

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.

29 lessons

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.

17 lessons

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.

18 lessons

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.

17 lessons

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.

17 lessons

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.

18 lessons

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.

47 lessons

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.

22 lessons

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.

11 lessons

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.

22 lessons

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.

26 lessons

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.

21 lessons

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.

7 lessons

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.

15 lessons

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.

15 lessons

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.

30 lessons

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.

22 lessons
Pricing

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.

Start your free trialNo card needed.

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.