mlsanityData to 14 Oct 2026

Retrieval-Augmented Fine-Tuning With Preference Optimization For Visual Program Generation

arXiv 2502.16529 ↗First posted 23 Feb 2025cs.CL cs.AIcited by 2

On the map: Retrieval-augmented generation → RAG for code

also in 1 more
Abstract (arXiv)

Visual programming languages (VPLs) allow users to create programs through graphical interfaces, which results in easier accessibility and their widespread usage in various domains. To further enhance this accessibility, recent research has focused on generating VPL code from user instructions using large language models (LLMs). Specifically, by employing prompting-based methods, these studies have shown promising results. Nevertheless, such approaches can be less effective for industrial VPLs such as Ladder Diagram (LD). LD is a pivotal language used in industrial automation processes and involves extensive domain-specific configurations, which are difficult to capture in a single prompt. In this work, we demonstrate that training-based methods outperform prompting-based methods for LD generation accuracy, even with smaller backbone models. Building on these findings, we propose a two-stage training strategy to further enhance VPL generation. First, we employ retrieval-augmented fine-tuning to leverage the repetitive use of subroutines commonly seen in industrial VPLs. Second, we apply direct preference optimization (DPO) to further guide the model toward accurate outputs, using systematically generated preference pairs through graph editing operations. Extensive experiments on real-world LD data demonstrate that our approach improves program-level accuracy by over 10% compared to supervised fine-tuning, which highlights its potential to advance industrial automation.

Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Placed in RAG for code, one of 15 directions in Retrieval-augmented generation. Builds on 23 of its 57 references that are in the map. First posted on arXiv 23 Feb 2025.

Builds on

23 of 57 references.

References · 23

  1. 2023GPT-4 Technical Reportcited by 18,396
  2. 2024The Llama 3 Herd of Modelscited by 14,715
  3. 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,380
  4. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  5. 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 8,065
  6. 2021Program Synthesis with Large Language Modelscited by 3,637
  7. 2019The Curious Case of Neural Text Degenerationcited by 2,916
  8. 2020Learning to summarize from human feedbackcited by 2,588
  9. 2023AWQ: Activation-aware Weight Quantization for LLM Compression and Accelerationcited by 1,298
  10. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,181
  11. 2022CodeT: Code Generation with Generated Testscited by 384
  12. 2024RAFT: Adapting Language Model to Domain Specific RAGcited by 262
11 more
  1. 2024On Softmax Direct Preference Optimization for Recommendationcited by 64
  2. 2024CodeUltraFeedback: An LLM-as-a-Judge Dataset for Aligning Large Language Models to Coding Preferencescited by 57
  3. 2024ComfyBench: Benchmarking LLM-based Agents in ComfyUI for Autonomously Designing Collaborative AI Systemscited by 30
  4. 2024West-of-N: Synthetic Preferences for Self-Improving Reward Modelscited by 28
  5. 2024Agents4PLC: Automating Closed-loop PLC Code Generation and Verification in Industrial Control Systems using LLM-based Agentscited by 26
  6. 2024Does RLHF Scale? Exploring the Impacts From Data, Model, and Methodcited by 23
  7. 2024InfiniteWorld: A Unified Scalable Simulation Framework for General Visual-Language Robot Interactioncited by 15
  8. 2023ChatGPT for PLC/DCS Control Logic Generationcited by 9
  9. 2021Duplicated Code Pattern Mining in Visual Programming Languagescited by 2
  10. 2024Exploring LLM Support for Generating IEC 61131-3 Graphic Language Programscited by 2
  11. 2024Benchmarking LLM Code Generation for Audio Programming with Visual Dataflow Languagescited by 1

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 2.

2 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2025Boosting Chart-to-Code Generation in MLLM via Dual Preference-Guided Refinement
  2. 2025RAG or Fine-tuning? A Comparative Study on LCMs-based Code Completion in Industry
  3. 2025Evaluating Large Language Models for Functional and Maintainable Code in Industrial Settings: A Case Study at ASML
  4. 2026Self-Distillation Policy Optimization via Visual Feedback: Bridging Code and Visual Artifacts
  5. 2025Learning to Align Human Code Preferences
  6. 2024CodeGRAG: Bridging the Gap between Natural Language and Programming Language via Graphical Retrieval Augmented Generation
  7. 2024A Comparative Study of DSL Code Generation: Fine-Tuning vs. Optimized Retrieval Augmentation
  8. 2024Preference-Guided Refactored Tuning for Retrieval Augmented Code Generation