Skip to main content
QUICK REVIEW

[Paper Review] Lenses and Learners

Brendan Fong, Michael Johnson|arXiv (Cornell University)|Mar 5, 2019
Constraint Satisfaction and OptimizationComputer Science12 references10 citations
TL;DR

This paper establishes a deep mathematical connection between supervised learning algorithms (modeled as 'learners') and bidirectional data transformation structures (lenses), showing that learners can be faithfully embedded into a category of symmetric lenses via a symmetric monoidal functor. The key result is that learners correspond precisely to symmetric lenses with a constant complement lens on the left and a bare asymmetric lens on the right, revealing a novel, structured duality between learning and data synchronization.

ABSTRACT

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.

Motivation & Objective

  • To establish a formal mathematical connection between two previously unrelated domains: supervised learning algorithms (learners) and bidirectional data transformations (lenses).
  • To demonstrate that learners can be embedded into a category of symmetric lenses through a faithful, identity-on-objects, symmetric monoidal functor.
  • To show that learners correspond to symmetric lenses where the left leg is a constant complement lens and the right leg is a bare asymmetric lens with no additional axioms.
  • To explore the structural parallels between learners and advanced lens variants like amendment lenses and spg-lenses, suggesting deeper categorical unification.

Proposed method

  • Define learners as compositional models of supervised learning algorithms, forming a symmetric monoidal category under equivalence classes.
  • Introduce a generalized composition rule for symmetric lenses that allows one leg to satisfy the PutGet axiom while the other (bare lens) satisfies no axioms.
  • Construct a symmetric monoidal functor from the category of learners to the category of symmetric lenses, mapping learners to spans of asymmetric lenses with constant complement on the left and bare lenses on the right.
  • Use string diagrams in Set to manage complex function compositions and improve visual clarity of morphisms and their compositions.
  • Establish that the image of the functor consists of symmetric lenses where the left leg is a constant complement lens (a type of closed spg-lens), and the right leg is a bare lens.
  • Show that the right legs (bare lenses) can be canonically extended to spg-lenses with amendment structures, aligning with recent work on amendment lenses.

Experimental results

Research questions

  • RQ1Can supervised learning algorithms be formally modeled as a type of symmetric lens, and if so, what structural constraints define this correspondence?
  • RQ2What is the categorical relationship between the category of learners and the category of symmetric lenses, particularly in terms of monoidal structure and functorial embedding?
  • RQ3How do the structural properties of learners relate to those of advanced lens variants such as amendment lenses and spg-lenses?
  • RQ4Is there a canonical way to enrich bare asymmetric lenses (with no axioms) into more structured lenses like spg-lenses, and does this preserve the compositional properties of learners?
  • RQ5To what extent do the left and right legs of the symmetric lenses in the image of the functor reflect the functional roles of the Get and Put operations in learning algorithms?

Key findings

  • A faithful, identity-on-objects, symmetric monoidal functor exists from the category of learners to the category of symmetric lenses, establishing a robust categorical link between learning and data synchronization.
  • Learners are precisely represented as symmetric lenses whose left leg is a constant complement lens and right leg is a bare asymmetric lens with no additional axioms.
  • The composition of symmetric lenses in this framework is well-defined even when one leg satisfies no axioms, extending the standard composition beyond well-behaved lenses.
  • Bare lenses in the right leg can be canonically extended to spg-lenses with amendment structures, enabling recovery of GetPut and PutGet axioms in a structured way.
  • The left legs (constant complement lenses) are a special case of closed spg-lenses, and their PutGet behavior ensures compositional stability in the symmetric lens framework.
  • The structural similarity between this work and recent work on multiary lenses (JR19) suggests a deeper categorical unity between learning and lens-based data transformation, particularly in the role of the left leg as a stable, well-behaved component.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.