{"id":331040,"date":"2017-01-20T06:08:37","date_gmt":"2017-01-19T22:08:37","guid":{"rendered":"http:\/\/techcrunch.com\/?p=1437423"},"modified":"2017-01-20T06:08:37","modified_gmt":"2017-01-19T22:08:37","slug":"xnor-ai-frees-ai-from-the-prison-of-the-supercomputer","status":"publish","type":"post","link":"https:\/\/people.utm.my\/asmawisham\/xnor-ai-frees-ai-from-the-prison-of-the-supercomputer\/","title":{"rendered":"XNOR.ai frees AI from the prison of the supercomputer"},"content":{"rendered":"<p class=\"first\">When someone talks about AI, or machine learning, or deep convolutional networks, what they\u2019re really talking about is \u2014 as is the case for so many computing concepts \u2014 a lot of carefully manicured math. At the heart of these versatile and powerful networks is a volume of calculation only achievable by the equivalent of supercomputers. More than anything else, this computational cost is what is holding back applying AI in devices of comparatively little brain: phones, embedded sensors, cameras.<\/p>\n<p>If that cost could be cut by a couple orders of magnitude, AI would be unfettered from its banks of parallel processors and free to inhabit practically any device \u2014 which is exactly what a breakthrough at the Allen Institute for AI makes possible.<\/p>\n<p>XNOR.ai is, essentially, a bit of clever computer-native math that enables AI-like models for vision, speech recognition, to run practically anywhere. It has the potential to be transformative for the industry.<\/p>\n<p>\u201cThere\u2019s a disconnect between state of the art AI and common computing,\u201d explained Ali Farhadi, senior research manager on the project at AI2, as they call the place. Nestled on the waterfront nearby Gasworks Park in Seattle, AI2 is focused on \u201cAI for the common good\u201d; it\u2019s small, yet even so is the largest not-for-profit AI research institution in the country.<\/p>\n<p> Machine learning, Farhadi continued, tends to rely on convolutional neural networks; these involve repeatedly performing simple but extremely numerous operations on good-sized matrices of numbers. But because of the nature of the operations, many have to be performed serially rather than in parallel. (Whether machine learning models <a target=\"_blank\" href=\"https:\/\/techcrunch.com\/2017\/01\/10\/ai-powered-is-techs-meaningless-equivalent-of-all-natural\/\">truly constitute AI<\/a> is another, <a target=\"_blank\" href=\"https:\/\/techcrunch.com\/2016\/12\/04\/wtf-is-ai\/\">so far unanswered question<\/a>, but for now we\u2019ll use AI in its broader sense.)<\/p>\n<p>For example: it\u2019s simple to multiply each in a set of a thousand numbers by two, since all those operations are independent from one another and can be performed at the same time by a thousand processors or threads working in parallel.<\/p>\n<p>But imagine each operation depends on the result of the previous one \u2014 you need to add the last digit of the product of the previous operation to the next one, say. That means you have to go through one by one, which means only one processor can work on it \u2014 which means it could take a thousand times as long as the other one, even though really, it\u2019s still simple arithmetic. (I\u2019m oversimplifying, but this is the essential nature of the problem.)<\/p>\n<p>It\u2019s the unfortunate reality of both training and running the machine learning systems performing all these interesting feats of AI that they phenomenally computationally expensive.<\/p>\n<h2>Where\u2019s the beef?<\/h2>\n<p>\u201cIt\u2019s hard to scale when you need that much processing power,\u201d Farhadi said. Even if you could fit the \u201cbeefy\u201d \u2014 his preferred epithet for the GPU-packed servers and workstations to which machine learning models are restricted \u2014 specs into a phone, it would suck the battery dry in a minute. Meanwhile, the accepted workaround is almost comically clumsy when you think about it: you take a load of data you want to analyze, send it over the internet to a datacenter where the AI actually lives, and computers perhaps a thousand miles away work at top speed to calculate the result, hopefully getting back to you within a second or two.<\/p>\n<p>It\u2019s not such a problem if you don\u2019t need that result right away, but imagine if you had to do that in order to play a game on the highest graphical settings; you want to get those video frames up ASAP, and it\u2019s impractical (not to mention inelegant) to send them off to be resolved remotely. But improvements to both software and hardware have made it unnecessary, and our ray-traced shadows and normal maps are applied without resorting to distant datacenters.<\/p>\n<p>Farhadi and his team wanted to make this possible for more sophisticated AI models. But how could they cut the time required to do billions of serial operations?<\/p>\n<aside class=\"inset inset-sm inset-section\">\n<section class=\"aside section video-aside crunchreport collapse collapse-adjacent\" data-video-id=\"587ffaed8526314c71faa890\">\n<h2 class=\"collapse-title section-title\">Latest <span>Crunch Report<\/span><\/h2>\n<div class=\"collapse-body cf\">\n<ul class=\"vid-list cf\">\n<li class=\"block vid-feature\" data-lightbox-omniture=\"crunchreport\" readability=\"-2\">\n<div class=\"block block-inset\" readability=\"7\"><a href=\"https:\/\/techcrunch.com\/video\/theranos-closes-its-last-lab-crunch-report\/587ffaed8526314c71faa890\/?ncid=rightrail_cr\"><img decoding=\"async\" src=\"https:\/\/img.vidible.tv\/prod\/2017-01\/18\/587ffaed8526314c71faa890_o_U_v1.jpg?w=300&#038;h=170\" alt=\"Theranos' last blood lab closed after failing inspection | Crunch Report\" data-lightbox-url=\"https:\/\/techcrunch.com\/video\/theranos-closes-its-last-lab-crunch-report\/587ffaed8526314c71faa890\/lightbox\"\/><\/a><\/p>\n<p><h3>Theranos&#8217; last blood lab closed after failing inspection | Crunch Report<\/h3>\n<\/p>\n<\/div>\n<\/li>\n<\/ul>\n<p><a href=\"https:\/\/techcrunch.com\/video\/crunchreport\/?ncid=rightrail_crmore\" class=\"text-btn\" data-omni-sm=\"rightrail_crmore\">Watch More Episodes<\/a><\/div>\n<\/section>\n<\/aside>\n<p>\u201cWe decided to binarize the hell out of it,\u201d he said. By simplifying the mathematical operations to rough equivalents in binary operations, they could increase the speed and efficiency with which AI models can be run by several orders of magnitude.<\/p>\n<p>Here\u2019s why. Even the simplest arithmetic problem involves a great deal of fundamental context, since transistors don\u2019t natively understand numbers \u2014 only on and off states. 6 minus 4 is certainly 2, but in order to arrive at that, you have to define 6, 4, 2, and all the numbers in between, what minus means, how to check the work to make sure it\u2019s correct, and so on. It requires quite a bit of logic, literally, to be able to arrive at this simple result.<\/p>\n<p>But chips do have <em>some<\/em> built-in capabilities, notably a set of simple operations known as <a target=\"_blank\" href=\"http:\/\/whatis.techtarget.com\/definition\/logic-gate-AND-OR-XOR-NOT-NAND-NOR-and-XNOR\">logic gates<\/a>. One gate might take an input, 1 (at this scale, it\u2019s not actually a number but a voltage), and output a 0, or vice versa. That would be a simple NOT gate, also known as an inverter. Or of two inputs, if either is a 1, it outputs a 1 \u2014 but if neither or both is a 1, it outputs a 0. That\u2019s an XOR gate.<\/p>\n<div id=\"attachment_1438106\" class=\"wp-caption aligncenter c4\" readability=\"33\"><a target=\"_blank\" href=\"https:\/\/tctechcrunch2011.files.wordpress.com\/2017\/01\/xnor.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1438106\" src=\"https:\/\/tctechcrunch2011.files.wordpress.com\/2017\/01\/xnor.png?w=1024&#038;h=554\" alt=\"An XNOR gate like this one sends a 1 if the voltage of its inputs matches, and a 0 if they don't.\" width=\"1024\" height=\"554\" srcset=\"https:\/\/tctechcrunch2011.files.wordpress.com\/2017\/01\/xnor.png?w=1024&#038;h=554 1024w, https:\/\/tctechcrunch2011.files.wordpress.com\/2017\/01\/xnor.png?w=2048&#038;h=1108 2048w, https:\/\/tctechcrunch2011.files.wordpress.com\/2017\/01\/xnor.png?w=150&#038;h=81 150w, https:\/\/tctechcrunch2011.files.wordpress.com\/2017\/01\/xnor.png?w=300&#038;h=162 300w, https:\/\/tctechcrunch2011.files.wordpress.com\/2017\/01\/xnor.png?w=768&#038;h=415 768w, https:\/\/tctechcrunch2011.files.wordpress.com\/2017\/01\/xnor.png?w=680&#038;h=368 680w\" sizes=\"(max-width: 1024px) 100vw, 1024px\"\/><\/a><\/p>\n<p class=\"wp-caption-text\">An XNOR gate like this one sends a 1 if the voltage of its inputs matches, and a 0 if they don\u2019t.<\/p>\n<\/div>\n<p>These simple operations are carried out at the transistor level and as such are <em>very<\/em> fast. In fact, they\u2019re pretty much the fastest calculations a computer can do, and it happens that huge arrays of numbers can be subjected to this kind of logic at once, even on ordinary processors.<\/p>\n<p>The problem is it\u2019s not easy to frame complex math in terms that can be resolved by logic gates alone. And it\u2019s harder still to create an algorithm that converts mathematical operations to binary ones. But that\u2019s exactly what the AI2 engineers did.<\/p>\n<h2>The 1 percent<\/h2>\n<p>Farhadi showed me the fruits of their labor by opening an app on his phone and pointing it out the window. The view of the Fremont cut outside was instantly overlaid with boxes dancing over various objects: boat, car, phone, their labels read. In a way it was underwhelming: after all, this kind of thing is what we see all the time in blog posts touting the latest in computer vision.<\/p>\n<p>But those results are achieved with the benefit of supercomputers and parallelized GPUs; who knows how long it takes a state of the art algorithm to look at an image and say, \u201cthere are 6 boats, 2 cars, a phone, and a bush,\u201d as well as label their boundaries. After all, it not only has to go over the whole scene pixel by pixel, but identify discrete objects within it and their edges, compare those to known shapes, and so on; even rudimentary object recognition is a surprisingly complex task for computer vision systems.<\/p>\n<p>This prototype app, running on an everyday smartphone, was doing it 10 times a second.<\/p>\n<p><span class=\"embed-youtube c6\"><iframe loading=\"lazy\" class=\"youtube-player c5\" type=\"text\/html\" width=\"640\" height=\"390\" src=\"https:\/\/www.youtube.com\/embed\/KxDs8G2EsvM?version=3&#038;rel=1&#038;fs=1&#038;autohide=2&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent\" allowfullscreen=\"true\">[embedded content]<\/iframe><\/span><\/p>\n<p>\u201cYou could leave this running for hours on your phone,\u201d Farhadi said, \u201cand we haven\u2019t even optimized it for battery drain.\u201d It\u2019s doing the work of supercomputers, but drawing no more power than a game, and only using a single core of the CPU. A few moments later they showed me real-time object recognition running on a Raspberry Pi Zero, among the simplest and cheapest modern computers available. It was even up on a HoloLens.<\/p>\n<p>They call it XNOR.ai, after the logic gates that power its efficiency.<\/p>\n<aside class=\"inset inset-sm inset-section\"\/>\n<p>Now, this isn\u2019t a miracle technology; It\u2019s a compromise between efficiency and accuracy. What the team realized was that CNN calculations don\u2019t have to be exact, because the results are confidence levels, not exact values. A neural network trained to recognize a boat doesn\u2019t arrive at a single numerical value corresponding to \u201cBOAT.\u201d It just does the math and finds that, while the values shown have a 55 percent similarity to those of a duck, they have an 84 percent similarity to those of a boat. So, boat it is. Probably.<\/p>\n<p><a target=\"_blank\" href=\"https:\/\/tctechcrunch2011.files.wordpress.com\/2017\/01\/xnoraiscreen.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1440957\" src=\"https:\/\/tctechcrunch2011.files.wordpress.com\/2017\/01\/xnoraiscreen.jpg?w=939&#038;h=683\" alt=\"xnoraiscreen\" width=\"939\" height=\"683\" srcset=\"https:\/\/tctechcrunch2011.files.wordpress.com\/2017\/01\/xnoraiscreen.jpg 939w, https:\/\/tctechcrunch2011.files.wordpress.com\/2017\/01\/xnoraiscreen.jpg?w=150&#038;h=109 150w, https:\/\/tctechcrunch2011.files.wordpress.com\/2017\/01\/xnoraiscreen.jpg?w=300&#038;h=218 300w, https:\/\/tctechcrunch2011.files.wordpress.com\/2017\/01\/xnoraiscreen.jpg?w=768&#038;h=559 768w, https:\/\/tctechcrunch2011.files.wordpress.com\/2017\/01\/xnoraiscreen.jpg?w=680&#038;h=495 680w\" sizes=\"(max-width: 939px) 100vw, 939px\"\/><\/a>The team felt sure that the operations resulting in these confidence ratings \u2014 probably a boat, but possibly a duck \u2014 could be replicated in a simpler way (i.e. binarized) without losing too much accuracy. Simplifying the math might do away with 99 percent of the data, Farhadi said, but that\u2019s not a problem if the 1 percent you keep is the only 1 percent that matters. The trouble is figuring out which 1 percent to keep.<\/p>\n<p>The cast-away data would help with the confidence, but it isn\u2019t absolutely necessary; you\u2019d lose 5 percent of your accuracy, but get your results 10,000 percent faster. That\u2019s about the nature of the trade-off made by XNOR.ai.<\/p>\n<p>We didn\u2019t go into the specifics of how this binarization \u2014 if that\u2019s the word \u2014 was achieved, and I don\u2019t suppose I would have understood if we did. The algorithm (or set of them) that converts CNN\u2019s serial math to binary logic is the team\u2019s secret sauce, Farhadi said.<\/p>\n<h2>Spinning off<\/h2>\n<p>XNOR.ai has about a billion applications: object recognition on extremely low-power devices like security cameras, sorting and tagging photos on your phone, accurate local speech recognition and synthesis, and countless other CPU-intensive processes. It could lead to a fundamental shift in the capabilities of many classes of electronics, in the home and in industry.<\/p>\n<p>AI2\u2019s other projects, generally aimed at replicating human intelligence one way or another, have had their source code regularly released and updated, and to begin with XNOR.ai was no different: the code is available on Github and some employees have already split off their own projects from it.<\/p>\n<p>But while the research is open access and the code is free to download, that doesn\u2019t make it a piece of cake to apply to your own project or device. AI2, being a nonprofit, can\u2019t easily do the licensing and support that a potentially major product like this demands. So <a target=\"_blank\" href=\"https:\/\/xnor.ai\/\">XNOR.ai is being spun off as a separate company of the same name<\/a>.<\/p>\n<p>\u201cAI2 has and will continue to spin-off exciting startups to enable AI technologies we develop to see maximum impact,\u201d AI2 CEO Oren Etzioni said in a statement to TechCrunch. \u201cWith XNOR.ai, we feel that commercialization is the best path to seeing the technology reach it\u2019s full potential.\u201d<\/p>\n<p>The new company is in charge of the IP and a revenue-sharing model is in place, though AI2 declined to provide further details. It\u2019s not the first spin-off from AI2 \u2014 KITT.ai, a natural language processing platform, jumped ship last year with some VC funding \u2014 but it is a somewhat different strategy.<\/p>\n<p>It\u2019s impossible to predict how successful XNOR.ai will be, but I\u2019m convinced that the approach it takes is an incredibly powerful one for putting machine learning to work outside its current confines. We\u2019ll be watching the new startup closely \u2014 as well as its inevitable competitors.<\/p>\n<p><small>Featured Image: Bryce Durbin \/ TechCrunch<\/small> <\/p>\n","protected":false},"excerpt":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" width=\"680\" height=\"383\" src=\"https:\/\/tctechcrunch2011.files.wordpress.com\/2017\/01\/ai-platforms1.png?w=680\" class=\"attachment-large size-large wp-post-image\" alt=\"ai-platforms1\" srcset=\"https:\/\/tctechcrunch2011.files.wordpress.com\/2017\/01\/ai-platforms1.png?w=680 680w, https:\/\/tctechcrunch2011.files.wordpress.com\/2017\/01\/ai-platforms1.png?w=1360 1360w, https:\/\/tctechcrunch2011.files.wordpress.com\/2017\/01\/ai-platforms1.png?w=150 150w, https:\/\/tctechcrunch2011.files.wordpress.com\/2017\/01\/ai-platforms1.png?w=300 300w, https:\/\/tctechcrunch2011.files.wordpress.com\/2017\/01\/ai-platforms1.png?w=768 768w\" sizes=\"(max-width: 680px) 100vw, 680px\" \/>&nbsp;Machine learning and AI are incredible tools, but they also require a similarly incredible amount of computing power. If that requirement could be cut by a couple orders of magnitude, AI would be unfettered from its banks of parallel processors and free to inhabit practically any device &#8212; which is exactly what a breakthrough at the Allen Institute for AI makes possible. <a href=\"https:\/\/techcrunch.com\/2017\/01\/19\/xnor-ai-frees-ai-from-the-prison-of-the-supercomputer\/?ncid=rss\">Read More<\/a><\/p>\n<div class=\"feedflare\">\n<a href=\"http:\/\/feeds.feedburner.com\/~ff\/Techcrunch?a=fePISiFUIo4:0tFQR5UoDSs:2mJPEYqXBVI\"><img decoding=\"async\" src=\"http:\/\/feeds.feedburner.com\/~ff\/Techcrunch?d=2mJPEYqXBVI\" border=\"0\"><\/img><\/a> <a href=\"http:\/\/feeds.feedburner.com\/~ff\/Techcrunch?a=fePISiFUIo4:0tFQR5UoDSs:7Q72WNTAKBA\"><img decoding=\"async\" src=\"http:\/\/feeds.feedburner.com\/~ff\/Techcrunch?d=7Q72WNTAKBA\" border=\"0\"><\/img><\/a> <a href=\"http:\/\/feeds.feedburner.com\/~ff\/Techcrunch?a=fePISiFUIo4:0tFQR5UoDSs:yIl2AUoC8zA\"><img decoding=\"async\" src=\"http:\/\/feeds.feedburner.com\/~ff\/Techcrunch?d=yIl2AUoC8zA\" border=\"0\"><\/img><\/a> <a href=\"http:\/\/feeds.feedburner.com\/~ff\/Techcrunch?a=fePISiFUIo4:0tFQR5UoDSs:-BTjWOF_DHI\"><img decoding=\"async\" src=\"http:\/\/feeds.feedburner.com\/~ff\/Techcrunch?i=fePISiFUIo4:0tFQR5UoDSs:-BTjWOF_DHI\" border=\"0\"><\/img><\/a> <a href=\"http:\/\/feeds.feedburner.com\/~ff\/Techcrunch?a=fePISiFUIo4:0tFQR5UoDSs:D7DqB2pKExk\"><img decoding=\"async\" src=\"http:\/\/feeds.feedburner.com\/~ff\/Techcrunch?i=fePISiFUIo4:0tFQR5UoDSs:D7DqB2pKExk\" border=\"0\"><\/img><\/a> <a href=\"http:\/\/feeds.feedburner.com\/~ff\/Techcrunch?a=fePISiFUIo4:0tFQR5UoDSs:qj6IDK7rITs\"><img decoding=\"async\" src=\"http:\/\/feeds.feedburner.com\/~ff\/Techcrunch?d=qj6IDK7rITs\" border=\"0\"><\/img><\/a>\n<\/div>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/feeds.feedburner.com\/~r\/Techcrunch\/~4\/fePISiFUIo4\" height=\"1\" width=\"1\" alt=\"\"\/> <\/p>\n","protected":false},"author":5817,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[25],"tags":[59,66,26],"class_list":["post-331040","post","type-post","status-publish","format-standard","hentry","category-technology","tag-media","tag-techcrunch","tag-technology"],"_links":{"self":[{"href":"https:\/\/people.utm.my\/asmawisham\/wp-json\/wp\/v2\/posts\/331040","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/people.utm.my\/asmawisham\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/people.utm.my\/asmawisham\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/people.utm.my\/asmawisham\/wp-json\/wp\/v2\/users\/5817"}],"replies":[{"embeddable":true,"href":"https:\/\/people.utm.my\/asmawisham\/wp-json\/wp\/v2\/comments?post=331040"}],"version-history":[{"count":0,"href":"https:\/\/people.utm.my\/asmawisham\/wp-json\/wp\/v2\/posts\/331040\/revisions"}],"wp:attachment":[{"href":"https:\/\/people.utm.my\/asmawisham\/wp-json\/wp\/v2\/media?parent=331040"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/people.utm.my\/asmawisham\/wp-json\/wp\/v2\/categories?post=331040"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/people.utm.my\/asmawisham\/wp-json\/wp\/v2\/tags?post=331040"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}