---
title: "Deep Learning with Parametric Lenses"
authors:
  - "Geoffrey S. H. Cruttwell"
  - "Bruno Gavranović"
  - "Neil Ghani"
  - "Paul Wilson"
  - "Fabio Zanasi"
year: 2024
venue: "arXiv:cs.LG"
arxiv: "2404.00408"
doi: null
source: "https://arxiv.org/abs/2404.00408"
topics:
  - "parametric-lenses"
  - "category-theory"
  - "deep-learning"
seed_rank: 941
seed_batch: "user-add-2026-08-13"
reviewed: "2026-08-13"
pool: "maths-foundations"
relevance_score: 9
lineage: categorical-deep-learning
cites:
  - title: "Categorical Foundations of Gradient-Based Learning"
    url: "https://arxiv.org/abs/2103.01931"
    year: 2022
    arxiv: "2103.01931"
  - title: "Backprop as Functor: A compositional perspective on supervised learning"
    url: "https://arxiv.org/abs/1711.10455"
    year: 2019
    arxiv: "1711.10455"
see:
  - "940-categorical-foundations-of-gradient-based-learning"
  - "943-backprop-as-functor-compositional-supervised-learning"
---

# Deep Learning with Parametric Lenses

## One-sentence takeaway

An extended lens/Para account of deep learning: architectures, losses, and optimizers live in one parametric-lens language, with a Python implementation and coverage of Boolean/polynomial circuits.

## Why it matters here

This is the Para story Weaves uses (weights as hidden inputs). Type-safe learning, not just type-safe arrays — the 2024 expansion of the ESOP 2022 foundations paper.

## Key ideas

- arXiv:2404.00408; extends Cruttwell et al. ESOP 2022 (card 940) and sits on Fong–Spivak–Tuyéras Para (card 943).
- Parametric lenses are the algebra of maps that carry weights as extra inputs hidden from the composition.
- Discrete/Boolean and polynomial circuits are first-class, not an afterthought on $\mathbb{R}$.
- Semantics paper with a Python artifact, not a kernel compiler.

## Caveats

## Links

- arXiv: [2404.00408](https://arxiv.org/abs/2404.00408)
- PDF: https://arxiv.org/pdf/2404.00408
