Dual-Stream Least Squares
- Dual-Stream Least Squares is a design principle that couples two complementary channels within least-squares frameworks to achieve enhanced alignment, stability, personalization, or quasi-optimal approximation.
- Key methodologies include spatially adaptive rigid moving least squares for image stitching, primal–dual and streamline-aware formulations for PDEs, and operator–adjoint coupling for hyperbolic transport problems.
- The approach extends to personalized federated learning and machine learning, where dual streams are used to separately capture global features and local refinements, ensuring efficient and robust performance.
Dual-Stream Least Squares denotes a family of least-squares constructions in which two coupled information channels are fitted jointly. Across the cited literature, those channels are defined in technically different ways: two image streams from a dual-fisheye camera; a primal variable and a dual variable together with explicit streamline control in a first-order system least-squares formulation; a hyperbolic operator and its adjoint in -based approximation; a shared global stream and a client-specific refinement stream in personalized federated learning; or a primal trial variable paired with dual test variables that realize dual norms in a minimax formulation (Ho et al., 2017, Cai et al., 2023, Kalchev et al., 2020, Fan et al., 14 Aug 2025, Monsuur et al., 2024). This suggests that the term is best understood as a structural pattern rather than a single canonical algorithm: least-squares coupling of two complementary streams to recover alignment, stability, personalization, or quasi-optimal approximation.
1. Semantic scope and recurring structure
The cited works use “Dual-Stream Least Squares” in several precise senses. In dual-fisheye video stitching, the two streams are the left and right unwarped equirectangular images, with a position-dependent least-squares warp aligning one stream to the other near narrow overlap bands (Ho et al., 2017). In convection-dominated diffusion-reaction, the method is “Dual-Stream” both because it is primal–dual in the variables and because the analysis norm explicitly controls the streamline derivative through mesh-dependent weights tied to local Péclet numbers (Cai et al., 2023). In scalar linear hyperbolic problems, the two streams are the primal residual and the adjoint stream built from and , which reconstructs control (Kalchev et al., 2020). In personalized federated learning, the streams are a shared primary stream for collective generalization and a dedicated refinement stream for local personalization (Fan et al., 14 Aug 2025). In quasi-optimal least squares for PDEs with inhomogeneous boundary data, the streams are a primal approximation and dual test variables realizing dual norms for interior and boundary residuals (Monsuur et al., 2024).
| Setting | Two streams | Core least-squares role |
|---|---|---|
| Dual-fisheye stitching | Left/right image streams | Spatially adaptive rigid MLS alignment |
| Convection–diffusion–reaction | Primal–dual and streamline derivative control | 0-robust coercivity and adaptive refinement |
| Hyperbolic transport | 1 and 2 | 3-targeted approximation via 4 |
| Personalized federated learning | Shared primary and local refinement heads | Analytic generalization plus personalization |
| QOLS for PDEs | Primal trial and dual supremizer variables | Dual-norm residual minimization without fractional boundary norms |
A common source of confusion is to treat the phrase as naming one standardized method. The literature instead assigns the phrase to a family of least-squares architectures in which “dual” may mean two data streams, primal–dual variables, primal–adjoint coupling, global–local decomposition, or primal–dual minimax structure. The unifying feature is not a shared application domain, but a repeated design principle: two complementary channels are coupled so that least-squares minimization acquires a property that a single-stream construction would not provide as directly.
2. Dual-fisheye image streams and rigid moving least squares
In 360-degree video stitching for dual-fisheye cameras, the input consists of two image streams from a dual-fisheye lens camera with limited overlap. Each lens has roughly 5 FOV. After radiometric compensation and fisheye-to-equirectangular unwarping, the right lens image is placed at the center of the 6 equirectangular canvas, and the left lens image is split to the two sides. The overlapping regions are narrow vertical bands around the stitching boundaries. The central difficulty is that conventional global parametric warps estimated in a least-squares sense tend to align the center well but leave visible discontinuities near the top and bottom of the panorama when overlap is limited and lens misalignment/parallax exist; a “dual-stream least squares” approach that is spatially adaptive is therefore required (Ho et al., 2017).
The paper instantiates this by moving least squares with a rigid constraint. Moving least squares is an interpolation-based deformation that, at each query location 7, solves a local weighted least-squares alignment problem using control point correspondences. It ensures interpolation, smoothness, and identity properties, and its “moving” nature stems from weights that decay with distance from 8. The restriction to rigid transformations, namely rotation plus translation with no scale or shear, is used to avoid local scale changes that can warp geometry, which is especially important when overlap is small and preserves natural appearance away from seams. With control points 9 sampled on the right unwarped image near the stitching boundary and correspondences 0 on the left unwarped image, the weights are
1
where 2 controls locality. Larger 3 increases locality and reduces the influence of distant points.
At each query location 4, the rigid MLS objective is
5
Using weighted centroids
6
and centered offsets 7, 8, the covariance is
9
From the SVD 0, the optimal rotation is
1
which enforces 2, and the translation is
3
The warp is then 4, or equivalently 5 for a pixel 6.
Because rigid MLS is evaluated per point, the method precomputes an interpolation grid 7 over the overlap and a margin into each stream. For each grid node, it computes the weights, centroids, covariance, a 8 SVD, and then extracts 9 and 0. The dense warp is obtained by bilinear interpolation on the equirectangular lattice. The right stream is aligned to the left across the overlap, while the rest remains largely unchanged because the weights decay with distance.
The full alignment pipeline has two stages. Stage 1 is camera-dependent and offline: light fall-off correction, fisheye-to-equirectangular unwarping, acquisition of seam control points via checkerboards and/or feature matches, and construction of rigid-MLS interpolation grids. Stage 2 is scene-adaptive and online: residual misalignment due to depth variation/parallax is corrected with a lightweight template-matching step at both seams using normalized cross-correlation,
1
followed by a small affine refinement from eight control point pairs by minimizing
2
A separate contribution addresses temporal coherence in video. The problem is that per-frame refined alignment can occasionally produce erroneous affine warps when NCC matches are poor, abruptly shifting the seam and causing visible jitter. The proposed gating algorithm accepts refined affine updates only when both boundaries pass empirical reliability thresholds: NCC peak 3, vertical displacement 4 pixels, and horizontal displacement within 5 of the previous frame’s displacement. If current matches fail but the previous frame had good matches, the previous affine warp is reused; otherwise the affine warp is disabled for that frame. The paper states that results show higher quality stitched images and videos than prior work, and the qualitative examples show patterned backgrounds aligned cleanly with rigid MLS while the previous global least-squares approach displays discontinuities; for video, example sequences show “no jitter” in consecutive frames, whereas the baseline exhibits sudden shifts when a bad match propagates into the warp.
The stated limitations are equally specific. Severe parallax, large moving objects across seams, or extreme lens misalignment can exceed the capacity of rigid deformation and small affine tuning. Very limited overlap reduces control-point support; in such cases, feature detection must be strengthened, and 6 reduced to avoid over-localization.
3. Primal–dual and streamline-aware least squares for convection-dominated problems
For stationary convection–diffusion–reaction equations, “Dual-Stream Least Squares” is used in two precise senses: primal–dual and streamline-aware. The model problem is
7
with homogeneous Dirichlet condition 8, where 9 for 0, 1, 2, 3, and 4. The boundary is decomposed into
5
under the reaction–convection coercivity condition
6
The first-order system introduces the dual variable
7
and rewrites the PDE as
8
The least-squares functionals differ by their outflow treatment:
9
0
1
Here 2 imposes 3 strongly through 4, while 5 and 6 use 7, enforce inflow strongly, and impose the outflow boundary weakly through penalties. Because 8, 9 penalizes outflow values more strongly than 0.
The second sense of “stream” is encoded in the analysis norm through the streamline derivative
1
The strengthened triple-bar norm is
2
with 3 chosen by local Péclet number. A canonical choice uses
4
the splitting 5 and 6, and
7
under the layer-resolution assumption
8
The paper establishes continuous coercivity
9
with 0 and 1 independent of 2, while 3. At the discrete level, fractional norms are replaced by edge-weighted 4 norms,
5
6
and the discrete constants become independent of 7 for both 8. The paper also proves
9
which establishes ellipticity in the streamlined norm.
The a priori estimates are stated for Raviart–Thomas spaces 0 and continuous 1, under 2 and 3. They provide two regimes: one estimate with degree 4, and an improved estimate when using degree 5 for 6. In addition, the least-squares framework yields the best-approximation bound
7
with 8 independent of 9 when boundary layers are sufficiently resolved.
Adaptivity is built directly from the least-squares residual. Elementwise indicators are
00
The refinement loop uses maximum marking: mark all 01 with 02, then refine marked elements and neighbors to avoid hanging nodes. According to the reported numerical results, for the boundary-layer test with 03 and also 04, all three formulations produce adaptive meshes clustered along the outflow boundary layers, layer-resolved solutions without spurious oscillations even on coarse meshes away from layers, and convergence of the triple-bar error at rate 05, robust with respect to 06; using tolerance 07 as stopping criterion, effectivity indices remain close to unity. For the interior-layer test, all three methods capture both boundary and interior layers without visible oscillations.
The paper explicitly compares this framework to SUPG. The inclusion of 08 parallels the SUPG idea of adding residuals tested along streamlines, but here it appears in the analysis norm, not the bilinear form, preserving symmetric positive definite algebraic systems, freedom from inf–sup constraints on finite element pairs, and a natural a posteriori estimator equal to the residual functional value.
4. Primal operator–adjoint operator coupling and 09 methods
For scalar linear hyperbolic PDEs, Dual-Stream Least Squares refers to formulations that exploit both the primal operator 10 and its adjoint 11 to obtain 12-targeted approximations. The model problem is written abstractly as
13
with 14 and homogeneous inflow boundary conditions, and concretely for the transport equation 15 in 16 with 17 on the inflow boundary 18 and outflow 19. The domains are
20
21
with Poincaré-type inequalities and surjectivity assumptions ensuring that 22 and 23 are Hilbert spaces with graph-norm equivalence (Kalchev et al., 2020).
The central motivation is that the best 24 approximation
25
is generally infeasible because 26 is unknown. The dual construction replaces this by feasible least-squares principles using the weak operator 27, defined by
28
and the Riesz map 29, given through
30
Theorem 3.1 in the paper shows that 31 is a bijective isometry,
32
and Theorem 3.3 shows that 33 is self-adjoint and positive definite and induces the dual norm on 34.
This produces several formulations. In the standard 35 method, with 36,
37
and the weak form is
38
The mixed 39 dual least-squares method instead minimizes
40
or equivalently solves the mixed system
41
42
The algebraic block system is
43
with Schur complement 44.
A key identity is
45
which implies that the dual method minimizes the projected 46-component of the error:
47
The discrete 48 coercivity condition is the inf-sup inequality
49
Under this condition, the paper derives
50
If 51, then 52 and 53, recovering the 54 projection.
The single-stage and two-stage 55-type methods hybridize the 56 projection with an additional projection onto 57. Their error estimate depends on approximation properties of both 58 and 59:
60
where 61 and 62.
The preconditioning discussion is part of the method’s practical identity. For the mixed dual system, a symmetric block preconditioner uses 63 and a Schur complement preconditioner 64. For the single-stage SPD system, an SPD block preconditioner uses 65 and 66 for the Schur complement 67, which is spectrally equivalent to 68 independently of the inf-sup condition. Matrix-free application of 69 and the right-hand side requires only applications of 70 and 71 and sparse matrix-vector products with 72 and 73.
The numerical results emphasize the difference between directly targeting 74 and relying on 75 approximation quality. For 76 linear and 77 quadratic on the same meshes with 78, the dual 79 method attains an 80 rate 81 in a pre-asymptotic regime with unresolved layers, while 82, single-stage, and two-stage methods converge more slowly. Across the reported tests, the dual method exhibits less oscillation and better resolution of steep layers, whereas the mixed system is indefinite and more challenging to precondition if the discrete inf-sup constant deteriorates with 83.
5. Dual-norm least squares, saddle points, and inhomogeneous boundary conditions
In quasi-optimal least squares for elliptic PDEs with inhomogeneous boundary conditions, Dual-Stream Least Squares denotes a least-squares formulation in which primal trial variables are coupled to dual test variables that realize dual norms. The basic setting considers second-order elliptic problems on a bounded Lipschitz domain 84 with disjoint closed boundary parts 85 and 86, where
87
with 88 uniformly positive definite and 89 a bounded first-order operator. The central issue is that classical least-squares formulations measure boundary residuals in 90 and 91, which the paper describes as computationally expensive for finite elements and essentially infeasible in machine learning for 92 (Monsuur et al., 2024).
The remedy is to replace boundary fractional norms by equivalent dual norms in domain spaces through trace dual mappings. For example,
93
and
94
This yields the dual-norm least-squares functional
95
where
96
The dual-stream interpretation is explicit: a primal stream approximates 97 in 98, while a dual stream approximates supremizers in the test spaces 99 and 00. Through the Fenchel-type identity
01
the least-squares problem becomes a saddle-point problem with Lagrangian
02
so that
03
At stationarity, the dual variables are Riesz representatives of the residuals:
04
Quasi-optimality is expressed through an inf-sup constant
05
Under the paper’s assumptions, the discrete minimizer satisfies
06
With a preconditioner 07, the constant becomes
08
The paper also provides an a posteriori estimator
09
and states efficiency and asymptotic reliability.
The finite element realization uses uniformly stable pairs. In the first-order modified mild formulation, the trial spaces are
10
with test spaces
11
Uniform Fortin operators are built through right inverses for the boundary traces, and linear-time preconditioners are stated to exist for the relevant 12 and 13 stiffness matrices.
The same saddle-point logic is carried into machine learning through adversarial networks. The primal variable 14 or 15 is represented by a neural network, while dual/test networks parameterize the maximizers. The paper defines four minimax objectives, QOLS1, QOLS116, QOLS2, and QOLS217, differing by first- versus second-order formulation and by whether the Dirichlet boundary dual space is vector-valued 18 or scalar 19. Training alternates 20 minimization steps in the primal parameters and 21 maximization steps in the dual parameters, with loss integrals approximated by Monte Carlo sampling or adaptive Gauss–Legendre quadrature. For machine learning, the paper states a quasi-best guarantee
22
when the dual test networks are sufficiently rich to satisfy an empirical inf-sup condition.
The numerical examples illustrate both FE and ML regimes. For finite elements, adaptive refinement on an L-shaped rectangle with mixed Dirichlet/Neumann data and exact singular solution 23 achieves optimal rates for the available regularity, with stable effectivity indices and indicators concentrating near boundary segments. For machine learning on Laplace with non-smooth boundary data on an L-shaped domain and exact 24, the reported outcome is that QOLS formulations outperform DRM, PINN, and WAN in 25-error over 26k epochs, often by factors up to 27; QOLS1/QOLS2 slightly outperform the 28 counterparts, while the 29 versions can be advantageous in higher dimension because 30 uses scalar 31 rather than vector 32.
6. Shared global and local refinement streams in personalized federated learning
In “APFL: Analytic Personalized Federated Learning via Dual-Stream Least Squares,” the term denotes a federated architecture with two analytic heads after a frozen backbone: a shared primary stream for global generalization across all clients and a dedicated refinement stream for local personalization of each individual client (Fan et al., 14 Aug 2025). Each client 33 has local data 34, with matrix notation 35 and 36. A pre-trained foundation model 37 is used purely for feature extraction, and 38 remains fixed throughout APFL.
The two streams use different random projections and activations:
39
The shared head is 40 and the client-specific head is 41. Prediction on client 42 is additive:
43
where 44 balances global generalization and local personalization.
The least-squares objectives are ridge-regularized and admit closed forms. The global primary stream solves
45
with analytic solution
46
The local refinement stream on client 47 fits the residual after subtracting the primary-stream contribution:
48
with solution
49
The federated protocol is built from sufficient statistics rather than raw data. Client 50 computes
51
and transmits 52 and 53 to the server. The server aggregates
54
and reconstructs the centralized solution
55
After receiving 56, each client computes its local refinement matrix 57 and performs personalized inference by
58
A distinctive theoretical property is heterogeneity invariance. Under a frozen deterministic backbone, fixed random projections 59, fixed activations 60, fixed ridge parameters 61, and two federations having identical union datasets but different client-wise partitions, the paper states that the global 62 is identical because it depends only on the sums 63 and 64. If client 65’s local dataset is unchanged, then 66 is also identical, because it depends only on 67, 68, 69, and the invariant 70. The stated limitation is that if 71, 72, 73, or 74 differ across clients, or if the backbone is not frozen, this invariance may be affected.
The computational profile is also analytic. Client-side costs include 75 for 76, 77 for inverting 78, 79 for 80, plus the analogous refinement costs. Communication to the server is 81 of size 82 plus 83 of size 84, for size 85. The paper recommends Cholesky factorization for 86 and 87, and notes that conjugate gradient can solve 88 without explicit inversion for large 89.
The empirical evaluation uses CIFAR-100 and ImageNet-R, non-IID Dirichlet partitions with 90, and 91 clients, with ViT-MAE-Base as frozen backbone. The reported average per-client test accuracies are as follows. On CIFAR-100 with 92 clients, APFL achieves 93 at 94, 95 at 96, and 97 at 98; the best baselines are 99, 00, and 01, giving improvements of 02, 03, and 04. On CIFAR-100 with 05 clients, the reported gains are 06, 07, and 08. On ImageNet-R with 09 clients, APFL reaches 10, 11, and 12, with advantages of 13, 14, and 15. On ImageNet-R with 16 clients, the corresponding gains are 17, 18, and 19.
The paper further states that APFL reaches its final accuracy in a single aggregation round per client, whereas gradient-based baselines require up to 20 rounds. For CIFAR-100 with 21 and 22 clients, APFL achieves at least 23 higher accuracy while using 24 of the baselines’ computation overhead and 25 of their communication overhead. Over overhead-versus-round curves, its total overhead is stated to be at least 26 and 27 lower than baselines within the first 28 rounds, and up to 29 and 30 lower after 31 rounds, in computation and communication respectively.
Ablation studies characterize the interaction between the two streams. On CIFAR-100 at 32, the primary stream alone gives 33, while the dual model at 34 gives 35. On ImageNet-R at 36, the primary stream alone gives 37, while the dual model yields 38. The reported trend is that performance rises then falls as 39 increases; the optimal 40 is about 41–42 for CIFAR-100 and about 43–44 for ImageNet-R, and as heterogeneity decreases, the optimal 45 decreases because less personalization is needed. The paper also reports that the primary stream is insensitive to 46, that the refinement stream is more sensitive to 47, that performance rises then falls with increasing 48 and 49, and that the method is relatively insensitive to activation choice.
Across these domains, Dual-Stream Least Squares consistently denotes a least-squares system in which two coupled channels are assigned distinct technical roles and then recombined. In image stitching, the channels are two physically separate image streams and the least-squares machinery is local, geometric, and temporally gated. In convection-dominated PDEs, the channels are primal–dual variables and streamline-aware control, producing 50-robust coercivity, best-approximation properties, and adaptive refinement. In hyperbolic transport, the channels are 51 and 52, giving a precise route from residual minimization to 53-targeted approximation. In QOLS, the channels are primal trial functions and dual supremizers, turning dual norms into computable saddle-point problems without fractional boundary norms. In APFL, the channels are shared and client-specific analytic heads, yielding a single-round personalized learning protocol with a stated heterogeneity invariance property. The recurring principle is therefore not domain-specific nomenclature, but the systematic use of two complementary streams so that least-squares fitting acquires locality, adjoint consistency, streamline stability, boundary realizability, or personalization that would be more difficult to obtain from a single-stream construction alone.