Outlier object classification method based on astronomical spectral data
Through representation learning neural network and triple sampling technology, the problem of outlier celestial recognition in astronomical spectral data is solved, high-precision and fast classification effects are achieved, and the low accuracy and slow speed of outlier celestial recognition in the existing technology is solved. question.
Patent Information
- Application Number
- CN202010983397.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-17
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2040-09-17
AI Technical Summary
The prior art is difficult to effectively identify and separate outlier celestial data in astronomical spectral data, resulting in the inability to accurately classify unknown celestial bodies, affecting astronomy research.
Using a method based on representation learning neural network, through dimensionality reduction processing and triple sampling technology, a representation learning neural network layer is constructed, the sorting loss function is optimized, outlier scores are calculated and thresholds are set to achieve high-precision classification of astronomical spectral data.
It improves the accuracy and speed of outlier celestial bodies recognition, reduces the recognition time and error rate, and can quickly identify outlier celestial bodies, achieving a higher classification level.
Smart Images

Figure CN114282585B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a method for classifying outlier celestial bodies based on astronomical spectrum data. Background Art
[0002] Astronomy With the development of science and technology, advanced observation equipment has enabled us to look deeper into the universe, and has also brought about an explosive growth in astronomical data. As the telescope with the highest spectrum acquisition rate in the world, the Guo Shoujing Telescope (LAMOST) can collect more than 10,000 spectra every observation night, which will provide a lot of material for some astronomers and astrophysicists in their research work on galaxy redshift surveys, cosmological models, large-scale structures of the universe, galaxy formation and evolution, and spectral observations combining various types of rays, and will promote and improve the development of the field of astronomy. Each spectrum in the LAMOST data set provides a series of radiation intensity values in the wavelength range of 3690-9100 angstroms.
[0003] Spectral classification is to select and extract the most effective features for classification and identification from thousands of dimensions of spectral data to construct a feature space. For example, spectral flux values at specific wavelengths or bands are selected as features, and algorithms are used to distinguish various celestial bodies.
[0004] In the problem of astronomical spectrum classification, there is a part of outlier data in LAMOST, which is classified as unknown because its characteristics are not similar to those of known celestial bodies. This phenomenon may be due to the pollution of spectral data by factors such as cosmic background noise, light attenuation and redshift, making the data unrecognizable; it may also be the spectral data of unknown celestial bodies that have never been observed before. Mining special and unknown celestial bodies is one of the goals pursued by human beings in exploring the universe, so mining outlier data in astronomical spectral data is particularly necessary.
[0005] Therefore, a new outlier classification method based on astronomical spectral data is needed to realize the identification and separation of outlier data in astronomical spectral data. The above problems are the problems that should be considered and solved in the design process of outlier classification method based on astronomical spectral data. Summary of the invention
[0006] The purpose of the present invention is to provide a method for classifying outlier celestial bodies based on astronomical spectral data, so as to solve the problem existing in the prior art of how to realize the rapid and high-precision identification and separation of outlier data in astronomical spectral data.
[0007] The technical solution of the present invention is:
[0008] A method for classifying outlier celestial bodies based on astronomical spectral data comprises the following steps:
[0009] S1. Batch obtain original astronomical spectral data, some of which are data with known labels, that is, they have been artificially marked as known celestial bodies or outlier data labels, and use the astronomical spectral data with known labels as training sets and test sets respectively, and the unknown astronomical spectral data are to be classified, and the high-dimensional feature vectors of the obtained original astronomical spectral data are subjected to dimensionality reduction processing to obtain low-dimensional feature vectors;
[0010] S2, calculating the outlier score of the low-dimensional feature vector according to the low-dimensional feature vector of the training set obtained in step S1, setting an initial threshold according to the normal distribution characteristics of the outlier score, confirming whether the outlier score of each astronomical spectrum data is greater than the set threshold, if it is greater than the set threshold, judging that the data is a preset outlier data, otherwise it is internal data, thereby performing binary classification on the astronomical spectrum data, and obtaining classified data sets, namely, an internal data set I and an outlier data set O;
[0011] S3, using the outlier score obtained in step S2 as the basis for triple sampling, extracting training samples E and positive samples P from the internal data set I, extracting negative samples N from the outlier data set O, and constructing triple samples with samples E, P, and N;
[0012] S4, constructing a representation learning neural network layer, inputting the triplet sample obtained in step S3 into the layer, outputting a new feature vector, optimizing the sorting loss function by training the network model, and the representation learning neural network after the sorting loss function is optimized is a neural network model of triplet random loss based on outlier score, which separates positive samples and negative samples in the new feature vector of the training data, calculates the outlier score of the new feature vector according to the new feature vector obtained from the training data, and sets the threshold of the new outlier score for binary classification, and then uses the test set to adopt the same processing method, and saves the optimal representation learning neural network model parameters and the newly set threshold;
[0013] S5. The unknown astronomical spectral data obtained in step S1 and subjected to dimensionality reduction processing is input into the neural network model with triple random loss described in step S4 to obtain a new feature vector, obtain a new feature vector of the unknown spectral data and calculate the outlier score of the data, and then use the new threshold set after training to identify outlier data in the astronomical spectral data.
[0014] Furthermore, in step S2 and step S5, the outlier score is calculated, specifically, the Euclidean distance from the data point to the random subset in the astronomical spectrum data is calculated, specifically, a data subset S of a set data volume is randomly selected, the three closest points to the data point x from the data subset S are selected, and the average value r of the Euclidean distance from the data point x to the three points is calculated, and this operation is repeated m times to obtain the outlier score
[0015] Furthermore, in step S3, the outlier score obtained in step S2 and its classification result are used as the basis for triple sampling to construct a triple sample, specifically,
[0016] S31, extract n query objects from the internal data set I according to the outlier score, and obtain training samples E, data object x i The probability p(x∈I) that it is sampled as a query object i ) is inversely proportional to its abnormal value, object x i The corresponding outlier score is r i , Z is the sum of all the outliers in the internal dataset I, The probability p(x i ) is defined as follows:
[0017]
[0018] S32, extracting positive samples P of internal data from the internal data set I according to uniform probability;
[0019] S33. The method of obtaining negative samples N of outlier data from the outlier data set O is: select the most likely outlier as a high probability negative example; given a data pair x j ∈O, the probability of being selected as a negative example is defined as:
[0020]
[0021] S34, the training sample E obtained in step S31, the positive sample P obtained in step S32 and the negative sample N obtained in step S33 form a triplet sample<E,P,N> .
[0022] Furthermore, in step 1, the principal component analysis method is used to perform dimensionality reduction.
[0023] Furthermore, in step S4, the constructed representation learning neural network layer, from network input to network output, includes a bidirectional long short-term memory network layer and a fully connected layer. The bidirectional long short-term memory network layer mines the dependencies before and after the data, and the fully connected layer extracts the information contained in the data and maps it to a new feature vector. The activation function of the network output node uses the Gaussian error linear unit function GELU, which is defined as follows:
[0024]
[0025] The ranking loss function is the ranking loss based on the outlier score in the REPEN framework, a random nearest neighbor distance representation method based on the ranking model; the training data, positive samples, and negative samples in the triplet are input into the neural network with the same parameters; the bidirectional long short-term memory network layer performs forward and reverse long short-term memory network (LSTM) operations, passes the data into the fully connected layer, and then uses the activation function to obtain a new feature vector; the ranking loss function is used to calculate the loss of the feature vector during training, and it is directly used to calculate the outlier score for binary classification during prediction.
[0026] Furthermore, in step S5, the new threshold set after training is used to identify outlier data in the astronomical spectral data. Specifically, the calculated outlier score of the unknown astronomical spectral data is compared with the new threshold. If the outlier score of the data is greater than the new threshold, the unknown astronomical spectral data is outlier data; otherwise, the unknown astronomical spectral data is normal data.
[0027] The beneficial effects of the present invention are as follows: compared with the prior art, this outlier classification method based on astronomical spectral data can effectively increase the accuracy of outlier identification and reduce the identification time, does not rely on prior knowledge, has higher identification accuracy and lower error rate, has the advantages of short data processing time, high accuracy, and the ability to quickly identify outliers, and can achieve a higher level in the classification of outliers. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 It is a flowchart of a method for classifying outliers based on astronomical spectral data according to an embodiment of the present invention.
[0029] Figure 2 It is a schematic diagram for explaining the construction of a neural network layer representing learning in an embodiment. DETAILED DESCRIPTION
[0030] The preferred embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0031] Example
[0032] A method for classifying outliers based on astronomical spectral data, such as Figure 1 , including the following steps,
[0033] S1. Batch obtain original astronomical spectral data, part of which is data with known labels, that is, it has been artificially marked as known celestial bodies or outlier data labels, and use the astronomical spectral data with known labels as training sets and test sets respectively, and the unknown astronomical spectral data is to be classified, and the high-dimensional feature vectors of the obtained original astronomical spectral data are subjected to dimensionality reduction processing to obtain low-dimensional feature vectors; in step 1, preferably, the principal component analysis method is used for dimensionality reduction processing.
[0034] S2, calculating the outlier score of the low-dimensional feature vector according to the low-dimensional feature vector of the training set obtained in step S1, setting an initial threshold according to the normal distribution characteristics of the outlier score, confirming whether the outlier score of each astronomical spectrum data is greater than the set threshold, if it is greater than the set threshold, judging that the data is a preset outlier data, otherwise it is internal data, thereby performing binary classification on the astronomical spectrum data, and obtaining classified data sets, namely, an internal data set I and an outlier data set O;
[0035] In step S2, the outlier score is calculated, specifically, the Euclidean distance from the data point to a random subset of the astronomical spectrum data is calculated, specifically, a data subset S of a set amount of data is randomly selected, the three closest points from the data point x to the data subset S are selected, and the average value r of the Euclidean distance from the data point x to these three points is calculated. This operation is repeated m times to obtain the outlier score
[0036] S3, using the outlier score obtained in step S2 as the basis for triple sampling, extracting training samples E and positive samples P from the internal data set I, extracting negative samples N from the outlier data set O, and constructing triple samples with samples E, P, and N;
[0037] In step S3, the outlier score and classification result obtained in step S2 are used as the basis for triple sampling to construct a triple sample, specifically,
[0038] S31, extract n query objects from the internal data set I according to the outlier score, and obtain training samples E, data object x i The probability p(x∈I) that it is sampled as a query object i ) is inversely proportional to its abnormal value, object x i The corresponding outlier score is r i , Z is the sum of all the outliers in the internal dataset I, The probability p(x i ) is defined as follows:
[0039]
[0040] S32, extracting positive samples P of internal data from the internal data set I according to uniform probability;
[0041] S33. The method of obtaining negative samples N of outlier data from the outlier data set O is: select the most likely outlier as a high probability negative example; given a data pair x j ∈O, the probability of being selected as a negative example is defined as:
[0042]
[0043] S34, the training sample E obtained in step S31, the positive sample P obtained in step S32 and the negative sample N obtained in step S33 form a triplet sample<E,P,N> .
[0044] S4, constructing a representation learning neural network layer, inputting the triplet sample obtained in step S3 into the layer, outputting a new feature vector, optimizing the sorting loss function by training the network model, and the representation learning neural network after the sorting loss function is optimized is a neural network model of triplet random loss based on outlier score, which separates positive samples and negative samples in the new feature vector of the training data, calculates the outlier score of the new feature vector according to the new feature vector obtained from the training data, and sets the threshold of the new outlier score for binary classification, and then uses the test set to adopt the same processing method, and saves the optimal representation learning neural network model parameters and the newly set threshold;
[0045] In step S4, the constructed representation learning neural network layer, from network input to network output, includes a bidirectional long short-term memory network layer and a fully connected layer. The bidirectional long short-term memory network layer mines the dependencies before and after the data, and the fully connected layer extracts the information contained in the data and maps it to a new feature vector. The activation function of the network output node uses the Gaussian error linear unit function GELU, which is defined as follows:
[0046]
[0047] The ranking loss function is the ranking loss based on the outlier score in the REPEN framework, a random nearest neighbor distance representation method based on the ranking model; the training data, positive samples, and negative samples in the triplet are input into the neural network with the same parameters; the bidirectional long short-term memory network layer performs forward and reverse long short-term memory network (LSTM) operations, passes the data into the fully connected layer, and then uses the activation function to obtain a new feature vector; the ranking loss function is used to calculate the loss of the feature vector during training, and it is directly used to calculate the outlier score for binary classification during prediction.
[0048] S5, the unknown astronomical spectrum data obtained in step S1 after dimension reduction processing is input into the neural network model of triple random loss in step S4 to obtain a new feature vector, obtain a new feature vector of the unknown spectrum data and calculate the outlier score of the data, and then use the new threshold set after training to identify the outlier data in the astronomical spectrum data. Then, it can be confirmed whether the celestial body corresponding to the outlier data is an outlier celestial body by means of celestial body observation, thereby greatly narrowing the identification range of outlier celestial bodies.
[0049] In step S5, the outlier score is calculated, specifically, the Euclidean distance from the data point to a random subset of the astronomical spectrum data is calculated, specifically, a data subset S of a set amount of data is randomly selected, the three closest points from the data point x to the data subset S are selected, and the average value r of the Euclidean distance from the data point x to these three points is calculated. This operation is repeated m times to obtain the outlier score
[0050] In step S5, the new threshold set after training is used to identify outlier data in the astronomical spectral data. Specifically, the calculated outlier score of the unknown astronomical spectral data is compared with the new threshold. If the outlier score of the data is greater than the new threshold, the unknown astronomical spectral data is outlier data; otherwise, the unknown astronomical spectral data is normal data.
[0051] This outlier object classification method based on astronomical spectral data can effectively increase the accuracy of outlier object identification and reduce the identification time. It does not rely on prior knowledge, has high recognition accuracy and low error rate, and has the advantages of short data processing time, high accuracy, and the ability to quickly identify outliers. It can achieve a high level in the classification of outliers.
[0052] This outlier classification method based on astronomical spectral data can speed up the operation of the existing outlier data feature construction algorithm based on representation learning. This method transforms the learning network by introducing a dimension reduction strategy and increasing multiple average sampling to adapt to the astronomical spectral data set, making the representation learning network learning process have the characteristics of high rate and the representation learning network learning results have the characteristics of high precision.
[0053] A specific example of this outlier classification method based on astronomical spectral data is as follows:
[0054] First, a part of astronomical spectral data is sampled and trained. After the original data is reduced in dimension using principal component analysis, a triplet sample is constructed.<E,P,N> At the same time, the triplet sample constructed last time is used to optimize the triplet random loss network model. After 1000 iterations, the triplet random loss network model is persistently stored in the disk, waiting for the next call.
[0055] The astronomical spectral data in the training set are put into the triple random loss network model to obtain new data represented by embedded vectors, and a new outlier score is calculated for the new data. According to the labels in the training set, a threshold is set to classify the outlier data, and a threshold that makes the classification effect the best is found and recorded. Repeat this step 100 times, and calculate the average value of the recorded thresholds as the standard for judging outlier celestial data.
[0056] After the above steps are completed, the unknown astronomical spectral data is read for judgment. After the original data is reduced in dimension using the principal component analysis method, the triple random loss network model stored in the disk is read, and the unknown data set data is put into the triple random loss network model to obtain new data represented by embedded vectors (Embeddings). A new outlier score is calculated for the new data, and the outlier data in the unknown astronomical spectral data is identified and separated according to the average value of the record threshold mentioned above, and then the outlier celestial body is inferred based on the outlier data.
[0057] The above are only preferred embodiments of the present invention, but do not limit the patent scope of the present invention. Although the present invention is described in detail with reference to the above embodiments, those skilled in the art can still modify the technical solutions recorded in the above specific implementations, or replace some of the technical features therein with equivalents. Any equivalent structure made using the contents of the present invention specification and drawings, directly or indirectly used in other related technical fields, is also within the scope of patent protection of the present invention.
Claims
1. A method for classifying outlier celestial bodies based on astronomical spectral data, characterized by: The following steps are included: S1. Batch obtain original astronomical spectral data, some of which are data with known labels, that is, they have been artificially marked as known celestial bodies or outlier data labels, and use the astronomical spectral data with known labels as training sets and test sets respectively, and the unknown astronomical spectral data are to be classified, and the high-dimensional feature vectors of the obtained original astronomical spectral data are subjected to dimensionality reduction processing to obtain low-dimensional feature vectors; S2, calculating the outlier score of the low-dimensional feature vector according to the low-dimensional feature vector of the training set obtained in step S1, setting an initial threshold according to the normal distribution characteristics of the outlier score, confirming whether the outlier score of each astronomical spectrum data is greater than the set initial threshold, if it is greater than the set initial threshold, judging that the data is a preset outlier data, otherwise it is internal data, thereby performing binary classification on the astronomical spectrum data, and obtaining classified data sets, namely, an internal data set I and an outlier data set O; S3, using the outlier score obtained in step S2 as the basis for triple sampling, extracting training samples E and positive samples P from the internal data set I, and extracting positive samples P from the outlier data set O Extract negative samples N from the training sample E, positive sample P and negative sample N to construct a triplet sample; S4, constructing a representation learning neural network layer, inputting the triplet sample obtained in step S3 into the layer, outputting a new feature vector, optimizing the sorting loss function by training the network model, and the representation learning neural network after the sorting loss function is optimized is a neural network model of triplet random loss based on outlier score, which separates positive samples and negative samples in the new feature vector of the training data, calculates the new outlier score of the new feature vector according to the new feature vector obtained from the training data, and sets the threshold of the new outlier score for binary classification, and then uses the test set to adopt the same processing method, and saves the optimal representation learning neural network model parameters and the newly set threshold; S5. The unknown astronomical spectral data obtained in step S1 and subjected to dimensionality reduction processing is input into the neural network model with triple random loss described in step S4 to obtain a new feature vector, obtain a new feature vector of the unknown spectral data and calculate the outlier score of the data, and then use the new threshold set after training to identify outlier data in the astronomical spectral data.
2. The outlier object classification method based on astronomical spectral data according to claim 1, characterized in that: In step S2 and step S5, the outlier score is calculated, specifically, the Euclidean distance from the data point to a random subset of the astronomical spectrum data is calculated, specifically, a data subset S of a set amount of data is randomly selected, the three closest points from the data point x to the data subset S are selected, and the average value r of the Euclidean distance from the data point x to the three points is calculated. This operation is repeated m times to obtain the outlier score .
3. The outlier object classification method based on astronomical spectral data according to claim 1, characterized in that: In step S3, the outlier score and classification result obtained in step S2 are used as the basis for triple sampling to construct a triple sample, specifically, S31, extract n query objects from the internal data set I according to the outlier score, and obtain training samples E, data object x i ∈I is the probability p(x i ) is inversely proportional to its anomaly score, object x i The corresponding outlier score is r i , Z is the sum of all the outliers in the internal dataset I, , the probability p(x i ) is defined as follows: ; S32, extracting positive samples P of internal data from the internal data set I according to uniform probability; S33. The method of obtaining negative samples N of outlier data from the outlier data set O is: select the most likely outlier as a high probability negative example; given a data pair x j ∈O, the probability of being selected as a negative example is defined as: ; S34, the training sample E obtained in step S31, the positive sample P obtained in step S32 and the negative sample N obtained in step S33 form a triplet sample<E,P ,N> .
4. The outlier object classification method based on astronomical spectral data according to any one of claims 1 to 3, characterized in that: In step 1, principal component analysis is used to perform dimensionality reduction.
5. The outlier object classification method based on astronomical spectral data according to any one of claims 1 to 3, characterized in that: In step S4, the constructed representation learning neural network layer, from network input to network output, includes a bidirectional long short-term memory network layer and a fully connected layer. The bidirectional long short-term memory network layer mines the dependencies before and after the data, and the fully connected layer extracts the information contained in the data and maps it to a new feature vector. The activation function of the network output node uses the Gaussian error linear unit function GELU, which is defined as follows: ; The ranking loss function is the ranking loss based on the outlier score in the REPEN framework, a random nearest neighbor distance representation method based on the ranking model; the training data, positive samples, and negative samples in the triplet are input into the neural network with the same parameters; the bidirectional long short-term memory network layer performs forward and reverse long short-term memory network operations, passes the data into the fully connected layer, and then uses the activation function to obtain a new feature vector; the ranking loss function is used to calculate the loss of the feature vector during training, and it is directly used to calculate the outlier score for binary classification during prediction.
6. The outlier object classification method based on astronomical spectral data according to any one of claims 1 to 3, characterized in that: In step S5, the new threshold set after training is used to identify outlier data in the astronomical spectral data. Specifically, the calculated outlier score of the unknown astronomical spectral data is compared with the new threshold. If the outlier score of the data is greater than the new threshold, the unknown astronomical spectral data is outlier data; otherwise, the unknown astronomical spectral data is normal data.
