cs.LGNov 19, 2026

OceanCoder: A Verification-Guided Large Language Model for Automated Simulation Modelling in Ocean Engineering

Authors: Can Xue, Changhong He, Ziyi Sun, Anliang Ge, Shimin Yu, Bingchen Liang

Organizations: College of Engineering, Ocean University of China, Qingdao, 266100, China · School of Mechanical Engineering and Automation, Beihang University, Beijing, 102206, China

Abstract

Numerical simulation is important in ocean engineering, but model construction requires expert knowledge. Large language models support automated modelling, but code syntax and successful execution alone do not establish whether generated models and results meet engineering requirements. We present OceanCoder, a Qwen3-8B-based large language model for automated simulation modelling in ocean engineering. To address specialised programming requirements and scarce training data, we develop an extensible data construction pipeline producing 12,000 verified supervised fine-tuning (SFT) examples across 12 engineering task categories. A three-layer verification framework checks model inputs against engineering parameters and task constraints, verifies completion of required simulation analyses, and assesses the engineering plausibility of computed outputs. Its outcomes provide graded rewards for group relative policy optimisation (GRPO), guiding the model towards engineering task completion. We also construct the first benchmark for automated modelling in ocean engineering, covering out-of-distribution tasks and real-world engineering cases. Experiments and ablation studies demonstrate the effectiveness of the data pipeline, verification framework and reward design. OceanCoder outperforms both base models and the closed-source comparison, with Pass@1 increasing from 0% for the base model to 46.77% after SFT and 51.43% after GRPO. These results support engineering verification as a training signal for automated simulation modelling.

Figures & tables

Appendix figures & tables13 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. MarineSparkLM-4B: A Lightweight Language Model for Marine and Offshore Engineering Built by Parameter-Efficient Adaptation

    Nov 14, 2026Cheng Siong ChinLLM Fine-TuningDomain Adaptation for LLMs

  2. Simulation Code Generation for Fluid Systems using Large Language Models: Benchmarking Models and Prompting Strategies

    Jul 31, 2026Jan Marius Stürmer, Jascha Knack, Tobias Koch +1LLM PromptingCode Generation Evaluation