Advanced Classical RF-ML
The current research frontier of the classical side: attention, self-supervised pretraining, real over-the-air data, and deployment. This phase turns your Capstone A skills into the profile of a working RF-ML practitioner in 2026.
Attention and transformers, from scratch
The Week 7 move, repeated for the architecture that took over the field: build it by hand once, and it stops being magic.
Watch and build along
Exercises
- Implement single-head scaled dot-product attention in pure NumPy; verify shapes and outputs against
torch.nn.functional.scaled_dot_product_attention. - Follow the lecture to build the character-level transformer end to end, typing every line yourself.
- Ablate: remove positional encodings and document exactly how and why performance degrades.
Checkpoint
You can state what Q, K, and V are, their shapes through a multi-head block, and why attention cost scales with sequence length squared.
Transformers for signals
Study
- Read the Vision Transformer paper for the patch-embedding idea, then a transformer-based modulation classification paper such as this one to see the same trick on I/Q data.
- Survey the current state of the art on RML2016.10a by searching arXiv and Hugging Face Papers (the old Papers With Code leaderboards shut down in 2025).
Exercises
- Build a small transformer for RML2016.10a: embed I/Q segments as patches, add a class token, train at a parameter count matched to your Phase 3 ResNet.
- Compare accuracy vs SNR curves against your CNN and ResNet - three-way plot, honest conclusion about where attention helps and where it does not.
- Visualize attention maps on a few examples; note what the model attends to at low SNR.
Checkpoint
You can articulate when a transformer beats a CNN on signals (long-range structure, large data) and when it loses (small data, strong local priors).
Self-supervised learning on spectrum
Labeled RF data is scarce; unlabeled RF is infinite. This is arguably the most practically valuable idea in ML for RF right now.
Study
- SimCLR (contrastive learning) and Masked Autoencoders - read both; you will implement the second.
Exercises
- Pretrain a masked autoencoder on unlabeled I/Q frames (your Phase 2 synthetic generator, cranked up to hundreds of thousands of frames, plus RML data stripped of labels).
- Linear-probe evaluation: freeze the encoder, train a linear head with only 1 percent and 10 percent of RML labels; compare against training your Phase 3 model from scratch on the same label budgets.
- Plot accuracy vs label fraction for both approaches - the signature plot of self-supervised learning.
Checkpoint
At the 1 percent label budget, your pretrained encoder should clearly beat from-scratch training, and you can explain why the gap closes as labels grow.
Real signals: build your own dataset
Everything so far was curated data. Real spectrum is messier, and the synthetic-to-real gap is where deployed RF-ML lives or dies. Hardware week: you need the RTL-SDR Blog v4 from here on.
Study
- PySDR's capture and hardware chapters (you met them in Week 4; now use them for real).
- Skim local band plans so you know what you are hearing: FM broadcast, ADS-B at 1090 MHz, POCSAG paging, ISM-band traffic.
Exercises
- Write a capture pipeline: tune, record I/Q to disk with metadata (frequency, sample rate, time), slice into frames.
- Curate a small labeled dataset of 4-6 over-the-air signal classes you can reliably identify; document your labeling procedure.
- The domain-gap experiment: test your best RML-trained model on your captures, then fine-tune on a small labeled split. Quantify the gap before and after.
- Optional with a PlutoSDR or HackRF One: generate your own modulated signals and loop them back over a coax cable into the RTL-SDR - a controlled bridge between synthetic and over-the-air. Transmit only into cable or dummy load unless you hold an amateur license.
Checkpoint
You have a dataset nobody else has, and a measured number for how much synthetic training transfers to reality.
Deployment: the live classifier
Study
- PyTorch ONNX export and post-training quantization docs.
- GNU Radio Embedded Python Blocks - how to put your model inside a flowgraph.
Exercises
- Export your best model to ONNX; quantize to int8; measure the accuracy and latency changes at each step.
- Build a GNU Radio flowgraph: RTL-SDR source, windowed framing, your model in an embedded Python block, live prediction display.
- Measure sustained throughput; it must keep up with the sample rate without dropping frames on your laptop.
Checkpoint
A window on your screen names the modulation of live off-air signals in real time. Show someone; this is the demo that lands jobs.
Capstone C: the spectrum sentinel
Harden the live classifier into something honest about its own limits - the difference between a demo and a tool.
Tasks
- Add out-of-distribution detection (an energy-based or Mahalanobis score on features) so the system flags "unknown signal" instead of guessing confidently on things it never trained on.
- Validate: feed it a signal class you deliberately held out of training and confirm it abstains rather than misclassifies.
- Write the project README: architecture, dataset, domain-gap numbers, live throughput, OOD behavior, honest failure cases.
Definition of done
A stranger with an RTL-SDR could clone the repo, run one command, and watch live classifications with abstention on unknowns.
Phase gate: self-test before Phase 8
Target: 7 of 9, closed book.
- Write the attention equation and explain the role of the scaling factor.
- Why do transformers need positional information while CNNs get position handling for free?
- What does a masked autoencoder predict, and why does that pretext task produce useful features?
- Define linear probing and why it is a fairer measure of representation quality than fine-tuning.
- Name three ways over-the-air captures differ from RML-style synthetic data.
- What does int8 quantization trade away, and how do you measure whether you can afford it?
- Why must a deployed classifier abstain, and what happens operationally if it cannot?
- Your live system drops frames at high sample rates - name two remedies before "buy a bigger computer."
- At what data scale did your transformer overtake your CNN, if it did - and what does that imply for RF foundation models?