Lenses and Learners

Lenses are a well-established structure for modelling bidirectional transformations, such as the interactions between a database and a view of it. Lenses may be symmetric or asymmetric, and may be composed, forming the morphisms of a monoidal category. More recently, the notion of a learner has been proposed: these provide a compositional way of modelling supervised learning algorithms, and again form the morphisms of a monoidal category. In this paper, we show that the two concepts are tightly linked. We show both that there is a faithful, identity-on-objects symmetric monoidal functor embedding a category of asymmetric lenses into the category of learners, and furthermore there is such a functor embedding the category of learners into a category of symmetric lenses.

[1]  Robert Rosebrugh,et al.  Electronic Communications of the EASST Volume 57 ( 2013 ) Proceedings of the Second International Workshop on Bidirectional Transformations ( BX 2013 ) Delta lenses and opfibrations , 2013 .

[2]  Benjamin Pierce,et al.  Lenses and View Update Translation , 2003 .

[3]  David I. Spivak,et al.  An Invitation to Applied Category Theory , 2019 .

[4]  David I. Spivak,et al.  Backprop as Functor: A compositional perspective on supervised learning , 2017, 2019 34th Annual ACM/IEEE Symposium on Logic in Computer Science (LICS).

[5]  Martin Hofmann,et al.  Symmetric lenses , 2011, POPL '11.

[6]  Krzysztof Czarnecki,et al.  From State- to Delta-Based Bidirectional Model Transformations: the Asymmetric Case , 2011, J. Object Technol..

[7]  Michael Johnson,et al.  Lens put-put laws: monotonic and mixed , 2012, Electron. Commun. Eur. Assoc. Softw. Sci. Technol..

[8]  Robert D. Rosebrugh,et al.  Multicategories of Multiary Lenses , 2019, Bx@PLW.

[9]  Zinovy Diskin,et al.  Multiple Model Synchronization with Multiary Delta Lenses , 2018, FASE.

[10]  Nicolas Spyratos,et al.  Update semantics of relational views , 1981, TODS.

[11]  Benjamin C. Pierce,et al.  Combinators for bi-directional tree transformations: a linguistic approach to the view update problem , 2005, POPL '05.

[12]  P. Selinger A Survey of Graphical Languages for Monoidal Categories , 2009, 0908.3347.

[13]  Michael Johnson,et al.  Unifying Set-Based, Delta-Based and Edit-Based Lenses , 2016, Bx@ETAPS.

[14]  Michael Johnson,et al.  Symmetric delta lenses and spans of asymmetric delta lenses , 2017, J. Object Technol..