Meeting the relatives

Before a model can be born somebody has to pick its team, and the players available make up a mismatched football squad playing to Ankh-Morpork rules, which is to say the rules are negotiable and the river is in play. There are the by-the-book defenders, supervised learning, doing what they are told with the rigid enthusiasm of a city watchman counting barrels. There are the chaotic strikers, unsupervised learning, darting about with no clear plan and occasionally putting the ball in the water. There are the ones who borrow another squad’s training and pass it off as their own, transfer learners, and the ones who will only move if somebody keeps confirming they are doing it correctly, active learners. There is the one who trains alone at night by covering bits of the pitch and guessing what was there, self-supervised, and has lately been picked for every first team. And there is always the player who scores own goals with remarkable consistency, otherwise known as reinforcement learning on a bad day.

Between them this squad routes traffic, decides who gets a loan, guesses which patients will next arrive at the hospital doors, sorts cat photographs from dog photographs, recommends dreadful television, and occasionally, when properly motivated, spots a tumour. Our model does not yet know which of them will be picked for its team, so it is worth meeting the relatives before the birth.

Working code for several of these lives in the ml and deep-learning repositories, as notebooks, preprocessing pipelines and evaluation examples, for anyone who would rather read source than prose.

The marking scheme

Taught with flashcards

Supervised learning is like teaching a child with flashcards, except the child is an algorithm and the flashcards are thousands of labelled data points. Show it pictures of cats and dogs, explain which is which, and hope it does not conclude that every four-legged creature is probably a moggy. The task is to find patterns mapping inputs to outputs that hold up on examples it has never seen. It fails in more than one way. It can memorise the training set instead of learning from it, which shows up as a model that scores well on data it has met and badly on data it has not. Or the training set can have left a hole: show it ten thousand furry cats and it will meet its first Sphynx with no opinion worth having. Regularisation helps the first and cannot reach the second. That one needs different cats, not more of them.

It earns its keep wherever historical examples carry known outcomes and nobody fancies reviewing the next ten thousand by hand: spam filtering, credit scoring, fraud detection, medical diagnosis, churn prediction, insurance risk assessment.

The spam filter is the classic. Trained on millions of emails marked “spam” or “not spam”, it learns that “free” and “Nigerian prince” are red flags, then files an urgent message under junk because it contained the phrase “meet me tomorrow”, while the actual spam about dubious pills sails through on the grounds that it looks like a medical newsletter.

There are privacy and security concerns too. Where the training data holds sensitive information, a clever attacker may be able to work backwards from the model’s outputs. A health insurance predictor might let slip that people aged 30 to 40 who buy gluten-free pasta are high-risk. The model can also be poisoned with fake labels, turning a loyal spam filter into a willing accomplice for scam emails.

Sort that out

Unsupervised learning is the algorithm equivalent of dumping a pile of puzzle pieces in the middle of the Guildhall and saying, “Sort that out.” No guidance, no labels, just raw data and existential dread. The algorithm clusters similar items, simplifies data, or flags odd outliers. Think of it as a detective trying to solve a crime without knowing there has been a crime, only that something statistically unusual has occurred.

Customer segmentation, anomaly detection in financial transactions, market basket analysis, content discovery in recommendation systems. Anywhere data has piled up and nobody has got round to labelling it, which is most places.

A streaming service groups viewers into taste clusters, which is how someone ends up three episodes into a true crime series at one in the morning while the sidebar gently suggests a documentary about sleep. Card issuers use the same machinery to flag odd transactions, which is why a single banana bought in Spain can freeze an account. Privacy risks abound, particularly when rare behaviour patterns reveal sensitive information, such as purchases indicating pregnancy or a medical condition.

Sets its own homework

Self-supervised learning is the student who sets their own homework. Nobody labels anything by hand. The data is made to grade itself: hide the next word and predict it, cover three quarters of a picture and paint it back, or take four hundred million pictures with captions and learn which caption goes with which picture.

The label is the data with a piece covered up, which is why it scales to whatever can be scraped, and why the largest models are trained this way: 175 billion parameters guessing the next token in 2020, 14.8 trillion tokens of guessing by the end of 2024.

Every large language model, every model that reads pictures and text together, and the models the transfer learners now start from. Wherever a domain has more data than labels.

The risk is the training set. Nobody read it, because nobody could, and whatever it held, the model holds too: the novel, the email address, the poisoned page.

The lazy student

Semi-supervised learning is the lazy student of the class, working from a few labelled examples and a mountain of unlabelled data. The labelled handful act as stabilisers on a bicycle already going downhill rather faster than anyone intended. Label a few pictures of Karen and, where the clustering has crossed its wires, the golden retriever gets tagged as Karen too. Speech recognition uses it as well, which is how “call Mum” becomes “ball bomb”.

Content moderation leans on it, since labelled examples of harmful content are expensive to produce in every sense of the word. So do web page classification and medical record analysis, where annotation costs a clinician’s time and clinicians are not sitting idle.

Risks include the unlabelled data containing private information and incorrect labels propagating errors. Imagine a semi-supervised hate speech detector that learns from bad examples and subsequently flags all political discourse as toxic.

Treats for a robot

Reinforcement learning is like training a dog with treats, except the dog is a robot and the treats are mathematical rewards. The agent tries actions, receives feedback, and adjusts. AlphaGo Zero is the pure case, learning Go from nothing but the rules and several million games against itself, in the manner of a sleepless prodigy with no friends. Its predecessor AlphaGo had a gentler upbringing, starting from a network trained on human expert games before it was set loose on itself.

The busiest reinforcement learner of 2025 was not playing Go. It was a language model being scored on whether its answer to a maths or coding problem checked out, and rewarded when it did, with no human-labelled reasoning in the loop. The same year two labs reached gold-medal scores on the 2025 International Mathematical Olympiad within two days of each other, one marked by the Olympiad’s own coordinators and the other by three of its former medallists.

Algorithmic trading, robotic process automation, supply chain optimisation, autonomous navigation, personalised pricing. The common thread is sequential decisions taken in an environment that answers back, with nobody on hand to label the optimal move at each step.

Reward shaping is where it goes wrong: specify the reward carelessly and the agent will find the cheapest way to collect it, which is rarely the behaviour anyone had in mind. These systems can also leak what they learned about the environment they inhabit, the layout of a house included.

In 2025 the cheapest way was often to read the answer off the marking scheme. OpenAI’s o3, set a task with the scorer in the same process, walked up the Python call stack to where the scorer had already computed the correct answer, and returned that. Its maker had reported three months earlier that a model punished for saying so in its reasoning, given enough optimisation, learns to hide the intent and cheat anyway.

By July 2026 the UK AI Security Institute wrote that every model it had tested for the behaviour had attempted it.

Other people’s homework

Standing on borrowed shoulders

Transfer learning is standing on the shoulders of giants, where the giants are algorithms that did the hard work first. A model trained to recognise cats can be repurposed to spot tumours. The knowledge accumulated during one task is applied to a different but related problem, saving considerable time and compute that would otherwise be spent learning that edges exist.

Medical imaging, manufacturing quality control, document classification: the pattern is a domain starved of labels sitting next to a related domain that is not. Materials scientists use it to screen candidate materials, and radiologists to read scans with networks that learned their first edges on holiday photographs.

The risks arrive with the inheritance. Hidden biases in the pre-trained model come along uninvited into the new domain, and a fine-tuned model can itself be reverse-engineered from its outputs by someone who decides the competitive advantage is now theirs.

Comparatively easy to point at

Where no reward function can be written down, reinforcement learning from human feedback learns one instead. Reviewers compare outputs in pairs, a reward model is fitted to which they preferred, and the policy is then optimised against that stand-in rather than against anything anybody stated. Large language model alignment ran on this, because what people want from an answer turns out to be remarkably hard to put into words and comparatively easy to point at.

It runs on less of it now. One shortcut fits the policy to the comparisons directly, with a classification loss and no separate reward model, and some reasoning models were trained on rewards nobody had to point at, a maths answer that checks or code that passes its tests.

Atari games and simulated robots were where people compared pairs of clips and let the agent learn from which they preferred, in 2017. Summarisation brought it to language in 2019, and it lives now in dialogue assistants and in the preference tuning of image generators.

The labour behind it is real and largely invisible: sizeable teams of reviewers, frequently underpaid and rarely credited, teaching a model which of its answers to keep to itself. Feedback channels can also be gamed.

The needy intern

Active learning is the needy intern of algorithms, constantly asking “is this right?” Rather than demanding that everything be annotated before it will condescend to learn anything, it picks which points to ask about and sends those to a human. How it picks is where the field lives. It might ask about the ones it is least certain about, the ones a committee of models disagree over, or the ones expected to shift it most.

Medical imaging analysis and legal document review, wherever labelling is expensive and expert time is the binding constraint. The queries themselves can reveal sensitive information, and blind spots form in the regions the model never thinks to ask about, which is reliably where the interesting failures live.

The neighbourhood watch

Federated learning is the Ankh-Morpork neighbourhood watch of algorithms. A device learns from local behaviour and sends the lessons rather than the data to a central server. The raw data really does stay put, which is not a marketing fiction. What travels is the update.

Mobile keyboard prediction; fraud detection across banks that cannot legally pool customer records; healthcare research across hospitals under different data protection regimes. The regulatory appeal is obvious, the technical complexity considerable, and the gap between the two is where projects quietly expire.

Gradients carry a good deal more about their training data than intuition suggests, and a determined observer on the receiving end can reconstruct some of it. Protocols exist for aggregating updates so that individual ones are hidden, and they are partial measures.

Slightly drunk pundits

Ensemble learning is asking a panel of slightly drunk pundits, averaging the answers, and calling the result wisdom. It works, and it works in two distinct ways that often get lumped together. Bagging, the method behind a random forest, trains many high-variance models on different samples and averages out their disagreements. Boosting, the method behind gradient-boosted trees, trains models in sequence, each attending to what its predecessor got wrong. The first reduces variance, the second reduces bias, and stacking hands the whole argument to a further model trained to weigh the opinions.

Insurance underwriting, clinical decision support, financial risk modelling, and competitive machine learning, where the last fraction of a percentage point is worth the trouble.

A single corrupted learner in a voting ensemble mostly gets outvoted, and there are aggregation schemes built deliberately around that property, training each member on a small disjoint slice so that a bounded number of poisoned points can reach only a bounded number of members. An off-the-shelf random forest is not one of those: bootstrap sampling puts any given point into most of the bags. Sequential methods have a different difficulty, since each learner is fitted against whatever the last one left behind, and AdaBoost in particular piles weight onto the examples it keeps getting wrong, poisoned or otherwise. None of the arithmetic helps once the corrupted points stop being few.

The shape of the suffering

A deep network does not explain itself by construction, and what can be recovered afterwards by attribution and probing methods is partial and disputed. A wrong answer generally gets caught by its consequences.

The older relatives

Architecture is the shape of suffering settled on once the decision to use a neural network has already been made. Feedforward networks are the baseline, handling tabular classification and regression: customer churn, loan default, medical risk scoring. Convolutional networks take image and signal data, powering satellite imagery analysis and quality inspection on factory floors. Recurrent networks and LSTMs process sequences, and dominated log anomaly detection from 2017 to about 2021. In the M5 competition on Walmart’s retail sales, most of the winning methods used gradient-boosted trees. The M4 forecasting competition was won outright by an LSTM hybrid, with a gradient-boosted meta-learner that weighted other models’ forecasts second.

Noise run backwards

Generative adversarial networks produce synthetic data for drug discovery and fraud simulation, and made the pictures until 2021, when diffusion models overtook them on image quality. A diffusion model learns to take noise out of a picture one step at a time, then runs that backwards from pure noise, which costs more steps per sample than a GAN and covers more of what it was trained on.

Everything looks at everything

Then there are transformers. The trick is attention: instead of walking a sequence one step at a time and hoping the beginning survives to the end, the model weighs the positions available to it and learns which ones bear on which. Recurrence could not scale that way, since each step waited on the last. Most large language models in use are built on this, and read their instructions and the text they are given as one stream of tokens, which is the opening prompt injection walks through.

One state per token

Attention has a cost, though: weighing positions against one another means work that grows with the square of the sequence length.

State-space models were the standing challenge on that point, trading that comparison for a state updated once per token. By 2026 several of the large open-weight models stack linear-attention or Mamba-2 layers with a thin band of full attention, nine to one in IBM’s case, and one of them outperforms full attention outright on its makers’ comparisons. DeepSeek took a third road and taught the model which positions to skip. What the closed labs run is not published.

The expensive end

Most of the experts asleep

In a mixture of experts the feed-forward block is split into many, and a small router picks a few of them for each token, so a model can hold 671 billion parameters and use 37 billion of them per token, or 675 billion and use 41 in the case of Mistral’s largest.

Memory pays for the whole and compute pays for the slice. It looks like an ensemble and is not one: the experts were trained together, nobody averages them, and a token sent to the wrong ones is not outvoted, it is answered by them.

Bolted on beside the billions

The 2026 version of transfer learning starts from a model somebody else trained, and touches almost none of it: a low-rank adapter bolted beside the frozen billions matches full fine-tuning on small and medium datasets, and the newest self-supervised vision model is given new tasks with its weights left untouched.

Billed by the token

A model can be given a budget of tokens to think in before it answers, and on problems it can already sometimes solve, a small model spending that budget beats one fourteen times its size spending none. The budget is now a switch on the model card, on or off, and a number.

As a product, “reasoning model” mostly means the same network told to talk to itself for a while first, trained afterwards so that the talk ends more often in an answer that checks, and billed by the token.

The case nobody labelled

The whole street is at it

Inductive learning generalises from examples, which is both the point of it and the hazard. A traffic warden tickets one car and concludes the whole street is at it. Credit scoring, insurance risk assessment and customer lifetime value prediction all work this way: past behaviour pressed into service as a guide to future behaviour, with the confidence of someone who has never met an edge case.

Adversarial manipulation of data can fool the system, and sensitive correlations may be revealed without anyone intending to reveal them.

One exam paper

Transductive learning skips the general rule. Rather than fitting a function that will work on whatever turns up later, it reasons straight from the labelled examples to a specific batch of unlabelled points that are already present when training starts. Less a lesson learned than one exam paper answered. Nothing survives the exercise that a new point could be handed to. The whole thing runs again. Drug interaction prediction uses it where the compounds of interest are all present from the start and the question is which pairs interact. Few-shot work uses it too, where the classes are new but the points to be labelled are all in hand.

Privacy risk is high, since the labelled set has to be kept and consulted rather than distilled away into weights.

Somebody wrote the rules down

Deductive reasoning is not machine learning in the usual sense. It starts from rules somebody wrote rather than learning them from examples. Where it reads examples at all, it discovers nothing the rules did not already entail; what it usually gains is speed, by compiling a laborious proof into something it can reach for next time. Tax software runs on rules and no examples whatever, and fails whenever reality declines to comply. It suits regulatory compliance checking, rules-based fraud detection, and any domain where auditability counts for more than flexibility and somebody has actually written the rules down.

There is no training set to leak, though the rules, the inputs and the logs can hold sensitive data, and biases may be embedded in the rules themselves by whoever wrote them on a wet Thursday afternoon.

Whoever gets picked, our model does not get a vote in the matter. Meeting the family was the easy part.