Computer Engineering is coming soon

We're still writing and reviewing the notes for every subject, and we'll open it when every subject is ready. Meanwhile you can practise aptitude, ask Aria about any subject, or see the branches that are ready.

History, advantages and challenges of deep learning

A concise, exam-focused guide to the history of deep learning, its advantages, and its practical challenges, with definitions, key theorems (including the Universal Approximation Theorem), formulas, worked examples, common mistakes, exam question types and a quick check.

Drafted with Aria, reviewed by the AiCanCode.org team · Updated . How we write and check our notes. Spotted an error? Use Give Feedback at the bottom of the page.

Why it matters

Deep learning is the set of methods that let computers learn useful representations from large amounts of data. Engineers use deep learning to build systems for image and speech recognition, natural language processing, autonomous vehicles, and many other tasks where raw, unstructured data must be mapped to useful outputs.

Key ideas

Explain clearly: define each term before using it.

  • Artificial neuron — a simple function that maps a vector x to an output y = f(w·x + b), where w is a weight vector, b is a bias and f is an activation function. (Define dot-product and activation when first used.)

  • Neural network — a parameterised composition of artificial neurons arranged in layers. A network with many layers is called deep; the number of layers (depth) is one axis of complexity.

  • Deep learning — the area of machine learning that uses neural networks with many layers to learn representations automatically from data. It emphasises multi-layer (hierarchical) feature learning rather than hand-designed features.

  • Historical milestones (what to know and draw a short timeline): draw a horizontal timeline from left to right and mark these items with year and short label:

    1. 1943 — McCulloch & Pitts: McCulloch–Pitts neuron (logical model of neuron). Label: simple binary threshold neuron.
    2. 1958 — Frank Rosenblatt: Perceptron (single-layer classifier, learning rule). Label: perceptron learning rule.
    3. 1969 — Minsky & Papert: book 'Perceptrons' showing limitations (XOR), which contributed to a funding winter in connectionism. Label: limits of single-layer models.
    4. 1970s–1980s — rediscovery of distributed representations and multi-layer networks; credit Paul Werbos (1974 PhD thesis) for formulating backpropagation (reverse-mode automatic differentiation) in neural networks and control.
    5. 1986 — Rumelhart, Hinton & Williams popularised backpropagation to train multilayer networks. Label: gradient-based weight updates.
    6. 1990s — LeCun et al.: Convolutional Neural Networks (LeNet) for digit recognition (handwritten) showed practical success for structured data.
    7. 2006 — Hinton and colleagues introduced greedy layer-wise pretraining and revival of deep models (deep belief networks). Label: unsupervised pretraining.
    8. 2012 — Krizhevsky, Sutskever & Hinton: AlexNet wins ImageNet, showing deep CNNs + GPUs outperform previous methods — start of large-scale deep learning boom.
    9. 2010s–2020s — scaling with data, compute and architectures (CNNs, RNNs, Transformers); foundation models and very large language models emerge.
  • Theoretical points universities ask for:

    • Universal Approximation Theorem (UAT) — precise statement: a feed-forward network with a single hidden layer and a suitable non-polynomial activation function (for example a sigmoid) can approximate any continuous function on a compact subset of R^n to arbitrary accuracy, given sufficiently many hidden units. Assumptions: target function is continuous on a compact set; activation is continuous and not a polynomial. Note: piecewise-linear activations like ReLU also satisfy the non-polynomial condition, so UAT applies to them as well. What UAT does NOT say: it does not guarantee learnability, generalisation, required network size, nor efficiency of training.
    • Short proof sketch (exam style): reduce to density arguments in function spaces — show that linear combinations of shifted activations are dense in C(K) (space of continuous functions on compact K) using standard approximation theorems (constructive details often use sigmoid as bump approximator). State assumptions explicitly.
  • Advantages of deep learning (each advantage defined):

    • Representation learning — networks learn hierarchical features directly from raw data; lower layers learn simple features and higher layers compose them into complex features. (Refer later topic: Representation learning and deep architectures.)
    • Scalability — performance often improves with more data and larger models (when properly regularised and optimised).
    • State-of-the-art on unstructured data — images, audio and text tasks where hand-crafted features were inadequate.
    • Transfer learning — pretrained deep models can be fine-tuned for related tasks, reducing labelled-data needs.
  • Challenges of deep learning (each challenge defined):

    • Data hunger — needs large labelled datasets for supervised learning; data collection, labelling cost and privacy are practical limits.
    • Compute and energy — training large models requires high compute (GPUs/TPUs) and energy; cost and carbon footprint matter.
    • Explainability and interpretability — deep models are often black boxes; understanding decisions is hard, which matters in safety-critical systems.
    • Robustness — models can be brittle to distribution shift, adversarial examples and out-of-distribution inputs.
    • Catastrophic forgetting — when trained sequentially on tasks, networks can forget earlier tasks unless special methods are used.
    • Reproducibility and hyperparameter sensitivity — results can depend on random seed, initialisation, and many hyperparameters (see later topics: optimisers, regularisation, weight initialisation).
    • Theoretical understanding — many practical successes outpace theory; generalisation of overparameterised networks is an active research area.

Where this connects to other topics: optimisation, vanishing/exploding gradients, regularisation, CNNs, RNNs, attention, and foundation models are all related and are separate topics in this course.

Formulas

y = f(w·x + b) — y: neuron output (unitless), x: input vector (unitless), w: weight vector (same dimension as x), b: bias (unitless). Applies to an artificial neuron with activation f.

params_FC = n_in * n_out + n_out — number of parameters in a fully connected layer mapping n_in inputs to n_out outputs; params are unitless counts. Applies to dense layers.

params_CNN = k_h * k_w * c_in * c_out + c_out — parameters in a convolutional layer with kernel height k_h, kernel width k_w, c_in input channels and c_out output channels (assuming one bias per output channel, no groups); unitless count.

memory_bytes ≈ params * 4 — approximate memory for parameters in bytes if stored as 32-bit float (float32 = 4 bytes). Use 8 bytes for float64.

(Also remember standard gradient update used broadly — details in Optimisers topic.)

Worked examples

Example 1 — Numerical parameter count and memory (step-by-step). Question: A fully connected classifier has input 784 (28×28 image flattened), two hidden layers of sizes 256 and 128, and an output layer of 10 classes. Calculate: (a) total number of parameters (weights + biases); (b) memory to store parameters in MiB using float32. Solution: Step 1: Layerwise parameters using params = n_in * n_out + n_out.

  • Input→H1: params1 = 784 * 256 + 256 = 784*256 + 256 = (784+1)256 = 785256 = 200,960.
  • H1→H2: params2 = 256 * 128 + 128 = (256+1)128 = 257128 = 32,896.
  • H2→Output: params3 = 128 * 10 + 10 = (128+1)10 = 12910 = 1,290. Step 2: Total parameters: params_total = 200,960 + 32,896 + 1,290 = 235,146. Step 3: Memory in bytes (float32 = 4 bytes): memory_bytes = 235,146 * 4 = 940,584 bytes. Convert to MiB: memory_MiB = 940,584 / (1024*1024) ≈ 0.897 MiB. Answer: Total parameters = 235,146; parameter memory ≈ 0.897 MiB (float32).

Example 2 — Theory model answer: Why deep networks can be more efficient than shallow ones. Question: Explain why depth can reduce the number of neurons/parameters needed to represent certain functions, even though the Universal Approximation Theorem says a single hidden layer can approximate any continuous function. Model answer (exam style):

  • State UAT: A single hidden layer network can approximate any continuous f on compact sets with sufficiently many hidden units — but UAT is an existence result about representation power, not about the size required or the efficiency of learning.
  • Give intuition: Many natural functions are compositional (built by composing simpler functions). A deep network can mirror this composition: each layer computes part of the composition. When a function can be expressed as a composition of L simpler functions, a deep architecture with L layers can represent it with exponentially fewer neurons than a shallow network that must approximate the full composition in one layer.
  • Provide a concrete (short) constructive argument: consider boolean parity or a hierarchical polynomial: it is known that some functions have circuit complexity that grows exponentially for shallow networks but only polynomially with depth. Cite that depth enables reuse of intermediate computations, reducing parameter counts.
  • Conclude: Depth provides representational efficiency for compositional functions; training and generalisation remain separate issues.

Common mistakes

  • Confusing the perceptron (single-layer) with modern deep networks; forgetting the perceptron cannot solve XOR.
  • Listing advantages without defining terms (e.g., saying “deep learning is better” without saying better for what and under what assumptions).
  • Mixing up dates and attributions (e.g., crediting Rumelhart with first proposing backprop without acknowledging earlier work and Werbos’ contribution).
  • Forgetting to state assumptions in theorems (compact domain, continuity, activation properties).

For your exam

  • Short notes: history timeline. Full marks: correct sequence, key names and reasons for winters and revivals.
  • Derivations: state and sketch proof of UAT. Full marks: statement, assumptions, and a clear proof sketch.
  • Numericals: compute parameters and memory of given architectures. Full marks: formula, numeric steps, units for memory.
  • Diagrams: timeline or simple network drawing. Full marks: clearly labelled axes, years/nodes, and short captions.
  • Essays: advantages vs challenges. Full marks: balanced discussion with examples, definitions and links to other topics (optimisers, regularisation, CNNs).

Quick check

  1. What does the Universal Approximation Theorem guarantee and what does it not guarantee?
  2. Give two practical reasons why deep learning became dominant after 2010.
  3. Why can a single-layer perceptron not learn XOR? Answers: 1) Guarantees representational capacity to approximate any continuous function on compact sets (with enough hidden units and suitable activation); does not guarantee learnability, efficiency or generalisation. 2) Availability of large datasets (e.g., ImageNet) and affordable GPU compute plus improved methods and architectures (e.g., ReLU, dropout). 3) XOR is not linearly separable, and a single-layer perceptron can only learn linearly separable functions.

Finished this topic? Mark it so your progress, study plan and readiness keep up.

Stuck on something here?