Full-replica-symmetry-breaking based algorithms for dummies
Windows On Theory 2020-10-24
One of the fascinating lines of research in recent years has been a convergence between the statistical physics and theoretical computer science points of view on optimization problems. ` This blog post is mainly a note to myself (i.e., I’m the “dummy” ), trying to work out some basic facts in some of this line of work. it was inspired by this excellent talk of Eliran Subag, itself part of a great Simons institute workshop which I am still planning to watch the talks of. I am posting this in case it’s useful for others, but this is quite rough, missing many references, and I imagine I have both math mistakes as well as inaccuracies in how I refer to the literature – would be grateful for comments!
Screen shot from Eliran Subag’s talk demonstrating the difference between “easy” and “hard” instances.In computer science, optimization is the task of finding an assignment that minimizes some function . In statistical physics we think of as the states of particles, and as the energy of this state. Finding the minimum assignment corresponds to finding the ground state, and another computational problem is sampling from the Gibbs distribution where the probability of is proportional to for some .
Two prototypical examples of such problems are:
- Random 3SAT – in this case and is the number of clauses violated by the assignment for a random formula.
- Sherrington-Kirpatrick model – in this case and where are independent normal variables with variance for and variance for . (Another way to say it is that is the matrix where ‘s entries are chosen i.i.d from .)
The physics and CS intuition is that these two problems have very different computational properties. For random 3SAT (of the appropriate density), it is believed that the set of solutions is “shattered” in the sense that it is partitioned to exponentially many clusters, separated from one another by large distance. It is conjectured that in this setting the problem will be computationally hard. Similarly from the statistical physics point of view, it is conjectured that if we were to start with the uniform distribution (i.e., a “hot” system) and “lower the temperature” (increase ) at a rate that is not exponentially slow then we will get “stuck” at a “metastable” state. This is analogous how when we heat up sand and then cool it quickly then rather than returning to its original state, the sand will get stuck at the metastable state of glass.
In contrast for the Sherrington-Kirpatrick (SK) model, the geometry is more subtle, but interestingly this enables better algorithms. The SK model is extermely widely studied, with hundreds of papers, and was the inspiration for the simulated annealing algorithm. If memory serves me right, Sherrington and Kirpatrick made the wrong conjecture on the energy of the ground state, and then Parisi came up in 1979 with a wonderful and hugely influential way to compute this value. Parisi’s calculation was heuristic, but about 30 years later, first Talagrand and later Panchenko proved rigorously many of Parisi’s conjectures. (See this survey of Panchenko.)
Recently Montanari gave a polynomial time algorithm to find a state with energy that is arbitrarily close to the ground state’s. The algorithm relies on Parisi’s framework and in particular on the fact that the solution space has a property known as “full replica symmetry breaking (RSB)” / “ultrametricity”. Parisi’s derivations (and hence also Montanari’s analysis) are highly elaborate and I admit that I have not yet been able to fully follow it. The nice thing is that (as we’ll see) it is possible to describe at least some of the algorithmic results without going into this theory. In the end of the post I will discuss a bit some of the relation to this theory, which is the underlying inspiration for Subag’s results described here.
Note: These papers and this blog post deal with the search problem of finding a solution that minimizes the objective. The refutation problem of certifying that this minimum is at least for some has often been studied. The computational complexity of these problems need not be identical. In particular there are cases where the search problem has an efficient algorithm achieving value but the best refutation algorithm can only certify that the value is at most for .
Analysis of a simpler setting
Luckily, there is a similar computational problem, for which the analysis of analogous algorithm, which was discovered by Subag and was the partial inspiration for Montanari’s work, is much simpler. Specifically, we consider the case where is an element of the unit sphere, and is a degree polynomial with random Gaussian coefficients. Specifically, for every vector , we let where for every , is a random tensor of order whose coefficients are all chosen i.i.d in . (We assume that polynomial does not have constant or linear components.)
Depending on , the computational and geometrical properties of this problem can vary considerably. The case that (i.e., only has a non-zero coeffiecent) corresponds to finding the unit vector minimizing for a random matrix , which of course corresponds to the efficiently solveable minimum eigenvector problem. In contrast, the case corresponds to finding a rank one component of a random three-tensor, which is believed to be computationally difficult. The Parisi calculations give a precise condition on the vector such that if holds then the solution space has the “full RSB” property (and hence the problem is computationally easy) and if does not hold then the solution space does not have this property (and potentially the problem is hard).
These calculations also give rise to the following theorem:
Theorem (Chen and Sen, Proposition 2): If holds then in the limit , , where . (That is, is the second derivative of this univariate polynomial)
We will not discuss the proof of this theorem, but rather how, taking it as a black box, it leads to an algorithm for minimizing that achieves a near-optimal value (assuming holds).
It is a nice exercise to show that for every two vectors , . Hence for any unit vector , is a random variable with mean zero and standard deviation . Since (after some coarsening) the number of unit vectors of dimension can be thought of as for some , and we expect the probability of deviating standard deviations to be , the minimum value of should be for some constant . However determining this constant is non trivial and is the result of the Parisi theory.
To get a better sense for the quantity , let’s consider two simple cases:
- If (i.e., for random matrix ) then and , meaning that . This turns out to be the actual minimum value. Indeed in this case . But the matrix ‘s non diagonal entries are distributed like and the diagonal entries like which means that is distributed as times a random matrix from the Gaussian Orthogonal Ensemble (GOE) where for off diagonal entries and for diagonal entries. The minimum eigenvalue of such matrices is known to be with high probability.
- If (i.e. for a random -tensor ) then does not hold. Indeed, in this case the value for large . However I believe (though didn’t find the reference) that the actual minimum tends to with .
While the particular form of the property is not important for this post, there are several equivalent ways to state it, see Proposition 1 in Subag’s paper. One of them is that the function (note the negative exponent) is concave on the interval . It can be shown that this condition cannot be satisfied if , and that for every setting of , if is large enough then it will be satisfied.
The central result of Subag’s paper is the following:
Theorem: For every , there is a polynomial-time algorithm such that on input random chosen according to the distribution above, with high probability such that .
The algorithm itself, and the idea behind the analysis are quite simple. In some sense it’s the second algorithm you would think of (or at least the second algorithm according to some ordering).
The first algorithm one would think of is gradient descent. We start at some initial point , and repeat the transformation for some small (and normalizing the norm). Unfortunately, we will generally run into saddle points when we do so, with the gradient being zero. In fact, for simplicity, below we will always make the pessimistic assumption that we are constantly on a saddle point. (This assumption turns out to be true in the actual algorithm, and if it was not then we can always use gradient descent until we hit a saddle.)
The second algorithm one could think of would be to use the Hessian instead of the gradient. That is, repeat the transformation where is the minimal eigenvector of (i.e., the Hessian matrix such that ). By the Taylor approximation (and since we assume the gradient is zero) the change in the objective will be roughly . (Because we assume the gradient vanishes, it will not make a difference whether we update with or , but we use for consistency with gradient descent.)
The above approach is promising, but we still need some control over the norm. The way that Subag handles this is that he starts with , and at each step takes a step in an orthogonal direction, and so within steps he will get to a unit norm vector. That is, the algorithm is as follows:
Algorithm:
Input: .
Goal: Find unit approximately minimizing
- Initialize
- For : i. Let be a unit vector such that is orthogonal to and . (Since the bottom eigenspace of has large dimention, we can find a vector that is not only nearly minimal eigenvector but also orthogonal to all prior ones. Also, as mentioned, we assume that .) ii. Set .
- Output
(The fact that the number of steps is and not is absolutely crucial for the algorithm’s success; without it we would not have been able to use the second order contribution that arise from the Hessian.)
If we define to be the minimum eigenvalue at time , we get that the final objective value achieved by the algorithm satisfies
Now due to rotation invariance, the distribution of at the point is the same as at the point . Using concentration of measure arguments, it can be shown that the minimum eigenvalue of will be close with high probability to the minimum eigenvalue of . Since we can write
where is the minimum eigenvalue of at the point . Taking to zero, we get that (approximately) the value of the solution output by the algorithm will satisfy
and hence the result will be completed by showing that
To do this, let’s recall the definition of :
where for every , is a random tensor of order whose coefficients are all chosen i.i.d in .
For simplicity, let’s assume that and hence
(The calculations in the general case are similar)
The entry of equals . The contribution of the component to this term only arises from the terms corresponding to either or and hence for it equals which is distributed like . For , since , the contributioon equals which is distributed like .
The contribution from the component comes (in the case ) from all the terms involving that is, which is distributed like . For the contribution will be from the terms involving , with each yielding a contribution of , and hence the result will be distributed like .
(More generally, for larger , the number of terms for distinct is , each contributing a Gaussian of standard deviation , while for we have terms, each contributing a Gaussian of standard deviation .)
Since the sum of Gaussians is a Gaussian we get that is distributed like a Gaussian with variance for , and twice that for . This means that the minimum eigenvalue of equals times the minimum eigenvalue of a random matrix from the Gaussian Orthogonal Ensemble (i.e. is sampled via , ). As mentioned above, it is known that this minimum eigenvalue is , and in fact by the semi-circle law, for every , the number of eigenvalues of value is , and so we can also pick one that is orthogonal to the previous directions. QED
Full replica symmetry breaking and ultra-metricity
The point of this blog post is that at least in the “mixed spin” case considered by Subag, we can understand what the algorithm does and the value that it achieves without needing to go into the theory of the geometry of the solution space, but let me briefly discuss some of this theory. (As I mentioned, I am still reading through this, and so this part should be read with big grains of salt.)
The key object studied in this line of work is the probability distribution of the dot product for and sampled independently from the Gibbs distribution induced by . (This probability distribution will depend on the number of dimensions , but we consider the case that .)
Intuitively, there are several ways this probability distribution can behave, depending on how the solution space is “clustered”:
- If all solutions are inside a single “cluster”, in the sense that they are all of the form where is the “center” of the cluster and is some random vector, then will be concentrated on the point .
- If the solutions are inside a finite number of clusters, with centers , then the support of the distribution will be on the points .
- Suppose that the solutions are inside a hierarchy of clusters. That is, suppose we have some rooted tree (e.g., think of a depth full binary tree), and we associate a vector with every vertex of , with the property that is orthogonal to all vectors associated with ‘s ancestors on the tree. Now imagine that the distribution is obtained by taking a random leaf of and outputting for all vertices on the path from the root to . In such a case the dot product of and will be taken over all the common ancestors of . As the dimension and depth of the tree goes to infinity, the distribution over dot product can have continuous support, and it is this setting (specifically when the support is an interval ) that is known as full replica symmetry breaking. Because the dot product is determined by common ancestor, for every three vectors in the support of the distribution or . It is this condition that known as ultra-metricity.
In Subag’s algorithm, as mentioned above, at any given step we could make an update of either or . If we think of all the possible choices for the signs in the of the algorithms, we see that the algorithm does not only produce a single vector but actually such vectors that are arranged in an ultrametric tree just as above. Indeed, this ultrametric structure was the inspiration for the algorithm and is the reason why the algorithm produces the correct result precisely in the full replica symmetry breaking regime.
Acknowledgements: Thanks to Tselil Schramm for helpful comments.