lin-0002

Why category theory?

Modern machine learning already draws on a powerful mathematical toolkit. Calculus describes local variation and supplies gradients. Graph theory represents incidence and dependence. Probability and statistics quantify uncertainty, evidence, and generalization. Optimization searches for parameters or policies that improve an objective. LINCS uses all of these. Category theory is needed for a different question: what is the structure that these operations are supposed to preserve when they are composed?

Suppose a learning system is represented by a diagram

\[ D:J\longrightarrow \mathcal C. \]

The indexing category \(J\) records typed components and their legal composites; the target category \(\mathcal C\) records the objects and maps that realize them. A sketch can additionally declare that two paths agree, that a cone is limiting, that a cocone is colimiting, that a section descends, or that a construction is functorial. These are not merely numerical properties of isolated parameters. They are obligations among operations. When an obligation fails, the failed diagram supplies the typed obstruction from which LINCS begins.

Set theory can encode all of these constructions, and category theory need not be advertised as a stronger foundation in an absolute sense. Its advantage is one of native expression. Set theory foregrounds membership and elements. Category theory foregrounds maps, composition, universal properties, and transport between representations [ Mac Lane , 1998 ] . Lawvere’s functorial semantics makes the same point for theories: generators and equations can be specified abstractly, while their models are structure-preserving realizations in a chosen category [ Lawvere , 1963 ] . This separation between a declaration and its realizations is precisely what a learning sketch requires.

Language

Native question

Role inside LINCS

Set theory

What are the elements and subsets?

Represents underlying data, states, and parameter spaces

Graph theory

Which vertices or variables are incident or dependent?

Represents wiring, neighborhoods, and sparse interaction structure

Calculus

How does a quantity change locally?

Constructs tangent probes, sensitivities, and update directions

Probability and statistics

What is uncertain, supported, or identifiable?

Quantifies evidence and supplies statistical admission tests

Optimization

Which available candidate best improves an objective?

Searches within a declared repair language

Category theory

What must compose, transport, or glue, and in what type?

Declares the structural contract and types its failure

Table 1 The mathematical languages are complementary. Category theory supplies the compositional declaration within which the others operate.

This choice also makes the framework representation-aware without making it presentation-bound. Functors compare realizations; natural transformations compare structure-preserving updates; limits and colimits express assembly; adjunctions express canonical transport; sheaves separate local consistency from global realization; and tangent structure imports calculus without reducing the declaration to coordinates. Category theory therefore does not replace the familiar mathematics of machine learning. It provides the organizing language in which their outputs can be composed, compared, and audited.

Design principle

Use category theory to state the invariant structural promise; use graphs, calculus, probability, statistics, and optimization to represent, observe, test, and repair particular realizations of that promise.