 Há dito que existen colegas que venen tarde, mas nós devemos começar. Então, nós não iremos cerrar as portas e não nos permitiremos xerrar. É ok, né? Então, eu te darei as xeitas para começar a notar, por favor. Então, lembrem... Lembrem o que nós fizemos ontem, ok? Então, ontem nós fizemos a introducción a este curso e o que é a ideia. A ideia é que existen certas problemas na teoria de random, multifaxóns, multifaxóns e xeitas que nos permitimos coger as xeitas de matrix a xeitas de matrix no xeitas interas e xeitas dos xeitas prescripcixios para xeitas de matrix e xeitas de matrix e xeitas de matrix. Ok? Então, ontem nós fazemos a segunda parte, a segunda seta de xeitas que precisamos para acatar os problemas na teoria de random que são xeitas de xeitas de matrix. e tan xelfab rá xe xa un da dáxum txut xa o ascento de manera simples e unha mágica do áfaro xa chan, o que é o método replicante. Isso unha ir rモ nha escopex o áfaro xa. Eu vou troco na turco para expláxel que asvêreco o ámen xa unha mágica. By e hoje in xxta gün a wood X a simple intuity one, que é a metodo cavití. E o áfaro xa, sunna uppólar xa xa un xplíng o áfaro xa, unha xa xa qu'eu ou xa xa q'eu da xa xa. É un áfaro xa xa xa xa xa xa un áfaro xa xa, mecanis for a particular set of problems. OK, so to explain this method, I'm going to take a paradigmatic model in a STACMEX, which is the easy model. So I'm going to use, let us take, I'm going to use a model, simple model, which is the easy model, but where the spins are going to put it on a graph, and then we'll deal the case of a random graph. So we'll consider easy models on random graphs, or for the moment on graphs. And so what is the easy model? I think you've heard about this model, I hope. So the easy model was introduced as a model to explain certain type of magnetic behavior, which is para certain type of two types of magnetic behavior, which is paramagnetic behavior and paramagnetic behavior, and in particular the transition between both of them. All right, so this model was introduced to explain paramagnetic faces and again the transition between them. Go ahead. I can try. Yes. This one here, that better. It was due to the picture of Trump. That's it. So what is the... There are different variations of the easy model, but the simplest Hamiltonian is the following. The Hamiltonian, we are going to denote it as H of sigma. And for the easy model with what is called pairwise interaction, the Hamiltonian looks as follows. You have a minus sign for convenience sometimes. You have a sum over pairs of variables. I'm going to explain the notation in a bit. Of j a j, sigma i, sigma j minus the sum derived from 1 to n of h i sigma i. Right? Where in this notation sigma vector is simply the vector of sigma 1 up to sigma n. You have n variables or n, what they are called easy variables, my that take values 0 and 1. The j a j, they have different names. They are called strength interaction, exchange interactions, interactions, whatever. It doesn't matter. The interaction between a pair of spins has called exchange couplings, interaction matrix, etc. It doesn't matter now the name. What is important is that they capture the way in which a couple of spins they are interacting. And the sign determines the type of interaction. I'll mention this thing in a bit. And then this h i is simply local magnetic sterlan field. And here this notation, the sum of i and j belonging to g, this g represents like a graph. This g is a symbol for a graph. Any graph would suffice for what I'm going to do. I'm going to say at the beginning of this lecture. So what is a graph? A graph normally is a collection of two sets, a set of vertices and a set of edges. It's a set of vertices. Sometimes also you call them nodes. And e is a set of edges or links. And normally e is a subset of the Cartesian product of b with b. And b simply enables one questions. So if you don't understand this thing, it's a better way to introduce it. What is a graph? It's a collection of bolts connected with lines. So a given graph you'll have, a given graph with n nodes you have n points. 1, 2, 3, 4, etc. up to n. And the edges are simply lines that go between two points. For instance this would be j 2 3. It would be actually a connection between 2 and 3, 3 to 1, etc. Ok, this is a graph. Questions, questions so far? No. Ok, so remember that the sign of the caplings, the term is a type of interaction. So when the coupling, when you take up a pair of nodes i and j and the coupling between i and j i a is positive, the interaction is fatal magnetic. That means that those spins, they want to have the same sign so to minimize the energy. If j and j is negative, the interaction is anti-ferromagnetic. That means for those particular set of nodes or spins, they find favorable to have opposite signs. Now you might have a situation where in the whole model you have a combination or a mix between ferromagnetic and anti-ferromagnetic interactions and this is what is called a spin glass. But for us for the moment we are going to suppose that for instance all the caplings are ferromagnetic. So we will assume our case for simplicity that we have a purely ferromagnetic model. J i j is positive for all i and j. So it's purely for the magnetic model. And what we are going to do now is to study the properties, the thermonautical properties of this model. So this implies that, given this Hamiltonian, there is something called the Gibbs Boltzmann measure which I denoted like P of sigma which is 1 over set, the exponential of minus beta H of sigma. This is the Gibbs Boltzmann measure that tells you what is the probability to find a spin configuration with a given value, when the system is coupled to a thermal bath with temperature, inverse temperature beta and set, as you know very well, this is the partition function which is simply the sum over all possible spin configurations and the exponential of minus beta H of sigma. I'm using the canonical ensemble of course to describe the thermonautical properties of this model. And the logarithm of the partition function would be a free energy. In particular you have the angle free energy that is will denote with the letter F, capital F, minus beta times F is the logarithm, is given by the logarithm of the partition function. So F is the free energy of the system. So far so good. And of course I might have observables of interest and I would like to calculate the expectation values of those observables of interest both that I denote as O of sigma, a function of sigma and this is a global observable. This would be something that tickles your fancy. This is a global observable for instance magnetization, Hamiltonian, correlation between a pair of spins, correlation between a triple, three spins, etc., etc. It doesn't matter for them. And given a global observable of interest I want to calculate the expectation value so the expectation value would be denoted with this parenthesis. And you know that this is simply the sum of all possible configurations of the observable average using the Gibbs, Boltzmann equation. Explicitly this would be my number set, sum of our sigma, the exponential of minus beta H of sigma O of sigma. So far so good? Good. So the main in statistical mechanics when you learn it first time the first part you learn it is the connection between the microscopic wall and the microscopic one that gives rise to the theory of ensembles. And once you know this the connection between free energies and microscopic properties or microscopic description of the model. So the main goal, the second part in the statistical mechanics is to find ways of calculating this object. Because once you know how to calculate this object free energy from it you can derive any other property. So if we are not going to do this we are going to be a bit more modest. So I'll give this thing as an exercise to calculate it for the ferromagnet on the regular graph. But suppose now that I have an observable of interest and this observable is the magnetization. Suppose that O of sigma I'm going to denote it now as M of sigma is simply let me divide by one over n one over n the sum i from one when of sigma i. The way I'm taking this route is because I want to motivate the cavity method. You'll see why. So I'm going to take as an observable the global magnetization and I'm worried and what I want to do is to find an efficient way to calculate this expectation value which is the true thermo dynamical magnetization. So I want to calculate M of t where it is the temperature and this is by definition the expectation value of M of sigma. So this is what I want to calculate in an efficient way. Of course by definition of the expectation value M of t is equal to one is equal to the sum over all possible configurations of the Gibbs Boltzmann distribution of M of sigma. But look here that this is a sum which is very large when n is very large it's a sum with two to the n terms. So this sum over sigma is a sum containing two to the n terms and if n is very large so you are in trouble. So the idea of a stack make and all the tools is to do this in an efficient way in a clever way. So cavity method is a way to do this efficiently for a particular type of graphs. So I want to find a way to overcome this obstacle. That's the point. So and also from intuition I know that for the behavior of this guy I expect the following. I know that since this model captures or tries to capture the magnetic behavior if I were to plot the magnetization as a function of temperature I know but this was a surprise 100 and so years ago but now it's not anymore so if I were to plot M of t as a function of the temperature what I would expect is that when temperature goes to zero since the system is a fellow magnet and let me put actually also the h i is equal to zero for all i so I expect that the magnetization would be one and then as the temperature increases the magnetization will go down until you reach a value of the temperature above which the magnetization is zero. This is what you expect and the point where the magnetization becomes zero is called the critical temperature. So suppose that I am obsessed with obtaining this critical temperature so I want to have an equation for the magnetization to get it. Of course this is not the most interesting part of the critical points the most interesting part is things that have to do with the universality critical exponents but for the moment we are being modest so we just want to find a way to get a tc so far so good of course you know very well that sometimes you don't get this because it depends on the graph and this is a general discussion and we know that in some cases the critical temperature is trivial for instance if the graph were to be just a ring the critical temperature is zero so having a having a tc different from zero this depends on the graph so far so good yeah ok so so again I want to find simple equation for the magnetization and so let us see what we can do with the expression of the magnetization as an expectation value of m of sigma so again m of t is equal by definition to the sum over all possible configurations of p of sigma m of sigma and is equal to 1 over n the sum of i from 1 when of the sum over sigma p of sigma ok now think about in terms of probability theory forget about for a second about statistical mechanics p of sigma is a probability distribution that contains all the possible statistical information of this brand of vector which is vector sigma now I am doing an expectation value with respect to for just one of the variables so that means that for what I want to calculate this distribution has too much information if I only have the distribution for that variable sigma i that is sufficient for me ok so I can rearrange this sum and do the following so I can say that this is equal to 1 over n the sum over i and then I have the sum over sigma i that takes two values 1 sigma i the sum over I am going to write this thing down first and then I explain the notation this means the sum over all values of the vector sigma but when I took out sigma i ok of p of again this guy here what it means is the vector that goes from sigma 1 sigma i minus 1 it jumps i it goes to sigma i plus 1 at 2 sigma n yeah and then this sum over this vector where I have taken i is simply the sum over all possible values of this vector without i since I am doing the sum over this distribution that will give me what is called the marginal distribution for that variable so this is a process that in probability is called marginalization and this is equal to the a single variable marginal which is the probability of finding the spin i sigma i with argument value these are what is called single variable marginal or single set marginal is equal to the sum over all possible values of sigma with that i of the gives both one distribution so if I continue here what I find what I obtain is something which is very very intuitive so this is equal to 1 over n sum over i from 1 to n sum over sigma i sigma i pi which is ok because if I am worried about the expectation value of one of the variables the only thing I need is the probability distribution of that variable so that means with this expression that I want to obtain the magnetization apparently the only thing I need to know are single set marginals which is very natural ok to calculate this object I need only a small a a reduced information from the Gibbs distribution reduced from sigma single set marginals ok so far so good so now let us focus about this guy here this is our object of interest now and let us do a plot of some locality of the graph around i now my object of interest obses with these objects here and so suppose where the situation around i is the following suppose this is the node i this node is connected to other nodes and the nodes which are neighbors to i are connected to other nodes etc ok so this is connected these are connected to other nodes and the neighbors of the neighbors are connected to the neighbors ok until you have the whole graph and the whole interaction so let us denote this central node as i this is the node of interest here I have a is invariable sigma and this the neighbor could of i let me introduce some very nice notation the neighbor could of i the number of neighbors which are the number of nodes which are or the set of nodes which are connected to i this is called of course the neighbor could of i and is denoted as follows ok like a partial derivative of i like it means the contour of i so if these nodes were to be like for instance the node l m n ns then this the derivative i the contour of i simply this collection of nodes ok the node l and if I were to put the if I were to use the following notation sigma the contour of i this is the collection of is invariable which are located in the nodes which are neighbors to i ok this sigma contour of i is simply the collection of nodes sigma l sigma m sigma n is that ok very good so ok so the idea now is the following now so again so I am obsessed with the single site marginals this guy here and I know that for my model remember that the Hamiltonian H of sigma is simply minus the sum where the pairs of connected nodes d i j sigma i sigma j let me put back the magnetic field the sum of i from 1 to n h i sigma i and gives the following distribution is simply 1 over set the exponential of minus beta h of sigma ok so if you forget about the interactions and you think from a point of view of probability so so what is happening according to the case also what is happening is like the probability of finding the spin sigma i at a given configuration right that means p i of sigma i must depend on the the probability of the neighborhood right and somehow how this variables the values of the neighborhood and the variables of the sigma i are co-atolated we will do the derivation in a second but intuitively the probability of finding the spin this spin at a given configuration must depend on the probability of finding the neighborhood at a given configuration and the interaction between the neighborhood and this spin yeah so I expect without doing any derivation that the probability of finding the spin at the node i at again configuration p i sigma i this must depend on the following on the interaction let's do it in terms of physics vocabulary interaction interaction between sigma i and the nodes the easy variables which are directly connected to i these are sigma on p of i and it must depend on the probability of finding this set of spins at again configuration this is very interesting yeah so this is a generic graph they can be connected as well yes you mean something like this this is fine but this is not excluded from this because this will be included in the probability of finding the neighborhood at again configuration so you see you have one part which is finding to find the spin at this again configuration is the interaction between this spin and the neighborhood and the probability of finding the neighborhood at again configuration and that includes where the neighbors are interacting directly or not and this is going to be crucial to do the cavity method later on good, very good question so this means let me put it somehow with the formula that p i of sigma i must be a function of the probability of the neighbor's spins somehow and this is this is very intuitive because it comes directly from the expression of the case polsman measure and the discussion we have but this is bad new for us because why it is bad news because what I am looking for is to find a simpler way to calculate the nice expression for the magnetization in principle I would like to have very simple equations that connect single side marginals to single side marginals but what I find is that single side marginals depend on the distribution of the neighborhood and of course if I want to do the same analysis for the probability distribution of the neighborhood I would depend on the probability of the next neighborhood etc etc so what I have here I have a hierarchical set of equations that connects single side marginals to double side marginals so I have a hierarchical set of equations relating different marginals and this doesn't simplify the problem ok it is as difficult as trying to as the starting point ok so here I have a hierarchy of equations hierarchy of equations for marginals and this hierarchy of equations appear in many areas of physics ok what I am saying is not is not very revealing I am pretty sure you have seen it in different in different topics now cavity method is a way to trancate smartly this hierarchy of equations right so then you have a simple set of equations for single side marginals that's the idea of cavity method so cavity method you can think in this terms cavity method is a way a way to either trancate or to close to trancate let's put it like trancate trancate that's the idea of cavity method and the name this is the mathematical idea of the cavity method and the name comes from the fact that for a particular set of graphs what I am going to notice is that if I were to remove the node I then the neighborhood becomes a statistical independence and that makes that this hierarchy breaks is cut into single side marginals ok so that's the idea of the cavity method now how can I show this doing the derivation so now what we are going to do is simply to find precisely the relationship between single side marginals and the private distribution of the neighborhood and notice that for a particular type of graphs this private distribution factorizes into the product of single side distributions do you get the idea very good so I want to find this relationship for this model and of course you can generalize to much more complicated models because this relationship is pretty much wrong the idea of the method is well you understood that I have a hierarchy of relating single side marginals to double side marginals etc etc hierarchy is that you'll see single side marginals as a marginal for one variable will be related to the marginal of the neighborhood the marginal of the neighborhood will be related to the marginal of the next neighborhood etc etc so from here to here the private distribution the argument for the distribution becomes bigger and bigger here I have one variable here I have as many variables as the number of neighbors of five etc etc what I would like to have is a set of equations that relates single side marginals to single side marginals you know but first we are going to the derivation to derive precisely this relationship without any type of approximation is that ok better ok so so so again so since I am focusing myself into the marginal at one variable at not I so I am going to focus I delete the figure sorry I am going to focus on the part of the graph where not I is ok so I have a graph like this again this is not I this is sigma I this guy are the neighbors of I sigma I and the graph spans and maybe it closes and do fancy things etc etc ok so the other part here is the rest here is the rest of the graph that I am not drawing ok the rest of the universe now very good so what I am going to do to do derivation is to focus on the expression of the Hamiltonian at the node I right so let me well the Hamiltonian is here ok so where does the node I or sigma I appears well appears here of course maybe I should change the notation let's condiste the index when j is equal to I sigma I appears there yeah and here where it appears well when I am doing this sum of interactions at some point I have this guy interacting with the neighborhood ok so that means that the Hamiltonian H of sigma ok I want to isolate and put apart where sigma I is and I know that there is a term that is H I sigma I sorry this would be minus H I sigma I and then from the part of interaction there is a point where I arrive to this collection of links that connects a sigma I with the neighborhood so I have minus sigma I for L belonging to the neighborhood of I sigma sigma L if this were to be for instance L this is the interaction J I L so this part when I focus on I we have sigma I J I L sigma L sum over all the neighbors yeah and then the rest I have the interactions of the neighbors of I with the rest of the graph so I am going to write this thing as follows plus a Hamiltonian where now I is not present I have removed I from the system I have done like a cavity I am going to denote this in H without I of sigma so this part of the Hamiltonian contains all the interactions that I didn't take out so that would be the interactions of the neighbors of I the rest of the graph is that ok? it's a Hamiltonian the interactions are symmetric if you if you if you don't have symmetric interactions you cannot define a Hamiltonian you start with a dynamics and you have to work and you have to do the dynamics of the system and in some cases you can find the equivalent of a Lyapun of function that will give you the stationary state yeah yes must be by definition by certain property they have to be symmetric yeah is this one here so this notation the proper way to do this thing is perhaps to be instead of putting this it would be to put something like this would be H and sigma without I because it is the same model but now this function is only applied to the set of nodes without I but I am using more or less the standard notation which is this one sometimes if I want to be very very pedantic I will put both of them but I prefer actually this one to this one that was your question yeah more questions good so now since I separated I isolated the dependence on sigma I I go to the definition of Pi sigma I and I do the derivation to see where I go so Pi sigma I would be by definition what the trace over sigma of sigma sigma I etc etc so Pi is what is one over set the sum of the trace over all sigma but without I remember this notation of minus exponential of minus beta H of sigma now I put since I am focusing on sigma I this is a composition here this is exact of course and if you would have a Hamiltonian with Pi body interaction you can always do this this you can always do so I put it here and this is equal to what equal to one over the partition function the sum over sigma without I and then I have the exponential of beta H I sigma I plus times beta J I sigma I the sum over L in the neighborhood of I J I L sigma L ok I have to put here and the exponential of minus beta the system without the spin I good the only thing I have done is to substitute that thing over there that's it now this one I can take it out because I am not doing the sum over I so I am going to do this thing step by step so this is equal to the exponential of beta H I sigma I divided by the partition function of now what I do is the following I divide this sum which is sum in overall configuration but without I into doing the sum over the neighborhood of I and then the rest of the universe so now this guy let me put it here apart the sum over all configurations without I I am going to write the best follows I am going to do the sum for all the configurations of the neighbors of I and the sum for all the rest of the universe without I and the neighbors of I so that would be without I union the neighborhood of I so in this picture what I do I have to do this one means the trace of the the whole system without I so I is not there after the trace of the whole configuration including the neighborhood of I so what I do is I do the sum over the configuration of the neighborhood and the sum well times the sum the configuration of the rest of the universe when I have removed this whole system I am just simply rearranging the trace for all possible configurations right so let me put this thing here so then this would be the sum over all configurations of the neighbors of I exponential of beta sigma I the sum over L belonging to the neighborhood of I J I L sigma L times the sum over all configurations without I and without the neighborhood of I the exponential of minus beta H I H for the Hamiltonian without no I of sigma I have not done anything and I am just rearranging terms now here it comes a punchline if you answer this question correctly you know how to these derivations so normally what I do is I say forget about the rest of the universe because sometimes when you do a derivation people get distracted now the Hamiltonian without I is a Hamiltonian the only thing I have done is to remove a node but this is a Hamiltonian for a new system without a node so that means that this Hamiltonian has associated a Boltzmann distribution so this is a new system if you want to think in these terms where I have removed I so being a new Hamiltonian it has another Boltzmann distribution that has to note the Boltzmann distribution P without I because I have removed I of sigma which would be one over the partition function of the new system where I have removed I of the exponential of minus beta H without I of sigma because it's a different Hamiltonian are you with me and this is a probability distribution so that means if I were to sum or trace over a subset of values of sigma what I get I will get the corresponding margin ok and what do I have here here if I multiply and divide by the partition function of this new system I have the this Boltzmann distribution where I have removed the node I and I am doing the trace over the rest of the units without I and the neighborhood of I so therefore this is the joint probability distribution of the neighborhood of I where I have removed sigma so if I take this guy here be without I of sigma and this notation I agree with you it's kind of redundant but it's the one that is standard in literature so I'm copying it as it is and I do the trace all spins but not I and not the neighborhood of I I is not there already but the neighborhood of I is there actually so this is what this is the joint probability distribution of a system where I have removed I of the neighborhood of I so therefore if I here I multiply and divide by the partition function of the system where I have removed the spin I I obtain exactly this margin so let's write this thing as the set without I divide by set I exponential of beta hI sigma I of the trace over the spins which are neighbors of I of the exponential of beta sigma I the sum over L belonging to the neighborhood of I of j I L then when I divide by set without I and I do this trace this is this bolsman distribution so therefore this is the joint probability distribution in a system where I have removed I of the neighborhood of I so let me denote now this ratio of set without I divided by set sub I and what I find explicitly is the expression I mentioned you ok is a hierarchy that relates single side marginal to the marginal of the neighborhood so from here I obtain that I sigma I is one over set I exponential of beta hI sigma I the sum over all the configurations of the neighbors of I of the exponential of beta sigma I the sum over L belonging to the neighborhood of I of j I L sigma I times the probability of finding the neighborhood that again configuration one when I have removed I so I let single side marginal marginal to one variable to a marginal with a certain number of variables that depends on the neighborhood of I and of course you understand that and you can do this in as an exercise if I were to start now by definition with this object and I want to see how this object depends on other objects we'll have a hierarchy of marginals depending on much more complex marginals go ahead can you speak up please why? we need this partition this would be the partition function associated with the Hamiltonian where I remove I I need this partition function because I need to put the normalization factor of the Geist Boltzmann measure so what I do here ah sorry here I forgot to put this right so yeah so this guy sorry this guy here let's use blue ah no no no I just put it here already sorry sorry from here now this guy here yeah let me put it here if I divide by one over set I is the Geist Boltzmann measure for a system where I remove I yeah and this marginalization will give me this marginal here so what I do is I multiply and divide by the partition function of the system where I remove I is that okay? I still wear on thank you clear? this expression is very intuitive right so let us draw again the graph that I keep deleting all the time okay so it tells you something very intuitive that the probability distribution at site I depends on the probability distribution of the neighborhood how the neighborhood is connected is correlated to sigma I and perhaps some kind of influence that determines also the distribution of I well now we have a problem now because that means that what I wanted to do from the beginning to find a simple way to calculate the magnetization is not possible because this is as difficult as as original problem of simply doing the trace over to calculate the partition function however now I can do an observation the observation is the following no and I'm going to draw the same picture again but now this is really for this particular type of graph suppose that my graph so let's assume assume that the graph is a tree so what is a tree is that you have a node and it branches to the nodes and those nodes branches to the nodes etc and there are no loops so I have something like really as I was drawing before but now it's for certain like this okay and this is not I and this is the neighborhood of I okay now it's really a tree I'm not plotting the whole tree now look at the following so what happens now is that let's look at this object I want to understand the distribution the marginal in the system where I remove I of the distribution of the neighborhood of I this would be I of sigma the contour of I so this means the following so I have my original system I somehow remove sigma I or fix it to a given value I condition the probability so let me fictitiously to remove this node so how let me simply delete the links so now the sigma I is not longer there right in the system where I remove I is no longer there so if sigma is no longer there and the spins are interacted in a graph this happens that it happens that this probability distribution must factorize why is that because they are independent because now before I could have you know interactions between neighbors right but for the type of graph which is a tree I don't have interaction between the neighbors I have that this node is branching to other nodes etc etc so if I were to remove I now the neighbors of I they do not interact any longer because the only source of interaction for a tree of the neighbors of I it was through I so that means like for instance in physics a way to understand statistical dependence is I go to this node I kick it and see how the kick affects the other nodes so if I perturb this node this perturbation cannot be felt by the other neighbors of I because they are not connected so that means that for this type of graphs for trees this means that the joint probability distribution of the neighbors of I without I factorizes into the product of single site marginals will be the product over the neighbors of I of P without I you understand it so for this particular type of graphs a tree if I remove I the neighbor of I becomes a statistical independent so therefore the joint probability distribution is the product of the single site marginals so what would happen in cases where perhaps G is not a tree G is any graph then of course this is not true and this becomes an approximation and it is called the better piles approximation so if G is not a tree then this guy this factorization is an approximation you put it like this it's an approximation and it's called the better piles approximation and it's a refined way of to do mean field theory this is called the better piles piles approximation yeah and this is not the mean field theory that you study it's another type of mean field theory where you take into account the approximation of the neighborhood this is called the first order mean field mean field approximation yeah questions that's very difficult to characterize I mean how good is the approximation and in which case you will see so you will see when you do for instance the electrical derivation or for a particular type of graphs that this approximation becomes exact when the large becomes infinitely large okay this may is more difficult to justify by doing the replica method it appears automatically in the derivation so when graphs are exact trees this is exact of course sometimes you have that graphs are locally tree like for instance Poissonian random graphs that when this graph becomes larger and larger this approximation becomes better and better how would I know actually how to quantify the the approximation ah is when the not really because here there is a confusion about what the sparse means so for instance if I take a graph if I take a graph that is related to a qubit lattice or a rectangular lattice and I write down the expression for the adjacency matrix the adjacency matrix is a sparse yeah you know what is an adjacency matrix right hello yeah the adjacency matrix is a matrix that tells you whether in a graph two nodes are connected or not so there is normally a confusion between what of the when people in this area talk about sparseness there are a lot of sparseness that will not will not give you that this approximation is very good like for instance okay so if I suppose that the graph is a rectangular lattice or a qubit lattice it doesn't matter suppose that the graph and you should do this as an exercise suppose that g is a rectangular lattice so remember that I can define an adjacency matrix that we normally do not see where the entries c i j is equal to one if i and j are connected this means i and j non x i and j are connected and zero otherwise so if I were to write down the adjacency matrix for a rectangular lattice that matrix would be a sparse why because in a rectangular matrix or in a bravae lattice the number of neighbors is finite so if my matrix is my adjacency matrix is n times n n the number of nodes so the number of rows which are one is the number of neighbors and the rest is zero so that's by definition a sparseness but for this type of graph you have a lot of loops so if I have a rectangular lattice this is one part and this is my node i if I remove i what happens do the neighborhood becomes independent? no because even though I remove i these two neighbors can still be interacting through different paths so a sparseness is not related to the goodness of this approximation it's a particular type of sparseness is that better more questions yeah it depends on the loop like for instance in Poissonian graphs the size of the loop is of the order of logarithm of n and since logarithm of n or n goes to zero when n goes to infinity those loops are fine other loops might not be fine I don't know how that doesn't mean that there is no any conditions might be I'm not sure I need to check this for the particular for the particular problems we are going to tackle the approximation is going to be exact in the thermodynamic limit so I'm not worried about corrections to that and there are corrections there are colleagues from my Italian colleagues there is a favor of Tomaso Ritzo which is in La Sapienza with maybe with Giorgio where they study the collections that comes from the loops to this cavity method well for instance yeah like for instance you have well in biological systems no but you can always find models where the graph can be modeled by a random graph for instance Poissonian graph and the cool thing about the cavity method is the following you see the the statistical independence the normal is called the correlation but you know that correlation is not synonym to statistical independence so if I use the correlation forgive me I mean statistical independence the statistical independence comes from the fact of realizing that in this particular model if I remove something then the rest of the system becomes decodulated so that means that I can write a closed equation for the single side marginals of the object I remove as soon as you understand this you realize that if I have a very complicated complex complex graph where I can identify an object that as soon as I remove it the graph becomes uncodulated then I can solve very easily the system like for instance I could have something that this instead of being a node is a cluster of nodes this cluster of nodes is connected to another cluster of nodes etc etc right so now my single side marginals would be a single side marginals but for the configuration of this cluster of nodes and I can write down closed equations for this marginals ok more questions what time is it very good so so let us put this the better pulse approximation or this expression of decodation in our relationship between the single side marginals and the marginals of the neighborhood and what we find is the following Pi of sigma i is exponential of beta h i sigma i divided by set of i of the product over the neighborhood of i of the exponential of beta sigma i j i l sigma l no, this is not correct the sum over sigma l exponential of beta sigma i j i l sigma l the single side marginal where i has been removed for the node l sigma l in the previous derivation I just put this expression here if it's exact equality if it's not exact an approximation but you know I'm a theoretical physicist and I confuse signs or for me everything is an equality ok very good now half I solved the problem that I wanted to find a simple way to calculate the magnetization using single side marginals well not really right why even though it appears that I have closed the system the system is not closed system here of course I'm not saying that you have to do this thing for all i etc etc ok so this i has to go from 1 to n you have to do it for us every single node on the graph but this system is not closed so it relates single side marginals single variable marginals but these objects are of different characters because this is the single side marginal and this is an original problem while this is the single side marginal where I took my original problem out of a node I did this operation to achieve a statistical independence so this system is not really close so these objects p i sigma i and p i l sigma i sigma l they are single side marginals but they are not from the same system ok so I'm almost there these are single side marginals single side or single variable marginals from different systems when I say different systems the same system but I have removed different systems right so how do I close the system I close the system by realizing that I have a hierarchy and I need to investigate the hierarchy in the next order so what I do is the following now and I leave this as an exercise you should do it and now investigate the relationship how this guy, this single side marginal wherever I move depends on the neighborhood wherever I move so I do morally I'm not going to do it you do it morally the same process the same idea so I go to the system where I have removed i I have h without i of sigma I write down p the marginal of i but now I calculate marginals for instance without i or note l ok l now is a neighbor of i yeah and I do the same process and what you find is that since now you are in a system so remember you are in a system where this is i this is sigma i but now sigma i is not connected to the rest of the neighbors so I'm focusing now in the marginal where I remove i at note l in p l so what I would do I would go to a system where I have to remove i and something else but whenever I remove i the system becomes unconnected if I remove one of the neighbors what happens to the rest of the neighbors nothing they are the same marginals so the marginal here wherever I remove i and maybe I remove this guy here is the same marginal where I remove this guy ok that trancates the hierarchy and you can close the equations for the marginals where I remove one note these marginals where I remove one note I call them cavity marginals these are called cavity marginals because they are related to a system where I remove I do like a cavity I remove one filter yeah yeah yeah and again if it's three lags it's not exact it's an approximation these are called cavity marginals while these are the physical marginals because are the marginals related to the Hamiltonian am interestate these are the physical single side marginals now if as an exercise you have to do this thing to find now the close set of equations for the cavity marginals because as I told you once you remove another a neighborhood of i you achieve nothing the system is already uncorrelated so you have to find the following that the probability distribution at side I'm going to change a bit the I'm going to use this index here the probability distribution now at side i but where j has been removed this is equal to one over a partition function of a system where j has been removed or the normalization factor of the exponential of beta h i sigma i the product over the neighborhood of i where j has been removed of the sum over sigma l of the exponential of beta sigma i j i l sigma l the times the probability at side l sigma l when i has been removed and now these two objects are related to the same problem single side marginals where I remove one node so that gives you a set of close of equations for these marginals these are called the cavity equations cavity equations for these objects here for the p i sigma i j where this j that you remove must be a neighborhood of i of course you could remove another j somewhere else but that's not useful and then that's it because now I have a very simple system of equations for single side marginals this function that in order to parameterize you just need one real value because these are easy variables takes values plus minus one so I need just one real number to parameterize this distribution compared to the original Gisborne distribution this is a simple system of close equations to solve by iteration for instance or sometimes exactly so once I find the solution for this single side cavity marginals I can come here obtain the physical single side marginals and from there calculate the magnetization so what would be the steps so let us call this equation one to put a name in this equation two and remember what is our original problem our original problem was to find simple ways to obtain a expression for the magnetization this thing but not the equation and to write things in a cool way on a much more compact way let me introduce the following parameterization let me parameterize the cavity marginals p i sigma i without j in the following way exponential of beta h i without j till the sigma i divided by two times the perbolic cosine of beta h i till the j where now this h till this etc etc these are called the cavity fields so h i till the without j these are called the same type of parameterization for the physical marginals I can write down p i sigma i is equal to the exponential of beta h i till the I put here a till the not to be confused with the external local magnetic fields I put at the beginning divided by two times the perbolic cosine of beta h i till so these are effective the only thing I'm doing is just parameterize these distributions I'll leave as an exercise the following if you you can write down these equations this one and this one in terms of the cavity fields and the effective fields so what you have to do is to plug this thing into here and to play there are two ways to do it one is smart and one very long do both and to play to find the following set of equations that I'm going to put here would be three and four for the cuba line one prime two prime so if you put these parameterizations in the cavity equations for the cavity marginals and the relationship between the cavity marginals and the physical marginals you obtain the following that sigma sorry h i without j this cavity field is equal to as the sum over the neighborhood of i without j of a function that I'll define in a second u of j i l h tilde without i this would be the cavity equations good and again this i goes from one to n j goes along the neighborhood of i so this is a system of closed equations so these are the cavity equations and the relationship between the cavity fields and the physical fields would be the following h i tilde is equal to not theta i I call it h i no sorry h i h i plus sum over l belonging to a neighborhood of i of u i j i l i tilde where u u x and y is equal to 1 over beta they are tangent of the tangent of beta x times the tangent of beta y I leave this in some exercise it's not really difficult it can be a bit tedious but not so again these are the cavity equations these are closed equations for the cavity fields you have to solve them somehow one possibility is to do it numerically so that means you generate your graph of interest you iterate this set of equations on the graph when you do that this is called belif propagation algorithm so when you take the cavity equations and you solve them by fixed point iteration method as fixed point it's called the literature belif propagation algorithm and once you find the solution numerical or otherwise you put them the solution here and you obtain the physical fields and that means the following so that means that the magnetization m of t which was equal to 1 over n sum of i from one to n of the expectation value of sigma i now the expectation value of sigma i what it is the expectation value of sigma i is simply the sum of i of sigma i of pi sigma i but according to my parameterization according to the parameterization this is equal to the sum over sigma i sigma i the exponential of beta h i tilde sigma i divided by 2 times the parallel cosine of beta h i tilde this is equal to the hyperbolic tangent of beta of h i tilde so therefore the magnetization m of t is equal to 1 over n the sum i from one to n hyperbolic tangent of beta of h i and that's it so I found a simple way to calculate the magnetization right again so I use you have to use your favorite method to solve this system of closed equations whatever you please in some cases you can find you can simplify this you can even find exact solutions you have a solution for the cavity fields you plug it here and you find the expression of values for the physical fields when you have an expression for the physical fields I put it here I do this thing for all nodes and I get the magnetization and if you do this thing in a computer for a Poissonian graph what you do is you start with again value of the temperature because this guy depends on the temperature you solve the system you obtain m as a function of the temperature you change the value of the temperature and you can obtain the plot of m of t as a function of t questions so can you speak up which is neighbor of i yes so you this thing too because you want to close the system of the system of equations for the for marginals because this original system I I just deleted this is not this is relating the single side marginal of the original system to a single side marginal of something you have removed this is not the same object so now you have to investigate how the single side marginal of the system where you have removed something is related to other marginals and for the system where you have the correlation you notice that if I remove i and then I remove a neighbor of i nothing changes it's the same because once I remove i I achieve a statistical the correlation of the neighborhood and there is nothing I can do to improve that this is the best position position you can achieve but you have to write down with the derivations to see this more questions let's see what is do I want to say this hi yes it's the same so remember that's why I put here tilde because according to my original notation you might change it no maybe you can put here dita this hi where the local external magnetic fields yeah and they appear in both equations and this is kind of intuitive this is by the way this is calling the literature propagating field so it's telling you that the physical the physical field that decides the orientation of the spin at position i depends on the external field and the information that the the neighborhood of i sends to i but that's a different story questions yeah it's better to use this parameterization it's better to use this one instead of working directly with the margins and you have several parameterizations you have either this one and another one directly with the local magnetizations you I call a propagating field this is called so the idea of this equation this is very intuitive that's why it's called belief propagation algorithm so you have the the spin at side i and it has to decide argument orientation with certain probability so it has an external influence that is a local magnetic external magnetic field if the magnetic field is positive it's more probably to find the spinning in configuration positive this is negative with negative value right but this spin i is connected is interacting with the neighbors and the neighbors are at a given configuration ok according to the interaction with the rest of the universe so what the neighbors say is the following for instance if this is neighbor I'm going just to draw two nodes this is i and this is l so I want to decide what is the configuration the spin configuration for sigma i so this will have a local magnetic field that will determine solely the orientation if it is not connected with anything else but this node is connected with the neighbors particularly with j and i and j are interacting by a language so this equation the way to understand is the following is that the orientation of the of this one the orientation of the spin at position i depends on the external field and the information that the neighbors send to this to spin i according to how they interact and they are not finding the spin at a gain configuration so if this spin is at a gain configuration and there is a certain type of interaction this guy will tell this guy according to me and our interaction you have to point up and then this guy will go to another neighbor according to me and our interaction you have to point down so what you do is you gather the information of the neighborhood you sum it up propagating field or messages and this determines the probability distribution of finding this spin at a gain configuration this is more or less the story why we have it appears in the derivation if you do the derivation it appears in both cases and it appears in both cases think about again so this is the system where I remove one node and this is the original system at each node i you have an external local magnetic field and it has to appear in both equations because it determines the orientation of that spin either if you have removed one node or node do the derivation and use it Monte Carlo from the original Hamiltonian well always yes this is better because Monte Carlo well is time consuming and this is very easy to solve numerically you can try yourself take a system take a graph of 1000 nodes and you can do this do Monte Carlo to estimate the magnetization and then compare that with estimating the magnetization with this more questions? no one more thing before we go is the following so what I did is to focus on the magnetization but of course you can use the cavity method to calculate any thermodynamic quantity that you want from the system and I'm not going to do that but I'm going to leave it as an exercise that use cavity method use cavity method to calculate the internal energy of these type of systems for trees for instance and the free energy and the idea is the correlation that's it questions so very good so see you tomorrow thank you so one important thing so there is another workshop going on at the same time here so make sure that you get the right coffee break and also make sure that you get here in time at 11 because we have to finish lecture before half past 12 because otherwise there will be a very long queue ok so we have to finish our lectures before the other workshop so then