Improving LLM-Generated Process Model Quality Through Reinforcement Learning: The Role of Reward Function Design

· Source: cs.CL updates on arXiv.org · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Software Development & Engineering · Depth: Expert, extended

Summary

A systematic investigation explored reward function design for improving Large Language Model (LLM)-generated Business Process Model and Notation (BPMN) process models using reinforcement learning (RL). Researchers trained two LLM families, Llama 3.1 8B and Qwen 2.5 14B, across 48 configurations with Group Sequence Policy Optimization (GSPO). Rewards were derived from 38 metrics spanning syntactic, pragmatic, and semantic quality. Key findings indicate RL significantly enhances pragmatic and syntactic quality while preserving semantic fidelity, reducing output variability by over sixfold. Counter-intuitively, equal reward weighting consistently outperformed targeted weighting, which often led to policy collapse. Furthermore, design choices like invalidity penalties and Supervised Fine-Tuning (SFT) initialization interacted non-trivially with model architecture, proving essential for one model but irrelevant or counterproductive for another. These results highlight reward composition as a primary determinant of optimization outcomes, with effects as significant as applying RL itself.

Key takeaway

For AI Engineers developing LLMs for structured generation tasks like BPMN modeling, you should prioritize equal reward weighting in your reinforcement learning setups. Avoid aggressive targeted weighting, as it can destabilize optimization and lead to policy collapse. Critically, evaluate your base model's inherent validity to determine if an invalidity penalty is needed, as it can implicitly maintain output diversity. Your decision to apply Supervised Fine-Tuning (SFT) before RL should be informed by your model's architecture and its existing task-relevant capabilities.

Key insights

Reward function design is critical for multi-dimensional structured generation, impacting RL optimization as much as RL application itself.

Principles

Method

The study used Group Sequence Policy Optimization (GSPO) with multi-dimensional rewards from 38 metrics (syntactic, pragmatic, semantic) to fine-tune LLMs for BPMN generation.

In practice

Topics

Code references

Best for: Research Scientist, AI Scientist, Machine Learning Engineer, AI Engineer

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by cs.CL updates on arXiv.org.