MacroFinance AI Team

Supervised Learning:
the A→B Machine

One idea does most of the work in commercial AI. This lesson is that idea, and what it costs to put into production.
Module 1 · Lesson 02  ·  45 minutes  ·  Prepared by the MacroFinance AI Team
Lesson 02 · Supervised Learning: the A→B Machine01  /  19
Orientation

What this lesson answers

  • What supervised learning is, stated in one sentence you can repeat in a meeting
  • Why six unrelated products in six unrelated industries have exactly the same shape
  • Where the training data comes from, and why labels — not algorithms — are the binding constraint on most projects
  • Why performance kept improving through the last decade when it had plateaued before
  • The three things supervised learning cannot give you, however much data you feed it

If you remember one slide

Make it the mapping table two slides from here. Every project scoping conversation in the rest of your career can start by filling in its two columns.

Lesson 02 · Supervised Learning: the A→B Machine02  /  19
A supervised model learns to turn an input A into an output B, by being shown many examples where both are known.
That is the entire idea. Everything else is engineering, data and judgement.
Lesson 02 · Supervised Learning: the A→B Machine03  /  19
The shape

The same machine, sold under six different names

INPUT AOUTPUT BWHAT IT BECOMESA credit applicationWill it default?UnderwritingA card transactionIs it fraudulent?Payments riskA dealing-room callThe text transcriptTrade capture, complianceA scanned invoiceAmount, date, counterpartyAccounts payableA support messageWhich team handles itClient service routingYesterday's order bookTomorrow's staffing needOperations planningSix unrelated products. One shape. Nothing else in this course is as reusable as this table.
Lesson 02 · Supervised Learning: the A→B Machine04  /  19
The shape

Why writing it this way is worth the discipline

Forcing a proposal into the A→B form does three things at once, and it takes about ninety seconds.

  1. It exposes vagueness“Use AI to improve client retention” has no A and no B. It is a wish, not a project.
  2. It reveals the data requirementYou now know exactly what has to be collected, and how many examples of it.
  3. It fixes the measure of successOnce B is named, the error is defined, and arguments about whether it worked become arithmetic.

The tell

If nobody in the room can state B in a single noun phrase, the project is not ready to be funded. This is the cheapest filter available to you.

Note what the form does not ask: which algorithm, which vendor, which cloud. Those are downstream decisions and they are not yours to make early.

Lesson 02 · Supervised Learning: the A→B Machine05  /  19
How it learns

The loop, start to finish

1CollectGather examples whereboth A and B are alreadyknown. This is the partthat takes months.2FitAdjust the model'sinternal numbers untilits guesses on thoseexamples are close to theknown answers.3TestMeasure on examples themodel has never seen.This number is the onlyone that means anything.4DeployPoint it at live inputs,where the answer is notknown yet.5MonitorWatch the error rate. Theworld moves; a model thatwas right in March maynot be in November.Steps one and five carry most of the cost. Step two is the part people picture.
Lesson 02 · Supervised Learning: the A→B Machine06  /  19
How it learns

A worked example: one row of a lending file

The model sees thousands of rows like this, each with the outcome already known.
FieldValueRole
Requested amount18,500Input A
Term48 monthsInput A
Income, verified54,200Input A
Existing obligations / income0.31Input A
Months at current employer26Input A
Defaulted within 24 monthsNoOutput B — the label

The final row is what makes this supervised learning. It exists only because time passed and somebody recorded what happened. That is why a new product with no history cannot be underwritten this way, however sophisticated the model.

Lesson 02 · Supervised Learning: the A→B Machine07  /  19
How it learns

What the model actually ends up holding

After training, the model is a large collection of numbers and a rule for combining them. Feed it a new application and it produces a score.

  • It has found patterns that were predictive in the history it was shown.
  • It has no notion of why those patterns held.
  • It cannot tell you what would happen if you changed one of the inputs.

Correlation, industrialised

A supervised model is a very fast, very consistent correlation finder. That is genuinely valuable. It is not a causal claim, and treating a score as an explanation is the most common analytical error in this field.

Lesson 02 · Supervised Learning: the A→B Machine08  /  19
Two flavours

B is either a category or a number

CLASSIFICATIONB is a categoryThe output is one of a fixed set of labels, usually with aconfidence attached.Default / no defaultFraud / legitimate / reviewMeasured by accuracy, precision, recallREGRESSIONB is a numberThe output is a quantity on a continuous scale, and the error hasa size as well as a sign.Expected loss, in currencyDays until this invoice is paidMeasured by average error, not accuracyAsk which one a vendor is selling. It determines what “accurate” is even allowed to mean.
Lesson 02 · Supervised Learning: the A→B Machine09  /  19
Measuring it

Three sets of data, three different jobs

Training set — the model sees the answersTypically the large majority of the data. Used to fit the model's parameters.fitValidation set — the model is tuned against itUsed to choose between candidate models and settings. Touched many times.chooseTest set — untouched until the endLooked at once, to estimate how the system will behave on cases nobody has seen.judgeIf the test set has been consulted repeatedly, it has quietly become a validation set, and the reported number is optimistic.
Lesson 02 · Supervised Learning: the A→B Machine10  /  19
Measuring it

The number that matters is the one on data nobody has seen

What you are toldWhat to askWhy
“94% accurate”On which set, and when was it collected?Accuracy on training data is close to meaningless.
“Beats the incumbent model”On the same period and the same population?Two models measured on different samples cannot be compared.
“Validated by the vendor”Can we run it on our own held-out month?A vendor's test set is their marketing; yours is your evidence.
“Improves every quarter”Is the test set being reused?Repeated tuning against a fixed test set inflates the number invisibly.
Lesson 02 · Supervised Learning: the A→B Machine11  /  19
Why now

The chart that explains the last decade

Schematic, not measured: the shape is the point, and the shape is why the industry changed when it did.
nonesomea lotvastAmount of labelled data →Performance at the task →Large neural networkSmall neural networkClassical methodsclassical methods stop improving here
Classical methods absorb a certain amount of data and then stop improving. Large neural networks keep converting additional data into additional performance — which only matters if you have the data and the compute to feed them.
Lesson 02 · Supervised Learning: the A→B Machine12  /  19
Why now

Three things had to arrive together

Data

Digitisation

Processes moved onto systems that record what happened. The labels are a by-product of that, not of any AI effort.

Compute

Parallel hardware

Graphics processors turned out to suit the arithmetic that training requires, cutting experiment times from months to hours.

Method

Training that scales

Techniques that let much larger networks be trained without collapsing. Necessary, but the least discussed of the three outside research.

Only the first of these is under your control, and it is the one that decides whether your organisation can participate at all.

Lesson 02 · Supervised Learning: the A→B Machine13  /  19
The real constraint

Labels are the expensive part

LabelWhere it comes fromWhat it costs you
Did this card transaction turn out to be fraud?Chargeback records, weeks laterCheap — the process already produces it
Did this borrower default?The passage of 24 monthsFree, but slow. You cannot compress it
Is this clause unusual for this counterparty?A lawyer reading contractsExpensive per label, and hard to scale
Which support tickets were resolved well?Nobody currently records itRequires a process change before any model is possible

The scoping question that saves quarters

Before asking whether a model can be built, ask where the labels come from and how long they take to arrive. Projects rarely die on the algorithm. They die on the last row of this table.

Lesson 02 · Supervised Learning: the A→B Machine14  /  19
How it fails quietly

Leakage: the model gets to see the future

The most dangerous failure in this field, because it makes the results look excellent.
  1. A field sneaks in that would not exist at decision timeA collections flag, a write-off code, a status that is only ever set after the outcome.
  2. Test performance looks extraordinaryThe model is not predicting the outcome; it is reading a record of the outcome.
  3. The system is approved on that numberNobody questions a result that good, which is precisely the problem.
  4. Live performance collapsesIn production the field is empty, because the future has not happened yet.

The defence

For every input, ask: would this value have been available, in this form, at the moment the decision was made? A result that looks too good is a reason to investigate, not to celebrate.

Lesson 02 · Supervised Learning: the A→B Machine15  /  19
Limits

Three things this machine will never hand you

1

Causation

It learns what accompanies the outcome, not what produces it. Acting on a correlation as though it were a lever is how good models cause bad decisions.

2

Explanation

Attribution tools show which inputs moved the score. That is not the same as a reason a regulator, a client or a court will accept.

3

Novelty

It reproduces the regularities of the past. When the regime changes, it is confidently wrong, and it will not tell you that it has become so.

Lesson 02 · Supervised Learning: the A→B Machine16  /  19
Apply it

Two columns, ten minutes

  • Pick three recurring decisions in your function that a competent person makes in a few seconds of looking at a document or a screen.
  • For each, write A and B as single noun phrases. If you cannot, that is the finding.
  • For each B, write where the label would come from and how long it takes to arrive.
  • Rank the three by how quickly the labels appear. That ranking is usually the correct build order, and it rarely matches the ranking by enthusiasm.
Lesson 02 · Supervised Learning: the A→B Machine17  /  19
Reference

Key terms

TermDefinition
Supervised learningLearning a mapping from A to B from examples where both are known.
LabelThe known output B attached to a training example.
Classification / regressionB is a category / B is a number.
Training, validation, testData used to fit, to choose between models, and to judge honestly.
GeneralisationPerformance on cases the model was not trained on. The only performance that counts.
LeakageInformation in the inputs that would not be available at decision time.
Lesson 02 · Supervised Learning: the A→B Machine18  /  19
Consolidation

What to take from this lesson

  1. Supervised learning maps A to B, learned from examplesOne sentence, and it covers the majority of deployed commercial AI.
  2. The A→B form is a scoping instrument, not a definitionUse it to expose vague proposals before they reach a budget.
  3. Labels, not algorithms, are the binding constraintAsk where they come from and how long they take. Build in the order the labels allow.
  4. Judge on held-out data, and distrust results that look too goodLeakage is the most expensive failure mode precisely because it flatters everyone involved.
Lesson 02 · Supervised Learning: the A→B Machine19  /  19

Lesson 02 · Supervised Learning: the A→B Machine

  1. Title
  2. What this lesson answers
  3. A supervised model learns to turn an input A into an output B, by being sh…
  4. The same machine, sold under six different names
  5. Why writing it this way is worth the discipline
  6. The loop, start to finish
  7. A worked example: one row of a lending file
  8. What the model actually ends up holding
  9. B is either a category or a number
  10. Three sets of data, three different jobs
  11. The number that matters is the one on data nobody has seen
  12. The chart that explains the last decade
  13. Three things had to arrive together
  14. Labels are the expensive part
  15. Leakage: the model gets to see the future
  16. Three things this machine will never hand you
  17. Two columns, ten minutes
  18. Key terms
  19. What to take from this lesson