AIO1: Pretrained End-to-End Neural Network for General Advanced Process Control
English | 中文
AIO1 is a single pretrained end-to-end neural network (~131M parameters) designed as a general multivariable Advanced Process Control (APC) controller. It controls arbitrary industrial plants through one dimensionless, plant-agnostic interface:
No commissioning step test: runs closed-loop immediately on unseen plants.
No formula, identifier, or MPC solver at runtime: no underlying PID loop, no recursive least squares, and no online optimization solver.
Plant-agnostic interface: receives only normalized public instrument readings (controlled variables, setpoints, bands, limits, priorities, measured disturbances, valve openings, rate limits, optional loop pairing and directions, and step interval). It infers plant dynamics, dead time, and operating drift directly from its own closed-loop history.
Code repository: M3rcyzzz/AIOGym2
Open-source process simulator & H5 benchmark: M3rcyzzz/Hflash
Live research progress & replays: https://m3rcyzzz.club/aio/
ModelScope mirror: M3rcyzzz/AIO1
Status (2026-11-30)
Research checkpoint (Stage 12B v3, Hub round 82 — 4.56M 384-step black-box RL environment steps, simulation only, not validated on real industrial plants). This repository always keeps the latest verified checkpoint; each update replaces the previous release.
Architecture & Training Summary
- Runtime network (~131M parameters, single standalone model):
- Shared dimensionless encoders map every controlled variable, measured disturbance, and valve into 768-dim vectors so one set of weights adapts natively to plants of any size (trained across 12×5, 24×10, and 48×20).
- 12 spatio-temporal Transformer layers (width 768, 12 heads, RoPE, QK-Norm, KV caching), each combining causal temporal attention (128 steps), multi-lag cross-channel attention across 8 fixed delays (1 to 64 steps) for long dead times, simultaneous cross-channel interaction attention for multivariable coordination, and a 3,072-wide feed-forward network.
- Two persistent recurrent memories: a per-channel multi-timescale EMA (4–2,048 steps) for slow drift and levels, and an online linear-attention coupling memory (DeltaNet) updated in $O(1)$ per step that estimates live valve-to-sensor gains and in-flight moves in the delay pipe, protected by Cauchy outlier filtering against sudden unmeasured load shocks and a steady-state sign guardrail when valve direction is known.
- Direct action head with adaptive step-size scaling and
tanhrate-limit bounding.
- Two-stage black-box training (zero simulator gradients, forward-only Hflash):
- Training pool: 75% randomized procedural processes (long dead time, inverse response, strong nonlinearity, 4–12× band unmeasured step load shocks, hard limits, 10% faults) + 25% ODE mechanistic development plants (18 families), run purely forward under
torch.no_grad()with parallel(B, T)Transformer updates. - Stage A (Online DAgger): 85% student / 15% teacher rollouts; only paired episodes (75%) imitate a training-only MPC teacher that uses ONLY public instruments (never peeking at hidden loads); blind episodes (25%) never copy the teacher.
- Stage B (384-step Asymmetric PPO): optimizes undistorted real control cost plus exact absorbing trip penalties over 384-step horizons ($\gamma = 0.995$) with Dual-Clip PPO, a KL anchor back to Stage A, and a training-only Asymmetric Critic (removed completely at deployment). Multi-GPU training merges weights across cloud and local GPUs via DiLoCo (Muon + AdamW).
- Training pool: 75% randomized procedural processes (long dead time, inverse response, strong nonlinearity, 4–12× band unmeasured step load shocks, hard limits, 10% faults) + 25% ODE mechanistic development plants (18 families), run purely forward under
Verified Benchmark Results (2026-11-30, Simulation)
Official AIOGym-Bench H5 0–100 scale: 0 = all valves frozen (Hold), 100 = causal privileged Oracle-Anchor (oracle MPC), uncapped above 100 with smooth negative floor. Every plant below is strictly excluded from training; all controllers run the exact same unseen plants, events, and noise seeds.
1. Official AIOGym-Bench H5 Tracks (0–100 Scale, 360 steps)
| H5 Benchmark Track | Units | AIO1 (this checkpoint) | Self-tuning PID | Static-model MPC |
|---|---|---|---|---|
mech-industrial (Large industrial plants) |
6 | 61.4 (0% trips; +28.8 vs. MPC) | 65.8 | 32.6 |
shift-12x5 (Permanent drift / grade change) |
32 | 59.6 (0% trips; +16.6 vs. MPC) | 61.8 | 43.1 |
mech-heldout (14 held-out chemical units) |
14 | 47.9 (85.7% safe; pulled down by fed-batch) | 78.4 | 88.7 |
synth-12x5 (Standard 12×5 MIMO) |
64 | 31.0 (0% trips; Stage 12A start 27.2) | 56.9 | 75.1 |
synth-24x10 (Large 24×10 MIMO) |
32 | 24.8 (0% trips; +12.3 vs. PID) | 12.5 | 85.6 |
synth-48x20 (Plantwide 48×20 MIMO) |
16 | 24.0 (0% trips; +25.6 vs. PID) | −1.6 | 37.7 |
fault-12x5 (Concurrent multi-faults) |
32 | 15.8 (0% trips; r102 20.2) | 57.3 | 56.8 |
unpaired-12x5 (Blind pairing) |
64 | −6.0 (0% trips; r34 +3.1) | — | 75.1 |
2. Zero-Shot Mechanistic Industrial & Chemical Plants (0–100 H5 Scale, Never Seen in Training)
- Top zero-shot scores: Crystallizer 112.4 (PID 113.8, MPC 114.8), Debutanizer 108.2 (+11.8 vs. PID 96.4), GasLib-24 pipeline 100.5 (PID 93.9, MPC −99.9), Williams–Otto reactor 98.6 (+1.9 vs. PID 96.7), BSM1 wastewater 95.0 (PID 96.9, MPC 99.4), VAM vinyl acetate 87.7 (PID 90.9, MPC 96.6), Benzene–Toluene 77.3 (PID 82.7, MPC 97.6), FCCU 49.4 (beats both PID 43.9 and MPC 49.1), TEP 41.5 (PID 52.2, MPC 43.6).
- Remaining bottlenecks: Headbox 15.2, TEP-9 9.6, Methanol 5.7, Fed-batch bioreactor −81.5 (PID 103.0, MPC 101.4).
3. External Commercial Dynamic Simulators (0 = Valves Frozen, 100 = Static-Model MPC)
Measured on Stage 12A r7 (100% zero trips; Stage 12B external re-eval scheduled):
- NeqSim 3.30 (5×5 two-stage oil-gas separator): AIO1 93.8 vs. Self-tuning PID 87.6 vs. Static-model MPC 100.0.
- DWSIM 10.3 (5×3 pressurized catalytic CSTR): AIO1 90.8 vs. Self-tuning PID 75.2 vs. Static-model MPC 100.0.
Files
| File | Description |
|---|---|
model.safetensors |
Standalone inference weights (~131M parameters, safetensors format) |
config.json |
Minimal loader configuration |
modeling_aio.py, code/ |
Self-contained inference loader (load(), Controller, encode()) and slim runtime modules |
README.md, README_zh.md, LICENSE |
Bilingual model cards and MIT license |
Usage
# pip install torch numpy safetensors huggingface_hub
from huggingface_hub import snapshot_download
import sys
import numpy as np
path = snapshot_download("M3rcyzzz/AIO1")
sys.path.insert(0, path)
import modeling_aio as M
net = M.load(device="cpu") # or device="cuda" / "mps"
ctl = M.Controller(net) # keeps per-plant history & memory; call ctl.reset() for a new plant
packet = M.encode(
values=y, previous=y_prev, target=sp, last_target=sp_prev,
scale=cv_scale, lower=cv_low, upper=cv_high, tracking=is_tracked,
command=u, last_command=u_prev, u_low=u_min, u_high=u_max,
slew=du_max, pairing=pairing, dt=dt,
sign=paired_gain_sign, # +1 / -1 per MV, 0 if unknown; optional dv=, weight=
)
move = ctl.step(packet) # per-MV increment in [-1, 1] of slew limit (0 on unused slots)
u = np.clip(u + move[:len(u)] * du_max, u_min, u_max)
Limitations
- Simulation-only research checkpoint; never validated on a real industrial plant and not safety-certified.
- Clear gaps remain on standard
synth-12x5(31.0 vs. PID 56.9), concurrent faults (fault-12x515.8), blind pairing (unpaired-12x5−6.0), and nonlinear fed-batch reactors.
License
MIT (Copyright (c) 2026 Mercy Zhang), see LICENSE.