Anderson Mixing Chooses Weights from Vector Residuals
2026-11-26

Anderson Mixing Chooses Weights from Vector Residuals

Anderson Mixing uses information from several recent vector iterates rather than simply applying a fixed-point map to the newest vector. For an offline numerical model associated with measurement or manufacturing, the important question is what the mixing weights minimize. A short two-channel example shows both the benefit and the distinction between a combined residual and the residual actually evaluated at the next iterate.

Define the fixed-point map and its vector residual

Let g map a real vector to another vector of the same dimension. A fixed point satisfies x equal to g(x). Define the residual f(x) as g(x) minus x, so a fixed point has zero residual in every component.

The Walker and Ni original analysis states an Anderson algorithm that stores recent residual columns, chooses coefficients whose sum is one, and minimizes the Euclidean norm of their weighted residual sum. In its unrelaxed form, the next iterate is the same weighted sum of the corresponding mapped vectors g(x).

The coefficient constraint makes the combination affine. It does not require the coefficients to be nonnegative. Consequently, mixing here is not necessarily a convex average that remains between the previous iterates.

This discussion uses only two stored iterates and no extra relaxation. It is not an instruction for selecting memory length, convergence tolerances or damping in an actual engineering solver.

residualcolumns f=g-x min2normFalpha sumalpha1 thenmappedxnext.
Original vector mixing explanation. Source: Zhilianhai editorial desk, original AI-assisted conceptual illustration.

Two invented channels give an exact coefficient calculation

Choose the fictional affine map whose first component is one plus one half of the first input, and whose second component is one plus one quarter of the second input. Starting from the zero vector gives x zero equal to zero, zero, and x one equal to one, one.

The residuals are f zero equal to one, one, and f one equal to one half, one quarter. Write the coefficient of the first residual as a and that of the second as one minus a.

The residual combination is therefore one half plus one half a in the first component, and one quarter plus three quarters a in the second. Minimize its squared Euclidean norm by differentiating this quadratic with respect to a.

The result is a equal to negative seven thirteenths, while the second weight is twenty thirteenths. The combination of residuals becomes three thirteenths, negative two thirteenths. Its norm is the square root of thirteen divided by thirteen, approximately 0.277350.

The negative first weight is essential to this unconstrained affine least-squares solution. Replacing it by zero and renormalizing the remaining weight would solve a different problem.

The new iterate requires a fresh residual evaluation

The mapped vectors are g(x zero) equal to one, one, and g(x one) equal to one and a half, one and a quarter. Mixing those with the calculated weights gives the next iterate twenty-three thirteenths, eighteen thirteenths.

Evaluating the actual map at that new point gives a new residual of three twenty-sixths, negative one twenty-sixth. Its norm is the square root of ten divided by twenty-six, approximately 0.121626.

This differs from the minimized combination's norm. For an affine map, the residual at the affine combination of the old iterates equals the combined old residual. The algorithm then applies the map to that combination, which produces the new iterate and changes the residual again.

For comparison, an ordinary next fixed-point step from one, one would give one and a half, one and a quarter. Its residual is one quarter, one sixteenth, with norm approximately 0.257694. The mixed step has the smaller actual residual in this particular example; it has not reached the exact fixed point two, four thirds.

gdiag.5.25 x11 f0=11 f1=.5.25 weights-7/13 20/13 next23/13,18/13 residual3/26,-1/26.
Original synthetic two-channel arithmetic. Source: Zhilianhai editorial desk, original AI-assisted conceptual illustration.

History quality and implementation choices still matter

The official SciPy Anderson interface describes an extended Anderson root finder with retained vectors, regularization and line-search options. Those practical choices mean its complete iteration should not be assumed identical to the bare constrained calculation shown here. That interface was not run for this example.

If residual columns become nearly dependent, the least-squares weights can become sensitive to rounding or grow large. Retaining more columns does not by itself establish a better conditioned calculation. A small step is also not a substitute for checking the residual of the original problem.

For nonlinear maps, an affine combination of residuals is generally not the residual at the combined point. A reduction in the inner least-squares objective therefore cannot be read as an unconditional reduction of the next true residual.

Keep the map, residual sign, stored iterates, norm, affine constraint and actual next evaluation together in a numerical record. Related material appears in computational model principles and technical calculation notes. Both original figures depict invented two-dimensional arithmetic, without measured solver speed, a convergence guarantee or a real robot-control setting.

18028484626 CONTACT US

公司:智联海(惠州)科技有限公司

地址:惠州仲恺高新区陈江街道白云山工业大道 5 号六楼 601

Q Q:18028484626

Copyright © 2002-2026

咨询 在线留言 电话:18028484626
微信 微信扫码添加我