Cyber Security Intrusion Detection for Agriculture 4.0: Machine Learning-Based Solutions, Datasets, and Future Directions Mohamed Amine Ferrag, Lei Shu, Senior Member, IEEE, Othmane Friha, and Xing Yang Abstract—In this paper, we review and analyze intrusion detection systems for Agriculture 4.0 cyber security. Specifically, we present cyber security threats and evaluation metrics used in the performance evaluation of an intrusion detection system for Agriculture 4.0. Then, we evaluate intrusion detection systems according to emerging technologies, including, Cloud computing, Fog/Edge computing, Network virtualization, Autonomous trac- tors, Drones, Internet of Things, Industrial agriculture, and Smart Grids. Based on the machine learning technique used, we provide a comprehensive classification of intrusion detection systems in each emerging technology. Furthermore, we present public data- sets, and the implementation frameworks applied in the perfor- mance evaluation of intrusion detection systems for Agriculture 4.0. Finally, we outline challenges and future research directions in cyber security intrusion detection for Agriculture 4.0. Index Terms—Agriculture 4.0, cyber security, intrusion detection system, machine learning approaches, smart agriculture.    I. Introduction T HE agricultural and industrial revolution has evolved through the following four generations: Agriculture 1.0, Agriculture 2.0, Agriculture 3.0, and Agriculture 4.0, as depicted in Fig. 1. Agriculture 1.0 refers to the practices of agriculture from the beginning of human civilization until the end of the 19th century, a period when farmers depended heavily on traditional cultivation tools such as the traditional plough for creating favorable conditions for seed placement and plant growth. At the beginning of the 20th century, the increase in agricultural production was known as Agriculture 2.0 based on the agricultural machinery includes using combines, irrigation, harvesting, trucks, tractors, aircraft, helicopters, etc. From the early seventies to the present day, Agriculture 3.0 appeared which is based on green renewable energy such as bioenergy, geothermal energy, solar energy, hydropower, and wind power [1]. Agriculture 1.0 Ancient times Agriculture 2.0 1950 Agriculture 3.0 1992 Agriculture 4.0 2017 Complexity Smart agriculture: the intelligence, big data, unmanned vehicles, robotics... Traditional agriculture: the use of human and animal resources Mechanized agriculture: the use of powered machinery Automated agriculture: the use of high speed development Production Industry 1.0 Steam-based mechanical production Industry 2.0 Electricity mass-based production Industry 3.0 Controller-based automation Industry 4.0 Artificial intelligence- based control 1784 1870 1969 2014 Intelligence Electronics Mechanization Indigenous tool Physical threats Cybersecurity threats of Things, artificial use of Internet Fig. 1. The development of agricultural revolutions with industrial revolutions and related cyber security threats. The term “Agriculture 4.0” appeared following “Industry 4.0” [2], [3], which is defined by a combination of technologies that are emerging such as Blockchain, software- defined networking (SDN), Artificial Intelligence, Internet of Things (IoT), IoT devices, 5G communications, Drones, Fog/Edge computing, Cloud computing, network function virtualization (NFV), Smart Grids, etc. The diagram of Agriculture 4.0 is shown in Fig. 2. In the physical layer, various IoT devices (e.g., sensor and camera) and drones are applied to monitor agricultural environmental conditions by collecting meteorological data, soil moisture, crop image, and livestock behavior analysis, and health monitoring data. Different actuators (e.g., autonomous tractors, insecticidal lamps, feeding machine, and irrigation equipment) are activated when the data meets specific conditions, which promote the automation of agriculture production and management. Besides, new energy technology (e.g., solar Manuscript received March 17, 2021; revised April 19, 2021; accepted May 17, 2021. This work was supported in part by the Research Start-Up Fund for Talent Researcher of Nanjing Agricultural University (77H0603) and in part by the National Natural Science Foundation of China (62072248). Recommended by Associate Editor MengChu Zhou. (Corresponding author: Lei Shu.) Citation: M. A. Ferrag, L. Shu, O. Friha, and X. Yang, “Cyber security intrusion detection for agriculture 4.0: Machine learning-based solutions, datasets, and future directions,” IEEE/CAA J. Autom. Sinica, vol. 9, no. 3, pp. 407–436, Mar. 2022. M. A. Ferrag is with Department of Computer Science, Guelma University, B.P. 401, 24000, Algeria (e-mail: ferrag.mohamedamine@univ-guelma.dz). L. Shu is with the College of Artificial Intelligence, Nanjing Agricultural University, Nanjing 210031, China, and also with the School of Engineering, University of Lincoln, Lincoln LN67TS, UK (e-mail: lei.shu@ieee.org). O. Friha is with the Networks and Systems Laboratory (LRS), University of Badji Mokhtar-Annaba, B.P.12, Annaba 23000, Algeria (e-mail: othmane.friha@univ-annaba.org). X. Yang is with the College of Engineering, Nanjing Agricultural University, Nanjing 210031, China (e-mail: harryyangx@gmail.com). Color versions of one or more of the figures in this paper are available online at http://ieeexplore.ieee.org. Digital Object Identifier 10.1109/JAS.2021.1004344 IEEE/CAA JOURNAL OF AUTOMATICA SINICA, VOL. 9, NO. 3, MARCH 2022 407