Hey, I'm Tim O'Shea. I'm dual-headed. I'm at Virginia Tech as a researcher, and I also run O'Shea Research and do lots of random software radio security and machine learning sorts of things. I've been working a lot with Guna Radio over the past 10 years or so. Last year, I talked just about Guna Radio. This year, I'm going to switch it up a little bit and talk a little bit more about the machine learning focus and how machine learning is starting to really impact the wireless and software radio world, and talk a little bit about how I think things are going to change over the next couple of years and some of the things that we're starting to do with AI that are pretty cool. What's going on here is, this is, I don't know how many people, raise your hand if you've seen the Google DeepMind Atari paper last year in Nature. Alright, not too many, but a couple. So I'll talk a little more about this later, but this is basically their algorithm running and it plays these games over and over and over again and learns better and better policies where basically the AI is taking in the pixels on this screen and outputting a policy that's like, what button should I press, right? You let this thing run for like a week, or shorter in some cases, it's outperforming a skilled human at the game. And so we're getting to the point in these kind of reinforcement learning algorithms where AI is really starting to do an incredible job at learning these very hard tasks from very limited information just by knowing what its goal is or what its score is. It's a lot faster on a 100,000 node Google cluster. You can actually now, with the latest stuff, you can do this in like eight hours to probably train to better than human levels. This one's clearly not trained, it's not doing very well. If you've noticed. Okay. So that was just kind of eye candy while you were all waiting. And that's not good. Okay. So let's say we want an AI to be able to do everything in the radio spectrum for us. We want to just give it kind of tasks, we want it to go find signals or communicate with something or do any kind of high-level goal you want it to do in the spectrum. How can we get the signal out of the transmitter without writing a whole lot of DSP? And how do we make sense of our surroundings? So if I'm some AI radio, I want to know what's nearby, what's around me, can I talk to them, are they interfering with me, all these sorts of things. I can just clip it here too. All right. I've got something here. Okay, so a lot of these techniques recently have been based on deep neural networks. And so this is just a really, really like a two-minute version of what's going on here. And the idea really is that you build these giant networks, but they're at a simple level. You have a neuron. You have a number of input values, which these are just floating-point values coming in. You multiply them with a bunch of these weight vectors, and you get basically a multiply-sum, and then you go through some activation function here, like a sigmoid function. And this is just kind of a random mapping from inputs to outputs. And so what you do then is you compute a loss function on the output where you say, well, I wanted y to be 2, but I got 3, so, okay, my error is 1, right? And so what you do is you compute the derivative of, you know, what's my— the derivative of the error. You compute the error vector with respect to each weight, and the whole idea of all these neural networks— Do you want me to just switch to the— Let's just pinch and go there. All right. All right. So the idea of back propagation now is you can do that through many layers, right? So each of these neurons has a big weight vector, and you have many layers. And so a year and a half ago, Google put out this thing called Google ANet, and this is actually, like, 43 layers deep. And so each of these boxes is another layer of neurons. And so there's something like, you know, many millions of these weight parameters in this network. And so what you're doing is over many, many images, you're training it, in this case, to classify images by slowly, like, setting all of the weights in that network to turn this into a classifier or a mapping function. So this is kind of the basis for what's going on. There's been a lot that's happened in the past— there's been a lot of people who've done this, and they've done this. what should I do here like, hey, where can I find this? What would you guys consider? And so you're going to have to figure out what's best for you at the moment or what's best for you now. And, in fact, these actually are going to be pretty shorter. You can run on your GPU in a massively parallel way. And so that way you can write NumPy, you can run it at like, you know, seven teraflops on your Titan X GPU. So this allows you to train, you know, when you're fitting those millions of weight vectors, it's really, really computationally complex, so you really need to be able to do this to be able to achieve that. Yeah, and if you want to dive into this, so Keras is a layer on top of these that kind of gives you machine learning primitives, and the examples are really great. All right. So one of the things we started doing with this is let's take a look at how do we identify radio signals. So it used to be we would compute a bunch of different statistics. We would take like the mean, the variance, and the kurtosis of X, the envelope of X, the angle of X. And like X squared, right? So these are moments of a radio signal arriving. And from that, you can come up with these kind of, you know, low dimensionality regions where each like modulation falls, like QPSK and 16 QAM, 64 QAM, right? So you can identify signals that way. With these networks now, you don't necessarily need to do that. So the idea is that if you use these large networks, you can do a lot of your own feature learning. And so you can learn features directly from the radio data without having to hand engineer all of these kind of analytics. So that's been really cool. And if you look at, basically, this is the performance of the classification accuracy versus the SNR of the signal. And so what we can see here is kind of traditional methods that are sitting roughly down here. And we're getting a good, you know, 5 to 10 dB performance advantage. So you can detect and classify signals at lower SNRs when they're weaker, which is really awesome when you're trying to deal with weak signals. All right. So there's a lot of other things you can do. So unsupervised learning is the idea where now we don't have these signal classes we're trying to learn. We're just trying to basically take a signal in the input of this network, and we're trying to recreate it on the output of the network. Now the caveat here is we're going through a smaller representation before we reconstruct it. So what you're doing is you're finding a way to represent a radio signal in a smaller space. So you're doing a dimensionality reduction or trying to find a dense version of a signal. So you're trying to find a way to represent a radio signal in a smaller space. So you're doing a dimensionality reduction or trying to find a dense version of a signal. So you're doing a dimensionality reduction or trying to find a dense version of a signal. So you're doing a dimensionality reduction or trying to find a dense version of a signal. And if you think about it, the most compressed version of a signal is the data bits, right? Because once you have the data bits, you could remodulate and get the same signal, channel information aside. So the goal here is to learn these representations that allow us to take a radio signal off the air and just learn how to get the bits out almost naively without having to write a demodulator or write a synchronizer, right? And so that's really the goal here. And we've gotten a long way. So if you look at complex float representations, you can see that there are a lot of different things around this. So this is just a representation of this 88-sample chunk of a QPSK signal. We've got something like 16,000 bits of information. Once we go through this compressed space, we represent this input signal as this basically 44-bit value. And we do the reconstruction. So you can see a lot of the little noise has been removed because you're pushing it onto this kind of learned manifold within the network, but you're now representing this 16,000 bits within the network. a 44-bit space. So you've really done a lot of compression and you've learned to demodulate the signal a good bit. Now attention models are a huge thing too, so the problem is if you reconstruct it, you're also having to reconstruct what's going on in the channel. So you have to like reconstruct the phase and the frequency offset and the impulse response that was on that signal when it arrived. So what people are doing now, and if you look, Google's actually done this now in Street View. So if they want to put in like a 10,000 by 10,000 pixel image, they can't just throw it into one of these networks and hope it comes out with the right number on the house, right? What they do is they have an attention model, which the first part of the network here, this localization network, its job is to figure out where the numbers are in the image and kind of extract a little patch here, like this guy, and then this classification network then decides what number it is. So this sort of attention model is becoming really, really powerful in machine learning, and in imagery we're using it to extract these 2D patches, but in wireless we can use this exact same method to use an attention model to remove random phase frequency and time offsets. So really what we're doing here is this is a model where we can just learn how to do synchronization naively, so we don't have to write all of these very tedious phase lock loops and synchronizers anymore. So we've started doing this. This is from some work we did where basically we were able to do a lot of synchronization, and we were able to do a lot of synchronization. So we've started doing this. This is from some work we did where basically here we have our localization network where it's trying to estimate the phase and frequency and time of arrival. It goes through some transforms here that correct the data so they apply the right frequency phase and time offset, and then we're going through our network here which classifies, right? And so you can see here a little bit, so it's not perfect, so we're not doing synchronization on the level that you would with an expert algorithm yet. We're getting towards there, but we do have a lot more energy kind of centered around traditional constellation points here that you can see from kind of the color density. So this whole idea of learning to synchronize is definitely starting to, you know, become a reality slowly. All right, so generative models are really cool. So one of the things about these networks is you can use them to classify a signal or to receive information. You can also kind of run it the other way and generate information. So this is an example of a paper from this year where people put basically thousands of pictures of bedrooms into a neural network, and so the network learned what a bedroom looked like, and then they ran it backwards basically and said generate me random pictures of bedrooms. Subtitles by the Amara.org community Handwritten digits, and we're running a GAN just like this, and generating things that look like handwritten digits, but these are just generated from noise, right, so the computer just made these up. And you can do the same for radio signals, right, so it's actually in some ways a smaller space than imagery, so we can go and generate random signals that look like what you would see over the air this way. All right, so how do we make sense of our surroundings? This is perhaps the most common way. Load phosphor and look at the spectrogram and, you know, look for energy, right? And so the problem with that is, okay, we're using our brain, right, so we're looking at this spectrogram and we're looking for energy, so we're looking for our, here's a line, there's a signal here, here's a pulse guy, there's some kind of TDM signal here, so this is a great way to look at it manually, but really we want to start automating that, right? And a lot of people, when they start going to write a signal detector, will start saying, all right, well, I can put a threshold or I can, you know, look for a line in the spectrum, and we start kind of building heuristics or using, writing kind of logic machines that go and they have thresholds and peak finding routines. And they're all very specialized, right, and tuned by the creator, and so they're kind of brittle. They don't generalize very well. As soon as you, like, switch domains or frequencies or radios, a lot of that stuff doesn't hold up too well. So what we'd really like to do is not have to orchestrate all that. We would rather just kind of learn that behavior for ourself. So this is where kind of the reinforcement learning comes in that we started with, right? So I talked about the Atari stuff. How many people here watched the... The AlphaGo vs. Lee Sedol Go match? All right. A couple. So that was also absolutely incredible. Since then, AlphaGo is now the number one ranked Go player in the world. And this is just an AI running reinforcement learning. A very big one in a Google data center, but either way, right? So the whole idea here is that you have this loop, right, you have some environment where you're taking observations of the environment. You're saying, you know, what do I see? And then your agent is choosing an action. So should I tune somewhere? Or in the case of Go, you know, where should I put my piece, right? Or in Atari, what button should I press? And so you can basically put any environment you want here, and then your agent can learn a policy to try to improve his rewards within that environment, right? And so this has been done for Atari. Atari, AlphaGo, they're now using it in data centers to reduce power usage. So I think this was, like, a couple weeks ago, Google announced that they're putting it in control of all of the fans and HVAC and clock speeds and stuff in their data center. And since it's such a highly complex system, you really can't get there with heuristics that are manually tuned in these kind of really brittle systems. But if you put a reinforcement learning engine in charge of it, it does a great job of figuring out exactly how to control all those, you know, millions of programs. And it also, like I said, will give you an idea of how you want to use it, you know, the performance that you want to use it to, you know, actually support all of the Start on your base. You know, say, let's go into a studio, and, you know, you're going to get where you want to do this, you know, a lot of those standards have been very, very good. And you know, you're going to get there, where you go and do what you want to do, and that's going to be the same thing for most of my projects. And that's how you're going to get there. the environment and i let it go figure out a policy on its own so in doing this the idea here is you have some receiver that may be like a 10 or 20 megahertz wide receiver and he's got a scan over you know 100 or 200 megahertz of spectrum to figure out what's there and so here your discrete controls that this guy's in charge of are basically tuning up and down moving the bandwidth up or down deciding that there is a signal within the current band or not right and the goal here is well how quickly can this agent scan through the spectrum and identify all of the signals that are there without false positives right and what's really cool is if you let this thing train for a while he gets better and better and he eventually finds a policy that's pretty efficient and there's really no specialized code that's going to be able to figure out what's going on in the spectrum and it's a pretty good idea to just go ahead and do that and if you're looking at your own code there it can generalize fairly well now to all sorts of different radio environments you might want to put it in alright so there's nothing in this repo right now but there will be soon and this is basically so so Jim is sorry open AI is something that I think like Elon Musk and Google and Facebook all got together and said here's a billion dollar endowment start a non-profit to make AI better for the world and so that's what open AI is and you can use it you can use it to do anything you want to do with a is and one of the first things they published was this thing called gym which is basically a big collection of these environments that you can test reinforcement learners in so it's a great API and so we can start building these radio environments in the gym API and so now this is this is basically going to hold a collection so I have a few I'm gonna push up there like this search task all right so there's also so the reinforcement learning algorithms are quite complex and no one really wants to reimplement them so I've done a lot of writing them and also kind of looking other projects that are out there and trying to kind of compile a useful tool to generate these kind of reinforcement learning policies based on a lot of the published algorithms that are out there and so this tool Kerala is up there if you want to play with it you can start we'll be able to start running it on these radio environments and so in summary I think these techniques are really you you you here you can can find I mean these don't worry about either software WiFi battery or if you looked into several different technologies they'reogn our there's various and there's a variety and I think there was another detective window uh Anyway, it's not clear exactly how quickly, but this is definitely starting to take off and be of interest to a lot of people. Yeah, so we're becoming less relevant, and let's just let Backprop do whatever it can. I think it's going to make it a lot easier to build these systems by letting you offload a lot of the lower-level tasks. So we end up doing more curating of the environment and the high-level goals and kind of the system structure and maybe having to do less writing manual DSP ourselves. Right, and so a lot of this stuff, I didn't talk about Gunneradio a lot, but almost all of this stuff, I'm using Gunneradio as a backend to kind of generate datasets. One of the things that's really nice is Theano and TensorFlow are both this Python numpy, and you can drop it right into a Gunneradio. Python block and integrate it really easily with a flow graph or a live radio. And so Gunneradio is a huge enabler of being able to do this as well. And that's it. So the other thing I wanted to say is, and I don't know if I'm stealing Tom's thunder back there, but I know DARPA has announced their Spectrum Communications Challenge. And so if you guys saw the competition yesterday. It was a really cool thing to look for in the future. And that's it. So, thank you. Thank you. Thank you.