# Differentially Private XGBoost Algorithm for Traceability of Rice Varieties
## 1 Introduction  
The security of rice is an important issue related to human security and the global economy as an important cereal crop. Tracing the variety, origin, and authenticity of rice has become a hot research topic at home and abroad [1, 2]. The spectroscopy [3], stable isotope analysis [4], volatile matter analysis [5], mineral element analysis [6], and metabolomics [7] combined with data mining are often used to identify and protect the authenticity of the variety and origin of rice, and to ensure the safety and quality of rice [8, 9].  
In the process of traceability, blockchain [10], partial least squares [11], cluster analysis [12], deep learning [13], neural network [14], and other methods were used for discriminant modeling, in order to realize the traceability of origin or variety through the established model.  
However, in the process of using the model to trace the variety or origin, the characteristic information will be easily leaked or falsified. The characteristic data of the established model is lost or the established discriminant model is invalid. These pose a serious threat to the quality and authenticity of variety and the origin of rice. Therefore, it is urgent to protect the privacy of the data to ensure the authenticity of the data and the effectiveness of the model.  
To solve the privacy problems in the process of establishing the traceability discrimination model, a variety of privacy protection methods have been proposed. [PERSON] [15] proposed a new composite chaotic key design, which can better meet the needs of information encryption and ensure the security of agricultural information on the basis of retainingthe original chaotic nature in order to ensure the information security in the process of agricultural information transmission [16; 17].  
Due to the computational complexity of the above methods, a large number of encryption and decryption calculations are required when privacy protection is carried out, which is costly and the computational efficiency is limited, and it faces great limitations in practical applications. Differential privacy [18] technology is widely recognized as a strict privacy protection method, and its privacy protection and robustness have good theoretical support. It prevents the adversary from inferring the existence of specific records by adding noise to the query results, so as to protect data privacy and information security. For example, [PERSON] et al. [19] proposed a framework in which the privacy of individual owners of smart farms is protected by adding noise to the data through data perturbation techniques such as white Gaussian noise. In this method, noise is directly added to the data, and the authenticity and integrity of the data cannot be guaranteed after perturbation.  
In this work, we innovatively proposed a tracing model of the XGBoost rice variety based on a differential privacy perturbation mechanism, which can protect the tracing feature data well. The experimental results show that the improvement of differential privacy perturbation mechanism does not affect the accuracy of the discriminant model, and can ensure the authenticity and integrity of rice variety data and discriminant model.  
Our main contribution can be summarized as follows:  
(1) We propose a differential privacy XGBoost algorithm, which realizes the traceability of rice varieties under privacy protection, and measures the risk of privacy leakage.  
(2) We propose a privacy protection method by adding Gaussian noise to the first derivative and the second derivative of the Taylor expansion, and can adjust the privacy protection level by changing the parameters.  
(3) We carried out experiments on rice variety traceability with our privacy protection algorithm, which further confirmed the effectiveness and realizability of the method we proposed.