4 ms·
These are good points but: > JavaScript is not a great language to build high speed low resource inference engines. This is a browser plugin analyzing html do
by evrydayhustling 8y ago
These are good points but:
> JavaScript is not a great language to build high speed low resource inference engines.
This is a browser plugin analyzing html downloaded at human browsing speed. I doubt performance is a primary requirement.
> Even if achieved in JavaScript, the model would be simple to pull out and reuse elsewhere, possibly to learn how to game it.
The binary model is obfuscated but still distributed. I expect that the added difficulty of working with the binary model is small compared to the overall challenge of gaming it.
> Good models will be built by good data scientists, whose favorite tools likely don't produce models that can be serialized for use in a JavaScript inference engine.
Models built in research-optimized environments can be translated after the fact to match production needs. (It is getting easier with e.g. standard interchange formats for neural models.). Kapersky is a resource-rich org working on security software -- exactly the folks whom, if diligent and well intentioned, should invest in such hardening.
- tgtweak 8y agoGetting a sparkML serialized model to drop into a JavaScript interpreter is not possible today from what I can see (and certainly wasn't the case 2 years ago). There does seem to be some good progress in the field with tensorflow.js and ml.js but nothing I'd put in production with a few million users. In native Scala the inference engine with a loaded model takes a few hundred MB of memory, I'd imagine with some JavaScript transpiling with emscripten or similar that would get ballooned quite a bit. I'd be really glad if there was a viable method to do this without murdering the end user device.