Grammar Reinforcement Learning: path and cycle counting in graphs with a Context-Free Grammar and Transformer approach
Jason Piquenot, Maxime Berar, Romain Raveaux, Pierre Héroux, Jean-Yves Ramel, Sébastien Adam
Abstract
This paper presents Grammar Reinforcement Learning (GRL), a reinforcement learning algorithm that uses Monte Carlo Tree Search (MCTS) and a transformer architecture that models a Pushdown Automaton (PDA) within a context-free grammar (CFG) framework. Taking as use case the problem of efficiently counting paths and cycles in graphs, a key challenge in network analysis, computer science, biology, and social sciences, GRL discovers new matrix-based formulas for path/cycle counting that improve computational efficiency by factors of two to six w.r.t state-of-the-art approaches. Our contributions include: (i) a framework for generating transformers that operate within a CFG, (ii) the development of GRL for optimizing formulas within grammatical structures, and (iii) the discovery of novel formulas for graph substructure counting, leading to significant computational improvements.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext a42277be-b531-438a-b44c-aae17f167c50Builds on5
- Learning and Planning in Complex Action SpacesThomas Hubert, Julian Schrittwieser, Ioannis Antonoglou, Mohammadamin Barekatain et al.ICML 2021 · 99 citations
- Path Neural Networks: Expressive and Accurate Graph Neural NetworksGaspard Michel, Giannis Nikolentzos, Johannes F. Lutzeyer, Michalis VazirgiannisICML 2023 · 45 citations
- Stack Attention: Improving the Ability of Transformers to Model Hierarchical PatternsBrian DuSell, David ChiangICLR 2024 · 15 citations
- DISeR: Designing Imaging Systems with Reinforcement LearningTzofi Klinghoffer, Kushagra Tiwary, Nikhil Behari, Bhavya Agrawalla et al.ICCV 2023 · 7 citations
- G2N2 : Weisfeiler and Lehman go grammaticalJason Piquenot, Aldo Moscatelli, Maxime Berar, Pierre Héroux et al.ICLR 2024 · 2 citations
Related papers
- Reinforced Molecular Optimization with Neighborhood-Controlled GrammarsChencheng Xu, Qiao Liu, Minlie Huang, Tao JiangNeurIPS 2020 · 23 citations
- MapZero: Mapping for Coarse-grained Reconfigurable Architectures with Reinforcement Learning and Monte-Carlo Tree SearchXiangyu Kong, Yi Huang, Jianfeng Zhu, Xingchen Man et al.ISCA 2023 · 30 citations
- Simple Path Structural Encoding for Graph TransformersLouis Airale, Antonio Longa, Mattia Rigon, Andrea Passerini et al.ICML 2025
- Transformers over Directed Acyclic GraphsYuankai Luo, Veronika Thost, Lei ShiNeurIPS 2023 · 43 citations
- Neural Subgraph Isomorphism CountingXin Liu, Haojie Pan, Mutian He, Yangqiu Song et al.KDD 2020 · 70 citations
