Carbon-Efficient Neural Architecture Search
This transcript was made by AI. The open source speech recognition model Whisper (large-v3-turbo) transcribed the recording with faster-whisper. Names and technical terms were checked against the paper, but it can still contain mistakes. The recording is the reference.
0:00 Good afternoon, everybody. So today I'm going to talk a little bit about our recent work on carbon-efficient neural architecture search. So this is a joint work with my PhD student, Yiyang Zhao, and unfortunately, he cannot present due to visa issues.
0:17 Right, so let's start by looking at a very simple diagram of, you know, what is neural architecture. I'm sure most of you have already known. Otherwise, it's going to be an hour-long presentation, not just 12 minutes. But I will be brief. For the purpose of our work, right, so all that matters is that, you know, for neural architecture search, we look at neural architecture, and what we all care about is, you know, the connections here, right, so the lines, and as well as the operators. So in a sense, right, so neural architecture search is about finding the best combination about connections and the operators, so the block and the lines, so then you can have a neural architecture that has good accuracy. So usually single-objective, right, in that case. Okay? All right.
1:10 So having that in mind, right, so increasingly, you will see that more people are looking into multi-objective neural architecture search. That means that in order, in addition to worry about accuracy, right, inference accuracy, you also worry about other performance for neural architectures. For example, given an AI task on the left and also the device, if you want to perform a multi-objective NAS, right, so you could worry about the deployment latency. So how long does it take for an inference request to run on the device, right, so those are the hardware constraints. So having said that, right, so if we look at this end-to-end pipeline here, what NAS really is at the very high level is you take the devices, you take the application domain on the left here, right, and then you have this manual process of defining a search space, right?
2:06 Essentially, you can think about search space as, in this case, a fully connected graph is a huge graph because usually for a reasonable search space, you can have millions of or millions of architecture you need to train and evaluate and select the one that's, you know, shoots your optimization goal, right? So in that sense, right, so really a lot of work from the sort of the AAA or AI community is focusing on trying to understand how do you actually design a search algorithm that can search, traverse this search space really fast, right? So then you could, let's say, instead of spending 100 GPU hours, you only spend one GPU hour, and you can still find the best architecture you're looking for, right? So that's sort of the NAS in a nutshell, right?
3:05 I apologize for the slides. My student was, I'm grateful that he made a slice for me, so I have given this talk before. I'm trying to make sure that I'm clicking through everything. There's no, like, skipping button for me on the left here usually if we have the connectors here. So just bear with me here a little bit. So the object really is, you know, if we want to have latency or energy in this case, right? So then we are trying to define a reward function, for example, in a search algorithm, and then for a given architecture, right, you train it in the normal way. So you are trained to converge, right, usually. And then you would take that architecture, and you run it on validation set.
3:47 You're going to get a latency, energy, or accuracy metrics of the architecture. And then depending on whether that shoots your feet, goals, that in essence, meaning, you know, whether it be state of art, for example, then you're going to redo the same process over and over again. So as you can see, this can be a very energy or carbon-intensive process, right? So the intensity really comes from we have to repeat the process over and over again, right? So it's not just you train once, and then you will have the architecture you're interested in, right? However, in this paper, in this work, what we are looking at is, well, given this sort of understanding about how NASs work, right? So we found that, in fact, that not all the NAS tasks or steps I'm showing you are equally energy-consuming, meaning that some tasks can be, you know, consume a little bit more energy, some will consume less, right?
4:53 So I'm going to show you in the next couple of slides and what those are. So that's one of our opportunities, right? So if there is some disparity there, then one of the intuitive idea is that can we actually choose what steps that consume less energy, therefore, you know, less carbon in that case, okay?
5:12 Right, so it turns out, right, so if we can just divide those steps into two, you know, roughly speaking, two different set of tasks, one we call them the low-energy task, and the other one is going to call the high or low-energy task, right? It turns out that search algorithm I just talked about, and then search, defining the search space, and also trying to understand the AI task application domain, those will usually consume less energy in the measure of the GPU hours, okay? And then in terms of the performance evaluation strategy, meaning that to understand whether a architecture that is actually good or not, right, good or not, usually it could be accomplished in many ways. You can either do it in a way that's called one-shot NAS, right?
6:03 So I'm going to talk a little bit about that in a bit, right? So then that can be low-energy task, or you can do something called vanilla NAS, right? So in that case, it can be high-energy consuming, right? So the yellow part is what you ideally will pay attention here, right? Because there are options here, now the intuitive idea is that can we actually choose what to use given the carbon emission that comes with the energy, right? So just briefly, right, so vanilla NAS and one-shot NAS is a common practice to trying to sort of evaluate once your search accuracy and give you a candidate, right? So how good this candidate is, right? So you might wonder why one is consuming more energy than the other, right?
6:51 So the output is going to be the same, whether it's going to be good or bad architecture, okay? It turns out, right, so for NAS, vanilla NAS, it is energy-consuming simply because, right, so it has to, for each architecture candidate, right, it has to train every network from the scratch, so here it just, the red dot just means that all the parameters are trained to converge. Because of the training, millions of architectures, then it will be very time-consuming because of the accumulative effects. On the right-hand side, right, so if we have one-shot NAS, essentially what happens is you're going to take the super nets, super network, so what we usually call the super nets on the right side here, right, so instead of training millions of networks, all you do is you train one super nets, super nets here, right, and in order to evaluate a candidate architecture, all you do is you transfer the weights from the super nets to the architecture based on the connection operators we talked about before, and then you run those in the validation sets, and you will get the accuracy, right?
8:02 So as you see, the reason that one-shot NAS consume less energy and therefore can be carbon efficient is because, right, so it doesn't need to train millions of networks, right? So what is the catch here, right? It turns out, right, so because on the right side, the super nets is actually, in a sense, a predictor, right, so it is not really understanding what accuracy it is. It is simply trying to approximate what the accuracy of each network, right? So here on the middle, we are showing you that we are taking both one-shot and vanilla NAS, and to compare to their estimated or their understanding of what good architecture is, right? So an ideal estimation should be along the line because the x-axis is the ground truth accuracy, and y-axis is the evaluated accuracy, as you see here, right?
9:00 So the trick really is one-shot NAS is not accurate, right? So intuitively, that means, sure, you can evaluate very fast, but since you are not evaluating, you know, generating good evaluation prediction results, that means that, you know, the search algorithm could be misleaded, could be mislead, right? So then they can spend more time searching, right? So that's sort of the idea. So we have two different algorithms, but they have their own pros and cons, right? On the other hand, so briefly, right, so we also see there is temporal and spatial carbon emission differences between, from the grid when you use the electricity. So that's sort of the opportunity here. So in a sense, the high-level idea we're trying to sort of evaluate in this paper is, well, given that we have high energy and low energy tasks, and also given that the carbon emission is actually changing along the time axis, we're not looking at spatial yet, geographic yet, right?
10:04 So time variant, right? So that means that we actually could have the opportunity to schedule different tasks based on different carbon emission, right, while also being aware of the accuracy and the search efficiency trade-off, right? So this is a very application-specific optimization we're trying to do for NAS framework, right? So I'm going to simplify this even further to say that the key idea of our project really is, if you really boil it down, is to try to understand when you are given a cluster of GPU servers, how do you actually allocate the tasks? So one-shot NAS and vanilla NAS to the GPU resources. And intuition here is that when sort of carbon emission is high, we're going to use less computation resources for high-energy tasks and vice versa for the low-energy tasks, right?
11:02 So very simple idea. Okay? Right. So the reason I said it is sort of a resource allocation or scheduling problem is because if you look at this right-side part, very specific to the NAS, what happens is that when we're doing the search and sampling, a lot of architectures will be chosen by your search algorithms, right? So depending on what search algorithm you use, you're going to pick those blue architectures. So those could be either trained to converge again or evaluate directly. So when you don't have, when you have high carbon emission, what you could do is that you just don't train them to converge, you just use the predictor, right? So, but if you actually have low carbon emission, all you do, all you can do is that you can just dispatch them to the available GPU servers here and then train them to be the yellow ones.
12:02 That means that means they're trained, right? Right. So having said that, right, so there's a little bit integration with our firework in how to actually make search faster by learning a space partition. So I encourage you to check out this paper from ICLR 2022 if you're interested in it, right? Okay. So this is sort of the overall architectures, the framework we're envisioning. We currently have built the pipeline. And for this part, the right part I'm showing you here, this is currently still in a simulator. So the reason I'm going to show you is the trace-driven simulations. So the goal here is we're trying to understand is that by using very simple GPU allocation strategy, whether we could actually achieve state-of-art architecture result in terms of the multi-objective result, as well as, you know, whether we could actually reduce the carbon emissions.
13:03 Okay. Okay. So we use the carbon traces from the electricity map, two different traces around 24 hours. Just to show some diversity, because they have different variations in terms of the average intensity. So this is our key results here. The one you can pay attention to here is there's y-axis is the metric for multi-objective metrics, which is hypervolume, basically, right? So in this case is the hyper, so sort of the log hypervolume is the lower, the better, right? So the reason we're showing the log and the differences is because we're trying to sort of zoom in here to let you see that once the time, so those x-axis is the time for searching. So once the time goes on, right? So our approaches here, the blue lines actually reduce the hypervolume, means that the search efficiency, right?
14:05 The result is pretty good compared to the green and the red line. And the yellow line is the one that we're trying to approximate because that's the vanilla sort of NAS, which trains every architecture from scratch, right? So as you can see here that we also compare the carbon emission, right? So from searching these 35 hours, right? So our approaches actually have around sort of 30% of the carbon emission compared to the vanilla. So it is sort of the trade-off between, you know, we sacrificed a little bit of the multi-objective metrics, but at the same time, you know, we are reducing the carbon significantly, right? So with that, I'm going to stop here and then happy to take any questions. Thank you.