Module 8: Kan Extensions

Kan extensions are the universal way to extend a functor from a small domain to a larger one while preserving as much structure as possible. This module develops both the left and right Kan extension, derives the pointwise colimit formula, and establishes the central claim of the course: that EBM generalization is approximating a left Kan extension, and the categorical version is exact, deterministic, and requires no gradient descent. The module includes a Python implementation of the discrete propagation engine, making the abstract construction directly computational.

Learning Objectives

  • Define left and right Kan extensions via their universal properties.
  • Derive the pointwise formula: (Lan_K F)(d) = colim_{(c, Kc→d)} F(c).
  • Interpret the left Kan extension as a propagation formula over the morphism structure of the category.
  • Contrast left Kan (initial, optimistic) with right Kan (terminal, conservative) as modeling choices.
  • Connect EBM gradient descent to the approximation of a Kan extension colimit in a continuous setting.
  • Implement the discrete Kan extension propagation engine in Python and apply it to an energy function.

Materials

Key Concepts

Central Concepts from Prerequisites