Machine learning can run on tiny, low-power chips
petewarden.com
petewarden.com
The library is cross platform, support real-time, multi-class object detection and model training on embedded systems with limited computational resource and IoT devices.
The developers get financial security while they're working so they can focus, everyone is funded to sit in one place (sometimes) which makes for great communication... and then everybody (society as a whole) get to benefit.
If we don't figure out how to make computers write our programs for us within the next 10 years, this is the development model of the future.
If you are interested, you can start building your own Voice AI for free and make it run on embedded devices in under an hour: https://snips.ai
I wrote about the privacy perspective a bit:
https://adamdrake.com/scalable-machine-learning-with-fully-a...
and I recently gave a lecture more focused on the performance aspect:
https://adamdrake.com/big-data-small-machine.html
The case for doing centralized data collection and model training seems to be increasingly related to corporate greed and moat-building rather than actually providing a good experience for users.
The pessimist in me already sees how three letter agencies worldwide will welcome this change in order to push down their selectors to the device as well. Recording only the one percent of potentially relevant conversations will make backdoors exponentially easier to hide in the background traffic as well as being much lighter to process.
Inference is much less energy intensive and could be done on small chips.
Regardless, I'm not as certain as the author about the future of ML on small devices. Some ML models are huge and needs to be updated frequently, therefore there is little sense in downloading those to small devices. In such cases, it makes much more sense to send feature data to a remote server that can generate a prediction within milliseconds, and then transmit that prediction back to the device.
It may make sense now, but not having to power up the radio for every decision is a huge gain, as lined out in the article. The current model of dumb (as in ML) devices is coming to an end, see also CoreML from Apple.
https://adamdrake.com/big-data-small-machine.html
A big benefit for doing everything on-device is that a lot of privacy concerns can be mitigated. I also agree that sending data to a server for learning is an option, and the privacy problems can be addressed with something like client-side feature hashing as I mention in:
https://adamdrake.com/scalable-machine-learning-with-fully-a...
However, doing that in a very power-conscious environment dose pose difficulties with radio usage, which is comparatively power hungry. It's probably a case-by-case situation.
As much as I hate to do this, I'm going to make a comparison to Bitcoin mining.
Mining is all about optimizing hashes/joule to get the best ROI. We watched it go from CPU -> GPU -> FPGA -> ASIC in the quest for efficiency.
In ways, we're seeing the same thing in ML model training and inference. CPU -> GPU -> TPU. We're even seeing some special-purpose coprocessors deployed, as in the iPhone X. (https://www.wired.com/story/apples-neural-engine-infuses-the...)
But I think the final leap will come by going from digital execution to application-specific analog computing. If you don't need high precision, you can compute extremely quickly and efficiently using properly-configured analog circuits.
IBM is working on this kind of system with their TrueNorth line (https://techcrunch.com/2017/06/23/truenorth/)
It hasn't been proven yet, but I think there is huge potential.
For inference, GPUs are also pretty damn efficient since it's an embarrassingly parallel task w/ minimal synchronization (no gradient updates needed). In this case, FPGAs are a far better choice since you can push updates to accommodate new network architectures, activation functions, ,etc. The TPU instead relies on a matrix-multiplier unit which supports more use cases but won't be as performant on something like an RNN.
Currently, they are only allowing external customers use ResNet-50 with their FPGA-enabled Azure ML.
It seems the TrueNorth is indeed fully digital, but takes advantage of the event-driven architecture and peer-to-peer communication between many tiny cores to keep things low-power.
( http://paulmerolla.com/merolla_main_som.pdf for some details )
Thank you for the correction!
If you're shipping a million units a 30ct difference can pay for a year of a good dev.
Exactly what product the author is referring to? I am having a hard time thinking one, but maybe is just me living in my bubble...
I'm almost certain they all offload the processing to a server though.
We, eventually, will get there, but they are not my definition of a successful product yet...
I think that offloading the processing is not functionally required, but having the data is valuable for the big corps.
All the person tagging features in Apple Photos, Google Photos, Facebook.
Running a neural algo using already formed net is easy-peasy. Doing actual learning on an MCU for anything serious is still impossible.
Learning can be ran on commodity GPUs/DSPs, and they will not be that much worse than dedicated hardware. But on embedded side, a small, low-power ASIC is the only thing that makes makes 99% voice recognition a possibility.
This is why I think that learning startups will not go anywhere far in comparisons to companies that will be using results of that learning that can be done in DCs using commodity hardware.
I wonder if we could (of course we can, I'm wondering if someone already did it) split the training workload across a number of small embedded devices with their tiny NEON units and have them share the resulting trained models. Making nodes self-coordinate the shared workload and assemble the results would be interesting.
In this case it wasn't a neural net, I think it was simple multiple linear regression + Fourier Transform.
Why train wheels used to be tapped with a hammer at platforms: https://en.wikipedia.org/wiki/Wheeltapper
Neurones are electrical but mostly chemical when they work. The average speed of a connection from one neurone 0.1-0.5 m/s. So if you hit your toe on a chair and you are 1.8m meter high (and pardon my rough math/science here) it would take almost 1 second to reach your brain (of course this is why reflexes are handled close to the spine and not the brain).
And now imagine the complexe processing that is required to view/ear and recognize something. It is done quite quickly and yet the basic processing unit of the brain is slow. One might think it is the massive parallelism of the brain that makes this possible so quickly, but even there if you think about it it all that processing done in such small amount of time cannot be more than a thousand operations...
You're about an order of magnitude out there, according to https://en.wikipedia.org/wiki/Nerve_conduction_velocity#Norm...
(And just for a simple cross-check, it doesn't take a second for you to perceive sensations from your toes. Not even close.)
(Sorry for late reply)
If Cortex A-class, The iMX6UL from NXP comes to mind for a) and b), but no way it also addresses c)
>"This makes deep learning applications well-suited for microcontrollers, especially when eight-bit calculations are used instead of float, since MCUs often already have DSP-like instructions that are a good fit."
Can someone shed some light on what the author means by "DSP-like instructions"? What are characteristics of DSP instructions? Is there something that makes these unique compared to general purpose CPUs or GPUs?
For traditional signal processing (FIR/IIR filters) dedicated opcode for multiply accumulate is also common, since it is used so much.
Saturated add/subtract is another typical 'DSP' kind of feature.
EDIT: such opcodes exists on many CPU/GPUs also, but we are talking sub-milliwatt capable devices here.
Is it possible for me to embed a camera on my uni that can see potholes 10 feet away a beep my headphones? I am not sure where to even start with this.
Unfortunately, despite the lip service many US cities give to cyclists, when it comes to practical issues like road quality, cities tend to not care. Here in Austin there are quite a few bike lanes/cycletracks that are so bad that I refuse to use them. Usually it's a combination of poor visibility of cyclists in the lane (making being hit by turning drivers more likely) and poor road quality (e.g., chip seal resulting in some of these lanes basically being gravel). I've seen it claimed that the city regularly cleans out this gravely, but I can only recall a few times over the past 5 years when I thought the gravel might have been removed. I don't need machine learning to tell me to avoid these roads, but the potholes would be helpful.
There are no "larger" ops. However, things like RNNs can require more memory to execute because of the longer chain of data they need to execute the operations on.
As noted in the article you can alleviate this by halving the size of the model at the cost of accuracy.
The heat in large GPUs is because of the large number of cores they have operating simultaneously.
What I wouldn't like to do is to run the training part on such small devices. If there is a good way to do incremental learning after you trained your model so it could continuously fine tune itself using the embedded hardware on a reasonable power budget, I'd go for it.
And while you won't run large networks, you can probably get away with many smaller, more specialized ones.
Also people just end up wanting to do more. Real-time video at decent framerate is still challenging for sub-100 USD devices. When that's easy, time for real-time 3d data (LIDAR etc)
> For example, the MobileNetV2 image classification network takes 22 million ops ... 110 microwatts, which a coin battery could sustain continuously for nearly a year.
So making a tiny mine that blows up if and only if it sees a particular person (or worse, a particular race or ...) is now theoretically possible and essentially a few hardware revisions away from being doable.
1-If the mine targets people from some race, then will attack your own soldiers, local allies and spies of the same race
2-Clothes and makeup are common to all human cultures. After a few strikes the people would learn how to blend in the landscape and avoid being taken by a target.
3-The system would need a sort of eye over the soil, detectable by human eyes and software, or a sort of wifi, detectable with software.
4-This "eye" part would be vulnerable to dust, leaves and debris falling over this eye. Something that happens very quickly at soil level in deserts, snowy areas and rainforests.
4-If the mine is inactivated until people of some colour appears, your enemies could use a disguise to take it safely and reuse the weapon in their own army.
5-Such mines could be modified to target presidents, military high commands, policemen or politicians, all easily distinguishable by their "feathers", well known bagdes, official uniforms... At this point, the project of a mine aiming to VIPS would be closed and deeply buried pretty fast.
The problem with most of these ideas is that if you're willing to do it, you probably are willing to just shoot/explode/ethnically cleanse an area anyway.
The question as always is better framed as "what does this enable that they couldn't do before?"