FlowPG: Action-constrained Policy Gradient with Normalizing Flows

J. Brahmanage, Jiajing Ling, Akshat Kumar
2/3/2026

No official code found. Best implementation: rlr-smu/flow-pg (3 stars, last commit 2024-07-16).

Abstract

Action-constrained reinforcement learning (ACRL) is a popular approach for solving safety-critical and resource-allocation related decision making problems. A major challenge in ACRL is to ensure agent taking a valid action satisfying constraints in each RL step. Commonly used approach of using a projection layer on top of the policy network requires solving an optimization program which can result in longer training time, slow convergence, and zero gradient problem. To address this, first we use a normalizing flow model to learn an invertible, differentiable mapping between the feasible action space and the support of a simple distribution on a latent variable, such as Gaussian. Second, learning the flow model requires sampling from the feasible action space, which is also challenging. We develop multiple methods, based on Hamiltonian Monte-Carlo and probabilistic sentential decision diagrams for such action sampling for convex and non-convex constraints. Third, we integrate the learned normalizing flow with the DDPG algorithm. By design, a well-trained normalizing flow will transform policy output into a valid action without requiring an optimization solver. Empirically, our approach results in significantly fewer constraint violations (upto an order-of-magnitude for several instances) and is multiple times faster on a variety of continuous control tasks.

View on arXivView PDF

Code Implementations(1)

rlr-smu/flow-pgCommunity100%

Source Code for "FlowPG: Action-constrained Policy Gradient with Normalizing Flows"

31Shell, PythonOct 23, 20232 years ago

Similar Papers

Cite this paper

@article{brahmanage2026flowpg,
  title  = {FlowPG: Action-constrained Policy Gradient with Normalizing Flows},
  author = {J. Brahmanage and Jiajing Ling and Akshat Kumar},
  year   = {2026},
  eprint = {2402.05149},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2402.05149},
  url    = {https://arxiv.org/abs/2402.05149},
  journal = {NEURIPS 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2402.05149.svg)](https://codeofpaper.com/paper/2402.05149)

Discussion