RL-Struct: A Lightweight Reinforcement Learning Framework for Reliable Structured Output in LLMs
About
The Structure Gap between probabilistic LLM generation and deterministic schema requirements hinders automated workflows. We propose RL-Struct, a lightweight framework using Gradient Regularized Policy Optimization (GRPO) with a hierarchical reward function to align LLMs with structural constraints. This approach eliminates the critic network, reducing peak VRAM by 38% compared to PPO. On complex JSON tasks, RL-Struct achieves 89.7% structural accuracy and 92.1% validity, significantly outperforming SFT and zero-shot baselines. We also report an emergent curriculum--a self-organized learning process where the model prioritizes syntax before semantics. Our model is publicly available at https://huggingface.co/Freakz3z/Qwen-JSON.
Ruike Hu, Shulei Wu• 2025
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| Structured JSON Generation | JSON Generation dataset | Structural Accuracy89.7 | 9 | |
| Function Calling | ToolUse (test) | Structural Accuracy91.2 | 3 | |
| Mathematical Reasoning | GSM8K JSON (test) | Structural Accuracy0.854 | 3 | |
| Recipe Generation | Recipe Gen (test) | Structural Accuracy89.7 | 3 |
Showing 4 of 4 rows