Jekyll2021-04-16T09:02:53-04:00https://hans-riess.github.io/feed.xmlHans Riesspersonal descriptionHans Riesshmr@seas.upenn.eduAn Economical Guide to Galois Connections via meta-Preferences2021-04-09T00:00:00-04:002021-04-09T00:00:00-04:00https://hans-riess.github.io/galois-connections<h1 id="an-economical-guide-to-galois-connections-via-meta-preferences">An Economical Guide to Galois Connections via meta-Preferences</h1>
<p>Of course, I half-heartedly apologize for the double entendre, but <em>really</em> it is my hope that this post will be both a relatively cheap introduction to Galois connections and be of help, especially, to economists.</p>
<h3 id="preference-relations">Preference Relations</h3>
<p>Nobel Memorial laureate Paul Samuelson is quoted that “economics is a choice between <em>alternatives</em> <em>all the time</em>.” As a mathematician I might caricature the entire field of economics—hopefully not to the offense of actual economists—as the <strong>study of dynamical systems supported on spaces of choices.</strong> Mathematically (again doing disservice to those who actually study dynamics), a dynamical system is a set of states with maybe a map specifying how to get to the next state. A <strong>choice space</strong> is a set of <strong>alternatives</strong> (that is, things to choose from) $X$ and a collection of feasible sets $D(X) \subseteq 2^X$ where $2^X$ is the powerset (or, set of all subsets) of $X$.</p>
<p>A choice function $C: D(X) \to 2^X$ assigns to a feasible set $A$ , one or more choices $C(A) \subseteq A$ . Under certain assumptions—such as that $D(X)$ being <em>down-closed</em> (meaning if $A \in D(X)$ and $B \subseteq A$ , then $B$ in $D(X)$)—we can say $C$ is a map $C: D(X) \to D(X)$.</p>
<p>A <strong>preference profile</strong> is a set of alternatives $X$ with a binary relation $R \subseteq X \times X$. It is convenient to interpret preferences as either <em>strong</em> (often denoted $P$) or <em>weak</em> (often denoted $W$). For example, $x~W~y$ might mean that $x$ is at least as good as $y$. A strong relation $x~P~y$ might mean that $x$ (strongly) preferred over $y$. (We can write either $(x,y) \in R$ or $x~R~y$ depending on context.)</p>
<p>Given a choice space $(X, D(X))$ and choice function $C: D(X) \to D(X)$ we can construct a natural weak preference: we say that $a~W~b$ (<em>$a$ is weakly preferred to $b$</em>) if there is a feasible set $A \in D(X)$ such that $a \in C(A)$ and $b \in A$. Likewise, there is a natural strict preference: $a~P~b$ (<em>$a$ is strictly preferred to $b$</em>) if there is a feasible set $A \in D(X)$ such that $a \in C(A)$ and $b \in A \setminus C(A)$. Conversely, given a weak (or strict) preference $W \in X \times X$ , we can construct an “optimal” choice function,
\(C(A) = \{a \in A~\vert~\forall~b \in A,~a~W~b \}.\)
Note, however, an assignment of a choice function to a preference profile is not unique. One takeaway is that it is fruitful to think about preferences both as relations and as choice functions.</p>
<p>Economists are known to put requirements on what properties relations ought to—morally or empirically—satisfy. Here are some examples:</p>
<ol>
<li>Reflexivity: $(x,x) \in R$ .</li>
<li>Anti-symmetry: if $(x,y) \in R$ and $(y,x) \in R$, then $x = y$.</li>
<li>Transitivity: $(x,y) \in R,~(y,z) \in R~\Rightarrow~(x,z) \in R$.</li>
<li>Symmetry: if $(x,y) \in R$, then $(y,x) \in R$.</li>
<li>Comparability: (or <em>completeness</em> to economists): for all $x, y \in X$ with $x \neq y$, $(x,y) \in R$ or $(y,x) \in R$.</li>
</ol>
<p>Mathematicians, in their disparate idiosyncrasies, have special names for relations satisfying any number of these properties:</p>
<ul>
<li>A <em>poset</em> or partially-ordered set satisfies 1, 2, & 3.</li>
<li>A <em>total order</em> satisfies 2, 5, & 3.</li>
<li>A <em>preorder</em> satisfies 1 & 3.</li>
<li>An <em>equivalence relation</em> satisfies 1, 4, & 3.</li>
</ul>
<p>Of all possible relations, a <em>preorder</em> might actually the most sensible to model <em>weak</em> human preferences. Recall, a preorder satisfies (i) reflexivity and (ii) transitivity. Reflexivity embodies the notion of a weak preference as opposed to a strong preference; it is not so important in it’s own right</p>
<p>Transitivity is a curious assumption that is nearly ubiquitous in economics. Phycologists and behavioral economists have debated for several decades whether human preferences are intrinsically transitive or rather if the assumption of transitivity is too convenient to abandon. Of note is seminal work (<a href="https://psycnet.apa.org/record/1969-06371-001">Tversky, 1969</a>) that demonstrated conditions under which individuals behave in an intransitive manner; moreover, their behavior is both predictable and consistent. However, even as there has been recent critique of the 1969 paper, there is earlier competing evidence (dissertation of MacCrimmon, 1965) that individuals modify their preferences to be transitive, perhaps an early example in which <em>dynamics on a space meta-preferences play a role at forming preferences.</em> More on meta-preferences later.</p>
<p>A grave economic consequence of intransitive preferences is the so-called <em>money pump</em> phenomenon in which, through a series of exchanges, an individual can <em>rationally</em> obtain the alternative she originally possessed, yet spend a sum of money in exchanging alternatives. Preordered sets are particularly nice from the mathematical perspective because that are equivalent to the notion of <em>thin categories</em> (here, we are referring to the mathematical field of <a href="https://en.wikipedia.org/wiki/Category_theory">Category Theory</a>): transitivity corresponds to composing arrows, reflexivity corresponds to the identity arrow. In some sense, a category is the least restrictive place where it is possible to “do mathematics.” But why not impose the sort additional structure you get from a total order or poset?</p>
<p>Total orders are traditionally more popular among economists, the principle reason being that the requirement of comparability guarantees that there is a (non-unique) utility function $u: X \to \mathbb{R}$ such that $u(x) \geq u(y)$ if and only if $x~W~y$. In essence, the structure of a total order eliminates any careful study of a preference relation: all information is contained in the usual order on the real line.</p>
<p>From a data science perspective, total orders are problematic as well. Preferences truly only exist when they are revealed. This is not ideal for a few reasons. You could ask user to submit a survey of their preferences on a set $n$ different alternatives, but this would require on the order $\sim 2^n$ survey questions. For example, if $n = 40$, then a survey would require the user to vote on the order of 1 trillion times! Even when taking into account the comparability of every pair of alternatives, reflexivity, and transitivity, it is not much better. Another reason, alternatives that are “far” from each other in a relation will, likely, never be compared. What ice cream truck will sell <a href="https://en.wikipedia.org/wiki/Tripe">tripe</a>, after all? Furthermore, alternatives in different categories may never be compared. Imagine going to brunch and deciding between a juicy burger and a stack of blueberry pancakes: what you order for brunch will not have so much to do with your preference of pancakes over burgers, but your preference of breakfast over lunch. We will come back to this example later.</p>
<p>Finally, a word on posets. In a poset, the additional axiom of <em>anti-symmetry</em> may be too stringent to model human preferences. This axiom says that if $x~W~y$ and $y~W~x$, then $x$ and $y$ are equal. It is absurd to regard alternatives about which an agent is indifferent over as <em>equal.</em> This <em>de facto</em> is negating the possibility of indifference. Indifference is notably different that incomparability. That an agents reveals (weak) preference of $x$ over $y$ and vise versa in <em>not</em> equivalent to not revealing any preference at all.</p>
<h3 id="lattices">Lattices</h3>
<p><strong>Lattices</strong> are posets (partially ordered sets) such that for any two elements $x, y \in L$ there are unique elements $x \vee y, x \wedge y \in L$ such that $x \vee y$ is the least upper bound of $x$ and $y$ and $x \wedge y$ is the greatest lower bound; the symbol $\vee$ is called <strong>join</strong>, the symbol $\wedge$ is called <strong>meet</strong>. Often the greatest and least elements of a lattice are written as $\top$ and $\bot$ respectively. There are many familiar examples of lattices: given any set, its powerset forms a lattice with the lattice operations comprising of union ($\cup$) and intersection ($\cap$). There are richer classes of lattices living inside powersets: for example, any subset $L \subseteq 2^X$ is a lattice, or sometimes called a <em>lattice family</em>, if for any $A, B \subseteq L$ there is a smallest (dually greatest) set $A \vee B$ (dually $A \wedge B$) such that $A \vee B \supseteq A, B$ (dually $A \wedge B \subseteq A, B$). Additional examples we can draw from combinatorics, linear algebra, logic, and even topology.</p>
<p><img src="\images\lattice.png" alt="lattice" style="zoom:50%;" /></p>
<p>Lattices apt structures for modeling hierarchies. Furthermore, they are convenient because you can combine lattice elements in two different ways that are dual to one another (whereas, in general you cannot “add” preference relations). Lattices are the right tool for modeling preference that are hierarchical in nature. Now you might be saying, “Wait! You just told me that preorders are the right relation to model human preferences!” Of course you are in the right to complain. But there might be a case that <em>lattices are the canonical structure for modeling meta-preferences</em>.</p>
<p>Put plainly, <strong>meta-preferences</strong> are preferences about preferences. Going back to our example about changing preferences to be transitive: this example suggests that baked in our sense of what our preferences ought to be is that they should be transitive. A meta-preference is in essence a moral code which may govern not only what I want to want for myself, but what I want others to want. So one definition of a <strong>meta-preference profile</strong> is a binary relation on the set $\mathrm{Rel}(X)$ of all binary relations on a set of alternatives $X$; explicitly,
\(Q \subseteq \mathrm{Rel}(X) \times \mathrm{Rel}(X).\)
Another definition of meta-preferences goes back to the brunch example. I may have a preference of Eggs Benedickt over French Toast, and a preference of a Cobb Salad over a Cheeseburger, but I can have a meta-preference of ${ \text{Benedikt, French}}$ over ${ \text{Salad}, \text{Burger} }$. As pointed out earlier, I could have a meta-preference of breakfast over lunch without having a preference of, say French toast over a burger. So a second definition of a <strong>meta-preference profile</strong> is a binary relation on the choice spaces $D(X)$ of a set of alternatives $X$; explicitly,
\(Q \subseteq D(X) \times D(X).\)</p>
<h3 id="galois-connections">Galois Connections</h3>
<p>Historically speaking, it may have been Richard Dedekind who wrote the first paper explicitly on lattices around the turn of the 20th century. However, perhaps the most important construction in lattice theory, the <a href="https://ncatlab.org/nlab/show/Galois+connection"><em>Galois connection</em></a>, was essentially invented by Évariste Galois in 1830. Galois also is often credited at inventing group theory (the abstract study of symmetries) at the same time. Both groups and Galois connections were invented as abstract tools to reason about polynomials.</p>
<p>Consider posets $(P, \leq)$ and $(Q,\sqsubseteq)$. An an order-revering map is a map $\varphi: P \to Q$ such that if $x \leq y$, then $\varphi(X) \sqsupseteq \varphi(y)$. A Galois connection between two posets $(P, \leq)$ and $(Q,\sqsubseteq)$ is a pair $(f_\ast, f^\ast)$ of order-reversing maps,</p>
<p>\(f_\ast: P \leftrightarrows Q: f^\ast\)
such that $f_\ast (p) \sqsupseteq q$ if and only if $f^\ast(q) \geq p$ .</p>
<p>In 1982, a mathematician Rudolph Wille presented a <a href="https://link.springer.com/book/10.1007/978-94-009-7798-3">paper</a>, “Restructuring Lattice Theory: An Approach Based on Hierarchies of Concepts,” connecting Galois connections to binary relations. He is often credited for first “applying lattice theory” because of course binary relations are everywhere (e.g. databases, systems theory, linguistics etc…). Given a binary relation $R \subseteq X \times Y$, Wille constructs a lattice he calls the <strong>concept lattice</strong> describing hierarchies of concepts (i.e. subsets of $X$ or $Y$ ) within a relation.</p>
<p>A concept lattice comes from a Galois connection,
\(R_\ast: 2^X \leftrightarrows 2^T: R^\ast\)
given by $R_\ast(A) = {y \in Y: (x,y) \in R~\text{for all}~x \in A }$ and $R^\ast(B) = {x \in X: (x,y) \in R~\text{for all}~y \in B }$. We can interpret $R_\ast( -)$ as <em>intent</em> and $R^\ast(-)$ as <em>extent</em>. A <strong>concept</strong> is a pair $(A,B)$ where $A$ is a subset of $X$ and $B$ is a subset of $Y$ such that
\(R_\ast(A) = B~\text{if and only if}~A = R^\ast(B)\)
The set of all concepts associated to a relation,
\(\mathrm{Concept}(R) = \{ (A,B): R_\ast(A) = B,~R^\ast(B) = A \}\)
form a lattice (this is non-obvious, something you need to prove) called the <strong>concept lattice</strong>.</p>
<p>Let’s look at an example. Suppose we have a relation, say of NBA basketball players and facts about them, $R \subseteq X \times Y$. We can represent this relation by a table:</p>
<p><img src="\images\nba-table.png" alt="nba-table" style="zoom:48%;" /></p>
<p>Now we may calculate the fixed points $\mathrm{Fix}(R^\ast R_\ast) = {A: R^\ast R_\ast (A) = A }$ which form the concept lattice. (I might have cheated a bit, but you can show that the definition of the concept lattice above is equivalent to $\mathrm{Fix}(R^\ast R_\ast)$.) There are software packages out there to do this somewhat automatically (e.g. the python package <a href="https://github.com/xflr6/concepts">concepts</a>). We obtain the following concept lattice:</p>
<p><img src="\images\nba-concepts-obj.svg" style="zoom: 150%;" /></p>
<p>How do we interpret this lattice? If we take the meet ($\wedge$) of, say $A$ and $B$, this is equivalent to taking the union of rows A and B (why union, not intersection?…because the $R^\ast$, $R_\ast$ maps are order-reversing). If we take the join ($\vee$) of A and B, this is equivalent to take the intersection of rows A and B which corresponds to the attribute “forward” i.e. the concept Antetokounmpo, Butler and Durrant.</p>
<p>Now, back to preference relations. As we have seen earlier, a choice function $C: D(X) \to 2^X$ begets a unique weak preference relation. In a similar vein, any preference relation $W \subseteq X \times X$ begets a <em>unique meta-preference relation</em>, $\mathrm{Concept}(W)$ which is a <em>lattice</em> that can be viewed also as a binary relation $\mathrm{Concept}(W) \subseteq 2^X \times 2^X$. This is significant because we have put a <em>lattice structure on meta-preferences</em>. In particular, individuals can exchange meta-preferences to find their meet or join i.e. their <em>least common denominator</em>–what they have in common–or form a <em>compromise</em>–the effective feasible sum of their meta-preferences.</p>
<p>So maybe this is the very beginning of a argument that <em>lattices are the canonical structure for modeling meta-preferences</em>.</p>Hans Riesshmr@seas.upenn.eduAn Economical Guide to Galois Connections via meta-PreferencesMonads on a Poset2020-04-20T00:00:00-04:002020-04-20T00:00:00-04:00https://hans-riess.github.io/monads-on-a-poset<p>In this post, I will briefly describe a pleasant observation I made this morning about monads on a poset, that is, a partially ordered set. In order to get there, I will have to say what exactly are <em>monads</em> and <em>posets.</em></p>
<p>Monads are curious objects. I recently came across them while preparing a talk about the first few sections of Peter May’s “Geometry of Infinite Loops Spaces.” In that paper, he defines a new structure called an operad which is essentially a way to formalize tree-like compositions of maps, $f: X^{\otimes n} \rightarrow X$, for different $n$ in a some monoidal category (if you don’t know what that is, think of $(\mathsf{Vect}, \otimes, \mathbf{0})$, the category of vector spaces, with the tensor product and the zero vector space). Anyways, in May’s paper, he describes a 1-to-1 correspondence between <em>algebras over an operad</em> and <em>algebras over monads</em>. That correspondence isn’t important here, but it is important to note that monads, for some reason, seems to creep up everywhere. I don’t think they are well known amongst applied people who use a lot of fancy algebra like myself. Personally, I hadn’t been exposed to them even after a few years of reading some heavy-categorical papers in applied algebraic topology, lattice theory etc. Monads seem, however, to be fairly commonplace in certain theoretical computer science communities especially those Haskell-ites. You know who you are.</p>
<p>A poset, say $P$, is set with a <em>anti-symmetric, reflexitive,</em> and <em>transitive</em> binary relation, $\preceq$. Sometimes it is easier to view a poset not as a set but as a category, $\mathsf{P}$. The objects of this category are the elements of $P$. Morphisms? Given $x, y \in \mathsf{P}$,</p>
\[\mathrm{Hom}_{\mathsf{P}}(x,y) =
\begin{cases}
\ast & x \preceq y \\
\emptyset & \text{otherwise}
\end{cases}\]
<p>This is kind of nice, because if you consider a functor,</p>
\[F: \mathsf{P} \rightarrow \mathsf{Q}\]
<p>this is just saying that $F$ is an <em>order-preserving</em> or <em>monotone maps</em> from poset $P$ to poset $Q$. It is particularly nice, when you consider an adjunction between posets,</p>
\[F \vdash G: \mathsf{P} \longleftrightarrow \mathsf{Q}\]
<p>This means, that</p>
\[\mathrm{Hom}_{\mathsf{Q}} \left(F x, y \right) \cong \mathrm{Hom}_{\mathsf{P}}\left(x, G y \right)\]
<p>But this is just,</p>
\[\begin{align}
F(x) \preceq y && \text{iff}&&&x \preceq G(y)
\end{align}\]
<p>since every arrow in a poset category is either a singleton or empty. This is called a <em>Galois connection</em> in the order theory literature, but really, it is just an adjunction. From an adjunction, we obtain two natural transformations, called the <em>unit</em>,</p>
\[\eta: 1_{\mathsf{P}} \Rightarrow G F\]
<p>and <em>counit</em>,</p>
<p>\(\varepsilon: FG \Rightarrow 1_{\mathsf{Q}}\)
These are constructed by essentially replacing $y$ with $F x$ or replacing $x$ with $G y$ in the Hom-set definition of an adjunction and a little bit of work.</p>
<p>Okay. So what is a monad? Well, we already have an example, the functor $G F: \mathsf{P} \rightarrow \mathsf{P}$. Of course, we could have replaced $\mathsf{P}$ with any category and $F \vdash G$ with any adjunction. Here is the definition: a <em>monad</em> is a triple $(T, \mu, \eta)$ where $T$ is an endofunctor $T: \mathsf{C} \rightarrow \mathsf{C}$ , $\mu$ is a natural transformation, $\mu: T \circ T \Rightarrow T$, and $\eta$ is a natural transformation, $\eta: 1_{\mathsf{P}} \Rightarrow T$, such that $(T, \mu, \eta)$ satisfy a number of commutative diagrams describing an associativity property of $\mu$ and an identity property of $\eta$.</p>
<p><strong><em><u>Proposition</u>:</em></strong> Any adjunction $F \vdash G: \mathsf{C} \rightarrow \mathsf{D}$ gives rise to a monad $(G F, \eta, \mu)$.</p>
<p><em>Proof</em>. $G F: \mathsf{C} \rightarrow \mathsf{C}$ is an endofunctor. The unit of the adjunction, $\eta: 1_{\mathsf{P}} \Rightarrow G F$, is also the unit of the monad. Let $\varepsilon$ bet the counit of the adjunction. Then, define $\mu$ as follows,</p>
\[\mu : G F G F \Rightarrow GF\]
\[\mu: GFGF x \mapsto G \circ \varepsilon FG (F x) = GF x\]
<p>$\blacksquare$</p>
<p>What, then, is a monad on a poset $\mathsf{P}$? It is an endofunctor, $T: \mathsf{P} \rightarrow \mathsf{P}$, with natural transformations, $\eta: 1_{\mathsf{P}} \Rightarrow T$ and $\mu: T \circ T \Rightarrow T$. Being a functor implies $T$ is an monotone map on $P$. The transformation $\eta$ implies that $T$ is <em>inflationary</em>, that is, $T(x) \succeq x$. Finally, any such transformation $\mu$ implies there is a map</p>
\[T T x \xrightarrow{\mu} Tx\]
<p>which means that $T^2(x) \preceq T(x)$. However, $T(x) \preceq T(x’)$ and $T(x) \succeq x$ implies that $T^2(x) \preceq x$. This implies that $T^2(x) = T(x)$, or $T^2 = T$. That is, $T$ is <em>idempotent</em>! Hence, we have a proposition.</p>
<p><strong><em><u>Proposition:</u></em></strong> A monad $(T, \mu, \eta)$ on a poset $\mathsf{P}$ is that same as a monotone, inflationary, idempotent map, $T: P \rightarrow P$.</p>
<p>Together with our proposition about constructing a monad from an adunction, we have the following corollary, whose proof is now trivial.</p>
<p><strong><em><u>Corollary:</u></em></strong> Let $(F, G): P \longleftrightarrow Q$ be a Galois connection between posets $P$ and $Q$. Then, the following identities hold:</p>
<ul>
<li>For all $x \in P$ and $y \in Q$,</li>
</ul>
\[\begin{align}
G F (x) \succeq x && \text{and} && F G (y) \preceq y
\end{align}\]
<ul>
<li>$G F GF = GF$. Furthermore, by considering the dual poset, $P^{\mathrm{op}}$, which is just <em>reversing the arrows</em> and the corresponding Galois connection, $G^{\mathrm{op}} \vdash F^{\mathrm{op}}: Q^{\mathrm{op}} \leftrightarrow P^{\mathrm{op}}$, we have, by this dually, $FG FG = FG$.</li>
</ul>
<p>These are the two most important identities for a Galois connection in order theory. Yet, if we view a Galois connection from a categorical lens, this result is completely formal. I thought this observation was worth sharing and I hope you did too. Until next time.</p>Hans Riesshmr@seas.upenn.eduIn this post, I will briefly describe a pleasant observation I made this morning about monads on a poset, that is, a partially ordered set. In order to get there, I will have to say what exactly are monads and posets.