Higher-order Singular Value Decomposition

The Higher-order Singular Value Decomposition (HOSVD) is the generalization of the matrix SVD, also called an orthogonal Tucker decomposition. HOSVD is used in cases where the solution snapshots are most naturally condensed into generalized matrices (tensors) and do not lend themselves naturally to vectorization. Let \(A \in \mathbb{R}^{I_1 \times I_2 \times ,..,\times I_N}\) be an input Nth-order tensor containing the solution snapshots from a numerical simulation. The HOSVD decomposes \(A\) as

\[A = S \times_1 \mathbf{U}^{(1)} \times_2 \mathbf{U}^{(2)}...\times_N \mathbf{U}^{(N)}\]

where \(\times_N\) denotes an n-mode tensor-matrix product.

By the above equation and the commutative property of n-mode product, one can obtain the following relation

\[S = A \times_1 {\mathbf{U}^{(1)}}^{T} ...\times_N {\mathbf{U}^{(N)}}^{T}\]

By using the properties of the n-mode product together with the definitions of Kronecker product, one can compute the n-mode unfolding of \(A\) as

\[A_{n} = \mathbf{U}^{(n)} S_{n} (\mathbf{U}^{(n+1)} \otimes \cdot\cdot\cdot \otimes \mathbf{U}^{(N)} \otimes \mathbf{U}^{(1)} \otimes \cdot\cdot\cdot \otimes \mathbf{U}^{(n-1)})^T\]

The ordering and orthogonality properties of \(S\) imply that \(S(n)\) has mutually orthogonal rows with Frobenius norms equal to \(\sigma_1^{n},\sigma_2^{n},...,\sigma_{I_n}^{n}\). Since the right and left resulting matrices in the above equation are both orthogonal the following can be defined

\[\Sigma^{(n)} = \text{diag}(\sigma_1^{n},\sigma_2^{n},...,\sigma_{I_n}^{n})\]

Classical SVD must be performed to the unfolded matrices as

\[A = \mathbf{U}^{(n)} \Sigma^{(n)} {\mathbf{V}^{(n)}}^T\]

The HOSVD provides a set of bases \(\mathbf{U}^{(1)},...,\mathbf{U}^{(N-1)}\) spanning each dimension of the snapshots plus a basis, \(\mathbf{U}^{(N)}\), spanning across the snapshots and the orthogonal core tensor, which generalizes the matrix of singular values. Finally, the reconstructed tensor can be computed as follows

\[W(\xi_{k}) = \Sigma \times_1 \mathbf{U}^{(1)} \times_2 \mathbf{U}^{(2)} \cdot\cdot\cdot \times_N \mathbf{U}^{(N)}( \xi_{k})\]

where \(\mathbf{U}(N))( \xi_{k})\) has dimension \(n \times 1\), where n is the number of snapshots and corresponds to the kth column of \(\mathbf{U}(N)\) and is the number of independent bases that account for the desired accuracy of the reconstruction.

More information can be found in [7], [8].

HOSVD Class

The HigherOrderSVD class is imported using the following command:

>>> from UQpy.dimension_reduction.hosvd.HigherOrderSVD import HigherOrderSVD

One can use the following command to instantiate the class HigherOrderSVD

class HigherOrderSVD(solution_snapshots, modes=10000000000, reconstruction_percentage=10000000000)[source]
Parameters:
  • solution_snapshots (Union[ndarray, list]) – Second order tensor or list containing the solution snapshots. Third dimension or length of list corresponds to the number of snapshots.

  • modes (int) – Number of modes to keep for dataset reconstruction.

  • reconstruction_percentage (Union[float, int]) – Dataset reconstruction percentage.

s3hat: ndarray

Normalized core tensor produced by the HOSVD decomposition.

u3hat: ndarray

Normalized unitary array produced by the HOSVD decomposition

u2: ndarray

Unitary array of the SVD of the second unfolded matrix.

u1: ndarray

Unitary array of the SVD of the first unfolded matrix

factorize(get_error=False)[source]

Executes the HOSVD method.

Parameters:

get_error (bool) – A boolean declaring whether to return the reconstruction error.

static unfold3d(second_order_tensor)[source]
Parameters:

second_order_tensor (ndarray) – A three-dimensional ndarray which contains the data to be unfolded.

Returns:

Three unfolded matrices in the form of two-dimensional ndarray.

static reconstruct(u1, u2, u3hat, s3hat)[source]

Reconstructs the approximated solution.

Parameters:
  • u1 (ndarray) – Unitary array of the SVD of the first unfolded matrix.

  • u2 (ndarray) – Unitary array of the SVD of the second unfolded matrix.

  • u3hat (ndarray) – Normalized unitary array produced by the HOSVD decomposition.

  • s3hat (ndarray) – Normalized core tensor produced by the HOSVD decomposition

Returns:

An ndarray containing the reconstruction of the approximated solution.