Projects / Bidirectional transfer

NeuS 2025 · PMLR 288

Bidirectional End-to-End Framework for Transfer from Abstract Models in Non-Markovian Reinforcement Learning

Bidirectional-RL

Mahyar Alinejad1,  Precious Nwaorgu1,  Chinwendu Enyioha1,  Yue Wang1,  Alvaro Velasquez2,  George Atia1

1University of Central Florida  ·  2University of Colorado Boulder

TL;DR  Learn the task's automaton and a simple teacher simulator from offline data, train a teacher there, and distil what it learned back into the real environment. Nothing about the task is given: the automaton, the simulator and the teacher's knowledge all come from logged successes and failures.

STUDENT → TEACHER: LEARN FROM DATA TEACHER → STUDENT Offline trajectoriessuccesses & failures RPNI → learned DFAtask structure Learned simulatorabstraction + counts (Eq. 3) TeacherQ-learning on sim ⊗ DFA Studentreal env ⊗ DFA, AD target Q_avg(ω, σ) the same DFA tracks the student's progress
The bidirectional framework. Both the automaton and the teacher's environment are learned from the offline data; the teacher's values return to the student through automaton distillation.

Abstract

We propose a bidirectional end-to-end reinforcement learning (RL) framework for solving complex non-Markovian tasks in discrete and continuous environments. Instead of directly learning policies in high-dimensional spaces, we first construct a simplified teacher model as a surrogate environment from offline trajectories. Simultaneously, we infer a Deterministic Finite Automaton (DFA) using the RPNI algorithm to capture task dependencies. A policy is learned in the surrogate environment and transferred to the original domain via automaton distillation, which guides policy learning more effectively than direct RL in the original environment. Our framework integrates DQN for discrete tasks and DDPG/TD3 for continuous settings. Empirical results demonstrate that this structured transfer significantly improves learning efficiency, and convergence speed, outperforming standard RL baselines.

What is learned from data alone

  1. The task automaton. Label traces of the offline trajectories (e.g. key chest shield dragon) feed RPNI, which recovers the true task structure in every environment.
  2. The teacher's environment. Student states are mapped onto a small grid (e.g. 20×20 → 5×5) and the transitions, with the labels they emit, are counted with Laplace smoothing. On independent data the learned simulator predicts 68–81% of transitions as its most likely outcome.
  3. The teacher's knowledge. A teacher trained in the learned simulator and automaton reaches 96–100% task completion there; its values, averaged per automaton transition, are highest where the task is completed.
Automata learned by RPNI for Dungeon Quest, Blind Craftsman, OfficeWorld and Building Bridge
Automata learned by RPNI from offline data (seed 0).
Teacher acceptance rate and steps per episode in the learned simulators
Teacher learning in the learned simulators
Heatmaps of distilled values per automaton state and label
Distilled values Qavg(ω, σ)

Results

4 / 4
environments where AD learns fastest (Q-learning)
0.83 vs 0.00
DDPG success with vs. without AD
0 task specs
automaton and simulator learned from data

Discrete students (Q-learning)

EnvironmentEpisodes to 90%: with ADwithout ADQAS
Dungeon Quest134156249
Blind Craftsman234271never (0/5)
OfficeWorld88113131
Building Bridge113179177

5 seeds per method; each seed runs the whole pipeline from its own offline dataset. Student grids are the paper's layouts scaled by 2 (Bridge at the paper's size). QAS sees the true task progress but has no automaton.

Dungeon Quest learning curves
Dungeon Quest
Building Bridge learning curves
Building Bridge

Continuous students (DDPG and TD3)

LearnerMethodEpisodes to 90%Success (all episodes)Success (last 50)
DDPGwith AD810.831.00
without ADnever (0/5)0.000.00
TD3with AD124 (4/5)0.590.80
without AD203 (3/5)0.340.59
Continuous Dungeon Quest, DDPG learning curves
Continuous Dungeon Quest, DDPG
Continuous Dungeon Quest, TD3 learning curves
Continuous Dungeon Quest, TD3

Poster

Conference poster for this paper
Presented at NeuS 2025. Download the poster (PDF).

Try it

git clone https://github.com/mahyar333/Bidirectional-RL.git && cd Bidirectional-RL
pip install -e ".[dev]"
python -m bidirectional.run --config configs/dungeon_quest.yaml --learner tabular   # data → DFA → simulator → teacher → students
python -m bidirectional.teacher_report --configs configs --out assets              # what the teacher learned

Python 3.9+, MIT license. See the repository for the full documentation.

BibTeX

@inproceedings{alinejad2025bidirectional,
  title     = {Bidirectional End-to-End Framework for Transfer from Abstract Models in Non-Markovian Reinforcement Learning},
  author    = {Alinejad, Mahyar and Nwaorgu, Precious and Enyioha, Chinwendu and Wang, Yue and Velasquez, Alvaro and Atia, George},
  booktitle = {Proceedings of the International Conference on Neuro-symbolic Systems (NeuS)},
  series    = {Proceedings of Machine Learning Research},
  volume    = {288},
  pages     = {643--660},
  year      = {2025},
  url       = {https://proceedings.mlr.press/v288/alinejad25a.html}
}