Abstract
A matrix with zero diagonal is called a Euclidean distance matrix when the matrix values are measurements of distances between points in a Euclidean space. Because of data errors such a matrix may not be exactly Euclidean and it is desirable in many applications to find the best Euclidean matrix which approximates the non-Euclidean matrix. In this paper the problem is formulated as a smooth unconstrained minimization problem, for which rapid convergence can be obtained. Comparative numerical results are reported.
Similar content being viewed by others
1 Introduction
Symmetric matrices with non-negative off-diagonal elements and zero diagonal elements arise as data in many experimental sciences. This occurs when the values are measurements of squared distances between points in a Euclidean space (e.g. atoms, stars, cities). Such a matrix is referred to as a Euclidean distance matrix. Because of data errors such a matrix may not be exactly Euclidean and it is desirable to find the best Euclidean matrix which approximates the non-Euclidean matrix. The aim of this paper is to study a new method for solving the Euclidean distance matrix problem and compare it with other older methods [1].
An important application arises in the conformation of molecular structures from nuclear magnetic resonance data (see [2] and [3]). Here a Euclidean distance matrix is used to represent the squares of distances between the atoms of a molecular structure. An attempt to determine such a structure by nuclear magnetic resonance experiments gives rise to a distance matrix F which, because of data errors, may not be Euclidean. There are many other applications in subjects as diverse as archeology, cartography, genetics, geography, and multivariate analysis. Pertinent references are given by Al-Homidan [4, 5].
Characterization theorems for the Euclidean distance matrix have been given in many forms. In Section 2 we show a very important characterization which brings out the underlying structure and is readily applicable to the algorithms that follow.
This paper addresses a non-smooth optimization problem in which some matrix, defined in terms of the problem variables, has to be positive semidefinite. One way to handle this problem is to impose a functional constraint in which the least eigenvalue of the matrix is non-negative. However, if there are multiple eigenvalues at the solution, which is usually the case, such a constraint is non-smooth, and this non-smoothness cannot be modeled by a convex polyhedral composite function. An important factor is the determination of the multiplicity of the zero eigenvalues, or alternatively the rank of the matrix at the solution. If this rank is known it is usually possible to solve the problem by conventional techniques.
Glunt et al. [6] formulate the Euclidean distance matrix problem as a constrained least distance problem in which the constraint is the intersection of two convex sets. The Dykstra-Han alternating projection algorithm can then be used to solve the problem. This method is globally convergent but the rate of convergence is very slow. However, the method does have the capability to determine the correct rank of the solution matrix.
Recently, there has been much interest in the interior point methods applied to problems with semidefinite matrix constraints (e.g. the survey papers [7] and [8] and the references therein). Semidefinite programming optimizes a linear function subject to a positive semidefinite matrix. It is a convex programming problem since the objective and constraints are convex. In this paper, we deal with a problem that is a little different since the objective is quadratic; also an additional rank constraint is added which makes the problem non-convex and harder to solve. Here, we use a different approach from the interior point methods. If the correct rank of the solution matrix is known, it is shown in Section 3 how to formulate the problem as a smooth unconstrained minimization problem, for which rapid convergence can be obtained by for example the BFGS method. We give expressions for the objective function and its first derivatives.
In [1] a hybrid method is studied between a projection method and a quasi-Newton method; a similar study can be performed as regards all its features. Finally, in Section 4, numerical comparisons are carried out.
2 The Euclidean distance matrix problem
In this section the definition of the Euclidean distance matrix is given, and the relationship between points and distances is summarized. A characterization theorem for the Euclidean distance matrix is proved in a concise way that brings out the underlying structure and is readily applicable to the algorithms that follow.
It is necessary to distinguish between distance matrices that are obtained in practice and those that can be derived exactly from n vectors in an affine subspace.
Definition 2.1 A matrix is called a distance matrix iff it is symmetric, the diagonal elements are zero
and the off-diagonal entries are non-negative
Definition 2.2 A matrix is called a Euclidean distance matrix iff there exist n vectors in an affine subspace of dimension () such that
The Euclidean distance problem can now be stated as follows: Given a distance matrix , find the Euclidean distance matrix that minimizes
where denotes the Frobenius norm.
The theorem is essentially due to Schoenberg [9].
Theorem 2.3 The distance matrix is a Euclidean distance matrix if and only if the symmetric matrix A defined by
is positive semidefinite, where , , and D is irreducibly embeddable in () where . Moreover, consider the spectral decomposition
Let be the matrix of non-zero eigenvalues in Λ and define X by
where is a diagonal matrix and .
3 The method
In this section we consider a different approach to the Euclidean distance matrix problem (2.2). The main idea is to replace (2.2) by a smooth unconstrained optimization problem in order to use superlinearly convergent quasi-Newton methods. To do this it is necessary to estimate the rankr as this piece of information is not generally known. Once a value of r is chosen, the problem (2.2) is solved by the BFGS method. We give the relevant formulas for the derivatives. At the end of the section we discuss details of the initialization and implementation.
If the rankr is known, it is possible to express (2.2) as a smooth unconstrained optimization problem in the following way. The unknowns in the problem are chosen to be the elements of the matrix X and introduced in (2.5). We take X to have r columns and a diagonal matrix as shown below. This gives us an unconstrained optimization problem in unknowns. We therefore parametrize X and in the following way:
The objective function is readily calculated by first forming D from X and as indicated by (2.1), after which ϕ is given by . When , then , using (2.3) we get , then the elements of the matrix D take the form
where . Hence
Our chosen method to minimize is the BFGS quasi-Newton method (see for example [10]). This requires expressions for the first partial derivatives of ϕ, which are given from (3.2) by
for all . For , and :
The BFGS method also requires the Hessian approximation to be initialized. Where necessary, we do this using a unit matrix.
Some care has to be taken when choosing the initial value of the matrix X and , in particular the rank must be r. If not, the minimization method may not be able to increase the rank of X. An extreme case occurs when the initial matrix and are chosen, and . It can be seen from (3.3) and (3.4) that the components of the gradient vector are all zero, so that and are stationary points, but not minimizers. A gradient method will usually terminate in this situation and so fail to find the solution.
A reliable method for initializing X and is to use the construction suggested by (3.1) and (2.3). Thus we define the elements of A by those of F by
The first row and column of A are zero and are ignored. We then find the spectral decomposition of the nontrivial part of A. Finally the nontrivial part of X and in (3.1) is initialized to the matrix where , is composed of the r largest eigenvalues in Σ, and the columns of are the corresponding eigenvectors. When is positive definite, this procedure ensures that A has the correct rankr. Otherwise the process must be modified in some way, for example by ensuring that the diagonal elements in lie above a positive threshold.
An advantage of this method is that it allows the spatial dimensions to be chosen by the user. This is useful when the rank is already known. For example if the entries in F are derived from distances between cities then the dimension will be no higher than . Likewise, if the entries are derived from distances between atoms in a molecule or stars in space, then the maximum dimension is .
In general, however, the rank is not known, for example the atoms in a molecule may turn out to be collinear or coplanar. We therefore must consider an algorithm in which we are prepared to revise our estimate of r. A simple strategy is to repeat the entire method for different values of r. If denotes the correct value of r which solves (2.2), then it is observed that the BFGS method converges rapidly if , and that it exhibits superlinear convergence. On the other hand if then slow convergence is observed. One reason is that there are more variables in the problem. Also redundancy in the parameter space may have an effect. Thus it makes sense to start with a small value of r, and increase it by one until the solution is recognized. One way to recognize termination is when agrees sufficiently well with , where denotes the Euclidean distance matrix obtained by minimizing ϕ when in (3.1) has r diagonal elements. Numerical experience is reported in [4] for solving various test problems by other methods which will be compared with this method.
An obvious alternative to using the BFGS method is to evaluate the Hessian matrix of second derivatives of and use Newton’s method. This would likely reduce the number of iterations required. However, there is also the disadvantage of increased complexity, and increased housekeeping at each iteration. Moreover, it is possible that the Hessian has some negative eigenvalues so a modified form of Newton’s method would be required. A simple example serves to illustrate the possibility of a negative eigenvalue. Take , , and let , , and . Then . This has global minimizers at , a local maximizer at , and the Hessian is negative for all such that .
This method has entirely different features, some good, some bad, which suggests that a combination of both this method and a projection method [6] might be successful. Projection methods are globally convergent and hence potentially reliable, but the rate of convergence is first order or slower, which can be very inefficient. Quasi-Newton methods are reliable and locally superlinearly convergent, but they require that the correct is known. Therefore hybrid methods should be established along the lines of [1], in which the projection algorithm is used sparingly as a way of establishing the correct rank, while the BFGS method is used to provide rapid convergence.
4 Numerical results
In this section, we compare three methods, our method, the hybrid method in [1] and the unconstrained method of the same reference. The algorithms have been tested on randomly generated distance matrices F with values distributed between 10−3 and 103. All calculations were performed with Mathlab 8. Figure 1 compares the line searches and CPU time of the three methods. The termination criterion for both methods is . All methods converge to essentially the same values.
In Figure 1, the upper figure shows that the number of line searches for our method is slightly lower than the unconstrained method and higher than the hybrid method. However, in the lower figure it is clear that our method is much faster and this because our method has less CPU time. A hybrid method uses much less line searches from both methods, however, it consumes much more time than our method because it uses a projection method as a start. This makes our method more efficient and faster.
The housekeeping associated with each line search is . Also, if care is taken, it is possible to calculate and in operations. The initial value is tabulated, and r is increased by one until the solution is found. The total number of line searches is tabulated, and in this figure, it is found that fewer line searches are required as r increases. Also the initial value is rather arbitrary: a smaller value of would have given an even larger number of line searches.
References
Al-Homidan S, Fletcher R: Hybrid methods for finding the nearest Euclidean distance matrix. In Recent Advances in Nonsmooth Optimization. Edited by: Du D, Qi L, Womersley R. World Scientific, Singapore; 1995:1–17.
Havel T, Kuntz I, Crippen GM: The theory and practice of distance geometry. Bull. Math. Biol. 1983, 45: 665–720. 10.1007/BF02460044
Crippen GM: Rapid calculation of coordinates from distance measures. J. Comput. Phys. 1978, 26: 449–452. 10.1016/0021-9991(78)90081-5
Al-Homidan, S: Hybrid methods for optimization problems with positive semi-definite matrix constraints. Ph.D. thesis, Dept. of Mathematics and Computer Science, University of Dundee, Dundee, Scotland (1993)
Al-Homidan S, Fletcher R: Rationalizing foot and ankle measurements to conform to a rigid body model. Comput. Methods Biomech. Biomed. Eng. 2006,9(2):103–111. 10.1080/10255840600661664
Glunt W, Hayden TL, Hong S, Wells J: An alternating projections method for computing the nearest Euclidian distance matrix. SIAM J. Matrix Anal. Appl. 1990, 4: 589–600.
Al-Homidan S, Wolkowicz H: Approximate and exact completion problems for Euclidean distance matrices using semidefinite programming. Linear Algebra Appl. 2005, 406: 109–141.
Wolkowicz H, Saigal R, Vandenberghe L: Handbook of Semidefinite Programming: Theory, Algorithms, and Applications. Kluwer Academic, Dordrecht; 2000.
Schoenberg IJ: Remarks to M. Frechet’s article ‘Sur la definition axiomatique d’une classe d’espace distances vectoriellement applicable sur l’espace de Hilbert’. Ann. Math. 1935, 36: 724–732. 10.2307/1968654
Fletcher R: Practical Methods of Optimization. 2nd edition. Wiley, Chichester; 1987.
Acknowledgements
The author is grateful to King Fahd University of Petroleum & Minerals for providing excellent research facilities.
Author information
Authors and Affiliations
Corresponding author
Additional information
Competing interests
The author declares that they have no competing interests.
Authors’ original submitted files for images
Below are the links to the authors’ original submitted files for images.
Rights and permissions
Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (https://creativecommons.org/licenses/by/4.0), which permits use, duplication, adaptation, distribution, and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.
About this article
Cite this article
Al-Homidan, S. Structure method for solving the nearest Euclidean distance matrix problem. J Inequal Appl 2014, 491 (2014). https://doi.org/10.1186/1029-242X-2014-491
Received:
Accepted:
Published:
DOI: https://doi.org/10.1186/1029-242X-2014-491