Towards Foundations of Categorical Cybernetics
Capucci, GavranoviΔ, Hedges, Rischel Β· 2021 Β·
arXiv:2105.06332
Prereqs: π Hedges 2018 (open games, selection functions). 5 min.
Goals are predicates on optics. An agent is a parametrised optic (forward pass + backward pass) with a selection relation that says which actions are "good enough." 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 gets updated by learning.
Selection relations β goals as predicates
In Hedges 2018, a selection function picks the best action. Capucci generalizes to a selection relation: a predicate that says which actions are acceptable. Not "the best action" but "any action that's good enough." This is the cybernetic goal β a predicate on the optic's choices.
Confidence: Simplified. Real selection relations are on parametrised optics in a monoidal category. Same 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 composition of goals is: the whole system satisfies the goal if each agent satisfies its local goal given the context provided by the other.
Goals compose like postconditions
This is the bridge to Staton's Hoare logic. A goal on a composed system decomposes into goals on sub-agents β exactly like a Hoare postcondition decomposes via COMP. The "handshake" is the interface between agents. Cybernetic composition IS program composition, with the backward pass added for learning.
Confidence: Analogy. The goal-composition pattern is the same. The paper works with parametrised optics in a monoidal category, not plain function chains.
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 Γ K^X | (satisfies? goal action ctx) | Selection relation |
| Gβ ; Gβ | (compose-optics o1 o2) | Sequential composition |
| BestResp | # predicate on actions | Best response as goal predicate |
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)