The invention discloses a
natural gas pipeline single-source domain migration fault diagnosis method and
system based on Bayesian adversarial
attack, and belongs to the technical field of mechanical fault detection and diagnosis. The core of the method is to solve the problem that the generalization ability is insufficient when an existing deep reasoning model processes pipeline fault diagnosis tasks under different working conditions by adopting a transfer learning technology. The method mainly comprises the following steps: constructing an
attack sample generator based on a
Bayesian network, and aiming at generating an
attack sample capable of enabling an
inference model to make a wrong decision by adding elaborately designed tiny disturbance into an input sample so as to mine and analyze vulnerabilities of the
inference model;
a domain discriminator is constructed on the basis of a
Bayesian network and aims to assist in generating an attack sample with high concealment through adversarial learning with a generator, that is, almost no visible difference exists between the attack sample and an original sample; a classifier is constructed based on a
Bayesian network, and posterior distribution of network parameters of the
inference model is restrained to be adjusted towards a higher attack sample
score by expanding a distance between an attack sample and an original
decision boundary of the inference model, so that the adaptability and robustness of the model when facing disturbance of different domains are enhanced. Through the above steps, the method effectively solves the problems of missing report and false report risk improvement caused by poor generalization ability of a traditional
deep learning model under different working conditions.