Learning Quantized Continuous Controllers for Integer Hardware

Fabian Kresse, Christoph H. Lampert · OpenReview

Abstract

Deploying continuous-control reinforcement learning policies on embedded hardware requires meeting tight latency and power budgets. Small FPGAs can deliver these, but only if costly floating point pipelines are avoided. We study quantization-aware training (QAT) of policies for integer inference and we present a learning-to-hardware pipeline that automatically selects low-bit policies and synthesizes them to an Artix-7 FPGA. Across five MuJoCo tasks, we obtain policy networks that are competitive with full precision (FP32) policies but require as few as 3 or even only 2 bits per weight, and per internal activation value, as long as input precision is chosen carefully. On the target hardware, the selected policies achieve inference latencies on the order of microseconds and consume microjoules per action, favorably comparing to a quantized reference. Last, we observe that the quantized policies exhibit increased input noise robustness compared to the floating-point baseline.

Introduction

Deep Reinforcement Learning (RL) has demonstrated significant potential in controlling complex systems, yet deploying these policies on embedded systems remains a challenge. High-speed control requires minimal latency, while battery-powered devices demand extreme power efficiency. Standard Field-Programmable Gate Arrays (FPGAs) are highly efficient for integer arithmetic but struggle with the floating-point (FP32) math standard in AI. While post-training quantization often degrades RL policy performance, this research introduces a pipeline to train policies specifically for low-power integer hardware using as little as 2 or 3 bits for weights and activations.

Methodology: Quantization-Aware Training

The core of the proposed "learning-to-hardware" pipeline is Quantization-Aware Training (QAT). Instead of post-hoc rounding, the researchers insert Quantize/De-Quantize (QDQ) nodes into the neural network during training. These nodes simulate rounding errors and limited integer ranges. To overcome the non-differentiable nature of rounding, a Straight-Through Estimator (STE) is used to approximate gradients during backpropagation.

The pipeline employs a three-step model selection strategy:

  1. Bitwidth Sensitivity Analysis: Sweeping bitwidths to identify the minimum viable precision for internal "core" layers.
  2. Width Scaling: Reducing hidden layer sizes to the minimum necessary width.
  3. Input Precision Tuning: Separately optimizing the precision of sensor inputs, which are more sensitive to quantization than internal layers.
Reward performance across different bitwidths for SAC and DDPG. The data highlights that internal 'core' layers are more robust to low bitwidths than sensor inputs.

Finally, the FINN compiler is used to synthesize these trained policies into custom hardware logic for a Xilinx Artix-7 FPGA.

Experimental Results

The approach was evaluated using the MuJoCo physics engine across five tasks: Humanoid-v4, Walker2d-v4, Ant-v4, HalfCheetah-v4, and Hopper-v4.

Performance and Efficiency

Across most tasks, quantized models achieved rewards within one standard deviation of the FP32 baseline. On the Artix-7 FPGA, these policies achieved microsecond-scale inference latencies (e.g., 0.2 µs for Hopper) and energy consumption in the microjoule range. Moving from 4-bit to 2-bit or 3-bit cores significantly reduced hardware resource usage (BRAM and LUTs), enabling complex policies to fit on smaller, more affordable chips.

Robustness to Noise

A surprising finding was that quantized policies often outperformed FP32 baselines when random noise was injected into sensors. The "coarseness" of quantization appears to act as a form of implicit regularization, enhancing robustness to real-world jitter.

Robustness of quantized policies vs. FP32 under varying input noise levels across five MuJoCo tasks.

Discussion and Future Work

While these results are promising, the study was conducted in simulation, leaving a "sim-to-real" gap regarding mechanical wear and sensor delays. Future work will focus on physical robot evaluations and exploring even more extreme binarized (1-bit) policies. Additionally, while MuJoCo is a standard benchmark, extending this pipeline to vision-based RL tasks involving larger architectures like CNNs or Transformers remains an open challenge.

Summary updated

Abstract

Deploying continuous-control reinforcement learning policies on embedded hardware requires meeting tight latency and power budgets. Small FPGAs can deliver these, but only if costly floating point pipelines are avoided. We study quantization-aware training (QAT) of policies for integer inference and we present a learning-to-hardware pipeline that automatically selects low-bit policies and synthesizes them to an Artix-7 FPGA. Across five MuJoCo tasks, we obtain policy networks that are competitive with full precision (FP32) policies but require as few as 3 or even only 2 bits per weight, and per internal activation value, as long as input precision is chosen carefully. On the target hardware, the selected policies achieve inference latencies on the order of microseconds and consume microjoules per action, favorably comparing to a quantized reference. Last, we observe that the quantized policies exhibit increased input noise robustness compared to the floating-point baseline.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
HumanoidSelected Model (SAC QAT)Latency15360-227910 vs baselineContinuous Control · compressed · clock=100 MHz · hardware=Artix-7 XC7A15T-1 · synthesis-tool=FINN v0.10.1
Source quote
L216: Humanoid │ \numk{2256} │ \numk{3118} │ 1.5 │ 45 │ \phantom{0}\ns{15360} │ 0.33 │ \num{65104} │ \num{5.068812976161219e-6}
HumanoidSelected Model (SAC QAT)E.p.A.5.068812976161219e-6 JouleContinuous Control · compressed · clock=100 MHz · hardware=Artix-7 XC7A15T-1 · synthesis-tool=FINN v0.10.1
Source quote
L216: Humanoid │ \numk{2256} │ \numk{3118} │ 1.5 │ 45 │ \phantom{0}\ns{15360} │ 0.33 │ \num{65104} │ \num{5.068812976161219e-6}
AntSelected Model (SAC QAT)Latency2290Continuous Control · compressed · clock=100 MHz · hardware=Artix-7 XC7A15T-1 · synthesis-tool=FINN v0.10.1
Source quote
L218: Ant │ \numk{2699} │ \numk{4497} │ 3 │ 45 │ \phantom{00}\ns{2290} │ 0.39 │ \num{436681} │ \num{8.93e-7}
AntSelected Model (SAC QAT)E.p.A.8.93e-7 JouleContinuous Control · compressed · clock=100 MHz · hardware=Artix-7 XC7A15T-1 · synthesis-tool=FINN v0.10.1
Source quote
L218: Ant │ \numk{2699} │ \numk{4497} │ 3 │ 45 │ \phantom{00}\ns{2290} │ 0.39 │ \num{436681} │ \num{8.93e-7}
Reported baseline / comparator measurements (2)
BenchmarkMethodMetricScoreProtocol / Evidence
HumanoidReference (8-4-8) baselineLatency243270Continuous Control · compressed · clock=100 MHz · hardware=Artix-7 XC7A15T-1 · quantization=8-4-8
Source quote
L222: Humanoid │ \numk{8426} │ \numk{9545} │ 25 │ 22 │ \ns{243270} │ 0.58 │ \num{4110} │ \num{1.411192214111922e-4}
HumanoidReference (8-4-8) baselineE.p.A.1.411192214111922e-4 JouleContinuous Control · compressed · clock=100 MHz · hardware=Artix-7 XC7A15T-1 · quantization=8-4-8
Source quote
L222: Humanoid │ \numk{8426} │ \numk{9545} │ 25 │ 22 │ \ns{243270} │ 0.58 │ \num{4110} │ \num{1.411192214111922e-4}
BibTeX
@misc{kresse2025learning,
  author = {Fabian Kresse and Christoph H. Lampert},
  title = {{Learning Quantized Continuous Controllers for Integer Hardware}},
  year = {2025},
  eprint = {2511.07046},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2511.07046},
}
Figure