 So what we have? We have a given matrix for an ensemble of matrices. In this case, it would be n times n symmetric real matrices. Suppose that we do not like lambda vector a, the spectrum of a. And what we did was to define the empirical spectral density given a matrix a, like rho sub pi of lambda is equal 1 over n, the sum i from 1 to n of the direct delta of lambda i. And the exercise was to try to express this thing as something related to a problem in a stack mech. Did you manage to do this? More or less? You don't know how to do it, what? Yeah, yeah. Very good. So shall we do it together? So the idea is the following. So first, let me recall here the tricks I'm going to use. The first one is that 1 minus the limit for eta going to 0 plus 1 divided by x minus i eta is equal to the principal cosine of 1 divided by x plus i pi delta, direct delta of x. Let me to simplify the notion of eta, not to write too much. For the time being, I'm going to assume that every time there is an eta, the limit of eta going to 0 plus is implicit. OK? So what I notice is that the imaginary part of this is equal to pi direct delta. Therefore, direct delta is equal to 1 over pi, the imaginary part of 1 divided by x minus i eta. Right? Now let us focus on this part here. I have in the sum, direct delta of lambda minus lambda ai. So using this, I can write this thing as 1 divided by pi, the imaginary part of 1 divided by lambda minus lambda i a minus i eta. Right? And then I put you see, I do the derivation from the definition step by step now to the sum. So then I have that rho sub pi of lambda is equal to 1 divided by pi n of the imaginary part of the sum of i from 1 to n of 1 divided by lambda minus lambda ai minus i eta. Right? That's why I get rid of the annoying principle Cauchy part, taking the imaginary part. And now what can I do? I can do the following. I can write this thing as 1 divided by pi n, the imaginary part of the derivative with respect to set of the sum i from 1 to n of the logarithm of set minus lambda i a when set is equal to lambda minus i eta. But this is equal to 1 divided by pi n, the imaginary part of the derivative with respect to theta of the logarithm of the product of 5 from 1 to n of set minus lambda i a, or set equal to lambda minus i eta. Right? Are you with me? But the logarithm, I'm going to do this part here, the logarithm of the product i from 1 to n of theta minus lambda ai is equal to the logarithm of the determinant of theta times the identity matrix n times n minus a. Because if I do an analysis, this is asymmetric matrix, can be diagonalized by orthogonal transformation, the logarithm of the determinant of this is equal to this. Good. And this, I can write the task now as follows. Second, I can do minus 2, the logarithm of 1 over the square root of the determinant of this part. By the way, this map, you can do it in different ways, OK? To get to the final result. But this is just one of the three or four ways to get there. So what have I achieved? I've achieved to write, to express this in terms of the logarithm of the determinant. The determinant has a Gaussian expression. And that Gaussian integral expression is going to be our partition function, right? So let me put all the pieces together. So we end up having the following. Now that rho sub pi of lambda is equal to 1 divided by pi n, the imaginary part of the derivative with respect to set. I have here minus 2 of the logarithm of 1 over 1 second, the logarithm of 1 over the square root of the determinant of a set times the identity matrix minus a. That is equal to lambda minus i. So far, so good. I have not done anything fancy at all, OK? Now remember that now I can write 1 over the square root of the determinant of what is a symmetric matrix as follows. I can write this thing as an integral for the product of i from 1 to n dx i divided by 2 pi of exponential of minus 1 half the sum for i and j from 1 to n of xi set identity matrix a entries ij xj. Call this object my partition function, although it's not really a partition function because set is complex, right? But morally speaking, it looks like a partition function. Let's call this thing set of set. So what we find is that the gross pay of lambda and I guess this depends on a is equal to minus 2 divided by pi n the imaginary part of the derivative with respect to set of the logarithm of set questions. But it's symmetric. No, it's symmetric. It has a small imaginary part. It's not an issue. If you think it is an issue, what you can do is to use what is called a bisonic representation for the determinant. So what you will do instead of using this trick, you will do this logarithm of 1 divided by the determinant. And then you can use the other formula we discussed, the one for a general complex matrix. But you can use this one. So you see a problem or an object related to a problem in random matrices, or for a matrix, still this matrix is a given matrix, can be related to an observable related to some sort of a spin glass problem, right? Well, in this case, the identical variables are continuous spins. And the interactions between these variables are given by the matrix entries of the matrix you are interested in calculating the empirical spectral density. So for somebody that was asking yesterday, well, but if I know the acting values, I should worry about this. So the question, if you see what happens here, is that I express the spectral density directly in terms of the matrix entries. For some reason, I'm interested in calculating the expectation of this object with respect to an ensemble of random matrices. I don't need to diagonalize to calculate this object. The only thing I need to worry about is to do the expectation value with respect to the matrix entries. So I overcome the problem of diagonalizing matrices. All right? There is a minus here, yes. Now, if you go back, well, if you go back, no. Now in the context of this stachmic problem, the logarithm of a partition function is normally, and the logarithm of the partition function is a free energy. And the derivatives with respect to the logarithm of the partition function generates observables of interest. So here, you see, if I were to do here, I have to put when set is equal to lambda minus eta. So if I were to do the derivative with respect to set of this expression, what I obtain is the following. I obtain the expectation value of something. So I can relate directly the spectral density to the expectation, the thermal expectation value of a local quantity. So the derivative with a minus 2, just look like this, the derivative minus 2, the partial derivative of the logarithm of this object. It's going to be what? It's going to be 1 over set A. And then I'll have the internal, let's put this integral in this way, d and x. Let us call this exponential of minus a Hamiltonian. With the sum, when I do the derivative with respect set, I have the sum i from 1 to n of xi squared. So let me introduce the equivalent of what would be the Gibbs measure, p of x, is equal to 1 over set A set of the exponential of this minus h of x, where h of x is equal to 1 half of the sum for i and j from 1 to n of xi, set 1 minus a i a xj. I'm just using the vocabulary of StackMaker. So then this means that this guy here minus 2 times the partial derivative with respect to set of the logarithm of the partition function is equal to the expectation value of, sorry, the sum for i from 1 to n of the expectation value of xi squared. So therefore, in this mapping, the spectral, the empirical spectral density associated to a matrix A is equal to 1 divided by pi n, the imaginary part of the sum of i from 1 to n of the expectation value of xi squared, when set is equal to lambda minus i eta. So you see, again, I'm relating the spectral density of a matrix to the expectation value of a local observable related to a Hamiltonian. Can you speak up? Sorry? You didn't get this part. The only thing I'm doing is using the analogy with the statistical mechanics. So I define a Hamiltonian, which is what is inside the argument of the exponential. And since this is the partition function, the exponential of the Hamiltonian divided by the partition function is equivalent to the Gibbs measure that appears in a stack map. Now I notice that if I do the derivative of the logarithm of the partition function with respect to set, in this vocabulary, this is equivalent of calculating the expectation value of these variables that appear in the Hamiltonian. Ah, because the. So sorry. Yeah, because, sorry, this is the identity matrix. So I'm taking the elements i and j. So what this thing means? Sorry, maybe I didn't explain this part. So this set times the identity matrix minus the matrix a. So the entry ij is set Kronecker delta ij minus aij. So in this sum, the first one, only the diagonal term remains. That's why you have here xi square. Thanks, Gaussian. Which Gaussian? There are several Gaussians here. A square root of, yeah, thank you. Thank you very much, a square root. Yeah? Thank you very much. Actually, it doesn't matter in the end, because since you have the logarithm, and this is expressed with respect to an expectation value, this factor, it will cancel. But it's important to be precise. Thank you. More questions? Here? So after the derivative of the logarithm of the partition function, this would be 1 over the partition function, the derivative of the integral, right? The set is in the integral. You apply what is called the derivative of an integral. You don't get the, sorry, what? Yeah, no, it's to just be a bit more picky with the notation. Just to remind that this set is lambda minus i eta. It's just that, OK? So this expectation value depends on the gives of Boltzmann measure, that depends on the Hamiltonian. The Hamiltonian depends on this set. This set must be lambda minus i epsilon. It's not for any set. It's just that. I was trying to be a bit more explicit, OK? And remember that also eta has to be taken in the limit when eta goes to 0 plus. More questions? Sorry, what? So it's what I said that this spectral density is related to the expectation values of local observables. Well, because this observable, right? It depends on a given node, right? It depends locally of something on the graph or something in the matrix, which is just node. So it's a local quantity. So you don't have, for instance, a function that depends on a collection of variables that takes into account, for instance, an extensive part of the matrix. That's why I say it's a local observable. Sorry, can you speak up? Why I don't? Yeah, I do keep them. Yeah, the only thing I was saying here is this notation means for i and j that this is equal to set the chronicle delta ij and aij. So here is for all i and j. And of course, here you will have a diagonal part. The only thing I put this thing here is a size that when I do the related with a spec set, set is coupled to the chronicle delta, and therefore, only the diagonal part of this sum for this term is what appears here. So that's why you have an xi square. So you see this mapping is exact. There is nothing I put, no assumption for a. So a can be whatever. Well, asymmetric matrix, OK? So the spectrum has to be real, yeah? More questions? Now, so forget about now the rest of the universe. That means, let's forget a second about this problem or this mapping, realize the following. So I have here the spectral density depends on the expectation values of this sort, yeah? So you remember when we discussed cavity method, the way I introduced it, and a simple way to get the expression for the magnetization. So here, in principle, well, for definition, the expectation value would be equal to the integral over all values of x. I join for the distribution for the x's, and then xi square. So since I only know the expectation value for one of the entries, local observable, this means that this is equal to the integral with respect to xi pi xi xi square, yeah? So if I'm only interested in this expectation value, the trick is to find a way to see where I can write close equations for pi xi, right? So can I or can we write down simple close equations pi? Well, let's think about the cavity method, the way we introduce it. So the cavity method, we introduce it for the Hamiltonian of an easy model with pairwise interactions. And in this case, we have a Hamiltonian H of x, which is the sum of i and j. And there is one half, which I missed. For i and j, xi, xi, x, yeah. So this is also pairwise. The only difference between this Hamiltonian and this Hamiltonian of the easy model is that these are real variables. The one in the easy model, they are easy variables. They take values plus minus ones. But if you think about the cavity method, the steps you do have nothing to do with the character, the type of random variable you have, dynamical variable, has more to do with the factorization we discuss. The fact that this Hamiltonian can be written for a given node as something happening to that node, the interaction of that node with the rest of the universe, and what happens with the rest of the graph. So now we're going to do an exercise. I'm going to delete this, where we are going to derive the equivalent of the cavity equations for this Hamiltonian. And the idea is to show, I'm going to give you the final formula, if I can, is to show that the single-side marginal pi xi can be written as follows. It can be written as 1 over i exponential of minus 1. Minus z xi squared divided by 2. And then times an integral that takes into account, give me a second, takes into account the neighbor's i of the distribution when i has been removed of the neighbors of i. And then the following, the sum for the neighbors of i of xi a, i, a, i, l, x, l, or something like this. So this derivation of this relationship is exact. When you derive this relationship, you can assume that maybe you are in a random graph, or you can assume the beta-pals approximation for this young probability. Assuming beta-pals approximation, take that the joint distribution for the neighbor of i can be written as the product for l in the neighbor of i of pi, l, x, l. Finally, assuming this, you close the questions doing the same idea in a graph or in a matrix where you have removed something. And you can find that the single side marginal pi xi, where j has been removed, is equal to 1 divided zone factorization, sorry, normalization factor of exponential of minus z xi squared. And then I have the product for l belonging to the neighbor of pi without j of the integral x, l, of exponential of i, a, i, l, x, l, the right distribution at a node l of x, l, when i has been removed. And now, it's exactly the same blood equations and the gravity method for the decimal, but continuous variables. Because if you look at the derivation mathematically, there is nothing that prohibits you to do exactly the same steps. The only thing that you do is to change discrete sums by integrals, but integrals are sums, right? The same thing. Now, here, the hate is when the different comes and that people thought that it was a major obstacle. Why? Because you see the gravity method applied for easy variables. These marginals can be parameterized by just one real number, right? Because the random variable takes values in the IC model plus minus 1. So in this case, this is annoying, right? Because this is a real variable, so you have a proper distribution, or a proper function. So if you look at this, you might think, OK, this is going to be very difficult to solve numerically. How can I do this? Maybe if I were to parameterize these distributions or these functions, I need an infinite number of parameters, and then I need to close to find a set of closed equations for those parameters, in the same way that in the exercise I left, that we are going to do it for the cavity method in the DC model, you have this closed set of equations for the cavity fields. But here, it was just one parameter. Here, in principle, I need an infinite number of parameters, right? Do you understand? But here, if you look at this expression, you realize something that there is a special set of functions that are a fixed point of the cavity equations. So that means that if you take a particular form of this set of functions, the form of these functions does not change. It remains, OK? So if you notice this, that means that you can use this set of functions, and this set of equations simplify a lot. So the question is, this would be the equivalent of the cavity equations. Again, the question is to realize that there is a particular family of functions for these guys, for the Pi Jxi. And I say this thing, that function or whose form doesn't change under this iteration. Because suppose that, for instance, I put here a particular function, whatever, I don't know. Whatever you can think of, it doesn't matter, OK? So after doing this integration, the form of this function might change, right? But again, there is a particular type of functions that after this process, the form of the function does not change. It remains the same. No more parameters are introduced or generated, OK? So there is a particular family of functions for which the cavity equations are a fixed point. So the question for you is to find the set of functions. You might think that some sort of the Pi Jxi, that's why functional is speaking, the form of the function does not change, OK? Those functions will depend on a set of parameters. The parameters have to will obey a set of closed equations, OK? But the form of the function does not change. So no more parameters are generated, yeah? Because if you were to generate more parameters, that would change the type of function. It is the same thing. So suppose now that this is the equivalent, or you can understand it as a connectivity matrix, or an adjacency matrix. The only difference now is that if the entry is different from 0, you might think that the nodes i, j are connected, and the link has a given weight, which is the value of that matrix entry, right? But from a graphical point of view, of course what I can have is given a matrix A, I can put the off-sites n times n, I can put n nodes. And then if this is not i and this is not j, the link between the nodes i and j is the matrix entry i, j. Yeah, but you know, up to here, remember that up to here, you don't have to assume any type of sparseness with respect to the matrix. This is exact. When you are going to do, when you do the betapalus approximation, you know that the betapalus approximation would be exact for a particular type of freeze, or in this case for a particular type of matrices, OK? But to get here is for any matrix. To get here is for a particular subset of matrices, which are those that have this kind of tree structure. Once you are here, this has to do with the structure of the cavity equations, this part here. But for another part of matrices, it works very, very well. Questions? Go ahead. You don't get the notation with this one here. It's the same notation as in the cavity method. L belongs to the set of neighbors, which are the neighbors of i, removing the node j. Remember that in the cavity method, we introduce this notation that we have a node i. This would be node i. This node is connected to a set of nodes. And this set of nodes, we call it dj. And then in cavity method, let us say you remove one node. Let us say this one, j. So the corresponding set of neighbors is the neighborhood of i without j. This inverted line is minus notation in set theory. No, we don't have freedom. And that was a major obstacle to solve this problem. So the cavity equations are what they are. And in principle, this can be any function. But these functions, they have to wait this set of closed equations. And it turns out that for a particular set of functions, when you put them under this operation, the form of the function doesn't change. So that means automatically that that set of functions have to be the solution for this set of equations. Yeah, but you can prove that there are no other solutions. Because if there were other solutions, they would generate different functions. So this set of equations doesn't close. Questions? No, so then first exercise, let us do it again with yesterday, this one. But this is essentially the cavity method. Second one, this one. Third one, find a way to realize that there is a particular set of very simple functions that solve this set of equations. Good? So I'll give you like 50 minutes, 5 minutes, right? 5 minutes. Is that OK? OK, so again, we do it in groups. So you turn around, you look at each other, and you form the group, and then you discuss. And I go around. Clear what you have to know? Yes, but the idea is that we got this method realized only on this very trivial property of the exponential function. That's it. Yeah? So then the second thing, how we did this derivation for the easy model. The way we did it, remember, is that I want to derive the single side marginal at a given node. So what I do, what we were doing in that case, I'm going to use the notation for the easy model. What I did is to rewrite the Hamiltonian in such a way that I put explicitly the dependence on the node i, the interaction between i and the neighbors, and then the rest of the system. Now in this case, and that in that case gave us the following. This was what? Minus h i sigma i minus sigma i, the sum over all the neighbors of i of j i l sigma l plus the Hamiltonian, where I have removed spin i. The reason I can write this thing in this way is due to the structure of the Hamiltonian, which is a two-body interaction. Right? Now in our case, the Hamiltonian that we have, which again is not really a Hamiltonian, right? I call it Hamiltonian because I'm abusing of this vocabulary from a stack map, is the following. So h of x, it is minus z divided by 2, the sum for i from 1 to n of x i squared. And then you have plus 1 half, the sum for i and j from 1 to n of x i a i j x j. So take this Hamiltonian and apply the same idea, right? So from this Hamiltonian, I want to derive the single set marginal pi x i. So I need to isolate from here what is the node, the variable x i, how the x i is connected to the rest of the neighbors and then the rest of the graph. And then you remember that the definition of this marginal is that this is equal to the integral over the whole system, but removing the node i of the original Gibbs distribution. That's it. Good? Better? So I give you 10 more minutes. And again, listen, I'm doing everything by heart, so maybe there is a sign which is dancing around. So don't believe what I write down. Just do the derivation. Come on. Yeah, what I'm trying to say is, if you look at derivation of the cavity method in this derivation, this derivation depends on the fact that the derivation that depends on is that you are using the property that the exponential of a sum of objects is the product of exponential of those objects. That's it. So if you have the exponential of a1 plus a2 plus a3, this is equal to the product of a1, a2, a3. That's the most important property in this derivation. Any other thing is not important. It's not important that you don't have a probability distribution. It's not important the character of the variables. They can be discrete. They can be continuous. This is not important. The reason that is important is you have the exponential of the sum of objects. That's it. Thank you. So I'm trying to say, when I think of the case, when you do, in this case, for any derivation, focus on the properties which are the most important ones to do derivation, not thinking about the context in the derivation, in the context you are working, right? For instance, because sometimes you might think, ah, since I'm doing this derivation in the context of statistical mechanics, this method only applies to statistical mechanics. Not true. False. It depends. I mean, if these were really the connectivity matrix, then yes. If it's any matrix, then you have to specify that you are summing over those elements of the matrix that connect node i with its neighborhood. Set minus aii multiplying the factor xi square. That's everything that changes. But again, what I wanted you to notice is that in this derivation, the only thing you use is this very simple property of the exponential, right? Very good. Now, this is very simple, once you have here. And the question is, have you thought of functions that when you plug them in the cavity equations, the form of the fashion doesn't change? Gaussian. Why Gaussian? Because, yeah, because Gaussians are stable under convolution, right? So therefore, if this is a Gaussian, this is a convolution of Gaussian. This is a Gaussian which shifted. If this were a Gaussian, after this integration, you get a Gaussian, right? Because this is an integral operation of convolution. That means if I realize that the subset of Gaussian functions is a fixed point in the set of the structure of this set of equations, and I take now the following parameterization. I take the pi xi without j is equal to 1 over the square root of pi without j, or the exponential of minus xi square divided by 2 delta ij. And again, these are not really Gaussians, OK? I call them Gaussians, but this delta in principle is a complex number. What am I doing? What I'm writing is the following. So as the colleague pointed correctly, so this is a subset of functions whose form doesn't change under this integral operation. Those set of functions are Gaussians. That means if I put here a Gaussian, what I get is a Gaussian. So that means that the Gaussian are fully characterized by two parameters, which is the first two cumulants, right? So now I do the same thing I did for the cavity method, but for this model, I parametrized this function, and I write down the cavity equations in terms of those parameters. So if I take this parameterization, I'm not putting the mean value, because you have to prove that the mean value, you have to take it equal to 0. So you only need the variance of the Gaussian. If you put this expression here and you write down the corresponding equations for this delta, you will obtain the following. That delta i without j is equal to 1 divided by set minus a i i minus the sum for l belonging to the number of i without j of a i l squared delta l without i. These are the corresponding cavity equations when you assume that the form of this one is a Gaussian. And the equivalent to this, but for the marginals, would be the following delta i is equal to 1 divided by set minus a i i minus the sum of l in the number of i of a i l squared delta l i. You have to remember, you have to remember the following. In our mapping, the spectral density was related to the expectation value of xi square. So remember that we found out that the spectral density, rho lambda of a, was equal to 1 divided by pi n, the imaginary part of the sum of i from 1 to n of xi square. But if this is the form of the single side marginals, then the expectation value of xi square is precisely delta i. That I'm going to put here that depends on set. Basically, therefore, rho of a sub a of lambda is equal to 1 divided by pi n, the imaginary part of the sum of i from 1 to n of delta sub pi lambda minus i eta. And that's it. That's the problem. And this could be used for very, very, very large matrices. And it's exact when the matrices look graphically like trees. So how it will work, this algorithm, you introduce a set of parameters, these deltas, that are complex. You iterate this. This would be the equivalent of the iteration of the cavity equations, which is the value propagation algorithm. When you have the solutions for these deltas, you put them here. You obtain delta i. You do this thing for all i's. And you get the spectral density for again value of lambda. The same idea that you used to obtain the magnetization for days in model on random graphs. Questions? Ertons or any graphs, right? They look locally like a tree. And the limit of this graph becoming large, the rate approximation is exact. Now you can do the following. I'm going to give you another exercise. Do these derivations as an exercise. Now we are going to consider particular types of matrices, which are related with what they are called as random solar graphs. Suppose we have random regular graphs. These are graphs. These are trees with a fixed connectivity on each node. But they are called random regular graphs, because if you would have a tree, it will start growing. And the boundary would grow exponentially. But at some point, the boundary closed to itself. So then you don't have a boundary. So assume that you have a random regular graph where the connectivity of each node is k. Suppose that the connectivity or the number of neighbors of each node is k. For instance, this means the following. Now suppose that k is 3, the graph would look like this. This is a node. It has three neighbors. And the neighbors, they have three neighbors. And the neighbors, they have three neighbors, et cetera, et cetera. And at some point, it has to close to itself. So suppose that you have a random regular graph with fixed connectivity. And the weights of the nodes are the same, like for instance one. So if you have an homogeneous random regular graph, you have an homogeneous and homogeneous. This means same weights for all links. So for this particular set of graphs, you can solve exactly this set of equations. And you can say that the spectral density is equal to a given formula. Yeah. This, so see, yeah, yeah. So what I'm trying to say that this mapping, this depends on the expectation value of this guy. And according to our parametrization, this expectation value is precisely the variance. Unless, precisely, unless that in some cases, they simplify, and you can solve them exactly, explicitly. So in this case of random regular graphs with which are homogeneous, you can solve this set of equations explicitly. Tell me. Yeah, yeah. So random and regular graphs are graphs which are regular. So that means that all the neighbors have the same, all nodes have the same number of neighbors. Like for instance, in this case, I'm not drawing the whole graph. It's just a small part, right? So in this case, all the neighbors have the same, all the nodes, sorry, have the same number of neighbors, which is 3, yeah? 3, 3, 3, 3, 3, right? So that means regular graph. Random regular graph means that if you, if these were exactly at 3, you see the boundary. If you expand this thing, the boundary of the graph will grow exponentially. And this is sometimes not good. So what you do is to take the boundary, and you close it to itself. And there are many ways to close the boundaries. This gives rise to the randomness of the random regular graph. And the homogeneous part is that the weights of the links is the same for all links. So that means for this matrix, OK, all the elements of the matrix are the same. Sorry? Yeah, you create loops. But if the graph is large enough, those loops are not important. If the graph is large enough, those loops are not important for this equation. It still is exact for very large graphs. Questions? Well, not that one, the previous one. How it is a convolution? Because this is a Gaussian weight, right? I'm missing the diagonal part that I put there. Product with a Gaussian weight, and I'm integrating over a subset of variables, fixing the eyes. So this is the product of two Gaussians and integrating over a subset of Gaussian variables. For general cases, yes, numerically self-consistency, yes. So you start with some initial values for these variances, and then you iterate this set of equations. Questions? More questions? OK, thank you.