Learning to Parse and Reconstruct: Bidirectional Modeling of Question-to-Program Mapping
Zeying Duan, Youtian Du, Yuanlin Chang, Bowen Lin, Weijia Wu
Abstract
Neuro-symbolic learning has emerged as a promising paradigm for interpretable visual reasoning, where mapping natural language questions to executable programs plays a central role. However, most existing methods focus exclusively on the forward program generation from questions while overlooking the reverse process of reconstructing questions from programs. In this paper, we propose BiPaR (Bidirectional Parsing and Reconstruction), a Transformer-based framework that jointly models both program parsing and question reconstruction within a unified architecture. Unlike previous approaches that only perform forward parsing, BiPaR introduces reverse program-to-question reconstruction as a powerful auxiliary signal, which improves program generation quality and accelerates convergence, particularly under limited supervision. We further provide a theoretical analysis showing how reverse reconstruction facilitates faster optimization during training. The bidirectional modeling makes BiPaR well-suited for both supervised and semi-supervised learning scenarios. We present two architectural variants: BiPaR-Full, which employs encoder-decoder Transformers for both modules; and BiPaR-DOnly, a lightweight variant that employs a decoder-only structure for question reconstruction, reducing model complexity. Experiments on CLEVR and a GQA subset demonstrate that BiPaR significantly outperforms standard Transformer baselines. Furthermore, in the semi-supervised learning setting, BiPaR achieves notable improvements by leveraging additional questions without program annotations.
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.
Builds on8
- PAL: Program-aided Language ModelsLuyu Gao, Aman Madaan, Shuyan Zhou, Uri Alon et al.ICML 2023 · 700 citations
- Neural Module Networks for Reasoning over TextNitish Gupta, Kevin Lin, Dan Roth, Sameer Singh et al.ICLR 2020 · 134 citations
- ProTo: Program-Guided Transformer for Program-Guided TasksZelin Zhao, Karan Samel, Binghong Chen, Le SongNeurIPS 2021 · 37 citations
- REX: Reasoning-aware and Grounded ExplanationShi Chen, Qi ZhaoCVPR 2022 · 24 citations
- Weakly Supervised Neuro-Symbolic Module Networks for Numerical Reasoning over TextAmrita Saha, Shafiq R. Joty, Steven C. H. HoiAAAI 2022 · 20 citations
Related papers
- Web question answering with neurosymbolic program synthesisQiaochu Chen, Aaron Lamoreaux, Xinyu Wang, Greg Durrett et al.PLDI 2021 · 25 citations
- Generating Programmatic Referring Expressions via Program SynthesisJiani Huang, Calvin Smith, Osbert Bastani, Rishabh Singh et al.ICML 2020 · 11 citations
- Learning to Solve Constraint Satisfaction Problems with Recurrent TransformerZhun Yang, Adam Ishay, Joohyung LeeICLR 2023
- Synthesizing Visual Concepts as Vision-Language ProgramsAntonia Wüst, Wolfgang Stammer, Hikaru Shindo, Lukas Helff et al.CVPR 2026 · 6 citations
- Interpretable Visual Reasoning via Induced Symbolic SpaceZhonghao Wang, Kai Wang, Mo Yu, Jinjun Xiong et al.ICCV 2021 · 22 citations
