Skip to main content

Deep Learning: From Function Approximation to Sequence Models

Deep learning learns representations with layered parameterized functions. Architecture is only one part of the system: the data-generating process, objective, optimization, split design, and deployment distribution determine whether a result is credible.

Learning Outcomes

A reader should be able to explain why nonlinear layers do not collapse into one linear map; what inductive biases MLPs, recurrence, and attention add; what a Transformer block contains besides attention; and why a falling training loss does not rule out leakage, shortcut learning, or distribution shift.

Architecture Path

OrderNoteQuestionMinimal exercise
1Linear and Softmax regressionhow parameters, losses, and gradients connectmatch output heads to losses
2Multilayer Perceptronwhat nonlinear hidden representations addexpress XOR with two ReLUs
3Activations and Gated FFNswhere ReLU, GELU, SiLU, and SwiGLU differcompare them under equal budgets
4Recurrent Neural Networkshow state compresses history, and what modern SSMs changeunroll an exponential moving average
5Attentionhow content-addressed retrieval workscompute a two-key Softmax mixture
6Transformershow attention, residuals, norms, FFNs, and positions form a networkderive Q/K/V and score shapes

CNNs form a separate path through locality and translation sharing. The Generative Models map covers latent-variable and diffusion objectives.

This is not a replacement ladder

MLPs remain inside Transformer blocks. ReLU is not universally obsolete, although modern Transformers often use GELU, SiLU, or gated FFNs. RNNs remain useful for streaming and bounded state, while S4, Mamba, and xLSTM revisit state-based sequence computation. Attention predates the Transformer and can be combined with recurrence or convolution. The order above expresses conceptual dependency, not a permanent ranking.

Evidence Path

Read every architecture experiment alongside:

  1. Data Splits and Leakage, which fixes prediction time, entities, and available information before fitting;
  2. Evaluation Under Distribution Shift, which aligns splits, metrics, thresholds, and uncertainty with use;
  3. Evidence and Bias, which separates paper results, reproductions, inference, and preference.

A random split that leaks users or future data, or a test set repeatedly used for tuning, invalidates an otherwise polished architecture comparison.

question and prediction time
→ unit, provenance, license, and split keys
→ simple baseline
→ one controlled architectural change
→ fixed budget and multiple seeds
→ central result, variation, failures, and resources
→ temporal, group, or external validation

This path is biased toward supervised gradient training, sequences, and English-language textbooks. It does not constitute a complete treatment of causality, reinforcement learning, graphs, governance, energy, or social impact.