mlsanityData to 7 Oct 2026

LLM4PLC: Harnessing Large Language Models for Verifiable Programming of PLCs in Industrial Control Systems

arXiv 2401.05443 ↗First posted 8 Jan 2024cs.SE cs.AI cs.CLcited by 20

Not on the map. Why?

Abstract (arXiv)

Although Large Language Models (LLMs) have established pre-dominance in automated code generation, they are not devoid of shortcomings. The pertinent issues primarily relate to the absence of execution guarantees for generated code, a lack of explainability, and suboptimal support for essential but niche programming languages. State-of-the-art LLMs such as GPT-4 and LLaMa2 fail to produce valid programs for Industrial Control Systems (ICS) operated by Programmable Logic Controllers (PLCs). We propose LLM4PLC, a user-guided iterative pipeline leveraging user feedback and external verification tools including grammar checkers, compilers and SMV verifiers to guide the LLM's generation. We further enhance the generation potential of LLM by employing Prompt Engineering and model fine-tuning through the creation and usage of LoRAs. We validate this system using a FischerTechnik Manufacturing TestBed (MFTB), illustrating how LLMs can evolve from generating structurally flawed code to producing verifiably correct programs for industrial applications. We run a complete test suite on GPT-3.5, GPT-4, Code Llama-7B, a fine-tuned Code Llama-7B model, Code Llama-34B, and a fine-tuned Code Llama-34B model. The proposed pipeline improved the generation success rate from 47% to 72%, and the Survey-of-Experts code quality from 2.25/10 to 7.75/10. To promote open research, we share the complete experimental setup, the LLM Fine-Tuning Weights, and the video demonstrations of the different programs on our dedicated webpage.

Key facts. Cited by 20 papers in the map (data through 7 Oct 2026). Builds on 26 of its 62 references that are in the map. First posted on arXiv 8 Jan 2024.

Builds on

26 of 62 references.

References · 26

  1. 2017Attention Is All You Needcited by 59,932
  2. 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,084
  3. 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
  4. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
  5. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
  6. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  7. 2021Finetuned Language Models Are Zero-Shot Learnerscited by 3,747
  8. 2023Code Llama: Open Foundation Models for Codecited by 2,105
  9. 2022Few-Shot Parameter-Efficient Fine-Tuning is Better and Cheaper than In-Context Learningcited by 886
  10. 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
  11. 2023A Comprehensive Overview of Large Language Modelscited by 639
  12. 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 355
14 more
  1. 2022CodeRL: Mastering Code Generation through Pretrained Models and Deep Reinforcement Learningcited by 342
  2. 2023A Comprehensive Capability Analysis of GPT-3 and GPT-3.5 Series Modelscited by 244
  3. 2023VeriGen: A Large Language Model for Verilog Code Generationcited by 197
  4. 2023DoctorGLM: Fine-tuning your Chinese Doctor is not a Herculean Taskcited by 130
  5. 2021Examining Zero-Shot Vulnerability Repair with Large Language Modelscited by 105
  6. 2022Interactive and Visual Prompt Engineering for Ad-hoc Task Adaptation with Large Language Modelscited by 70
  7. 2023AutoML in the Age of Large Language Models: Current Challenges, Future Opportunities and Riskscited by 34
  8. 2023Domain Adaptive Code Completion via Language Models and Decoupled Domain Databasescited by 19
  9. 2022Parameter-Efficient Tuning Makes a Good Classification Headcited by 15
  10. 2023FRANC: A Lightweight Framework for High-Quality Code Generationcited by 14
  11. 2023The potential of LLMs for coding with low-resource and domain-specific programming languagescited by 11
  12. 2021SYNFIX: Automatically Fixing Syntax Errors using Compiler Diagnosticscited by 8
  13. 2023CFG2VEC: Hierarchical Graph Neural Network for Cross-Architectural Software Reverse Engineeringcited by 6
  14. 2013On Formal Reasoning on the Semantics of PLC using Coqcited by 1

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 7; 2025: 6; 2026: 7.

20 papers.

Sort:

By area:

  1. 2024Large Language Model-Based Agents for Software Engineering: A Surveycited by 173
  2. 2024A Survey on LLM-based Code Generation for Low-Resource and Domain-Specific Programming Languagescited by 65
  3. 2024Agents4PLC: Automating Closed-loop PLC Code Generation and Verification in Industrial Control Systems using LLM-based Agentscited by 25
  4. 2024Large Language Model-Enabled Multi-Agent Manufacturing Systemscited by 14
  5. 2025Leveraging LLM Agents and Digital Twins for Fault Handling in Process Plantscited by 9
  6. 2025Autonomous Control Leveraging LLMs: An Agentic Framework for Next-Generation Industrial Automationcited by 8
  7. 2024MCCoder: Streamlining Motion Control with LLM-Assisted Code Generation and Rigorous Verificationcited by 4
  8. 20253D Software Synthesis Driven by Constraint-Expressive Intermediate Representationcited by 3
  9. 2024AutoPLC: Generating Vendor-Aware Structured Text for Programmable Logic Controllerscited by 2
  10. 2025Capability-Driven Skill Generation with LLMs: A RAG-Based Approach for Reusing Existing Libraries and Interfacescited by 2
  11. 2025Domain Specific Benchmarks for Evaluating Multimodal Large Language Modelscited by 2
  12. 2024INVARLLM: LLM-assisted Physical Invariant Extraction for Cyber-Physical Systems Anomaly Detectioncited by 1
8 more
  1. 2026DCoPilot: Generative AI-Empowered Policy Adaptation for Dynamic Data Center Operationscited by 1
  2. 2025Utilizing LLMs for Industrial Process Automation: A Case Study on Modifying RAPID Programscited by 0
  3. 2026Downsides of Smartness Across Edge-Cloud Continuum in Modern Industrycited by 0
  4. 2026ROSUM-MCTS: Monte Carlo Tree Search-Inspired HDL Code Summarization with Structural Rewardscited by 0
  5. 2026RAG-Based Auto-Configuration for Industrial Fieldbus Devicescited by 0
  6. 2026Large Language Models in the Loop: A Stability- and Network-Aware Survey in Networked Control, Cyber-Physical, and Multi-Agent Systemscited by 0
  7. 2026Requirement-Bound Verified Commissioning: A Frozen Four-Billion-Parameter Local Model as a Candidate Generator under an External Acceptance Layer with Verification and Release Authoritycited by 0
  8. 2026From Dead Code and Static Requirements to Working Engines: Software Revival with Coding Agentscited by 0