Neuro-symbolic Action Masking for Deep Reinforcement Learning
Shuai Han, Mehdi Dastani, Shihan Wang
TL;DR
NSAM tackles DRL's tendency to explore infeasible actions by learning symbolic grounding that respects domain constraints through Probabilistic Sentential Decision Diagrams (PSDDs). A gating network maps high-dimensional states to PSDD parameters, enabling a state-conditioned distribution over symbolic models and producing action masks via MAP inference to guide a masked PPO policy. Across four constrained domains (including Visual Sudoku), NSAM delivers improved sample efficiency and substantially fewer constraint violations compared with strong baselines, demonstrating that symbolic structure can be leveraged to accelerate learning and improve safety. The work highlights the value of integrating logical knowledge with gradient-based RL and points to future directions in richer symbolic representations and unknown or erroneous constraints to broaden applicability.
Abstract
Deep reinforcement learning (DRL) may explore infeasible actions during training and execution. Existing approaches assume a symbol grounding function that maps high-dimensional states to consistent symbolic representations and a manually specified action masking techniques to constrain actions. In this paper, we propose Neuro-symbolic Action Masking (NSAM), a novel framework that automatically learn symbolic models, which are consistent with given domain constraints of high-dimensional states, in a minimally supervised manner during the DRL process. Based on the learned symbolic model of states, NSAM learns action masks that rules out infeasible actions. NSAM enables end-to-end integration of symbolic reasoning and deep policy optimization, where improvements in symbolic grounding and policy learning mutually reinforce each other. We evaluate NSAM on multiple domains with constraints, and experimental results demonstrate that NSAM significantly improves sample efficiency of DRL agent while substantially reducing constraint violations.
