← back to index

Towards Foundations of Categorical Cybernetics

Capucci, Gavranović, Hedges, Rischel · 2021 · arxiv 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."

Lens A, going right --> S get / view A S', going left --> A' put / update S' forward: observe. backward: update from consequences.
Scheme

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.

Para P parameters A --> S fwd(P, S) A S' --> A' bwd S' parameter P controls the forward pass. backward pass updates the agent.
Scheme

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.

Scheme

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.

Scheme

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.

Scheme

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 actionsBest response as goal predicate
Neighbors

Other paper pages

Related foundations

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.

Ready for the real thing? arxiv 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. (jkThe Handshake, jkThe Natural Framework)