---
title: Dual-Stream Least Squares
url: https://www.emergentmind.com/topics/dual-stream-least-squares
type: topic
---

# Dual-Stream Least Squares

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 $L$ and its adjoint $L^*$ in $\mathcal{L}\mathcal{L}^*$-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 [1708.05922][2301.11582][2004.12487][2508.10732][2412.05965]. 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 [1708.05922]. In convection-dominated diffusion-reaction, the method is “Dual-Stream” both because it is primal–dual in the variables $(u,\sigma)$ and because the analysis norm explicitly controls the streamline derivative $D_s u := b\cdot\nabla u$ through mesh-dependent weights tied to local Péclet numbers [2301.11582]. In scalar linear hyperbolic problems, the two streams are the primal residual $L v^h-f$ and the adjoint stream built from $L^*$ and $(L_wL^*)^{-1}$, which reconstructs $L^2$ control [2004.12487]. In personalized federated learning, the streams are a shared primary stream for collective generalization and a dedicated refinement stream for local personalization [2508.10732]. 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 [2412.05965].

| Setting | Two streams | Core least-squares role |
|---|---|---|
| Dual-fisheye stitching | Left/right image streams | Spatially adaptive rigid MLS alignment |
| Convection–diffusion–reaction | Primal–dual $(u,\sigma)$ and streamline derivative control | $\epsilon$-robust coercivity and adaptive refinement |
| Hyperbolic transport | $L$ and $L^*$ | $L^2$-targeted approximation via $\mathcal{L}\mathcal{L}^*$ |
| 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 $195^\circ$ FOV. After radiometric compensation and fisheye-to-equirectangular unwarping, the right lens image is placed at the center of the $360\times180$ 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 [1708.05922].

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 $x$, 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 $x$. 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 $\{p_i\}$ sampled on the right unwarped image near the stitching boundary and correspondences $\{q_i\}$ on the left unwarped image, the weights are
$$
w_i(x)=\frac{1}{\|x-p_i\|^{2\alpha}},
$$
where $\alpha>0$ controls locality. Larger $\alpha$ increases locality and reduces the influence of distant points.

At each query location $x$, the rigid MLS objective is
$$
E(R,t;x)=\sum_i w_i(x)\|R(p_i-x)+t-(q_i-x)\|^2.
$$
Using weighted centroids
$$
\bar p(x)=\frac{\sum_i w_i(x)p_i}{\sum_i w_i(x)},\qquad
\bar q(x)=\frac{\sum_i w_i(x)q_i}{\sum_i w_i(x)},
$$
and centered offsets $\tilde p_i=p_i-\bar p(x)$, $\tilde q_i=q_i-\bar q(x)$, the covariance is
$$
C(x)=\sum_i w_i(x)\tilde p_i\tilde q_i^T.
$$
From the SVD $C(x)=U\Sigma V^T$, the optimal rotation is
$$
R(x)=V\,\mathrm{diag}(1,\ldots,1,\det(VU^T))\,U^T,
$$
which enforces $\det(R)=+1$, and the translation is
$$
t(x)=\bar q(x)-R(x)\bar p(x).
$$
The warp is then $f_r(x)=R(x)x+t(x)$, or equivalently $f_r(v)=R(v)(v-\bar p(v))+\bar q(v)$ for a pixel $v$.

Because rigid MLS is evaluated per point, the method precomputes an interpolation grid $G$ over the overlap and a margin into each stream. For each grid node, it computes the weights, centroids, covariance, a $2\times2$ SVD, and then extracts $R(x)$ and $t(x)$. 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,
$$
\mathrm{NCC}(u)=\frac{\sum_{x\in W}(I_1(x)-\mu_1)(I_2(x+u)-\mu_2)}{\sigma_1\sigma_2},
$$
followed by a small affine refinement from eight control point pairs by minimizing
$$
\sum_k\|Ap_k-q_k\|^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 $s^*\ge 0.85$, vertical displacement $u_y^*\in[-10,+10]$ pixels, and horizontal displacement within $\pm10\%$ 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 $\alpha$ 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
$$
-\epsilon\Delta u+b\cdot\nabla u+cu=f\quad\text{in }\Omega,
$$
with homogeneous Dirichlet condition $u|_{\partial\Omega}=0$, where $\Omega\subset\mathbb{R}^d$ for $d=2,3$, $b\in W^1_\infty(\Omega)^d$, $c\in L^\infty(\Omega)$, $f\in L^2(\Omega)$, and $0<\epsilon\ll1$. The boundary is decomposed into
$$
\Gamma_+ := \{x\in\partial\Omega:b(x)\cdot n(x)>0\},\qquad
\Gamma_- := \{x\in\partial\Omega:b(x)\cdot n(x)<0\},
$$
under the reaction–convection coercivity condition
$$
c(x)-\tfrac12\nabla\cdot b(x)\ge \alpha_0>0 \quad \text{a.e. in }\Omega.
$$
The first-order system introduces the dual variable
$$
\sigma:=-\epsilon^{1/2}\nabla u,
$$
and rewrites the PDE as
$$
\sigma+\epsilon^{1/2}\nabla u=0,\qquad
\epsilon^{1/2}\nabla\cdot\sigma+b\cdot\nabla u+cu=f
$$
[2301.11582].

The least-squares functionals differ by their outflow treatment:
$$
G_1(\sigma,v;f):=\|\sigma+\epsilon^{1/2}\nabla v\|_{0,\Omega}^2
+\|\epsilon^{1/2}\nabla\cdot\sigma+b\cdot\nabla v+cv-f\|_{0,\Omega}^2,
$$
$$
G_2(\sigma,v;f):=G_1(\sigma,v;f)+\|\epsilon^{-1/2}v\|_{1/2,\Gamma_+}^2,
$$
$$
G_3(\sigma,v;f):=G_1(\sigma,v;f)+\|v\|_{1/2,\Gamma_+}^2.
$$
Here $G_1$ imposes $u|_{\partial\Omega}=0$ strongly through $X_1:=H(\mathrm{div};\Omega)\times H^1_0(\Omega)$, while $G_2$ and $G_3$ use $X_2=X_3:=H(\mathrm{div};\Omega)\times H^1_{\Gamma_-}(\Omega)$, enforce inflow strongly, and impose the outflow boundary weakly through penalties. Because $\epsilon\ll1$, $G_2$ penalizes outflow values more strongly than $G_3$.

The second sense of “stream” is encoded in the analysis norm through the streamline derivative
$$
D_s v := b\cdot\nabla v.
$$
The strengthened triple-bar norm is
$$
|||(\sigma,v)|||_i^2 := M_i^h(\sigma,v)+\sum_K \delta_K\|b\cdot\nabla v\|_{0,K}^2,
$$
with $\delta_K>0$ chosen by local Péclet number. A canonical choice uses
$$
Pe_K:=\|b\|_{0,\infty,K}h_K/(2\epsilon),
$$
the splitting $T_h^c:=\{K\in T_h:Pe_K>1\}$ and $T_h^d:=\{K\in T_h:Pe_K\le1\}$, and
$$
\delta_K:=2h_K/\|b\|_{0,\infty,K}\quad\text{for }K\in T_h^c,\qquad
\delta_K:=h_K^2/\epsilon\quad\text{for }K\in T_h^d,
$$
under the layer-resolution assumption
$$
T_h^\partial := \{K:\mathrm{meas}(\bar K\cap \Gamma_+)>0\}\subset T_h^d.
$$

The paper establishes continuous coercivity
$$
M_i(\sigma,v)\le C_i G_i(\sigma,v;0),\qquad i=1,2,3,
$$
with $C_1$ and $C_2$ independent of $\epsilon$, while $C_3\propto \epsilon^{-1/2}$. At the discrete level, fractional norms are replaced by edge-weighted $L^2$ norms,
$$
G_2^h(\sigma,v;f):=G_1(\sigma,v;f)+\sum_{e\subset \Gamma_+} h_e^{-1}\|\epsilon^{-1/2}v\|_{0,e}^2,
$$
$$
G_3^h(\sigma,v;f):=G_1(\sigma,v;f)+\sum_{e\subset \Gamma_+} h_e^{-1}\|v\|_{0,e}^2,
$$
and the discrete constants become independent of $\epsilon$ for both $i=2,3$. The paper also proves
$$
|||(\sigma,v)|||_i^2 \le C_i G_i^h(\sigma,v;0),\qquad i=1,2,3,
$$
which establishes ellipticity in the streamlined norm.

The a priori estimates are stated for Raviart–Thomas spaces $\Sigma_h^k$ and continuous $V_h^{k+1}$, under $(\sigma,u)\in H^l(\Omega)^d\times H^{l+1}(\Omega)$ and $\nabla\cdot\sigma\in H^l(\Omega)$. They provide two regimes: one estimate with degree $k=l$, and an improved estimate when using degree $(l+1)$ for $u$. In addition, the least-squares framework yields the best-approximation bound
$$
||| (u-u_h^i,\sigma-\sigma_h^i) |||_i
\le C \inf_{(v_h,\tau_h)\in X_i^h} ||| (u-v_h,\sigma-\tau_h) |||_i,
$$
with $C$ independent of $\epsilon$ when boundary layers are sufficiently resolved.

Adaptivity is built directly from the least-squares residual. Elementwise indicators are
$$
\eta_K^i := [G_{i,K}^h(\hat\sigma_h^i,\hat u_h^i;f)]^{1/2},\qquad
\eta^i := \Big[\sum_K (\eta_K^i)^2\Big]^{1/2}
= [G_i^h(\hat\sigma_h^i,\hat u_h^i;f)]^{1/2}.
$$
The refinement loop uses maximum marking: mark all $K$ with $\eta_K^i\ge \theta \max_{T_h}\eta_K^i$, then refine marked elements and neighbors to avoid hanging nodes. According to the reported numerical results, for the boundary-layer test with $\epsilon=10^{-3}$ and also $\epsilon=10^{-4}$, 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 $\approx \mathrm{DoF}^{-1}$, robust with respect to $\epsilon$; using tolerance $\eta^i\le0.5$ 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 $\sum_K \delta_K \|b\cdot\nabla v\|_{0,K}^2$ 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 $\mathcal{L}\mathcal{L}^*$ methods

For scalar linear hyperbolic PDEs, Dual-Stream Least Squares refers to formulations that exploit both the primal operator $L$ and its adjoint $L^*$ to obtain $L^2$-targeted approximations. The model problem is written abstractly as
$$
Lu=f,
$$
with $u\in D(L)$ and homogeneous inflow boundary conditions, and concretely for the transport equation $b\psi+\sigma\psi=r$ in $\Omega$ with $\psi=g$ on the inflow boundary $\Gamma_I=\{x\in\partial\Omega;n(x)\cdot b(x)<0\}$ and outflow $\Gamma_O=\{x\in\partial\Omega;n(x)\cdot b(x)>0\}$. The domains are
$$
D(L)=\{u\in L^2(\Omega);Lu\in L^2(\Omega)\text{ and }u=0\text{ on }\Gamma_I\},
$$
$$
D(L^*)=\{w\in L^2(\Omega);L^*w\in L^2(\Omega)\text{ and }w=0\text{ on }\Gamma_O\},
$$
with Poincaré-type inequalities and surjectivity assumptions ensuring that $D(L)$ and $D(L^*)$ are Hilbert spaces with graph-norm equivalence [2004.12487].

The central motivation is that the best $L^2$ approximation
$$
u^h=\arg\min_{v^h\in U^h}\|v^h-u\|^2
$$
is generally infeasible because $u$ is unknown. The dual construction replaces this by feasible least-squares principles using the weak operator $L_w:L^2(\Omega)\to D'(L^*)$, defined by
$$
(L_w q)(w)=(q,L^*w),
$$
and the Riesz map $(L_wL^*)^{-1}:D'(L^*)\to D(L^*)$, given through
$$
(L^*z,L^*w)=\ell(w)\qquad \forall w\in D(L^*).
$$
Theorem 3.1 in the paper shows that $L_w$ is a bijective isometry,
$$
\|q\|=\|L_w q\|_{D'(L^*)},\qquad \forall q\in L^2(\Omega),
$$
and Theorem 3.3 shows that $(L_wL^*)^{-1}$ is self-adjoint and positive definite and induces the dual norm on $L^2(\Omega)$.

This produces several formulations. In the standard $\mathcal{L}\mathcal{L}^*$ method, with $Z^h\subset D(L^*)$,
$$
z_*^h=\arg\min_{w^h\in Z^h}\|L^*w^h-u\|^2,\qquad
u_*^h=L^*z_*^h=\Pi_*^h u,
$$
and the weak form is
$$
(L^*z^h,L^*w^h)=(f,w^h)\qquad \forall w^h\in Z^h.
$$
The mixed $(\mathcal{L}\mathcal{L}^*)^{-1}$ dual least-squares method instead minimizes
$$
u^h=\arg\min_{v^h\in U^h}
\big((L_wL^*)_h^{-1}(Lv^h-f),Lv^h-f\big),
$$
or equivalently solves the mixed system
$$
(L^*z^h,L^*w^h)+(u^h,L^*w^h)=(f,w^h)\qquad \forall w^h\in Z^h,
$$
$$
(L^*z^h,v^h)=0\qquad \forall v^h\in U^h.
$$
The algebraic block system is
$$
\begin{bmatrix}
H & L\\
L^T & 0
\end{bmatrix}
\begin{bmatrix}
z\\
u
\end{bmatrix}
=
\begin{bmatrix}
\ell\\
0
\end{bmatrix},
$$
with Schur complement $A=L^TH^{-1}L$.

A key identity is
$$
\Pi_*^h=L^*(L_wL^*)_h^{-1}L_w,
$$
which implies that the dual method minimizes the projected $L^*(Z^h)$-component of the error:
$$
u^h=\arg\min_{v^h\in U^h}\|\Pi_*^h(v^h-u)\|^2.
$$
The discrete $L^2$ coercivity condition is the inf-sup inequality
$$
\inf_{v^h\in U^h}\sup_{w^h\in Z^h}
\frac{(v^h,L^*w^h)}{\|v^h\|\|L^*w^h\|}
\ge c_I>0.
$$
Under this condition, the paper derives
$$
\|u^h-u\|\le \Big(1+\frac{1}{c_I}\Big)\inf_{v^h\in U^h}\|v^h-u\|.
$$
If $U^h=L^*(Z^h)$, then $c_I=1$ and $A=M$, recovering the $L^2$ projection.

The single-stage and two-stage $\mathcal{L}\mathcal{L}^*$-type methods hybridize the $\mathcal{L}\mathcal{L}^*$ projection with an additional projection onto $U^h$. Their error estimate depends on approximation properties of both $U^h$ and $L^*(Z^h)$:
$$
\|u_\diamond^h-u\|
\le s\inf_{v^h\in U^h}\|v^h-u\|
+(s+1)\inf_{w^h\in Z^h}\|L^*w^h-u\|,
$$
where $u_\diamond^h\in\{u_{ss}^h,u_{ts}^h\}$ and $s\in\{(\omega+1)/\omega,1\}$.

The preconditioning discussion is part of the method’s practical identity. For the mixed dual system, a symmetric block preconditioner uses $B^{-1}\approx H^{-1}$ and a Schur complement preconditioner $Z_{inv}$. For the single-stage SPD system, an SPD block preconditioner uses $B_\omega^{-1}=(\omega+1)^{-1}B^{-1}$ and $Z_{ss}$ for the Schur complement $S_{ss}=M-(\omega+1)^{-1}A$, which is spectrally equivalent to $M$ independently of the inf-sup condition. Matrix-free application of $A$ and the right-hand side requires only applications of $B^{-1}$ and $Z_{inv}^{-1}/Z_{ss}^{-1}$ and sparse matrix-vector products with $L$ and $L^T$.

The numerical results emphasize the difference between directly targeting $L^2$ and relying on $L^*(Z^h)$ approximation quality. For $U^h$ linear and $Z^h$ quadratic on the same meshes with $\sigma_{in}=10^4$, the dual $(\mathcal{L}\mathcal{L}^*)^{-1}$ method attains an $L^2$ rate $\approx h^{1/2}$ in a pre-asymptotic regime with unresolved layers, while $\mathcal{L}\mathcal{L}^*$, 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 $h$.

## 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 $\Omega\subset\mathbb{R}^d$ with disjoint closed boundary parts $\Gamma_D$ and $\Gamma_N$, where
$$
-\mathrm{div}(A\nabla u)+Bu=g \quad\text{in }\Omega,\qquad
\Gamma_D u=h_D\quad\text{on }\Gamma_D,\qquad
\vec n\cdot A\nabla u=h_N\quad\text{on }\Gamma_N,
$$
with $A=A^\top\in L_\infty(\Omega)^{d\times d}$ uniformly positive definite and $B\in(H^1(\Omega),L_2(\Omega))$ a bounded first-order operator. The central issue is that classical least-squares formulations measure boundary residuals in $H^{1/2}(\Gamma_D)$ and $H^{-1/2}(\Gamma_N)$, which the paper describes as computationally expensive for finite elements and essentially infeasible in machine learning for $d>1$ [2412.05965].

The remedy is to replace boundary fractional norms by equivalent dual norms in domain spaces through trace dual mappings. For example,
$$
\|r\|_{H^{1/2}(\Gamma_D)}
\eqsim
\sup_{0\neq \vec v\in H_{0,\Gamma_N}(\mathrm{div};\Omega)}
\frac{\big|\int_{\Gamma_D} r\,\gamma_{\Gamma_D}^{\vec n}(\vec v)\,ds\big|}
{\|\vec v\|_{H(\mathrm{div};\Omega)}},
$$
and
$$
\|s\|_{H^{-1/2}(\Gamma_N)}
\eqsim
\sup_{0\neq v\in H^1_{0,\Gamma_D}(\Omega)}
\frac{\big|\int_{\Gamma_N} s\,\gamma_{\Gamma_N}(v)\,ds\big|}
{\|v\|_{H^1(\Omega)}}.
$$
This yields the dual-norm least-squares functional
$$
J(u)=\|Lu-f\|_{V'}^2+\|\Gamma_Du-h_D\|_{W_D'}^2+\|\Gamma_N^{\vec n(A\nabla u)}-h_N\|_{W_N'}^2,
$$
where
$$
\|r\|_{V'}=\sup_{0\neq v\in V}\frac{\langle r,v\rangle}{\|v\|_V},
\qquad
\|s\|_{W'}=\sup_{0\neq w\in W}\frac{\langle s,w\rangle}{\|w\|_W}.
$$

The dual-stream interpretation is explicit: a primal stream approximates $u$ in $U$, while a dual stream approximates supremizers in the test spaces $V$ and $W$. Through the Fenchel-type identity
$$
\sup_{v\in V}\frac{|g(v)|^2}{\|v\|_V^2}
=
\sup_{v\in V}\{2\mathrm{Re}\,g(v)-\|v\|_V^2\},
$$
the least-squares problem becomes a saddle-point problem with Lagrangian
$$
\mathcal{L}(u,v,w)
=
\langle Lu-f,v\rangle-\tfrac12\|v\|_V^2
+
\langle \Gamma u-g,w\rangle-\tfrac12\|w\|_W^2,
$$
so that
$$
\min_{u\in U}J(u)
=
\min_{u\in U}\max_{(v,w)\in V\times W}\mathcal{L}(u,v,w).
$$
At stationarity, the dual variables are Riesz representatives of the residuals:
$$
v=R_V(Lu-f),\qquad w=R_W(\Gamma u-g).
$$

Quasi-optimality is expressed through an inf-sup constant
$$
\gamma^\delta
:=
\inf_{\{w\in U^\delta:G_1w\neq0\}}
\frac{
\sup_{0\neq v\in V^\delta}\frac{|(G_1w)(v)|}{\|v\|_V}
}{
\|G_1w\|_{V'}
}
>0.
$$
Under the paper’s assumptions, the discrete minimizer satisfies
$$
|u-u^\delta|_U\le \frac{1}{\gamma^\delta}\inf_{w\in U^\delta}|u-w|_U.
$$
With a preconditioner $K_V^\delta$, the constant becomes
$$
\frac{\max(1,M^\delta)}{\gamma^\delta\min(1,m^\delta)}.
$$
The paper also provides an a posteriori estimator
$$
\mathcal{E}^\delta(w;f)
:=
(G_1w-f_1)\big(K_V^\delta(G_1w-f_1)\big)
+\|G_2w-f_2\|_{V_2'}^2,
$$
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
$$
P^\delta:=RT_q(\mathcal{T}^\delta),\qquad
U^\delta:=\mathbb{P}_{q+1}^0(\mathcal{T}^\delta),
$$
with test spaces
$$
Y_D^\delta:=RT_{q+1}(\mathcal{T}_D^\delta)\cap H_{0,\Gamma_N}(\mathrm{div};\Omega),\qquad
Y_N^\delta:=\mathbb{P}_{d+q}^0(\mathcal{T}_N^\delta)\cap H^1_{0,\Gamma_D}(\Omega).
$$
Uniform Fortin operators are built through right inverses for the boundary traces, and linear-time preconditioners are stated to exist for the relevant $H^1$ and $H(\mathrm{div})$ stiffness matrices.

The same saddle-point logic is carried into machine learning through adversarial networks. The primal variable $u_\theta$ or $(p,u)_\theta$ is represented by a neural network, while dual/test networks parameterize the maximizers. The paper defines four minimax objectives, QOLS1, QOLS1$_\Delta$, QOLS2, and QOLS2$_\Delta$, differing by first- versus second-order formulation and by whether the Dirichlet boundary dual space is vector-valued $H(\mathrm{div})$ or scalar $H_\Delta$. Training alternates $K_w$ minimization steps in the primal parameters and $K_v$ 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
$$
|u-u_\theta|_U\le \Big(1+\frac{2}{\alpha}\Big)\inf_{w\in\mathcal{U}}|u-w|_U
$$
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 $u(r,\theta)=r^{1/2}\sin(\theta/2)$ 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 $u^*(r,\theta)=r^{2/3}\sin(2\theta/3)$, the reported outcome is that QOLS formulations outperform DRM, PINN, and WAN in $H^1$-error over $15$k epochs, often by factors up to $\approx100$; QOLS1/QOLS2 slightly outperform the $\Delta$ counterparts, while the $\Delta$ versions can be advantageous in higher dimension because $W_D$ uses scalar $H_\Delta$ rather than vector $H(\mathrm{div})$.

## 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 [2508.10732]. Each client $i\in\{1,\dots,N\}$ has local data $D_i=\{(x_{ij},y_{ij})\}_{j=1}^{n_i}$, with matrix notation $X_i\in\mathbb{R}^{n_i\times p}$ and $Y_i\in\mathbb{R}^{n_i\times C}$. A pre-trained foundation model $g(x;\theta_0)$ is used purely for feature extraction, and $\theta_0$ remains fixed throughout APFL.

The two streams use different random projections and activations:
$$
\Phi_i=\sigma_P(g(X_i;\theta_0)R_P)\in\mathbb{R}^{n_i\times d_P},
\qquad
\Psi_i=\sigma_R(g(X_i;\theta_0)R_R)\in\mathbb{R}^{n_i\times d_R}.
$$
The shared head is $W_g\in\mathbb{R}^{d_P\times C}$ and the client-specific head is $W_i\in\mathbb{R}^{d_R\times C}$. Prediction on client $i$ is additive:
$$
\hat Y_i=\Phi(X)W_g+\lambda \Psi(X)W_i,
$$
where $\lambda\ge0$ balances global generalization and local personalization.

The least-squares objectives are ridge-regularized and admit closed forms. The global primary stream solves
$$
L_g(W_g)=\sum_{i=1}^N\|\Phi_iW_g-Y_i\|_F^2+\gamma\|W_g\|_F^2,
$$
with analytic solution
$$
W_g^*=
\Big(\sum_{i=1}^N \Phi_i^\top\Phi_i+\gamma I_{d_P}\Big)^{-1}
\Big(\sum_{i=1}^N \Phi_i^\top Y_i\Big).
$$
The local refinement stream on client $i$ fits the residual after subtracting the primary-stream contribution:
$$
L_i(W_i;W_g)=\|(Y_i-\Phi_iW_g)-\Psi_iW_i\|_F^2+\beta\|W_i\|_F^2,
$$
with solution
$$
W_i^*=(\Psi_i^\top\Psi_i+\beta I_{d_R})^{-1}\Psi_i^\top(Y_i-\Phi_iW_g).
$$

The federated protocol is built from sufficient statistics rather than raw data. Client $i$ computes
$$
S_i:=\Phi_i^\top\Phi_i,\qquad
T_i:=\Phi_i^\top Y_i,\qquad
A_i:=S_i+\gamma I_{d_P},\qquad
G_i:=A_i^{-1}T_i,
$$
and transmits $A_i$ and $G_i$ to the server. The server aggregates
$$
S_{\mathrm{eff}}=\Big(\sum_{i=1}^N A_i\Big)-(N-1)\gamma I,\qquad
T_{\mathrm{eff}}=\sum_{i=1}^N (A_iG_i),
$$
and reconstructs the centralized solution
$$
W_g^*=S_{\mathrm{eff}}^{-1}T_{\mathrm{eff}}.
$$
After receiving $W_g^*$, each client computes its local refinement matrix $W_i^*$ and performs personalized inference by
$$
\hat Y=\hat\Phi W_g^*+\lambda \hat\Psi W_i^*.
$$

A distinctive theoretical property is heterogeneity invariance. Under a frozen deterministic backbone, fixed random projections $R_P,R_R$, fixed activations $\sigma_P,\sigma_R$, fixed ridge parameters $\gamma,\beta$, and two federations having identical union datasets but different client-wise partitions, the paper states that the global $W_g^*$ is identical because it depends only on the sums $\sum_i \Phi_i^\top\Phi_i$ and $\sum_i \Phi_i^\top Y_i$. If client $k$’s local dataset is unchanged, then $W_k^*$ is also identical, because it depends only on $\Psi_k^\top\Psi_k$, $\Phi_k$, $Y_k$, and the invariant $W_g^*$. The stated limitation is that if $R_P$, $\sigma_P$, $R_R$, or $\sigma_R$ 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 $O(n_i d_P^2)$ for $\Phi_i^\top\Phi_i$, $O(d_P^3)$ for inverting $A_i$, $O(n_i d_P C)$ for $\Phi_i^\top Y_i$, plus the analogous refinement costs. Communication to the server is $A_i$ of size $d_P\times d_P$ plus $G_i$ of size $d_P\times C$, for size $O(d_P^2+d_PC)$. The paper recommends Cholesky factorization for $S_{\mathrm{eff}}$ and $A_i$, and notes that conjugate gradient can solve $S_{\mathrm{eff}}W_g=T_{\mathrm{eff}}$ without explicit inversion for large $d_P$.

The empirical evaluation uses CIFAR-100 and ImageNet-R, non-IID Dirichlet partitions with $\alpha\in\{0.1,0.5,1.0\}$, and $N\in\{50,100\}$ clients, with ViT-MAE-Base as frozen backbone. The reported average per-client test accuracies are as follows. On CIFAR-100 with $50$ clients, APFL achieves $80.72\%$ at $\alpha=0.1$, $67.34\%$ at $\alpha=0.5$, and $59.72\%$ at $\alpha=1.0$; the best baselines are $72.89\%$, $58.25\%$, and $54.97\%$, giving improvements of $7.83\%$, $9.09\%$, and $4.75\%$. On CIFAR-100 with $100$ clients, the reported gains are $6.45\%$, $6.12\%$, and $3.22\%$. On ImageNet-R with $50$ clients, APFL reaches $49.92\%$, $37.84\%$, and $34.04\%$, with advantages of $15.09\%$, $3.99\%$, and $1.10\%$. On ImageNet-R with $100$ clients, the corresponding gains are $15.45\%$, $2.74\%$, and $1.59\%$.

The paper further states that APFL reaches its final accuracy in a single aggregation round per client, whereas gradient-based baselines require up to $200$ rounds. For CIFAR-100 with $\alpha=0.1$ and $50$ clients, APFL achieves at least $7.83\%$ higher accuracy while using $<1.00\%$ of the baselines’ computation overhead and $\sim6.00\%$ of their communication overhead. Over overhead-versus-round curves, its total overhead is stated to be at least $93.00\%$ and $59.27\%$ lower than baselines within the first $20$ rounds, and up to $99.30\%$ and $95.93\%$ lower after $200$ rounds, in computation and communication respectively.

Ablation studies characterize the interaction between the two streams. On CIFAR-100 at $\alpha=0.1$, the primary stream alone gives $56.41\%$, while the dual model at $\lambda\in\{0.1,0.3,0.5,0.7,0.9\}$ gives $\{69.33,78.90,79.20,78.09,76.76\}\%$. On ImageNet-R at $\alpha=0.1$, the primary stream alone gives $33.37\%$, while the dual model yields $\{47.04,49.92,45.96,42.91,41.18\}\%$. The reported trend is that performance rises then falls as $\lambda$ increases; the optimal $\lambda$ is about $0.3$–$0.5$ for CIFAR-100 and about $0.1$–$0.3$ for ImageNet-R, and as heterogeneity decreases, the optimal $\lambda$ decreases because less personalization is needed. The paper also reports that the primary stream is insensitive to $\gamma$, that the refinement stream is more sensitive to $\beta$, that performance rises then falls with increasing $d_P$ and $d_R$, 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 $\epsilon$-robust coercivity, best-approximation properties, and adaptive refinement. In hyperbolic transport, the channels are $L$ and $L^*$, giving a precise route from residual minimization to $L^2$-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.

Source: https://www.emergentmind.com/topics/dual-stream-least-squares