Nelson's log

A library of trained machine learning models?

I wonder if machine learning is mature enough that people can start sharing trained classifiers? Ie: instead of training neural networks to do character recognition yet again, why not just download the consensus Recognizer library that everyone uses and just apply it? The question is deliberately provocative.

I think applied machine learning may not be mature enough to support standard library usage. What does it mean to “download a trained model”? Models are expressed in terms of specific software libraries; sklearn, TensorFlow, whatever. Probably specific to minor version releases of those libraries, for that matter.

Also every machine learning application I’ve seen is highly customized to the specific task. it’s never as simple as “recognize characters in an image”, it’s always carefully tuned to the specific source of images (ie: camera artifacts, etc). And the use of the outputs: numbers only, English text only, with confidence intervals or without. And the larger context of use: are you recognizing zip codes on an envelope? Turning scanned documents into text? Breaking CAPTCHAs?

Also the whole idea of “consensus software library” is pretty rough sledding even in traditional instances. I mean we can’t even agree on a common malloc(), or a common regexp recognizer.. OTOH some things are highly standardized, like compressors or crypto libraries or the like.

The idea of “open source” on a trained model is also a bit wonky. There’s not really source code you can read in a trained model; it’s not like I’m going to read a diff of neural network weights and learn anything about the submitted patch. So maybe the source code open source artifact is the program that does the learning along with the training set, and you also distribute the trained model output as a sort of pre-compiled convenience.

(Inspired by reading this post, in which a student builds a classifier for American  name gender. It’s a very nice exercise but it got me wondering; if I really want a gender classifier, why can’t I just download one some expert already built and tested?)

Update: with many thanks to the awesome Julia Evens, I’ve learned that Caffe, an image processing machine learning project, has explicit support for sharing trained models. Here’s her blog post about playing around with a trained image recognizer.