Projects/Foundations/Multivariable Taylor models and trust-region quadratic approximations — real-data stress test
Level 1 · foundational · ~7 h
Multivariable Taylor models and trust-region quadratic approximations — real-data stress test
Build second-order Taylor models of the Rosenbrock and Beale functions and check where the quadratic model predicts descent within a trust region. Repeat on a real dataset, report a table with confidence intervals over three trials, and explain which assumption broke.
Prerequisites
Problem statement
- 01Build second-order Taylor models of the Rosenbrock and Beale functions and check where the quadratic model predicts descent within a trust region. Repeat on a real dataset, report a table with confidence intervals over three trials, and explain which assumption broke.
Real-world motivation
- 01Taylor models determine when a step is trustworthy; their breakdown predicts optimizer failure. The real-data stress test setting forces concrete choices about data, scale and evaluation.
Learning objectives
- 01Derive analytic gradients and Hessians
- 02Build the local quadratic model
- 03Test model fidelity over a radius sweep
- 04Report wall-clock seconds on one pinned CPU core alongside the baseline metrics.
Technical architecture
- 01analytic autodiff-free derivatives
- 02quadratic model evaluator
- 03trust-region radius controller
Mathematical foundations
- 01$m_k(p)=f_k+g_k^\top p+\tfrac12 p^\top H_k p$
- 02Taylor remainder $O(\lVert p\rVert^3)$
Dataset and sources
- 01MNIST 70k subset
- 02UCI Sparse Matrix collection
Step-by-step tasks
- 01Frame the task and freeze the real-data stress test evaluation protocol with a fixed random seed.
- 02Implementation 1: Implement f, g, H by sympy then lambdify
- 03Implementation 2: Sample 1000 random steps per radius
- 04Implementation 3: Plot predicted versus actual reduction
- 05Verification 1: Check Hessian against finite differences
- 06Verification 2: Verify model matches f at p=0
- 07Run the ablation grid and report wall-clock seconds on one pinned CPU core over three independent trials.
Implementation requirements
- 01Implement f, g, H by sympy then lambdify
- 02Sample 1000 random steps per radius
- 03Plot predicted versus actual reduction
- 04Log all hyperparameters and the random seed for the real-data stress test run.
Testing requirements
- 01Check Hessian against finite differences
- 02Verify model matches f at p=0
- 03Measure wall-clock seconds on one pinned CPU core over at least three seeds.
Evaluation metrics
- 01model error
- 02fraction of steps with correct sign
- 03radius where model fails
- 04wall-clock seconds on one pinned CPU core
Expected outputs
- 01model-fidelity plot
- 02Hessian eigenvalue trace
Common failure modes
- 01indefinite Hessians make the model unbounded below
- 02large radius violates the Taylor regime
- 03real data violates the synthetic noise model and the baseline overfits
Stretch goals
- 01implement a dogleg trust-region step
- 02compare with Gauss-Newton approximations
- 03profile the method with cProfile and report the dominant kernel
Research extensions
- 01derive a radius selection rule from the Lipschitz constant
- 02study model fidelity near saddles
GitHub submission requirements
- 01A repository whose README states the real-data stress test protocol and the exact command to reproduce it.
- 02Source for the scratch implementation, a test file, and a results table with uncertainty estimates.
- 03A two-page report explaining failures on MNIST 70k subset and what the ablation revealed.
Completion rubric
- 01analytic derivatives correct
- 02fidelity sweep performed
- 03failure region explained
- 04Extra credit: profile the method with cProfile and report the dominant kernel
Submit when every rubric item is satisfied and your repository contains runnable code plus a reproduction command.