Lenses and Learners
This work provides a theoretical connection between two established structures in computer science, potentially enabling cross-fertilization of ideas, but it is incremental as it builds on existing concepts without introducing new practical applications.
The paper demonstrates a tight link between lenses, used for bidirectional transformations, and learners, used for compositional modelling of supervised learning algorithms, by showing that each can be faithfully embedded into the other's category via symmetric monoidal functors.
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.