Braj Kishore
JourneyVaultML FoundationsAI PM GuideAgenticNewsWork With MeMentorshipPulseNow
Say hi

Hiring · Building · Investing

Have a system — or a team —that needs to scale?

info@avyxon.ai

Usually replies within a day · track record here

JourneyVaultML FoundationsAI PM GuideAgenticNewsWork With MeMentorshipPulseNow
LinkedInXYouTubeSubstackInstagramThreadsFacebookDiscordGitHubTopmate
© 2026 Braj Kishore · Bengaluru, INThink Big · Start Small · Scale Fast
ML Foundations
09Track 3 · Architectures & the walls they broke

Feed-forward networks (ANN / MLP)

The general-purpose function fitter: what universal approximation does and doesn't promise, why XOR needs a hidden layer, and the three walls that forced everything after it.

45 min2 interactives4 sources

Feed a 224×224 colour photograph into a fully-connected layer of 1,000 units and you've just created 150 million weights in the first layer alone — for one layer, of one image size, with no notion that neighbouring pixels are related. That arithmetic is why convolutional networks had to exist.

The intuition

An MLP is a stack of learned coordinate transformations. Each layer bends and folds the space it receives until the classes, hopelessly tangled in the input, become separable by a straight line in the final layer. Depth is folds; width is how much you can fold at once.

Unlearn this

That the universal approximation theorem means one hidden layer is enough. It guarantees a network exists that approximates your function — it says nothing about how wide it must be (possibly exponentially), or whether gradient descent could ever find it. Existence is not learnability, and depth is exponentially more parameter-efficient than width for most real functions.

01Stacking layers: representation learning, made concrete

A multilayer perceptron is dense layers stacked with non-linearities between them: input → hidden → hidden → output. Every unit in a layer sees every unit in the previous one, which is what 'fully connected' means and where the parameter count comes from.

The useful way to think about the hidden layers is that they are learned features. You didn't specify them, and they're usually not individually interpretable, but the network has re-encoded the input into a representation where the final linear layer's job is easy. That's the core claim of deep learning: given enough data, learned representations beat hand-designed ones.

Which is also why the practical advice is 'start narrow and shallow, grow until validation stops improving'. Capacity is cheap to add and expensive to justify.

02XOR: the two-minute proof that depth matters

Four points: (0,0)→0, (0,1)→1, (1,0)→1, (1,1)→0. Try to separate the ones from the zeros with a single straight line. You cannot — the positive class sits on one diagonal and the negative class on the other. This is the argument in Minsky and Papert's 1969 Perceptrons, and it contributed to the first AI winter.

Add one hidden layer with two units and the problem dissolves. One unit learns roughly 'at least one input is on' (OR), the other learns roughly 'both inputs are on' (AND), and the output layer learns 'OR but not AND'. The hidden layer has transformed the input into a space where a line suffices.

That is the entire argument for depth, in four data points, and it's the demo to reach for when someone asks why we don't just use logistic regression.

TensorFlow Playground — the XOR and spiral datasetsGoogle

Try it

XOR, trained live

Remove the hidden layer and watch the loss stall at 0.69 — the loss of a coin flip.

03What universal approximation actually says

Cybenko (1989) and Hornik (1991) proved that a feed-forward network with a single hidden layer and a suitable non-linear activation can approximate any continuous function on a compact domain to arbitrary precision, given enough hidden units.

Three caveats, and interviewers ask about all three. 'Enough hidden units' can mean exponentially many in the input dimension — the theorem is silent on width. The theorem is about existence, not about whether gradient descent can find that network from a random start. And approximating the training data well says nothing about generalisation, which is a statistical question the theorem doesn't touch.

So the practical conclusion is the opposite of the naive reading: because width can be exponential and depth is often exponentially more efficient, we build deep networks, not wide ones. Universal approximation reassures you the function class is rich enough; everything hard is in the optimisation and the generalisation.

The trap

"If one hidden layer is universal, why go deeper?" — Because the theorem promises existence at unbounded width, not efficiency or learnability. Deep nets represent many natural functions with exponentially fewer parameters, and they're what SGD can actually find.

Approximation by superpositions of a sigmoidal functionCybenko, Math. Control Signals Systems · 1989

04Where MLPs still win in 2026

Structured, tabular data — the row-and-column problems that make up most of what businesses actually run on: credit risk, churn, pricing, demand, ranking features. Also as components: the feed-forward block inside every transformer layer is an MLP, and it holds roughly two-thirds of the parameters in a standard block.

The honest position that will earn you credit: on medium-sized tabular data, gradient-boosted trees (XGBoost, LightGBM, CatBoost) frequently still beat neural networks, train in minutes rather than hours, need far less tuning and handle mixed types and missing values natively. Reaching for a deep network on a 50,000-row tabular problem because it's more modern is a common and expensive mistake.

Why do tree-based models still outperform deep learning on typical tabular data?Grinsztajn, Oyallon & Varoquaux, NeurIPS · 2022

05The three walls that forced everything after

Parameter explosion. Fully connected means every input touches every unit. That 224×224×3 image into 1,000 hidden units is 150 million parameters for one layer — more parameters than most complete modern vision models, spent before the network has learned anything.

No spatial structure. Flattening an image into a vector destroys the fact that adjacent pixels are related. Worse, an MLP has no translation invariance: shift the cat three pixels right and, as far as the network is concerned, it's an entirely different input that must be learned separately. That's why CNNs exist.

No sequence, no memory, no variable length. An MLP takes a fixed-size input and has no mechanism for order or time. It cannot read a sentence, because sentences differ in length and because 'dog bites man' and 'man bites dog' would be the same bag of inputs. That's why RNNs exist, and then transformers.

Try it

Four architectures, four bottlenecks

Each one exists because the previous couldn't see something. Read it as a chain of consequences.

The vocabulary, defined once
MLP / feed-forward network
Dense layers with non-linearities between them. Data flows one way; every unit sees every unit below.
Universal approximation
One hidden layer can approximate any continuous function — at unbounded width, with no guarantee gradient descent finds it.
Representation learning
The network discovers useful features itself instead of you engineering them. Deep learning's central claim.
Translation invariance
Recognising the same thing wherever it appears. MLPs lack it; convolution builds it in.
Inductive bias
Structural assumptions baked into an architecture. CNNs assume locality; RNNs assume sequence; transformers assume very little and pay for it with data.

The lab

Everything above, with the dials exposed. Break it deliberately — the failure modes are where the understanding is.

Try it

XOR, trained live

Remove the hidden layer and watch the loss stall at 0.69 — the loss of a coin flip.

Try it

Four architectures, four bottlenecks

Each one exists because the previous couldn't see something. Read it as a chain of consequences.

What they actually ask

Feed-forward networks (ANN / MLP) — the interview questions

QWhy don't we just use a big MLP for everything?Answer it out loud first, then open this

Because architecture is inductive bias, and the right bias is worth enormous amounts of data. An MLP assumes nothing about the input's structure, so it must learn locality, translation invariance and sequence order from examples. A CNN gets locality and weight sharing for free and needs orders of magnitude fewer parameters for images. The MLP is the most general architecture and, for structured data, that generality is a cost rather than a feature.

What they're listening for
'Architecture is inductive bias' is the sentence that signals you understand why the family tree exists.

QYou have 30,000 rows of tabular customer data. Neural network or gradient-boosted trees?Answer it out loud first, then open this

Gradient-boosted trees, almost certainly — LightGBM or XGBoost. They handle mixed types and missing values natively, train in minutes, need much less tuning, and on tabular data of this size they typically match or beat a neural network. I'd run logistic regression as a baseline first, then GBDT, and only consider a network if I needed to fuse text or image features alongside the table.

QHow many parameters in the first layer if you feed a 224×224 RGB image into 1,000 dense units?Answer it out loud first, then open this

224 × 224 × 3 = 150,528 inputs, times 1,000 units, plus 1,000 biases — about 150.5 million parameters in one layer. That arithmetic is the whole motivation for convolution, where a 3×3×3 kernel is 27 weights reused at every position.

Before you move on

Recall beats re-reading, every time. Answer before you flip.

Feed-forward networks (ANN / MLP) · self-test1 / 3

Why can't a single perceptron learn XOR?

Go to the primary sources

Where each claim above comes from. Open them alongside the lesson rather than after it — the papers are shorter than you think, and the figures usually carry the whole argument.

Paper
  • Approximation by superpositions of a sigmoidal function(1989)Cybenko, Math. Control Signals SystemsThe universal approximation theorem itself. Note what it proves — existence — and what it deliberately says nothing about.
  • Why do tree-based models still outperform deep learning on typical tabular data?(2022)Grinsztajn, Oyallon & Varoquaux, NeurIPSThe benchmark to cite when someone insists on a neural network for a 50k-row table. Three concrete reasons trees keep winning.
Play with it
  • TensorFlow Playground — the XOR and spiral datasetsGoogleLoad the XOR dataset, remove the hidden layer, and watch it fail. Add two hidden units and watch it solve instantly.
Book
  • Deep Learning — Chapter 6: Deep Feedforward NetworksGoodfellow, Bengio & CourvilleThe standard reference text, free online. Section 6.1 uses XOR to motivate hidden layers exactly as this lesson does.

External links open in a new tab. Every URL was reachable when this page was written; links rot, so treat the list as a map rather than a guarantee.

Got it? Tick it off — progress saves on this device.

← PreviousEvaluation that survives productionNext →Convolutional networks (CNN)
XOR — the four points that ended the first AI winterepoch 0 · loss 0.700
0110
Task
Network

Loss

0.700

Accuracy

50%

Parameters

13

What each hidden unit learned

  • h1 = tanh(0.24·x₁ − 0.12·x₂ − 0.16)
  • h2 = tanh(0.85·x₁ + 0.41·x₂ + 0.09)
  • h3 = tanh(-0.78·x₁ + 0.06·x₂ + 0.26)
Press Train. Then run it again with the hidden layer removed and watch the loss stall at 0.69 — the exact loss of a coin flip. The gap between those two runs is the reason neural network research stalled for a decade and the reason it restarted.

The background is the network's decision surface. Blue means it predicts 1, cream means 0, and the boundary between them is what the model has actually learned.

Four architectures, four bottlenecks
ANN / MLP1958 →can't see spaceCNN1989 · 2012can't see timeRNN / LSTM / GRU1986 · 1997too slowTransformer2017 →weaker inductive bias, more data required →

Best data type

Text at scale, and increasingly everything else

Core mechanism

Self-attention: every position attends to every position in one operation

Inductive bias — what it assumes

Deliberately weak — barely more than 'these tokens form a set, and here is their position'. It substitutes data for assumptions.

Primary advantage

Path length 1 between any two positions, so long-range dependencies are as learnable as short ones — and every position computes independently, so training parallelises and throughput scales with hardware.

The wall it runs into

O(n²) compute and memory in sequence length, and generation is still sequential because token t+1 needs token t. Weak inductive bias means it needs a great deal of data.

Where it still wins in 2026

Everything at scale — language, vision, audio, multimodal. The default unless you have a specific reason otherwise.

Architecture is inductive bias. Reading the row above left to right, the assumptions get weaker: an MLP assumes nothing, a CNN assumes locality, an RNN assumes order, and a transformer assumes barely more than "a set of positioned tokens". Weaker assumptions mean more flexibility and more data required to make up for what you didn't assume — which is precisely why transformers overtook CNNs on vision only once the datasets got large enough, and why a CNN can still be the better choice on ten thousand images.

Read it left to right as a chain of consequences: each architecture exists because the previous one couldn't see something — space, then time, then long-range context.

XOR — the four points that ended the first AI winterepoch 0 · loss 0.700
0110
Task
Network

Loss

0.700

Accuracy

50%

Parameters

13

What each hidden unit learned

  • h1 = tanh(0.24·x₁ − 0.12·x₂ − 0.16)
  • h2 = tanh(0.85·x₁ + 0.41·x₂ + 0.09)
  • h3 = tanh(-0.78·x₁ + 0.06·x₂ + 0.26)
Press Train. Then run it again with the hidden layer removed and watch the loss stall at 0.69 — the exact loss of a coin flip. The gap between those two runs is the reason neural network research stalled for a decade and the reason it restarted.

The background is the network's decision surface. Blue means it predicts 1, cream means 0, and the boundary between them is what the model has actually learned.

Four architectures, four bottlenecks
ANN / MLP1958 →can't see spaceCNN1989 · 2012can't see timeRNN / LSTM / GRU1986 · 1997too slowTransformer2017 →weaker inductive bias, more data required →

Best data type

Text at scale, and increasingly everything else

Core mechanism

Self-attention: every position attends to every position in one operation

Inductive bias — what it assumes

Deliberately weak — barely more than 'these tokens form a set, and here is their position'. It substitutes data for assumptions.

Primary advantage

Path length 1 between any two positions, so long-range dependencies are as learnable as short ones — and every position computes independently, so training parallelises and throughput scales with hardware.

The wall it runs into

O(n²) compute and memory in sequence length, and generation is still sequential because token t+1 needs token t. Weak inductive bias means it needs a great deal of data.

Where it still wins in 2026

Everything at scale — language, vision, audio, multimodal. The default unless you have a specific reason otherwise.

Architecture is inductive bias. Reading the row above left to right, the assumptions get weaker: an MLP assumes nothing, a CNN assumes locality, an RNN assumes order, and a transformer assumes barely more than "a set of positioned tokens". Weaker assumptions mean more flexibility and more data required to make up for what you didn't assume — which is precisely why transformers overtook CNNs on vision only once the datasets got large enough, and why a CNN can still be the better choice on ten thousand images.

Read it left to right as a chain of consequences: each architecture exists because the previous one couldn't see something — space, then time, then long-range context.