FAQ
Questions readers have asked about the methodology page.
Why does the diagonal iteration beat Newton–Krylov, when the diagonal it preconditions with is exact, and diagonally preconditioned CG normally beats damped Jacobi on an SPD system?
The methodology page's inversion section puts Newton–Krylov two orders of magnitude behind the damped coordinate iteration. But the slopes preconditioning that iteration are the Laplacian's own diagonal. Diagonally preconditioned CG beats damped Jacobi on an SPD system, so the ordering should flip, unless one Jacobian–vector product costs a lot more than one sweep. Separately, the methodology hedges that the per-iteration slope isn't quite the exact derivative. Does that show up as bounded oscillation, or as growing error?
Wall clock vs. iteration count
PCG does win on iteration count. It loses on wall clock because
of what each iteration costs. The measurements are in
research/experiments/exp23_newton_cg, and Newton–Krylov
converges there only once several ingredients are in place.
Unpreconditioned CG on raw share residuals does not converge. Tiny-share coordinates are invisible to both the residual and the Jacobian, so the step goes into weakly determined tail directions: 387s without converging, vs. 3.7s for the production sweep at \(n=200\). Adding a diagonal preconditioner while keeping an only-approximately-symmetric Jacobian–vector product and no null-space projection diverges outright.
The version that converges solves a symmetrized log-residual Newton system. It uses the exact integration-by-parts Jacobian–vector product (genuinely symmetric), projects out the null vector, and preconditions PCG with the same own-log-slope diagonal the production sweep uses. On the easy case it reaches a residual an order of magnitude tighter than the diagonal iteration, at roughly sixty times the wall clock in the run below.
That run mixed a 257-point forward lattice with a 3,001-point JVP lattice, so it is not an equal-budget solver comparison:
| \(n=200\), easy case | time | residual | result |
|---|---|---|---|
| damped diagonal iteration | 0.5s | 9.2e-9 | converged |
| Newton–Krylov (symmetrized, preconditioned) | 29.7s | 9.6e-10 | converged |
The diagonal iteration's own-slope preconditioner is a byproduct of the forward pass it already has to run to get the shares, so it costs nothing extra. Each PCG iteration needs an exact Jacobian–vector product instead.
Since a CG iteration and a sweep both cost one pass over the tie edges, the comparison collapses to inner CG count times Newton steps against sweep count. Losing the clock while winning iterations puts the whole cost in that inner count, and it should split by regime. Jacobi on a Laplacian sets the count by the spectral gap, so if it's flat while sweeps grow with field size, the verdict flips before you reach a million. Does it move with field size across the exp23 variants?
Does the ratio move with field size?
The timings below compare a 257-point forward pass with a 3,001-point IBP JVP. The lattice-size ratio alone is 11.68, so these numbers do not establish an intrinsic 11.5–11.9× JVP overhead at fixed resolution. Timings depend on the machine and backend.
| \(n\) | forward pass | JVP (ibp) | ratio |
|---|---|---|---|
| 200 | 128.7 ms | 1479.7 ms | 11.5× |
| 800 | 507.8 ms | 5885.7 ms | 11.6× |
| 3,200 | 2038.4 ms | 23684.3 ms | 11.6× |
| 12,800 | 8122.5 ms | 96357.1 ms | 11.9× |
The benchmark script gives both operations an equal point
budget (the same requested points). The lattices
they realize still differ, so it logs each one's node count, grid
length and spacing.
Both operations are \(O(n)\) at fixed \(L\), but this table did not hold \(L\) equal between them. An equal-budget field-size and end-to-end solver rerun is needed before drawing a new wall-clock verdict. Equal resolution also does not establish equal numerical accuracy.
The sweep count doesn't move either, at least on the easy problem. Production Jacobi's iteration count, same problem family, same tolerance:
| \(n\) | 200 | 800 | 3,200 | 12,800 |
|---|---|---|---|---|
| sweeps | 19 | 18 | 23 | 23 |
That is consistent with the spectral-gap story: this correlation structure comes from a rank-2 factor model, so the tie-density graph's effective diameter doesn't grow with \(n\), and neither does the sweep count needed to converge.
In the same mixed-resolution experiment, the hybrid solver itself was not flat. At \(n=200\) it converges in 8 Newton steps and 15 total JVPs. Run unmodified on the same easy problem at \(n=3{,}200\), with the same 10-Newton-step, 5-inner-CG-iteration budget, it does not converge: 10 Newton steps, 20 JVPs, residual stuck at 2.4e-1 against a 1e-8 tolerance.
Wall clock at that size is 46.8s for production Jacobi and 515.6s for the hybrid, which is still short of tolerance. The timing gap alone does not isolate solver cost from resolution.
This run does not separate two explanations: the outer Newton
step count genuinely growing with \(n\), or the trust-region and
step-acceptance constants in run_newton_cg3.py being
tuned for \(n=200\) and not rescaled. The exp23 solver comparison
covers \(n=200\) only. At \(n=3{,}200\) the unmodified hybrid fails
to converge, so the flat-inner-count mechanism doesn't get a chance
to produce a flip here.
Bounded chatter or growing error
Because the diagonal iteration re-evaluates the field (and therefore the slope) every step, it is a fixed-point iteration, not a linearize-once-and-solve method. An inexact slope changes the rate of convergence, not where it converges to. The same reason makes Sinkhorn scaling converge under an approximate row/column normalization (the diagonal iteration is the hard-max analogue of that construction).
Write the tie-density Laplacian as \(L = D - W\), the diagonal and off-diagonal parts of the boundary-flux section's \(J = -B^\top W_e B\). Jacobi splitting for \(Lv = r\) has sweep matrix \(M = D^{-1}W\). Because \(L\)'s rows sum to zero, \(D^{-1}W\) is row-stochastic, so with the exact diagonal its spectrum sits in \([-1, 1]\). The top eigenvalue is exactly 1, on the all-ones (gauge) direction that inversion projects out anyway, matching the inversion section's remark that only ability contrasts are identified.
On the contrast subspace, an eigenvalue reaches \(-1\) only in the degenerate limit of a bipartite tie-density graph: two clusters of contestants whose photo-finishes are almost all cross-cluster and almost never within-cluster. That is a 2-dimensional race: two contestants, one edge, sweep matrix \([[0,1],[1,0]]\), spectrum exactly \(\{+1,-1\}\).
With the exact diagonal an undamped sweep can only chatter (period-2, bounded), never grow. An eigenvalue at −1 is a geometry fact about how bipartite the tie structure is, not a symptom of an inexact derivative. Growth needs the diagonal to be underestimated, which pushes a contrast eigenvalue past −1.
On exp23's hard case (strong correlation, a small-cluster structure close to the bipartite limit above), the production diagonal iteration run alone stalls at a fixed residual (1.1e-4) against its iteration cap rather than diverging. That is bounded behaviour, consistent with the geometry story above.
The same hard instance, run as the fallback sweep inside the symmetrized hybrid solver, does diverge (residual 6e+2) despite an accept-test meant to reject a step that makes things worse. That divergence isn't attributed to either story yet. The experiment's own README flags it as the next engineering item (Levenberg regularization and a fallback that's stable on the hard set).
Sources: the exp23 README for the \(n=200\) comparison; the field-size numbers above are run_field_size_scaling.py in the same directory, and issue #960 records the lattice-resolution difference between the two operations. The equilibrium notes give the Sinkhorn framing of the diagonal iteration as a fixed point.
Other questions about the methodology: open an issue on the repository.