Level 2 project
Neural Network From Scratch
Start from the canonical project files, validate the result, and keep the evidence you need to explain what you built.
Start here
Launch lesson: Neural Network Debugging Workshop
Prerequisite project: Trustworthy ML: Compare Models Without Cheating
Goal
Starting from the provided scaffold, make a small XOR network learn by implementing the missing backward/update logic. Then use evidence to debug one intentional failure.
Task
network.pywith a two-layer forward pass and your backward/update implementation.train.pythat produces a reproducible training record.- A short
REPORT.mdthat includes:
- the shape of every parameter and activation;
- starting and ending loss;
- final XOR predictions;
- one gradient check or hand-derived gradient check;
- one intentional failure, the evidence you observed, and the fix;
- one paragraph explaining why nonlinearity is required.
- The output from the submission checker.
Validation
Run these commands from the downloaded Project folder or the public materials repository root.
python projects/tests/l02/check_submission.py projects/starters/l02Rubric
Total: 100 points. The project measures the Level 2 exit skills directly.
| Criterion | Points | Observable evidence |
|---|---|---|
| Functional network | 25 | Two-layer NumPy network runs, preserves required shapes, reduces loss, and predicts XOR correctly under the documented seed/configuration. |
| Shapes and forward reasoning | 15 | Report names parameter/activation shapes and explains the forward path without relying on a framework abstraction. |
| Backpropagation and gradient reasoning | 20 | Backward implementation has gradients matching parameter shapes; report explains the chain from loss to parameters and includes a hand or finite-difference check. |
| Training choices | 10 | Learner explains batch choice, learning rate, and update rule; changes are reproducible. |
| Debugging | 15 | Learner creates the approved large-learning-rate failure or an equivalent intentional failure, records evidence, forms a hypothesis, fixes it, and verifies the result. |
| Evaluation and regularization reasoning | 5 | Learner distinguishes training objective from generalization and identifies one sensible way to detect or reduce overfitting. |
| Reproducibility | 5 | Seed/configuration are recorded; project runs from a clean start; checker output is included. |
| Communication | 5 | Explanation is clear, uses the learner's own words, and connects nonlinearity, gradients, and training evidence. |
Performance anchors
Full credit
The implementation works and the explanations make cause and effect traceable. Debugging evidence shows the learner can locate a failure rather than only copy a fix.
Partial credit
The network mostly works but one exit skill is weak—for example, shapes are correct but gradient reasoning is vague, or the failure is repaired without showing evidence.
Insufficient
The submission relies on a high-level trainer/framework to hide the first-principles work, changes the canonical task, cannot reproduce its result, or presents only final predictions without explaining computation and debugging.