Next Article in Journal
New Applications of Perov’s Fixed Point Theorem
Previous Article in Journal
A Polynomial Fitting Problem: The Orthogonal Distances Method
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Randomized Average Kaczmarz Algorithm for Tensor Linear Systems

College of Science, China University of Petroleum, Qingdao 266580, China
*
Author to whom correspondence should be addressed.
Mathematics 2022, 10(23), 4594; https://doi.org/10.3390/math10234594
Submission received: 9 October 2022 / Revised: 29 November 2022 / Accepted: 30 November 2022 / Published: 4 December 2022
(This article belongs to the Section Computational and Applied Mathematics)

Abstract

:
For solving tensor linear systems under the tensor–tensor t-product, we propose the randomized average Kaczmarz (TRAK) algorithm, the randomized average Kaczmarz algorithm with random sampling (TRAKS), and their Fourier version, which can be effectively implemented in a distributed environment. We analyzed the relationships (of the updated formulas) between the original algorithms and their Fourier versions in detail and prove that these new algorithms can converge to the unique least F-norm solution of the consistent tensor linear systems. Extensive numerical experiments show that they significantly outperform the tensor-randomized Kaczmarz (TRK) algorithm in terms of both iteration counts and computing times and have potential in real-world data, such as video data, CT data, etc.

1. Introduction

In this paper, we focus on computing the least F-norm solution for consistent tensor linear systems of the form
A X = B ,
where A R N 1 × N 2 × N 3 , X R N 2 × K × N 3 , and B R N 1 × K × N 3 are third-order tensors, and * is the t-product proposed by Kilmer and Martin in [1]. The problem has various applications, such as tensor neural networks [2], tensor dictionary learning [3], medical imaging [4], etc.
The randomized Kaczmarz (RK) algorithm is an iterative method for approximating solutions to linear systems of equations. Due to its simplicity and efficiency, the RK method has attracted widespread attention and has been widely developed in many applications, including ultrasound imaging [5] and seismic imaging [6]. Many developments [7,8,9,10,11,12,13,14] of the RK method were obtained, including block Kaczmarz methods. The block Kaczmarz methods [12,13,14], which utilize several rows of the coefficient matrix at each iterate, can be implemented more efficiently in many computer architectures. However, each iteration of the block Kaczmarz method needs to apply the pseudoinverse of the submatrix to a vector, which is expensive. To solve this problem, Necoara [10] proposed the randomized average block Kaczmarz (RABK) method, which utilizes a combination of several RK updates. This method can be implemented effectively in distributed computing units.
Recently, the RK algorithm was extended to solve the system of tensor equations [15,16,17,18]. Ma and Molitor extended the RK method to solve consistent tensor linear systems under the t-product and proposed a Fourier domain version in [15]. Li and Tang et al. [16] presented sketch-and-project methods for tensor linear systems with the pseudoinverse of some submatrix. In [17], Chen and Qin proposed the regularized Kaczmarz algorithm, which avoids the need for the calculation of the pseudoinverse for tensor recovery problems. Wang and Che, et al. [18] proposed the randomized Kaczmarz-like algorithm and its relaxed version to deal with the system of tensor equations with nonsingular coefficient tensors under general tensor–vector multiplication.
In this paper, inspired by the [10,17], we explore the randomized average Kaczmarz (TRAK) method, which is pseudoinverse-free and speeds up over the TRK method for solving tensor linear system (1). However, the entries of each block are determined, which have significant effects on the behavior of the TRAK method. Thus, we propose the tensor randomized average Kaczmarz algorithm with random sampling (TRAKS) which gives an optimized selection of the entries in each iteration. Meanwhile, considering that circulant matrices are diagonalized by the discrete Fourier transform (DFT), we discuss the Fourier domain versions of the TRAK and TRAKS methods. Their corresponding convergence analyses are proved. Numerical experiments are given to illustrate our theoretical results.
The rest of this paper is organized as follows. In Section 2, we introduce some notations and tensor basics. Then, we describe new algorithms and give their convergence theories in Section 3, Section 4 and Section 5. In Section 6, some numerical experiments are presented to illustrate our theoretical results. Finally, we propose a brief conclusion in Section 7.

2. Preliminaries

In this section, we provide clarification of notations, a brief review of fundamental concepts in tensor algebra and some existing algorithms.

2.1. Notation

Throughout this paper, we use calligraphic capital letters for tensors, capital letters for matrices, and lowercase letters for scalars. For any matrix A, we use A T , A H , A , A F , A 2 , and σ m i n ( A T ) to denote the transpose, the conjugate transpose, the Moore–Penrose pseudoinverse, Frobenius norm, Euclidean norm, and the minimum nonzero singular values of A, respectively. For an integer m, let [ m ] = { 1 , 2 , , m } . For a set C, we define | C | as the cardinality of C. We denote E [ ψ ] and E [ ψ ζ ] as the expectation of ψ and the conditional expectation of ψ given ζ , respectively. By the law of total expectation, we have E [ E [ ψ ζ ] ] = E [ ψ ] .

2.2. Tensor Basics

In this subsection, we provide some key definitions and facts in tensor algebra, which can be found in [1,15,16,19,20].
For a third-order tensor A C N 1 × N 2 × N 3 , as done in [15,16], we denote its ( i , j , k ) entry as A i , j , k and use A i , : , : , A : , j , : and A : , : , k to denote the i t h horizontal slice, the j t h lateral slice and the k t h frontal slice. To condense notation, A k represents the k t h frontal slice of A . We define the block circulant matrix b c i r c ( A ) of A as
b c i r c ( A ) = A 1 A N 3 A 2 A 2 A 1 A 3 A N 3 A N 3 1 A 1 C N 1 N 3 × N 2 N 3 .
Definition 1 
(DFT matrix). The N × N DFT matrix is defined as
F N = 1 1 1 1 1 ω ω 2 ω N 1 1 ω 2 ω 4 ω 2 ( N 1 ) 1 ω N 1 ω 2 ( N 1 ) ω ( N 1 ) 2 ,
where ω = e 2 π i N .
The inverse matrix of the DFT matrix (IDFT) F N is F N 1 = F N H N .
Lemma 1 
([1]). Suppose A is an N 1 × N 2 × N 3 tensor and F N 3 is an N 3 × N 3 DFT matrix. Then
b d i a g ( A ^ ) = ( F N 3 I N 1 ) b c i r c ( A ) ( F N 3 H I N 2 ) N 3 = ( A ^ ) 1 ( A ^ ) 2 ( A ^ ) N 3 ,
where “⊗” is Kronecker product, I N denotes the N × N identity matrix, ( A ^ ) k is the k th frontal face of A ^ which is obtained by applying the DFT on A along the third dimension and b d i a g ( A ^ ) is the block diagonal matrix formed by the frontal faces of A ^ .
We denote the operator u n f o l d ( · ) and its inversion f o l d ( · ) as
u n f o l d ( A ) = A 1 A 2 A N 3 C N 1 N 3 × N 2 , f o l d ( u n f o l d ( A ) ) = A .
Definition 2 
(t-product [1]). The tensor–tensor t-product is defined as
A B = f o l d ( b c i r c ( A ) u n f o l d ( B ) ) C N 1 × K × N 3 ,
where A C N 1 × N 2 × N 3 and B C N 2 × K × N 3 .
For A C N 1 × N 2 × N 3 and B C N 2 × K × N 3 , it holds that
( A B ) i , : , : = A i , : , : B ,
and
A B = j = 1 N 2 A : , j , : B j , : , : .
Definition 3 
(conjugate transpose [15]). The conjugate transpose of a tensor A C N 1 × N 2 × N 3 is denoted as A H and is produced by taking the conjugate transpose of all frontal slices and reversing the order of the frontal slices 2 , N 3 .
For A C N 1 × N 2 × N 3 , we have
( A j , : , : ) H = ( A H ) : , j , : .
For A C N 1 × N 2 × N 3 , the block circulant operator b c i r c ( · ) commutes with the conjugate transpose, this is
b c i r c ( A H ) = b c i r c ( A ) H .
For A C N 1 × N 2 × N 3 and B C N 2 × K × N 3 , we have that
( A B ) H = B H A H .
Definition 4 
(identity tensor). The identity tensor I R N × N × N 3 is the tensor whose first frontal slice is an N × N identity matrix, and its other frontal slices are all zeros.
For A R N 1 × N 2 × N 3 , it holds that
A i , : , : = I i , : , : A .
Definition 5 
(Moore–Penrose inverse [20]). Let X R N 1 × N 2 × N 3 . If there exists Y R N 2 × N 1 × N 3 such that
X Y X = X , Y X Y = Y , ( X Y ) T = X Y , ( Y X ) T = Y X ,
then Y is called the Moore–Penrose inverse of X and is denoted by X .
Definition 6 
(inner product). The inner product between A and B in C N 1 × N 2 × N 3 is defined as
A , B = i , j , k A i , j , k B i , j , k ¯ ,
where B i , j , k ¯ is the conjugate of B i , j , k .
For A C N 1 × N 2 × N 3 , B C N 2 × K × N 3 and C C N 1 × K × N 3 , it holds that
A B , C = B , A H C .
Definition 7 
(spectral norm and Frobenius norm). The spectral norm and Frobenius norm of A R N 1 × N 2 × N 3 are defined as
A 2 = b c i r c ( A ) 2
and
A F = A , A = i , j , k ( A i , j , k ) 2 ,
respectively.
For A R N 1 × N 2 × N 3 and B R N 2 × K × N 3 , it holds that
A B F A 2 B F .
Definition 8 
(K-range space, K-null space [1]). For A R N 1 × N 2 × N 3 , define
r a n g e K ( A ) = { A Y Y R N 2 × K × N 3 } , n u l l K ( A ) = { X R N 2 × K × N 3 A X = 0 } .
We easily know that ( r a n g e K ( A T ) ) = n u l l K ( A ) .
For A R N 1 × N 2 × N 3 and all X r a n g e K ( A ) , it holds that
A T X F 2 σ m i n 2 ( b c i r c ( A ) ) X F 2 .
Theorem 1 
([20]). Let A R N 1 × N 2 × N 3 , X R N 2 × K × N 3 and B R N 1 × K × N 3 . Then the minimum F-norm solution of a consistent system A X = B is unique, and it is A B .
Theorem 2. 
Let A X = B with A R N 1 × N 2 × N 3 , X R N 2 × K × N 3 and B R N 1 × K × N 3 be consistent. Then, there is only one solution to A X = B in r a n g e K ( A T ) , which is the minimum F-norm solution A B .
Proof. 
Suppose that X 1 , X 2 r a n g e K ( A T ) are the solutions of A X = B , then, we have that
A X 1 = B , A X 2 = B .
Note that the above equations can be written as
A ( X 1 X 2 ) = A X 1 A X 2 = 0 .
Therefore,
X 1 X 2 n u l l ( A ) = ( r a n g e K ( A T ) ) .
By X 1 , X 2 r a n g e K ( A T ) , we also know that
X 1 X 2 r a n g e K ( A T ) .
Thus,
X 1 X 2 = 0 , that is X 1 = X 2 .
From Equation (7) and Definition 5, we can obtain
A B = A ( A X ) = ( A A ) T X = A T ( A ) T X r a n g e K ( A T ) .
Finally, by Theorem 1, we obtain the desired result.    □

2.3. Randomized Average Block Kaczmarz Algorithm

For computing the least-norm solution of the large consistent linear system A x = b , ( A R m × n , x R n a n d b R m ) , Necoara [10] developed the randomized average block Kaczmarz (RABK) algorithm which projected the current iteration vector onto each individual row of the chosen submatrix and then averaged these projections with the weights. The updated formula of the RABK algorithm with a constant stepsize can be written as
x ( k ) = x ( k 1 ) α ( i J i k ω i A i , : x ( k 1 ) b i A i , : 2 2 A i , : T ) ,
where the weights are chosen to satisfy 0 < ω i < 1 for all i and sum to 1.
In each iteration, if we average obtained projections with the weights A i , : F 2 A J i k , : F 2 , i J i k , we can obtain Algorithm 1. This algorithm avoids the need for each iterate of the randomized block Kaczmarz algorithm [14] to apply the pseudoinverse to a vector, which is cheaper.
Algorithm 1 Randomized average block Kaczmarz (RABK) algorithm
Input:  
A R m × n , b R m , x 0 R n , stepsize α > 0 , maximum number of iterations M and partition of [m]: { J i } i = 1 s
Output:  
last iterate x ( k )
  1:
for k = 1 , 2 , , M do
  2:
   Pick i k [ m ] with A J i k , : F 2 / A F 2
  3:
   Set x ( k ) = x ( k 1 ) α A J i k , : F 2 ( A J i k , : ) T ( A J i k , : x ( k 1 ) b J i k )
  4:
end for

2.4. Randomized Regularized Kaczmarz Algorithm

Chen and Qin [17] provided the randomized regularized Kaczmarz algorithm based on the RK algorithm for the consistent tensor recovery problem:
X = a r g m i n X R N 2 × K × N 3 f ( X ) , s . t . A X = B ,
where the objective function f is strongly convex, A R N 1 × N 2 × N 3 and B R N 1 × K × N 3 .
Let f ( X ) = s u p Z R N 2 × K × N 3 { X , Z f ( Z ) } and f ( X ) be the convex conjugate function of f and the gradient of f at X R N 2 × K × N 3 , respectively. Then, the randomized regularized Kaczmarz algorithm is obtained as follows (Algorithm 2).
Algorithm 2 Randomized Regularized Kaczmarz Algorithm
Input:  
A R N 1 × N 2 × N 3 , B R N 1 × K × N 3 , stepsizes α > 0 and maximum number of iterations M
Output:  
last iterate X ( k )
  1:
Initialize: Z ( 0 ) r a n g e K ( A T ) and X ( 0 ) = f ( Z ( 0 ) )
  2:
for k = 1 , 2 , , M do
  3:
   Pick i k [ N 1 ] with A i k , : , : F 2 / A F 2
  4:
   Set Z ( k ) = Z ( k 1 ) α A i k , : , : F 2 ( A i k , : , : ) T ( A i k , : , : X ( k 1 ) B i k , : , : )
  5:
    X ( k ) = f ( Z ( k ) )
  6:
end for
For the least F-norm problem of consistent tensor linear systems (1), we have
f ( X ) = 1 2 X F 2 , f ( X ) = 1 2 X F 2 , f ( X ) = X .
Algorithm 2 becomes a tensor-randomized Kaczmarz (TRK) algorithm for solving the problem (1) with the update
X ( k ) = X ( k 1 ) α A i k , : , : F 2 ( A i k , : , : ) T ( A i k , : , : X ( k 1 ) B i k , : , : ) ,
which is pseudoinverse-free and different from the algorithm proposed in [15]. Next, the new algorithms provided are based on the TRK update (14).

3. Tensor Randomized Average Kaczmarz Algorithm

In this section, similar to the RABK algorithm, the TRAK algorithm is designed to pursue the minimum F-norm solution of a consistent tensor linear systems (1), which takes a combination of several TRK updates, i.e.,
X ( k ) = X ( k 1 ) i J i k A i , : , : F 2 A J i k , : , : F 2 α ( A i , : , : ) T A i , ; , : X ( k 1 ) B i , : , : A i , : , : F 2 = ( 5 ) X ( k 1 ) i J i k α ( A T ) : , i , : A i , ; , : X ( k 1 ) B i , : , : A J i k , : , : F 2 = ( 4 ) X ( k 1 ) α ( A T ) : , J i k , : A J i k , : , : X ( k 1 ) B J i k , : , : A J i k , : , : F 2 = ( 5 ) X ( k 1 ) α ( A J i k , : , : ) T A J i k , : , : X ( k 1 ) B J i k , : , : A J i k , : , : F 2 .
We give the method in Algorithm 3. We emphasize that the algorithm can be implemented on distributed computing units. If the number of partition for [ N 1 ] is N 1 , then the TRAK algorithm will reduce to the TRK algorithm.
Algorithm 3 Tensor randomized average Kaczmarz (TRAK) algorithm
Input: 
A R N 1 × N 2 × N 3 , X ( 0 ) r a n g e K ( A T ) R N 2 × K × N 3 , B R N 1 × K × N 3 , stepsize α > 0 , maximum number of iterations M and partition of [ N 1 ] : { J i } i = 1 s
Output: 
last iterate X ( k )
  1:
for k = 1 , 2 , , M do
  2:
   Pick i k [ s ] with A J i k , : , : F 2 / A F 2
  3:
    X ( k ) = X ( k 1 ) α A J i k , : , : F 2 ( A J i k , : , : ) T ( A J i k , : , : X ( k 1 ) B J i k , : , : )
  4:
end for
Remark 1. 
Since X ( 0 ) r a n g e K ( A T ) and
X ( k ) = X ( k 1 ) α A J i k , : , : F 2 ( A J i k , : , : ) T ( A J i k , : , : X ( k 1 ) B J i k , : , : ) = ( 8 ) X ( k 1 ) α A J i k , : , : F 2 ( I J i k , : , : A ) T ( A J i k , : , : X ( k 1 ) B J i k , : , : ) = ( 7 ) X ( k 1 ) α A J i k , : , : F 2 A T ( I J i k , : , : ) T ( A J i k , : , : X ( k 1 ) B J i k , : , : ) ,
we obtain that { X ( k ) } k = 0 r a n g e K ( A T ) by induction. Therefore, Iif the iteration sequence generated by the TRAK algorithm converges to a solution X , X will be the least F-norm solution A B by Theorem 2.
Next, we analyze the convergence of the TRAK algorithm with a constant stepsize.
Theorem 3. 
Let the tensor linear system (1) be consistent. Assume that { J i } i = 1 s is a partition of [ N 1 ] . Let ξ = max i [ s ] A J i , : , : 2 2 A J i , : , : F 2 and α ( 0 , 2 ξ ) . Then the iteration sequence { X ( k ) } k = 0 generated by the TRAK algorithm with X ( 0 ) r a n g e K ( A T ) converges in expectation to the unique least F-norm solution X = A B . Moreover, the expected norm of solution error obeys
E X ( k + 1 ) X F 2 ( 1 ( 2 α α 2 ξ ) σ m i n 2 ( b c i r c ( A ) ) A F 2 ) k + 1 E X ( 0 ) X F 2 .
Proof. 
Subtracting X from both sides of the TRAK update given in Equation (15), we have that
X ( k + 1 ) X = X ( k ) X α A J i k + 1 , : , : F 2 ( A J i k + 1 , : , : ) T ( A J i k + 1 , : , : X ( k ) B J i k + 1 , : , : ) .
To simplify notation, we use E ( k ) = X ( k ) X . Then,
E ( k + 1 ) F 2 = E ( k ) α A J i k + 1 , : , : F 2 ( A J i k + 1 , : , : ) T ( A J i k + 1 , : , : E ( k ) ) F 2 = ( 11 ) E ( k ) α A J i k + 1 , : , : F 2 ( A J i k + 1 , : , : ) T ( A J i k + 1 , : , : E ( k ) ) , E ( k ) α A J i k + 1 , : , : F 2 ( A J i k + 1 , : , : ) T ( A J i k + 1 , : , : E ( k ) ) = E k , E k 2 E k , α A J i k + 1 , : , : F 2 ( A J i k + 1 , : , : ) T ( A J i k + 1 , : , : E ( k ) ) + α A J i k + 1 , : , : F 2 ( A J i k + 1 , : , : ) T ( A J i k + 1 , : , : E ( k ) ) , α A J i k + 1 , : , : F 2 ( A J i k + 1 , : , : ) T ( A J i k + 1 , : , : E ( k ) ) = E k F 2 2 α A J i k + 1 , : , : F 2 E ( k ) , ( A J i k + 1 , : , : ) T ( A J i k + 1 , : , : E ( k ) ) + α 2 A J i k + 1 , : , : F 4 ( A J i k + 1 , : , : ) T ( A J i k + 1 , : , : E ( k ) ) F 2 = ( 9 ) E ( k ) F 2 2 α A J i k + 1 , : , : F 2 A J i k + 1 , : , : E ( k ) , A J i k + 1 , : , : E ( k ) + α 2 A J i k + 1 , : , : F 4 ( A J i k + 1 , : , : ) T ( A J i k + 1 , : , : E ( k ) ) F 2 ( 12 ) E ( k ) F 2 2 α A J i k + 1 , : , : F 2 A J i k + 1 , : , : E ( k ) F 2 + α 2 A J i k + 1 , : , : F 4 ( A J i k + 1 , : , : ) T 2 2 A J i k + 1 , : , : E ( k ) F 2 = ( 10 ) , ( 6 ) E ( k ) F 2 2 α A J i k + 1 , : , : F 2 A J i k + 1 , : , : E ( k ) F 2 + α 2 A J i k + 1 , : , : 2 2 A J i k + 1 , : , : F 2 A J i k + 1 , : , : E ( k ) F 2 A J i k + 1 , : , : F 2 .
Since ξ = max i [ s ] A J i , : , : 2 2 A J i , : , : F 2 , we can obtain
E ( k + 1 ) F 2 E ( k ) F 2 ( 2 α α 2 ξ ) A J i k + 1 , : , : E ( k ) F 2 A J i k + 1 , : , : F 2 .
Taking the conditional expectation conditioned on E ( k ) , we have
E [ E ( k + 1 ) F 2 E ( k ) ] E ( k ) F 2 ( 2 α α 2 ξ ) E [ A J i k + 1 , : , : E ( k ) F 2 A J i k + 1 , : , : F 2 E ( k ) ] = E ( k ) F 2 ( 2 α α 2 ξ ) i k + 1 [ s ] A J i k + 1 , : , : F 2 A F 2 A J i k + 1 , : , : E ( k ) F 2 A J i k + 1 , : , : F 2 = E ( k ) F 2 ( 2 α α 2 ξ ) i k + 1 [ s ] A J i k + 1 , : , : E ( k ) F 2 A F 2 = ( 3 ) E ( k ) F 2 ( 2 α α 2 ξ ) i k + 1 [ s ] ( A E ( k ) ) J i k + 1 , : , : F 2 A F 2 = E ( k ) F 2 ( 2 α α 2 ξ ) A E ( k ) F 2 A F 2 .
By Remark 1 and Theorem 2, we have E ( k ) = X ( k ) X = X ( k ) A B r a n g e K ( A T ) .
Therefore,
E [ E ( k + 1 ) F 2 E ( k ) ] ( 13 ) E ( k ) F 2 ( 2 α α 2 ξ ) σ m i n 2 ( b c i r c ( A ) ) E ( k ) F 2 A F 2 = ( 1 ( 2 α α 2 ξ ) σ m i n 2 ( b c i r c ( A ) ) A F 2 ) E ( k ) F 2 .
By the law of total expectation, we have
E [ E ( k + 1 ) F 2 ] ( 1 ( 2 α α 2 ξ ) σ m i n 2 ( b c i r c ( A ) ) A F 2 ) E [ E ( k ) F 2 ] .
Finally, unrolling the recurrence gives the desired result.    □
When N 3 = 1 , the tensor A R N 1 × N 2 × 1 , X R N 2 × K × 1 and B R N 1 × K × 1 will degenerate to an N 1 × N 2 matrix A, an N 2 × K matrix X and an N 1 × K matrix B, respectively. Problem (1) becomes a problem of solving the least F-norm solution for consistent matrix linear systems
A X = B ,
where A R N 1 × N 2 , X R N 2 × K and B R N 1 × K .
Then, Algorithm 3 becomes Algorithm 4.
Algorithm 4 Matrix randomized average Kaczmarz (MRAK) algorithm
Input: 
A R N 1 × N 2 , B R N 1 × K , X ( 0 ) r a n g e K ( A T ) R N 2 × K , stepsize α > 0 , maximum number of iterations M and partition of [ N 1 ]: { J i } i = 1 s
Output: 
last iterate X ( k )
  1:
for k = 1 , 2 , , M do
  2:
   Pick i k [ N 1 ] with A J i k , : F 2 / A F 2
  3:
   Set X ( k ) = X ( k 1 ) α A J i k , : F 2 ( A J i k , : ) T ( A J i k , : X ( k 1 ) B J i k , : )
  4:
end for
In this setting, Theorem 3 reduces to the following result.
Corollary 1. 
Let the matrix linear system (17) be consistent. Assume that { J i } i = 1 s is a partition of [ N 1 ] . Let ξ = max i [ s ] A J i , : 2 2 A J i , : F 2 and α ( 0 , 2 ξ ) . Then the iteration sequence { X ( k ) } k = 0 generated by the MRAK algorithm with X ( 0 ) r a n g e K ( A T ) converges in expectation to the unique least F-norm solution X = A B . Moreover, the expected norm of solution error obeys
E X ( k + 1 ) X F 2 ( 1 ( 2 α α 2 ξ ) σ m i n 2 ( A ) A F 2 ) k + 1 E X ( 0 ) X F 2 .

4. Tensor Randomized Average Kaczmarz Algorithm with Random Sampling (TRAKS)

In Algorithm 3, we give the partition of A before the TRAK algorithm starts to run. In this setting, the entries of each block are determined in the iteration. However, the partition of A has a significant effect on the behavior of the TRAK method, as shown in [14]. Motivated by [21], we use a small portion of the horizontal slice of A to estimate the whole and propose the tensor randomized average Kaczmarz algorithm with random sampling (TRAKS).
In the TRAKS method, we first randomly sample from the population with normal distribution N ( μ , σ 2 ) . Next, in order to avoid unreasonable sampling that cannot estimate the whole well, we use “Z” test [22] to evaluate the results of each random sampling. Precisely, let { ω 1 , ω 2 , , ω β } be β random samples from all horizontal slices of A . Then, the significant difference between the samples and the population can be judged by the Z-score:
Z = ω ¯ μ s / β ,
where μ = i = 1 N 1 A i , : , : F 2 N 1 is the population mean, ω ¯ = i = 1 β ω i F 2 β is the sample mean and s = i = 1 β ( ω i F 2 ω ¯ ) 2 β is the sample standard deviation. If Z < 1.96 , the occurrence probability of significant difference will be no more than 5 % and we accept the sampling, otherwise, we need to resample from the population. We list the TRAKS method in Algorithm 5.
Algorithm 5 Tensor randomized average Kaczmarz algorithm with random sampling (TRAKS)
Input: 
A R N 1 × N 2 × N 3 , X ( 0 ) r a n g e K ( A T ) R N 2 × K × N 3 , B R N 1 × K × N 3 , stepsize α > 0 , β and maximum number of iteration M
Output: 
last iterate X ( k )
  1:
Compute the population mean μ = i = 1 N 1 A i , : , : F 2 N 1
  2:
for k = 1 , 2 , , M do
  3:
   Randomly select β horizontal slices of A as samples, A τ k , : , :
  4:
   Compute ω k ¯ = A τ k , : , : F 2 β , s k = i τ k ( A i , : , : F 2 ω k ¯ ) 2 β , Z k = ω k ¯ μ s k / β
  5:
   while  Z k 1.96  do
  6:
     Randomly select β horizontal slices of A as samples, A τ k , : , :
  7:
     Calculate ω k ¯ = A τ k , : , : F 2 β , s k = i τ k ( A i , : , : F 2 ω k ¯ ) 2 β , Z k = ω k ¯ μ s k / β
  8:
   end while
  9:
    X ( k ) = X ( k 1 ) α A τ k , : , : F 2 ( A τ k , : , : ) T ( A τ k , : , : X ( k 1 ) B τ k , : , : )
  10:
end for
In order to prove the convergence of Algorithm 5, we need to prepare a lemma and a theorem firstly.
Lemma 2 
([23]). If both a = { a 1 , a 2 , , a n } and b = { b 1 , b 2 , , b n } are two arrays with real components and satisfy a j 0 , b j > 0 , j { 1 , 2 , , n } , then the following inequality is established
j = 1 n a j b j j = 1 n a j j = 1 n b j .
Lemma 3 
([22] (Chebyshev’s law of large numbers)). Suppose that { z k } n = 1 is a series of independent random variables. They have expectation E ( z k ) and variance D ( z k ) , respectively. If there is a constant C such that D ( z k ) C , for any small positive number ϵ, we have
lim n P = { 1 n k = 1 n z k 1 n k = 1 n E ( z k ) < ϵ , ϵ > 0 } = 1 .
Lemma 3 indicates that if the sample size is large enough, the sample mean will approach to the population mean.
Next, we discuss the convergence of the TRAKS method.
Theorem 4. 
Let the tensor linear system (1) be consistent. Assume that β is the size of the sample and β 1 is the cardinality of the sample set accepted by the “Z” test. Let ξ 1 = max τ k [ N 1 ] , | τ k | = β A τ k , : , : 2 2 A τ k , : , : F 2 , α ( 0 , 2 ξ 1 ) and 0 ϵ k , ϵ k ˜ 1 . Then the iteration sequence { X ( k ) } k = 0 generated by the TRAKS algorithm with X ( 0 ) r a n g e K ( A T ) converges in expectation to the unique least F-norm solution X = A B . Moreover, the expected norm of solution error obeys
E [ X ( k + 1 ) X F 2 ] ( 1 ( 2 α α 2 ξ 1 ) σ m i n 2 ( b c i r c ( A ) ) ( 1 ± ϵ k ) β 1 A F 2 ( 1 ± ϵ k ˜ ) ) E [ X ( k ) X F 2 ] .
Proof. 
From the last line of (16) in the Proof of Theorem 3, we have that
E ( k + 1 ) F 2 E ( k ) F 2 2 α A τ k , : , : F 2 A τ k , : , : E ( k ) F 2 + α 2 A τ k , : , : 2 2 A τ k , : , : F 2 A τ k , : , : E ( k ) F 2 A τ k , : , : F 2 .
Since ξ 1 = max τ k [ N 1 ] , | τ k | = β A τ k , : , : 2 2 A τ k , : , : F 2 , we can obtain
E ( k + 1 ) F 2 E ( k ) F 2 ( 2 α α 2 ξ 1 ) A τ k , : , : E ( k ) F 2 A τ k , : , : F 2 .
Taking conditional expectation conditioned on E ( k ) , we have that
E [ E ( k + 1 ) F 2 E ( k ) ] E ( k ) F 2 ( 2 α α 2 ξ 1 ) E [ A τ k , : , : E ( k ) F 2 A τ k , : , : F 2 E ( k ) ] .
Assume that the sample set accepted by the “Z” test is C and C = β 1 , we can obtain that
E [ E ( k + 1 ) F 2 E ( k ) ] E ( k ) F 2 ( 2 α α 2 ξ 1 ) 1 β 1 A τ k , : , : C A τ k , : , : E ( k ) F 2 A τ k , : , : F 2 ( 18 ) E ( k ) F 2 ( 2 α α 2 ξ 1 ) 1 β 1 A τ k , : , : C A τ k , : , : E ( k ) F 2 A τ k , : , : C A τ k , : , : F 2 = ( 3 ) E ( k ) F 2 ( 2 α α 2 ξ 1 ) 1 β 1 A τ k , : , : C ( A E ( k ) ) τ k , : , : F 2 A τ k , : , : C A τ k , : , : F 2 = E ( k ) F 2 ( 2 α α 2 ξ 1 ) 1 β 1 A τ k , : , : C ( A E ( k ) ) τ k , : , : F 2 β A τ k , : , : C A τ k , : , : F 2 β
According to Lemma 3, when N 1 is large enough and β is sufficiently large, there exist 0 ϵ k , ϵ k ˜ 1 , such that
( A E ( k ) ) τ k , : , : F 2 β = A E ( k ) F 2 N 1 ( 1 ± ϵ k )
and
A τ k , : , : F 2 β = A F 2 N 1 ( 1 ± ϵ k ˜ ) .
Combining (19), (20), and (21), we have that
E [ E ( k + 1 ) F 2 E ( k ) ] E ( k ) F 2 ( 2 α α 2 ξ 1 ) 1 β 1 A E ( k ) F 2 ( 1 ± ϵ k ) A F 2 ( 1 ± ϵ k ˜ ) .
By Remark 1 and Theorem 2, we have E ( k ) = X ( k ) X = X ( k ) A B r a n g e K ( A T ) .
Therefore,
E [ E ( k + 1 ) F 2 E ( k ) ] ( 13 ) E ( k ) F 2 ( 2 α α 2 ξ 1 ) 1 β 1 σ m i n 2 ( b c i r c ( A ) ) E ( k ) F 2 ( 1 ± ϵ k ) A F 2 ( 1 ± ϵ k ˜ ) = ( 1 ( 2 α α 2 ξ 1 ) σ m i n 2 ( b c i r c ( A ) ) ( 1 ± ϵ k ) β 1 A F 2 ( 1 ± ϵ k ˜ ) ) E ( k ) F 2 .
By the law of total expectation, we have
E [ E ( k + 1 ) F 2 ] ( 1 ( 2 α α 2 ξ 1 ) σ m i n 2 ( b c i r c ( A ) ) ( 1 ± ϵ k ) β 1 A F 2 ( 1 ± ϵ k ˜ ) ) E [ E ( k ) F 2 ] .
   □
For solving (17), Algorithm 5 becomes Algorithm 6.
Algorithm 6 Matrix randomized average Kaczmarz algorithm with random sampling (MRAKS)
Input: 
A R N 1 × N 2 , X ( 0 ) r a n g e K ( A T ) R N 2 × K , B R N 1 × K , stepsize α > 0 , β and maximum number of iteration M
Output: 
last iterate X ( k )
  1:
Compute the population mean μ = i = 1 N 1 A i , : F 2 N 1
  2:
for k = 1 , 2 , , M do
  3:
   Randomly select β rows of A as samples, A τ k , :
  4:
   Compute ω k ¯ = A τ k , : , : F 2 β , s k = i τ k ( A i , : , : F 2 ω k ¯ ) 2 β , Z k = ω k ¯ μ s k / β
  5:
   while  Z k 1.96  do
  6:
     Randomly select β rows of A as samples, A τ k , :
  7:
     Calculate ω k ¯ = A τ k , : , : F 2 β , s k = i τ k ( A i , : , : F 2 ω k ¯ ) 2 β , Z k = ω k ¯ μ s k / β
  8:
   end while
  9:
    X ( k ) = X ( k 1 ) α A τ k , : F 2 ( A τ k , : ) T ( A τ k , : X ( k 1 ) B τ k , : )
  10:
end for
Theorem 4 reduces to the following result.
Corollary 2. 
Let the matrix linear system (17) be consistent. Assume that β is the size of the sample and β 1 is the cardinality of the sample set accepted by the “Z” test. Let ξ 1 = max τ k [ N 1 ] , | τ k | = β A τ k , : 2 2 A τ k , : F 2 , α ( 0 , 2 ξ 1 ) and 0 ϵ k , ϵ k ˜ 1 . Then the iteration sequence { X ( k ) } k = 0 generated by the MRAKS algorithm with X ( 0 ) r a n g e K ( A T ) converges in expectation to the unique least F-norm solution X = A B . Moreover, the expected norm of solution error obeys
E [ X k + 1 X F 2 ] ( 1 ( 2 α α 2 ξ 1 ) σ m i n 2 ( A ) ( 1 ± ϵ k ) β 1 A F 2 ( 1 ± ϵ k ˜ ) ) E [ X k X F 2 ] .

5. The Fourier Version of the Algorithms

We first introduce two additional notations that are widely used in this subsection. For X R N 1 × N 2 × N 3 , f f t ( X , [ ] , 3 ) denotes the mode-3 fast Fourier transform of X , which can also be written as f f t ( X , [ ] , 3 ) = f o l d ( ( F N 3 I N 1 ) u n f o l d ( X ) ) ( F N 3 is defined in Definition 1.). Similarly, i f f t ( X , [ ] , 3 ) denotes the mode-3 inverse fast Fourier transform of X and i f f t ( X , [ ] , 3 ) = f o l d ( ( F N 3 H N 3 I N 1 ) u n f o l d ( X ) ) . By Definition 1, we easily know that i f f t ( f f t ( X , [ ] , 3 ) ) = f f t ( i f f t ( X , [ ] , 3 ) ) = X . Furthermore, for the convenience of viewing, we introduce the tensor operator “bdiag” again. For X R N 1 × N 2 × N 3 , b d i a g ( X ) is the block diagonal matrix formed by the frontal faces of X , i.e.,
b d i a g ( X ) = X 1 X 2 X N 3 .
By Lemma 1, the tensor linear system A X = B ( A R N 1 × N 2 × N 3 , X R N 2 × K × N 3 a n d B R N 1 × K × N 3 ) can be reformulated as
( A ^ ) 1 ( A ^ ) 2 ( A ^ ) N 3 ( X ^ ) 1 ( X ^ ) 2 ( X ^ ) N 3 = ( B ^ ) 1 ( B ^ ) 2 ( B ^ ) N 3 ,
where ( A ^ ) k , ( X ^ ) k and ( B ^ ) k are the frontal slices of A ^ = f o l d ( ( F N 3 I N 1 ) u n f o l d ( A ) ) , X ^ = f o l d ( ( F N 3 I N 2 ) u n f o l d ( X ) ) and B ^ = f o l d ( ( F N 3 I N 1 ) u n f o l d ( B ) ) , respectively ( F N 3 is an N 3 × N 3 DFT matrix and is defined in Definition 1.)
Before we present the algorithms in the Fourier domain, we provide a key theorem.
Theorem 5. 
Let J i [ N 1 ] ( i = 1 , 2 , ) and τ i = { ( t 1 ) N 1 + J i t = 1 , 2 , , N 3 } [ N 1 × N 3 ] ( i = 1 , 2 , ) be the set of horizontal slice indicator in A and the set of row indicator in b d i a g ( A ) , respectively. Assume that the sequence { u n f o l d ( X ^ ( k ) ) } k = 0 is generated by u n f o l d ( X ^ ( k ) ) = u n f o l d ( X ^ ( k 1 ) ) α ( b d i a g ( A ^ ) ) τ k , : F 2 ( ( b d i a g ( A ^ ) ) τ k , : ) H ( ( b d i a g ( A ^ ) ) τ k , :
u n f o l d ( X ^ ( k 1 ) ) ( u n f o l d ( B ^ ) ) τ k , : ) with X ( 0 ) r a n g e K ( A T ) R N 2 × K × N 3 and u n f o l d ( X ^ ( 0 ) ) = u n f o l d ( f f t ( X ( 0 ) , [ ] , 3 ) ) for solving Equation (22). Then, for tensor linear systems (1), the iteration scheme of the TRAK and TRAKS algorithms in the Fourier domain is
( X ^ ) t ( k + 1 ) = ( X ^ ) t ( k ) α ( A ^ ) J i k + 1 , : , : F 2 ( ( A ^ ) J i k + 1 , : , t ) H ( ( A ^ ) J i k + 1 , : , t ( X ^ ) t ( k ) ( B ^ ) J i k + 1 , : , t ) ,
for t = 1 , 2 , , N 3 . Moreover, it holds that
i f f t ( X ^ ( k ) , [ ] , 3 ) R N 2 × K × N 3 , f o r k [ 0 , ) .
Proof. 
u n f o l d ( X ^ ( k + 1 ) ) = u n f o l d ( X ^ ( k ) ) α ( b d i a g ( A ^ ) ) τ i k + 1 , : F 2 ( ( b d i a g ( A ^ ) ) τ i k + 1 , : ) H ( ( b d i a g ( A ^ ) ) τ i k + 1 , : u n f o l d ( X ^ ( k ) ) ( u n f o l d ( B ^ ) ) τ i k + 1 , : ) = u n f o l d ( X ^ ( k ) ) α ( A ^ ) J i k + 1 , : , : F 2 ( b d i a g ( ( A ^ ) J i k + 1 , : , : ) ) H ( b d i a g ( ( A ^ ) J i k + 1 , : , : ) u n f o l d ( X ^ ( k ) ) u n f o l d ( ( B ^ ) J i k + 1 , : , : ) ) ,
where the second equality follows from ( b d i a g ( A ^ ) ) τ i k + 1 , : = b d i a g ( ( A ^ ) J i k + 1 , : , : ) ,
b d i a g ( ( A ^ ) J i k + 1 , : , : ) F 2 = ( A ^ ) J i k + 1 , : , : F 2 and ( u n f o l d ( B ^ ) ) τ i k + 1 , : = u n f o l d ( ( B ^ ) J i k + 1 , : , : ) .
With the use of the block-diagonal structure, Equation (24) can be reformulated as
( X ^ ) t ( k + 1 ) = ( X ^ ) t ( k ) α ( A ^ ) J i k + 1 , : , : F 2 ( ( A ^ ) J i k + 1 , : , t ) H ( ( A ^ ) J i k + 1 , : , t ( X ^ ) t ( k ) ( B ^ ) J i k + 1 , : , t ) ,
for t = 1 , 2 , , N 3 .
Since u n f o l d ( A ^ ) = ( F N 3 I N 1 ) u n f o l d ( A ) and u n f o l d ( B ^ ) = ( F N 3 I N 1 ) u n f o l d ( B ) , we can generate that
( A ^ ) J i k + 1 , : , t = ( A J i k + 1 , : , : ^ ) t , for t [ N 3 ]
and
u n f o l d ( ( B ^ ) J i k + 1 , : , : ) ) = ( F N 3 I | J i k + 1 | ) u n f o l d ( B J i k + 1 , : , : ) ,
where | J i k + 1 | is the cardinality of J i k + 1 .
Therefore, it holds that
b d i a g ( ( A ^ ) J i k + 1 , : , : ) = b d i a g ( A J i k + 1 , : , : ^ ) = ( 2 ) ( F N 3 I | J i k + 1 | ) b c i r c ( A J i k + 1 , : , : ) ( F N 3 H I N 2 ) N 3 .
Combining (24), (25), and (26), we have
u n f o l d ( X ^ ( k + 1 ) ) = u n f o l d ( X ^ ( k ) ) α ( A ^ ) J i k + 1 , : , : F 2 ( F N 3 I N 2 ) ( b c i r c ( A J i k + 1 , : , : ) ) T ( b c i r c ( A J i k + 1 , : , : ) ( F N 3 H I N 2 ) u n f o l d ( X ^ ( k ) ) N 3 u n f o l d ( B J i k + 1 , : , : ) ) .
Since u n f o l d ( X ^ ( 0 ) ) = ( F N 3 I N 2 ) u n f o l d ( X ( 0 ) ) and X ( 0 ) R N 2 × K × N 3 , with the recurrence Formula (27) it holds that
F N 3 H I N 2 N 3 u n f o l d ( X ^ ( k ) ) R N 2 × K × N 3 .
This completes the proof.    □
By the above analysis, we propose the Fourier version of the TRAK and TRAKS algorithms, i.e., Algorithms 7 and 8.
Algorithm 7 TRAK algorithm in the Fourier domain ( TRAK F )
Input: 
A R N 1 × N 2 × N 3 , X ( 0 ) r a n g e K ( A T ) R N 2 × K × N 3 , B R N 1 × K × N 3 , stepsize α , maximum number of iterations M and partition of [ N 1 ] : { J i } i = 1 s
Output: 
last iterate X ( k )
  1:
A ^ f f t ( A , [ ] , 3 ) , X ( 0 ) ^ f f t ( X ( 0 ) , [ ] , 3 ) , B ^ f f t ( B , [ ] , 3 )
  2:
for k = 1 , 2 , , M do
  3:
   Pick i k [ s ] with A ^ J i k , : , : F 2 / A ^ F 2
  4:
   for  t = 1 , 2 , , N 3  do
  5:
      ( X ^ ) t ( k ) = ( X ^ ) t ( k 1 ) α ( A ^ ) J i k , : , : F 2 ( ( A ^ ) J i k , : , t ) H ( ( A ^ ) J i k , : , t ( X ^ ) t ( k 1 ) ( B ^ ) J i k , : , t )
  6:
   end for
  7:
end for
  8:
X ( k ) i f f t ( ( X ^ ) ( k ) , [ ] , 3 )
Algorithm 8 TRAKS algorithm in the Fourier domain ( TRAKS F )
Input: 
A R N 1 × N 2 × N 3 , X ( 0 ) r a n g e K ( A T ) R N 2 × K × N 3 , B R N 1 × K × N 3 , stepsize α > 0 , β and maximum number of iterations M
Output: 
last iterate X ( k )
  1:
A ^ f f t ( A , [ ] , 3 ) , X ( 0 ) ^ f f t ( X ( 0 ) , [ ] , 3 ) , B ^ f f t ( B , [ ] , 3 )
  2:
Compute the population mean μ = i = 1 N 1 A ^ i , : , : F 2 N 1
  3:
for k = 1 , 2 , , M do
  4:
   Randomly select β horizontal slices of A ^ as samples, A ^ τ k , : , :
  5:
   Compute ω k ¯ = A ^ τ k , : , : F 2 β , s k = i τ k ( A ^ i , : , : F 2 ω k ¯ ) 2 β , Z k = ω k ¯ μ s k / β
  6:
   while  Z k 1.96  do
  7:
     Randomly select β horizontal slices of A ^ as samples, A ^ τ k , : , :
  8:
     Calculate ω k ¯ = A ^ τ k , : , : F 2 β , s k = i τ k ( A ^ i , : , : F 2 ω k ¯ ) 2 β , Z k = ω k ¯ μ s k / β
  9:
   end while
  10:
   for  t = 1 , 2 , , N 3  do
  11:
      ( X ^ ) t ( k ) = ( X ^ ) t ( k 1 ) α ( A ^ ) τ k , : , : F 2 ( ( A ^ ) τ k , : , t ) H ( ( A ^ ) τ k , : , t ( X ^ ) t ( k 1 ) ( B ^ ) τ k , : , t )
  12:
   end for
  13:
end for
  14:
X ( k ) i f f t ( ( X ^ ) ( k ) , [ ] , 3 )
Remark 2. 
Theorem 5 shows that the sequence generated by the iteration scheme (23) can be transformed into real space after implementing a mode-3 inverse fast Fourier transform of the obtained sequence, which guarantees that Algorithms 7 and 8 work well for real-valued tensor linear systems (1).
By multiplying the IDFT matrix (Definition 1) and folding on both sides of (27), we obtain
X ( k + 1 ) = X ( k ) α ( A ^ ) J i k + 1 , : , : F 2 ( A J i k + 1 , : , : ) T ( A J i k + 1 , : , : X ( k ) B J i k + 1 , : , : ) = X ( k ) α N 3 A J i k + 1 , : , : F 2 ( A J i k + 1 , : , : ) T ( A J i k + 1 , : , : X ( k ) B J i k + 1 , : , : ) .
If we select α NoFourier = α Fourier N 3 , where α NoFourier a n d α Fourier are the stepsizes of the algorithms that are not in the Fourier domain and stepsizes of the algorithms in the Fourier domain, respectively, Equation (28) will be similar to the update (15) of the algorithms that are not in the Fourier domain. However, the TRAK F and TRAKS F algorithm make use of the block-diagonal structure, which can be implemented more efficiently than the TRAK and TRAKS algorithms. Moreover, the TRAK F and TRAKS F algorithms can be computed in parallel well.
Taking advantage of the relationship between the TRAK and TRAK F updates and the TRAKS and TRAKS F updates, the convergence guarantees of the TRAK F and TRAKS F algorithms are generated as follows.
Theorem 6. 
Assume that the tensor linear system (1) is consistent. Assume that { J i } i = 1 s is a partition of [ N 1 ] . Let ξ = max i [ s ] A J i , : , : 2 2 A J i , : , : F 2 and α ( 0 , 2 N 3 ξ ) . Then the iteration sequence { X ( k ) } k = 0 generated by the T R A K F algorithm with X ( 0 ) r a n g e K ( A T ) converges in expectation to the unique least F-norm solution X = A B . Moreover, the expected norm of the solution error obeys
E X ( k + 1 ) X F 2 ( 1 ( 2 α N 3 α 2 ξ ) σ m i n 2 ( b c i r c ( A ) ) ( N 3 ) 2 A F 2 ) k + 1 E X ( 0 ) X F 2 .
Theorem 7. 
Let the tensor linear system (1) be consistent. Assume that β is the size of the sample and β 1 is the cardinality of the sample set accepted by the “Z" test. Let ξ 1 = max τ k [ N 1 ] , | τ k | = β A τ k , : , : 2 2 A τ k , : , : F 2 , α ( 0 , 2 N 3 ξ 1 ) and 0 ϵ k , ϵ k ˜ 1 . Then the iteration sequence { X ( k ) } k = 0 generated by the TRAKS F algorithm with X ( 0 ) r a n g e K ( A T ) converges in expectation to the unique least F-norm solution X = A B . Moreover, the expected norm of solution error obeys
E [ X ( k + 1 ) X F 2 ] ( 1 ( 2 α N 3 α 2 ξ 1 ) σ m i n 2 ( b c i r c ( A ) ) ( 1 ± ϵ k ) ( N 3 ) 2 β 1 A F 2 ( 1 ± ϵ k ˜ ) ) E [ X ( k ) X F 2 ] .

6. Numerical Experiments

In this section, we compare the performances of the TRK, TRAK, TRAKS, TRAK F and TRAKS F algorithms in some numerical examples. The tensor t-product toolbox [24] is used in our experiments. The stopping criterion is
RSE = X ( k ) A B F 2 A B F 2 = X ( k ) ^ A B ^ F 2 A B ^ F 2 < tolerance
or the number of iteration steps exceeds 10 5 . In our implementations, all computations are started from the point X ( 0 ) = 0 . IT and CPU(s) mean the medians of the required iteration steps and the elapsed CPU times with respect to 10 times of the repeated runs of the corresponding method, respectively. In the following experiments, we use the structural similarity index (SSIM) between two images X and Y to evaluate the recovered image quality, which is defined as
S S I M = ( 2 μ x μ y + C 1 ) ( 2 σ x y + C 2 ) ( μ x 2 + μ y 2 + C 1 ) ( σ x 2 + σ y 2 + C 2 ) ,
where μ x and σ x are the mean and standard deviation of image X, σ x y is the cross-covariance between X and Y, and C 1 and C 2 are the luminance and contrast constants. SSIM values can be obtained by using the MATLAB function SSIM.
All experiments were carried out using MATLAB R2020b on a laptop with an Intel Core i7 processor, 16GB memory, and Windows 11 operating system.
For the TRAK and TRAK F algorithms, we consider a partition of [ N 1 ] , which is proposed in [14]:
J i = { ϖ ( k ) : k = ( i 1 ) N 1 s + 1 , ( i 1 ) N 1 s + 2 , , i N 1 s } , i [ s 1 ] , J s = { ϖ ( k ) : k = ( s 1 ) N 1 s + 1 , ( s 1 ) N 1 s + 2 , , N 1 } ,
where ϖ is a permutation on [ N 1 ] chosen uniformly at random.

6.1. Synthetic Data

We generate the sensing tensor A and the acquired measurement tensor B as follows:
A = randn ( N 1 , N 2 , N 3 ) , B = A randn ( N 2 , K , N 3 ) .
We set N 1 = 500 , N 2 = 200 , N 3 = 50 and K = 50 .
In the TRAK, TRAKS, TRAK F , and TRAKS F algorithms, we know that s, β , and α affect the numerical results. Thus, we first show how they impact the performance of our methods in Figure 1, Figure 2, Figure 3 and Figure 4. In Figure 1, we plot the CPU and IT of the TRAK and TRAK F algorithms with the number of partitions s = 10 and different stepsizes α for different tolerances. We can find that the convergences of the TRAK and TRAK F algorithms are quicker with respect to the increase of α and the fixed s = 10 , but slow down after reaching the faster convergence rate. Moreover, the TRAK and TRAK F algorithms also converge for α T R A K 2 / ξ and α T R A K F 2 N 3 / ξ , and converge much faster by using the appropriate extrapolated stepsize. In Figure 2, we plot the curves of the TRAKS and TRAKS F algorithms with different stepsizes when β = 100 . In this experiment, we approximate ξ 1 = max τ k [ N 1 ] , | τ k | = β A τ k , : , : 2 2 A τ k , : , : F 2 by using the maximum value of A τ k , : , : 2 2 A τ k , : , : F 2 obtained by random sampling 100 times. From this figure, we can observe that the convergence rates of the TRAKS and TRAKS F algorithms raise firstly and then slow down with respect to the increase of α .
In Figure 3, we depict the curves of the average number of iterations and computing times of the TRAK and TRAK F algorithms versus the different number of partitions. In Figure 4, we plot the curves of the average CPU times and average IT of the TRAKS and TRAKS F algorithms for different β . We use α T R A K S = 1.95 / ξ 1 , α TRAKS F = 1.95 N 3 / ξ 1 , α T R A K = 1.95 / ξ and α T R A K F = 1.95 N 3 / ξ . For all cases, we set t o l e r a n c e = 10 5 . From these figures, we see that the CPU times are decreasing at the beginning and then increasing with respect to the increase of parameters. The number of iteration steps are always increasing, with respect to the increase of s, for both TRAK and TRAK F , while the TRAKS and TRAKS F algorithms are the opposite for the number of iteration steps. In general, from Figure 1, Figure 2, Figure 3 and Figure 4, there is an optimal combination of parameters that makes our algorithms perform best. In the following experiments, we use the optimal experimental results obtained by trial and error.
To compare the performances of these algorithms, we use α TRK = 1.3 , which makes the TRK algorithm achieve optimal performance. For the TRAK, TRAK F , TRAKS, and TRAKS F algorithms, α TRAK = 2.5 / ξ , α TRAK F = 2.5 N 3 / ξ , s TRAK = s TRAK F = 4 , α TRAKS = 2.7 / ξ 1 , α TRAKS F = 2.7 N 3 / ξ 1 and β TRAKS = β TRAKS F = 160 are used. In Figure 5, we depict the curves of tolerance versus the iteration steps and the calculated times. We observe that the TRAK, TRAK F , TRAKS, and TRAKS F algorithms converge much faster than the TRK algorithm, and the original algorithms and their Fourier versions have the same number of iteration steps for identical tolerance. The TRAKS F algorithm has the best performance in terms of CPU time.

6.2. 3D MRI Image Data

This experiment considers an image data X R 128 × 128 × 27 from data set mri in MATLAB. We generate randomly a Gaussian tensor A R 1000 × 128 × 27 and form the measurement tensor B by B = A X . The parameters are tuned to achieve optimal performance in all algorithms. We use α T R K = 1.2 , α T R A K = 2.3 / ξ , α T R A K F = ( 2.3 N 3 ) / ξ , s T R A K = s T R A K F = 4 , α T R A K S = 2.4 / ξ 1 , α TRAKS F = 2.4 N 3 / ξ 1 and β TRAKS = β TRAKS F = 160 . The results are reported in Figure 6. From the figure, we find that the TRAK, TRAK F , TRAKS, and TRAKS F algorithms significantly outperform the TRK algorithm. Meanwhile, it is easy to see that the TRAKS F algorithm performs better than the other algorithms in terms of CPU time.

6.3. Video Data

The experiment was implemented on video data, where the frontal slices of tensor X were the first 60 frames from the 1929 film “Finding His Voice” [25]. Each video frame had 240 × 320 pixels. Similar to Experiment Section 6.2, we randomly obtained a Gaussian tensor A R 1000 × 240 × 60 and form the measurement tensor B by B = A X . In this test, we used α T R K = 1.3 , α T R A K = 2.3 / ξ , α T R A K F = ( 2.3 N 3 ) / ξ , s T R A K = s T R A K F = 4 , α T R A K S = 2.8 / ξ 1 , α TRAKS F = 2.8 N 3 / ξ 1 and β TRAKS = β TRAKS F = 170 , which made all algorithms achieve the best performance. In Figure 7, we plot the curves of the average RSE versus IT and CPU times for all algorithms. From this figure, we observe that the TRAK, TRAK F , TRAKS, and TRAKS F algorithms significantly outperformed the TRK algorithm in terms of IT and CPU times and the TRAKS F algorithm had a great advantage in the calculating time. In addition, we run the TRK, TRAK, TRAKS F , TRAKS, and TRAKS F algorithms for 50, 15, 15, 19, and 19 iterations, respectively. Their reconstructions are reported in Figure 8. From Figure 8, we observe that the SSIM of the TRK algorithm was much smaller than that of the TRAK, TRAK F , TRAKS, and TRAKS F algorithms, which implies that the reconstruction results of the TRAK, TRAK F , TRAKS, and TRAKS F algorithms are apparently better than that of the TRK algorithm. Moreover, the TRAKS F algorithm requires less CPU time than the other algorithms.

6.4. CT Data

In this experiment, we test the performance of the algorithms using the real world CT data set. The underlying signal X is a tensor of size 512 × 512 × 42 , where each frontal slice is a 512 × 512 matrix of the C2-vertebrae. The images were taken from the Laboratory of the Human Anatomy and Embryology, University of Brussels (ULB), Belgium [26]. We also obtain randomly a Gaussian tensor A R 1000 × 512 × 42 and B = A X . Let α T R K = 1.3 , α T R A K = 2.3 / ξ , α T R A K F = ( 2.3 N 3 ) / ξ , s T R A K = s T R A K F = 5 , α T R A K S = 2.6 / ξ 1 , α TRAKS F = 2.6 N 3 / ξ 1 and β TRAKS = β TRAKS F = 250 . We run the TRK, TRAK, TRAK F , TRAKS, and TRAKS F algorithms for 40, 15, 15, 13, and 13 iterations, respectively. Their numerical results are presented in Figure 9 and Figure 10. From Figure 9, we see again that the TRAK, TRAK F , TRAKS, and TRAKS F algorithms converge faster than the TRK algorithm. From Figure 10, we observe that the SSIMs of the TRAK, TRAK F , TRAKS, and TRAKS F algorithms are much closer to 1 than that of the TRK algorithm, which implies that the TRAK, TRAK F , TRAKS, and TRAKS F algorithms achieve better reconstruction results. In addition, the TRAKS F algorithm requires less CPU time than the other algorithms.

7. Conclusions

In this paper, we propose the TRAK and TRAKS algorithms and discuss the Fourier domain version. The new algorithms can be efficiently implemented in distributed computing units. Numerical results show that the new algorithms have better performance than the TRK algorithm. Meanwhile, we note that the sizes of the samples, the number of partitions, and the stepsizes play important roles in guaranteeing fast convergences of the new methods. Therefore, in future work, we will obtain more appropriate parameters.

Author Contributions

Conceptualization, W.B. and F.Z.; Methodology, W.B. and F.Z.; Validation, W.B. and F.Z.; Writing—original draft preparation, F.Z.; Writing—review and editing, W.B., F.Z., W.L., Q.W. and Y.G.; Software, Q.W. and Y.G.; Visualization, F.Z., Q.W. and Y.G. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Natural Science Foundation of Shandong Province (grant number ZR2020MD060), the Fundamental Research Funds for the Central Universities (grant number 20CX05011A), and the Major Scientific and Technological Projects of CNPC (grant number ZD2019-184-001).

Data Availability Statement

The datasets that support the findings of this study are available from the corresponding author upon reasonable request.

Acknowledgments

The authors are thankful to the referees for their constructive comments and valuable suggestions, which have greatly improved the original manuscript of this paper.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Kilmer, M.E.; Martin, C.D. Factorization strategies for third-order tensors. Linear Algebra Its Appl. 2011, 435, 641–658. [Google Scholar] [CrossRef] [Green Version]
  2. Newman, E.; Horesh, L.; Avron, H.; Kilmer, M. Stable tensor neural networks for rapid deep learning. arXiv 2018, arXiv:1811.06569. [Google Scholar]
  3. Soltani, S.; Kilmer, M.E.; Hansen, P.C. A tensor-based dictionary learning approach to tomographic image reconstruction. Bit Numer. Math. 2016, 56, 1425–1454. [Google Scholar] [CrossRef] [Green Version]
  4. Hua, Z.; Li, L.; Zhu, H. Tensor regression with applications in neuroimaging data analysis. J. Am. Stat. Assoc. 2013, 108, 540–552. [Google Scholar]
  5. Andersen, A.H.; Kak, A.C. Simultaneous algebraic reconstruction technique (SART): A superior implementation of the ART algorithm. Ultrason. Imaging 1984, 6, 81–94. [Google Scholar] [CrossRef] [PubMed]
  6. Peterson, J.E.; Paulsson, B.N.; McEvilly, T.V. Applications of algebraic reconstruction techniques to crosshole seismic data. Geophysics 1985, 50, 1566–1580. [Google Scholar] [CrossRef]
  7. Zouzias, A.; Freris, N.M. Randomized extended Kaczmarz for solving least squares. SIAM J. Matrix Anal. Appl. 2013, 34, 773–793. [Google Scholar] [CrossRef]
  8. Needell, D. Randomized Kaczmarz solver for noisy linear systems. BIT Numer. Math. 2010, 50, 395–403. [Google Scholar] [CrossRef] [Green Version]
  9. Moorman, J.D.; Tu, T.K.; Molitor, D.; Needell, D. Randomized Kaczmarz with averaging. Bit Numer. Math. 2021, 61, 337–359. [Google Scholar] [CrossRef]
  10. Necoara, I. Faster randomized block Kaczmarz algorithms. SIAM J. Matrix Anal. Appl. 2019, 40, 1425–1452. [Google Scholar] [CrossRef] [Green Version]
  11. Miao, C.Q.; Wu, W.T. On greedy randomized average block Kaczmarz method for solving large linear systems. J. Comput. Appl. Math. 2022, 413, 114372. [Google Scholar] [CrossRef]
  12. Elfving, T. Block-iterative methods for consistent and inconsistent linear equations. Numer. Math. 1980, 35, 1–12. [Google Scholar] [CrossRef]
  13. Eggermont, P.P.B.; Herman, G.T.; Lent, A. Iterative algorithms for large partitioned linear systems with applications to image reconstruction. Linear Algebra Its Appl. 1981, 40, 37–67. [Google Scholar] [CrossRef] [Green Version]
  14. Needell, D.; Tropp, J.A. Paved with good intentions: Analysis of a randomized block Kaczmarz method. Linear Algebra Its Appl. 2014, 441, 199–221. [Google Scholar] [CrossRef] [Green Version]
  15. Ma, A.; Molitor, D. Randomized Kaczmarz for tensor linear systems. BIT Numer. Math. 2022, 62, 171–194. [Google Scholar] [CrossRef]
  16. Tang, L.; Yu, Y.; Zhang, Y.; Li, H. Sketch-and-project methods for tensor linear systems. arXiv 2022, arXiv:2201.00667. [Google Scholar] [CrossRef]
  17. Chen, X.; Qin, J. Regularized Kaczmarz algorithms for tensor recovery. SIAM J. Imaging Sci. 2021, 14, 1439–1471. [Google Scholar] [CrossRef]
  18. Wang, X.; Che, M.; Mo, C.; Wei, Y. Solving the system of nonsingular tensor equations via randomized Kaczmarz-like method. J. Comput. Appl. Math. 2023, 421, 114856. [Google Scholar] [CrossRef]
  19. Kilmer, M.E.; Braman, K.; Hao, N.; Hoover, R.C. Third-order tensors as operators on matrices: A theoretical and computational framework with applications in imaging. SIAM J. Matrix Anal. Appl. 2013, 34, 148–172. [Google Scholar] [CrossRef] [Green Version]
  20. Jin, H.; Bai, M.; Benítez, J.; Liu, X. The generalized inverses of tensors and an application to linear models. Comput. Math. Appl. 2017, 74, 385–397. [Google Scholar] [CrossRef]
  21. Jiang, Y.; Wu, G.; Jiang, L. A Kaczmarz method with simple random sampling for solving large linear systems. arXiv 2020, arXiv:2011.14693. [Google Scholar]
  22. Carlton, M.A. Probability and Statistics for Computer Scientists. Am. Stat. 2008, 62, 271–272. [Google Scholar] [CrossRef]
  23. Wang, Q.; Li, W.; Bao, W.; Gao, X. Nonlinear Kaczmarz algorithms and their convergence. J. Comput. Appl. Math. 2022, 399, 113720. [Google Scholar] [CrossRef]
  24. Lu, C. Tensor-Tensor Product Toolbox. Carnegie Mellon University. 2018. Available online: https://github.com/canyilu/tproduct (accessed on 17 July 2022).
  25. Finding His Voice. Available online: https://archive.org/details/FindingH1929 (accessed on 15 August 2022).
  26. Bone and Joint ct-scan Data. Available online: https://isbweb.org/data/vsj/ (accessed on 25 August 2022).
Figure 1. CPU and IT of the TRAK and TRAK F algorithms with the number of partitions s = 10 and different stepsizes α for different tolerances. Upper: TRAK. Lower: TRAK F .
Figure 1. CPU and IT of the TRAK and TRAK F algorithms with the number of partitions s = 10 and different stepsizes α for different tolerances. Upper: TRAK. Lower: TRAK F .
Mathematics 10 04594 g001
Figure 2. CPU and IT of the TRAKS and TRAKS F algorithms with β = 100 and different stepsizes α for different tolerances. Upper: TRAKS. Lower: TRAKS F .
Figure 2. CPU and IT of the TRAKS and TRAKS F algorithms with β = 100 and different stepsizes α for different tolerances. Upper: TRAKS. Lower: TRAKS F .
Mathematics 10 04594 g002
Figure 3. CPU and IT of the TRAK and TRAK F algorithms with extrapolated stepsize and different number of partitions. Upper: TRAK. Lower: TRAK F .
Figure 3. CPU and IT of the TRAK and TRAK F algorithms with extrapolated stepsize and different number of partitions. Upper: TRAK. Lower: TRAK F .
Mathematics 10 04594 g003
Figure 4. CPU and IT of the TRAKS and TRAKS F algorithms for different β . Upper: TRAKS. Lower: TRAKS F .
Figure 4. CPU and IT of the TRAKS and TRAKS F algorithms for different β . Upper: TRAKS. Lower: TRAKS F .
Mathematics 10 04594 g004
Figure 5. Pictures of tolerance versus IT and CPU times for the TRK, TRAK, TRAK F , TRAKS, and TRAKS F algorithms when X is synthetic data.
Figure 5. Pictures of tolerance versus IT and CPU times for the TRK, TRAK, TRAK F , TRAKS, and TRAKS F algorithms when X is synthetic data.
Mathematics 10 04594 g005
Figure 6. Pictures of tolerance versus IT and CPU times for the TRK, TRAK, TRAK F , TRAKS, and TRAKS F algorithms when X comes from the 3D MRI image data set.
Figure 6. Pictures of tolerance versus IT and CPU times for the TRK, TRAK, TRAK F , TRAKS, and TRAKS F algorithms when X comes from the 3D MRI image data set.
Mathematics 10 04594 g006
Figure 7. Pictures of the average RSE versus IT and CPU times for the TRK, TRAK, TRAK F , TRAKS, and TRAKS F algorithms when X is the video datum.
Figure 7. Pictures of the average RSE versus IT and CPU times for the TRK, TRAK, TRAK F , TRAKS, and TRAKS F algorithms when X is the video datum.
Mathematics 10 04594 g007
Figure 8. The 50 t h frame of the clean film and the images recovered by the TRK, TRAK, TRAK F , TRAKS, and TRAKS F algorithms. CPU TRK = 6.6113 , CPU TRAK = 6.1381 , CPU TRAK F = 3.9756 , CPU TRAKS = 6.0760 , CPU TRAKS F = 3.8270 .
Figure 8. The 50 t h frame of the clean film and the images recovered by the TRK, TRAK, TRAK F , TRAKS, and TRAKS F algorithms. CPU TRK = 6.6113 , CPU TRAK = 6.1381 , CPU TRAK F = 3.9756 , CPU TRAKS = 6.0760 , CPU TRAKS F = 3.8270 .
Mathematics 10 04594 g008
Figure 9. Pictures of the average RSE versus IT and CPU times for the TRK, TRAK, TRAK F , TRAKS, and TRAKS F algorithms when X is a CT data.
Figure 9. Pictures of the average RSE versus IT and CPU times for the TRK, TRAK, TRAK F , TRAKS, and TRAKS F algorithms when X is a CT data.
Mathematics 10 04594 g009
Figure 10. The 39 t h slice of the clean image sequence and the images recovered by the TRK, TRAK, TRAK F algorithms. CPU TRK = 12.0177 , CPU TRAK = 9.3976 , CPU TRAK F = 7.5307 , CPU TRAKS = 9.2294 , CPU TRAKS F = 7.3547 .
Figure 10. The 39 t h slice of the clean image sequence and the images recovered by the TRK, TRAK, TRAK F algorithms. CPU TRK = 12.0177 , CPU TRAK = 9.3976 , CPU TRAK F = 7.5307 , CPU TRAKS = 9.2294 , CPU TRAKS F = 7.3547 .
Mathematics 10 04594 g010
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Bao, W.; Zhang, F.; Li, W.; Wang, Q.; Gao, Y. Randomized Average Kaczmarz Algorithm for Tensor Linear Systems. Mathematics 2022, 10, 4594. https://doi.org/10.3390/math10234594

AMA Style

Bao W, Zhang F, Li W, Wang Q, Gao Y. Randomized Average Kaczmarz Algorithm for Tensor Linear Systems. Mathematics. 2022; 10(23):4594. https://doi.org/10.3390/math10234594

Chicago/Turabian Style

Bao, Wendi, Feiyu Zhang, Weiguo Li, Qin Wang, and Ying Gao. 2022. "Randomized Average Kaczmarz Algorithm for Tensor Linear Systems" Mathematics 10, no. 23: 4594. https://doi.org/10.3390/math10234594

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop