Test of copositive tensors

In this paper, an SDP relaxation algorithm is proposed to test the copositivity of higher order tensors. By solving finitely many SDP relaxations, the proposed algorithm can determine the copositivity of higher order tensors. Furthermore, for any copositive but not strictly copositive tensor, the algorithm can also check it exactly. Some numerical results are reported to show the efficiency of the proposed algorithm.


1.
Introduction. For positive integers m, n 1 , n 2 , . . . , n m−1 and n m , an m-order (n 1 , n 2 , . . . , n m )-dimensional real tensor A is an element in the space R n1×n2×···×nm , which can be written as with [k] := {1, 2, . . . , k} for positive integer k. When n 1 = · · · = n m = n, A is called an m-order n-dimensional square tensor. The set of all m-order n-dimensional real tensors is denoted by T m (R n ). Tensor A = (a i1i2...im ) ∈ T m (R n ) is said to be symmetric if its entries are invariant under any permutation of indices (i 1 , i 2 , . . . , i m ). The subspace of T m (R n ) that consists of symmetric tensors is denoted by S m (R n ).
Then, the definition of copositivity of a symmetric tensor is given below.
Copositive tensor has wide applications in vacuum stability [5,12], polynomial optimization [23,25], hypergraph theory [5], tensor complementarity problem [1,2,6,26] and tensor eigenvalue complementarity problem [8,18,19]. Specifically, Kannike [12] studied the vacuum stability of scalar potential with the help of copositive tensors. Peña, Vera and Zuluaga [23] formulated a class of polynomial optimization problems as a completely positive tensor cone programming, whose dual problem is a copositive tensor cone programming. Moreover, Chen, Huang and Qi [5] proved that an upper bound of the coclique number of a uniform hypergraph can be computed by solving a copositive tensor cone programming. Ling, He and Qi [18] reformulated the standard bi-quadratic programming as a copositive tensor cone programming. Huang and Qi [11] reformulated an n-person noncooperative game as a tensor complementarity problem. For such problem, the existence of solution was discussed by Che, Qi and Wei [2] with a strictly copositive tensor. Fan, Nie and Zhou [8] formulated a tensor eigenvalue complementarity problem as a polynomial optimization, and proposed a numerical algorithm with assumption that the related tensor is strictly copositive.
Note that the copositivity of tensor is used in the aforementioned literature. It is natural to ask whether a symmetric tensor is copositive and how to check the copositivity. In [24], Qi presented a necessary and sufficient condition for the copositivity of tensor. Song and Qi [25] showed that a tensor is (strictly) copositive if and only if each Pareto H-eigenvalue (Z-eigenvalue) is nonnegative (positive). Further they established the equivalence between copositive tensor and semi-positive tensor in [26]. Recently, Chen, Huang and Qi [5] proposed a numerical method to check the copositivity of tensors based on the standard simplex and simplicial partitions; and they revised that algorithm with a proper convex subcone of the copositive tensor cone in [4]. Numerical results presented there showed the efficiency of the proposed algorithms. However, for a copositive but not strictly copositive tensor, it is possible that both algorithms proposed in [4,5] fail. More recently, an SDP algorithm is proposed to test copositivity in [3].
Motivated by these, we propose an SDP relaxation algorithm to check the copositivity of tensors. We will show that the copositivity of tensor A can be checked by solving the following polynomial optimization where m is a positive integer and x [n ] = (x n 1 , . . . , x n n ) ∈ R n for any positive integer n . The detail of this equivalence can be seen in Section 3. By solving a hierarchy of its SDP relaxations, we can detect the copositivity of tensors exactly. Specifically, the following results can be obtained by solving a hierarchy of SDP relaxations: • The tested tensor is strictly copositive if the minimum of its k-th order semidefinite relaxation problem is positive; • The tested tensor is copositive but not strictly copositive if the optimal value of problem (1) is zero; • The tested tensor is not copositive if the optimal value of problem (1) is negative. The rest of this paper is organized as follows. Notations and preliminaries on polynomial optimization are reviewed in Section 2. In Section 3, a numerical algorithm based on semidefinite relaxation is proposed to check whether a given tensor is copositive or not. Finally, numerical experiments are reported in Section 4.

2.
Preliminaries. In this section, the preliminary knowledge on polynomial optimization is reviewed, which can be found in [14,17].
Throughout this paper, R n denotes the set of all real n-dimensional vectors, and the symbol · denotes the standard Euclidean norm. Let R[x] be the ring of polynomials with real coefficients in variables x := (x 1 , · · · , x n ), and R[x] d be the set of real polynomials in x whose degrees, abbreviated as deg(·), are at most d. For a polynomial tuple h = (h 1 , h 2 , · · · , h s ), the ideal generated by h is set The k-th truncation of I(h) is the set For complex and real algebraic varieties of polynomial tuple h, define The quadratic module generated by a polynomial tuple g = (g 1 , g 2 , · · · , g t ) is the set . The k-th truncation of the quadratic module Q(g) is the set Let N be the set of nonnegative integers. For x := (x 1 , · · · , x n ), α := (α 1 , · · · , α n ) and a degree d, denote For an integer t ≤ d and y ∈ R N n d , denote the t-th truncation of y as The x denotes the transpose of vector x in this paper. The matrix L (k) q (y) is called the k-th localizing matrix of q generated by y. It is linear in y. When q = 1 (the constant 1 polynomial), L Let g = (g 1 , g 2 , · · · , g r ) be a polynomial tuple, we define For any positive integer d, we denote the monomial vector by Before we end this section, we recall Theorem 4.2 in [16]. For completeness, we consider the following polynomial optimization problem where p(x) and q i (x) (i = 1, . . . , r) are polynomials. Its k-th order Lasserre type SDP relaxation can be rewritten as where M k (y) and L (k) g (y) are defined as in (8) and (9). Let K = {x : q i (x) ≥ 0, i = 1, . . . , r}. Theorem 4.2 in [16] can be restated as follows.
3. Algorithm for checking copositivity. In this section, we discuss how to check copositivity of higher order tensors. Before proceeding, we recall Theorem 5 in [24], stated as follows.
A is strictly copositive if and only if min Ax m : With a similar proof of Theorem 5 in [24], Theorem 3.1 can be extended as follows.
A is strictly copositive if and only if min Ax m : Based on this extension, we consider the following polynomial optimization It is clear that there exists an optimal solution of (11) since its feasible set is compact. Without loss of generality, we assume that x is an optimal solution. Then there exist y ∈ R n and λ ∈ R such that From above analysis, problem (11) is equivalent to problem (1). That is, they have the same optimal solutions and optimal value. Hence, to check copositivity of tensor A is equivalent to solving problem (1). For convenience, we introduce the following notations: Then problem (1) can be rewritten as In the following, we apply Lasserre type semidefinite relaxation [16] to solve (13). The k-th order semidefinite relaxation of problem (13) is where k = k 0 , k 0 + 1, . . . with k 0 = m+m −1 2 and t is the smallest integer that is larger than or equal to t. In the above, matrix X 0 means that the symmetric matrix X is positive semidefinite, and matrices M k (y), L (k) h (y) and L (k) g (y) are defined as in (8) and (9). The dual optimization problem of (14) is In (15), the notations I 2k (h) and Q k (g) are defined as in (2) and (4) for all k ≥ k 0 . Suppose that y * is a minimizer of k-th order semidefinite relaxation (14). If there exists a real integer k 0 ≤ t ≤ k such that then ρ (a) k = f * , and we can get r := rankM t (y * ) global optimizers of (1) (see [9,22]).
Based on above analysis, we now propose a semidefinite relaxation algorithm to check copositivity of higher order tensors. Step 0. For tensor A, write polynomial tuples f, g and h as in (12). Let k = m+m −1 2 .

TEST OF COPOSITIVE TENSORS 887
Note that (14) is a relaxation of (1). Together with the fact that problem (1) is feasible, problem (14) is always feasible for all k ≥ k 0 . The semidefinite relaxation problem (14) can be solved by softwares GloptiPoly3 [10] and SeDuMi [27].
Theorem 3.4. Let A ∈ S m (R n ). We have: k } is an infinite sequence generated by Algorithm 3.1.
(2) Algorithm 3.1 terminates in finitely many steps if A is strictly copositive.
terminates in finitely many steps.
. It is easy to see that both 1 and v(x) are SOS polynomials, and {x|u(x) ≥ 0} is compact.
Case 2. m is even. For such case, x m i . Then {x|u(x) ≥ 0} is compact. In all, there always exists u(x) defined as in Lemma 2.1 such that {x|u(x) ≥ 0} is compact. Hence lim k→∞ ρ (a) k = f * from Lemma 2.1.
(2). Otherwise, we assume that {ρ (a) k } is an infinite sequence generated by Algorithm 3.1. According to result (1), lim k→∞ ρ (a) k = f * . Since A is strictly copositive, we have f * > 0. Hence ρ (a) k > 0 for big enough k, which contradicts Step 2 of Algorithm 3.1 and the desired result is obtained.

Numerical experiments.
In this section, we present numerical examples for checking copositivity of higher order tensors. The semidefinite relaxation (14) can be solved by the software GloptiPoly [10] and SeDuMi [27]. Algorithm 3.1 is implemented in MATLAB 2015a on a Thinkpad with 2.94GB memory and Intel(R) CPU 1.60GHz. In our experiments, we set ρ k | < 1e − 5. For convenience, the following notations are adopted: for any i 1 , i 2 , . . . , i m ∈ [n], we use π(i 1 , i 2 , . . . , i m ) to denote a permutation of i 1 , i 2 , . . . , i m , and S π(i1i2...im) to denote the set of all these permutations.   In the following, we test several tensors which come from several famous polynomials.

The corresponding polynomial is
. This is the famous Motzkin polynomial, which is nonnegative but not a sum of squares. Hence, A is a copositive tensor. Applying Algorithm 3.1 with m = 1, . . . , 6, we have f * = 0, which implies that tensor A is copositive but not strictly copositive. For each m , there are 3 x such that f (x) = 0. Furthermore, by unitization, we find that the solutions for each m are the same. Hence, it suffices to present all solutions for m = 2, listed as The corresponding polynomial of tensor A is This is the famous Robinson polynomial, which is nonnegative but not a sum of squares. Applying Algorithm 3.1 with m = 1, 2, . . . , we get f * = 0, which implies that tensor A is copositive but not strictly copositive. Furthermore, the optimal solutions x of (11) with m = 2 are  The corresponding polynomial of the tensor A is This is the famous Choi-Lam polynomial, which is nonnegative but not a sum of squares. By Algorithm 3.1 with m = 2, we have that f * = 0 by solving one SDP relaxation problems. This implies that tensor A is copositive but not strictly copositive. The computation takes about 0.9 seconds to find optimizers Remark. The tensors tested in Examples 4.4-4.6 come from several famous polynomials; and they are copositive but not strictly copositive. These tensors were also tested in [5], but Algorithm 5.1 in [5] does not terminate within 100 iterations when these tensors were used directly for testing. From the above numerical results, it is easy to see that our algorithm can test it correctly in a few seconds.