# Correction-aware tree optimizer MVP ## Mechanism verification The toy problem is a four-node scalar tree `0 -> {1,2}`, `1 -> 3`. For each edge, `delta_s_i = rho * (u_i-u_parent)`, and the parent correction is the negative sum of its children's dual increments. | Prediction | Predicted | Observed | |---|---:|---:| | Correction conservation error for rho = 0.01, 0.1, 0.4, 0.9 | 0 | `[0, 0, 0, 0]` | | Correction norm ratios for rho = 0.05, 0.10, 0.20, 0.40 | `[1,2,4,8]` | `[1, 2.0000000000000004, 4.000000000000001, 8.000000000000002]` | | Stale-dual error versus rho | linear, zero intercept | slope `0.9219544457`, intercept `2.8e-17` | Thus the core bookkeeping mechanism manifests numerically: the redistributed correction exactly cancels the parent aggregation error, and its magnitude scales linearly with the dual step size. ## Mini-experiment Fixed scalar quadratic local objectives, 160 rounds, `rho=0.2`, `eta=0.16`, penalty `0.8`: | Method | Final objective | Final consensus residual | Toy communicated bytes | |---|---:|---:|---:| | Corrected tree | 6.0937499891 | 3.23e-9 | 7680 | | Uncorrected tree | 6.0937499974 | 7.65e-10 | 7680 | | FedAvg | 6.0937500000 | 0 | 10240 | The corrected and uncorrected methods converge to the same objective in this convex toy, so there is no demonstrated final-loss improvement. At round 40, corrected loss was `6.10348` versus `6.09493` for the uncorrected tree at `rho=0.2`; therefore correction is not uniformly better in this particular synchronous Jacobi discretization. The tree uses fewer toy bytes than FedAvg because it communicates along three edges rather than all worker-root links, but this is not a full systems benchmark. ## Reproduce ```bash /home/maxwelhelp/main/bin/python3 tree_optimizer_experiment.py ``` Outputs are written to `results.json`. ## Limitations This is a scalar quadratic proxy, not logistic regression or an MLP; it does not model network latency, asynchronous execution, minibatch noise, GPU placement, or realistic parameter-block bandwidth. The correction identity is tested exactly, while optimizer quality is only a small sanity experiment.