Papers
Topics
Authors
Recent
Search
2000 character limit reached

Two-Level QR/Givens Factorization

Updated 1 February 2026
  • Two-Level QR/Givens Factorization is a hierarchical method that splits the QR process into local (per-block) and global reduction phases to minimize communication.
  • It features parallel and sequential implementations, using binary and flat tree structures to optimize computations across distributed and out-of-core environments.
  • The approach integrates with CAQR and leverages both Householder and Givens rotations, ensuring numerical stability while approaching lower bounds for data movement.

A two-level QR/Givens factorization refers to hierarchical algorithms for computing the QR factorization of matrices—specifically, approaches such as the Tall Skinny QR (TSQR) and its Givens-rotation variant—which minimize communication and optimize computational efficiency for both parallel and sequential platforms. These methods are constructed from sequences of orthogonal transformations and are foundational in broader communication-avoiding factorizations such as CAQR (Communication-Avoiding QR), which targets distributed and large-scale linear algebra problems (0806.2159).

1. Structural Hierarchy of Two-Level TSQR

TSQR factors an m×nm \times n matrix AA using two levels of orthogonal transformations. The matrix is partitioned into PP block-rows A0,,AP1A_0, \ldots, A_{P-1}, each of size mP×n\frac{m}{P} \times n. The algorithm comprises:

First level (local QR): Each processor ii performs a Householder QR factorization on its block AiA_i: Ai=Qi,0Ri,0,Qi,0=j=1n(Iτjivji(vji)T)A_i = Q_{i,0} R_{i,0}, \qquad Q_{i,0} = \prod_{j=1}^n (I - \tau^i_j v^i_j (v^i_j)^T) where vjiv^i_j are local Householder vectors and τji\tau^i_j their scalars.

Second level (global reduction): The upper triangular AA0 from each block-row are stacked in a pairwise manner along a binary tree structure. At each level AA1, matrices AA2 and AA3 are concatenated: AA4 and a new QR factorization is computed: AA5 The process recurses until the root yields the global AA6.

The overall block notation for the two-level factorization is: AA7 This design explicitly exposes the hierarchical communication and computation pattern inherent in TSQR (0806.2159).

2. Algorithmic Implementations and Pseudocode

Two principal implementations leverage this structure: a parallel version utilizing a binary reduction tree and a sequential “flat tree” version optimal for out-of-core settings.

Parallel TSQR: The matrix data are distributed in a 1-D block row layout, with the reduction following a binary tree across AA8 processors. The essential steps are:

  1. Local QR on each block AA9 to obtain PP0.
  2. For PP1 to PP2:
    • If processor PP3 is first in its pair, it receives a block PP4, stacks, computes QR, and sends PP5 upward unless it is at the root.
    • Otherwise, it sends PP6 and exits.

Sequential TSQR: Optimized for disk-resident data, the process reads one block at a time into fast memory, factors the first block, and successively stacks and factors with the previous PP7:

  1. Read PP8; compute QR.
  2. For PP9 to A0,,AP1A_0, \ldots, A_{P-1}0:
    • Read A0,,AP1A_0, \ldots, A_{P-1}1, stack with A0,,AP1A_0, \ldots, A_{P-1}2, compute QR.

Both versions retain the A0,,AP1A_0, \ldots, A_{P-1}3 and A0,,AP1A_0, \ldots, A_{P-1}4 vectors/matrices, thus storing A0,,AP1A_0, \ldots, A_{P-1}5 in a compact, implicit form.

3. Communication and Computational Complexity

Letting A0,,AP1A_0, \ldots, A_{P-1}6 denote latency, A0,,AP1A_0, \ldots, A_{P-1}7 inverse bandwidth, and A0,,AP1A_0, \ldots, A_{P-1}8 flop time, TSQR optimally minimizes data movement within the constraints of hierarchical memory or distributed-memory settings:

Parallel TSQR (on A0,,AP1A_0, \ldots, A_{P-1}9, with mP×n\frac{m}{P} \times n0):

  • Floating-point operations: mP×n\frac{m}{P} \times n1
  • Words moved: mP×n\frac{m}{P} \times n2
  • Messages: mP×n\frac{m}{P} \times n3

Sequential TSQR (memory mP×n\frac{m}{P} \times n4):

  • Flops: mP×n\frac{m}{P} \times n5
  • Words: mP×n\frac{m}{P} \times n6
  • Messages: mP×n\frac{m}{P} \times n7

These asymptotic bounds show that TSQR and its variants approach known lower bounds for communication volume and latency, up to polylogarithmic factors (0806.2159).

4. Numerical Stability and Comparison

TSQR is composed strictly of orthogonal transformations—either Householder reflectors or Givens rotations—guaranteeing the same backward error bounds as classical Householder QR:

  • mP×n\frac{m}{P} \times n8; orthogonality is preserved to machine precision.

In contrast, alternative QR algorithms have weaker stability properties:

  • CholeskyQR: mP×n\frac{m}{P} \times n9 loss of orthogonality.
  • Modified Gram-Schmidt: ii0.
  • Classical Gram-Schmidt: arbitrarily poor for ill-conditioned matrices.

TSQR is thus especially preferable for ill-conditioned problems where loss of orthogonality is a concern (0806.2159).

5. Givens-Rotation Variant of Two-Level Factorization

The TSQR scheme can be implemented with Givens rotations instead of Householder reflectors. For each local block ii1, Givens rotations ii2 are applied sequentially to eliminate sub-diagonal entries. The reduction phase replaces the local QR with the application of a block of Givens rotations to stack pairs of ii3 upper-triangular ii4 factors, with the ii5 parameters recorded for reconstructing ii6 or ii7 via forward or reverse application.

Critically, the communication profile (in terms of words moved and messages) remains unchanged in the Givens variant relative to the Householder approach, affecting only local computational patterns (0806.2159).

6. Integration in Communication-Avoiding QR (CAQR)

CAQR applies TSQR as its panel factorization primitive within a more general 2D block-cyclic data layout. For a general ii8 matrix distributed on a ii9 grid:

  1. Each panel is factored using TSQR across the AiA_i0 processors corresponding to that block column.
  2. The resulting AiA_i1 factors (AiA_i2 and AiA_i3 representations) are broadcast across processor rows.
  3. The AiA_i4 transformation is applied to update the trailing matrix blocks, following TSQR logic.

CAQR thus achieves the optimal computational bound AiA_i5 and matches known lower bounds for words and messages in the 2D setting, modulo polylogarithmic factors:

  • Words: AiA_i6
  • Messages: AiA_i7

The optimality of CAQR directly follows from the communication and compute properties of its TSQR component (0806.2159).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Two-Level QR/Givens Factorization.