 It's very hot in here. So we don't have a lot of people sitting here But the next speaker is willing to get through that last talk he's presenting graphs with Fiddy with physics and I Will I'm really looking forward to it because I have no fucking idea what's coming up now So please a warm welcome for our photo. Hello Thank you for coming so I will be talking about Visualization of networks or graphs using physics It's a topic that will be a combination of computer science physics and visualization This is a brief outline I will start with an introduction state what is the problem and why we want to look at it then we'll describe how we can draw inspiration from some physical system physical phenomena to Tackle it Then I will briefly mention some performance consideration in these techniques and I will present some visualizations So networks In the most general sense represent Connections between entities those entities can be people Related by friendship or by professional relationship or computer networks as many of you probably are familiar with Or transportation networks Connecting stations in a city or even biological networks Where the things connected could be proteins or genes with some kind of similarity Myself I forgot to introduce myself I have a degree in computer science and I did my PhD in physics right now I work as a Marikiu fellow in the Alexander Fleming Research Institute in Athens mostly using these tools to study biological networks In the language of computer science and mathematics any kind of network can be represented by an object called the graph Which is completely determined by two sets one is a set of vertices or the things that are Connected to each other and the other set is a set of the connections or edges Just for clarification I will be talking about undirected and unweighted graphs From now on As a very trivial example This is one simple network or graph. There is three nodes labeled one two three and Three edges the three lines connecting them from one to two from two to three and from two to one Usually the graphs are most easily represented as a set of points connected by lines in 2d and Here is the representation for this case Where I have chosen the positions of these points randomly in this case It doesn't really matter because any way I choose them. It will be a triangle Maybe less symmetric one But this is just a very simple case if we want to go to a graph with four vertices and six edges It would look again random Positioning to would look something like that Here's a graph with five Vertices here's a graph with ten vertices. So you see as the network or graph gets bigger Things become more complicated. It's kind of harder to distinguish what is connected to what and what is the structure there um Here are two Layouts of two different graphs They have roughly the same amount of points in one case one hundred twenty four in the other one hundred twenty three different number of edges but Here's a random layout of each one of them and it's Very messy and it's almost impossible to understand What is a structure of these networks, how do they look like? If we choose though the positions the the placements of these vertices in a more intelligent way perhaps We can see that the graph on the right look actually something like looks something like this so it has a very Clear structure where there is few nodes in the center that are highly connected and as you go out um nodes become less and less connected and The graph on the right on the left. I'm sorry look something like this Where again is a very simple structure but completely different from the one on the right in this case There is no special nodes that are highly connected every node is completely equivalent to to every to another one so that is the Point of being able to do good layout is first of all to understand the structure that exists in in a graph and also to be able to compare Different graphs between them these two looked almost identical when in the random layout, but very different When choosing a nice layout So the point of this talk is how can we make these layouts happen this visualizations happen? in general the Criteria of what is a good layout are not strictly defined but It's considered they'll say generally considered good to have a minimum number of edge crossings So lines crossing each other should be low The vertices or nodes should be distributed in space evenly and then a kind of structure or symmetry in the graph should be visible and This is a problem that has been studied In the past even from the late 70s initially in the context of Laying out the components of VLSI circuits. So The nodes in this case were components in the VLSI circuit and the connections between them were the edges and They were trying to find an optimum layout for these circuits and Later on it was refined and a lot of the techniques I will be talking about Using physical or physics physical models of physics to visualize graphs is based on the work of these people here so Now we go to another chapter Which is to look a little bit at what happens in in nature in In some physical systems It's often the case that we see Structures in nature of high symmetry and high elegance, but at the same time high complexity Just like for example in snowflakes Where we can see the The simplicity as well as the complexity in them so Things like that appear not only in this case, but for example In bubbles you might have seen it in a soap or a bottle of beer or a bottle of milk this kind of 3d structures that form spontaneously naturally and Create this aesthetically pleasing and symmetric result in many cases and similarly in the structure of molecules in 3d space the arrangement of The atoms is not random. It follows. It gives a very cool and Easy to understand picture of how things are connected so this Patterns appear in many cases. I said in many scales as well like the molecules and the snowflakes and the bottle of beer have very different scales and The reason is that there is a common underlying principle um governing this behavior Which is generally that any physical system tends to find a Point of minimum potential energy so we can define the potential energy of a system a physical system and The force is acting on the system will always push it to a State of equilibrium that is in the minimum of this potential energy So in analogy to a ball that is rolling down a hill the ball will always try to go to the bottom because it tries to minimize a potential energy from gravity So these are the Points that the physical system will stabilize on and this is the configurations that will give these symmetric and beautiful patterns that we observe so we would like to Kind of take advantage of this principle and applied for the graphs for the networks so we can Lead the graph in a state like the snowflakes or like the Molecules that I showed before So how do we do this? this is the Point where we go from an abstract Construction theoretical construction, which is the graph with two sets one of vertices in one of edges and we make it into a physical system So let's say we have this simple graph We now consider the nodes to be spheres or point particles rather and They carry charge the same charge actually positive all of them so the Equal charges repel each other and Whenever we have a connection between two of these point particles, we consider that there is a spring Between them so now we have moved from the situation of having this graph to a situation of having a physical system of charged particles connected by springs whenever there is a connection between them and you can imagine that we can let This physical system evolve or try to find its Minimum potential energy state and See what kind of layout we will get from that Yeah, so that's the goal, but now doing this for the for the graph having this physical properties Charges and springs between the nodes in this case though the shape of the Energy is not so simple. It's not just a one variable thing, but rather It's a complicated energy landscape something like this Because there's many degrees of freedom. So the position of each of the nodes and this has two coordinates for its node So if we have V nodes This has a dimensionality of 2 to the power of V. So even for 10 nodes, this has a dimensionality of 1000 to roughly 2 to the 10 So it's a very large space to explore and try to find this minimum point Just some comments about the forces that are acting between the Nodes here and this is the only equation that I will show You might know that the electrical forces between charges depend on the distance between the charges and they depend Like the inverse of the square of the distance and the attractive force between Two ends of a spring Depends linearly on the on the distance of the spring That's the physical reality. That's the laws We know from Coulomb force and Hooke's law for electric charges and springs, but Here we are free to modify them in order to Have results That are maybe better so in this case, for example, we Can choose the exponent in the electric force which is the repulsive fr to be a general thing p equals 2 in nature But we can choose another value and choose one or something else and also the attractive force f a between the ends of the spring to be Proportional to the distance squared Just because this kind of mixture gives better layouts Also, and that's important We can modify the dynamics of the Of the physical system so in nature the Masses would obey Newton's law. So a force would result in an acceleration Which has the effect actually of oscillations so in Case like this here when the ball starts rolling It will reach the bottom, but it will not stop there. It will go to the other side and back again and so on In an ideal situation without friction. We would like the Our physical system to go to the State of Lorentz and stop there so instead of using Newton's law which Says that the force results in an acceleration therefore a difference in velocity we Modify that and the force results in a change in position instead of a change in velocity All I want to say is that we can engineer the forces and the dynamics We are still we're inspired by the physical system, but we can engineer it to be more appropriate for what we want to achieve So let's look at an example about how this works. So this is a graph That we will use All of you have seen it. Maybe didn't think about it as a graph But it is actually a graph and these are the nodes on it And it has 19 Nodes and the lines are the connections. So it has 39 of them and We will try we'll do what I said before we will consider the nodes to be particles with mass It's carrying the same charge. So They are being repelled pushed away from each other and the lines are spring. So Whenever the there is a connection The nodes on the ends of the spring are held together we will start with a random layout just like I showed before and See where this evolution of the physical system takes us so Here is the random positions This is the same graph. You cannot recognize it but it's the same graph in With vertices placed in random positions On the left side, there are some plots that I will explain later But let's see what happens when we interactively simulate The physical system that I described before with charges and springs and see how it goes Towards the configuration of minimum energy So here there is some forces playing out Whenever there is a Edge things are kept together whenever but all the vertices push each other away At the same time because of the same charge as they carry you see that as time goes by the system stabilizes and You can almost see that it has some physicality due to this in its motion due to these physical properties that we gave it and it gradually finds Configuration of minimum energy on the yellow plot on the left is the energy Per node in the system. So you see that it is dropping as we would expect and The blue is the average movement of the graph with each iteration So as time goes by it moves less and less now this is the same as the rocket doesn't look like the rocket anymore to me it looks more like this Oceanic Sunfish, but the topology of the graph is exactly the same and it's actually a pretty good layout Of course the artist wanted to make a rocket. So he took the Sides of this graph to be vertical but this actually is a good layout given that it Distributes the nodes evenly in space Let's see some more examples about how this Technique works So here is another graph that we don't know what it looks like we just have Information about the vertices and the edges and we choose a random placement and then let it evolve as a physical system So you see a gain forces acting between the nodes connected one stay close energy is dropping and The system gradually stabilizes and kind of spreads or unfolds as Time goes by it moves less and less and Here we have a more or less stable State there's still some minor movement, but this will stop and This is the graph that I showed before that's how That's what was our goal for that graph and that's how we can reach it by doing this physical system simulation Here's another example of a different graph again one that we've seen before Is the circular one? so you see the Connected nodes stay connected because of the springs stay close and the electrical forces push Everything away from everything else and they are opening up The graph giving us a circular layout, okay, I Have one more These are all different types of graphs here is one that has Neighborhoods basically very connected areas That everything is connected to everything else inside, but only loosely connected to the rest of the Areas of the graph so You see there's all sorts of different structures that were impossible to See from without choosing a good layout and And this is something that we also cannot do manually given that sometimes the graphs are very large so this is an automated way to Showing us revealing us basically the structure of a network or of a graph Okay, this is a good story, but What about the performance here? So if let's say we call in the total number of vertices in this graph then for each of the Nodes we have to compute the and and forces basically from all the other ones and we have to do that for each of the nodes so n times so Overall we have a number of calculations that is roughly in the order of n square That's what this notation with the red means and it's read because that's not a very good Performance meaning that this it doesn't scale very well. So if let's say we Multiply the side we have a graph that is ten times Preview size the number of calculations will be a hundred times more because of this square so there is a Scaling that is very quickly going out of control and is impossible to to handle computationally. It's If let's say the graph gets a hundred times bigger the time will need would be ten thousand times bigger and so on would prefer to have a More mild scaling like this green curve where we can increase the size of the graph but not increase the time it takes so vastly and Likely there is ways to do that and This can happen with Basically not computing the force from all the other nodes that the graph has But rather making an approximation for it. So we do this by Partitioning the space in squares and in this case for example, we are looking at At the bottom left. There is a yellow node. We're looking to calculate. Let's say the force on this particular node What does this node see? So it sees its square in this picture as being one node So the big squares that you might that you see here. Let's say at the top right contain many nodes But we are combining all of them In the center of gravity of this square, which is a blue Dot and we calculate only one force coming from that blue point So this is equivalent. Let's say to When a car is far away You see one light as the car is approaching then you start to see that actually two lights Or if you see a city from very far away from space or from a plane it looks like a dot But only when you go close you see the details and the different Lights that make up this one light from far away So what happens is in this approximation is that nodes that are far away from the yellow one in this case in the bottom left Are treated as one And so instead of having to calculate Forces from all the nodes we only have to calculate as many forces as there are boxes here So there is much fewer boxes than nodes in the graph and this can give us a Very good approximation of the total force and also the green scaling Which means it can be computationally tractable for big graphs Okay, so that's good. We can be faster in In our computation. We are not constrained by this bad and square scaling So let's go to some bigger graphs now. We have 200 nodes here and let's see what's happening So this is basically a big circular graph bigger than before Let's see what happens as Before the Physical system is trying to go to the configuration of absolute minimum potential energy, which is the circle But we see that there is some nodes and twists that have happened there and the system slowly is untangling those but It is very slow at the end and a lot of times it just stays In a configuration that is not the absolute All the total minimum is a local minimum as we say so Let's see it in another example that is Even bigger this is a Graph with almost a thousand nodes we see that Locally The layout is good. So we can understand that there is some kind of surface there and Some kind of grid structure But globally it's not so good. So there is these twists and folds that we would like to To see untangled in order to understand The structure of this graph better So why is this happening here? It's and why it's so slow to untwist those Folds the reason is that there is many Nodes in these graphs and in order to untwist them or unfold them all of them we're moving all of them and For example in a case like this many many nodes have to cross one side and go to the other in order for a twist to become level So that's why it's so slow and that's why we end up with some suboptimal layouts In this case. So what we would like In order to be able to visualize even bigger graphs like this is to be able to not only move the nodes The graph sorry node by node But to be able to move whole regions of the node and Then go into a deeper level of detail gradually Up until the point that we move one of its of these nodes individually So I will describe a little bit schematically how this can be done I will not go very deep into the detail, but let's look at the Example that I showed before This is of course a small graph. We already So it laid out but just to Show how we can Create let's say a rough version of the graph Lay out these rough features first and then move progressively to More detail. So in this case, I Don't want to deal with all the nodes because there are many and I have this problem of Nodes and local minima that I mentioned before So I will choose only some of these nodes So let's say I choose the green one and then I forget about all its neighbors I forget about the white one the white ones Then I choose another one the other green one and I forget about its neighbors Somehow I don't forget about them. I just put them all together with the green So all the white ones are represented by some green node I don't have to deal with them at this stage and I continue this process so I choose another Green and I combine it with the white that are connected to it and So on until I complete all the nodes of the graph and So now remember I only look at the green ones. So I have a structure that looks like this For the more complex graph that I saw before so I will do the layout in this We can do the layout in this graph Which is simpler and will not have all these nodes and folds and then we can add Further level of detail by adding the neighbors that we removed and so on and this actually can be done recursively so I can even simplify This graph into just two nodes if I want it of course, this is already a Skeleton of the original graph but in very very big graphs we can Do this process many times so the idea again is that we are laying out The rough parts of the graph then we go inside the rough parts We lay them out separately and that continues until we are finished with the whole graph just As some visualizations of what we can do using this technique here is how The previous example that I saw that was full of twist and so on looks like When we do this modular or multi-level Laying out and we can even do bigger ones like this with more than 4,000 more nodes and more than 12,000 edges and See some interesting structure inside or like this or like this or like this and We can basically Achieve good layouts efficiently for very large graphs that is quite often that are quite often encountered in many scientific problems and understand the structure and the Connections between all these pieces that are inside and With this I would like to thank you and And answer any questions you might have. Hi Have you thought of modeling Directed graphs like when you have information flow from one person to another? I Have not done this So in this case perhaps you could imagine that the force is going from one but not From one node with the other but not back Which this is also a quite radical modification of the physical law, but it would be worth trying it But I have not done it Thanks for a talk Did you try to Look at the features of such beautiful graphs. I mean making some min cut or Subtrees And some graphs some some features of the graphs which can show that that graph will be Beautiful and that one will be ugly. Oh, you mean before the Layer before the visualization before the visualization. Yeah, one kind of Processing that we have done is clustering sometimes before so That can give you an idea of Some kind of structure if it exists and also can help you with the layout because it will Give good initial positions. Let's say to the to the to the nodes But That's what thanks Yeah, thanks for your talk. I recently did some Simulations on a non-linear Oscillatory networks, so I have the nodes are oscillators and they have a random initial frequency And when I evolve the system they tend to Several nodes tend to synchronize so they take on the Frequency of their neighbors and in the end I have clustering so I have a lot of nodes that Preach the same frequency until I have maybe a cluster when every node is Oscillating on the same frequency. It's based on the work of professor chromoto. I'm not sure if you have it oven Did you use your kind? I is it? Do you think it's possible to use your techniques on this kind of simulations? Have you ever heard of this? I'm not familiar with his work that you are mentioning To me just a Hearing about it now seems like a Resonance situation that you have with Different frequencies that coupled Yeah, coupled oscillators in this In the system that I can see connections between there is you know coupled Oscillators here with the spring as well Even though okay, as I said the forces and dynamics are modified in this case But yeah, it would be interesting to explore the connections right now I okay I Don't know if In your case the same treatment applies because here we're dealing with forces. I think maybe in your case is a more algebraic problem of the I Coupling matrices in the yes in the graph. Yeah But maybe there is some analogies are there any questions other questions from the internet Okay, so I close to talk very thank you very much and big applause, please