Backtracking across a network
The stepsize a first-order method is allowed to take is dictated by constants (Lipschitz constants of the gradient and of the constraints, bounds on dual variables) that are seldom known and, when known, are worst-case. On one machine a line search removes the need for them. On a network of agents who each hold part of the problem and talk only to their neighbors, a line search is not local: the agents share a momentum parameter, and a stepsize one agent rejects changes the step every other agent must take. This page runs D-APDB, the decentralized accelerated primal–dual method with backtracking of Xu, Aybat and Gürbüzbalaban (J. Nonlinear Var. Anal., 2026; arXiv:2512.07085), on a small constrained consensus problem in the plane, where every agent, every constraint and every stepsize can be watched. For reference it also runs the same iteration with the fixed stepsizes the paper’s analysis certifies from the constants, and with D-APDB’s initial stepsize left untested.
What is being computed
The problem. agents sit on a connected undirected graph , a random cycle through all agents with further random edges, so , as in the paper’s experiments. Agent privately holds a smooth convex loss, a simple set, and one constraint:
with . The network has to solve
every agent ending with the same solution , although no agent sees another agent’s loss or constraint. In the plane the data can be drawn: is the minimizer of agent ’s own loss (the marks), is the interior of an ellipse, and the feasible region is the intersection of the ellipses. The instances are built so that the losses pull in roughly one direction and lies on the boundary of the feasible region, with one constraint active. With constraints: none the ellipses are dropped and the problem is the composite consensus problem of the paper’s Algorithm 2. The reference solution , and the multipliers are computed by a log-barrier interior-point method on the centralized problem, to high accuracy.
Instance generator. with a uniformly random rotation , uniform in , and , uniform in , where is the curvature spread: the agents’ smoothness constants range over a factor around . The minimizers with , uniform in and within rad of a direction common to the instance. has a uniformly random orientation and eigenvalues uniform in (semi-axes between 2.2 and 4.1); its center is within of in each coordinate, so is a Slater point. Starting points are uniform in , independently for each agent, and . New instance redraws everything.
The iteration. Agent keeps a copy of the decision variable, a multiplier for its own constraint, a vector that encodes the multipliers of the consensus constraints , (the paper shows that the agents never need these multipliers themselves), and its stepsize . From its neighbors it needs only the vector
the pull of its constraint and of its neighbors on . Given a trial stepsize and a momentum factor , the step is
where the prox of the box indicator is the projection onto the box, the dual stepsize is with a fixed , and is a bound on the optimal multiplier (the paper’s bounded-dual-domain assumption). This is the step of the accelerated primal–dual method of Hamedani and Aybat, with the consensus multipliers updated before the primal step rather than after it; the paper makes this change so that every quantity in an agent’s test is final when the test is run. D-APDB and the two fixed-step methods below all take exactly this step and differ only in how and are chosen.
D-APDB (distributed accelerated primal–dual method with backtracking) starts every agent from an initial stepsize and runs each iteration in two phases.
Local line search. Agent tries with the local momentum , computes the candidate above, and accepts it if
with , , and user constants with ; otherwise it sets and tries again. (The paper writes the coefficients of through auxiliary sequences , , and so on; with those definitions the coefficients collapse to the ones shown.) Term by term, the test is the paper’s sufficient condition for a safe stepsize with every global constant replaced by its local counterpart: the first two terms require where is the curvature of along the step actually taken (for a quadratic, ), the fourth term involves the gradient of the constraint at the point reached rather than its maximum over the domain, and the last term involves the actual change of that gradient times the multiplier in hand rather than a Lipschitz constant times a dual bound. Nothing in the test is a global constant.
Synchronization. The network computes one scalar, , by max-consensus, and every agent sets , so the stepsizes never increase and all shrink by the same factor; it then updates
with and . If , every agent recomputes with and (for the agent that set the maximum this reproduces its accepted candidate); otherwise the candidates are kept. Each agent then exchanges with its neighbors and forms . The communication per iteration is one vector exchange with the neighbors and one max-consensus of a scalar. Without constraints (, ) the test reduces to and the method is D-APDB-0, Algorithm 2. On this page , and , as in the paper’s experiments; the chips set the shrink factor and the start , either one value for every agent or, as in the paper’s experiments, twenty times each agent’s safe stepsize defined next.
The safe stepsizes, and the two fixed-step runs. The paper proves (its sufficient condition for the line search) that agent ’s test passes for every , where
in terms of the smoothness constant , the Lipschitz constant of , the bound over the whole box, and the dual bound (for the paper takes ). Since stepsizes only decrease by the factor and only when a test fails, no stepsize ever falls below , and the number of trials agent rejects over the whole run is at most .
D-APD, the benchmark of the paper, is the same iteration with , and from the same formula with : the fixed stepsizes the analysis certifies as safe, which require every constant above. Here the agents are given , and exactly, and compute the way one would in practice, from the Slater point and weak duality: since every , . D-APDB uses the same , but only as the radius of the projection of , where a loose bound leaves the iterates untouched; in a loose bound shrinks the step. The third run, fixed , no test, takes D-APDB’s initial stepsize, with D-APDB’s , and never tests it.
How to read the comparison. D-APD is not a competitor on equal terms: it is handed the constants, and D-APDB is not. The paper’s claim is that D-APDB keeps D-APD’s guarantees without that information, at the price of a bounded number of extra trials and one max-consensus per iteration, and that in the paper’s experiments (twenty-dimensional QCQPs and SVM training on twelve agents) it converges faster because the safe stepsizes are far below what the local tests accept. The plane is a different regime: with two coordinates and a modest box the safe stepsizes are only a few times too small, so the speed comparison at the end of a run can go either way, for a reason the panels make visible (experiment 4 below). What the page is for is to see the mechanism: when the tests fail, what the stepsizes settle on relative to the safe values, what the synchronization costs, and why the untested start is not an option.
The measures. For the network average the panels plot, on logarithmic axes, the three quantities of the paper’s experiments: the relative suboptimality with (the iterates stay in the box, so the indicators contribute nothing), the consensus error , and the constraint violation , shown unnormalized because can be feasible here (the paper divides by the initial violation and plots of the suboptimality). The paper’s guarantee (its main theorem) concerns the weighted ergodic averages with , : for any initial stepsizes ,
where is an optimal multiplier of the consensus constraints and measures the disagreement across edges; moreover the iterates converge to a primal–dual solution. The panels show the last iterates, not the ergodic averages, as the paper’s experiments do, so the curves are not bound to lie under a line; the dotted guide of slope only shows the scale of the guaranteed rate.
The page opens with twelve agents, ellipse constraints, the box , and D-APDB started from for every agent, with no constants. Six experiments, in order:
- Watch the test fire once. Press Play. In panel A the agents first head for their own minimizers (+), then the network’s edges shorten as the consensus multipliers build up, and the cloud converges to on the boundary of the feasible region. In panel B a single triangle at marks the only failed test: the common stepsize drops from 1 to about 0.2, three to five times the dashed safe values, and is never cut again; the table counts a handful of extra trial steps in 3,000 iterations. That is the entire cost of the line search on this instance, paid at the first iteration. The failure is in the constraint terms of the test, not the curvature term: for the agents whose trial point lies outside their own ellipse, the primal–dual product at is far above , the local form of the condition behind , while the curvature term alone would have accepted a stepsize of 1.
- Why the test is needed. Switch the agents drawn to no test. The same stepsize with no test looks healthy for some 900 iterations, until the active constraint’s multiplier has built up; then the primal–dual coupling is unstable at this stepsize, the agents fly apart to the walls of the box, the active multiplier jumps to its bound, and the consensus error climbs by four orders of magnitude and never recovers. The test detected this at iteration 0, from local quantities, nine hundred iterations before any symptom.
- What the safe stepsizes pay for. Step the box through 5, 10, 20. The dashed lines in panel B fall (their medians are about 0.10, 0.05, 0.025), because is a bound over the whole box, and D-APD’s curves slow down accordingly; D-APDB’s stepsize and curves do not move, because its test only sees the points the agents visit. The paper’s twenty-dimensional experiments are the extreme of this effect.
- Early and late, and the role of . With the default start D-APDB leads D-APD over the first few hundred iterations, in almost every instance, and D-APD ends ahead in most. Now set the start to 0.3: D-APDB ends at the same stepsize, about 0.2, but finishes well ahead of D-APD; set it to 3 or 10 and it stalls. The test finds the same primal stepsize from any start; what changes is , the consensus stepsize, which the algorithm fixes from the initial guess and never revisits. The end-of-run ranking on this problem is decided by that consensus stepsize, not by the line search. In the method as analyzed, an optimistic guess is corrected in the primal step but remembered in the consensus step.
- What the synchronization costs. Set constraints: none, the start to 10 and the spread to ×100. Now the tests fail at several scattered iterations (the triangles), each time because some agent’s step turns into its stiff direction, and every failure cuts every agent. Compare the start , under which the agents’ stepsizes are cut once and stay in proportion to their own curvatures, with the common start, under which every agent ends at the stiffest agent’s value. The single shared is what keeps the paper’s analysis intact; its price is that the most conservative agent sets the pace for all.
- The shrink factor, and new instances. Set to 0.5: the first iteration needs two or three trials instead of eight, but the stepsize lands at about 0.125 instead of 0.2, since a coarse search overshoots by up to the factor . Then press new instance a few times: the number of failed tests, the ratio of the final stepsizes to the safe ones, and the early lead persist across instances, while the end-of-run comparison with D-APD depends on the instance and, as experiment 4 shows, on the start.
12 agents on a small-world network with 24 edges, each with its own quadratic loss and its own ellipse constraint, projecting onto the box [−10, 10]²
a line of slope −1 is the paper’s O(1/k) rate for the averaged iterates
Left: the agents’ ellipses, whose intersection is the feasible region (shaded), level sets of the total loss Σᵢ fᵢ around its unconstrained minimizer (the small hollow dot), each agent’s own minimizer (+), and the agents’ iterates xᵢᵏ (dots, with their trails) linked by the edges of the network; the larger ring is the average x̄ᵏ and × the solution. Right: the three measures of the paper for x̄ᵏ, for every method shown. Switch the agents drawn to no test to see what the optimistic start does without the backtracking test.
Left: the stepsize of each of the 12 agents under D-APDB, which can only decrease, and does so exactly when some agent’s test fails (the triangles); the dashed lines are the safe stepsizes τ̂ᵢ that D-APD uses throughout, which the theory guarantees the line search never goes below by more than the factor ρ. Right: how many candidate steps the agents computed at each iteration, on average; one means the first trial passed.
| Method | τᵢ at the end | backtracking | suboptimality | consensus | violation |
|---|---|---|---|---|---|
| D-APDB (backtracking) | 0.21 from 1.0 | 1× at k = 0; 3,007 trial steps per agent | 7.8e-4 | 3.4e-8 | 6.8e-4 |
| D-APD, safe steps τ̂ᵢ | 3.9e-2 – 6.4e-2 | — | 6.9e-5 | 4.6e-8 | 0 |
| Fixed τ̄, no test | 1.0 | — | 11 | 11 | 0 |
All rows run the same primal–dual iteration (defined above the playground) for 3,000 iterations from the same starting points; they differ only in how the stepsizes are chosen. The safe stepsizes τ̂ᵢ of D-APD are 3.9e-2 – 6.4e-2 here, computed from each agent’s smoothness constant, the Lipschitz constant and the bound Cgᵢ of its constraint’s gradient over the box, and the dual bound Bᵢ = 6.5 – 6.8 from a Slater point. The last three columns are the paper’s measures at the final iteration, for the network average x̄. A “trial step” is one candidate update, accepted or not; D-APDB’s trial steps beyond the 3,000 iterations are the price of the line search.
Each agent can test its own step against what it sees locally, and one shared number, the largest of the resulting shrink factors, is enough to keep the network’s primal–dual iteration consistent. The price is one max-consensus per iteration and a bounded number of extra trials; what is bought is a method with the paper’s O(1/K) guarantees and no Lipschitz constant or dual bound to know in advance.
The method and its analysis are in An accelerated primal–dual algorithm with backtracking for decentralized constrained optimization by Qiushui Xu, Necdet Serhat Aybat and Mert Gürbüzbalaban (Journal of Nonlinear and Variational Analysis 10(3), 2026, in the special issue in honor of Yurii Nesterov; arXiv:2512.07085): the reordering of the primal–dual updates that makes a local test possible, the test itself, the max-consensus synchronization of the momentum, the O(1/K) rates for suboptimality, infeasibility and consensus with the number of trials bounded, the convergence of the iterates, and experiments on QCQPs and SVM training on a network of twelve agents. The note A line search without a leader walks through the ideas; the wider thread is on the research page.
To reference this page:
@misc{gurbuzbalaban2026backtrackingplayground,
title = {Backtracking across a network, interactively},
author = {G{\"u}rb{\"u}zbalaban, Mert},
year = {2026},
howpublished = {\url{https://mert-g.org/playground/backtracking/}}
}