Abstract
Chemical Large Language Models (LLMs) often lack round-trip consistency, failing to reconstruct original inputs from their own generated descriptions. We present Round-Trip Reinforcement Learning (RTRL), a framework that treats the ability to "undo" an operation as a reward signal. By optimizing for bidirectional consistency, RTRL significantly improves logical coherence and performance on downstream chemistry tasks like reaction prediction and molecule generation without requiring additional labeled data.
Introduction: The Consistency Gap in Chemical LLMs
While LLMs have shown promise in predicting chemical reactions and describing molecular structures, they frequently suffer from "unidirectional memorization." A model might generate a perfect text description of a molecule but fail to reconstruct the molecular structure when provided with that same text. This lack of round-trip consistency (RTC) suggests that the model is mimicking patterns rather than mastering underlying chemical principles. RTRL addresses this by moving consistency from a post-hoc evaluation metric to a primary training objective.
Methodology: Round-Trip Reinforcement Learning (RTRL)
The core of RTRL is a self-consistency loop where a "reverse" task provides a reward signal for a "forward" task. For example, if the forward task is Molecule → Caption, the backward task is Caption → Molecule.
The framework employs several key components:
- Likelihood-based Reward: Instead of relying solely on expensive ground-truth labels, the model is rewarded based on the likelihood that the backward pass can recover the original input.
- Group-Relative Policy Optimization (GRPO): This RL algorithm enables efficient fine-tuning without the need for a separate value function model, enhancing training stability.
- Iterative Training: A "self-improvement loop" allows forward and backward prompts to swap roles. As the model improves at generating clear descriptions, it becomes a more effective judge for the inverse task, creating a virtuous cycle of mutual improvement.
Experimental Evaluation
RTRL was evaluated across diverse chemical benchmarks, including CHEBI-20 (molecule-description pairs), LM-24 (technical patent descriptions), and USPTO datasets for reaction prediction and retrosynthesis. The framework was tested in supervised, self-supervised (unlabeled molecules), and synthetic data regimes, demonstrating its versatility.
Results and Key Insights
RTRL-trained models consistently outperformed strong baselines, including specialized models like ChemDFM and Mol-Instruction.
Key findings include:
- Consistency and Accuracy Gains: RTRL improved exact match consistency by up to 52% and primary task performance (e.g., reaction prediction) by up to 55%.
- Latent Knowledge Alignment: The framework forces the model to align its internal representations, discarding ambiguous outputs in favor of concrete, "recoverable" ones.
- Data Efficiency: RTRL effectively utilizes unlabeled data. By using the millions of known molecules without text descriptions, the model can improve its descriptive capabilities through self-supervised round-trips.
Conclusion and Future Work
Round-Trip Reinforcement Learning demonstrates that the inherent bidirectionality of chemical tasks can be harnessed for self-supervised improvement. While currently limited to generative tasks, future work aims to extend this principle to classification and regression, as well as other domains like mathematics and software engineering where round-trip consistency is a hallmark of true understanding.
Summary updated