RETRO.JL
REflective-bounds Trust-Region Optimizer
v0.0.1 · Julia
A high-performance, (nearly) allocation-free trust-region optimizer for
bound-constrained nonlinear problems in Julia.
Works with any AD backend via
DifferentiationInterface.jl.
I want to:
01
Start optimizing
Install Retro, define a problem, and get a solution in five minutes.
→ Quick Start 02Learn about the optimizer
A guided tour from gradient descent to a full trust-region reflective algorithm — concept by concept.
→ Algorithm Tutorial 03Contribute
Dive into the API reference, architecture notes, and cache design to start extending Retro.
→ API ReferenceA taste of Retro
using Retro, ForwardDiff
f(x) = 100*(x[2] - x[1]^2)^2 + (1 - x[1])^2 # Rosenbrock
prob = RetroProblem(f, [-1.2, 1.0], AutoForwardDiff();
lb = [-5.0, -5.0], ub = [5.0, 5.0])
result = optimize(prob)
result.x # ≈ [1.0, 1.0]
is_successful(result) # trueFeatures at a glance
| Feature | Details |
|---|---|
| Bound constraints | Coleman–Li reflective step with multiple reflections |
| Hessian strategies | BFGS (damped), SR1, Exact Hessian via AD |
| Subspace solvers | 2-D eigenvalue, Steihaug–Toint CG, full-space |
| TR solvers | Eigenvalue, or Cauchy |
| AD backends | Any backend via DifferentiationInterface (ForwardDiff, Enzyme, …) |
| Zero-allocation loops | Pre-allocated RetroCache workspace |
| Display modes | Silent(), Iteration(), Final(), Verbose() (with ProgressMeter) |
Acknowledgements
Retro.jl is heavily inspired by the fides optimizer in Python, as well as MATLAB's lsqnonlin optimizer.