A physics-based agentic RAG framework for anomaly detection in cyber-physical manufacturing systems
Аннотация
The integration of Information Technology (IT) and operational technology (OT) in Industry 4.0 has made manufacturing systems more susceptible to cyber-physical attacks, where attacks occur in the form of both network issues and deviations in the real-world production process. The current security methods are still predominantly IT-based, whereas Retrieval-Augmented Generation (RAG) systems use textual similarity and do not consider the real-life limitations of industrial processes. Such disconnection may lead to operationally infeasible or unsafe AI-generated suggestions. This paper proposes a physics-based Agentic RAG framework for anomaly detection in cyber-physical manufacturing systems. Unlike conventional AI-based approaches that rely primarily on data-driven or semantic similarity methods, the proposed framework integrates deterministic Max-Plus Algebra (MPA) with constraint-aware knowledge retrieval to ensure physically consistent and operationally feasible decision support. The architecture consists of a five-layer pipeline that combines real-time system monitoring, MPA-based anomaly detection, semantic query construction, and RAG-driven reasoning. The framework is evaluated using a large-scale synthetic manufacturing dataset comprising 432,000 time-series observations with simulated cyber-attack scenarios, including distributed denial-of-service, sensor spoofing, and system freeze events. Experimental results demonstrate strong detection performance, achieving a precision of 0.967, recall of 0.777, and F1-score of 0.862. In addition, the integration of resource- and shift-aware constraints significantly improves the reliability and feasibility of AI-generated mitigation strategies. The findings highlight the effectiveness of combining physics-based modeling with generative AI for enhancing resilience, safety, and decision-making in smart manufacturing environments. The proposed approach provides a scalable and practical solution for next-generation Industry 4.0 systems.