Indexed text attachment
topos-actions-in-machine-learning-and-ai.tex
Source for Topos Actions in Machine Learning and Artificial Intelligence
View paper · Download original file
Lines 701–800 of 1207. Source text is displayed literally.
701real scores and probability weights \(\mu(d)\), the risk702is \(\sum_{d}\mu(d)\ell(p,d)\). If703\(\mu(gd)=\mu(d)\), simultaneous invariance of the704loss and reindexing the sum show that this risk is705invariant on \(P\).706 707An update is separate data \(u:P\times D\to P\) in708\(\mathcal C\). Equivariance now says709\(u(gp,gd)=g\,u(p,d)\). With the same invariant finite710sampling law, the law of the next parameter at \(gp\)711is the pushforward along \(g\) of the corresponding law712at \(p\). This follows by replacing the random sample713\(d\) by \(gd\), which has the same law.714For a parameter change \(r:P'\to P\),715the predictor reparametrizes by precomposition. An update716\(u'\) on \(P'\) is compatible if it satisfies717\[718 r\circ u'=u\circ(r\times\mathrm{id}_D).719\]720An isomorphism \(r\) transports the update uniquely by this721equation. The equation is an additional requirement for a722general \(r\), where precomposition alone leaves the result723of the old update in \(P\). For example, the update724\(p\mapsto p+1\) on \(\mathbb R\) has no compatible lift725to the single parameter value \(0\).726 727\subsection{A local-to-global criterion}728 729\begin{theorem}[Descent of layers and updates]730Let \(U\to 1\) be an epimorphism in \(\mathcal C\).731Suppose the objects \(P,X,Y,D\) are given in732\(\mathcal C/U\) with descent isomorphisms satisfying the733cocycle on \(U\times U\times U\). Give the restriction734of the trivial-action score object \(R\) its canonical735descent isomorphism. The local layer, input and target maps,736comparison, and update descend precisely when each map737commutes with the specified descent isomorphisms. The738global diagram is unique up to a unique compatible739isomorphism. The induced local loss descends through740the same comparison maps.741\end{theorem}742 743\begin{proof}744In a Grothendieck topos an epimorphism is effective745descent for objects. To recall the construction, the746transport on \(A\to U\) over \(U\times U\) identifies747\(a\) above \(v\) with its transported element above \(w\).748The unit, inversion, and cocycle define an internal749equivalence relation on \(A\). Its effective quotient750\(Q\) exists. The map \(A\to Q\times U\) is monic751because each transport within one fiber is the identity.752It is epic because locally a representative of each753class can be transported to the specified fiber.754Hence it is an isomorphism. This is the usual descent755calculation using exactness of a topos756\cite{maclane-moerdijk}. A map preserving the transports757preserves the relations and descends by the quotient758property. Pullback along \(U\to1\) is conservative and759faithful, so it detects the required diagrams and their760equations. It also preserves products. Consequently the761local composite defining the loss is the restriction of762the global one.763\end{proof}764 765A useful cover is the regular \(G_B\)-object766\(G_B\to1\) in \(\mathcal C\). The slice767\(\mathcal C/G_B\) is equivalent to \(\mathcal D\): take768the fiber of an equivariant object over the identity.769The inverse sends \(A\) to \(G_B\times A\) over \(G_B\)770with left translation on the first factor. For an771element \(a\) of an equivariant object \(q:Q\to G_B\),772the inverse to this product presentation is773\((q(a),q(a)^{-1}a)\). Thus ordinary local data774over the regular cover can encode equivariant global775data, with the action recovered from the overlap776transports. To descend a local parameter choice, treat777it as a morphism from the terminal object of778\(\mathcal C/U\). The same compatibility condition779then tests whether it gives a global section of \(P\).780 781\subsection{Coordinate compatibility of gradient updates}782 783The update equation also applies to the Riemannian rules784of Section~\ref{sec:categorical-ml}. If the parameter785transition carries the parameter metric and loss, it786transports the gradient and the geodesics used for a787discrete step \cite{lee-riemannian}. Using a new metric788without transporting it can change the update even789when the predictions and losses agree.790 791For example, let \(q=2p\) and \(\ell(p)=p^2/2\).792The unit metric in \(p\) transports to793\(\tfrac14\,dq^2\), giving gradient component \(q\).794Independently choosing the unit metric in \(q\) gives795component \(q/4\) for the same loss \(q^2/8\).796Thus the descent test for an optimizer concerns both797its prediction and its optimization data. For a798stateful optimizer the state and its transport can be799included in the updated parameter object, with the800same comparison condition on the enlarged update.