Code Consistency Preference Optimization Verification for Language Model Alignment
Abstract
Execution-based verification enhances large language models' mathematical reasoning through computational soundness and dependency-aware filtering. However, prior preference optimization methods relying on Bradley-Terry reward models fail to capture the logical dependencies and execution consistency needed for scientific tasks. We propose a method that generates computationally sound solutions with dependency graphs for execution-consistent preference optimization. We first build a scientific reasoning dataset using UltraFeedback prompts, model generations, verification, and consistency results. Then we extract reasoning step expressions, prerequisites, and derivability relationships to construct dependency graphs and compute execution consistency scores. These scores are appended to each step, creating paired training data. Fine-tuning Llama-3-8B and DeepSeekMath-7B yields significant gains: +17.0% on MATH and +15.1% on GSM8K. Extending our Scientific Feasibility Control framework achieves 50.1% accuracy on PhyX multimodal physics reasoning, surpassing DeepSeek-R1 (49.8%) and OpenAI o3-mini (48.2%), with 91.7% scientific validity coverage at alpha=0.10 and 73% fewer scientific law violations, resulting in the CCPO model family.
Create a lesson
Metadata
- Categories
- cs.SE, cs.CL
- Comments
- 24 pages
Related papers
Improving Code Understanding in Large Language Models through Concept-Aware Consistency Learning
Shared title terminologycs.SEXiaoning Ren, Qiang Hu, Wei Ma et al.
The Best Programming Language for Tokenmaxxing: An Investigation of Coding Agent Behavior Across Programming Languages
Shared title terminologycs.SEZixuan Wu, Carolyn Jane Anderson, Arjun Guha
HarnessLLM: Rust Verification Harness Generation with Large Language Models
Shared title terminologycs.SEMinghua Wang, Yuwei Liu, Lin Huang
Enhancing SLMs for Sustainable Code Optimization in Radio-Astronomy
Shared title terminologycs.SEElisa Chiarotto, Jingbo Li, P. Chris Broekema et al.
Multi-Source and Cross-Scenario Strategy-Guided Code Optimization
Shared title terminologycs.SEYuwei Zhao, Qianyu Xiao, Ye Cui et al.
PerfAgent: Profiler-Guided Iterative Refinement for Repository-Level Code Optimization
Shared title terminologycs.SERyan Deng, Yuanzhe Liu, Bastian Lipka et al.