Hey all, I'm William Bakst, the creator of the library. I used to work at Google where I worked on the Glassbox research team (creators of TensorFlow Lattice and TensorFlow Constrained Optimization). It was crazy useful internally and approaches problems relevant to all kinds of businesses so I was kind of baffled that the 'open-source' version was only available to Google employs to contribute to. I think PyTorch has a better community around it anyways, so i've made an actual open-source version so any company that wants to take advantage of the explainability of a simple model like linear regression, but the accuracy of more complex models like deep neural networks, can start applying this now AND anyone can contribute, so hopefully this gets better and more accessible over time.
shaqbert|2 years ago
willbakst|2 years ago
When I was at Google, I helped develop models using this modeling technique that ended up in products such as Google Maps. These models are highly interpretable and, like xgboost, can be applied to classification and regressions tasks and more. I would say that there are a few cases in particular where these models really shine:
(1) You want more than just a prediction. You want to understand how your data impacts the prediction. For example, you might have a model for predicting sales of an item on your e-commerce platform, but you care deeply about how price impacts the prediction. These models have feature calibrators, which can really help you to understand how the model understand the feature. In the case of price, you might discover that the calibrator follows a concave shape, indicating that prices that are too low / too high are similar and that there is likely an optimal price somewhere in the middle. Perhaps you'll even discover close to that optimal price from the calibration analysis.
(2) You want to embed domain knowledge into the model. You want to make sure that model follows certain expected behaviors. This is where shape constraints shine. For example, when predicting creditworthiness, you'll want to make sure that more timely payments will only ever increase your creditworthiness (since otherwise the model wouldn't be fair). Another example here would be predicting the likelihood of a sale for an item on Amazon. It would make sense for the model to trust a feature for star rating more if the number of reviews is higher (since that's how a human would likely judge the rating themselves). A trust shape constraint here would make embedding this expected behavior into the model not just possible but easy.
Ultimately these models are what's considered "universal approximators" just like DNNs, able to approximate any function with sufficient data, so you can use them for any prediction task you're looking to solve (think of an alternative to xgboost you can try during modeling) that are more interpretable and controllable.