Module 3 Discussion Topics

Strong answers will draw the naturality squares explicitly and verify (or refute) the naturality condition for specific morphisms.

Discussion 1: Polymorphism as Naturality

In Haskell or any parametrically polymorphic language, a function of type forall a. F a -> G a (where F and G are type constructors / functors) is a natural transformation η: F ⟹ G. The theorem that "all parametrically polymorphic functions are natural" is called the free theorem.

Discussion 2: Equivariance as Naturality

A function f: X → Y between spaces with a group G acting on them is equivariant if f(g · x) = g · f(x) for all g ∈ G, x ∈ X. Equivariance is the condition that "applying the group action commutes with applying the function."

Discussion 3: What Is a Neural Network as a Functor?

If categories are the correct setting for ML models, then a neural network should be (or approximate) a functor. But between which categories?

Discussion 4: The Three Levels

Category theory operates at three levels simultaneously: objects, morphisms (between objects), and natural transformations (between functors between categories). Each level has a notion of "sameness": isomorphism of objects, natural isomorphism of functors, and equivalence of categories.