English

Deep Learning with Parametric Lenses

Machine Learning 2024-04-02 v1 Logic in Computer Science

Abstract

We propose a categorical semantics for machine learning algorithms in terms of lenses, parametric maps, and reverse derivative categories. This foundation provides a powerful explanatory and unifying framework: it encompasses a variety of gradient descent algorithms such as ADAM, AdaGrad, and Nesterov momentum, as well as a variety of loss functions such as MSE and Softmax cross-entropy, and different architectures, shedding new light on their similarities and differences. Furthermore, our approach to learning has examples generalising beyond the familiar continuous domains (modelled in categories of smooth maps) and can be realised in the discrete setting of Boolean and polynomial circuits. We demonstrate the practical significance of our framework with an implementation in Python.

Keywords

Cite

@article{arxiv.2404.00408,
  title  = {Deep Learning with Parametric Lenses},
  author = {Geoffrey S. H. Cruttwell and Bruno Gavranovic and Neil Ghani and Paul Wilson and Fabio Zanasi},
  journal= {arXiv preprint arXiv:2404.00408},
  year   = {2024}
}

Comments

arXiv admin note: text overlap with arXiv:2403.13001

R2 v1 2026-06-28T15:39:10.654Z