Least-Squares Graph Methods
- Least-squares graph is a family of formulations that leverages graph topology to structure the minimization of squared residuals across diverse applications.
- These methods exploit graph Laplacians, factor graphs, and consensus dynamics to achieve enhanced numerical efficiency, robustness, and scalability.
- They integrate classical ranking, sensor network calibration, and online signal estimation by enforcing local constraints and spectral properties within the graph.
Taken together, these works suggest that least-squares graph is best understood as a family of formulations in which least-squares estimation is organized by graph structure rather than as a single algorithm. In different settings, the graph may be a weighted, oriented graph carrying pairwise comparisons on edges, a comparison multigraph whose Laplacian determines ranking scores, a factor graph whose sparse Jacobian yields a sparse normal matrix, a communication graph over which nodes cooperatively solve an over-determined linear system, a survey network described by nodes and measurement edges, or a graph supporting time-varying signals and spectral filtering. Across these variants, the common operation is the minimization of squared residuals or weighted squared residuals, while the graph determines locality, sparsity, propagation, or gluing constraints (Hirani et al., 2010, Dong et al., 2019, Yang et al., 2018, Yan et al., 2024, Agbachi, 2018, Glass, 6 Mar 2026).
1. Graph structure as the organizing principle
A recurring feature of least-squares graph formulations is that the unknowns and the data inhabit different parts of a graph-derived object. In the ranking formulation on an oriented graph, the data are a 1-cochain on edges, while the unknown ranking is a 0-cochain on vertices, and the model is
with least-squares fit
In factor-graph optimization, by contrast, the graph indexes residual factors over subsets of variables on a manifold, and the objective is
which linearizes to
In distributed solvers for network linear equations, each node holds one row of an over-determined system and updates a local state by combining consensus terms with local least-squares gradients. In online graph signal estimation, the graph supplies a Laplacian eigenspace and the least-squares signal update is driven by the residual observed on sampled nodes (Hirani et al., 2010, Dong et al., 2019, Liu et al., 2018, Yan et al., 2024).
| Setting | Graph object | Canonical least-squares form |
|---|---|---|
| Ranking from pairwise comparisons | Weighted, oriented graph or comparison multigraph | ; |
| Robotics and vision | Factor graph | |
| Distributed linear equations | Communication graph | 0 with Laplacian-coupled dynamics |
| Online graph signals | Graph with Laplacian 1 | 2 |
This range of meanings matters because the word graph does not play a single role. In some formulations it is the domain on which data live; in others it is the sparsity pattern of a nonlinear least-squares problem; in yet others it is the communication substrate of a distributed algorithm or the combinatorial scaffold for topological gluing. A plausible implication is that the phrase denotes a methodological family unified by residual minimization and graph-induced structure rather than by one canonical matrix equation.
2. Ranking, Laplacians, and Hodge decomposition
The most classical graph-theoretic least-squares formulation in the supplied literature concerns ranking from pairwise comparisons. On a weighted, oriented graph treated as an oriented abstract simplicial 1-complex, the unknown ranking is a vertex potential and the observed comparisons are edge values. Exact consistency would require the edge data to be a gradient field; when signed sums around cycles do not vanish, one instead computes the least-squares projection onto 3. The normal equations are
4
where
5
is the graph Laplacian. This formulation reveals that ranking is a graph Laplacian problem and connects naturally to spectral graph theory, Hodge decomposition, KKT systems, and Betti numbers (Hirani et al., 2010).
The same idea appears in generalized tournaments with missing and multiple paired comparisons. There, one has objects 6, an additive paired comparison matrix 7, a symmetric matches matrix 8, and a score vector
9
The least-squares rating is defined by
0
with normalization
1
The first-order conditions yield the Laplacian system
2
so that
3
For a connected comparison multigraph,
4
The least-squares rating is unique if and only if the comparison multigraph is connected; equivalently, 5 is not block diagonal, the graph is connected, and the second-smallest Laplacian eigenvalue is positive (Csató, 2015).
A notable contribution of the generalized-tournament formulation is the iterative decomposition
6
with
7
where 8. This gives a graph interpretation in which direct scores are corrected by one-step, two-step, and higher-order indirect effects. To write the decomposition cleanly, the paper introduces a balanced comparison multigraph by attaching loops so that node 9 gets 0 loops. The iteration converges if the comparison graph is connected and not regular bipartite (Csató, 2015).
The Hodge-theoretic extension refines the residual further. When triangles are present, edge data admit the decomposition
1
where 2 is the global ranking signal, 3 captures local triangular inconsistency, and 4 captures topological inconsistency. In this view, least-squares graph ranking is not only a ranking method but also an inconsistency analysis on a simplicial complex, with
5
and 6 (Hirani et al., 2010).
3. Factor graphs, sparse nonlinear least squares, and robust graph-SLAM
In robotics and computer vision, least-squares graphs are most often factor graphs. miniSAM formulates the core problem on a manifold 7 as
8
with Mahalanobis norm
9
and after factorizing 0 and dropping the robust loss for simplicity,
1
Linearization around 2 gives
3
and, in stacked form,
4
The block sparsity of 5 and 6 follows directly from factor-graph locality: each factor touches only a small subset of variables (Dong et al., 2019).
The probabilistic interpretation is explicit. A factor graph is written as
7
and if each factor is Gaussian over its residual,
8
then MAP estimation is equivalent to minimizing a sum of squared residuals. miniSAM operationalizes this equivalence through a FactorGraph container, a Variables container, built-in PriorFactor and BetweenFactor, non-linear optimizers such as Levenberg–Marquardt, custom Factor subclasses with error() and optional jacobians(), and NumericalFactor for finite-difference derivatives. It includes built-in support for vector spaces and the Lie groups 9, 0, 1, 2, and 3, and supports sparse backends including Eigen’s simplicial LDLT, CHOLMOD, and a CUDA-enabled cuSOLVER Cholesky solver. In the reported benchmarks, CHOLMOD gives the best CPU performance among the tested options, whereas CUDA cuSOLVER is not competitive on small problems and suffers from a one-time launch overhead of about 350 ms; GPU sparse solving is therefore only attractive for sufficiently large problems in the current implementation (Dong et al., 2019).
Graph-based SLAM introduces a second theme: robustification of least squares without abandoning factor-graph machinery. AEROS starts from the standard graph-SLAM objective and replaces the fixed robust kernel or per-loop switch with a single continuous latent parameter 4 based on Barron’s general adaptive robust loss,
5
where 6 gives ordinary quadratic/L2 loss, 7 gives Cauchy-like loss, 8 gives Welsh/Leclerc-type behavior, and 9 gives pseudo-Huber / L1-L2 behavior. Using Black-Rangarajan duality, the robust penalty is written as
0
and the joint optimization becomes
1
Because the outlier-process term is nonnegative, it can be represented as a squared residual, making the whole construction compatible with Gaussian-factor solvers such as iSAM and iSAM2 (Ramezani et al., 2021).
The experimental protocol for AEROS uses synthetic 2D datasets Manhattan3500, CSAIL, INTEL, City10000, a synthetic 3D dataset Sphere2500, and the real 3D LiDAR dataset Newer College. The synthetic tests use 10 Monte Carlo trials per dataset with false loop closures injected at outlier ratios from 10% to 50%. The metric is Absolute Translation Error (ATE), and for Newer College the evaluation additionally uses Relative Translation Error (RTE) with Umeyama alignment. The reported pattern is that AEROS is stable across increasing outlier rates, is competitive with SC, DCS, GNC, and Geman-McClure (GM), and is especially strong on Newer College because it can softly absorb partially correct loop closures rather than forcing a binary inlier–outlier decision (Ramezani et al., 2021).
4. Distributed least squares over communication graphs
A different meaning of least-squares graph arises when the graph is a communication network. In the continuous-time formulation for network linear equations, each node knows only its local equation
2
and the global objective is
3
Each node maintains 4 and evolves according to
5
where the first term is consensus and the second is local descent. Under the step-size conditions
6
a fixed, connected graph and 7 yield convergence to the unique least-squares solution
8
The paper further gives explicit rates: for 9 the rate depends on the curvature ratio 0, and for 1 with 2 the average-state error decays as 3 (Liu et al., 2018).
The Arrow-Hurwicz-Uzawa formulation sharpens the graph dependence. For the constrained problem
4
with
5
the continuous-time primal-dual flow is
6
Here connectivity alone is not sufficient. The paper proves a necessary-and-sufficient graph/data compatibility criterion: for every Laplacian eigenvector 7, the set of row vectors 8 on its support must span 9; otherwise undamped oscillatory modes may remain. This condition explains why path and ring graphs can be favorable, while star graphs and complete graphs satisfy
0
so for 1 the sufficient condition generally fails (Liu et al., 2017).
The discrete-time Euler discretization preserves the same structure:
2
with stability threshold
3
For 4, node states converge exponentially to 5; for 6, divergence can occur. The same paper also reports a distinctive switching-graph phenomenon: sufficiently fast switching can lead to approximate least square solvers even if all graphs in the switching signal fail to do so individually (Liu et al., 2017).
A discrete gradient-tracking alternative achieves exact exponential convergence on connected undirected graphs and strongly connected directed graphs. For the undirected case,
7
8
with 9. The paper proves the exact threshold
0
which is both necessary and sufficient for exponential convergence. For strongly connected digraphs the corresponding push-pull method converges for sufficiently small 1. A separate finite-time mechanism reconstructs the exact least-squares solution from a single node’s local trajectory by detecting singularity in a Hankel matrix of state differences; in the reported 4-node examples, the finite-time solver recovers the exact solution in 16 time steps, whereas the plain iterative method needs around 300 steps to approach the solution numerically (Yang et al., 2018).
5. Matrix construction, large datasets, survey networks, and online graph signals
Least-squares graph methods also have a strongly computational interpretation. In polynomial curve fitting, the least-squares objective
2
leads to the normal-equation system
3
where 4 is built from sums of powers of the input 5-values and 6 from sums of 7. The paper’s contribution is a matricized formulation intended to expose parallelism: the costly part for large 8 is not the final 9 solve but the accumulation of the moment sums needed to build 00 and 01. The implementation uses CUDA on an NVIDIA Quadro 4000 GPU with 256 cores, reports speed-ups on the order of about 02 for datasets with thousands of points when compared with sequential execution on a conventional multi-core processor, and solves the system by Gaussian elimination rather than explicit inversion (Dasgupta, 2015).
That paper also makes the numerical-robustness issue explicit by comparing with MATLAB’s polyfit(), which uses a Vandermonde matrix 03 and QR factorization,
04
so that
05
The reported coefficients closely match polyfit() for linear, quadratic, and cubic fits, with correlation values around 06 to 07. For the sample cubic case, the summed squared errors are
08
and the paper therefore claims that the generated coefficients produce a best-fit curve according to the least-squares criterion (Dasgupta, 2015).
In Geomatics Engineering, least-squares graphs appear as survey networks. The adjustment model is
09
and after introducing approximate values 10,
11
Weighted least squares then minimizes
12
yielding the normal equations
13
and solution
14
with covariance
15
The network is viewed as a directed graph in which nodes are stations and edges are observed directions or measurements. The paper emphasizes cycle processing through Breadth First Search (BFS) and Depth First Search (DFS), preferring DFS because survey routes naturally follow depth-like progression and DFS has lower memory requirements. Its computational claim is that the manual stages of Collation, Classification, Data input, and Computation can be replaced by a frame-based and object-oriented workflow containing operations such as FormEquations and SolveForX (Agbachi, 2018).
Online graph signal estimation supplies a further computational extension. LMS-GNN considers noisy, partially observed graph signals
16
and uses the mean-squared objective
17
With residual
18
the LMS-style update is
19
Its deep version uses
20
On hourly temperatures from 21 U.S. weather stations over 22 time steps, with the first 24 used for training, an 8-nearest neighbors graph, and Gaussian noise variance 23, LMS-GNN achieves the best reported Spatial MSE and Spectral MAE among GLMS, GNLMS, GCN, and STGCN. For example, the Spatial MSE at 24 is 25 for LMS-GNN versus 26, 27, 28, and 29 for GLMS, GNLMS, GCN, and STGCN, respectively (Yan et al., 2024).
6. Random-walk, geometric, and homotopy-theoretic extensions
A more recent reinterpretation recasts least squares as a cumulative graphical process. For equally spaced samples 30, define the mean-centered cumulative sum
31
which produces a pinned data walk satisfying 32. The signed area under the walk is
33
For uniformly spaced design points
34
the paper proves that the slope which annuls the net signed area under the residual data walk is exactly the ordinary least-squares slope. In its notation,
35
and this coincides with the conventional LLS formula for equally spaced samples. The result is exact for arbitrary distributions of steps; for non-uniform sampling it is approximate rather than exact (Kostinski et al., 26 Mar 2025).
A separate geometric line of work, while not graph-theoretic in the combinatorial sense, gives an adjacent interpretation of least-squares line fitting through covariance geometry. When both variables have all equal uncorrelated errors, the least-squares fit minimizes the sum of squared perpendicular distances to a line, and the best-fit direction is the principal component direction of maximal variance of the data cloud. In angle form, the fit satisfies
36
with closed-form uncertainty formulas for 37, 38, slope, and intercept. This perspective is important because it isolates a regime in which least-squares line fitting reduces to a covariance-matrix eigenproblem (Petrolini, 2011).
The most abstract extension in the supplied literature is homotopy-theoretic least squares regression. There, weighted finite datasets form a category 39, each object carries a Koszul complex built from the least-squares normal equations, and the zeroth homology
40
recovers the coordinate ring of the least-squares solution locus. To compare local least-squares solutions on overlapping subsets, the paper linearizes near chosen solutions by passing to
41
and restores functoriality by translation maps
42
Evaluating the resulting presheaf on a cover yields a Čech-Koszul bicomplex in which degree-0 cocycles are local least-squares solutions, degree-1 terms are homotopies on overlaps, and higher-degree terms are higher coherences. The paper explicitly states that the resulting “least-squares graph” has local LS solutions as vertices and edges or higher simplices encoding discrepancies between them via chain homotopies (Glass, 6 Mar 2026).
This broad set of formulations shows that least-squares graph methods range from classical Laplacian ranking and sparse factor-graph optimization to distributed consensus solvers, adaptive graph filters, random-walk reformulations, and homotopical gluing constructions. A plausible implication is that the enduring role of graph structure is not merely representational: it determines what counts as locality, which residuals may be coupled, how inconsistency propagates, and which computational methods—QR, Gaussian elimination, sparse Cholesky, CUDA parallelism, DFS/BFS cycle processing, or distributed gradient tracking—are natural for the least-squares problem at hand.