Skip to content

The Frontier

The last stop of the arc that began with least squares in 1805. This lesson has no lab. Its centerpiece is a map of the field: every technique of the previous 26 lessons, grouped by the job it does, next to the techniques that lie just beyond this course, each with the lesson where it was taught and where to read more. Around the map: how transfer learning and foundation models changed the economics of machine learning, where the classical toolbox you built still wins, and the problems the field has not solved yet.

The lesson goes in four stages, drawn below: 1. map the field, every technique of the course in one picture, next to what lies beyond it; 2. reuse, don’t restart, transfer learning and foundation models; 3. where classical wins, the toolbox inside the new stack and the problems it still owns; 4. what comes next, the open problems and where to go from here. Each stage links to its section, and in the slides a strip at the bottom shows which stage you are in.

  1. Map the fieldevery technique by the job it does; four walks
  2. Reuse, don’t restarttransfer learning, fine-tuning, foundation models, prompting
  3. Where classical winsthe toolbox inside the new stack, tables, routing
  4. What comes nextopen problems, where to go from here

Slides

Click the slides and use the ← → arrows to navigate; F goes full screen and Esc shows every slide. Open the slides in a new tab

A map of the field

Stage 1. Techniques are grouped by the question they answer: prepare the data, find structure without labels, turn text into numbers, predict with lines, neighbors, trees or networks, measure honestly, explain, automate, operate. Two more groups hold what this course did not reach: other problem shapes (sequences, recommendations, rewards, graphs) and the frontier itself. Solid chips were taught here, and the number is the lesson; dashed chips lie beyond. Click a technique to see what it is, what it builds on, what builds on it, and where to read more.

Reading the map

The links between chips are the point of the map. Four walks through it:

  • Retrieval-augmented generation builds on k-NN and dense embeddings. A 1951 idea (vote among the nearest points) and a 2013 idea (words as vectors) are the retrieval half of a 2020 system.
  • Alignment (RLHF) trains a reward model on pairs of answers: the probability that answer A is preferred to answer B is modeled as \(\sigma(r_A - r_B)\), the sigmoid of a score difference. That is a logistic regression, fitted with the same cross-entropy you minimized in the logistic regression lesson.
  • Evaluating LLM systems builds on classification metrics and cross-validation & leakage. A benchmark whose questions leaked into the training data is the same bug as a scaler fitted before the split, at internet scale.
  • Tabular foundation models are the one place where the frontier attacks the stronghold of gradient boosting head on. They are discussed below.

The same map as a list

Every node of the map, grouped the same way. This list is the map's source: it works without JavaScript and in print. marks the lesson where a technique was taught, marks what lies beyond this course, marks where to read (a classic paper first, then a modern resource).

Foundations — what learning from data means
Data — from raw records to a model-ready matrix
Unsupervised learning — structure without labels
Text — turning words into vectors
Linear models — lines, planes and margins
Instance-based learning — let the neighbors vote
Trees & ensembles — the tabular workhorses
Neural networks — from the perceptron to deep learning
Evaluation & model selection — honest numbers
Explainability & responsibility — why the model says what it says
AutoML — searching for the model
MLOps — models in production
Other problem shapes — beyond one row, one label
The frontier — foundation models and open questions

Transfer learning: stop starting from zero

Stage 2. Classical supervised learning trains each model from scratch on its own labeled data. Transfer learning reuses knowledge: pre-train a large model on a huge generic corpus, then adapt it to your task. There are two ways to adapt:

  • feature extraction: freeze the pre-trained model and use its representations as features for a classical head. You did this: sentence embeddings fed to a logistic regression or to a clustering step;
  • fine-tuning: continue training some or all of the weights on your labeled data, typically 10²–10⁴ examples instead of 10⁶. LoRA (Hu et al., 2022) trains only a low-rank correction \(W + BA\) of each weight matrix, with \(B\) and \(A\) thin; for a \(4096 \times 4096\) matrix and rank 8, that is \(2 \times 4096 \times 8 = 65{,}536\) trainable numbers instead of \(16{,}777{,}216\), 0.4% of them.

This inverted the data economics of the field. ULMFiT (Howard & Ruder, 2018) and BERT (Devlin et al., 2019) showed that a language model pre-trained on unlabeled text, then fine-tuned, beats models trained from scratch on text classification with a fraction of the labels. Tasks that once demanded massive labeled datasets became feasible with hundreds of examples.

Foundation models

Scale the recipe: transformer architectures, self-supervised pre-training (predict masked or next tokens: the labels are free, so any text becomes training data), billions of parameters. Something qualitatively new appears. A foundation model (Bommasani et al., 2021) is one very large pre-trained model adapted to many downstream tasks: the GPT family, Claude, Gemini and Llama for text; CLIP and its successors for vision and language; Whisper for speech.

Why scale? Kaplan et al. (2020) measured that the test loss of language models falls as a smooth power law in the number of parameters, the size of the data and the compute, over several orders of magnitude. That regularity made it rational to spend on ever larger training runs. Sutton's "Bitter Lesson" (2019) reads the same history: over 70 years, general methods that exploit more computation have beaten hand-built knowledge.

With large language models, adaptation gets lighter still:

Adaptation Labeled data needed What happens
zero-shot none describe the task in the prompt
few-shot / in-context a handful show examples in the prompt; no weights change
fine-tuning (full / LoRA) hundreds+ update the weights, or a low-rank slice of them
RAG none (needs documents) retrieve relevant passages by nearest-neighbor search over embeddings and put them in the context

"Classify this support ticket as billing, technical or other": in 2018, a labeling project and a trained classifier; today, often a single prompt (Brown et al., 2020, showed GPT-3 doing new tasks from a few examples in the prompt). Prompting became the new fit() for a broad class of language tasks. What did not change: you still need a labeled test set to know whether the prompt works.

The classical toolbox in an LLM world

Stage 3. Look inside the modern stack and this course is everywhere:

Where classical ML still wins

Reach for the classical stack, not a foundation model, when:

Situation Why classical wins
Tabular data (churn, credit, pricing, demand) gradient boosting still leads the benchmarks on medium-sized tables (Grinsztajn et al., 2022); LLMs are poor at tables of numbers
Latency / cost / scale (decisions in milliseconds, billions of rows) a logistic regression scores a row in microseconds, for almost nothing
Regulated decisions odds ratios and SHAP values can be shown to an auditor; a prompt cannot
Small, well-structured problems a 2,000-row dataset needs bias–variance control, not a trillion parameters
Determinism and stability fixed model + fixed input = fixed output; LLMs sample

The first row has a challenger. Grinsztajn, Oyallon & Varoquaux (2022) benchmarked 45 tabular datasets of around 10,000 rows and found tree ensembles ahead of deep networks, because tables have irregular target functions and many uninformative columns, which trees handle and neural networks smooth over. TabPFN (Hollmann et al., 2023, 2025) takes a different route: a transformer pre-trained on millions of synthetic tables, which predicts a new table in a single forward pass, with no training and no tuning. On classification datasets of up to 10,000 rows, the 2025 version beat, in 2.8 seconds, an ensemble of the strongest baselines (boosted trees among them) tuned for 4 hours. Above that size, and whenever latency matters, boosted trees remain the default. Test the challenger the way you tested every model in this course: same folds, same metric, paired comparison.

The frontier practitioner's skill is routing: perception and language go to foundation models, structured prediction goes to the classical stack, and real systems use both. An LLM reads the free-text complaint, a gradient-boosted model scores the churn risk, and MLOps monitors both.

Open problems — where this field is going

Stage 4. The map has dashed chips because the field is not finished. These problems are open:

  • Hallucination and reliability: fluent falsehoods. Calibration at frontier scale: a model should know when it does not know.
  • Evaluation: benchmarks saturate within a year or two and leak into training data; honest measurement is an arms race (Validation, scaled up).
  • Alignment and safety: making systems pursue the goals we intend; RLHF and its successors are partial answers.
  • Efficiency: distillation, quantization, small specialized models against giant generalists.
  • Data provenance, bias and governance: the ethics questions of the ML landscape lesson, now industrialized and regulated (EU AI Act; in Brazil, the LGPD and the AI bill PL 2338/2023, approved by the Senate in December 2024 and sent to the Chamber of Deputies).
  • Causality: prediction answers "what will happen"; decisions need "what happens if we act". Causal ML joins the two.
  • Agents: models that plan, call tools and act. How to evaluate them and keep them safe is largely unsolved.

Where to go from here

The course thesis, one last time

Every "new" idea you will meet is a composition of things you now understand: losses, gradients, regularization, embeddings, neighbors, ensembles, honest validation. The frontier moves; the foundations compound. Learn the parts, and no whole will be a black box.


References

The map carries one to three references per technique. These are the ones the text of this lesson relies on.

  • Sutton, R. "The Bitter Lesson." Essay (2019). Link
  • Vaswani, A. et al. "Attention Is All You Need." NeurIPS (2017). arXiv:1706.03762
  • Howard, J.; Ruder, S. "Universal Language Model Fine-tuning for Text Classification." ACL (2018). arXiv:1801.06146
  • Devlin, J.; Chang, M.-W.; Lee, K.; Toutanova, K. "BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding." NAACL-HLT (2019). arXiv:1810.04805
  • Kaplan, J. et al. "Scaling Laws for Neural Language Models." arXiv (2020). arXiv:2001.08361
  • Brown, T. B. et al. "Language Models are Few-Shot Learners." NeurIPS (2020) — GPT-3. arXiv:2005.14165
  • Lewis, P. et al. "Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks." NeurIPS (2020). arXiv:2005.11401
  • Bommasani, R. et al. "On the Opportunities and Risks of Foundation Models." arXiv (2021). arXiv:2108.07258
  • Hu, E. J. et al. "LoRA: Low-Rank Adaptation of Large Language Models." ICLR (2022). arXiv:2106.09685
  • Ouyang, L. et al. "Training Language Models to Follow Instructions with Human Feedback." NeurIPS (2022) — RLHF. arXiv:2203.02155
  • Grinsztajn, L.; Oyallon, E.; Varoquaux, G. "Why Do Tree-Based Models Still Outperform Deep Learning on Typical Tabular Data?" NeurIPS Datasets and Benchmarks (2022). arXiv:2207.08815
  • Hollmann, N.; Müller, S.; Eggensperger, K.; Hutter, F. "TabPFN: A Transformer That Solves Small Tabular Classification Problems in a Second." ICLR (2023). arXiv:2207.01848
  • Hollmann, N. et al. "Accurate Predictions on Small Data with a Tabular Foundation Model." Nature 637 (2025): 319–326. DOI
  • Sainz, O. et al. "NLP Evaluation in Trouble: On the Need to Measure LLM Data Contamination for each Benchmark." Findings of EMNLP (2023). arXiv:2310.18018
  • Regulation (EU) 2024/1689 (Artificial Intelligence Act). Official Journal of the European Union (2024). EUR-Lex

Quiz