---
title: Gram–Schmidt Forward Regression (GSFR)
url: https://www.emergentmind.com/topics/gram-schmidt-forward-regression-gsfr
type: topic
---

# Gram–Schmidt Forward Regression (GSFR)

Searching arXiv for recent papers on Gram-Schmidt Forward Regression and related formulations.
Gram–Schmidt Forward Regression (GSFR) is a label used in the arXiv literature for regression procedures that apply Gram–Schmidt orthogonalization in a forward order and then use the resulting orthogonal directions for estimation, causal interpretation, or variable selection. In the papers considered here, the term covers three related but non-identical constructions: a causal-inference estimator for temporally ordered regressors, a forward selection procedure for ultra-high dimensional linear regression, and a computational route to exact ordinary least squares without forming a pseudo-inverse matrix [2402.17103] [2507.04668] [1311.1835] [2301.01854]. This suggests a common computational motif—sequential orthogonalization—but not a single invariant target parameter.

## 1. Sequential orthogonalization and the forward-regression idea

In the causal formulation of Cross and Buccola, let $X=[x_1,\dots,x_K]$ be a full-rank $N\times K$ matrix of centered regressors and let $y$ be the $N$-vector of outcomes. GSFR orthogonalizes the columns of $X$ in their given order by a Modified Gram–Schmidt recursion:
$$
z_1 \leftarrow x_1,
$$
and for $j=2,\dots,K$,
$$
z_j \leftarrow x_j-\sum_{i=1}^{j-1}\frac{x_j' z_i}{z_i' z_i}\,z_i.
$$
The resulting matrix $Z$ has pairwise orthogonal columns, so $Z'Z$ is diagonal. The least-squares fit of $y$ on $Z$ therefore has the closed-form “one-step” estimator
$$
\hat\beta_{GS,j}=\frac{z_j' y}{z_j' z_j},\qquad j=1,\dots,K.
$$
In that formulation, GSFR is literally “forward” Gram–Schmidt followed by “one-step” regression [2402.17103].

The QR-based formulations use the same forward orthogonalization idea for exact least squares computation. In one version, GSFR replaces the direct inversion of $X^\top X$ by a thin QR factorization $X=QR$, with $Q^\top Q=I$ and $R$ upper triangular, and then computes
$$
\hat\beta_{\mathrm{GSFR}}=R^{-1}Q^\top y,\qquad \widehat y =QQ^\top y.
$$
A non-normalized variant constructs orthogonal vectors $q_i$ by
$$
q_1=x_1,\qquad
q_i=x_i-\sum_{j=1}^{i-1}\frac{\langle q_j,x_i\rangle}{\langle q_j,q_j\rangle}q_j,
$$
forms the upper-triangular matrix $U$ with entries $u_{i,j}=\langle q_i,x_j\rangle$, and solves $U\hat\beta=u_y$ by backward substitution, where $u_y=Q^\top y$ [1311.1835] [2301.01854].

## 2. Finite-sample properties in ordered linear systems

For the causal GSFR estimator, finite-sample theory is established under the usual Gauss–Markov assumptions: linear data-generating recursion or LSEM in the same order as $X$, $E[\varepsilon|X]=0$, homoskedasticity, and no autocorrelation. Under those conditions, several properties are stated explicitly [2402.17103].

- **Orthogonality**: $z_i' z_j=0$ for all $i\neq j$.

- **Unbiasedness**: $E[\hat\beta_{GS,j}]$ equals the corresponding reduced-form total-effect parameter $a_{1\to j}$ in the recursive system.

- **Variance formula**: 
  $$
  \mathrm{Var}[\hat\beta_{GS,j}]=\frac{\sigma^2}{z_j' z_j}.
  $$

- **Variance comparison with OLS**: by the Frisch–Waugh–Lovell theorem and properties of the Schur complement, one proves $z_j' z_j$ is at least as large as the OLS denominator, hence
  $$
  \mathrm{Var}[\hat\beta_{GS,j}] \le \mathrm{Var}[\hat\beta_{OLS,j}].
  $$

- **Stability**: 
  $$
  \mathrm{Cov}[\hat\beta_{GS,i},\hat\beta_{GS,j}]=0
  $$
  for all $i\neq j$, so there is no coefficient-covariance.

- **Information preservation**: the $R^2$ of the $y\sim Z$ regression equals the $R^2$ of $y\sim X$.

- **Omitted-variable behavior**: dropping any later regressor $x_k$ with $k>j$ does not change $\hat\beta_{GS,j}$, and including irrelevant later regressors does not inflate the variance of $\hat\beta_{GS,j}$.

These properties distinguish the ordered-regressor GSFR estimator from ordinary least squares in settings with temporally ordered and collinear regressors. In the language of the paper, coefficients are unbiased and stable with lower standard errors than those from Ordinary Least Squares [2402.17103].

## 3. Temporal order, recursive structure, and treatment-effect interpretation

The causal interpretation of GSFR enters when the regressors $x_1,\dots,x_K$ arise in time order and the structural system is recursive, so that each $x_j$ has a direct-plus-indirect total effect on $y$ through later regressors. In that setting, $\hat\beta_{GS,j}$ is an unbiased estimate of the total derivative $\partial y/\partial x_j$, understood as the sum of direct and downstream indirect effects [2402.17103].

A central distinction is between “late” and “early” treatments. When $x_j$ is a late treatment, meaning it is applied after all other covariates are fixed, Frisch–Waugh–Lovell implies that $\hat\beta_{GS,j}=\hat\beta_{OLS,j}$. The coefficient then admits the usual Angrist–Imbens “convex-weight” interpretation or ATTT/ATTU decomposition of a heterogeneous treatment effect. When $x_j$ is an early treatment, meaning it precedes and causally drives later regressors, the paper shows that
$$
\hat\beta_{GS,j}=E[y|x_j=1]-E[y|x_j=0].
$$
Accordingly, under zero-conditional-mean and linear-probability ignorability assumptions, $\hat\beta_{GS,j}$ is directly interpretable as the Average Total Treatment Effect on the Treated (ATTT) [2402.17103].

This formulation is designed for settings in which multicollinearity is entangled with causal ordering. The paper’s claim is not merely computational. Rather, chronological ordering changes coefficient interpretation: GSFR is intended to recover direct-plus-indirect causal total effects when a sensible temporal ordering of covariates is available [2402.17103].

## 4. Extension to ordered blocks and simultaneous regressors

The same paper extends GSFR to data in which some regressors are simultaneous within blocks while blocks themselves are ordered in time. The design matrix is partitioned into $M$ ordered blocks $X_{(1)},\dots,X_{(M)}$, where within each block regressors may be simultaneous and mutual partial regressions are therefore omitted [2402.17103].

The block procedure is defined as follows. Block 1 is kept as is. For block 2, each column of $X_{(2)}$ is regressed on all of $X_{(1)}$, and the residuals are stored as $U_{(2)}$. More generally, for block $m$, $X_{(m)}$ is regressed on $[X_{(1)}\ \dots\ X_{(m-1)}]$, and the residuals are stored as $U_{(m)}$. The final regression is then run on
$$
[X_{(1)},U_{(2)},\dots,U_{(M)}].
$$
The coefficient on each $U_{(m),j}$ is interpreted as the partial derivative of $y$ along the path that enters through block $m$’s $j$-th regressor, preserving all indirects via later blocks but excluding unidentifiable feedback within a block [2402.17103].

The paper states that the finite-sample properties established for scalar ordering carry through mutatis mutandis in the block setting: orthogonality across blocks, unbiasedness for block-total effects, variance less than or equal to OLS, and zero omitted-block bias. This generalization places GSFR between fully recursive systems and designs with contemporaneous simultaneity, rather than forcing a single-variable time order on all regressors [2402.17103].

## 5. Reanalyses of the NSW program and NLSY reading scores

Cross and Buccola illustrate GSFR by reanalyzing two studies that controlled for temporally ordered and collinear characteristics, including race, education, and income. In both applications, the paper states that GSFR removes the collinearity among regressors so that each coefficient is estimated in isolation, yields strictly lower standard errors than OLS, recovers direct-plus-indirect causal total effects when regressors are chronologically ordered, and generalizes to mixed recursive/simultaneous designs by orthogonalizing across blocks rather than within them [2402.17103].

In the National Supported Work (NSW) program application, $X$ included race (black/not), age, education, degree-status, marriage, and final treatment program-participation. OLS reports a direct “black” effect of $-2.23\ (0.28)$, whereas GSFR reports a total effect of $-3.74\ (0.25)$. The extra $-1.51$ points is described as the systemic component via lower education, marriage, and related downstream channels. The program itself was a late treatment, so its GSFR estimate equals OLS at $-3.47\ (0.71)$. Race, treated as an early treatment, admits $ATTT=-3.74$ with $SE\ 0.26$, and OLS mixing-weight decompositions confirm that GSFR recovers the ATTT exactly [2402.17103].

In the NLSY reading-scores application, $X$ included mother’s race, age, education, and AFQT; spouse presence and education; child’s age and gender; family size and log-income; and year dummies. OLS yields a direct “nonwhite” effect of $-0.40(0.67)$, which is insignificant, whereas GSFR yields a total effect of $-10.83(0.55)$ points. The paper attributes the shift to mother’s lower school-grade completion, reported as $-1.11$ grades, multiplied by a child-grade effect of $1.80$ points, plus AFQT chains and related indirect paths. Family log-income is a late treatment: OLS gives $+2.31(0.74)$ and GSFR gives the same $+2.31$ with no inflation of standard error, together with a decomposed ATTT of $+1.91(0.75)$ in a larger heterogeneous-effect decomposition. The authors summarize the method as expanding Bohren et al.’s decomposition of systemic discrimination into channel-specific effects and improving significance levels [2402.17103].

## 6. GSFR for ultra-high dimensional forward variable selection

A different use of the name GSFR appears in the ultra-high dimensional linear-regression literature. Here the model is centered,
$$
y_t=\sum_{j=1}^p \beta_j x_{tj}+\varepsilon_t,\qquad t=1,\dots,n,
$$
with $E(x_{tj})=0$, $\mathrm{Var}(x_{tj})=1$, and mean-zero errors independent of $x_t$. At stage $k$, after selecting indices $J_{k-1}=\{j_1,\dots,j_{k-1}\}$, the method maintains for each candidate variable its Gram–Schmidt residual $x_{tj;J_{k-1}}^\perp$, namely the part of $x_{tj}$ orthogonal to the span of the selected variables, together with the current fitted value of $y_t$ on the selected set. GSFR then selects the next variable by the largest absolute unique-contribution correlation, defined in population form as
$$
\mu_{J,i}=
\frac{E[\{y(x)-y_J(x)\}x_{i;J}^\perp]}
{\sqrt{E[(y(x)-y_J(x))^2]}\sqrt{E[(x_{i;J}^\perp)^2]}}.
$$
The sample algorithm initializes with $J_0=\varnothing$, $\hat y_t^{(0)}=0$, and $x_{tj;\varnothing}^\perp=x_{tj}$, iterates up to a pre-specified maximum $K_n$ such as $K_n\asymp \lfloor 5\sqrt{n/\ln p}\rfloor$, updates the fitted value by regressing the residual on the newly selected orthogonal direction, and updates all remaining candidates by rank-one Gram–Schmidt residualization [2507.04668].

This GSFR is explicitly compared with Forward Regression (FR) and the Orthogonal Greedy Algorithm (OGA). FR adds the variable that gives the greatest decrease in residual sum of squares and requires refitting OLS on increasingly large subsets via matrix projections. OGA selects by the absolute marginal correlation of the raw residual with each original $x_j$, then re-orthogonalizes the design. GSFR differs from OGA only in the denominator: OGA normalizes by the total variance of $x_i$, whereas GSFR normalizes by the variance of the unique part of $x_i$ uncorrelated with selected variables. The paper states that this correction avoids over-valuing collinear noise variables. It also states that GSFR and FR produce the same selection path up to stopping, but GSFR replaces full-matrix projections by rank-one Gram–Schmidt updates, reducing per-step cost from $O(n|J|^2+|J|^3)$ to $O(np)$ for $n\ll p$ [2507.04668].

The method introduces a model-size selection rule based on ratio drops in marginal-variance reductions along the GSFR path. With nested sets $J_0\subset J_1\subset \cdots \subset J_{K_n}$, the ideal stopping index is
$$
\tilde k_n=\min\{k:\text{ all true predictors are included in }J_k\},
$$
or $K_n$ if none. The final model size is selected by
$$
\hat k_n=\arg\min_{1\le m\le K_n-1}\hat\Delta_{J_m},
$$
where $\hat\Delta_{J_m}$ is the sample ratio-drop statistic defined in the paper. Under assumptions including $p=p_n\gg n$, $\ln p=o(n)$, light tails for $x$ and $\varepsilon$, weak sparsity $\sum|\beta_j|<\infty$, and $K_n=O(\sqrt{n/\ln p_n})$, the paper proves a convergence rate
$$
E[(y-\hat y_m)^2\mid \text{data}]=O_p\!\left(m^{-1}+\frac{m\ln p}{n}\right),
$$
sure screening under stronger sparsity and invertibility conditions, and stopping consistency in the sense that $P(\hat k_n=\tilde k_n)\to 1$ [2507.04668].

The empirical study compares GSFR with OGA+HDBIC, FR+BIC, and GSFR with full $n$ steps in simulated models with $p=2000,4000$ and $n=100,200$. Metrics include coverage probability, false-negative and false-positive rates, best model size, selected model size, running time, in-sample RSS, and out-of-sample MSPE. The reported findings are that GSFR achieved comparable or higher coverage than FR, much lower false positives and smaller models, and dramatically faster computation than FR; against OGA, GSFR had higher coverage and lower MSPE, especially when predictors were strongly correlated; and stopping at $K_n$ gave almost identical performance to full-step GSFR with approximately $100\times$ speedup. In the riboflavin gene-expression example $(n=71,p=4081)$, GSFR selected approximately $2$–$3$ genes, ran in approximately $0.16\,\mathrm{s}$, and achieved the lowest MSPE, approximately $0.67$, compared with OGA at approximately $0.83$ and FR at approximately $0.68$ [2507.04668].

## 7. Exact OLS computation, numerical issues, and scope of the term

In another strand of work, GSFR denotes an exact method for solving least squares without computing a pseudo-inverse matrix. One formulation observes the standard linear model
$$
y=X\beta+\varepsilon
$$
and contrasts GSFR with the ordinary least squares expression
$$
\hat\beta_{\mathrm{OLS}}=(X^\top X)^{-1}X^\top y=X^+y.
$$
The stated motivation is to avoid explicit computation of $(X^\top X)^{-1}$, which costs $O(k^3)$ and can be numerically unstable if $X^\top X$ is ill-conditioned. Using classical Gram–Schmidt to build $Q$ and $R$, GSFR computes the fitted values by orthogonal projection and recovers the coefficients by solving the upper-triangular system. The paper reports factorization cost $O(nk^2)$, projection cost $O(nk)$, back-substitution cost $O(k^2)$, and total cost $O(nk^2)$, compared with $O(nk^2+k^3)$ for the pseudo-inverse route. It also states exact equivalence to OLS in exact arithmetic and recommends Modified Gram–Schmidt or reorthogonalization for numerical reliability [1311.1835].

The non-normalized formulation dispenses with square-root normalizations. It constructs orthogonal vectors $q_i$, forms the upper-triangular matrix $U$ with diagonal entries $\langle q_i,q_i\rangle$, forms $u_y=Q^\top y$, and solves
$$
U\hat\beta=u_y
$$
by backward substitution. Its stated total cost is approximately $O(np^2)$, versus $O(np^2+p^3)$ for direct computation through $X^\top X$. The paper notes that non-normalized classical Gram–Schmidt can lose orthogonality in floating-point arithmetic when columns are nearly collinear, and suggests re-orthogonalization, Modified Gram–Schmidt ordering, pivoting, or Householder QR for greater stability. It also states that the same code generalizes to weighted least squares by replacing the inner product $\langle u,v\rangle$ with $u^\top Wv$ [2301.01854].

Across these papers, GSFR therefore names related but distinct procedures. In the causal setting, it changes coefficient interpretation by imposing temporal order and targeting total effects. In the ultra-high dimensional selection setting, it is theoretically equivalent to FR except for the stopping rule and uses unique-part correlations to construct the selection path. In the QR-based least-squares setting, it is a computational mechanism for obtaining the exact OLS minimizer without forming or inverting the normal equations. A common source of confusion is to treat these as interchangeable; the literature surveyed here instead indicates that GSFR is best understood as a Gram–Schmidt-based forward framework whose statistical meaning depends on the surrounding model class and inferential objective.

Source: https://www.emergentmind.com/topics/gram-schmidt-forward-regression-gsfr