Topology prototype enhancement method for traffic field class imbalance and few-sample scene

By using topological data analysis, topologically stable prototypes of traffic data are selected and enhanced features are generated, which solves the problems of class imbalance and model instability in traffic scenarios with few samples, and improves the robustness and generalization performance of the model.

CN121980260APending Publication Date: 2026-05-05JIANGNAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610022877.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-08
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

Existing machine learning models suffer from unstable decision boundaries in traffic-related scenarios with class imbalance and few samples, resulting in poor generalization ability and robustness. They are particularly prone to failure in sparse regions and high-noise conditions.

Method used

By employing topological data analysis methods, topologically stable traffic data prototypes are selected through topological subsampling and resampling, continuous cohomology, topological distance, and boundary topological variability analysis. Enhanced features with pseudo-dimensional or high-dimensional topological embeddings are then generated for training and inference of neural networks and traditional machine learning models.

Benefits of technology

It significantly improves the classification accuracy and robustness of the model under conditions of few samples and imbalance, reduces the classification error rate, and enhances the stability and reliability of the model in complex traffic data scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121980260A_ABST
    Figure CN121980260A_ABST
Patent Text Reader

Abstract

The invention discloses a topology prototype enhancement method for traffic field class imbalance and few-sample scenes, and belongs to the field of machine learning and data processing. The problems of unstable decision boundary and poor model generalization and robustness of a traditional machine learning model under the conditions of traffic data marking scarcity and category distribution imbalance are solved. The method comprises the following steps: firstly, obtaining a representative point set of traffic data keeping local and overall topological structures based on topological sub-sampling and topological resampling; then, traffic data prototypes with stable topology are screened through continuous coherence, topology distance and boundary topology variability analysis; and finally, based on the traffic data topology prototype, generating a pseudo dimension or performing high-dimensional topology embedding to construct enhanced features for training and reasoning of a subsequent neural network model and a traditional machine learning model. According to the method, traffic data topological structure information is explicitly integrated, so that decision boundary variability is effectively reduced, and the stability and precision of the model in an unbalanced and few-sample scene are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of machine learning and data processing, specifically relating to a topology prototype enhancement method for imbalanced and few-shot scenarios in the transportation field. Background Technology

[0002] With the rapid development of artificial intelligence in the transportation sector, machine learning models are increasingly being applied to decision-making tasks in high-risk scenarios, such as anomaly detection in vehicle trajectory data. However, real-world traffic data generally suffers from scarce annotations and extreme class imbalance, especially for relatively rare but high-impact events such as illegal lane changes and abnormal parking. Misclassification of minority class samples can lead to serious safety consequences; therefore, reliably identifying minority classes under limited annotation conditions is a significant challenge.

[0003] Existing methods typically mitigate the impact of class imbalance through resampling, synthetic sample generation, or feature space dimensionality reduction. However, these methods primarily address the distribution or geometric representation of the data and cannot explicitly preserve the data's topological structure. This is especially problematic in sparse regions near the decision boundary, which can lead to model instability and limit the generalization ability of neural network models and traditional machine learning models in scenarios with few samples.

[0004] In recent years, Topological Data Analysis (TDA) has provided tools for describing the multi-scale structure of data. For example, Vietoris–Rips complexes and persistent cohomology can characterize topological features such as connectivity and porosity. Based on this, this invention proposes a topological prototype enhancement method for imbalanced and few-shot scenarios in the transportation domain. This method aims to more stably preserve data structure information and improve the model's recognition performance in key regions. Validation on multiple real-world datasets including vehicle trajectories demonstrates that this method outperforms traditional techniques under both few-shot and imbalanced conditions. Summary of the Invention

[0005] This invention addresses the problems existing in the prior art by providing a topology prototype enhancement method for imbalanced and few-sample scenarios in the transportation field. It solves the problems of unstable decision boundaries, poor generalization and robustness of traditional machine learning models under conditions of scarce traffic data annotations and imbalanced class distribution.

[0006] To address the above technical problems, this invention provides the following technical solution: a topology prototype enhancement method for imbalanced and few-shot scenarios in the transportation domain, comprising the following steps:

[0007] Step 1: Obtain a representative point set of traffic data that preserves both local and global topological structure based on topological subsampling and topological resampling;

[0008] Step 2: Screen topologically stable traffic data prototypes through continuous homology, topological distance, and boundary topological variability analysis;

[0009] Step 3: Generate pseudo-dimensions or perform high-dimensional topological embedding based on the traffic data topology prototype to construct enhanced features, which are then used for the training and inference of subsequent neural network models and traditional machine learning models.

[0010] Furthermore, step 1 described above includes the following sub-steps:

[0011] Step 1.1: For traffic data, the feature point matrix algorithm is used to perform topological subsampling on the original point cloud;

[0012] Step 1.2: Perform topological resampling based on class distribution and local topological sparsity to achieve class balance while maintaining topological consistency.

[0013] Furthermore, step 2 described above includes the following sub-steps:

[0014] Step 2.1: Extract persistent homology features based on the constructed topological complex and generate a persistent graph;

[0015] Step 2.2: Combining the two key indicators of point cloud distance and decision boundary variability, select representative samples that maintain topological stability under multi-scale perturbations as topological prototypes.

[0016] Furthermore, step 3 described above includes the following sub-steps:

[0017] Step 3.1: Extract multi-scale topological features from the topological prototype based on continuous homology, and introduce the topological clustering results as pseudo-dimensions into the extended feature space;

[0018] Step 3.2: Construct a high-dimensional topological embedding based on triangulation and deformation gradient optimization to obtain an enhanced representation that maintains topological consistency;

[0019] Step 3.3: Input the enhanced features generated by pseudo-dimensional or high-dimensional embedding into the downstream neural network model and the traditional machine learning model to improve the robustness and separability of classification or anomaly detection tasks.

[0020] Furthermore, step 1.1 described above includes the following sub-steps.

[0021] Step 1.1.1: Divide the sampling space into m-dimensional hypercubes, each m-cube... side length Compared to subsampling ratio The relationship is shown in the following formula:

[0022] ,

[0023] In the formula, and These represent the upper and lower bounds of the data values ​​in the k-th dimension, respectively. ; d represents the spatial dimension, and n represents the total number of samples;

[0024] Step 1.1.2, based on m-cube With point clouds Intersecting, from point clouds Select a sample point , all m-cubes The sampling points form a new point cloud. .

[0025] Furthermore, step 1.2 above includes the following sub-steps:

[0026] Step 1.2.1: Based on the distribution of samples in different categories and their sparsity in local neighborhoods, identify the sparse regions of the minority class and the dense regions of the majority class;

[0027] Step 1.2.2: Set up for each batch Local upsampling is performed on sparse regions, and moderate downsampling is performed on dense regions, while maintaining the integrity and connectivity of adjacent structures during the sampling operation.

[0028] Furthermore, step 2.1 above includes the following sub-steps:

[0029] Step 2.1.1: Construct different scales according to the following formula. The VR complex describes the topological structure of traffic participant data at both the local and global levels:

[0030] For those with traffic behavior labels nodes VR complex is recorded as ,in, It is a set of vertices. It is defined in A metric on, if and only if for all ,satisfy hour, ;

[0031] Step 2.1.2: For VR complex, calculate persistent homology. Extract the topological features of traffic data by calculating homology groups of different dimensions on the filtered sequence, and generate a persistent graph of multi-scale topological changes.

[0032] Furthermore, step 2.2 above includes the following sub-steps:

[0033] Step 2.2.1: Calculate the Wasserstein distance between the original point cloud and the persistent graph of the subsampled point cloud to measure the life and death pairs of their topological features at different scales, and retain the sampled point cloud samples with a distance smaller than the preset Wasserstein distance as the next selection.

[0034] Step 2.2.2: Evaluate the sensitivity of the decision boundary to data distribution perturbations based on the variability of the decision boundary. For a probability space and its corresponding probability density function, given the decision function f, the decision boundary manifold is represented as the equivalent set shown in the following equation:

[0035] ,

[0036] In the formula, z represents a sample point in the feature space Z, and Z represents the feature space of the sample. Let f be the conditional probability density function that gives the random variable Z the value z, given that the classifier f outputs class y.

[0037] For the training set X, let To be based on subsampling ratio (Same as 1.1.1) The selected subset satisfies ,parameter Readjusted by random learning algorithm A The variability of the data decision boundary is defined as:

[0038] ,

[0039] In the formula, D represents the data distribution. This represents the sample drawn from D. Expectations; and The parameters are respectively and The classifier; I is an indicator function, which takes the value 1 when the condition in parentheses is true, and 0 otherwise; Indicates that all samples satisfying the subsampling ratio The minimum value is taken on a subset of the subsampled data; When the subsampling ratio is At that time, the minimum expected change of the decision boundary due to perturbation of the training data.

[0040] Furthermore, step 3.1 above includes the following sub-steps:

[0041] Step 3.1.1: For the traffic participant individual dataset Each individual participating in traffic Construct a parameter at different scales The VR complex sequence, i.e., the VR filter, is used to compute its corresponding persistent graph. As a topological feature of the node;

[0042] Step 3.1.2, for All local neighborhoods as well as Local neighborhood Persistent graph using 2-Wasserstein distance metric and The similarity. At the same time, define the nodes. Its representation in the d-dimensional topological embedding space is: And based on this representation, construct its corresponding persistent graph PD (PD). ), similarly defined And construct a persistent graph PD (PD). Two persistent graphs (PDs) ) and PD ( Wasserstein distance between ) L-infinite norm of a bijective mapping between two persistent graphs Measurement;

[0043] Step 3.1.3: Construct a distance-complete graph G and its corresponding adjacency matrix based on the 2-Wasserstein distance. ,in , The parameter is the 2-Wasserstein distance between the persistent graphs corresponding to the i-th sample and the j-th sample. By using the elbow method or cross-validation, the connected components of graph G correspond to topological clusters, which map point sets with similar topological features onto the same plane in three-dimensional space, thereby unfolding the original data into a structure that is easier to segment.

[0044] Furthermore, step 3.2 above includes the following sub-steps:

[0045] Step 3.2.1: Introduce a quantization technique based on triangulation to represent the topological structure of the point cloud in a discrete form, specifically as follows:

[0046] The original point cloud is topologically represented using a triangular topological space consisting of a set of non-overlapping simplexes. Before and after high-dimensional embedding, the vertices of the triangles... They are respectively represented as and via edge vectors and Connect them, edge vectors and Represented as and It encapsulates local topology information, in which It is an index vector;

[0047] Step 3.2.2: Based on the triangulation structure, the deformation gradient and transformation are defined as follows:

[0048] ,

[0049] In the formula, express, express, Indicates the deformation gradient for Transformation for ,pass : The QR decomposition yields the deformation gradient, and the transformation is divided into scaling matrices. and , represented as in It is a unitary matrix;

[0050] Step 3.2.3: Minimize the high-dimensional embedding transformation With deformation gradient The difference between them is the objective, and the objective function is defined as follows:

[0051] ,

[0052] in , After high-dimensional embedding, the original dimension remains unchanged, that is... ;

[0053] Step 3.2.4: Divide the regularization term into two parts: the first term Regularize the embedding, the second term Regularize the topology and embed regularization terms. The expression is as follows:

[0054] ,

[0055] In the formula The number of vertices. Let K be the neighborhood consisting of K nearest neighbors.

[0056] Topological regularization term The expression is as follows:

[0057] ,

[0058] The final objective function is expressed as:

[0059] ,

[0060] In the formula, , is a weighting coefficient used to balance the relative importance of each item in the overall objective function. Its value can be determined through experience or cross-validation based on specific task requirements.

[0061] Compared with the prior art, the beneficial technical effects of the present invention using the above technical solution are as follows:

[0062] This invention is a topology prototype enhancement method for imbalanced and few-shot scenarios in the transportation domain. Traditional methods (such as resampling, synthetic sample generation, and feature space operations like dimensionality reduction) often only adjust data distribution at the statistical level, making it difficult to maintain the topological structure of the original traffic data. This can easily lead to model instability when minority class samples are sparse, decision boundaries are complex, or noise is high. Addressing the shortcomings of existing methods in structure preservation and few-shot identification, this invention proposes an enhancement strategy based on topological data analysis. By explicitly modeling the multi-scale topological features of the data, the model can more accurately distinguish local structural differences between classes, effectively improving the discrimination ability of minority classes and boundary regions. Compared with traditional statistical methods or deep learning methods, this invention can significantly reduce the classification error rate under minimal labeling conditions, improve the robustness and generalization performance of the model, and adapt to various types of traffic data scenarios. Furthermore, this invention has good modularity and can be integrated into existing models as a plug-and-play enhancement component, further enhancing the stability and reliability of traffic models under complex tasks, and has strong practical application potential. Attached Figure Description

[0063] Figure 1 This is a schematic diagram of the method flow of the present invention.

[0064] Figure 2(a) is a schematic diagram of topological unwrapping and structural separation of high-dimensional data in the embedding space.

[0065] Figure 2(b) is a schematic diagram of the prototype enhancement and topology resampling process based on VR complex.

[0066] Figure 2(c) is a schematic diagram of the VR complex construction results.

[0067] Figure 2(d) is a schematic diagram of the persistent graph corresponding to the topological features.

[0068] Figure 3 This is a schematic diagram of topological subsampling using the characteristic lattice method.

[0069] Figure 4 The figures show a comparison of results using pseudo-dimensionality and high-dimensional topological embedding on different datasets. In the figure, (a) is a comparison of trajectory data results, (b) is a comparison of fall data results, and (c) is a comparison of protein data results.

[0070] Figure 5 This figure shows a performance comparison between the present invention and various baseline methods in anomaly detection and data augmentation scenarios. In the figure, (a) is a comparison of trajectory data, (b) is a comparison of fall data, and (c) is a comparison of protein data. Detailed Implementation

[0071] To better understand the technical content of the present invention, specific embodiments are described below in conjunction with the accompanying drawings.

[0072] In this invention, various aspects of the invention are described with reference to the accompanying drawings, in which numerous illustrative embodiments are shown. Embodiments of the invention are not limited to those depicted in the drawings. It should be understood that the invention is implemented through any of the various concepts and embodiments described above, as well as the concepts and embodiments described in detail below, because the concepts and embodiments disclosed herein are not limited to any particular implementation. Furthermore, some aspects of the invention disclosed may be used alone or in any suitable combination with other aspects of the invention disclosed.

[0073] like Figure 1 As shown, this invention provides a topology prototype enhancement method for imbalanced and few-shot scenarios in the transportation domain, with the following steps:

[0074] Step 1: Obtain a representative point set of traffic data that preserves both local and global topological structure based on topological subsampling and topological resampling;

[0075] Step 2: Screen topologically stable traffic data prototypes through continuous homology, topological distance, and boundary topological variability analysis;

[0076] Step 3: Generate pseudo-dimensions or perform high-dimensional topological embedding based on the traffic data topology prototype to construct enhanced features, which are then used for the training and inference of subsequent neural network models and traditional machine learning models.

[0077] This invention primarily focuses on experimental validation in the transportation field, evaluating the effectiveness of the proposed method on traffic-related datasets such as urban vehicle trajectories and pedestrian behavior dynamics. To further validate the method's generality and scalability, supplementary experiments were conducted on a protein complex structure dataset. First, three training mechanisms (50, 100, and 200 labeled samples) were established under extremely limited sample conditions. Topological features were constructed by combining continuous cohomology and VR complexes, and topological prototypes were generated through topological subsampling and resampling. Subsequently, two prototype enhancement methods—topological pseudo-dimensionality enhancement and high-dimensional embedding—were integrated with base models (such as MLP, SVM, DevNet, and DeepSAD) to predict anomaly detection tasks. Results show that regardless of whether pseudo-dimensionality enhancement or high-dimensional embedding enhancement is used, the topological prototype enhancement method significantly improves the area under the receiver operating characteristic (AUC-ROC) on all three datasets, achieving the best performance compared to traditional resampling, GAN enhancement, and ten state-of-the-art anomaly detection models. Experiments have verified that the topology-driven enhancement mechanism can effectively improve the structural representation in class imbalance and few-sample scenarios, enabling the model to still have stable and generalizable predictive capabilities even with low labeling rates.

[0078] In a preferred embodiment of the present invention, step 1 includes the following sub-steps:

[0079] Step 1.1 employs three real-world datasets facing imbalanced class behavior and few-shot learning challenges. The first dataset includes high-resolution vehicle trajectory data captured by urban surveillance systems, where anomalies are defined as violations of traffic rules, such as illegal lane changes and sudden stops. The second dataset focuses on pedestrian dynamics, utilizing depth sensors and pose estimation algorithms to monitor crowd movement and identify anomalous events, such as falls or sudden changes of direction. The third dataset integrates the PDBbind dataset, which contains protein ligand complexes. Accurate identification of pocket regions within these complexes is required, distinguishing them from non-pocket regions. A feature-based point cloud algorithm is used to perform topological subsampling of the original point clouds from these datasets to reduce data size while preserving local and global topological structure. Specifically, Step 1.1 includes the following two sub-steps:

[0080] Step 1.1.1: Divide the sampling space into m-dimensional hypercubes, each m-cube... side length Compared to subsampling ratio The relationship is shown in the following formula:

[0081] ,

[0082] In the formula, and These represent the upper and lower bounds of the data values ​​in the k-th dimension, respectively. ; d represents the spatial dimension, and n represents the total number of samples;

[0083] Step 1.1.2, based on m-cube With point clouds Intersecting, from point clouds Select a sample point , all m-cubes The sampling points form a new point cloud. The feature point lattice algorithm ensures that the difference in topology before and after subsampling has an upper bound on the Wasserstein distance. .

[0084] Step 1.2: Perform topological resampling based on class distribution and local topological sparsity. Specifically, this involves establishing three different mechanisms by gradually increasing the number of labeled samples: 50 samples (0.2%), 100 samples (0.4%), and 200 samples (0.8%) of labeled instances to evaluate the effectiveness of the invention at different regulatory levels. Topological resampling is performed based on class distribution and local topological sparsity to achieve class balance while maintaining topological consistency. This includes the following two sub-steps:

[0085] Step 1.2.1: Based on the distribution of samples in different categories and their sparsity in local neighborhoods, identify the sparse regions of the minority class and the dense regions of the majority class;

[0086] Step 1.2.2: Set up for each batch It performs local upsampling in sparse regions and moderate downsampling in dense regions, while maintaining the adjacency structure and connectivity during the sampling operation, thereby preserving the topological structure of the data.

[0087] In a preferred embodiment of the present invention, step 2 includes the following sub-steps:

[0088] Step 2.1: Extract persistent homology features based on the constructed topological complex and generate a persistent graph. This includes the following two sub-steps:

[0089] Step 2.1.1: Construct different scales according to the following formula. The VR complex describes the topological structure of traffic participant data at both the local and global levels:

[0090] For those with traffic behavior labels nodes VR complex is recorded as ,in, It is a set of vertices. It is defined in A metric on, if and only if for all ,satisfy hour, ;

[0091] Step 2.1.2: For VR complex, calculate persistent homology. Extract the topological features of traffic data by calculating homology groups of different dimensions on the filtered sequence, and generate a persistent graph of multi-scale topological changes.

[0092] Step 2.2: Combining two key indicators—point cloud distance and decision boundary variability—representative samples that maintain topological stability under multi-scale perturbations are selected as topological prototypes. This specifically includes the following two sub-steps:

[0093] Step 2.2.1: Calculate the Wasserstein distance between the original point cloud and the persistent graph of the subsampled point cloud to measure the life and death pairs of their topological features (connected components, loops, cavities) at different scales, and retain the sampled point cloud samples with a distance smaller than the preset Wasserstein distance as the next selection.

[0094] Step 2.2.2: Evaluate the sensitivity of the decision boundary to data distribution perturbations based on the variability of the decision boundary. For a probability space and its corresponding probability density function, given the decision function f, the decision boundary manifold is represented as the equivalent set shown in the following equation:

[0095] ,

[0096] In the formula, z represents a sample point in the feature space Z, and Z represents the feature space of the sample. Let f be the conditional probability density function that gives the random variable Z the value z, given that the classifier f outputs class y.

[0097] For the training set X, let To be based on subsampling ratio (Same as 1.1.1) The selected subset satisfies ,parameter Readjusted by random learning algorithm A The variability of the data decision boundary is defined as:

[0098] ,

[0099] In the formula, D represents the data distribution. This represents the sample drawn from D. Expectations; and The parameters are respectively and The classifier; I is an indicator function, which takes the value 1 when the condition in parentheses is true, and 0 otherwise; Indicates that all samples satisfying the subsampling ratio The minimum value is taken on a subset of the subsampled data; When the subsampling ratio is At that time, the minimum expected change of the decision boundary due to perturbation of the training data.

[0100] In a preferred embodiment of the present invention, step 3 includes the following sub-steps:

[0101] Step 3.1: Extract multi-scale topological features from the topological prototype based on continuous cohomology, and introduce the topological classification results as pseudo-dimensions into the extended feature space. Benchmark testing is then performed on the selected dataset using the pseudo-dimension topological prototype enhancement method (TPA-PD). This specifically includes the following three sub-steps:

[0102] Step 3.1.1: For the traffic participant individual dataset Each individual participating in traffic Construct a parameter at different scales The VR complex sequence, i.e., the VR filter, is used to compute its corresponding persistent graph. As a topological feature of the node;

[0103] Step 3.1.2, for All local neighborhoods as well as Local neighborhood Persistent graph using 2-Wasserstein distance metric and Similarity; at the same time, define nodes Its representation in the d-dimensional topological embedding space is: And based on this representation, construct its corresponding persistent graph PD (PD). Similarly, define And construct a persistent graph PD (PD). Persistent graph With persistent graph Wasserstein distance between L-infinite norm of a bijective mapping between two persistent graphs Measurement;

[0104] Step 3.1.3: Construct a distance-complete graph G and its corresponding adjacency matrix based on the 2-Wasserstein distance. ,in ; The parameter is the 2-Wasserstein distance between the persistent graphs corresponding to the i-th sample and the j-th sample. Defined using elbow plots or cross-validation. The connection components of graph G correspond to topological clusters, placing sets of points with similar topological features on the same plane in 3D space, thus effectively unfolding them into a feature structure that is easier to segment.

[0105] Step 3.2: Construct high-dimensional topological embeddings based on Delaunay triangulation and deformation gradient optimization to obtain enhanced representations that maintain topological consistency. Benchmark tests are then performed on the selected dataset using the High-Dimensional Embedding Topological Prototype Enhancement Method (TPA-HDE). This specifically includes the following four sub-steps:

[0106] Step 3.2.1: Introduce a quantization technique based on triangulation to represent the topological structure of the point cloud in a discrete form, specifically as follows:

[0107] A triangular topological space consisting of a set of non-overlapping simplexes is used to represent the original point cloud topologically. This triangular space can characterize the connectivity of the data both locally and globally, thus providing a structural foundation for subsequent topological feature extraction. Before and after high-dimensional embedding, the vertices of the triangle... They are respectively represented as and via edge vectors and Connect them, edge vectors and Represented as and It encapsulates local topology information, in which It is an index vector;

[0108] Step 3.2.2: Based on the triangulation structure, the deformation gradient and transformation are defined as follows:

[0109] ,

[0110] In the formula, express, express, Indicates the deformation gradient for Transformation for ,pass : The QR decomposition yields the deformation gradient, and the transformation is divided into scaling matrices. and , represented as in It is a unitary matrix;

[0111] Step 3.2.3: Minimize the high-dimensional embedding transformation With deformation gradient The difference between them is the objective, and the objective function is defined as follows:

[0112] ,

[0113] in , After high-dimensional embedding, the original dimension remains unchanged, that is... .

[0114] Step 3.2.4: Based on the target function of interest Because high-dimensional embeddings can lead to the Nash isometric embedding problem, the regularization term is divided into two parts: the first term... Regularize the embedding, the second term Regularize the topology and embed regularization terms. The expression is as follows:

[0115] ,

[0116] In the formula The number of vertices. Let K be the neighborhood consisting of K nearest neighbors.

[0117] Topological regularization term The expression is as follows:

[0118] ,

[0119] The final objective function is expressed as:

[0120] ,

[0121] In the formula, , is a weighting coefficient used to balance the relative importance of each item in the overall objective function. Its value can be determined through experience or cross-validation based on specific task requirements.

[0122] Step 3.3: Input the enhanced features obtained by pseudo-dimensional or high-dimensional topological embedding into the downstream model for anomaly detection or classification tasks. To verify the effectiveness of the enhanced features, AUC-ROC was selected as the main evaluation metric, and it was compared with various representative methods on three real-world datasets, including traditional supervised models (MLP, SVM, XGBoost, LogisticRegression), dedicated anomaly detection models (DevNet, DeepSAD, RoSAS, PreNet, FeaWAD), and prototype-based methods.

[0123] Experimental results show that augmented features constructed based on topological information can significantly improve the separability and robustness of downstream models. Specifically, TPA-PD demonstrates stable performance across various datasets, while TPA-HDE exhibits stronger discriminative power in scenarios with complex structures or high dimensionality. Compared to traditional augmentation strategies such as random resampling or GANs, TPA generates more discriminative feature representations by directly utilizing the topological structure of the data, effectively avoiding problems such as noise amplification and structural distortion, especially under conditions of scarce annotations or imbalanced class distribution.

[0124] Furthermore, as a model-agnostic enhancement module, TPA can be directly combined with downstream models of different paradigms to continuously improve the structural stability and generalization ability of the decision boundary, demonstrating good transferability and versatility.

[0125] While the present invention has been described above with reference to preferred embodiments, it is not intended to limit the invention. Those skilled in the art can make various modifications and refinements without departing from the spirit and scope of the invention. Therefore, the scope of protection of the present invention shall be determined by the claims.

Claims

1. A topology prototype enhancement method for imbalanced and few-sample scenarios in the transportation domain, characterized in that, Includes the following steps: Step 1: Obtain a representative point set of traffic data that preserves both local and global topological structure based on topological subsampling and topological resampling; Step 2: Screen topologically stable traffic data prototypes through continuous homology, topological distance, and boundary topological variability analysis; Step 3: Generate pseudo-dimensions or perform high-dimensional topological embedding based on the traffic data topology prototype to construct enhanced features, which are then used for the training and inference of subsequent neural network models and traditional machine learning models.

2. The topology prototype enhancement method for imbalanced and few-shot scenarios in the transportation domain according to claim 1, characterized in that, Step 1 includes the following sub-steps: Step 1.1: For traffic data, the feature point matrix algorithm is used to perform topological subsampling on the original point cloud; Step 1.2: Perform topological resampling based on class distribution and local topological sparsity to achieve class balance while maintaining topological consistency.

3. The topology prototype enhancement method for imbalanced and few-shot scenarios in the transportation domain according to claim 1, characterized in that, Step 2 includes the following sub-steps: Step 2.1: Extract persistent homology features based on the constructed topological complex and generate a persistent graph; Step 2.2: Combining the two key indicators of point cloud distance and decision boundary variability, select representative samples that maintain topological stability under multi-scale perturbations as topological prototypes.

4. The topology prototype enhancement method for imbalanced and few-shot scenarios in the transportation domain according to claim 1, characterized in that, Step 3 includes the following sub-steps: Step 3.1: Extract multi-scale topological features from the topological prototype based on continuous cohomology, and introduce the topological clustering results as pseudo-dimensions into the extended feature space; Step 3.2: Construct a high-dimensional topological embedding based on triangulation and deformation gradient optimization to obtain an enhanced representation that maintains topological consistency; Step 3.3: Input the enhanced features generated by pseudo-dimensional or high-dimensional embedding into the downstream neural network model and the traditional machine learning model to improve the robustness and separability of classification or anomaly detection tasks.

5. The topology prototype enhancement method for imbalanced and few-shot scenarios in the transportation domain according to claim 2, characterized in that, Step 1.1 includes the following sub-steps Step 1.1.1: Divide the sampling space into m-dimensional hypercubes, each m-cube... side length Compared to subsampling ratio The relationship is shown in the following formula: , In the formula, and These represent the upper and lower bounds of the data values ​​in the k-th dimension, respectively. ; d represents the spatial dimension, and n represents the total number of samples; Step 1.1.2, based on m-cube With point clouds Intersecting, from point clouds Select a sample point , all m-cubes The sampling points form a new point cloud. .

6. The topology prototype enhancement method for imbalanced and few-shot scenarios in the transportation domain according to claim 5, characterized in that, Step 1.2 includes the following sub-steps: Step 1.2.1: Based on the distribution of samples in different categories and their sparsity in local neighborhoods, identify the sparse regions of the minority class and the dense regions of the majority class. Step 1.2.2: Set up for each batch Local upsampling is performed on sparse regions, and moderate downsampling is performed on dense regions, while maintaining the integrity and connectivity of adjacent structures during the sampling operation.

7. The topology prototype enhancement method for imbalanced and few-shot scenarios in the transportation domain according to claim 3, characterized in that, Step 2.1 includes the following sub-steps: Step 2.1.1: Construct different scales according to the following formula. The VR complex describes the topological structure of traffic participant data at both the local and global levels: For those with traffic behavior labels nodes VR complex is recorded as ,in, It is a set of vertices. It is defined in A metric on, if and only if for all ,satisfy hour, ; Step 2.1.2: For VR complex, calculate persistent homology. Extract the topological features of traffic data by calculating homology groups of different dimensions on the filtered sequence, and generate a persistent graph of multi-scale topological changes.

8. The topology prototype enhancement method for imbalanced and few-shot scenarios in the transportation domain according to claim 7, characterized in that, Step 2.2 includes the following sub-steps: Step 2.2.1: Calculate the Wasserstein distance between the original point cloud and the persistent graph of the subsampled point cloud to measure the life and death pairs of their topological features at different scales, and retain the sampled point cloud samples with a distance smaller than the preset Wasserstein distance as the next selection. Step 2.2.2: Evaluate the sensitivity of the decision boundary to data distribution perturbations based on the variability of the decision boundary. For a probability space and its corresponding probability density function, given the decision function f, the decision boundary manifold is represented as the equivalent set shown in the following equation: , In the formula, z represents a sample point in the feature space Z, and Z represents the feature space of the sample. Let f be the conditional probability density function that gives the random variable Z the value z, given that the classifier f outputs class y. For the training set X, let To be based on subsampling ratio (Same as 1.1.1) The selected subset satisfies ,parameter Readjusted by random learning algorithm A The variability of the data decision boundary is defined as: , In the formula, D represents the data distribution. This represents the sample drawn from D. Expectations; and The parameters are respectively and The classifier; I is an indicator function, which takes the value 1 when the condition in parentheses is true, and 0 otherwise; Indicates that all samples satisfying the subsampling ratio The minimum value is taken on a subset of the subsampled data; When the subsampling ratio is At that time, the minimum expected change of the decision boundary due to perturbation of the training data.

9. The topology prototype enhancement method for imbalanced and few-shot scenarios in the transportation domain according to claim 4, characterized in that, Step 3.1 includes the following sub-steps: Step 3.1.1: For the traffic participant individual dataset Each individual participating in traffic Construct a parameter at different scales The VR complex sequence, i.e., the VR filter, is used to compute its corresponding persistent graph. As a topological feature of the node; Step 3.1.2, for All local neighborhoods as well as Local neighborhood Persistent graph using 2-Wasserstein distance metric and The similarity. At the same time, define the nodes. Its representation in the d-dimensional topological embedding space is: And based on this representation, construct its corresponding persistent graph PD (PD). ), similarly defined And construct a persistent graph PD (PD). Two persistent graphs (PDs) ) and PD ( Wasserstein distance between ) L-infinite norm of a bijective mapping between two persistent graphs Measurement; Step 3.1.3: Construct a distance-complete graph G and its corresponding adjacency matrix based on the 2-Wasserstein distance. ,in , The parameter is the 2-Wasserstein distance between the persistent graphs corresponding to the i-th sample and the j-th sample. By using the elbow method or cross-validation, the connected components of graph G correspond to topological clusters, which map point sets with similar topological features onto the same plane in three-dimensional space, thereby unfolding the original data into a structure that is easier to segment.

10. The topology prototype enhancement method for imbalanced and few-shot scenarios in the transportation domain according to claim 9, characterized in that, Step 3.2 includes the following sub-steps: Step 3.2.1: Introduce a quantization technique based on triangulation to represent the topological structure of the point cloud in a discrete form, specifically as follows: The original point cloud is topologically represented using a triangular topological space consisting of a set of non-overlapping simplexes. Before and after high-dimensional embedding, the vertices of the triangles... They are respectively represented as and via edge vectors and Connect them, edge vectors and Represented as and It encapsulates local topology information, in which It is an index vector; Step 3.2.2: Based on the triangular mesh structure, the deformation gradient and transformation are defined as follows: , In the formula, express, express, Indicates the deformation gradient for Transformation for ,pass : The QR decomposition yields the deformation gradient, and the transformation is divided into scaling matrices. and , represented as in It is a unitary matrix; Step 3.2.3: Minimize the high-dimensional embedding transformation With deformation gradient The difference between them is the objective, and the objective function is defined as follows: , in , After high-dimensional embedding, the original dimension remains unchanged, that is... ; Step 3.2.4: Divide the regularization term into two parts: the first term Regularize the embedding, the second term Regularize the topology and embed regularization terms. The expression is as follows: , In the formula The number of vertices. It is a neighborhood consisting of K nearest neighbors; Topological regularization term The expression is as follows: , The final objective function is expressed as: , In the formula, , is a weighting coefficient used to balance the relative importance of each item in the overall objective function. Its value can be determined through experience or cross-validation based on specific task requirements.