Home › Companion pages › Quadratic Quasi-Newton

Quadratic Quasi-Newton

Standalone · optimization

A new optimization algorithm for smooth functions that interpolates between gradient descent and L-BFGS.

Open the interactive lab →

QQN Optimizer: A Smoother Path to the Bottom of the Hill

📄 Read the Academic Paper (PDF) — the complete mathematical foundation and theoretical analysis, for those who want the full derivation.

http://dx.doi.org/10.13140/RG.2.2.15200.19206

🚀 Implementations

QQN is available in three languages/frameworks — pick whichever fits your stack:


The Short Version

Optimization is the quiet engine underneath most of modern computing; it is how we teach machines to fit curves to data, how we train neural networks, and how we find the "best" answer among a vast space of possibilities. This project introduces QQN — the Quadratic-Quasi-Newton method — a new way of steering that search, along with a rigorous benchmarking framework built to test whether the idea actually holds up under scrutiny. (Spoiler: it turns out that it holds up rather well, but I'll get to the honest caveats in a moment.)

This document is written for the curious reader rather than the developer. If you want to know what QQN is, why it might matter, and who could find it useful — without wading through function signatures — you're in the right place.


A Little Background

Imagine you're standing somewhere on a foggy hillside, and your goal is to reach the lowest point in the valley. You can't see the whole landscape; you can only feel the slope beneath your feet. This is, in essence, what a numerical optimizer does. The "landscape" is a mathematical function — the error of a model, the cost of a design — and the "lowest point" is the answer we're hunting for.

Over the decades, two broad strategies have emerged for how to take each step:

  1. Gradient descent — the cautious hiker. Simply walk downhill in the direction of steepest descent. It is reliable and almost always makes progress, but it can be painfully slow, especially in long, narrow valleys where it zig-zags endlessly.
  2. Quasi-Newton methods (like L-BFGS) — the ambitious hiker. These build up a mental model of the curvature of the landscape and take clever, long strides toward where they believe the bottom lies. When the model is good, they're wonderfully fast; when the model is misleading, they can stride confidently in entirely the wrong direction.

For years, the practical question has been an awkward either/or: do you take the safe step or the bold one? Existing hybrid approaches typically choose between the two directions, or solve an expensive extra sub-problem to blend them.

The Idea Behind QQN

QQN sidesteps the either/or entirely. Instead of picking a direction, it draws a smooth, curved path that begins by heading in the safe (gradient) direction and gradually bends toward the bold (quasi-Newton) direction. Then it simply searches along that curve for the best place to stop.

The path itself is beautifully compact:

d(t) = t(1 - t)(-∇f) + t² d_LBFGS

You don't need to parse the algebra to appreciate the intuition. Think of it as a road that leaves your current position tangent to the safe downhill direction — so the very first thing it does is guarantee you're going downhill — and then curves toward the ambitious L-BFGS destination as you travel further along it. If the ambitious direction turns out to be nonsense, the curve gracefully keeps you near the safe path; if it's excellent, the curve carries you swiftly toward it.

Three properties make this appealing:

In short: it's a method that tries to be bold when boldness is warranted and cautious when it isn't — and it makes that decision automatically, through the geometry of the path rather than through a pile of tuning parameters.


The Benchmarking Framework — and Why It Matters

A new optimization idea is easy to propose and hard to trust. New methods have a long history of looking spectacular on the three problems their authors happened to try, then quietly disappointing everyone else. So a substantial part of this project — arguably the more laborious part — is the evaluation harness built to hold QQN honest.

The framework runs a genuine tournament:

The results are compiled automatically into readable reports (Markdown, LaTeX, CSV, and HTML), complete with convergence plots, performance profiles, and win/loss/tie matrices.

What the Numbers Say

Across more than 31,000 optimization runs, QQN variants won 36 of the 62 problems — a bit under 60%. They were especially strong on the smooth and moderately difficult problems, and remained competitive almost everywhere. In the interest of intellectual honesty (and this really is a strength worth owning), the picture is not one of universal dominance: Adam-style methods held their own on the neural-network and highly multimodal problems, and classic L-BFGS remained excellent on several convex and support-vector-machine tasks. Different tools still suit different terrain.

The headline, then, is not "QQN beats everything." It's something more useful: QQN is broadly robust, rarely embarrassed, and competitive across a strikingly wide range of problem types — while adding no tuning burden. That combination of reliability and simplicity is, I'd argue, exactly what a general-purpose optimizer should aspire to.


What You'd Actually See and Do

While QQN is at its heart a mathematical method, the project is organized around a simple experience: you point it at a problem (or a whole suite of them), let it run its tournament, and read the generated reports. The convergence plots let you watch the optimizers descend their respective hillsides — some plunging quickly, some zig-zagging, some stalling on a false floor. The comparison tables tell you, with statistical backing, which method reached the bottom, how quickly, and how often. It's meant to be as much an instrument for understanding optimizer behavior as a tool for running it.


Why It's Interesting

A few reasons this work is worth a look, even if you never run a line of it yourself:

Who Might Find It Useful


Learn More

For the complete mathematical derivation, the convergence analysis, and the full experimental write-up, see the accompanying paper:

📄 Download the Full Paper (PDF)

"Quadratic-Quasi-Newton Optimization: Combining Gradient and Quasi-Newton Directions Through Quadratic Interpolation"

Source Code & Ports


A closing note, in the spirit of honesty: this is research software and a research method. The results here are encouraging and, I think, genuinely interesting — but you should validate them against your own problems before trusting them with anything important. If you do try it, I'd love to hear how it goes. More soon, I hope.