A multi-view outlier detection method based on generative adversarial networks
By constructing a neural network model for outlier detection in multi-view data based on generative adversarial networks, this method leverages the consistency and complementarity of multi-view data. The generator generates consistent multi-view data, while the discriminator determines authenticity. This approach overcomes the shortcomings of traditional methods in multi-view data detection and achieves efficient and accurate outlier detection.
Patent Information
- Application Number
- CN202211452477.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-21
- Publication Date
- 2026-03-06
- Estimated Expiration
- 2042-11-21
AI Technical Summary
Traditional single-view outlier detection methods cannot handle the rich information in multi-view data. Existing multi-view outlier detection methods perform poorly when detecting datasets with high outlier rates and require repeated detection of new data, failing to effectively utilize the consistency and complementarity of multi-view data.
A generative adversarial network-based approach is adopted. By constructing a multi-view neural network model, the generator and discriminator are trained using adversarial training between different views. The generator and discriminator network structures are convolutional neural networks, which capture key representations between different views. The model is trained using a normal dataset identified by domain experts. The generator generates consistent multi-view data, and the discriminator judges the authenticity of the generated data and calculates outlier scores.
It effectively detects datasets with high outlier rates, avoids redundant detection of new data, improves detection efficiency, maintains detection accuracy, and can directly detect new data of any size.
Smart Images

Figure CN115758276B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data analysis technology, specifically to a multi-view outlier detection method based on generative adversarial networks, used to solve the outlier detection problem in multi-view scenarios. Background Technology
[0002] Outlier detection, also known as anomaly detection, is an important data analysis technique. Semi-supervised outlier detection aims to identify outliers in a given dataset while training on normally labeled data. In recent decades, outlier detection methods have been applied in numerous fields, such as medical diagnosis, industrial defect detection, and intrusion detection.
[0003] With the advent of the big data era, we are facing data collected from different fields and through different methods. Features from different fields or collected through different methods are considered a specific view of the data, exhibiting heterogeneity—this is known as multi-view data. Multi-view data possesses two characteristics: consistency and complementarity. Consistency means that different views share some of the same information and exhibit consistent behavior; complementarity means that each view, in addition to shared information, also contains information unique to that individual view. While consistency and complementarity bring more information to multi-view data, they also present greater challenges for outlier detection. Traditional single-view outlier detection methods cannot handle the rich information of multi-view data and have shortcomings in detecting outliers. Multi-view outlier detection generally detects outliers by exploring the consistency between different views of the multi-view data; data points exhibiting inconsistent behavior in different views can be considered outliers.
[0004] Generative Adversarial Networks (GANs) are deep generative models, typically consisting of two neural networks: a generator (G) and a discriminator (D). The model aims to fit a given noise distribution to any desired distribution through adversarial training. The training process is a two-player zero-sum game: the generator G attempts to generate samples that resemble real images, while the discriminator D attempts to distinguish real images from those generated by the generator. Traditional GANs aim to generate images that are indistinguishable from real images. Both the generator and discriminator networks are constructed using convolutional neural networks.
[0005] Most existing multi-view outlier detection methods detect outliers by exploring inconsistent clustering results or inconsistent neighborhood structures across multiple views. These methods are unsupervised, and the model learning process is affected by outliers, resulting in poor performance when detecting datasets with high outlier rates. Furthermore, when faced with new data, these methods need to add the new data to the existing dataset for re-detection to maintain detection accuracy, leading to duplicate detection of the original data. Summary of the Invention
[0006] 1. The technical problem that the invention aims to solve
[0007] To address the limitations of single-view detection methods in handling multi-view data and the shortcomings of existing multi-view outlier detection methods, this invention provides a multi-view outlier detection method based on generative adversarial networks (GANs). This invention employs adversarial training on different views of normal data to capture key representations between different views, effectively detecting datasets with high outlier rates. Furthermore, a novel outlier calculation method allows for the separate calculation of outlier scores for each detected sample, enabling the direct detection of new data while maintaining detection accuracy and avoiding unnecessary duplicate detections.
[0008] 2. Technical Solution
[0009] To achieve the above objectives, the technical solution provided by the present invention is as follows:
[0010] The present invention provides a multi-view outlier detection method based on generative adversarial networks, comprising the following steps:
[0011] S1. Divide a multi-view dataset with V views to obtain a normal dataset identified by domain experts and an unknown dataset to be detected.
[0012] S2. Based on the generative adversarial network, construct a neural network model that conforms to the number of views and the data type of the view dataset in the multi-view dataset;
[0013] S3. Use normal datasets identified by domain experts as training samples to train a generative model that can capture the consistency of multi-view data.
[0014] S4. Using the trained generator, input the unknown dataset to be detected and calculate the outlier score for each sample to be tested.
[0015] 3. Beneficial effects
[0016] Compared with existing known technologies, the technical solution provided by this invention has the following significant advantages:
[0017] (1) The present invention provides a multi-view outlier detection method based on generative adversarial networks, wherein the generator utilizes the consistency of multi-view data to generate generated data for the current view from the original data of other views, and the discriminator determines whether the generated data for the current view is the original data for the current view to guide the generator to generate better data. By using normal data input and a specific error formula, the method can effectively capture the key characteristics between different views of normal data, thereby effectively detecting datasets with high outlier rates.
[0018] (2) Given that existing outlier detection methods based on generative adversarial networks (GANs) cannot be directly applied to multi-view outlier detection, this invention provides a multi-view outlier detection method based on GANs. This method extends GANs and applies them to multi-view outlier detection. It only requires inputting different view data of a sample into a pre-trained corresponding generator, and the outlier score of the sample can be calculated based on the latent space distance between the original data and the generated data. While maintaining detection accuracy, it can directly detect new data of any scale, avoiding repeated detection of existing data. Attached Figure Description
[0019] Figure 1 This is a flowchart of a multi-view outlier detection method based on generative adversarial networks according to the present invention.
[0020] Figure 2 This is an example diagram of outliers in a multi-view layout.
[0021] Figure 3 This is an example diagram of outlier points in multiple views according to Embodiment 1 of the present invention.
[0022] Figure 4 This is a schematic diagram of the neural network model in this invention. Detailed Implementation
[0023] To further understand the content of this invention, a detailed description of the invention will be provided in conjunction with the accompanying drawings and embodiments.
[0024] Example 1
[0025] Combination Figure 2 , Figure 2 The diagram illustrates outliers in multiple views. Samples exhibiting inconsistent behavior across different views are called class outliers; samples exhibiting consistent outlier behavior across different views are called attribute outliers; and samples exhibiting characteristics of class outliers in some views and characteristics of attribute outliers in others are called class-attribute outliers.
[0026] Figure 2 In the diagram, objects represented by equilateral triangles and inverted triangles are considered normal data, while objects represented by rhombuses are considered inaccurate. Figure 1 It exhibits the characteristics of an equilateral triangle, in visual... Figure 2 Objects exhibiting inverted triangular characteristics are considered outliers. Objects represented by squares exhibit characteristics different from normal data in every view, making them attribute outliers. Objects represented by regular octagons show... Figure 1 It displays the characteristics of outliers, in view Figure 2 The characteristics of attribute outliers are shown, and they belong to class-attribute outliers.
[0027] Traditional single-view outlier detection can only detect attribute outliers and some class-attribute outliers, but cannot detect class outliers.
[0028] Furthermore, Figure 3 This illustration demonstrates a multi-view outlier diagram of this embodiment. For a multi-view dataset of blackbirds and humans, where blackbirds and humans represent normal data, other birds are used to detect multi-view outliers. The two views are an image view and an audio view, respectively. First, in the visual... Figure 1 In the image view, mynas and blackbirds look very similar, making it difficult to detect a myna as an outlier based solely on image information, while sparrows and parrots are easily distinguishable. Secondly, in the visual... Figure 2 The audio and visual information shows that both the myna and the parrot mimic human speech, making it difficult to detect them as outliers based solely on audio information. The sparrow, however, is easily distinguishable. Combining the information from both views, the myna is a class of outliers, appearing in the visual context... Figure 1 The behavior of blackbirds is exhibited in the visual Figure 2 Exhibiting human-like behavior constitutes inconsistent outlier behavior. The sparrow is an attribute outlier, exhibiting consistent outlier behavior across all views. The parrot, on the other hand, is a class-attribute outlier, exhibiting inconsistent outlier behavior across all views. Figure 1 It exhibits consistent outlier behavior in one view and inconsistent outlier behavior in two views. This example can help us understand existing multi-view outliers.
[0029] Combination Figure 1 This embodiment of a multi-view outlier detection method based on generative adversarial networks specifically includes the following steps:
[0030] S1. A multi-view dataset with V views is divided into a normal dataset identified by domain experts and an unknown dataset to be detected. Specifically:
[0031] S1.1 Given a multi-view dataset X = {X_1, X_2, X_3, X_4, X_5, X_6, X_7, X_8, X_9, X_10, X_11, X_12, X_13, X_14, X_15, X_16, X_17, X_18, X_19, X_12, X_13, X_14, X_16, X_17, X_1 1 X 2 , ..., X V},in Let N and d represent the sample set observed in the v-th view. v These represent the number of samples and the feature dimension of the Vth view, respectively.
[0032] S1.2 The multi-view dataset contains a normal dataset identified by domain experts and a dataset to be detected. Taking the v-th view as an example, The first M samples are normal datasets identified by domain experts, and the last NM samples are datasets to be tested.
[0033] S2. Based on the idea of generative adversarial networks, construct a neural network model that conforms to the number of views in a multi-view dataset. Specifically:
[0034] S2.1 For a multi-view dataset with V views, construct a neural network model with V neural network groups, where each neural network group corresponds to each view. Each neural network group contains V-1 generators and V-1 discriminators.
[0035] The constructed neural network model is as follows Figure 4 As shown, the generator includes an encoder-decoder-encoder structure, where each encoder and decoder consists of three neural network layers: an input layer, a hidden layer, and an output layer. The discriminator is an encoder structure, also composed of an input layer, a hidden layer, and an output layer. Corresponding to the input, both the hidden layer and the output layer produce an output.
[0036] The encoder and decoder structures in the generator and discriminator can be replaced according to different view data types, such as fully connected layers for processing data or convolutional layers for processing images.
[0037] S2.2 The generator can generate generated data for other views based on the encoded features of the input data of a specified view. The discriminator outputs the encoded features of the input data and the probability that the input data is the original data.
[0038] S3. Using a normal dataset identified by domain experts as training samples, train a generative model that conforms to multi-view data consistency. Specifically:
[0039] S3.1 For the V views of the multi-view data, V neural network groups are constructed. In the v-th neural network group, the remaining V-1 views (excluding the v-th view) are corresponding to V-1 generators G. (v,i ) and discriminator D (v,i) Where v represents the current view number, i represents the number of other views processed in the current view, v∈V, v≠i. Within the v-th view, V-1 generators are input with the normal raw data X corresponding to the V-1 views. (i) Encoding key features z (v,i) Generate the generated data X′ for the current view. (v,i) The generated data of the current view is then re-encoded to encode the key feature z′. (v,i ).
[0040] like Figure 4 As shown, the generator G corresponds to the generator that processes the data of the i-th view in the v-th view. (v,i) Its subnetworks are respectively represented as encoders. decoder encoder The generator processes the input raw data X (i) The process is as follows:
[0041]
[0042]
[0043]
[0044] Where, X′ (v,i) It can be viewed as a generator G (v,i) The output is the generator's generated data for the current view, which is generated using the original data of a specific view.
[0045] S3.2, the corresponding V-1 discriminators take the generated data and the normal original data of the current view v as inputs, and output the generated data as the probability of the normal original data being true or false and the encoding features of the hidden layer. The hidden layer encoding features of the discriminators for the original data and the generated data are respectively represented as follows: Update the generator's network parameters according to the following formula:
[0046]
[0047] Where, ||·||1 and ||·||2 are respectively Distance and Distance, namely Manhattan distance and Euclidean distance.
[0048] The hidden layer in the discriminator outputs its respective encoded features based on the original data and generated data of the current view, where the hidden layer function is represented as follows:
[0049]
[0050]
[0051] The generator's loss function has three terms, the first of which is cross-view loss. Figure 1 Consistency loss, through the difference between the original data and the generated data in the current view. The first term is the cross-view feature matching loss, which penalizes the consistency between multi-view data. The second term is the cross-view feature matching loss, which uses the encoded features of the discriminator's hidden layer between the original and generated data. The loss is used to increase the stability of adversarial training. The third term is the cross-view latent space loss, which minimizes the difference between the original data and the generated data through the generator's encoded features. Loss is used to constrain the latent space of cross-view data.
[0052] S3.3. Iterate through steps S3.1 and S3.2 k times, then update the discriminator's network parameters according to the following formula:
[0053]
[0054] S3.4. Iterate through step S3.3 multiple times until the model converges, and obtain the multi-view outlier detection model.
[0055] S4. Using the trained generator, input the unknown dataset to be detected and calculate the outlier score for each sample. Specifically:
[0056] S4.1. For a multi-view outlier detection model corresponding to V pre-trained views, the neural network for the v-th view is input with multi-view data excluding the v-th view, where V-1 generators G... (v,i) Input the corresponding data to be detected Encoding key features Generate the generated data for the current v-th view. And key features are re-encoded based on the generated data.
[0057] S4.2 Calculate the outlier score of the sample to be detected according to the following formula:
[0058]
[0059] For normal samples: Different views of normal samples exhibit consistency, and the model can effectively encode key representations from one view and generate another. The latent space distance between the original and generated data is small, therefore the outlier score S... text Smaller.
[0060] For attribute outliers: Attribute outliers are dissimilar to most normal samples in every view, making it difficult for the generator to encode their representations, resulting in poor generation performance. The latent space distance between the original and generated data is large, therefore the outlier score S... text Relatively large.
[0061] For outliers: Outliers are inconsistent across multiple views, making it difficult for the generator to generate views from one view to another. This results in a large latent space distance between the original data and the generated data, thus reducing the outlier score to S. text Relatively large.
[0062] For class-attribute outliers: Since class-attribute outliers simultaneously contain features of attribute outliers and class outliers, it is difficult to encode key features on some views and generate them across different views. This results in a large latent space distance between the original data and the generated data, thus leading to a higher outlier score S. textRelatively large.
[0063] Therefore, detection samples with larger outlier scores can be easily detected as outliers in multiview.
[0064] The outlier calculation method proposed in this invention can directly detect a single sample while maintaining accuracy, without needing to add new samples to the original detection set for repeated detection, thus achieving high detection efficiency.
[0065] The present invention and its embodiments have been described above illustratively. This description is not restrictive, and the figures shown are only one embodiment of the present invention; the actual structure is not limited thereto. Therefore, if those skilled in the art are inspired by this description and design similar structures and embodiments without departing from the spirit of the present invention, such designs should fall within the protection scope of the present invention.
Claims
1. A method of multi-view outlier detection based on generative adversarial network, applied to a multi-view dataset of industrial defect detection, characterized in that, The method comprises the following steps: S1, dividing a multi-view data set with V views, wherein the views are derived from different fields or collected in different ways, the views include image views and audio views, obtaining a normal data set identified by a field expert and an unknown data set to be detected; S2, constructing a neural network model conforming to the number of views and the type of view data of the multi-view data set according to a generative adversarial network; specifically: S2.1, for a multi-view data set with V views, constructing a neural network model with V neural network groups, wherein each neural network group corresponds to each view; each neural network group has V-1 generators and V-1 discriminators; S2.2, the generator encodes features of input data of a specified view and generates generated data of other views according to the encoded features; the output of the discriminator is the encoded features of the input data and the probability of whether the input data is original data; S3, using the normal data set identified by the field expert as a training sample to train a generative model capable of capturing the consistency of multi-view data; specifically: S3.1 For the V views of multi-view data, there are V constructed neural network groups; in the... v In the nth neural network group, the nth will be removed. v The remaining V-1 views correspond to V-1 generators. and discriminator ,in v Indicates the current number of views. i This indicates the number of other views being processed in the current view. ; in the v Within each view, V-1 generators are input with the corresponding normal raw data for each of the V-1 views. Encoding key features Generate the generated data for the current view. And re-encode the key features of the generated data of the current view. ; S3.2, the corresponding V-1 discriminator input corresponding generated data and the current view v The normal original data, the output generated data is the true or false possibility of the normal original data and the encoding characteristics of the hidden layer; wherein the discriminators' hidden layer encoding features of the original data and the generated data are represented as updating the network parameters of the generator; S3.3, repeatedly running steps S3.1 and S3.2, and then updating the network parameters of the discriminator; S3.4, repeatedly running step S3.3 until the model converges, obtaining a multi-view outlier detection model; S4, inputting the unknown data set to be detected into the trained generator, calculating the outlier score of each sample to be detected, and identifying abnormal samples in the data set to be detected according to the outlier score. 2.The multi-view outlier detection method based on a generative adversarial network according to claim 1, wherein: Step S1 is specifically: S1.1, Given a multi-view dataset with V views where denotes the set of samples observed in the v th view, and respectively represent the number of samples and the feature dimension of the v th view; S1.2, a normal data set identified by a domain expert and an unknown data set to be detected are contained in the multi-view data set, taking the first view as an example, v wherein the first M data are the normal data set identified by the domain expert, and the last N-M data are the data set to be detected. 3.The multi-view outlier detection method based on generative adversarial network according to claim 2, wherein: Each generator in step S2.1 is an encoder-decoder-encoder structure, and the discriminator is an encoder structure; each encoder and decoder is composed of three layers of neural networks, namely an input layer, a hidden layer and an output layer. 4.The multi-view outlier detection method based on a generative adversarial network according to claim 3, characterized in that: The formula for updating the network parameters of the generator in step S3.2 is as follows: wherein , are respectively distance and distance.
5. The method of claim 4, wherein the method is based on a generative adversarial network. The formula for updating the network parameters of the discriminator in step S3.3 is as follows: 。 6.The multi-view outlier detection method based on generative adversarial network according to claim 5, wherein: Step S4 is specifically: S4.1, For the multi-view outlier detection model corresponding to the trained V views, for the _ _ v The neural network of the nth view, with input excluding the nth view. v Multi-view data with V-1 generators. Input the corresponding data to be detected Encoding key features Generate the current number v Data generated for each view And re-encode key features based on the generated data. ; S4.2, calculate the outlier score of the sample to be detected according to the following formula: 。