sec-composing-uocl-learners
6.7 Composing UOCL learners
An infant does not identify one compositional world through one homogeneous stream. Visual tracking, speech, manipulation, navigation, and social interaction each induce a partial learner with its own presentation and query doctrine. Development depends on their combination: a heard noun is aligned with a seen object; grasping tests visual solidity; another person’s gaze selects both a spatial target and a linguistic referent. UOCL should therefore compose learners, not merely compose the hypotheses produced by one learner.
Fong, Spivak, and Tuyéras provide the useful prototype. Their supervised learner from \(A\) to \(B\) is a tuple \((P,I,U,r)\): a parameter space, implementation, update, and request map. Equivalence classes of such learners form a symmetric monoidal category, so systems can be connected sequentially or placed in parallel [ Fong et al. , 2019 ] . The request map is essential: it translates a desired downstream correction into information that an upstream learner can use.
For UOCL the interfaces and internal state must be categorified. Write a categorical learning interface as
consisting of a typed presentation protocol, a query doctrine, and its observational equivalence. The following definition is deliberately strict; the coherent weakening follows immediately afterward.
An open UOCL learner \(L:\mathbb A\rightsquigarrow \mathbb B\) is a tuple
where:
\(\mathcal H_L\) is an indexed category of internal hypotheses and residual version fibers over \(\mathbf{Pres}_A\);
\(I_L\) implements a current hypothesis on an \(A\)-presentation as a partial \(B\)-declaration with warranted query answers;
\(U_L\) is a typed UOCL update, returning an admissible comparison map after new \(B\)-evidence or a registered defect; and
\(R_L\) translates a downstream \(B\)-probe, contradiction, or unfilled obligation into an admissible upstream \(A\)-probe or repair obligation.
Two open learners are equivalent when an indexed equivalence of their hypothesis categories intertwines \(I,U,R\) and preserves their declared query equivalences.
Thus \(\mathcal H_L\), rather than a set \(P\), is the learner’s internal state space. The implementation is a categorical declaration rather than only a function \(A\to B\). Update may assimilate or accommodate. Most importantly, \(R_L\) generalizes the request function: it carries a failure of fit backward through a composite without reducing that failure to a numerical gradient.
Suppose the admitted indexed hypothesis categories have chosen products, reindexing preserves them, and the class of realizers is closed under typed wiring. Then categorical learning interfaces and equivalence classes of open UOCL learners form a category \(\mathbf{UOCL}_{\mathrm{str}}\). Pointwise parallel composition equips it with a symmetric monoidal product.
For \(L:\mathbb A\rightsquigarrow \mathbb B\) and \(K:\mathbb B\rightsquigarrow \mathbb C\), take the composite hypothesis category to be the indexed product \(\mathcal H_L\times \mathcal H_K\). Compose the implementations forward. A \(C\)-obligation is first translated by \(R_K\) to a \(B\)-obligation and then by \(R_L\) to an \(A\)-obligation; the two updates use these translated obligations and retain their comparison maps. The identity interface has the terminal hypothesis category and simply forwards declarations and obligations. Associativity and unit laws follow from those of wiring and the chosen products, modulo the stated learner equivalence. Taking products of interfaces, hypothesis categories, and realizers gives parallel composition; the product associator, unitors, and swap supply the symmetric monoidal laws.
Without chosen products the same construction is generally associative only up to coherent equivalence. Doctrinal accommodation may also change the interface itself. The natural home is then a bicategory, double category, or equipment of learners, interface changes, and comparison 2-cells. The strict category is the smallest testable fragment, not the final higher-categorical claim.