Code for the paper "ARMOR: Attack-Resilient Reinforcement Learning Control for UAVs"
Key Features
- Attack-resilient model-free RL controller for robust UAV operation under adversarial sensor manipulation (e.g., GPS spoofing).
- Learns robust latent state representations of the UAV's physical state for reliable control under sensor corruption.
- Two-stage training framework: a teacher encoder trained with privileged attack information generates attack-aware latent states for RL policy training; a student encoder learns to mimic the teacher using only observable (attacked) sensor data at deployment.
- Compatible with UAV autopilot pipelines for adaptive, model-free control under adversarial conditions.
Tested on Ubuntu 22.04
git clone https://github.com/dashpritam/safe-rl.git
cd safe-rl/
conda create -n drones python=3.10
conda activate drones
pip3 install --upgrade pip
pip3 install -e . # if needed, `sudo apt install build-essential` to install `gcc` and build `pybullet`Train (or evaluate with flag) a reinforcement learning (RL) teacher and encoder model using:
python train_teacher.py --vehicle drone --rl_file configs/rl.yaml \
--environment_file configs/env.yaml --teacher_file configs/teacher.yaml \
--attack_file configs/attack.yaml --output_folder teacher_expExpected Output Directory: results/train_teacher/<timestamp>
--vehicle: Vehicle type (drone or car)--rl_file: RL model config YAML--environment_file: Environment config YAML--teacher_file: Teacher encoder config YAML--attack_file: Attack config YAML (training & eval fallback)--output_folder: Output directory (default: timestamped)--gui: Enable GUI (default: False)--eval_attack_files: Comma-separated attack YAMLs for post-training eval--num_eval_episodes: Episodes per attack (default: 10)--eval_only: Skip training, only evaluate (requires --rl_model)--rl_model: Path to saved PPO model (.zip) for eval
Train (or evaluate with flag) a student encoder model using:
python train_student.py --vehicle drone --rl_file configs/rl.yaml \
--environment_file configs/env.yaml \
--rl_model results/train_teacher/01.15.2025_14.30.00/models/best_model.zip \
--student_file configs/student.yaml --teacher_file configs/teacher.yaml \
--attack_file configs/attack.yaml --output_folder student_expExpected Output Directory: results/train_student/<timestamp>
--vehicle: Vehicle type (drone or car)--rl_file: RL model config YAML--environment_file: Environment config YAML--rl_model: Trained teacher PPO model (.zip)--student_file: Student encoder config YAML--teacher_file: Teacher encoder config YAML--attack_file: Attack config YAML--output_folder: Output directory (default: timestamped)--gui: Enable GUI (default: False)--eval_attack_files: Comma-separated attack YAMLs for final eval--num_eval_episodes: Episodes per attack (default: 10)--student_encoder: Pre-trained student .pth for warm-start or eval--skip_training: Skip training, only evaluate (requires --student_encoder)
If you find our work useful in your research, please consider citing:
@inproceedings{dash2026armor,
title={ARMOR: Attack Resilient Reinforcement Learning Control for UAVs},
author={Dash, Pritam and Chan, Ethan and Lawrence, Nathan and Pattabiraman, Karthik},
booktitle = {IEEE International Conference on Robotics & Automation (ICRA)},
year={2026}
}