Neural Networks & Deep Learning Module

Week 1: Introduction to Deep Learning

Explore the biological inspiration, architectural foundations, supervised learning models, and modern drivers behind the deep learning revolution.

Introduction to Deep Learning

Deep learning represents one of the most transformative advances in computer science and artificial intelligence. This module covers the core concepts, supervised learning paradigms, data distinctions, and the fundamental technical drivers accelerating deep learning.

Learning Objectives

By the end of this module, you should be able to:
  • Articulate the major trends and architectural factors driving the rise of deep learning.
  • Explain how deep learning is formulated and applied within supervised learning.
  • Differentiate between structured and unstructured data in modern ML pipelines.
  • Identify the primary model families (Standard Feedforward NNs, CNNs, RNNs/Transformers) and their ideal application domains.

What is a Neural Network?

An Artificial Neural Network (ANN) is an adaptive computational model inspired by the biological architecture of interconnected neurons in the animal brain. It processes information through hierarchical layers of mathematical transformations to recognize patterns, approximate complex manifolds, and predict outcomes.
Neural Network Architecture
Definition (Adaptive Neural Systems):
A neural network is an adaptive system that learns by using interconnected nodes (neurons) organized into a layered structure. It breaks down raw input features into sequential tiers of abstraction. Its behavior is parameterized by the numerical connection strengths (weights) and thresholds (biases). These parameters are systematically tuned during training through optimization algorithms until the network maps inputs to desired outputs.
A standard network consists of three fundamental structural layers:
  1. Input Layer: Ingests raw input feature vectors $\mathbf{x} \in \mathbb{R}^{n_x}$.
  2. Hidden Layer(s): Intermediate layers where learned feature combinations occur. In deep architectures, each hidden layer utilizes the activation outputs of the preceding layer as its input.
  3. Output Layer: Produces the final target prediction $\hat{\mathbf{y}}$ (e.g., continuous scalar for regression or probability distribution for classification).

Supervised Learning with Neural Networks

In supervised learning, an algorithm is provided with a labeled dataset of paired examples ${(\mathbf{x}^{(1)}, y^{(1)}), (\mathbf{x}^{(2)}, y^{(2)}), \dots, (\mathbf{x}^{(m)}, y^{(m)})}$, where $\mathbf{x}^{(i)}$ represents the input features and $y^{(i)}$ is the ground truth target.
Supervised problems fall into two primary classes:
  • Regression: The target $y$ is a continuous numerical variable (e.g., predicting real estate valuations, temperature, or stock price changes).
  • Classification: The target $y$ is a discrete category (e.g., binary $y \in {0, 1}$ or multi-class $y \in {1, \dots, C}$).

Supervised Learning Applications

Different data modalities map directly to distinct neural network architectures:
Input ($\mathbf{x}$)Output ($y$)Application DomainPrimary Model Architecture
Home features (sqft, bedrooms)Price ($$$)Real Estate ValuationStandard Dense Neural Network
User profile & Ad metadataClick probability ($0 / 1$)Online AdvertisingStandard / Factorization Machines
Image pixels (RGB)Object class ($1, \dots, 1000$)Computer Vision / Photo TaggingConvolutional Neural Network (CNN)
Audio waveformText transcriptSpeech RecognitionRecurrent Neural Network (RNN) / CTC / Transformer
Source text (e.g., English)Target text (e.g., French)Machine TranslationSequence-to-Sequence / Attention Transformer
Camera & Radar / LiDAR telemetry3D bounding boxesAutonomous DrivingMulti-modal CNN + PointNet + Transformer

Structured vs. Unstructured Data

A critical distinction in modern machine learning systems lies in data representation:
text
                            Data Types
                               │
               ┌───────────────┴───────────────┐
               ▼                               ▼
       Structured Data                 Unstructured Data
     (Tabular Databases)            (Pixels, Audio, Text)
   ┌───────────────────────┐       ┌────────────────────────┐
   │ Size │ Beds │ Price   │       │ [128, 45, 92, ...]     │
   │ 1400 │  3   │ $450k   │       │ Raw audio frequencies  │
   │ 2100 │  4   │ $680k   │       │ Natural language tokens│
   └───────────────────────┘       └────────────────────────┘
  • Structured Data: Data that resides in explicit, tabular schemas where every column has a strictly defined semantic meaning (e.g., age, click count, income, database records).
  • Unstructured Data: Raw sensory signals that lack rigid tabular structures, such as image pixel grids ($H \times W \times C$), audio waveform samples, and natural language strings. Humans interpret unstructured data intuitively, but traditional algorithmic approaches struggled with it until deep neural networks emerged.

Why Is Deep Learning Taking Off?

The resurgence and exponential growth of deep learning over classical statistical machine learning (such as SVMs and logistic regression) is fueled by three converging drivers:
text
 Performance
      ▲
      │                              / Deep Neural Network
      │                            /
      │                          /
      │                        /
      │                      /
      │                    /   Medium Neural Network
      │                  /------------------
      │                /    Small Neural Network
      │              /----------------------
      │            /   Traditional Learning Algorithms (SVM, Logistic Regression)
      │          /-------------------------- (Plateaus with scale)
      │        /
      │      /
      └─────┴──────────────────────────────────────────►
                       Amount of Data (m)

1. Data Scale & Digitization

With ubiquitous mobile devices, cloud systems, and sensor networks, the volume of digital data has exploded ($m \to \infty$). Classical learning algorithms (linear regression, decision trees, support vector machines) plateau early: providing them with $10\times$ more data yields diminishing returns. In contrast, large deep neural networks exhibit power-law scaling—their capacity and accuracy continuously scale with increased data volume.

2. Computational Acceleration

Training large networks with millions of parameters requires trillions of floating-point operations. The advent of GPUs (Graphics Processing Units), TPUs (Tensor Processing Units), and vectorized CPU SIMD pipelines transformed models that previously took months into experiments that complete in hours.

3. Algorithmic Innovations

Key mathematical breakthroughs reduced training bottlenecks:
  • Switching Activation Functions: Replacing the classical Sigmoid activation in hidden layers with the Rectified Linear Unit (ReLU) solved the notorious vanishing gradient problem, allowing gradients to flow unimpeded through hundreds of layers during backpropagation.
  • Modern Optimizers & Regularization: Adam, RMSProp, Batch Normalization, and Dropout unlocked stable convergence in ultra-deep architectures.

Summary

To achieve state-of-the-art performance in deep learning:
  1. You need the capacity to train a large enough neural network to avoid underfitting.
  2. You need a sufficient volume of quality training data ($m$) to avoid overfitting.
  3. You need efficient optimization algorithms and hardware to iterate rapidly.
In the next module, we investigate how the simplest 1-neuron network—Logistic Regression—is formulated, optimized with computation graphs, and vectorized with NumPy.