An Efficient and Robust Projection Enhanced Interpolation Based Tensor Train Decomposition Thanks: D. Hayes and J.-M. Qiu acknowledge support provided by Department of Energy DE-SC0023164. J.-M. Qiu also acknowledges support provided by Air Force Office of Scientific Research FA9550-24-1-0254. T. Shi acknowledges support provided by the Director, Office of Science, Office of Advanced Scientific Computing Research , of the U.S. Department of Energy under Contract No. DE-AC02-05CH11231. This research used resources of the National Energy Research Scientific Computing Center (NERSC), a Department of Energy User Facility using NERSC award under the Contract No. DE-AC02-05CH11231. This research was supported in part through the use of DARWIN computing system at the University of Delaware supported by NSF under Grant Number 1919839. Daniel Hayes, Jing-Mei Qiu, Tianyi Shi Abstract The tensor-train (TT) format is a data-sparse tensor representation commonly used in high dimensional data approximations. In order to represent data with interpretability in data science, researchers develop data-centric skeletonized low rank approximations. However, these methods might still suffer from accuracy degeneracy, nonrobustness, and high computation costs. In this paper, given existing skeletonized TT approximations, we propose a family of projection enhanced interpolation based algorithms to further improve approximation accuracy while keeping low computational complexity. We do this as a postprocessing step to existing interpolative decompositions, via oversampling data not in skeletons to include more information and selecting subsets of pivots for faster projections. We illustrate the performances of our proposed methods with extensive numerical experiments. These include up to 10D synthetic datasets such as tensors generated from kernel functions, and tensors constructed from Maxwellian distribution functions that arise in kinetic theory. Our results demonstrate significant accuracy improvement over original skeletonized TT approximations, while using limited amount of computational resources. Keywords: Tensor-Train, skeletonized approximation, dimension reduction, oversampling, oblique projection 1 Introduction A wide range of applications involve multidimensional data as observations or solutions. These datasets are often referred to as tensors [ 29 , 1 ] , and a general tensor \mathcal{X}\in\mathbb{C}^{n_{1}\times\cdots\times n_{d}} requires a storage cost of \prod_{j=1}^{d}n_{j} degrees of freedom. This scales exponentially with the dimension d , and is often referred to as “the curse of dimensionality” (CoD). Tensors are higher order analogues of matrices, so a common way to alleviate CoD is to represent tensors with low rank approximations, similar to data-sparse matrix approximations. The Eckart-Young theorem [ 18 ] bounds singular values of a matrix, thus guaranteeing optimal low rank approximation through the singular value decomposition (SVD), but it does not hold for multi-linear algebra. As a result, researchers develop a handful of low rank tensor formats, including canonical polyadic (CP) [ 27 ] , Tucker [ 10 ] and hierarchical Tucker [ 22 ] , tensor-train (TT) [ 35 ] and quantized TT [ 14 ] , and tensor networks [ 21 ] with more complex geometries. In particular, because of the close connections with matrices for algorithmic designs and linear scaling with respect to storage cost, the TT format, also known as the matrix product state (MPS) in tensor networks and quantum physics, is widely used in applications such as molecular simulations [ 38 ] , high-order correlation functions [ 31 ] , partial differential equations [ 24 , 11 , 19 ] , constrained optimization [ 13 , 2 ] , and machine learning [ 44 , 33 ] . Although SVD provides best low rank matrix approximations, it is computationally expensive. In practice, for low rank approximations with accuracy bounds, researchers use other sub-optimal algorithms, including randomized SVD [ 25 ] , matrix sketching via randomized range finder [ 25 ] , rank-revealing QR [ 4 ] , and so on. These methods have the common feature that they are all based on operations to project a full rank matrix onto lower-dimensional subspaces, and the matrices to represent the projector have orthonormal (ON) columns. These methods, including SVD, are often referred to as orthogonal factorizations or projection-based factorizations. By applying these projection-based factorizations on tensor unfoldings, one can build low rank TT approximations with deterministic and randomized TTSVD [ 35 , 6 ] and randomized TT sketching [ 40 , 30 ] . In some application areas such as data analysis, researchers sometimes want to represent data as a linear combination of a selected subset of data for better interpretability. This leads to skeletonized or interpolation-based matrix and tensor low rank approximations, where the low rank factors are constructed with a subset of the data structure. In the matrix regime, such algorithms include the interpolative decomposition (ID) [ 7 , 23 ] , CUR [ 32 , 26 ] , adaptive cross approximation (ACA) [ 45 ] , and etc.. For tensors, and specifically the TT format, the commonly used ones are cross (TT-cross) [ 34 , 11 ] and adaptive cross (TTACA) [ 34 , 12 , 39 ] . Unlike projection-based algorithms, interpolation-based algorithms do not need to access all elements of the data. They provide sub-optimal low rank approximations, but avoid CoD especially for high dimensional tensors. The key procedure in the skeletonized algorithms is to find the “pivots”, or “skeletons” of the data, i.e., important indices to represent a given dimension of the matrix or tensor. There are various criteria and methods for the pivot selection, including maximum volume [ 3 ] , statistical leverage scores [ 32 ] , discrete empirical interpolation method (DEIM) from model order reduction [ 42 , 5 ] , greedy approaches based on approximation differences [ 9 , 15 , 12 ] , etc.. In practice for matrices, we observe that pivots selected via different approaches share a large overlap, and can all lead to reasonable matrix approximations. Therefore, in this work, we focus on methods that only need to traverse through linearly-scaled number of tensor entries with respect to the mode size, such as the greedy method. These approaches are thus termed to have a linearly-scaled complexity, and indicate that they are suitable for large datasets. In spite of computational efficiency, interpolation-based approximations might suffer from instability and non-robustness from noisy data [ 37 ] . One remedy is to use the skeletonized decomposition as an initial guess for constructing orthogonal factors, from which one could construct a projection-based approximation. Such projection-based approximation becomes a post-processing step of an existing interpolation-based decomposition for robustness and accuracy. It is the focus of this manuscript, and we call such a method “projection enhanced interpolation-based decomposition” (PEID). Specifically, the baseline routine of PEID for matrices can be briefly described as the following: we find bases with ON columns for the skeletonized low rank factors using rank-revealing QR, and then we form a low rank approximation using projections of the orthogonal factors (see section 2.4 for more details). We extend this method to work on the TT format for tensors, with modifications so that the algorithms can be efficiently and accurately applied to high-dimensional data. PEID methods work well when a linearly-scaled ACA serves as the interpolation-based initial guess, and the additional computations from projections are still affordable. However, PEID faces some potential challenges: 1. The accuracy of the approximation depends heavily on the quality of the chosen skeleton in representing full data. This is particularly true for linearly-scaled ACA, where heuristics or greedy criterion are used to ensure efficiency in interpolation, so some important information might be hiding in data not selected. 2. The overall complexity of PEID is bounded by projections, which includes finding basis with ON columns through QR, SVD, etc., and conducting projections via matrix-matrix multiplication. This becomes particularly troublesome for high dimensional tensors, as these operations involve matrices related to tensor unfoldings. Therefore, using full matrices in projections directly result in “full-complexity” methods, whose algorithmic complexity is dominated by high-degree polynomials of the mode size, and it incurs CoD. In this manuscript, we propose two strategies in addressing the above mentioned challenges, with details described in section 2.4 . • We oversample indices from unselected skeletons [ 8 ] to improve interpolation accuracy. This is similar to the oversampled CUR [ 36 ] and Gappy proper orthogonal decomposition (GappyPOD) [ 37 ] from DEIM [ 5 ] . Since we use low-cost linearly-scaled ACA, we simply use uniform oversampling with little computational overhead. In comparison, in [ 37 ] , DEIM with uniform oversampling is referred to as GappyPOD + R, and oversampling generated via singular value information is GappyPOD + E. Although GappyPOD + E is the winner technique in terms of accuracy improvement, it is significantly more expensive to compute. • We select submatrices of the orthogonal factors to perform oblique projections [ 20 ] , in order to reduce the complexity of full orthogonal projections. As ACA skeletons are good representations of the dataset, we propose to use them for selection of effective submatrices. See right panel of fig. 2 for a comparison of oblique projection with pivots and full orthogonal projection in terms of accuracy for matrix approximations. In this paper, we propose a family of PEID algorithms for high-dimensional tensors in the TT format. Such algorithms oversample from indices uncovered by skeletonized pivots, and select most informative submatrices for oblique projections across all tensor unfoldings. The proposed algorithms can be thought of as a low-cost post-processing step for skeletonized TT approximation, to further improve accuracy and stability. In order to reuse skeletonized pivots during the phase of oblique projections, our algorithms require that the pivot indices are nested (see section 2.3 for the definition of nestedness of indices in tensors), but it is straightforward to extend to non-nested pivots. Our proposed methods are designed with similar oversampling ideas, but they differ on whether the oversampled indices are nested. To be specific, Parallel-TT-oversampling ( algorithm 3 ) and Parallel-TT-oversampling-2sided ( algorithm 5 ) require the oversampled indices to be nested, so building TT cores can be conducted in a dimension parallel manner, but the choices for oversampling are significantly limited. Comparatively, TT-oversampling ( algorithm 4 ) and TT-oversampling-2sided ( algorithm 6 ) do not have this nestedness requirement, leading to sequential algorithm execution and broader oversampling choices. Two-sided versions can be viewed as extensions of matrix PEID, where orthogonal bases are generated for both row and column spaces, such as CUR or two-sided ID. In contrast, one-sided TT algorithms are higher-order analogues of matrix PEID that uses ID as the interpolation-based approximation. Finally, if we have sufficient computational power, we design TT-oversampling-rounding ( algorithm 7 ) that uses two one-sided runs to aim for a better approximation via augmentation and rounding. The remainder of the manuscript is organized as follows. Section 2 reviews some necessary tensor notations, the TT format, skeletonized approximations, and details of matrix PEID with accuracy and stability improvements. In section 3 , we introduce new PEID algorithms for the TT format. Finally, we demonstrate the performance on a variety of practical datasets in section 4 . 2 Tensor notations and basic algorithms for matrix and tensor decompositions In this section, we review some tensor notations, the TT format for low rank tensor approximations, skeletonized matrix and tensor decompositions, and the PEID method with improvements for matrix approximations. 2.1 Tensor notations We use lower case letters for vectors, capital letters for matrices, and calligraphic capital letters for tensors. The number of entries for one dimension of a tensor is referred to as the mode size. We use MATLAB-style symbol “:” to represent all the indices in one specific dimension. For example, if \mathcal{Y} is a 3D tensor, then \mathcal{Y}(:,j,:) denotes the j th lateral slice of \mathcal{Y} , and \mathcal{Y}(:,:,k) denotes its k th mode-3 fiber. In addition, we use calligraphic capital letters for index sets in submatrix and subtensor selection. For example, A(\mathcal{L},:) is a submatrix of A with rows of A selected from the set \mathcal{L} . We use the MATLAB command “reshape” for the transformation between matrices and tensors. The new structure is constructed according to the desired multi indexing, without changing the element ordering. For example, if \mathcal{Y}\in\mathbb{C}^{n_{1}\times n_{2}\times n_{3}} , then Z={\rm reshape}(\mathcal{Y},n_{1}n_{2},n_{3}) is a matricized output of size n_{1}n_{2}\times n_{3} . Each column Z(:,j) of Z constitutes of elements from the corresponding frontal slice \mathcal{Y}(:,:,j) . In reverse, we have \mathcal{Y}={\rm reshape}(Z,n_{1},n_{2},n_{3}) . For a d -dimensional tensor, there are d-1 ways to flatten the tensor into matrices via “reshaping”, and we refer to the result matrices as the unfoldings of the tensor. The majority of algorithms related to the TT tensor format relies on computations on the tensor unfoldings. Specifically, for a tensor \mathcal{X}\in\mathbb{C}^{n_{1}\times\cdots\times n_{d}} , we denote the k th unfolding as X_{k}={\rm reshape}\left(\mathcal{X},\prod_{s=1}^{k}n_{s},\prod_{s=k+1}^{d}n_{s}\right),\quad 1\leq k\leq d-1. Note that this is different from the tensor “matricizations” X_{(k)}\in\mathbb{C}^{n_{k}\times\prod_{j\neq k}n_{j}} used often in the Tucker format, where the row indices come directly from the k th tensor dimension, and the ordering of the entries changes between \mathcal{X} and X_{(k)} . 2.2 Tensor-train format The TT format of a tensor \mathcal{X}\in\mathbb{C}^{n_{1}\times\cdots\times n_{d}} is represented as \mathcal{X}_{i_{1},\ldots,i_{d}}=\mathcal{G}_{1}(:,i_{1},:)\mathcal{G}_{2}(:,i_{2},:)\cdots\mathcal{G}_{d}(:,i_{d},:),\qquad 1\leq i_{k}\leq n_{k}, where \mathcal{G}_{k}\in\mathbb{C}^{s_{k-1}\times n_{k}\times s_{k}} for 1\leq k\leq d are called the TT cores, and the vector \boldsymbol{s}=(s_{0},\ldots,s_{d}) is referred to as the size of the TT cores. For the formula to hold, we require s_{0}=s_{d}=1 . fig. 1 illustrates one TT format with TT core size \boldsymbol{s} of a tensor \mathcal{X} . It is easy to see that this TT representation has a storage cost of \sum_{k=1}^{d}s_{k-1}s_{k}n_{k} , which is linear with respect to both d and n_{k} . The storage cost is optimal if s_{k} is as small as possible for each 1\leq k\leq d-1 , and thus we define the TT rank as a vector \boldsymbol{r}=(r_{0},\ldots,r_{d}) containing entry-by-entry smallest values of the TT core size. In practice, for a balance between computational and storage efficiency, we aim for a quasi-optimal TT core size \boldsymbol{s} . There are generally two types of algorithms regarding the choice of \boldsymbol{s} : (1) rank-adaptive scheme, where \boldsymbol{s} is computed alongside the factorization steps using a given accuracy threshold; and (2) fixed-rank scheme, where \boldsymbol{s} is prior information known to the users and serve as an input to the algorithms. Algorithms in category (1) are suitable for theoretical analysis, such as TTSVD [ 35 ] , while algorithms in category (2) often excel in practical performance with fixed \boldsymbol{s} . Some examples of these algorithms include TT sketching and randomized TTSVD [ 6 , 40 ] , and TT cross [ 34 , 12 , 39 ] . It is shown in [ 35 ] that ranks of tensor unfoldings bound the TT rank from above, so we hope to use \boldsymbol{s} that satisfies r_{k}\leq s_{k}\leq{\rm rank}(X_{k}),\quad 1\leq k\leq d-1, (1) where {\rm rank}(X_{k}) is the rank of the k th unfolding of \mathcal{X} . \mathcal{X}_{i_{1},\ldots,i_{d}} = \mathcal{G}_{1}(i_{1},:) s_{0}\!\times\!s_{1} \mathcal{G}_{2}(:,i_{2},:) s_{1}\!\times\!s_{2} \cdots \mathcal{G}_{d-1}(:,i_{d-1},:) s_{d-2}\!\times\!s_{d-1} \mathcal{G}_{d}(:,i_{d}) s_{d-1}\!\times\!s_{d} Figure 1: The TT format with TT core size \boldsymbol{s}=(s_{0},\ldots,s_{d}) . Each entry of a tensor is represented by the product of d matrices, where the k th matrix in the “train” is selected based on the value of i_{k} . For completeness, we briefly outline TT-Sketching [ 6 ] (see algorithm 1 ) and Parallel-TT-Sketching [ 40 ] (see algorithm 2 ) with fixed ranks and no oversampling parameter, so that it is easier for our new proposed algorithm discussion in section 3 . In short, TT-Sketching finds TT cores by sequentially peeling off dimensions, while Parallel-TT-Sketching constructs TT cores by exploring the connections between column spaces of consecutive tensor unfoldings. Note that algorithm 2 is parallel as respective iterations in line 1 and 3 can be carried out simultaneously. Algorithm 1 TT-Sketching: Given a tensor, compute an approximant tensor in TT format using randomized sketching. 1: A tensor \mathcal{X}\in\mathbb{R}^{n_{1}\times\dots\times n_{d}} and desired TT ranks r_{1},\dots,r_{d-1} . 2: TT cores \mathcal{G}_{1},\dots,\mathcal{G}_{d} of an approximant \tilde{\mathcal{X}} . 3: Set Y=X_{1} the first unfolding of \mathcal{X} . 4: Set r_{0}=1 . 5: for 1\leq j\leq d-1 do 6: Use randomized range finder to find U_{j} with r_{j} ON columns of Y . 7: Set \mathcal{G}_{j}=\rm{reshape}(U_{j},r_{j-1},n_{j},r_{j}) . 8: Set Y=\rm{reshape}\left(U_{j}^{T}Y,r_{j}n_{j+1},\prod_{k=j+2}^{d}n_{k}\right) . 9: Set \mathcal{G}_{d}=\rm{reshape}(Y,r_{d-1},n_{d},1) . Algorithm 2 Parallel-TT-Sketching: Given a tensor, compute an approximant tensor in TT format using randomized sketching with parallelization in dimensionality. 1: A tensor \mathcal{X}\in\mathbb{R}^{n_{1}\times\dots\times n_{d}} and desired TT ranks r_{1},\dots,r_{d-1} . 2: TT cores \mathcal{G}_{1},\dots,\mathcal{G}_{d} of an approximant \tilde{\mathcal{X}} . 3: for 1\leq j\leq d-1 do 4: Use randomized range finder to find U_{j} with r_{j} ON columns of X_{j} . 5: for 1\leq k\leq d-2 do 6: Calculate W_{k+1}=U_{k}^{T}\ {\rm reshape}(U_{k+1},\prod_{i=1}^{k}n_{i},n_{k+1}r_{k+1}) . 7: Set \mathcal{G}_{k+1}={\rm reshape}(W_{k+1},r_{k},n_{k+1},r_{k+1}) . 8: Set \mathcal{G}_{1}=U_{1} and \mathcal{G}_{d}=U_{d-1}^{T}X_{d-1} . 2.3 Skeletonized matrix and tensor decomposition For matrices, if \mathcal{I} and \mathcal{J} are two index sets to denote the “skeletons” of rows and columns respectively, then one can approximate a matrix A by A\approx\tilde{A}=CUR , where C=A(:,\mathcal{J}) and R=A(\mathcal{I},:) . In this paper, we construct U by U=C^{\dagger}AR^{\dagger} since it is easier to do projection enhancement. Alternatively, one can also use U=A(\mathcal{I},\mathcal{J})^{-1} . For the TT format, we need multiple pivot sets \mathcal{I}_{\leq k} and \mathcal{J}_{>k} with 1\leq k\leq d-1 . For easier understanding, \mathcal{I}_{\leq k} and \mathcal{J}_{>k} can be perceived as the pivot sets for the k th unfolding of the target tensor \mathcal{X} . Using these pivot sets, the TT cores can be obtained via \displaystyle\mathcal{G}_{1} \displaystyle=X_{1}(:,\mathcal{J}_{>1}),\ \mathcal{G}_{d}=Y_{d-1}X_{d-1}(\mathcal{I}_{\leq d-1},:), \displaystyle\mathcal{G}_{k} \displaystyle=\rm{reshape}\left(Y_{k-1}X_{k-1}(\mathcal{I}_{\leq k-1},\mathbb{I}_{k}\otimes\mathcal{J}_{>k}),r,n,r\right),\ 2\leq k\leq d-1, (2) where Y_{k}=X_{k}(:,\mathcal{J}_{>k})^{\dagger}X_{k}X_{k}(\mathcal{I}_{\leq k},:)^{\dagger},\quad 1\leq k\leq d-1, (3) \mathbb{I}_{k} denotes all indices for dimension k , and we assume \mathcal{X} has uniform mode size n and all index sets have cardinality r . One can easily tell that computing Y_{k} naively with “full-complexity” algorithms is very expensive because of the size of X_{k} . In some interpolation-based decomposition algorithms for the TT format, the pivot sets are chosen to be nested, i.e. \displaystyle\mathcal{I}_{\leq k+1} \displaystyle\subseteq\mathcal{I}_{\leq k}\otimes\mathbb{I}_{k+1}, \displaystyle\mathcal{J}_{>k} \displaystyle\subseteq\mathcal{J}_{>k+1}\otimes\mathbb{I}_{k+1},\quad 1\leq k\leq d-2. (4) This ensures that the original tensor and the approximation to match exactly at the interpolated skeletons. In this manuscript, since we are motivated to improve upon linearly-scaled interpolation-based decomposition such as TTACA, which constructs nested pivot sets using a greedy criterion, we enforce nestedness of pivots for our proposed algorithms. Nevertheless, it is straightforward to extend our algorithms if the pivots obtained via skeletonized approximation are not nested. 2.4 Projection enhancement for matrix interpolation-based approximations Using C and R directly to build U=C^{\dagger}AR^{\dagger} via oblique projections can have potential problems from data degeneracy or noises. For example, if A has a low numerical rank using a relatively large accuracy tolerance, then C and R are highly linearly dependent, and thus we cannot achieve high accuracy using U=C^{\dagger}AR^{\dagger} . Figure 2 (Left) illustrates this with the Hilbert matrix (see blue curve). What is more, in other scenarios, perturbations due to noises can cause columns in C (or rows in R ) to be linearly dependent, affecting the result approximation. In fact, since our target of using C^{\dagger} is to find a representation of the column space of A (row space of A with R^{\dagger} accordingly), we can use alternatives that are more stable than the pseudo-inverse. For instance, we compute QR decomposition on C=Q_{C}R_{C} and R^{T}=Q_{R}R_{R} , and use Q_{C} and Q_{R} to improve the original interpolation-based decomposition via orthogonal projection. In this way, we construct U=Q_{C}^{T}AQ_{R}, (5) leading to the result approximation A\approx Q_{C}UQ_{R}^{T} . In the Hilbert matrix example, such construction can effectively lead to more accurate approximation, up to machine precision (see red curve in fig. 2 (Left)). For the TT format, we substitute X_{k}(:,\mathcal{J}_{>k}) and X_{k}(\mathcal{I}_{\leq k},:) in eq. 2 and eq. 3 with their bases consisting of ON columns. Due to the two challenges posted in section 1 for TT format, there are essential needs to introduce schemes for more efficient and accurate computations. In this section, we briefly summarize two methodologies for matrix CUR and PEID. In [ 20 ] , the authors propose to select submatrices of Q_{C} and Q_{R} to perform projections. In other words, to avoid using the full matrix A in building U=Q_{C}^{T}AQ_{R} , one can select index sets \mathcal{S} and \mathcal{T} with some sampling routines, and calculate U by U=Q_{C}(\mathcal{S},:)^{\dagger}A(\mathcal{S},\mathcal{T})Q_{R}(:,\mathcal{T})^{\dagger}. (6) With certain matrices and sampling strategies [ 20 ] , this method is shown to have good approximation with high probability, but one can adopt this method as heuristics to general matrices. With \mathcal{I} and \mathcal{J} selected in the skeletonized approximation, they are ideal candidates for performing oblique projections. Therefore, we choose to use \mathcal{S}=\mathcal{I} and \mathcal{T}=\mathcal{J} , and then in the matrix case, eq. 6 becomes Figure 2: Various of ways to build CUR approximations of a 100\times 100 Hilbert matrix. Left: Demonstrating the stability of using C and R for the construction of U=C^{\dagger}AR^{\dagger} (labeled “Direct”), versus using Q_{C} and Q_{R} for U=Q_{C}^{T}AQ_{R} (labeled “QR”). Right: Skeletonized approximation errors when using varied U construction. Using eq. 5 is termed “P-Full”, eq. 7 is termed “OP-ACA”, eq. 6 where \mathcal{S},\mathcal{T} come from applying QDEIM to Q_{C} and Q_{R} is termed “OP-QDEIM”, and a random subset of 50 indices for \mathcal{S},\mathcal{T} is termed “OP-Random”. U=Q_{C}(\mathcal{I},:)^{\dagger}A(\mathcal{I},\mathcal{J})Q_{R}(:,\mathcal{J})^{\dagger}. (7) This allows us to find U efficiently and effectively, in particular when extending the algorithm to TT decomposition of high dimensional tensors. For example, for the Hilbert matrix, fig. 2 (Right) compares the approximation accuracy of building U with full data eq. 5 , partial data in eq. 7 using ACA pivots, partial data in eq. 6 with \mathcal{S} and \mathcal{T} as QDEIM pivots [ 17 ] , and \mathcal{S} and \mathcal{T} as uniformly random index selections. We can see that using well-selected submatrices from prior knowledge for oblique projections provide reasonably accurate approximations. Another recent advancement [ 8 , 36 ] avoids missing important information in unselected data by oversampling. In short, the skeletonized approximation selects interpolation matrices C=A(:,\mathcal{J}\cup\mathcal{L}),\quad R=A(\mathcal{I}\cup\mathcal{K},:), (8) where \mathcal{K} and \mathcal{L} are index sets with small cardinality for the rows and columns of A respectively, and \mathcal{K}\cap\mathcal{I}=\emptyset , \mathcal{L}\cap\mathcal{J}=\emptyset . There are various ways to oversample, with uniform oversampling the simplest and cheapest to implement yet still effective. fig. 3 gives a schematic of the approximation of a given matrix, using an oversampled, normalized, and oblique projection construction for all factors. In the left side of this figure, we assume that we have already selected candidates for \mathcal{I} (purple) and \mathcal{J} (pink). Then, we make an oversampling selection of additional \mathcal{K} (blue) and \mathcal{L} (orange). Following this, we apply a QR on selected columns and rows to obtain Q_{C},Q_{R} . Finally we subselect index sets \mathcal{S},\mathcal{T} , e.g. \mathcal{I} and \mathcal{J} from ACA, to construct the internal component eq. 6 via oblique projections. As a final remark, we emphasize that both techniques, oversampling and selecting submatrices for oblique projections, apply to matrix ID as well, where only column or row space of the matrix is interpolated and projected. This is essential to develop one-sided TT algorithms in the next section. Oversample A(:,\mathcal{J}\cup\mathcal{L}) A(\mathcal{I}\cup\mathcal{K},:)^{T} Q_{C} Subselect Q_{R} \dagger \dagger U Figure 3: Diagram of the working pieces behind the matrix level approximation using oversampled columns and rows, and submatrix selection for oblique projections. 3 Projection enhanced interpolation-based decomposition for tensor-train format In this section, we target to efficiently conduct PEID for the TT format. Given an existing skeletonized TT approximation, we propose algorithms that enhance the approximation accuracy and robustness while maintaining low costs of interpolation-based methods. We use the same tricks of repeatedly oversampling unselected indices [ 8 , 36 ] and conducting oblique projections with submatrices [ 20 ] for different tensor dimensions and unfoldings. For notational simplicity, throughout the rest of this section, we assume that \mathcal{X} has uniform mode size n ; and that the number of pivots, r , is uniform across all dimensions. We also assume that the pivot sets (\mathcal{I}_{\leq k},\mathcal{J}_{>k}) are known and are nested in the sense of eq. 4 from an existing skeletonized TT decomposition. In order to conduct fair comparisons with the original skeletonized approximation in section 4 , the resulting TT formats from our algorithms still have universal TT core size r , but it is straightforward to use other numbers, or change accordingly to rank-adaptive schemes. 3.1 Dimension parallel approach Since the pivot sets (\mathcal{I}_{\leq k},\mathcal{J}_{>k}) can be treated independently for different dimension 1\leq k\leq d-1 of a d -dimensional tensor \mathcal{X} , we start with an “embarrassingly” dimension parallel implementation (see algorithm 3 ). Algorithm 3 TT-PEID-Par: TT construction of a given tensor with prior information on existing skeletonized TT pivots with dimension parallelism. 1: Tensor \mathcal{X} , pivot sets (\mathcal{I}_{\leq j},\mathcal{J}_{>j}) , and oversampling parameter p . 2: The TT format of \mathcal{X} in the form of TT cores \mathcal{T}_{1},\dots,\mathcal{T}_{d} . 3: Set an empty index set \mathcal{K}_{\leq 0} . 4: for 1\leq j\leq d-1 do 5: Construct \mathcal{K}_{\leq j} of size p sampled uniformly from \mathcal{K}_{\leq j-1}\otimes\mathbb{I}_{j}\ \backslash\ \mathcal{I}_{\leq j} . 6: for 1\leq j\leq d-1 do 7: Construct \mathcal{L}_{>j} of size p sampled uniformly from \mathbb{I}_{j+1}\otimes\cdots\otimes\mathbb{I}_{d}\ \backslash\ \mathcal{J}_{>j} . 8: Find U_{j} with r ON columns from X_{j}\left((\mathcal{I}_{\leq j-1}\cup\mathcal{K}_{\leq j-1})\otimes\mathbb{I}_{j},\mathcal{J}_{>j}\cup\mathcal{L}_{>j}\right) . 9: Set \tilde{U}_{j}=\rm{reshape}(U_{j},r+p,nr) for j>1 . 10: Set \mathcal{T}_{1}=U_{1} . 11: for 2\leq j\leq d-1 do 12: Construct \mathcal{T}_{j}=\rm{reshape}\left(\left[U_{j-1}(\mathcal{I}_{\leq j-1}\cup\mathcal{K}_{\leq j-1},:)\right]^{\dagger}\tilde{U}_{j},r,n,r\right) . 13: Construct \mathcal{T}_{d}=\left[U_{d-1}(\mathcal{I}_{\leq d-1}\cup\mathcal{K}_{\leq d-1},:)\right]^{\dagger}X_{d-1}(\mathcal{I}_{\leq d-1}\cup\mathcal{K}_{\leq d-1},:) . X_{1} , red rows: \mathcal{K}_{\leq 1} X_{2} , red region: \mathcal{K}_{\leq 1} blue rows: \mathcal{K}_{\leq 2} X_{3} , blue regions: \mathcal{K}_{\leq 2} yellow rows: \mathcal{K}_{\leq 3} \dots Figure 4: Visual representation of the nestedness of the index selection for the oversampling sets \mathcal{K}_{\leq j} in algorithm 3 . \mathcal{K}_{\leq 1} can be freely selected, but the candidate region for \mathcal{K}_{\leq 2} is the region corresponding to all locations in X_{2} where the first index value is a member of \mathcal{K}_{\leq 1} , i.e. blocks of rows in X_{2} . This behavior continues for \mathcal{K}_{\leq 3} and futher. Overall, algorithm 3 follows the same logic as algorithm 2 . One can easily spot that both algorithms construct low rank TT formats by accomplishing the same goals: (1) line 6 in algorithm 3 and line 2 in algorithm 2 build an ON basis for the column space of (a submatrix of) the j th unfolding of \mathcal{X} , and (2) line 10 in algorithm 3 and line 4 in algorithm 2 construct TT cores via the column space basis of consecutive unfoldings. Algorithm 3 can be better understood by considering the uniformly oversampled sets \mathcal{L}_{>j} and \mathcal{K}_{\leq j} separately. • The skeletonized TT pivot set \mathcal{J}_{>j} allows us to approximate the column space of the j th unfolding of \mathcal{X} with that of X_{j}(:,\mathcal{J}_{>j}) . The oversampled set \mathcal{L}_{>j} leads to a better capture using X_{j}(:,\mathcal{J}_{>j}\cup\mathcal{L}_{>j}) . This type of oversampling is also used frequently in randomized linear algebra algorithms [ 25 ] to ensure high accuracy. • TT core construction in algorithm 2 requires an expensive matrix multiplication for high dimensional tensors. For the j th TT core, the complexity is \mathcal{O}(n^{j+1}r^{2}) . Instead, the skeletonized TT pivot set \mathcal{I}_{\leq j} can be used to select submatrices of U_{j} and U_{j+1} for oblique projections. To include more uncovered information, we introduce oversampling sets \mathcal{K}_{\leq j} . As any U_{j} with 2\leq j\leq d is used to compute two TT cores, we need to ensure that indices selected by both \mathcal{I}_{\leq j-1}\cup\mathcal{K}_{\leq j-1} and \mathcal{I}_{\leq j}\cup\mathcal{K}_{\leq j} can match with those from U_{j-1} and U_{j+1} . It is easy to see that the overall nestedness property \mathcal{I}_{\leq j}\cup\mathcal{K}_{\leq j}\subseteq(\mathcal{I}_{\leq j-1}\cup\mathcal{K}_{\leq j-1})\otimes\mathbb{I}_{j} is sufficient to meet this requirement. Since we assume pivot sets \mathcal{I}_{\leq j} are nested, which can be guaranteed with strategies such as the greedy pivot selection in [ 12 , 39 ] , we need \mathcal{K}_{\leq j} to be nested as well, and this is enforced with line 3 of algorithm 3 . Such a procedure is shown in fig. 4 , where the nestedness is enforced by restricting the choices of \mathcal{K}_{\leq j} with regions of \mathcal{K}_{\leq j-1} . In a full unfolding, \mathcal{K}_{\leq j-1} produces blocks of rows in X_{j} as candidates for \mathcal{K}_{\leq j} . It is worth noting that one can choose to use any algorithm for line 6 of algorithm 3 . In particular, for fixed rank algorithms, one of the most efficient option is randomized sketching, while for rank adaptive schemes, rank-revealing QR, or tall-and-skinny QR followed by SVD, are two suitable choices. Nevertheless, the complexity of this step is \mathcal{O}((rn+p)(r+p)^{2})=\mathcal{O}(nr^{3}) , assuming p is a small constant. In addition, solving the least squares problem in line 9 of algorithm 3 takes \mathcal{O}((r+p)r^{2}nr)=\mathcal{O}(nr^{4}) . This leads to the overall complexity of algorithm 3 to be \mathcal{O}(dnr^{4})\sim\mathcal{O}(dn) if r\ll n and is also treated as a constant. Furthermore, if multiple computing processes handle the latter two loops in parallel, then each computing unit only has \mathcal{O}(n) work to complete. 3.2 Dimension sequential approach With dimension parallelism, the oversampling index sets need to be nested, which posts a major limitation on the amount of information we can oversample from the unselected parts of the skeletonized approximation. From the discussion of the use of \mathcal{K}_{\leq j} in section 3.1 , we know these oversampled sets are used mainly to transform orthogonal projections to oblique projections in TT core construction, and they need to be nested since dimension parallel algorithms explore the connection of column space among consecutive tensor unfoldings. However, if the TT cores are generated sequentially, \mathcal{K}_{\leq j} can be independent from each other, and in this way, we are able to broaden our scope of oversampling. We describe this sequential procedure to update the TT format in algorithm 4 . Algorithm 4 TT-PEID-Seq: TT construction of a given tensor with prior information on existing skeletonized TT pivots. 1: Tensor \mathcal{X} , pivot sets (\mathcal{I}_{\leq j},\mathcal{J}_{>j}) , and oversampling parameter p . 2: The TT format of \mathcal{X} in the form of TT cores \mathcal{T}_{1},\dots,\mathcal{T}_{d} . 3: Construct an index set \mathcal{L}_{>1} of size p sampled uniformly from \mathbb{I}_{2}\otimes\cdots\otimes\mathbb{I}_{d}\ \backslash\ \mathcal{J}_{>1} . 4: Set Y=X_{1}\left(:,\mathcal{J}_{>1}\cup\mathcal{L}_{>1}\right) . 5: for 1\leq j\leq d-1 do 6: Find U_{j} with r ON columns from Y . 7: Set \mathcal{T}_{1}=U_{1} or \mathcal{T}_{j}=\rm{reshape}(U_{j},r,n,r) if j>1 . 8: Construct \mathcal{L}_{>j+1} of size p sampled uniformly from \mathbb{I}_{j+2}\otimes\cdots\otimes\mathbb{I}_{d}\ \backslash\ \mathcal{J}_{>j+1} . 9: Construct \mathcal{K}_{\leq j} of size p sampled uniformly from \mathbb{I}_{1}\otimes\cdots\otimes\mathbb{I}_{j}\ \backslash\ \mathcal{I}_{\leq j} . 10: Set an empty matrix F_{\leq j} of size (r+p) -by- r . 11: for 1\leq\ell\leq r+p do 12: Set m as the \ell th element of \mathcal{I}_{\leq j}\cup\mathcal{K}_{\leq j} . 13: Find m_{k} with 1\leq k\leq j such that m=\sum_{k=1}^{j}m_{k}n^{j-k} . 14: Construct the \ell th row of F_{\leq j} by F_{\leq j}(\ell,:)=\mathcal{T}_{1}(m_{1},:)\prod_{k=2}^{j}\mathcal{T}_{k}(:,m_{k},:) . 15: if jj+1}\cup\mathcal{L}_{>j+1})\right),rn,r+p\right) . 17: else 18: Set \mathcal{T}_{d}=F_{\leq d-1}^{\dagger}X_{d-1}\left(\mathcal{I}_{\leq d-1}\cup\mathcal{K}_{\leq d-1},:\right) . X_{j} Red: \mathcal{I}_{\leq j} . Blue: \mathcal{K}_{\leq j} \Rightarrow … = F_{\leq j}(1,:) Size: 1\times r … = F_{\leq j}(2,:) Size: 1\times r \vdots … = F_{\leq j}(r+p,:) Size: 1\times r F_{\leq j} Size: (r+p)\times r Figure 5: Construction of F_{\leq j} inside of algorithm 4 . The left image corresponds to the locations \mathcal{I}_{\leq j}\cup\mathcal{K}_{\leq j} in the j -th unfolding X_{j} . For each index in \mathcal{I}_{\leq j}\cup\mathcal{K}_{\leq j} , we separate it out into j indices. Then, we perform a sequence of vector matrix products, where we use the j indices to take the vector from the first core \mathcal{T}_{1} , and the remaining matrices from the already computed cores \mathcal{T}_{2},\dots,\mathcal{T}_{j} . This multiplication forms one row of F_{\leq j} . Algorithm 4 is an extension of algorithm 1 or other dimension sequential TT factorization algorithms. These algorithms usually constitute of two steps for the j th TT core construction: (1) form an ON basis of the column space of a matrix that contains unused data and use it as the j th TT core (line 4 of algorithm 1 ), and (2) organize the remaining data into a new matrix to be used for recovering the (j+1) st TT core (line 6 of algorithm 1 ). Similar to understanding algorithm 3 in section 3.1 , we discuss the uniformly oversampled sets \mathcal{K}_{\leq j} and \mathcal{L}_{>j+1} separately: • One major computational burden of algorithm 1 is caused by the number of columns of Y in line 4 and 6, which is \mathcal{O}(n^{d-j}) when dealing with dimension j . Therefore, we select a subset of the columns of Y to use in the computation, where the columns are indexed by the skeletonized pivots and oversampled indices. • The oversampled indices \mathcal{K}_{\leq j} are used together with \mathcal{I}_{\leq j} for subselection to convert orthogonal projections to oblique projections. However, in line 13 of algorithm 4 , if we use the same idea in algorithm 1 to update Y with Y from the previous iteration, then the row subsets are already restricted by all previous row selections. In other words, \mathcal{K}_{\leq j} are nested just as in algorithm 3 . Therefore, in order to achieve independent selections of \mathcal{K}_{\leq j} for the j th dimension for a new Y , we have to use the previous TT cores \mathcal{T}_{1},\cdots,\mathcal{T}_{j} to compress the first j dimensions of \mathcal{X} . The naive way is to construct a matrix G_{\leq j} of size n^{j}\times r using Kronecker products, project it onto X_{j} , and subselect the rows from G_{\leq j}^{\dagger}X_{j} , but forming G_{\leq j} and performing this least squares solve are both expensive due to the number of rows in G_{\leq j} . Instead, we only form F_{\leq j} , a subset of rows of G_{\leq j} , by uniformly sampling row indices in the range of 1 and n^{j} not covered in \mathcal{I}_{\leq j} . This ensures the oversampling to be flexible and independent across dimensions. A visual demonstration of the construction of F_{\leq j} is shown in fig. 5 . Here we see that row locations in the left most portion of the figure are mapped to tuples, which are used to take slices of previously formed cores \mathcal{T}_{1},\dots,\mathcal{T}_{j} . These slices are then multiplied as a sequence of vector-matrix products, depicted by the dotted boxed in the center of the figure, to produce a single row of F_{\leq j} . After constructing F_{\leq j} , we can build the selected rows of G_{\leq j} using the previously constructed TT cores as in lines 10-12 in algorithm 4 . In particular, line 11 can be understood as converting linear indices to subscript tuples of a multidimensional array. If one is familiar with MATLAB notations, then this is the “ ind2sub ” command. Similar to algorithm 3 , one is free to choose any algorithm for line 4 of algorithm 4 . From construction, the size of Y is n\times(r+p) for j=1 and (nr)\times(r+p) otherwise, so line 4 normally takes \mathcal{O}(nr(r+p)^{2})=\mathcal{O}(nr^{3}) to run. In addition, for dimension j , forming one row of F_{\leq j} involves the multiplication of one row vector of size r and (j-1) matrices of size r\times r , which results in a complexity of \mathcal{O}((j-1)r^{2}) , and thus building F_{\leq j} takes \mathcal{O}(jr^{3}) and the Y update in line 14 takes \mathcal{O}((r+p)r^{2}n(r+p))=\mathcal{O}(nr^{4}) . In practice, since n is often a lot larger than d , line 14 dominates the runtime complexity of each iteration, so the overall complexity of algorithm 4 is \mathcal{O}(dnr^{4}) . Finally, since F_{\leq j} is calculated row by row, we can only use matrix-vector multiplications instead of matrix-matrix multiplications. This indicates that in practice when we implement with basic linear algebra subprograms (BLAS) [ 16 ] , we can only use the slower BLAS2 routines instead of BLAS3. On the contratry, algorithm 3 is coded with BLAS3, and can run much faster practically, even in a serial computing environment. 3.3 Variants and extensions of proposed algorithms Algorithm 3 and algorithm 4 share the similarity that the TT cores are constructed mainly from ON bases of the column spaces of tensor unfoldings. This is reflected in the construction of the TT cores in the order of \mathcal{T}_{1},\dots,\mathcal{T}_{d} . In the matrix regime, this means that we initiate the projection-based post-processing with ID. Therefore, one straightforward way to extend both of our proposed algorithms for accuracy and efficiency improvement is to build TT cores with ON bases of both column and row spaces of tensor unfoldings, which is similar to using CUR instead of ID in the matrix setting. Since finding ON bases U_{j} in line 6 of the parallel algorithm algorithm 3 is independent and simultaneous, we can alternatively perform this step only for 1\leq j\leq\lfloor d/2\rfloor . For \lfloor d/2\rfloor+1\leq j\leq d-1 , we construct V_{j} with ON columns for sampled submatrices of X_{j}^{T} . This can “embarrassingly” double the parallelization efficiency. In addition, this also alleviates the aggressiveness of using (\mathcal{I}_{\leq j-1}\cup\mathcal{K}_{\leq j-1})\otimes\mathbb{I}_{j} to select only (r+p)n from a total of n^{j} rows of X_{j} for large j , and allows us to build basis U_{j} that can better characterize X_{j} . In this way, the TT cores can be more accurate. We summarize this variant of algorithm 3 in algorithm 5 , and for simplicity, we assume the dimension d to be odd. In summary, in algorithm 5 , in order to construct cores from both ends, we need to construct 4 oversampling sets instead of 2, labeled as \mathcal{K}_{\leq j}^{L},\mathcal{K}_{>j}^{R},\mathcal{K}_{\leq j}^{L},\mathcal{K}_{>j}^{R} , and construct the last middle TT core with both U_{(d-1)/2} and V_{(d-1)/2} (see lines 13-16). Algorithm 5 TT-PEID-Par2: Two-sided version of TT-PEID-Par algorithm 3 . 1: Tensor \mathcal{X} , pivot sets (\mathcal{I}_{\leq j},\mathcal{J}_{>j}) , and oversampling parameter p . 2: The TT format of \mathcal{X} in the form of TT cores \mathcal{T}_{1},\dots,\mathcal{T}_{d} . 3: Set empty index set \mathcal{K}_{\leq 0}^{L} and \mathcal{K}_{>d}^{R} . 4: for 1\leq j\leq(d-1)/2 do 5: Construct index sets \mathcal{K}_{\leq j}^{L} and \mathcal{K}_{>d-j}^{R} of size p sampled uniformly from \mathcal{K}_{\leq j-1}^{L}\otimes\mathbb{I}_{j}\ \backslash\ \mathcal{I}_{\leq j} and \mathcal{K}_{>d-j+1}^{R}\otimes\mathbb{I}_{d-j}\ \backslash\ \mathcal{J}_{>d-j} . 6: Construct index sets \mathcal{L}_{>j}^{L} and \mathcal{L}_{\leq d-j}^{R} of size p sampled uniformly from \mathbb{I}_{j+1}\otimes\cdots\otimes\mathbb{I}_{d}\ \backslash\ \mathcal{J}_{>j} and \mathbb{I}_{1}\otimes\cdots\otimes\mathbb{I}_{d-j}\ \backslash\ \mathcal{I}_{\leq d-j} . 7: Construct Y=X_{j}\left(\left(\mathcal{I}_{\leq j-1}\cup\mathcal{K}_{\leq j-1}^{L}\right)\otimes\mathbb{I}_{j},\mathcal{J}_{>j}\cup\mathcal{L}_{>j}^{L}\right) . 8: Construct Z=X_{d-j}^{T}\left(\mathcal{I}_{\leq d-j}\cup\mathcal{L}_{\leq d-j}^{R},\mathbb{I}_{d-j+1}\otimes\left(\mathcal{J}_{>d-j+1}\cup\mathcal{K}_{>d-j+1}^{R}\right)\right) . 9: Find U_{j} and V_{j} with r ON columns from Y and Z . 10: Set \tilde{U}_{j}=\rm{reshape}(U_{j},r+p,nr) and \tilde{V}_{j}=\rm{reshape}(V_{j},r+p,nr) for j>1 . 11: Set \mathcal{T}_{1}=U_{1} and \mathcal{T}_{d}=V_{1}^{T} . 12: for 2\leq j\leq(d-1)/2 do 13: Construct \mathcal{T}_{j}=\rm{reshape}\left(\left[U_{j-1}\left(\mathcal{I}_{\leq j-1}\cup\mathcal{K}_{\leq j-1}^{L},:\right)\right]^{\dagger}\tilde{U}_{j},r,n,r\right) . 14: Construct \mathcal{T}_{d-j+1}=\rm{reshape}\left(\tilde{V}_{j}^{T}\left[V_{j-1}^{T}\left(:,\mathcal{J}_{>d-j+2}\cup\mathcal{K}_{>d-j+2}^{R}\right)\right]^{\dagger},r,n,r\right) . 15: Set \mathcal{T}_{(d+1)/2}=X_{(d-1)/2}(\mathcal{I}_{\leq(d-1)/2}\cup\mathcal{K}^{L}_{\leq(d-1)/2},\mathbb{I}_{(d+1)/2}\otimes(\mathcal{J}_{>(d+1)/2}\cup\mathcal{K}^{R}_{>(d+1)/2})) 16: Update \mathcal{T}_{(d+1)/2}=\left[U_{(d-1)/2}\left(\mathcal{I}_{\leq(d-1)/2}\cup\mathcal{K}_{\leq(d-1)/2}^{L},:\right)\right]^{\dagger}\mathcal{T}_{(d+1)/2} . 17: Update \mathcal{T}_{(d+1)/2}=\rm{reshape}\left(\mathcal{T}_{(d+1)/2},rn,r\right) 18: Update \mathcal{T}_{(d+1)/2}=\mathcal{T}_{(d+1)/2}\left[V_{(d-1)/2}^{T}\left(:,\mathcal{J}_{>(d+1)/2}\cup\mathcal{K}_{>(d+1)/2}^{R}\right)\right]^{\dagger} and \mathcal{T}_{(d+1)/2}=\rm{reshape}\left(\mathcal{T}_{(d+1)/2},r,n,r\right) . Similarly, we can develop a 2-sided variant of the sequential algorithm algorithm 4 (see algorithm 6 for the pseudo-code when d is odd) by constructing 4 oversampling sets, and treating the middle TT core \mathcal{T}_{(d+1)/2} as the last core to build. In 1-sided sequential TT approximation algorithms, error propagates and accumulates when proceeding to the next dimension, i.e., error for constructing TT core \mathcal{T}_{j} is carried over to the rest of the cores \mathcal{T}_{k} with k>j , and it can be especially problematic for very high d . The 2-sided algorithm partially fixes the problem. However, algorithm 6 requires roughly double memory footprints than algorithm 4 , as constructions from both ends cannot be combined, leading to storage of both Y and Z matrices in the algorithm. Algorithm 6 TT-PEID-Seq2: Two-sided version of TT-PEID-Seq algorithm 4 . 1: Tensor \mathcal{X} , pivot sets (\mathcal{I}_{\leq j},\mathcal{J}_{>j}) , and oversampling parameter p . 2: The TT format of \mathcal{X} in the form of TT cores \mathcal{T}_{1},\dots,\mathcal{T}_{d} . 3: Construct index sets \mathcal{L}_{>1}^{L} and \mathcal{L}_{\leq d-1}^{R} of size p sampled uniformly from \mathbb{I}_{2}\otimes\cdots\otimes\mathbb{I}_{d}\ \backslash\ \mathcal{J}_{>1} and \mathbb{I}_{1}\otimes\cdots\otimes\mathbb{I}_{d-1}\ \backslash\ \mathcal{I}_{\leq d-1} . 4: Set Y=X_{1}\left(:,\mathcal{J}_{>1}\cup\mathcal{L}_{>1}^{L}\right) and Z=X_{d-1}^{T}\left(\mathcal{I}_{\leq d-1}\cup\mathcal{L}_{\leq d-1}^{R},:\right) . 5: for 1\leq j\leq(d-1)/2 do 6: Find U_{j} and V_{j} with r ON columns from Y and Z . 7: Set \mathcal{T}_{1}=U_{1} or \mathcal{T}_{j}=\rm{reshape}(U_{j},r,n,r) if j>1 . 8: Set \mathcal{T}_{d}=V_{1}^{T} or \mathcal{T}_{d-j+1}=\rm{reshape}(V_{j}^{T},r,n,r) if j>1 . 9: Construct index sets \mathcal{L}_{>j+1}^{L} and \mathcal{L}_{\leq d-j-1}^{R} of size p sampled uniformly from \mathbb{I}_{j+2}\otimes\cdots\otimes\mathbb{I}_{d}\ \backslash\ \mathcal{J}_{>j+1} and \mathbb{I}_{1}\otimes\cdots\otimes\mathbb{I}_{d-j-1}\ \backslash\ \mathcal{I}_{\leq d-j-1} . 10: Construct index sets \mathcal{K}_{\leq j}^{L} and \mathcal{K}_{>d-j}^{R} of size p sampled uniformly from \mathbb{I}_{1}\otimes\cdots\otimes\mathbb{I}_{j}\ \backslash\ \mathcal{I}_{\leq j} and \mathbb{I}_{d-j+1}\otimes\cdots\otimes\mathbb{I}_{d}\ \backslash\ \mathcal{J}_{>d-j} . 11: Set empty matrices F_{\leq j} and G_{>d-j} of size (r+p) -by- r . 12: for 1\leq\ell\leq r+p do 13: Set m as the \ell th element of \mathcal{I}_{\leq j}\cup\mathcal{K}_{\leq j}^{L} . 14: Find m_{k} with 1\leq k\leq j such that m=\sum_{k=1}^{j}m_{k}n^{j-k} . 15: Construct the \ell th row by F_{\leq j}(\ell,:)=\mathcal{T}_{1}(m_{1},:)\prod_{k=2}^{j}\mathcal{T}_{k}(:,m_{k},:) . 16: Set p as the \ell th element of \mathcal{J}_{>d-j}\cup\mathcal{K}_{>d-j}^{R} . 17: Find p_{k} with 1\leq k\leq j such that p=\sum_{k=1}^{j}p_{k}n^{j-k} . 18: Construct the \ell th row by G_{>d-j}(\ell,:)=\mathcal{T}_{d}^{T}(:,p_{1})\prod_{k=2}^{j}\mathcal{T}_{d+1-k}^{T}(:,p_{k},:) . 19: if j<(d-1)/2 then 20: Set Y=F_{\leq j}^{\dagger}X_{j}\left(\mathcal{I}_{\leq j}\cup\mathcal{K}_{\leq j}^{L},\mathbb{I}_{j+1}\otimes\left(\mathcal{J}_{>j+1}\cup\mathcal{L}_{>j+1}^{L}\right)\right) and Y=\rm{reshape}\left(Y,rn,r+p\right) . 21: Set Z=G_{>d-j}^{\dagger}X_{d-j-1}^{T}\left(\mathcal{I}_{\leq d-j-1}\cup\mathcal{L}_{\leq d-j-1}^{R},\mathbb{I}_{d-j}\otimes\left(\mathcal{J}_{>d-j}\cup\mathcal{K}_{>d-j}^{R}\right)\right) and Z=\rm{reshape}\left(Z,rn,r+p\right) . 22: else 23: Collect right index set \mathcal{J}_{R}:=\mathbb{I}_{(d+1)/2}\otimes\left(\mathcal{J}_{>(d+1)/2}\cup\mathcal{K}^{R}_{>(d+1)/2}\right) . 24: Set \mathcal{T}_{(d+1)/2}=X_{(d-1)/2}\left(\mathcal{I}_{\leq(d-1)/2}\cup\mathcal{K}_{\leq(d-1)/2}^{L},\mathcal{J}_{R}\right) . 25: Update \mathcal{T}_{(d+1)/2}=\rm{reshape}\left(F_{\leq(d-1)/2}^{\dagger}\mathcal{T}_{(d+1)/2},rn,r\right) . 26: Set \mathcal{T}_{(d+1)/2}=\mathcal{T}_{(d+1)/2}\left(:,\mathcal{J}_{>(d+1)/2}\cup\mathcal{K}_{>(d+1)/2}^{R}\right)\left(G_{>(d+1)/2}^{T}\right)^{\dagger} and \mathcal{T}_{(d+1)/2}=\rm{reshape}\left(\mathcal{T}_{(d+1)/2},r,n,r\right) . If computational resources are sufficient, we can perform multiple times of 1-sided algorithms for a better approximation. Since the order of generating the TT cores matter, which is reflected in whether to use column spaces or row spaces of the tensor unfoldings, the simplest way to improve accuracy is to construct two sets of TT cores: \mathcal{R}_{1},\dots,\mathcal{R}_{d} from dimension 1 to d using column spaces of unfoldings, and \mathcal{S}_{1},\dots,\mathcal{S}_{d} from dimension d to 1 using row spaces of unfoldings. Both sets of cores provide approximations to the target tensor, so we can concatenate the cores together to form a new set of TT cores \mathcal{T}_{1}\in\mathbb{R}^{n\times 2r} , \mathcal{T}_{d}\in\mathbb{R}^{2r\times n} , and \mathcal{T}_{j}\in\mathbb{R}^{2r\times n\times 2r} for 2\leq j\leq d-1 . We can represent these cores mathematically as: \displaystyle\mathcal{T}_{1} \displaystyle=\begin{bmatrix}\mathcal{R}_{1}&\mathcal{S}_{d}^{T}\end{bmatrix},\quad\mathcal{T}_{d}=\begin{bmatrix}\mathcal{R}_{d}\\ \mathcal{S}_{1}^{T}\end{bmatrix}, \displaystyle\mathcal{T}_{j}(1:r,i_{j},1:r) \displaystyle=\mathcal{R}_{j}(:,i_{j},:),\ \mathcal{T}_{j}(r+1:2r,i_{j},r+1:2r)=\mathcal{S}_{j}^{T}(:,i_{j},:),\ 1\leq i_{j}\leq n. (9) Finally, we conduct TT-rounding for a better and storage-efficient approximation. In practice, for a target tensor \mathcal{X} , we can denote a new tensor \mathcal{Y} to be the reverse of \mathcal{X} , i.e. \mathcal{X}_{i_{1},\cdots,i_{d}}=\mathcal{Y}_{i_{d},\cdots,i_{1}},\quad 1\leq i_{j}\leq n,\quad 1\leq j\leq d, (10) then the pivot sets of \mathcal{Y} are (\mathcal{J}_{>d-j},\mathcal{I}_{\leq d-j}) , and we can find \mathcal{S}_{1},\dots,\mathcal{S}_{d} by running 1-sided algorithms on \mathcal{Y} . We summarize this procedure in algorithm 7 . Algorithm 7 TT-PEID-R: TT construction of a given tensor with prior information on existing skeletonized TT pivots. 1: Tensor \mathcal{X} , pivot sets (\mathcal{I}_{\leq j},\mathcal{J}_{>j}) , and oversampling parameter p . 2: The TT format of \mathcal{X} in the form of TT cores \mathcal{T}_{1},\dots,\mathcal{T}_{d} . 3: Use algorithm 3 or algorithm 4 on \mathcal{X} and (\mathcal{I}_{\leq j},\mathcal{J}_{>j}) to get TT cores \mathcal{R}_{1},\dots,\mathcal{R}_{d} . 4: Use algorithm 3 or algorithm 4 on \mathcal{Y} from eq. 10 and (\mathcal{J}_{>d-j},\mathcal{I}_{\leq d-j}) to get TT cores \mathcal{S}_{1},\dots,\mathcal{S}_{d} . 5: Set new TT cores \mathcal{T}_{1},\dots,\mathcal{T}_{d} as eq. 9 and perform TT rounding. 4 Numerical Tests In this section we show the performance of the proposed algorithms 3 , 4 , 5 , 6 and 7 on three types of tensors 1 1 1 The codes for the algorithm implementation, as well as a demo of using TnTorch for initial selection in section 4.4 can be found at https://github.com/dhayes95/PEID . , (1) the Hilbert tensors, (2) tensors corresponding to the evaluations of kernel functions, and (3) tensors encountered in kinetic simulations of differential equations [ 19 ] . We perform 5 test runs and report the averages of the output results. In all numerical tests, results are computed on the CPU nodes of Perlmutter, a Cray EX supercomputer hosted by NERSC at Lawrence Berkeley National Laboratory with 2 AMD EPYC 7763 CPUs per node (i.e. 2\times 64=128 cores per node). For error measurements, we compute an approximate relative error by sampling R indices uniformly in the tensor, and computing the error at these locations, i.e. ||\mathcal{X}-\tilde{\mathcal{X}}||_{F,R}^{2}=\frac{\sum_{i\in R}\left[\mathcal{X}(i)-\tilde{\mathcal{X}}(i)\right]^{2}}{\sum_{i\in R}\left[\mathcal{X}(i)\right]^{2}}. Here, ||\cdot||_{F,R} denotes the Frobenius norm of the tensor at locations R . For a fair comparison, we set a seed to fix the indices used for accuracy computations. In addition, we report the reduction factor for each test. This is a measurement on the reduction of the sampled error, between our proposed ACA initiated PEID, and the original ACA approximation. The reduction factor is defined as \text{RF}=\frac{||\mathcal{X}-\tilde{\mathcal{X}}_{\rm{ACA}}||_{F,R}}{||\mathcal{X}-\tilde{\mathcal{X}}_{\rm{PEID}}||_{F,R}}, where \tilde{\mathcal{X}}_{\rm{ACA}} is the approximation using only the information from TTACA, and \tilde{\mathcal{X}}_{\rm{PEID}} is the resulting approximation of algorithms 3 , 4 , 5 , 6 and 7 . For all tests, the core ranks used are adaptively determined by specifying a tolerance for the magnitudes of the pivot selected in the ACA process. For the oversampling parameter, we use a constant sampling paramemter p for all dimensions in section 4.1 , as the Hilbert tensor exhibits generally constant core ranks across dimensions. For the rest of the tests, we take p_{i} oversampling points for dimension i as p_{i}=\alpha\log(n_{i})\min(i,d-i), so that internal ranks have higher sample sizes. The \alpha parameter is used in order to scale the sample sizes in testing. In the event that the number of free indices to be sampled in a specific dimension is less than the sampling parameter, we simply take the minimum between the oversampling parameter and the number of free indices. For example, in a 10D example with mode size 50 , if the core ranks used are (1,15,...) then the first dimension only has 35 free indices. Thus, even if we set p_{1}=40 , \mathcal{K}_{\leq 1} can still only consist of all 35 free indices. Finally, all plots that use sample size as a parameter report the average sample sizes across dimensions. 4.1 Synthetic The first tensor we test on is the Hilbert tensor. It is a common benchmark test, as it is known to have low TT ranks [ 41 ] . The Hilbert tensor is defined entry-wise as \mathcal{X}(i_{1},i_{2},\dots,i_{d})=\frac{1}{i_{1}+i_{2}+\dots+i_{d}+1-d},\quad 1\leq i_{j}\leq n,\quad 1\leq j\leq d. (11) If indexing starts at 0 , we can remove the -d from the denominator. We consider two Hilbert tensors of dimensions 4 and 10 , with uniform mode size 1600 and 200 , respectively with the exception of the results in the left plot of fig. 7 . There the mode size of the 10- d tensor is 400 to increase the gap between curves. The first test measures the reduction in error for increasing sample sizes p for a fixed TTACA input. Figure 6 shows the results for both 4- d and 10- d tests. On the top row, for the 4- d results, we see that as sample size increases, the observed reduction in error increases, up to nearly 50 times reduction for 50 oversample points per dimension. For this test case, algorithms 3 , 4 , 5 , 6 and 7 perform similarly with slight preference to algorithms 6 and 5 . The second row plots the 10- d test case. We observe again that with increasing sample sizes, the reduction increase, up to approximately 70 times. In this test case, there is a preference towards algorithm 6 . However, all other algorithms still obtain good reductions in error. For example, with 50 oversampling points, the reduction factor is at least 40. Next, we measure the time taken in seconds to run just TTACA, and TTACA followed by algorithms 3 and 5 for a range of TTACA tolerance values. The purpose of this test is to show that in terms of computation time, it is advantageous to run TTACA with a larger tolerance, followed by oversampling to reduce approximation error. The left plot in fig. 7 demonstrates this, as the blue curve for TTACA lies above the curves for algorithms 3 and 5 . This signifies that for a given error goal, running TTACA with a strict tolerance takes longer than running with a loose tolerance plus oversampling. For example, in this plot, for an error goal of 10^{-4} , just running TTACA to this error, we expect it to take roughly 28 seconds, while running TTACA with algorithm 3 only takes roughly 12 seconds. The right plot of fig. 7 contains results when mode size is fixed at 200 and dimension is varied. We observe that for Hilbert tensors, there are more advantages in oversampling as dimension increases. Figure 6: Relative error and reduction factor of Hilbert tensor. Top row: 4- d Hilbert tensor with mode size 1600 and TTACA ranks (1,13,14,13,1) . Bottom row: 10- d Hilbert tensor with mode size 200 and TTACA ranks (1,11,12,12,12,12,12,12,12,11,1) . Figure 7: Left: Time in seconds taken to run vs relative error achieved for TTACA plus algorithms 3 and 5 on a 10- d Hilbert tensor with mode size 400. Right: algorithm 4 for 4,6,8,10 dimensional Hilbert tensors with mode sizes fixed at 200 vs sample size. 4.2 Kernel Based The next sets of experiments are on tensors corresponding to kernel function evaluations. Both cases are also studied in [ 28 ] . To define such tensors, we assume that the dimension d is even, and \boldsymbol{x},\boldsymbol{y} are vectors in [a_{0},a_{1}]^{d/2} and [b_{0},b_{1}]^{d/2} respectively. Furthermore, let \zeta_{i} be the i th Chebyshev node on [-1,1] with 1\leq i\leq n , \xi_{i}=\frac{a_{0}-a_{1}}{2}\zeta_{i}+\frac{a_{0}+a_{1}}{2} , and \eta_{j}=\frac{b_{0}-b_{1}}{2}\zeta_{j}+\frac{b_{0}+b_{1}}{2} . Using these components, we can form vectors \boldsymbol{x}_{i_{1}\cdots i_{d/2}}=\left[\xi_{i_{1}},\cdots,\xi_{i_{d/2}}\right] and \boldsymbol{y}_{j_{1}\cdots j_{d/2}}=\left[\eta_{j_{1}},\cdots,\eta_{j_{d/2}}\right] for 1\leq i_{1},\cdots,i_{d/2},j_{1},\cdots,j_{d/2}\leq n , and compute a scalar \gamma_{i_{1},\cdots,i_{d/2},j_{1},\cdots,j_{d/2}}=\big|\big|\boldsymbol{x}_{i_{1}\cdots i_{d/2}}-\boldsymbol{y}_{j_{1}\cdots j_{d/2}}\big|\big| . Here, \big|\big|\cdot\big|\big| denotes the vector Euclidean norm. Our first studied kernel function is the Matérn kernel, which uses the order- (5/2) modified Bessel function of the second kind K_{5/2}(\cdot) , and the resulting tensor is \mathcal{X}\left(i_{1},\cdots,i_{d/2},j_{1},\cdots,j_{d/2}\right)=\sqrt{5\gamma_{i_{1},\cdots,i_{d/2},j_{1},\cdots,j_{d/2}}}K_{5/2}\left(\sqrt{5}\gamma_{i_{1},\cdots,i_{d/2},j_{1},\cdots,j_{d/2}}\right). (12) The second kernel is referred to as the Thin Plate Spline kernel, denoted as TPS in test results, and it involves a logarithm to build the tensor \mathcal{X}\left(i_{1},\cdots,i_{d/2},j_{1},\cdots,j_{d/2}\right)=\gamma_{i_{1},\cdots,i_{d/2},j_{1},\cdots,j_{d/2}}^{2}\log\left(\gamma_{i_{1},\cdots,i_{d/2},j_{1},\cdots,j_{d/2}}^{2}\right). (13) In our tests, we use [a_{0},a_{1}]=[2,3] , and [b_{0},b_{1}]=[0,1] . These are chosen to be disjoint to avoid any singularities in tensor entries. Figure 8: Relative error and reduction factor of Matérn tensor. Top row: 4- d Matérn tensor with mode size 1600 and TTACA ranks (1,7,10,7,1) . Bottom row: 10- d Matérn tensor with mode size 200 and TTACA ranks (1,5,17,39,79,125,84,38,17,6,1) . Figure 9: Left: Time in seconds taken to run vs relative error achieved for TTACA plus algorithms 3 and 5 on a 10- d mode size 200 Matérn tensor. Right: algorithm 4 for 4,6,8,10 dimensional Matérn tensors with mode sizes fixed at 200 vs sample size. As with the Hilbert tensor, our first set of tests measure the error reduction for 4- d and 10- d Matérn tensors with mode sizes 1600 and 200 respectively using different oversampling size. The results for these tests are shown in fig. 8 . We see that the error reduction increases as sample size increases. For 4- d we reduce the error by 5.5 times, and for 10- d we cut the error in half. Although this is not as drastic as the Hilbert tensor, it is noteworthy that the Matérn tensor is a more difficult test case, since the TT-ranks observed are significantly larger than those of the Hilbert tensor. Due to the larger ranks of the Matérn tensors, run time is larger and is reflected by the scale of the vertical axis in the left plot of fig. 9 . This plot shows the timing results for the 10- d case over a range of TTACA tolerance levels. In this test, we gain significant benefits from using TTACA and oversampling. For example, at a goal error of 10^{-4} , TTACA with a strict tolerance takes roughly 15 seconds, while TTACA plus algorithm 3 takes roughly 5 seconds, i.e. one third of the time. However, in the right plot of fig. 9 , which contains results where mode size is fixed at 200 and dimension is varied, we can see that there is more benefit to oversampling for low dimensional problems. The reason for this is currently unknown, but we suspect that it is correlated to the fact that the TT-ranks increase as dimension increases. Figure 10: Relative error and reduction factor of TPS tensor. Top row: 4- d TPS tensor with mode size 1600 and TTACA ranks (1,5,7,5,1) . Bottom row: 10- d TPS tensor with mode size 200 and TTACA ranks (1,3,4,8,14,20,17,13,6,4,1) . Figure 11: Left: Time in seconds taken to run vs relative error achieved for TTACA plus algorithms 3 and 5 on a 10- d TPS tensor. Right: algorithm 4 for 4,6,8,10 dimensional TPS tensors with mode size fixed at 200 vs sample size. Figures 10 and 11 provide the results of the Thin Plate Spline for the same test cases as Hilbert and Matérn. From fig. 10 , we see that performing oversampling reduces the error by roughly 2.5 times in the 4- d case. However, in the 10- d case, we are able to reduce the error by up to 100 times using algorithm 5 . For the 10- d Thin Plate Spline tensor, we notice that pure TTACA tends to stall roughly around relative error 10^{-2} , until the TT-ranks reach a high enough threshold, when the error quickly decreases to about 10^{-4} . This stalling behavior can also be observed in the left plot of fig. 11 , where TTACA error remains relatively unchanged with lower tolerances until the unknown threshold is reached. We suspect, that algorithms 3 , 5 , 4 and 6 are able to bypass this wall by seeing more of the data in the construction of the cores, resulting in massive accuracy improvements. When looking at the time scale of the left plot in fig. 11 , we find that reducing the error by two orders of magnitude can provide significant time savings compared to simply running TTACA with a strict tolerance. In fig. 11 (Right), we can see significant advantages when using algorithm 4 as the dimension increases for Thin Plate Spline tensors. This behavior agrees with the suspected reason of TTACA stalling in 10- d . 4.3 Maxwellian distribution from gas dynamics For our last set of experiments, we test on tensors built from Maxwellian distributions, which naturally arise in gas dynamics [ 19 ] . These tensors are defined entry-wise by function evaluations on a prescribed discretization grid of displacement and velocity domains. Here, we define the 4 - d Maxwellian tensor, and the 6 - d version is a natural extension. For 4 - d , we assume that x,y\in[-1/2,1/2] and v_{x},v_{y}\in[-3,3] , and define f(x,y,v_{x},v_{y})=\varrho(x,y)\left[\exp{\left(-b_{x}^{-}-b_{y}^{-}\right)}+\exp{\left(-b_{x}^{+}-b_{y}^{+}\right)}\right], (14) where \varrho(x,y)=\left(\frac{\rho(x)}{2\sqrt{2\pi T(x)}}+\frac{\rho(y)}{2\sqrt{2\pi T(y)}}\right),\quad b_{x}^{\pm}=\frac{|v_{x}\pm 0.75|^{2}}{2T(x)},\quad b_{y}^{\pm}=\frac{|v_{y}\pm 0.75|^{2}}{2T(y)}, with \rho(w)=1+0.875\sin(2\pi w),\quad T(w)=0.5+0.4\sin(2\pi w),\quad w=x,y. By taking n equi-distanced points on each domain, we can create a 4 - d grid of size n\times n\times n\times n , and we can calculate the entries of the Maxwellian tensor \mathcal{X} by \mathcal{X}(i_{1},i_{2},i_{3},i_{4})=f(x_{i_{1}},y_{i_{3}},(v_{x})_{i_{2}},(v_{y})_{i_{4}}). Figure 12: Relative error and reduction factor of Maxwellian tensor. Top row: 4- d Maxwellian tensor with mode size 1600 and TTACA ranks (1,9,5,14,1) . Bottom row: 6- d Maxwellian tensor with mode size 800 and TTACA ranks (1,16,5,55,5,23,1) . For the Maxwellian test case, we only present the results for 4- d mode size 1600 and 6- d mode size 800 tensors in fig. 12 as these are the only physically relevant dimensions of interest. In the top row of fig. 12 we have the 4- d results, which exhibit similar behavior to all the previous tests. We observe a reduction in error of almost 5 times with a slight preference towards algorithms 3 and 5 . The bottom two plots display similar behavior with reduction in error of roughly 5 times, also with slight preference towards algorithms 3 and 5 . 4.4 Attaching to TnTorch In this section, we show that algorithms 3 , 4 , 5 and 6 can be easily connected to the output of TnTorch [ 43 ] , a popular open source PyTorch based Tensor library. When calling the cross function in TnTorch, users can obtain the skeletonized pivots as output by including the input “ \text{return}\_\text{info} =\text{True} ”. In this way, we can run the same tests in section 4.1 using TnTorch pivots as the initial index selection. We set the input ranks of the cross approximation to be the same as those observed in section 4.1 for a fair comparison. The results are shown in fig. 13 , and we can see similar behaviors to those of fig. 6 , indicating that our proposed methods are simple and effective additional steps to gain further accuracy for the compression of a given tensor with any cross routines. The bottom two plots of fig. 13 include a comparison between using TnTorch and TTACA for initial pivots. These results use algorithm 3 , but we see comparable results produced by other proposed algorithms. In both plots, we observe that although TnTorch and TTACA provide initial indices with differing accuracy, algorithm 3 can reduce errors to roughly the same magnitude. Figure 13: Results using TnTorch to produce the initial index selections on Hilbert tensor. Top row: Relative error and reduction factor of 4- d tensor with mode size 1600 and TTACA ranks (1,13,14,13,1) . Middle row: Relative error and reduction factor of 10- d tensor with mode size 200 and TTACA ranks (1,11,12,12,12,12,12,12,12,11,1) . Bottom row: comparison of relative error of running TTACA and TnTorch with algorithm 3 on 4- d (left plot) and 10- d (right plot) tensors. 5