Learning to Lie with Sheaves
Posted by Emily Riehl
guest post by Sean O’Connor and Ana Luiza Tenorio
Social networks are frequently represented by graphs: each agent/person is a vertex and the interactions between pairs of individuals are the edges. A starting point to think about the evolution of opinions over time is to associate to each vertex a real number that represents the agreement of to respect a certain topic. For instance, fix the topic “category theory is cool”. In a social network of mathematicians, we will have some high positive representing a strong agreement with this assertion, some high negative for a strong disagreement, and some neutral opinions. Those mathematicians interact and may change their original opinion. What is the group’s opinion about category theory after a period of time? Clearly, eventually, everyone will agree that category theory is cool. Jokes (or not) aside, a standard way to try to answer this is to study the dynamical system generated by the heat equation
where and is the graph Laplacian, a matrix that represents a graph defined by the difference , with the degree matrix and the adjacency matrix of the graph. In this approach, originally proposed in Towards a mathematical theory of influence and attitude change, we study the evolution of opinion distributions without considering that expressed opinions may be different from personal opinions. In the paper Opinion Dynamics on Discourse Sheaves, Jakob Hansen and Robert Ghrist introduced a functor that addresses this distinction, and leads to a flexible model. We briefly present it here.
Opinion Dynamics on Cellular Sheaves
Consider a poset category using the structure of a given undirected graph. The objects are the vertices/agents and the edges/interactions , while the morphisms are the unique arrows induced by the incidence pair , that is, when is an endpoint of . The incident pair provides a partial order relation by if and only if or is a vertex incident to an edge . Then the discourse sheaf is a functor defined by specifying the associated data as follows
In the objects:
- is the space of opinions (the private opinions), for each vertex ;
- is the space of discourse (the public opinions), for each edge .
In the morphism:
- linear maps, for each incident pair .
Remark: The base of the space of opinions is formed by the topics that the agent has an opinion on and talks about. Given , the base of the space of discourse is formed by common topics which the two agents and may talk about. The bases of , , and do not have to be equal.
More generally, replacing by any other category and by any cell category — a poset category where the faces of a cell complex induce the order relation — we have a cellular sheaf. For a reader familiar with sheaves on topological spaces, cellular sheaves may not look like a sheaf at all, but in Sheaves, Cosheaves, and Applications (at II.4), Justin Curry gives a detailed description of how to construct a categorical equivalence between cellular sheaves and sheaves on topological spaces — with an Erratum of one of the arguments. Such equivalence motivates the reuse of standard sheaf theory terminology. For instance, the vector spaces and are called stalks and the linear maps are the restriction maps.
Now, choose an orientation and consider the linear map defined by In the general context of cellular sheaf cohomology, the domain and contra-domain of the cochain complex are, respectively, -cochains and -cochains. We do not have other -cochains because they are related to the -cell structure. Then we only have the -cohomology given by but this already is highly expressive for the model: given an opinion distribution the linear map calculates the signed difference between the expressed opinions of agents and . In other words, the cohomology detects how far the social network is to achieve an apparent consensus.
We also use the cochain complex to define the sheaf Laplacian by , which actually generalizes the graph Laplacian. When is the constant sheaf , with stalks and identity maps, is the transpose of the incidence matrix of the graph (so ).
Thus, the idea is to study the dynamical system generated by an equation similar to the first one we presented but replacing the graph Laplacian by the sheaf Laplacian and by The first result we have is:
Solutions to converge to the orthogonal projection of onto , as .
Here we highlight two points regarding the above theorem:
The proof only relies on techniques from linear algebra and calculus; no advanced knowledge in category theory or homological theory is required to study the dynamics. This is true for all the proofs in the paper;
The interpretation of this result is that the social network eventually arrives at the apparent consensus (with properties of the sheaf Laplacian influencing the rate of convergence).
Example: If is the constant sheaf , then the base of topics is the same for every agent , all the restriction maps are identities, and so all agents are expressing their true opinion. Therefore, opinion dynamics by the analyses of may be seen as a particular case of opinion dynamics on sheaves.
Note that in the case of the constant sheaf , we get that the private opinions of all agents in communication will converge to the same value, which is not as intriguing (or realistic) of a result as might have been hoped. So using cellular sheaves to model a social network and using the sheaf Laplacian to evolve the opinions of each agent over time is quite interesting, but by itself unfortunately limited considering what we presented so far. In the following, we summarize how Jakob Hansen and Robert Ghrist modify this framework by not only evolving the private opinions of each agent over time, but also the expressions of opinions of each agent (in the form of the restriction maps).
Learning to Lie
As a simple example of this idea, we can keep the private opinions of each agent fixed while allowing the restriction maps to vary with time. Here we model the change in the restriction maps by The result is that over time each agent modifies each of their expressed opinions to minimize disagreement with their neighbors. However, one interesting behavior that emerges from this system is that agents can “learn to lie” in the sense that their restriction maps change to instead express the opposite of the private opinion they hold. In other words, negative real numbers in the matrix that represents the restriction maps witness what we call a lie, while non-negative real numbers in the matrix witness an exaggeration or a reduction of the personal opinion.
This emergent behavior is more realistic than having all agents’ private opinions reach a consensus, but this comes at the cost of all the private opinions being kept fixed. Thankfully, we can actually vary both the restriction maps and the private opinions of each agent with time!
Indeed, defining a differential equation where both and hold gives us exactly this model! This has the pleasant corollary that by setting or we can recover the cases where the restriction maps or the private opinions are kept fixed, respectively.
From this, we can observe these joint-dynamical systems where agents will both change their private opinions and how they express their opinions to minimize expressed disagreement. Agents in these models thus learn to exaggerate, soften, or lie about their private opinions depending on the expressed opinions of other agents they are in communication with, while at the same time modifying their own private opinions to minimize overall expressed disagreement.
Finally, one phenomenon that these types of linear models do not capture is how two agents expressing significantly different opinions will cease communication (in the sense that their private opinions will be unaffected by this communication). Note that while this is certainly a mechanism of polarization, the joint-dynamic models can still produce polarization due to the restriction maps not being fixed. In Jakob Hansen and Robert Ghrist’s paper, the solution for this arises by introducing a nonlinear term in the sheaf Laplacian, which can be used to ignore communications where there is significant expressed disagreement. While this does come at the cost of linearity, the cellular sheaf framework is still applicable with minimal changes to the differential equations.
A Simple Simulation
Suppose we have an agent that is not a big fan of category theory, such preference is represented by the value ; another agent appreciates category theory with intensity , and a third one likes it a bit, with . All of them start the communication with each other being totally honest, that is, all restriction maps are represented by . We then simulate the mixed situation where private and public opinion may change, and that the agents are interested in minimizing expressed disagreement. Taking and , we find the following:
Aiming for a better visualization, in the above picture we put the values instead of the vector spaces and to abstractly represent the values in associated with the application of . Note that the two category theory supporters do not lie to each other (they exaggerate or soften their opinion) but they do have to lie to the first agent. On the other hand, the first agent did not have to lie to anyone, they only softened their opinion to achieve the apparent consensus. It is also interesting to note that the agent with the strongest opinion in the beginning was the one forced to “lie more”, the same happened in Example 8.2 of Opinion Dynamics on Discourse Sheaves. One final note is that the communication between the first and last agents has effectively ceased, as both restriction maps are quite close to the zero map, which can be interpreted as the respective agent expressing no opinion whatsoever.
If you want to play with more complicated graphs, test other constants or different initial values, look at Sean’s Python code available in Github.
Conclusion
Cellular sheaves provide a framework to develop opinion dynamics: the calculations are relatively simple, and we obtain a flexible model. We focused on the ability to model agents that learn to lie, but the paper also explores, for instance, when we have agents that never change their (expressed) opinion; which additional hypothesis one should have to control the evolution of the group’s opinion; and the dynamics assuming a “bounded confidence” i.e., when the agents only take into consideration opinions that are similar to their own.
However, there still is much to be developed. The nonlinear case may lead to the study of the discourse sheaf with a contra-domain category different from (for example, the category of lattices). We also may change the category into the domain: since graphs only consider pairwise communication we may want to replace them by hypergraphs to study the multi-body interactions. Note that cellular sheaf theory provides a general setting that allows higher -cells. Such a framework should be useful to discuss simultaneous interactions in larger groups, but would require interpretation for the cohomology in higher degrees. Those are just a few examples of what we have to explore!
Finally, observe that we require just a few category theory notions, which were used to model the problem but the calculations are not from category theory. This is great to call attention to non-category theorists and apply analogous ideas in different contexts, with techniques already known from dynamical systems, for example. Certainly, it will be interesting to follow the next steps of applied cellular sheaf theory.
Re: Learning to Lie with Sheaves
This is extremely interesting. It seems to fit very comfortably with
MR1635735 (99h:92027) Hofbauer, Josef; Sigmund, Karl Evolutionary games and population dynamics,
see perhaps also
https://arxiv.org/abs/1011.0069