With compose, a user defines a labeling function, and then compose scans the historical data looking for training examples to train a machine learning model.
The library has evolved as we apply it to more and more real world use cases, but it is based on approach in this paper from 2016: https://dai.lids.mit.edu/wp-content/uploads/2016/08/07796929....