Neural Network Fundamentals

Graduate Depth 64 in the knowledge graph I know this Set as goal
Unlocks 86 downstream topics
neural-networks deep-learning function-approximation

Core Idea

Neural networks compose non-linear functions (neurons) across layers. Each neuron computes a weighted sum plus bias through an activation function. Universal approximation theorem states sufficiently wide networks approximate any continuous function.

Explainer

You have already worked with linear regression, which fits a single linear function — a weighted sum of inputs — to data. Neural networks extend this idea dramatically: instead of one linear transformation, they stack many layers of simple units (neurons), each with its own weights, and crucially, each followed by a non-linear transformation. This stacking of non-linearities is what makes neural networks capable of approximating extraordinarily complex functions.

A single neuron does something familiar: it computes a weighted sum of its inputs plus a bias, exactly like linear regression. For inputs x₁, x₂, ..., xₙ with weights w₁, w₂, ..., wₙ and bias b, the pre-activation value is z = w₁x₁ + ... + wₙxₙ + b. So far this is just linear regression. The key addition is the activation function f, applied to z: the neuron's output is f(z). Common choices are ReLU (f(z) = max(0, z)), sigmoid (f(z) = 1/(1 + e^{-z})), and tanh. These functions are non-linear, and that non-linearity is everything.

Why does non-linearity matter so much? Because the composition of linear functions is always linear. If you stacked ten layers with no activation functions, the whole network would be equivalent to a single matrix multiplication — as limited as linear regression. Once you introduce non-linear activations, the network can bend, curve, and fold the input space in ways a single linear function cannot. The universal approximation theorem makes this precise: a sufficiently wide single hidden layer can approximate any continuous function on a compact domain to arbitrary accuracy. Deeper networks with more layers can approximate the same functions with fewer neurons — this is why depth is valuable.

Networks are organized into layers: an input layer that receives the raw features, one or more hidden layers where the actual computation and representation learning happens, and an output layer that produces the prediction. Each layer transforms its inputs into a new representation, and as you go deeper, these representations become increasingly abstract. In a network trained on images, early layers might detect edges, later layers shapes, and the final layers might represent concepts like "cat" or "chair."

Training a neural network means finding the weight values that minimize prediction error on training data. This is done by computing the gradient of the loss with respect to every weight — which requires calculus, specifically the chain rule applied repeatedly through the layers (the backpropagation algorithm). This is why derivatives and partial derivatives are prerequisites: without the ability to compute how the loss changes with respect to each weight, you cannot update the weights in the right direction. The connection to linear regression is also direct: a neural network with no hidden layers and a linear activation is exactly linear regression.

Practice Questions 3 questions

Prerequisite Chain

Counting to 10Counting to 20Understanding ZeroThe Number ZeroCounting to FiveOne-to-One CorrespondenceCombining Small Groups Within 5Addition Within 10Addition Within 20Two-Digit Addition Without RegroupingTwo-Digit Addition with RegroupingAddition Within 100Repeated Addition as MultiplicationMultiplication Facts Within 100Division as Equal SharingDivision as Grouping (Measurement Division)Division: Grouping (Repeated Subtraction) ModelDivision: Fair Sharing ModelDivision as Equal SharingDivision as GroupingBasic Division FactsDivision Facts Within 100Two-Digit by One-Digit DivisionDivision with RemaindersRemainders and Quotients in DivisionDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueReading and Writing DecimalsComparing and Ordering DecimalsAdding and Subtracting DecimalsMultiplying DecimalsDividing DecimalsDividing FractionsMixed Number ArithmeticOrder of OperationsInteger Order of OperationsVariable ExpressionsCombining Like TermsOne-Step EquationsTwo-Step EquationsSolving Multi-Step EquationsEquations with Variables on Both SidesLiteral EquationsSlope-Intercept FormPoint-Slope FormWriting Linear EquationsParallel and Perpendicular Line SlopesGraphing Linear EquationsPiecewise FunctionsStep FunctionsComposition of FunctionsInverse FunctionsRadical Functions and GraphsRational ExponentsExponential Functions and GraphsGeometric Sequences and SeriesSigma NotationExpected ValueLinear Regression in Machine LearningNeural Network Fundamentals

Longest path: 65 steps · 403 total prerequisite topics

Prerequisites (7)

Leads To (24)