An instance selection algorithm based on local coulomb force

By detecting boundary points using a local Coulomb gravity model and combining reverse nearest neighbor and Gaussian kernel density estimation, an efficient compressed training set is constructed. This solves the problems of low computational efficiency and poor generalization performance in instance selection for large-scale high-dimensional data, and improves the performance of data classification and anomaly detection.

CN122433949APending Publication Date: 2026-07-21NORTH CHINA UNIV OF WATER RESOURCES & ELECTRIC POWER
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NORTH CHINA UNIV OF WATER RESOURCES & ELECTRIC POWER
Filing Date
2026-04-28
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing instance selection techniques struggle to effectively distinguish between the tight clustering of similar samples and the boundaries of dissimilar samples in large-scale, high-dimensional data, resulting in low computational efficiency and poor generalization performance.

Method used

An instance selection algorithm based on local Coulomb gravity is adopted. By calculating the differences in local density, charge, and local resultant force change rate of data points, boundary points are detected and a compressed training set is constructed. The instance selection process is optimized by combining reverse nearest neighbor and Gaussian kernel density estimation.

Benefits of technology

It significantly improves the accuracy and efficiency of data classification, enhances the generalization ability of machine learning models and the accuracy of anomaly detection, simplifies the operation process and reduces resource requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122433949A_ABST
    Figure CN122433949A_ABST
Patent Text Reader

Abstract

The application discloses an instance selection algorithm based on local Coulomb force, and relates to the technical field of data preprocessing, which comprises the following steps: calculating the local density of each data point in a given data set; mapping the calculated local density to the amount of electric charge; calculating the local resultant force of each data point on its reverse neighbors based on a Coulomb force model; defining and calculating the change rate difference of the local resultant force; detecting boundary points based on the change rate difference; selecting the detected boundary points and performing random sampling; and using the selected boundary points and the randomly sampled data to jointly construct a compressed training set. The application quantifies the change rate difference of the force of the data points by using the Coulomb force model, accurately identifies the boundary points, and fuses the random sampling to construct a compressed training set with high quality and high robustness, thereby significantly improving the data efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data preprocessing technology, and in particular to an instance selection algorithm based on local Coulomb gravity. Background Technology

[0002] Machine learning techniques are widely used in data analysis, classification tasks, and facial recognition, and their performance depends on massive amounts of training data. However, instance-based classification methods need to traverse all the data to process new samples, causing the computational burden to increase dramatically with the data size.

[0003] To reduce computational overhead, instance selection techniques reduce dataset size by selecting representative samples, and their effectiveness has been validated in scenarios such as medical diagnosis and anomaly detection. Existing methods fall into two categories: one is the wrapper method that combines specific machine learning algorithms, which is inefficient and prone to overfitting due to repeated model training; the other is the filter method based on the inherent properties of the data, which avoids algorithm dependence but struggles to balance data reduction with the preservation of key information.

[0004] Especially in large-scale, high-dimensional data, traditional filtering methods have limitations in measuring sample density. Although recent studies have introduced improved density measures such as neighborhood distribution, fuzzy distance, or global correlation, the fundamental problem remains unsolved: the tight clustering of similar samples and the overlapping boundaries of dissimilar samples result in the lack of a systematic characterization of the interaction mechanisms between samples within local neighborhoods, affecting the accurate screening of key samples. Summary of the Invention

[0005] In view of this, the present invention proposes an instance selection algorithm based on local Coulomb gravity to solve the problems of low computational efficiency and poor generalization performance caused by instance redundancy and noise pollution in the prior art.

[0006] The specific technical solution of this invention is as follows: An instance selection algorithm based on local Coulomb gravity includes: For each data point in a given dataset, calculate its local density; The calculated local density is mapped to the amount of charge; Based on the Coulomb gravity model, the local resultant force exerted on each data point by its opposite nearest neighbor is calculated; Define and calculate the difference in the rate of change of the local resultant force; Boundary points are detected based on the difference in rate of change. Select the detected boundary points and perform random sampling; A compressed training set is constructed using selected boundary points and randomly sampled data.

[0007] Specifically, calculating the local density involves combining the reverse nearest neighbor strategy with the Gaussian kernel density estimation method; the reverse nearest neighbor strategy is used to determine the neighborhood set of each data point, and the Gaussian kernel density estimation method is used to smoothly model the distribution of data points within the neighborhood to output the local density value.

[0008] Specifically, calculating the local resultant force involves simplifying the Coulomb gravity formula: ignoring the Coulomb constant and distance-related constants; and expressing the local resultant force calculation as a weighted sum of charge and direction vector, where the weighting factor is determined by the number of reverse nearest neighbors and the unit vector of the direction.

[0009] Specifically, the charge is calculated based on the reciprocal of the nearest neighbor distance of a point; where charge is defined as a function of local density, such that the charge value of points in low-density regions is amplified, while the charge value of points in high-density regions is relatively reduced.

[0010] Specifically, the definition of the rate of change difference includes calculating the fluctuation difference; the fluctuation difference is obtained by quantifying the rate of change of the magnitude of the local resultant force vector as the number of reverse nearest neighbors increases, and all adjacent rates of change are accumulated to form the cumulative rate of change.

[0011] Specifically, the final value of the rate of change difference is obtained by sorting and accumulating the rate of change and calculating the difference between adjacent values; where the larger the rate of change difference value, the more likely the data point is to be a boundary point.

[0012] Specifically, detecting boundary points involves setting a maximum reverse nearest neighbor number parameter; this parameter controls the range of the rate of change difference calculation, and the algorithm depends on the cumulative fluctuation of the entire nearest neighbor number sequence.

[0013] Specifically, constructing a compressed training set involves sorting the detected boundary points in descending order of their rate of change difference and selecting the top-ranked data points by a preset percentage; then, combining these with randomly sampled data points to form the final compressed set.

[0014] Specifically, it also includes using a spatial index structure for reverse nearest neighbor search to reduce computational time complexity.

[0015] Specifically, the directional characteristics of the local resultant force are used to distinguish between boundary points and core points; among them, the resultant force at boundary points is basically consistent in direction, resulting in a large rate of change, while the resultant force at core points is dispersed in direction, resulting in a small rate of change.

[0016] The beneficial effects of this invention are as follows: 1. By fusing reverse nearest neighbor and Gaussian kernel density estimation, the stability and interpretability of local density estimation are significantly enhanced, enabling multi-dimensional analysis and thus improving the accuracy and efficiency of data classification.

[0017] 2. By leveraging the size and orientation features of the data gravity model, we can efficiently distinguish between boundary data and core data, optimize the instance selection process, and thus improve the generalization ability and training effect of the machine learning model.

[0018] 3. By optimizing the charge representation method, the values ​​of points in low-density areas are amplified, significantly enhancing the distinction between boundary points and core points, thereby improving the accuracy and reliability of anomaly detection.

[0019] 4. By defining the fluctuation difference, efficient detection of boundary points is achieved, and the model has low dependence on parameter settings, simplifying the operation process and enhancing system stability.

[0020] 5. By selecting boundary points and randomly sampling data, a highly representative compressed training set is constructed, which effectively maintains data diversity, improves model training efficiency, and reduces resource requirements. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 This is a schematic diagram illustrating the difference in LCF between boundary points and core points of the present invention; wherein, the left figure shows data with different densities, and the right figure shows the difference in the resultant LCF force between boundary points and interior points in the two types of data.

[0023] Figure 2 This is a visualization of the entire boundary selection process of the present invention, using two types of data with a 2D feature as an example; where (a) is the original dataset, (b) shows the effect of using reverse nearest neighbor selection, (c) is a distribution map of the density values ​​of all points calculated using formula (4), (d) shows the difference in the cumulative rate of change between the boundary points and the core points, (e) sorts the cumulative rate of change in descending order and selects the top 30% of the boundary data, and (f) is a diagram showing the effect of detecting boundary data with two types of data. Detailed Implementation

[0024] To make the technical problems to be solved, the technical solutions, and the beneficial effects of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present invention and are not intended to limit the present invention.

[0025] This invention proposes a Local Coulomb Gravity-Based Instance Selection Algorithm (RGCIS), inspired by Coulomb's law in physics. RGCIS introduces a gravity-aware data density difference method that categorizes the local density of data points as charge, constructing a data gravity model. This method calculates the local density of each data point using reverse nearest neighbors and Gaussian kernel density, treating it as charge; simultaneously, each data point is considered as an object carrying charge and subjected to the local resultant force generated by its neighborhood. As the number of nearest neighbors increases, the rate of force change between boundary points and core points shows a significant difference. Based on this characteristic, the RGCIS method can effectively acquire boundary points. Selecting a subset of boundary points and supplementing them with randomly sampled data to maintain data diversity allows for the construction of a high-quality compressed training set.

[0026] Specifically, given a set of samples For any data point, its The definition of nearest neighbor is: (1) in Point Its first A neighbor The distance between them, based on The definition can lead to the reverse. The concept of Reverse k-Nearest Neighbor (RNN) is used for a given query point. Its reverse Nearest neighbors refer to those data that will... As its All data points of one of the nearest neighbors.

[0027] (2) Kernel density estimation (KDE), a widely used nonparametric probability density estimation method, plays a crucial role in data analysis. This study employs the Gaussian kernel-based KDE method to conduct an in-depth analysis of the distribution density of training samples. The main reason for this is the Gaussian kernel's favorable mathematical properties and its ability to effectively preserve the original data distribution characteristics. In particular, when multiple sample points share the same nearest neighbor, the Gaussian kernel can highlight the sample points where the kernel density in the neighborhood reaches its peak. The Gaussian kernel and the KDE algorithm are theoretically highly compatible. The relevant Gaussian kernel and its corresponding kernel density estimation (GKDE) formula are shown below: (3) (4) in Point and points The distance between them It is the dimension of the data. Point Its first Reverse nearest neighbors The distance between them.

[0028] Reverse Nearest neighbor and Gaussian kernel density estimation exhibit complementary advantages in local density estimation. RNNs incorporate the target point into their calculations... The number of data points in the nearest neighbor set can effectively identify local density centers and discrete points, especially suitable for non-uniform distributions with low dependence on parameter settings; GKDE, on the other hand, uses continuous kernel functions to smoothly model probability density, preserving the inherent distribution structure of the data and having good characterization capabilities for multimodal density regions. Combining the two can achieve multi-scale density analysis from discrete topological relationships to continuous probability distributions while maintaining computational efficiency, thereby improving the robustness and interpretability of local density estimation. The following Algorithm 1 is the pseudocode for calculating local density by combining the two.

[0029] Based on the assumption that data gravity exists between any two samples, researchers model universal gravity from the physical world and integrate it into the data space, classifying test samples by comparing gravity values ​​of different categories. Most methods treat data gravity as a scalar and often use it as a key factor in describing the similarity between data. This invention integrates the magnitude and direction of data gravity into instance selection, constructing a data gravity model to distinguish between boundary data and core data.

[0030] The local attraction between data points reflects the proximity relationship between a point and its neighbors. According to Coulomb's law, the electrostatic force between two charges can be described as follows: (5) in, Point and points The gravitational force between the two points is directed along the line connecting the two points. It is the Coulomb constant. and Point and points The amount of electric charge, which can be positive or negative, is determined by the principle that like charges repel and unlike charges attract. However, in the application scenario of data points, all data points are usually considered to carry the same type of charge (all positive charges), so they always repel each other, thus simulating the "pushing away" effect between data points. This helps to distinguish between boundary data and core data.

[0031] Point and points The Euclidean distance between them From point to The unit vector that determines the direction of gravity is defined as: (6) Points to consider and one of its nearest neighbors Within a small local area, point To all of them Distance of reverse nearest neighbors The difference may be small; therefore, the denominator in the Coulomb force formula... For point Different neighbors In general, it can be approximated as a constant, denoted as . This approximate constant With Coulomb constant The merging introduces a new local constant. : (7) Therefore, the Coulomb force formula can be simplified to: (8) Since local constants are canceled out or absorbed in the resultant force calculation, their effect is ignored. Therefore, the point Subject to all of its The formula for calculating the resultant force of the three nearest neighbors in opposite directions is: (9) because For point All of its nearest neighbors are identical, therefore we can obtain: (10) in It is the number of reverse nearest neighbors. The set of values ​​constitutes the weighting factors of the neighborhood forces. These weighting factors can very intuitively reflect the point's... The net force acting on it is proportional to the amount of charge it receives. It is also proportional to the charge of all its opposite nearest neighbors. and direction The weighted sum is calculated on the scale. Generally, points with larger charges have a greater influence on neighboring points, while points with smaller charges are more sensitive to the influence of neighboring points.

[0032] Studies have shown that the density of data points is directly proportional to the amount of charge; the higher the density of core data, the greater its charge, and vice versa. In boundary point detection, we hope that low-density regions (boundary points) will score higher, and in formula (10), The value and It is directly proportional, which is contrary to our goal. Therefore, we will use the formula... Replace with ,when When the density is small (low density point), It is large, thus it can effectively amplify its size. value.

[0033] To highlight the difference between the boundary points and the core point, the boundary points are unevenly distributed along the direction of their neighbors, resulting in a larger net force; while the neighbors around the core point are more evenly distributed, and the net force is close to zero. At the same time, to reduce computational complexity, the amount of nearest-neighbor charge is ignored. The difference leads to the final formula for calculating the local resultant force: (11) In data space, if a point is located in a high-density region, its nearest neighbors are usually very close to it. Conversely, in a low-density region, its nearest neighbors are very far away. We use a local density... We define charge by the fact that a point is closer to its neighbors, the greater its charge should be, indicating that it is located in a core region with strong influence.

[0034] (12) According to the above formula, because points in low-density regions are farther from their neighbors, the charge at these points is smaller. Conversely, the charge at points in high-density regions is larger. Furthermore, the way points (boundary points) in low-density regions are surrounded by their neighbors is less uniform, while points (core points) in high-density regions are more evenly distributed. This results in the resultant force at boundary points being much smaller than the resultant force at core points, effectively distinguishing between boundary points and core points. Figure 1 The significant differences between the two are evident: the rate of change of the resultant force at the boundary points is significantly greater than that at the core points. Furthermore, it effectively distinguishes between two types of data with different densities, showing that sparse data is more effective than dense data. It is larger because the combined force of dense data is relatively more stable.

[0035] from Figure 1 The boundary points can be seen The number of neighbors is directly proportional because the directions of the forces are basically the same. Conversely, because the directions of the forces are inconsistent, the core point... It does not change significantly with the increase in the number of neighbors. Therefore, a fluctuation difference measure is defined to measure it. The rate of change.

[0036] (13) yes The magnitude of a vector, It is the maximum number of reverse nearest neighbors. Used to represent the fluctuation difference between boundary points and core points, in order to measure the point exist Increase from 1 to Throughout the entire process The overall fluctuation situation, we will consider all adjacent The sum of the changes between them is obtained Cumulative rate of change: (14) Difference in rate of change: For point Point of The difference in rate of change is defined as follows: (15) Will Arranged in descending order, denoted as For sorted Assuming its size is ,for Each adjacent sequence and Calculate the value of each point in the dataset. Then get the size as of Due to the boundary points The rate of change is relatively large, and the core points The rate of change is small, especially for descending order. , Points with larger rates of change are considered boundary points. The proposed detection model considers the parameters... Insensitive, because The cumulative fluctuation is from arrive Quantization is performed as the boundary selection process increases sequentially. The pseudocode for the entire boundary selection process is shown in Algorithm 2: Figure 2 The visualization process of the entire boundary selection is shown, using two classes of data with a 2D feature as an example.

[0037] For n samples, d-dimensional features, and a nearest neighbor parameter of K, the time complexity depends on the following factors: the time complexity of distance matrix calculation is... Calculate the reverse The time complexity of the nearest neighbor set is The total time complexity for calculating the local density is Searching the KD-tree The time complexity of finding one reverse nearest neighbor is 1. ,calculate need Time, sorting The time complexity is The total time complexity is .

[0038] The beneficial effects of this invention are as follows: 1. Inspired by Coulomb's law, this paper introduces Coulomb's law into the field of instance selection, establishes a mapping relationship between data point density and gravity, and innovatively integrates the physical model with the geometric properties of the data, providing a new theoretical perspective and methodological framework for instance selection.

[0039] 2. Combining the reverse nearest neighbor strategy and Gaussian kernel density estimation, a novel local density measurement method is proposed. The density of data points is analogized to the amount of electric charge, and the density difference between data points is described by the difference in attraction between charges. This method can more accurately characterize the neighborhood structure of data points and enhance the ability to distinguish between sparse and dense regions.

[0040] 3. By calculating the rate of change of local resultant force of a data point under the action of its reverse nearest neighbor, a boundary point detection mechanism was constructed, which can effectively distinguish between boundary points and core points.

[0041] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. An instance selection algorithm based on local Coulomb gravity, characterized in that, include: For each data point in a given dataset, calculate its local density; The calculated local density is mapped to the amount of charge; Based on the Coulomb gravity model, the local resultant force exerted on each data point by its opposite nearest neighbor is calculated; Define and calculate the difference in the rate of change of the local resultant force; Boundary points are detected based on the difference in rate of change. Select the detected boundary points and perform random sampling; A compressed training set is constructed using selected boundary points and randomly sampled data.

2. The instance selection algorithm based on local Coulomb gravity as described in claim 1, characterized in that, Calculating local density involves combining the reverse nearest neighbor strategy with the Gaussian kernel density estimation method. The reverse nearest neighbor strategy is used to determine the neighborhood set of each data point, while the Gaussian kernel density estimation method is used to smoothly model the distribution of data points within the neighborhood to output the local density value.

3. The instance selection algorithm based on local Coulomb gravity as described in claim 1, characterized in that, Calculating the local resultant force involves simplifying the Coulomb gravity formula: neglecting the Coulomb constant and distance-related constants; and expressing the local resultant force as a weighted sum of charge and direction vector, where the weighting factor is determined by the number of reverse nearest neighbors and the unit vector of direction.

4. The instance selection algorithm based on local Coulomb gravity as described in claim 1, characterized in that, The calculation of charge is based on the reciprocal of the nearest neighbor distance of a point; where charge is defined as a function of local density, such that the charge value of points in low-density regions is amplified, while the charge value of points in high-density regions is relatively reduced.

5. The instance selection algorithm based on local Coulomb gravity as described in claim 1, characterized in that, The definition of the rate of change difference includes calculating the fluctuation difference; the fluctuation difference is obtained by quantifying the rate of change of the magnitude of the local resultant force vector as the number of reverse nearest neighbors increases, and all adjacent rates of change are accumulated to form the cumulative rate of change.

6. The instance selection algorithm based on local Coulomb gravity as described in claim 5, characterized in that, The final value of the rate of change difference is obtained by sorting and accumulating the rate of change and calculating the difference between adjacent values; where the larger the rate of change difference value, the more likely the data point is to be a boundary point.

7. The instance selection algorithm based on local Coulomb gravity as described in claim 1, characterized in that, Detecting boundary points involves setting a maximum reverse nearest neighbor count parameter; this parameter controls the range of the rate of change difference calculation, and the algorithm relies on the cumulative fluctuation of the entire nearest neighbor count sequence.

8. The instance selection algorithm based on local Coulomb gravity as described in claim 1, characterized in that, Constructing a compressed training set involves sorting the detected boundary points in descending order of their rate of change difference and selecting the top-ranked data points by a preset percentage; then, combining these with randomly sampled data points to form the final compressed set.

9. The instance selection algorithm based on local Coulomb gravity as described in claim 1, characterized in that, It also includes using a spatial index structure for reverse nearest neighbor search to reduce computational time complexity.

10. The instance selection algorithm based on local Coulomb gravity as described in claim 1, characterized in that, The directional characteristics of the local resultant force are used to distinguish between boundary points and core points; among them, the resultant force at boundary points is basically consistent in direction, resulting in a large rate of change, while the resultant force at core points is dispersed in direction, resulting in a small rate of change.