Verified, then logged.
Wed 25 Nov 2026 · 07:23 KST / 22:23 UTC한국어 | ENSearch /

01 / AI · Analysis

AI reconstructs industrial controller code from I/O records

Tests with new inputs showed that most errors occurred in control branches that the original records had never exercised.

Two pin-and-thread networks of different sizes but with matching hub, bridge and periphery patterns hang on a lab wall above an open small desktop computer with an empty graphics card slot. AI-generated image

The Trace2ST researchers reported that reconstructed code exactly reproduced the recorded inputs and outputs for 43 of 47 programmable logic controller (PLC) programs.

The study’s abstract set out two checks. The first measured whether the reconstructed code could replay the recorded behaviour. The second tested whether it matched the original when given new inputs.

According to the abstract, a large language model used the input and output records to write the code without seeing the original. It wrote the programs in Structured Text, a standard PLC programming language.

Output agreement on new inputs

The researchers compared the reconstructed and original outputs at each control cycle using inputs absent from the records. The abstract reported that the outputs matched on 94% of cycles.

According to the abstract, a comparison method that used no language model also reproduced the recorded inputs and outputs. It scored 0.40 on agreement with the original under new inputs.

Control branches missing from the records

The researchers reported that most remaining errors occurred in control branches that the original records had never exercised.

According to the abstract, adding records that exercised those branches improved agreement with the original on a separate set of test inputs.

Comparison with water-treatment measurements

The researchers used records from a public water-treatment test facility to reconstruct its control equations. When they checked the equations against new measurements, they reported a coefficient of determination of $R^2 > 0.99$.

The abstract gave no results from operating the physical facility with the reconstructed code.