Towards Foundations of Categorical Cybernetics
Capucci, GavranoviΔ, Hedges, Rischel Β· 2021 Β·
arXiv:2105.06332
Prereqs: π Hedges 2018 (open games, selection functions). 5 min.
Goals are selection relations β predicates on (choice, context) pairs. An agent is a parametrised optic (forward pass + backward pass) with a selection relation Ξ΅(x, k) that says which choices x are acceptable given a context k : X β R mapping alternatives to outcomes. Composing agents = composing optics = wiring forward and backward channels.
Optics β forward and backward
An optic pairs a forward map (observation β action) with a backward map (action + consequence β updated state). Think lens from functional programming: get/set. In cybernetics, the forward pass is "act" and the backward pass is "learn from consequences."
Parametrised optics β agents with tunable parameters
A parametrised optic adds parameters: the forward map depends on a parameter (policy/weights), and the backward map produces a parameter update. This is the agent abstraction. The parameter is what learning updates.
Selection relations β goals as two-place predicates
In Hedges 2018, a selection function picks the best action. Capucci generalizes to a selection relation: Ξ΅ β X Γ (X β R), a predicate on (choice, context) pairs. The context k : X β R maps every alternative choice to its outcome β so Ξ΅(x, k) means "x is acceptable given what the alternatives would yield." Not "the best action" but "any action that's good enough, relative to the landscape of alternatives."
Confidence: Simplified. Real selection relations live on parametrised optics in a monoidal category, with the context k derived from the optic's backward channel. Same two-place predicate structure.
Composing agents β wiring optics
Two parametrised optics compose by wiring: agent 1's forward output feeds agent 2's forward input (the action becomes the observation), and agent 2's backward output feeds agent 1's backward input (consequences flow back). The whole system satisfies the composite goal when each agent satisfies its local goal given the context the other provides.
Goals compose via the Nash product
The paper's composition theorem for goals is the Nash product Ξ΅ β Ξ΄: agents x and y are jointly acceptable iff each is acceptable given the other's choice as context. This is the paper's actual claim. The bridge to Staton's Hoare logic β goals as postconditions, composition via COMP β is an editorial connection, not something Capucci et al. prove. But the structural parallel is real: in both cases, a global goal decomposes into local goals at an interface.
Confidence: Editorial analogy. The Hoare triple parallel is mine, not the paper's. The paper composes goals via the Nash product (Ξ΅ β Ξ΄). The sequential-postcondition framing comes from Staton 2025.
Notation reference
| Paper | Scheme | Meaning |
|---|---|---|
| Optic(S,A; S',A') | (make-optic name fwd bwd) | Forward + backward pair |
| Para(C) | (make-para-optic ...) | Parametrised optic |
| Ξ΅ β X Γ (X β R) | (satisfies? goal action ctx) | Selection relation β goal as (choice, context) predicate |
| Gβ ; Gβ | (compose-optics o1 o2) | Sequential composition |
| argmaxX | (lambda (x k) (max? x k)) | Canonical selection relation: x maximizes k |
| Ξ΅ β Ξ΄ | # Nash product | Composed goal: both agents satisfied given each other's choice |
Neighbors
Other paper pages
- π Hedges 2018 β compositional game theory (the predecessor)
- π Staton 2025 β goals as postconditions = Hoare triples
- π Fritz 2020 β the Markov category where stochastic agents live
Related foundations
- β« Calculus Ch.5 Chain Rule β the chain rule that lens composition categorifies
- π§ Lovelace Ch.4 Neural Networks β backpropagation as the application of lens composition
Foundations (Wikipedia)
Translation notes
All examples use plain functions for optics and simple predicates for goals. The paper works with parametrised optics in a symmetric monoidal category, selection relations as profunctors, and a formal composition theorem for goals over mixed optics. For example: the agent composition on this page wires two functions sequentially. In the paper, the same construction works over a monoidal category of parametrised optics where the forward and backward channels live in different categories (the "mixed" in mixed optics), enabling agents whose learning substrate differs from their action space. The composition pattern is identical. The categorical scaffolding is not.
Read the paper. Start at Β§3 for parametrised optics, Β§4 for selection relations and goals.
Framework connection: The Natural Framework pipeline is a composed cybernetic system: agent composition via parametrised optics is its core structural pattern. (
The Handshake,
The Natural Framework)