sec-graphs-paths-diagrams

0.3 Graphs, paths, and diagrams

A directed graph lists objects and generating arrows but does not yet include all composites. Its path category \(\operatorname {Path}(S)\) freely adds identities and finite paths. This distinction is useful in machine learning: the graph can describe primitive modules, while the path category describes every route that can be built from them.

Definition 0.4 Diagram

A diagram of shape \(J\) in a category \(\mathcal C\) is a functor

\[ D:J\longrightarrow \mathcal C. \]

Informally, \(J\) is the wiring pattern and \(D\) supplies its realization: each formal object receives an object of \(\mathcal C\), and each formal arrow receives a morphism of \(\mathcal C\).

Consider two adapters \(A,B:H\to H\) acting on a hidden-state space. Their two orders form parallel paths

Commutative diagram illustrating 0.3 Graphs, paths, and diagrams.

The paths are parallel because they share a source and target. This makes it meaningful to ask whether they agree. ALLORA does not assume that they do: the order discrepancy is part of the structure being diagnosed.

Definition 0.5 Commutative diagram

A diagram is commutative when every pair of parallel directed paths with the same endpoints has the same composite. For the square

Commutative diagram illustrating 0.3 Graphs, paths, and diagrams.

commutativity means \(v\circ f=f'\circ u\).

The square can express equivariance, simulation, consistency under a data transformation, or agreement between direct and transported prediction. Its meaning comes from the labels and chosen category; its categorical form says that two typed routes are intended to agree.

11. A diagram can be meaningful without commuting. In LINCS, a noncommutative diagram is often the observed candidate, while commutativity is the declared structural promise.

Example 0.6 Bellman consistency in GIRL

Let \(\mathcal V\) be a space of value functions and let \(P^\pi :\mathcal V\to \mathcal V\) be the Markov expectation operator for a policy \(\pi \). With reward function \(R^\pi \), define

\[ B^\pi (V)=R^\pi +\gamma P^\pi V. \]

A parametrized value family \(\widehat V:\Theta \to \mathcal V\) determines parallel maps

\[ \widehat V,\; B^\pi \circ \widehat V: \Theta \rightrightarrows \mathcal V. \]

Bellman consistency declares these maps equal. A sampled temporal-difference residual is a numerical observation of their failure to agree at the sampled state and transition.