Yeah, welcome, everyone.
I'm going to talk today about machine learning on air
and give you an overview about available frameworks and toolboxes
that you can use to improve your own DSP and radio communications.
So, I had a small lie on this slide
because there will be no transmission over air today.
So, all I'm going to talk about is mostly offline optimization
and also the talk is mostly focused on communication.
So, that's what my understanding of DSP and radio is
or when I combine both.
So, yeah.
First of all, who am I?
So, I started using radio sometime 2015
then I worked at this small SDR company
or did an internship there.
Then I became involved with the radio project
and did like some code contribution
and also today I still am responsible for some stuff there.
And then 2019 I finished my masters
and worked a little bit at ESA
and I was happy to also have been organizing
a pre-fossed them, heck,
a radio hacking event at ESA
and since 2001 I'm actually working
with machine learning on communication.
So, that was also my first exposure.
So, you're a little bit seeing the last four years
what I've learned.
All right.
So, short overview what you're going to talk about.
First, I want to give you a little bit of introduction
into machine learning for digital signal processing and radio.
Then present to you some of the toolboxes
that you can use to run optimization for the file
and then give you a short tutorial like a small example
that you can also replicate or use the public code
that I uploaded to use the starting point
to use these toolboxes.
So, first, yeah.
So, first, what is AI and machine learning?
So, right now there's a lot of craze and hype
about AI, everyone wants to do it.
Nobody really knows what it is.
So, I want to clarify that
I'm not going to talk about how to use LLMs
to improve your communications or to have
them design your algorithms.
I'm not going to talk about any AI agents
that's also going to do the coding for you.
Yeah.
Also, no using of APIs of chatboards
to come up with clever DSP algorithms.
Oh, there's a point missing,
but we're going to talk about how to apply
the machine learning principles to improve the algorithms itself.
So, there will be a little bit of math.
Oh, yeah.
So, it's not going to be chat.
Yeah.
That's the point.
So, we'll look at the communication system
and see how we can use some of the open source tools
to apply machine learning in the different parts of our system.
So, first of all, what is machine learning now?
So, there's like an old quote from this book.
Basically, we want a computer program
and we want to feed it some experience E
and define some task T it has to solve
with respect some to some performance measure P.
So, it's a very basic definition
and it should improve the performance
with if you provide more experience.
So, this kind of data driven approach.
And actually, if you think about it more closely,
this means that we already had machine learning
and communications for a long time.
I will give you an example
in some other slides.
So, first of all, this is like a schematic
representation of how a communication system
roughly can look like.
So, you start in the top left with a data source.
So, you have some bits you want to transmit
in a digital system like a picture of pictures or videos or emails.
You compress them.
You put them to some forward error correction
and then you get this capital B and not capital
but the bold B, which we later will also use.
And our system then we map them
with some representation for the physical space
like amplitude shift keying, phase shift keying,
QAM, FSK, different modulation formats.
We put it through some pulse shaping
to put it on the physical medium
and send it to some channel.
I don't know.
It cannot be anything.
Can be wireless.
Can be a satellite.
Communication channels, cables, cyber optical.
It doesn't really matter.
But, some channel.
And the receiver.
We have to somehow get rid of all the channel effects.
We have to synchronize our signal again.
And then after that we get some sort of X hat
which is should represent as closely
to this original X that we got out of the symbol map.
And then our D map will give us
nowadays mostly or oftentimes soft values
which we call these kind of L values,
or look exactly at ratios.
And then we put them to channel decoder, decompress it.
And then at the receiver,
we hopefully have no errors or like a very low bit error rate.
So this is more or less the definition of the system.
And if you want to now apply machine learning,
you basically have to define either.
You want to replace the whole transmitter chain,
everything.
So you just feed bits and get almost physical
signal out or you can also replace single blocks out of this
with neural networks or with other approaches
that have a trainable parameters.
And then you can define the task.
You define the performance measure.
I'm going to show you some of the ones
that you can use for communication.
So that I commonly use for communications.
And then you do data-driven simulation.
So generate bits according to either uniformly distributed
or maybe you have some other patterns that are in your data
that you can also feed in this data source.
And you compute this loss or the performance measure
and then you compute the gradient of this objective function that you have.
And the way you do it and the way I'm going to present today
is numerically and you use commonly known frameworks
which provide us this automatic differentiation.
So it's not always easy from the data sink and the receiver
to calculate the gradient all the way to the source by hand
or analytically sometimes not possible.
So we rely on this automatic differentiation
and numerical simulations to give us
and let's say approximation of this gradient
because it's of course not exact.
And yeah, in order to improve your parameters
that are called theta here,
we apply an optimization step where we have this kind of gradient
and we have a step with mu and we try to go
to find the minimum of our loss functions.
Very simple stuff I hope.
All right, so what are good objective functions?
So one that you could think about immediately
is probably the mean squared error where just compute
mean squared error between your transmit symbol
and your receive symbol, take the average across your batch
or your time length of your simulation
and then you have some loss.
And this is already a pretty good one as we can see later.
Then it's a bit more complicated.
And I call it now modified cross entropy
because this is not exactly cross entropy.
This is let's say the practitioners formula
that you can use at the end if you have this kind of simulation
where on the left side this minus h of x
is the negative entropy of your symbols.
So the source entropy how much information
you can put into for example your QAM.
So for example 64 QAM you can put in six bits
if you have a uniform occurrence of all the symbols.
And on the right side is more or less this conditional entropy
basically this is what you get at the receivers
or you're receiving some complex symbol yk
and you want to figure out what kind of symbol xk was sent.
This is the part you want to minimize.
And this is the part you basically want to maximize of this term
and all the entropy and in, yeah.
And you can also formulate the same bitwise
where this are now these locally-hot ratios
and this is still the source entropy
and you can also use this as a loss function.
If you didn't get exactly how these formulas are born
I left out basically all of the steps coming from math
to these derivations.
This is just what we are going to use later in the simulation.
So I said we already used this kind of machine learning
quite a long time in communications
and actually the first occurrence in literature
is like 1960 where they came up with the LMS equalizer
and it's quite simple system.
Where you basically have the system model.
You derive this x hat k by performing equalization
with a vector f and some receive values
and then you can compute this mean squared error.
You can actually manually derive it, find the minimum
and then you get these two terms.
So the gradients are either in the complex world.
You get this or in the real world, you get this.
And you can just apply the same update step
as I shown before.
So you have the previous equalizers equalizer tabs
and you just subtract this gradient that you can
take either one of those depends on if you are real valued or not.
And then you can basically step into the right direction
and minimize your mean squared error.
So this is let's say quite fun to see that this is nothing new.
But in 2017 there was quite remarkable publication
of let's not do this only on the receiver.
But we can actually start from the transmitter
going to some channel at the receiver
and try to find maybe the best constellation we can transmit
over this channel.
In this case it was a simple AWGN channel.
That's what we're also going to do later in the demo.
And basically the transmitter, you see you put in some
bits or in this case it's an encoded one hot vector
where only one part of the vector is one everything else is zero.
And this leads to getting a complex symbol X that you can transmit.
Put it through this channel, get a complex symbol Y,
put it through another neural network.
And then you just run the optimization chain as we have seen before.
And here on the right are some pictures from the publication.
Basically they got QPSK, PSK and also other constellations
depending on how they put in the constraints.
And later this was also extended to bitwise and to end.
So not only improving the location of the symbols,
but also the labeling, so where to put all the labels.
And that you some of the results you can see here.
So you get a gray coded 16 QAM.
And you can also do derivations or simulations to see how it changes
if you change the SNR.
So points are moving.
So here red is very low SNR.
So here you have points that are close together.
So it transmits less.
A smaller amount of different symbols and here large amount.
And it was even extended to this kind of approach where you remove
most parts of the transmitter and the receiver replacing
the neural networks.
And you don't even have any synchronization or equalization.
But you have this kind of fully pilotless communication.
Which requires, let's say, more neural networks or like deeper neural networks.
But you get also constellations like this.
Which you see there are highly asymmetric and one could already.
Yeah, assume from that this is more or less used by the neural networks
to perform this kind of synchronization and equalization.
So we have these publications.
But not necessarily every publication is giving us a free and open source code.
So what do we need to replicate this?
So one part we need these boxes that are used in traditional systems
because you're not always replacing your whole system with neural networks.
So you need the classical algorithms that you can still use or you require
to use depending on your own scenario.
And preferably in already this kind of automatic differentiation framework.
We need these kind of channel models so we can do simulations
because we are not allowed to always use the real thing.
And that's also good.
And a lot of utility functions are still in these automatic differentiation.
So we can leverage this computation of the gradient and we can optimize things.
And now the question is who should write these toolboxes?
Because the authors aren't always doing that.
But actually the authors should do that.
And in this case the authors also did.
So I'm going to present the first toolbox is called Shona.
And it is developed by a research group at Nvidia.
And you can only see the first name, Hoytis.
But actually in this group all the previous papers that I shown.
Some authors from this group actually contributed to this library.
So they gave back their knowledge to open source and also free software.
It's a passion to license.
So that's quite nice.
And they use as a base tens of low because it was very popular at the time.
And that's also how they created their research papers.
Then I'm also going to show you a little bit about Mocha,
which is more or less my work that I was able to do together with my colleagues.
So that's where we, when you develop things and roll papers, try it.
Or I also try to make them contribute their code.
So we can also have a growing toolbox and give back to the public good.
And our toolbox is based on PyTorch.
And then there's also a third toolbox that I'm just going to put on this slide here.
And also have the QR code in the end, which is developed by a group in Hong Kong polytechnic university.
And it's based on Jack.
So let's say if you have some sort of preference yourself for one of these frameworks,
there's already starting points or already quite widely well developed libraries.
So Trona, what does it consist of?
So what can you optimize?
So they for one provided a system simulator.
So it's like a higher level.
So not the physical layer that they presented before,
but it's like about link adeption, power control scheduling.
And then they have a physical layer simulator.
So this is all the stuff that I mentioned before.
So they have the forward error correction implemented inside the framework.
They have the mapping, channel models.
They have already off the M&M and MIMO and also 5G new radio,
like physical layer implementation.
So this is a rather well developed toolbox.
And since I think last year, they published this.
They have also a ray tracing and channel emulator.
So where you can define a 3D model of the landscape you want to do.
And you can run a ray trace or to get actually the channel impulse responses
for also moving targets and different antenna patterns,
different antenna arrays.
Yeah.
And it's more or less electromagnetic accurate channel modeling.
And how can you use it?
Well, you can just run pip install, Shona,
or UV ads, Shona depends on, but it's a public on pipi.
And quite easy to get started.
So for mock-up for our library, we basically have the same stuff.
We have mapers, synchronization, equalization,
discrete channel models, fiber optical channel model, and utilities.
So it's not nothing really different.
We don't have this extensive wireless channel model.
And also we're missing this forward error correction implemented inside this framework
because we have smaller team.
But it's also available on pipi and you can install it simply by running this command.
And yeah, this is more or less some of the results that we got for
let's say special type of channel and DSP algorithms that we optimize
constellations for.
So that I wouldn't have had here.
Okay, so we do a short tutorial.
So you had this big graph with the block diagram with all of the things.
And we reduce this to this kind of block diagram.
So we have some data source, the transmitter.
We just use a symbol maper, have an AWGN channel, and a neural demaper.
So it's a bare-born system just to show you the capabilities.
And we use this kind of binary cross entropy to find the constellation and the labels.
And how do we do this?
So this is just to give you an overview that it's technically not that difficult.
So you need to do a bunch of imports.
You can define some variables that we use.
You create all these blocks that are available from Shona.
So you have like a binary source.
You already have these constellation constellations, like in the source code.
And this case, LBGN channel, neural demaper, and this loss.
And I mean, the way that you define this kind of channel also means you could easily swap in different channel definitions that are available.
Some of them have preconditions, like you have to increase sampling rate, to pulse shaping or anything.
But let's say in the easy case, you can simply swap in a different channel in a simulation.
And then, how do we perform our end-to-end simulation?
Well, we create bits or sample bits, map them to symbols, send them to a channel, get some LLRs, compute the binary cross entropy.
And that's it.
And then, if you want to then do this kind of optimization step.
We have to roll this in some sort of model, which is defined in terms of flow.
Get the weights, the trainable weights, get the gradients of the loss with respect to the weights and apply these step.
So it's also not widely complicated.
And so I created or I have a notebook running that I'm going to show right now, which is based on the left QR code is going directly to their documentation page of Shona.
And they have, like, I don't know how many notebooks and examples, but it's a lot.
And on the right is the code for the notebook that is running, because I took a lot of things out of there to make it a bit more simple.
So let's see.
So here is basically the code that we had before.
And I already executed it all the way to this kind of plot, where we have more or less the transmit constellation.
So we start with 64 Qm.
And here right now we have nothing.
And then I'm going to just start this training.
And you basically see, so I think this SNR was selected to be like 10 dB.
So 10 dB is not really suitable to transmit 64 Qm over.
So more or less our machine learning system adapts the constellation to something where it's put some more other points closer together.
And we sometimes say it sacrifices a bit, because all of these have the only differ in one bit of the mapping of the label.
And this runs now a little bit.
We can continue with the slides, because we can do the same with Mocha.
So this is more or less similar definitions with the defined transmission.
We create our blocks.
So it's all quite modular.
So that's what is also our goal.
So we can create these sort of block diagrams or the mental model of a block diagram.
So we can connect them all together.
And also more or less run the simulation.
So I have bits, so generate bits, map them symbols, send them for the channel, get LRs.
And then in our case, or in the PyTorge way, it's a bit simpler to then do the spec propagation.
So we have this loss and we calculate the gradient all the way to the back.
And then we will make the optimizer do a step.
And for that, I have a different simulation.
But we can see, so this has now finished simulating.
So we have this kind of weirdly looking consolation, which has some points closer together and some further part.
And now we can actually continue in this block.
So that's the nice thing about Toronto.
They have this error correction.
So we can now create a simulation and run BR.
So if this is not creeping out, we just define this and run it.
And so now basically, I can have a live plot of the bit error simulation curve for this kind of
Consolation and demaper chain that we created.
So this notebook is available in the link.
And the slides are also available online on the first image already.
And so for that, for Mocha, I've created a different demo.
It's not a Jupyter notebook, but it's a standalone application where we have like a nice GUI.
And it's a bit more mobile or more, yeah, it's a bit faster.
More or less, the graphical interface that doesn't mean that the algorithm is faster.
It just looks nicer.
And we can basically, yeah, here change the SNR live.
And you can basically already see in this demo how this has an impact on our receive system.
So this is more or less again, a map and this is what the receiver sees.
So it's quite low noise, but if you now increase the noise a lot.
So we basically see it's going to have to change the Consolation again.
And yeah, here are some other different channel models.
So this is like a small demo purpose because you can actually do research with this demo.
And yeah, you can find this with this link or with this QR code.
And yeah, this is the short-ish demo.
So you can download or check out the GitHub repositories for all of them download them from PIP.
And also use it for your own optimization or you can create your own RFV waveform.
And then if you're an amateur radio license operator, you could transmit it through whatever means you want.
That's about it. And thank you for your attention.
Yeah.
It was very interesting.
My question is, you're assimilate in the fibromtic conference?
Yes.
What are the physical parameters of the fibromtic conference?
So the question is what are the physical parameters or characteristics to put in the fibromtic transport?
So for the optical fiber, so it has similar lead to wireless communication also noise.
And but you also have some optical effects.
So there's, for example, the current effect, which more or less leads if you have an increased amplitude.
You have a phase shift that is proportional to this amplitude.
So you're more or less at the transmitter, for example, quite limited in the transmit power.
But also optical systems experience a little bit higher phase noise.
Relative to the symbol rates.
So low phase noise systems are like 15 kilohertz lined with.
And but they are like a 32 gigabort or 60 gigabort transmit rates.
So these are the, so this is the main effect.
So the current effect, and then you have to do to do nonlinear fiber simulation.
You need to do this kind of clips split step for a simulation.
But then there's also chromatic dispersion that I forgot to mention.
So basically the light on different wavelengths is traveling at different speeds.
So you have this kind of group.
Linear group delay.
Yeah, group delay dispersion.
So the question is if it's suitable to adapt this chromatic path errors.
And yes, of course.
So shown up, for example, they have this multi path 3GPP model,
where you can create channels with multi path.
Let me show this.
So this work here.
So this was done for all of the M over this kind of multi path channels.
So yeah, this paper and the bottom.
So I put these IEE papers, but they are.
I think all of them are available on archive as well.
No, that's miss happened myself for this conference, but yeah.
So this trimming the fat from all of the M, they basically put on each of the of the M transmitter and receiver.
They put this kind of modulators or map us.
And they removed all of the pilot processing.
So this is all done in the inside the neural networks.
And they use the op the wireless channels for this.
So with multi path.
You can also use this to keep the problem.
And instead, try to optimize the channel.
Simulation instead.
Yes.
So that is also done.
That is one of the.
Also one of the research areas that people do a lot.
So they use this kind of.
Yeah, optimization to find channel models that are difficult to analytically model.
So they they more or less have a lot of measurement data.
And now you create for example.
What's the called?
Yeah, some some.
I just forgot the name of these type of of the again.
So the generic adversarial networks.
Generative adversarial networks.
Yes, where you can basically then sample.
Let's say channels that are similar to what they have seen before.
So yeah, but yeah, also for this kind of system in multi path and the channels.
This all relies on a little bit on you need to to have the data.
So either you have an analytical model or you have enough measurement data to cover.
Let's say the plane of possibilities.
Hey, I'm curious in the beginning.
You have like your graph.
And for me, equalization and synchronization reflect in order.
Specific reason or it's just thinking.
I mean, it's synchronization and equalization.
You can put depending on your specific architecture.
You could can put them in different orders as well or parts of equalization.
And parts of synchronization. So yeah, this is it was just like to give an idea.
But yeah, this depends on your specific equalizer and synchronization algorithm.
We have to put them in different order.
And are there any limits to the simulation channel?
What can you use for other.
So the question is if there are any limits for the channel simulation or what their parameters.
And yes, so if you.
So let's say I did this now on this MacBook because it's very.
It was a simple simulation, but if you want to do for example, this kind of fiber simulations.
And typically to get the good result, you need to sample the or perform like steps of length.
100 meters, that is like a lot of.
If you have like a few hundred kilometers of fiber, that's a lot of computation steps.
And in every step, you need to still set for every calculation.
You have to save the gradients. So that becomes a memory issue as well.
So then, for example, we have big GPUs with like 20 or 40 gigabytes of memory.
And even they are not able to process everything in one step.
But this is our more or less the limit. So if you end also the batch size.
So if you have a lot of samples, of course, you also need to save all of these numerically computed gradients in order to perform these optimization steps.
So yeah, this is.
So for your you have the school that you are that most.
You were able to simulate the.
Yeah, it's still running.
So how realistic is that how much do you need or like a.
Obviously it doesn't take for six months of age.
No, like a 16G or 20G channel.
How.
What a realistic professor right there.
You mean now for the training order for the inference.
Like in interaction with students.
I mean, this is depends on your.
So the question is what are the possible transfer rates using neural networks or neural.
Transmitters receivers on hardware.
That's highly dependent.
So for example, for let's say if you create a transmitter that you trained.
You wouldn't use any neural network weights most likely in a transmitter.
You would just extract the consolation and put this into your hardware.
And for the receiver, there are you can, for example, use a neural network.
You need to.
Yeah, see how well it can be adapted to the hardware you need.
But from what I've seen for these kind of simple cases, the neural networks are quite thin like three layers.
And these are, yeah, not a lot of computation.
So you can even make the case.
For example, if you compare it to like a maximum likelihood receiver,
where you compute the distance to every possible point, you can be cheaper with a neural network.
Because it's doing this intrinsically in a different way.