AI News HubLIVE
Original source2 min read

From Black Box to Executable Logic: Explainable Reinforcement Learning through Prolog Expert Systems

This paper proposes a method to convert deep reinforcement learning policies into executable Prolog logic programs for explainability. It uses a three-stage post-hoc transformation: extracting a frozen PPO teacher, inducing an ordered rule list, and emitting a Prolog program, followed by an expansion stage that certifies return improvements. Theoretical guarantees include return-loss bounds, monotonic improvement, and fidelity control in continuous domains. Empirically, it achieves exact optimal returns on a discrete task and matches or approaches neural teacher performance on continuous control tasks.

SourcearXiv AIAuthor: Eduardo C. Garrido-Merch\'an

-->

[Submitted on 16 Jul 2026]

Title:From Black Box to Executable Logic: Explainable Reinforcement Learning through Prolog Expert Systems

View a PDF of the paper titled From Black Box to Executable Logic: Explainable Reinforcement Learning through Prolog Expert Systems, by Eduardo C. Garrido-Merch\'an

View PDF HTML (experimental)

Abstract:A trained deep reinforcement learning policy is a black box, and we ask whether it can be made explainable by rewriting it as an executable logic program that reproduces its behaviour and that a person can read, a logic engine can run, and an optimizer can edit. We present a three-stage post-hoc transformation that extracts a frozen proximal policy optimization teacher, induces an ordered rule list from its decisions in the manner of classical relational learning, and emits the result as a Prolog program whose every decision is executed by an off-the-shelf logic engine; a subsequent expansion stage edits the rule base and accepts an edit only when policy evaluation certifies a return increase. We prove four guarantees. A return-loss bound makes the distilled program a machine-checkable certificate in a finite Markov decision process, and the expansion loop improves monotonically and terminates. For the continuous-observation setting we answer whether the conversion is possible at all: the propositional threshold instantiation converts the network to arbitrary fidelity as the resolution B grows, with disagreement O(1/B) and a return gap that closes at the same rate, and a matching lower bound shows the cost is exponential in the observation dimension for an oblique decision boundary. Empirically, on a two-room key-and-door task with 16,944 reachable states the expanded Prolog program attains exact optimal return in every seed and, in a budget-capped regime, exceeds the stochastic teacher on exact return in ten of ten seeds. On three continuous-control tasks the emitted program substitutes the network, matching the neural teacher within noise on Acrobot with eleven clauses and recovering about 97% of its return on CartPole, while on the finer-control LunarLander it recovers only partially, exactly the ceiling the exponential lower bound predicts.

Subjects:

Artificial Intelligence (cs.AI)

Cite as: arXiv:2607.15459 [cs.AI]

(or arXiv:2607.15459v1 [cs.AI] for this version)

https://doi.org/10.48550/arXiv.2607.15459

arXiv-issued DOI via DataCite (pending registration)

Submission history

From: Eduardo C. Garrido-Merchán [view email] [v1] Thu, 16 Jul 2026 21:10:27 UTC (49 KB)

Full-text links:

Access Paper:

View a PDF of the paper titled From Black Box to Executable Logic: Explainable Reinforcement Learning through Prolog Expert Systems, by Eduardo C. Garrido-Merch\'an

View PDF

HTML (experimental)

TeX Source

view license

Current browse context:

cs.AI

new | recent | 2026-07

Change to browse by:

cs

References & Citations

NASA ADS

Google Scholar

Semantic Scholar

Loading...

Data provided by:

Bibliographic Tools

Bibliographic and Citation Tools

Bibliographic Explorer Toggle

Bibliographic Explorer (What is the Explorer?)

Connected Papers Toggle

Connected Papers (What is Connected Papers?)

Litmaps Toggle

Litmaps (What is Litmaps?)

scite.ai Toggle

scite Smart Citations (What are Smart Citations?)

Code, Data, Media

Code, Data and Media Associated with this Article

alphaXiv Toggle

alphaXiv (What is alphaXiv?)

Links to Code Toggle

CatalyzeX Code Finder for Papers (What is CatalyzeX?)

DagsHub Toggle

DagsHub (What is DagsHub?)

GotitPub Toggle

Gotit.pub (What is GotitPub?)

Huggingface Toggle

Hugging Face (What is Huggingface?)

ScienceCast Toggle

ScienceCast (What is ScienceCast?)

Demos

Demos

Replicate Toggle

Replicate (What is Replicate?)

Spaces Toggle

Hugging Face Spaces (What is Spaces?)

Spaces Toggle

TXYZ.AI (What is TXYZ.AI?)

Related Papers

Recommenders and Search Tools

Link to Influence Flower

Influence Flower (What are Influence Flowers?)

Core recommender toggle

CORE Recommender (What is CORE?)

Author

Venue

Institution

Topic

About arXivLabs

arXivLabs: experimental projects with community collaborators

arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.

Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.

Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.

Which authors of this paper are endorsers? | Disable MathJax (What is MathJax?)