brainsteam.co.uk/new_files/public/2019/06/20/how-can-ai-practitioners-re.../index.html

170 lines
18 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge"><title>How can AI practitioners reduce our carbon footprint? - Brainsteam</title><meta name="viewport" content="width=device-width, initial-scale=1">
<meta itemprop="name" content="How can AI practitioners reduce our carbon footprint?">
<meta itemprop="description" content="In recent weeks and months the impending global climate catastrophe has been at the forefront of many peoples minds. Thanks to movements like Extinction Rebellion and high profile environmentalists like Greta Thunberg and David Attenborough as well as damning reports from the IPCC, it finally feels like momentum is building behind significant reduction of carbon emissions. That said, knowing how we can help on an individual level beyond driving and flying less still feels very overwhelming."><meta itemprop="datePublished" content="2019-06-20T09:18:40&#43;00:00" />
<meta itemprop="dateModified" content="2019-06-20T09:18:40&#43;00:00" />
<meta itemprop="wordCount" content="1479">
<meta itemprop="keywords" content="AI,climate catastrophe,climate change,machine learning,nlp," /><meta property="og:title" content="How can AI practitioners reduce our carbon footprint?" />
<meta property="og:description" content="In recent weeks and months the impending global climate catastrophe has been at the forefront of many peoples minds. Thanks to movements like Extinction Rebellion and high profile environmentalists like Greta Thunberg and David Attenborough as well as damning reports from the IPCC, it finally feels like momentum is building behind significant reduction of carbon emissions. That said, knowing how we can help on an individual level beyond driving and flying less still feels very overwhelming." />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://brainsteam.co.uk/2019/06/20/how-can-ai-practitioners-reduce-our-carbon-footprint/" /><meta property="article:section" content="posts" />
<meta property="article:published_time" content="2019-06-20T09:18:40&#43;00:00" />
<meta property="article:modified_time" content="2019-06-20T09:18:40&#43;00:00" />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="How can AI practitioners reduce our carbon footprint?"/>
<meta name="twitter:description" content="In recent weeks and months the impending global climate catastrophe has been at the forefront of many peoples minds. Thanks to movements like Extinction Rebellion and high profile environmentalists like Greta Thunberg and David Attenborough as well as damning reports from the IPCC, it finally feels like momentum is building behind significant reduction of carbon emissions. That said, knowing how we can help on an individual level beyond driving and flying less still feels very overwhelming."/>
<link href='https://fonts.googleapis.com/css?family=Playfair+Display:700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" media="screen" href="https://brainsteam.co.uk/css/normalize.css" />
<link rel="stylesheet" type="text/css" media="screen" href="https://brainsteam.co.uk/css/main.css" />
<link id="dark-scheme" rel="stylesheet" type="text/css" href="https://brainsteam.co.uk/css/dark.css" />
<script src="https://brainsteam.co.uk/js/feather.min.js"></script>
<script src="https://brainsteam.co.uk/js/main.js"></script>
</head>
<body>
<div class="container wrapper">
<div class="header">
<div class="avatar">
<a href="https://brainsteam.co.uk/">
<img src="/images/avatar.png" alt="Brainsteam" />
</a>
</div>
<h1 class="site-title"><a href="https://brainsteam.co.uk/">Brainsteam</a></h1>
<div class="site-description"><p>The irregular mental expulsions of a PhD student and CTO of Filament, my views are my own and do not represent my employers in any way.</p><nav class="nav social">
<ul class="flat"><li><a href="https://twitter.com/jamesravey/" title="Twitter" rel="me"><i data-feather="twitter"></i></a></li><li><a href="https://github.com/ravenscroftj" title="Github" rel="me"><i data-feather="github"></i></a></li><li><a href="/index.xml" title="RSS" rel="me"><i data-feather="rss"></i></a></li></ul>
</nav></div>
<nav class="nav">
<ul class="flat">
<li>
<a href="/">Home</a>
</li>
<li>
<a href="/tags">Tags</a>
</li>
<li>
<a href="https://jamesravey.me">About Me</a>
</li>
</ul>
</nav>
</div>
<div class="post">
<div class="post-header">
<div class="meta">
<div class="date">
<span class="day">20</span>
<span class="rest">Jun 2019</span>
</div>
</div>
<div class="matter">
<h1 class="title">How can AI practitioners reduce our carbon footprint?</h1>
</div>
</div>
<div class="markdown">
<p>In recent weeks and months the impending global climate catastrophe has been at the forefront of many peoples minds. Thanks to movements like <a href="https://www.standard.co.uk/news/london/extinction-rebellion-activists-block-major-roads-in-north-london-in-latest-stunt-a4171456.html">Extinction Rebellion</a> and high profile environmentalists like <a href="https://www.theguardian.com/world/2019/mar/11/greta-thunberg-schoolgirl-climate-change-warrior-some-people-can-let-things-go-i-cant">Greta Thunberg</a> and <a href="https://www.bbc.co.uk/news/entertainment-arts-47988337">David Attenborough</a> as well as damning reports from the <a href="https://www.theguardian.com/environment/2018/oct/08/global-warming-must-not-exceed-15c-warns-landmark-un-report">IPCC</a>, it finally feels like momentum is building behind significant reduction of carbon emissions. That said, knowing how we can help on an individual level beyond driving and flying less still feels very overwhelming.</p>
<h3 id="the-energy-issue">The Energy Issue</h3>
<p>A recent study by <a href="https://arxiv.org/abs/1906.02243">Strubel et al. (2019)</a> gave insight into exactly how much energy certain neural architectures require to train. Their findings show that training some of the largest and most complex neural models and neural architecture search (in which multiple models are trained and measured against a fitness function to find the most performant model for a given task) consumes huge amounts of energy. Assuming that energy came from fossil-fuel power plants, a fair assumption since most researchers are using cloud providers like AWS and GCP which rely largely on carbon-generated electricity, the models are producing more CO2 pollution than a car produces in its lifetime.</p>
<p>Predictably, mainstream media misconstrued the findings and articles proposing abandonment of deep learning as a field started to surface (see Charles Radclyffes Forbes article: <a href="https://www.forbes.com/sites/charlesradclyffe/2019/06/10/ais-dirty-secret/#3ba5ac665331">AIs Dirty Secret</a>, <a href="https://www.forbes.com/sites/charlesradclyffe/2019/06/10/ais-dirty-secret/#3ba5ac665331"></a>if AI really does burn this much electricity, then maybe we should just pull the plug if were serious about climate change?”).</p>
<p>My biggest objection to this conclusion is that it is based upon the notion that all AI is this power hungry. As I said above, Strubels study is based on some of the biggest and most complex models in the field today. My intuition would be that most data scientists and AI researchers are not training models anywhere near this big and for many data problems it is not even necessary to use deep learning (as I discuss below).</p>
<p>My second objection to this notion that we should scrap AI is that we necessarily dismiss any and all potential benefits of continuing to develop models that reduce energy consumption by optimising <a href="https://www.datacenterdynamics.com/analysis/the-machine-itself-the-state-of-ai-in-the-data-center/">data centres</a>, <a href="https://www.logistics.dhl/content/dam/dhl/global/core/documents/pdf/glo-artificial-intelligence-in-logistics-trend-report.pdf">logistics routes</a> and even <a href="https://www.newtonx.com/insights/2018/08/21/ai-machine-learning-power-grid/">energy grids</a>. In the future the mass adoption of self driving tech could save vast amounts of energy by removing erratic human drivers from the road with their fuel-hungry acceleration and braking behaviours. No more human drivers? Less need for traffic control measures which force millions of us to slow down and speed up every day burning large amounts of fuel that wouldnt be needed if we maintained a steady speed. None of this would be possible if we just stop trying to improve deep learning approaches overnight.</p>
<p>The BERT language model, one of Strubels worst offenders is, at the time of writing, the state of the art approach for a number of natural language processing tasks. What if BERT-based models powering chatbots and smart speakers could help consumers to make better purchasing decisions and prevent thousands of packages from being shipped and then returned on gas guzzling lorries, planes and cargo ships?</p>
<p>20 years ago most of us had power hungry CRT monitors and TVs that weve since replaced with <a href="http://energyusecalculator.com/electricity_lcdleddisplay.htm">more efficient LCD and LED displays</a>. We were using incandescent lightbulbs that <a href="http://energyusecalculator.com/electricity_ledlightbulb.htm">use 6x more electricity than a modern bulb and need replacing a order of magnitude more frequently</a>. Our renewable generation technology has come on leaps and bounds with solar panels becoming <a href="http://sitn.hms.harvard.edu/flash/2019/future-solar-bright/">significantly cheaper and more efficient over the last 20 years.</a> My point here is that humans are pretty good at improving the energy efficiency of our inventions. Im sure most readers who frequently sit in their electrically lit living room at 10pm at night watching a flat screen TV or scrolling on an OLED touch screen on their smartphone are glad that we didnt give up on these technologies because CRT screens and incandescent bulbs are to energy hungry.</p>
<h3 id="what-can-the-ai-community-do">What can the AI community do?</h3>
<p>There are a number of things that the AI community can do to help reduce their carbon footprint. Some are simpler and more straight forward, others are a little more involved.</p>
<h4 id="kiss-8211-keep-it-simple-stupid">KISS Keep it simple stupid!</h4>
<p>When youre building ML models always start with a simple model first. It may be tempting to charge in with a deep learning model immediately but these models are slow to train, prone to overfitting due to their complexity and of course energy hungry. Aside from apeasing the marketing department, there is absolutely no advantage to using a deep learning model before youve even tried Logistic Regression or, whoa dont go too crazy now, a random decision forest!</p>
<p>Even if you train a few different simple models with different data folds and hyper parameters youll probably find it quicker and a less energy hungry starting point. Of course if simple models dont work, deep learning is a good option.</p>
<h4 id="pre-trained-models-and-transfer-learning">Pre-trained models and transfer learning</h4>
<p>This could apply to both simple models (well kinda) and deep learning models.</p>
<p>It is well known by now that the best way to get near state of the art performance for classification tasks in NLP and computer vision is to take a pre-trained model like <a href="https://github.com/google-research/bert">BERT</a> or <a href="https://github.com/tensorflow/models/tree/master/official/resnet">ResNet</a> and “continue” training by updating the last few layers of the neural model with new weights.</p>
<p>Unless youre a multi-national or a top tier research institute with lots of money and data to throw at training then trying to train one of these systems from scratch may be a waste of time and energy anyway (I said may be, not always. If youre working on new state-of-the-art models then I salute you! We should always strive to better ourselves!).</p>
<p>You can also combine the KISS approach with pre-trained weights. You can achieve some <a href="https://arxiv.org/abs/1805.09843">really great text classification results</a> by using pre-trained word embeddings like <a href="https://nlp.stanford.edu/projects/glove/">GloVe</a>, <a href="https://code.google.com/archive/p/word2vec/">word2vec</a> or <a href="https://fasttext.cc/docs/en/english-vectors.html">fastText</a> with a linear classification model like SVM.</p>
<h4 id="scale-down-big-data"><strong>Scale down big data</strong></h4>
<p>If youre developing a model and working with a massive dataset, you might consider training on a small but representational subset of the data. Youll need to be very careful about this, especially if your dataset is not well balanced or has very rare features (in NLP this could be words that are important but only occur in a tiny proportion of documents). However, if you know that youre likely to need to change the model 10 more times before you calculate your final performance metrics, it might (but wont always) makes sense to train it on 10,000 samples instead of 100,000 samples.</p>
<p>If youre building models that use a gradient descent or evolutionary training approach then you could also limit the number of epochs during development of your model.</p>
<h4 id="give-patronage-to-8220green8221-hosting-providers">Give patronage to “green” hosting providers</h4>
<p>Big companies are not always the most transparent so this suggestion could be trickier. That said, taking your money where the ethical hosting is could be a good way to reduce your models carbon footprint. Especially if you are one of the pioneers working on massive models that use a lot of electricity. Hardware is an important consideration too. GPUs have been a key tool in the evolution of deep learning over the last 10 years but it turns out that <a href="https://cloud.google.com/blog/products/gcp/an-in-depth-look-at-googles-first-tensor-processing-unit-tpu">TPUs are better suited to deep learning and much less energy</a> hungry with that.</p>
<h4 id="controversial-suggestion-carbon-reporting-in-ai-and-ml-scientific-publications">Controversial Suggestion: Carbon Reporting in AI and ML Scientific Publications</h4>
<p>This ones probably going to be a divisive suggestion but what if we could get all the big ML academic conferences to require some basic calculation of energy usage with all new model architecture submissions? The idea is to introduce a race to the bottom for AI model power consumption. A model that uses 100x less electricity and achieves near state-of-the-art performance would be much more interesting than one that improves state-of-the-art performance by 0.1%</p>
<p>Im well aware that this solution is far from perfect given cloud hosting transparency concerns (see above) and conference organisers would have to think carefully about how to set up peer reviews in a way that avoids always rewarding energy efficiency at the expense of model task performance.</p>
<p>I guess another approach could be an international conference for energy efficient machine learning systems. Id be interested in whether theres enough interest in such a conference from the academic community that Id seriously consider organising such an event. Also if one already exists Id be interested in participating.</p>
<p>If youd like to discuss the above Im on twitter <a href="https://twitter.com/jamesravey">@jamesravey</a></p>
<h2 id="conclusion">Conclusion</h2>
<p>In closing, Im really glad that Strubel et al have brought this issue to the forefront of our minds and that the work has picked up so much attention. Rather than panicking and downing our tools, I think its important that we remain optimistic about AI and the huge advantages that it can bring and that we try to be as considerate as possible of environmental factors whenever we develop new approaches.</p>
</div>
<div class="tags">
<ul class="flat">
<li><a href="/tags/ai">AI</a></li>
<li><a href="/tags/climate-catastrophe">climate catastrophe</a></li>
<li><a href="/tags/climate-change">climate change</a></li>
<li><a href="/tags/machine-learning">machine learning</a></li>
<li><a href="/tags/nlp">nlp</a></li>
</ul>
</div><div id="disqus_thread"></div>
<script type="text/javascript">
(function () {
if (window.location.hostname == "localhost")
return;
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
var disqus_shortname = 'brainsteam';
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the </a></noscript>
<a href="http://disqus.com/" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
</div>
<div class="footer wrapper">
<nav class="nav">
<div>2021 © James Ravenscroft 2020 | <a href="https://github.com/knadh/hugo-ink">Ink</a> theme on <a href="https://gohugo.io">Hugo</a></div>
</nav>
</div>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
ga('create', 'UA-186263385-1', 'auto');
ga('send', 'pageview');
}
</script>
<script async src='https://www.google-analytics.com/analytics.js'></script>
<script>feather.replace()</script>
</body>
</html>