~/writing/math-foundations-for-reasoning-models $ ls
XOR and the Need for Representation
Bridge to Calculus and Optimization
XOR motivates learning representations, which leads to calculus and optimization for adjusting model parameters.
~/writing/math-foundations-for-reasoning-models $ cat topic.md
Bridge To Calculus And Optimization
Where We Are
This chapter used XOR to expose the limit of one perceptron.
The progression was:
Boolean inputs -> XOR rule -> truth table -> 2D plot -> linear inseparability
Then we saw:
- why one perceptron fails
- why hidden representation helps
- why nonlinearity matters
- why multi-layer networks matter
XOR shows that representation can matter more than the final linear classifier.
What XOR Added
XOR added a new problem:
the data is simple, but the representation is not linearly separable
A single perceptron cannot solve it because it only creates one linear boundary.
To solve XOR, we need a transformed representation.
XOR turns the focus from decision boundary to representation.
Why Learning Becomes Harder
With one perceptron, learning adjusts:
weights
bias
With a multi-layer network, learning must adjust parameters across layers.
Those parameters affect hidden representations.
Changing one weight can change later outputs indirectly.
Learning representations creates a deeper parameter-adjustment problem.
Need For A Direction Of Improvement
If a network makes a wrong prediction, we need to know how to change its parameters.
Questions:
Which weight should change?
How much should it change?
Will the change reduce error?
These questions require a way to measure change.
That is where calculus begins to matter.
Calculus helps describe how outputs change when parameters change.
Need For Optimization
Optimization is about improving an objective.
In learning, the objective is usually to reduce error or loss.
Basic shape:
current parameters -> compute error -> adjust parameters -> lower error
This requires a method for searching through parameter space.
Optimization is the process of changing parameters to improve performance.
Why Calculus Comes Next
Calculus gives tools for understanding change.
Important questions:
How does output change as input changes?
How does loss change as weight changes?
Which direction reduces error fastest?
Those questions lead to derivatives and gradients.
Calculus gives the language of change needed for learning.
Why Optimization Comes After
Once change can be measured, optimization uses that information to update parameters.
Example idea:
gradient tells direction
optimizer takes a step
This is how later models learn weights across many layers.
Optimization uses calculus to improve model parameters.
Bridge Question
The next chapter begins with a simple question:
How do we measure change in a function?
That leads to:
- limits
- continuity
- derivatives
- gradients
- chain rule
- curvature
- convexity
These ideas prepare us for training neural networks.
XOR motivates representation; learning representations requires calculus and optimization.
Final Summary
- XOR shows the limit of one linear classifier.
- Solving XOR requires representation transformation.
- Multi-layer networks introduce hidden representations.
- Learning hidden representations requires parameter adjustment.
- Calculus describes how outputs and losses change.
- Optimization uses that change to improve parameters.
- The next chapter builds the calculus foundation for learning.
~/writing/math-foundations-for-reasoning-models $ open
Continue the series.
Function as Input-Output Machine