Weakly supervised video anomaly detection method and system based on boundary equilibrium guidance
By using a lightweight prediction model guided by boundary equilibrium, the problems of false alarms and recognition in complex backgrounds in weakly supervised video anomaly detection are solved, achieving high accuracy and robustness in video anomaly detection, which is suitable for smart camera SoC chips.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JIANGXI UNIVERSITY OF FINANCE AND ECONOMICS
- Filing Date
- 2026-04-28
- Publication Date
- 2026-05-29
AI Technical Summary
Existing weakly supervised video anomaly detection technologies are prone to false alarms when dealing with complex backgrounds, cannot effectively distinguish between fluctuations within the normal range and anomalies, and lack physical or logical interpretability.
A boundary equilibrium-guided approach is adopted, which constructs a lightweight prediction model through feature extraction, probabilistic strategy encoding, local payment modeling, and boundary equilibrium evaluation modules. The multiplicative weight update logic and directional equilibrium polarization loss function in game theory are used to quantify the strength of the deviation of the segment from the local game equilibrium in order to identify anomalies.
It improves the robustness and accuracy of the model in complex dynamic contexts, reduces the false alarm rate, and provides a clear logical explanation, enabling lightweight front-end real-time detection suitable for memory-constrained smart camera SoC chips.
Smart Images

Figure CN122116246A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of computer vision and deep learning technology, and in particular to a weakly supervised video anomaly detection method and system based on boundary equalization guidance. Background Technology
[0002] Video anomaly detection (VAD) aims to automatically discover rare events that deviate from normal patterns in long-term video sequences. Due to the high cost of frame-by-frame annotation, weakly supervised video anomaly detection (WVAD), which relies solely on video-level labels for training, has become the mainstream research approach.
[0003] Existing WVAD techniques (such as MIL-based methods) generally focus on enhancing the saliency of anomalous segments, but neglect the "blurring of normal boundaries" prevalent in real-world scenes. Natural fluctuations such as changes in lighting, crowd density variations, and camera shake, while not anomalous themselves, often exhibit visual similarities to anomalies. Existing models, lacking explicit modeling of "normal distribution boundaries," are prone to false positive accumulation. Specific shortcomings include: (1) Lack of boundary awareness: unable to distinguish between "abnormal directional deviation" and "fluctuation within the normal range"; (2) Decision boundary drift: In complex contexts, the model tends to treat all high-response segments as anomalies; Insufficient interpretability: The judgment criteria are often based on black-box feature distribution, lacking intuitive physical or logical explanation. Summary of the Invention
[0004] In view of the above, the main objective of this invention is to propose a weakly supervised video anomaly detection method and system based on boundary equalization guidance to solve the aforementioned technical problems.
[0005] This invention proposes a weakly supervised video anomaly detection method based on boundary equalization guidance, the method comprising the following steps: Step 1: Construct a prediction model based on the feature extraction module, probabilistic strategy encoding module, local payment modeling module, boundary equilibrium evaluation module, and fusion prediction module; input the original video stream into the feature extraction module, and use the pre-trained feature extractor to extract features to obtain a global feature sequence; Step 2: Input the global feature sequence into the probabilistic policy encoding module, map the fragment features in the global feature sequence into hidden representations through a lightweight backbone network, obtain the basic discriminative response value using a linear layer based on the hidden representation, and convert the basic discriminative response value into an initial probabilistic policy. Step 3: Construct two types of payment reference vectors, normal and abnormal. Use the local payment modeling module to calculate the local payment of the current feature segment in the global feature sequence for the two types of payment reference vectors, and perform a single-step policy update in combination with the initial probability policy to obtain a hybrid discrimination policy. Step 4: Based on the hybrid discrimination strategy and local payment, calculate the strategy weighted average payment using the boundary equilibrium evaluation module, define the strategy residual vector based on the strategy weighted average payment, and calculate the boundary residual; Step 5: Input the basic discrimination response value, the hybrid discrimination strategy after game evolution, and the boundary residual into the fusion prediction module. Extract the anomaly direction term from the hybrid discrimination strategy and perform smoothing gating processing on the boundary residual to obtain the boundary gating term. Then fuse the basic discrimination response value, the anomaly direction term, and the boundary gating term to obtain the anomaly score. Construct a loss function based on the boundary residual and the anomaly score to jointly optimize the prediction model and obtain the optimized prediction model. Use the optimized prediction model to make predictions and obtain the final anomaly score. Determine the final detection result based on the final anomaly score.
[0006] This invention also proposes a weakly supervised video anomaly detection system based on boundary equalization guidance, the system comprising: Extraction module, used for: The prediction model is composed of a feature extraction module, a probabilistic strategy encoding module, a local payment modeling module, a boundary equilibrium evaluation module, and a fusion prediction module. The original video stream is input into the feature extraction module, and a pre-trained feature extractor is used to extract features to obtain a global feature sequence. Encoding module, used for: The global feature sequence is input into the probabilistic policy encoding module. The fragment features in the global feature sequence are mapped to hidden representations through a lightweight backbone network. Based on the hidden representations, the basic discriminative response values are obtained using linear layers and then converted into the initial probabilistic policy. The modeling module is used for: Two types of payment reference vectors, normal and abnormal, are constructed. The local payment modeling module is used to calculate the local payment of the current feature segment in the global feature sequence for the two types of payment reference vectors, and a single-step policy update is performed in combination with the initial probability policy to obtain a hybrid discrimination policy. The evaluation module is used for: Based on the hybrid discrimination strategy and local payment, the strategy weighted average payment is calculated using the boundary equilibrium evaluation module. Based on the strategy weighted average payment, the strategy residual vector is defined, and the boundary residual is calculated. The prediction module is used for: The basic discrimination response value, the hybrid discrimination strategy evolved from the game, and the boundary residuals are input into the fusion prediction module. Anomaly direction terms are extracted from the hybrid discrimination strategy and smoothed by gating the boundary residuals to obtain boundary gating terms. The basic discrimination response value, anomaly direction terms, and boundary gating terms are then fused to obtain anomaly scores. A loss function is constructed based on the boundary residuals and anomaly scores to jointly optimize the prediction model, resulting in an optimized prediction model. The optimized prediction model is then used for prediction to obtain the final anomaly score, and the final detection result is determined based on the final anomaly score.
[0007] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. Traditional methods (such as RTFM and VadCLIP) typically rely on the absolute significance of anomalous signals, leading to the misclassification of "strongly normal signals" such as dramatic changes in lighting and crowd fluctuations as anomalous. This invention proposes for the first time an evaluation logic based on "boundary equilibrium," identifying anomalous events by quantifying the strength of a segment's deviation from the local game equilibrium (boundary residual). This mechanism enables the model to identify "natural fluctuations within the normal distribution," only determining anomalies when the discrimination strategy experiences incoherent dynamic instability, fundamentally solving the problem of false alarms in complex dynamic contexts.
[0008] 2. This invention abandons the traditional static attention weighting method and innovatively adopts the multiplicative weight update logic from game theory. By decoupling the apparent prior strategy of segments from the external rewards based on dynamic reference vectors, the model can "adaptively correct" the discrimination tendency of segments based on the global statistical information that evolves in real time during training. This design not only enhances the system's robustness to local noise, but also ensures the convergence stability and consistency of the discrimination logic under weak labeling conditions.
[0009] 3. To address the issue of ambiguous decision boundaries under weak supervision, this invention constructs a directional boundary energy with physical semantics and designs a directional equilibrium polarization loss accordingly. This constraint explicitly widens the statistical distance between true anomalous offsets and normal behavior variants by forcing normal videos to maintain a "zero-energy" steady state. This refined polarization approach establishes an absolute physical reference benchmark for the model, enabling the anomaly localization accuracy (AUC) to achieve generational breakthroughs on highly challenging datasets such as UCF-Crime.
[0010] 4. Benefiting from the design of a single-stream architecture and lightweight strategy encoding logic, this invention achieves high-precision detection while compressing the number of model parameters to 0.526M, and the model binary file size to only 2.016MB (approximately 1 / 300th the size of mainstream heavy models such as VadCLIP). This extremely lightweight performance means that this algorithm can be directly integrated into the memory-constrained SoC chip of smart cameras, enabling real-time front-end inference without the need for expensive back-end GPU servers, thus possessing extremely high commercial closed-loop value.
[0011] 5. The boundary residual curves output by this invention are not only numerical results, but also directly reflect the stability of the system state within the monitoring scenario. Their pulse-like jump characteristics have clear dynamic meanings, providing security personnel with a clear and logical chain of evidence for post-event causation, overcoming the common "black box" drawbacks of deep learning models.
[0012] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by means of embodiments of the invention. Attached Figure Description
[0013] Figure 1 This is a flowchart illustrating the steps of the weakly supervised video anomaly detection method based on boundary equalization guidance proposed in this invention.
[0014] Figure 2 This is an overall flowchart of the weakly supervised video anomaly detection method based on boundary equalization guidance proposed in this invention.
[0015] Figure 3 This is a diagram illustrating the overall framework of the weakly supervised video anomaly detection method based on boundary equalization guidance proposed in this invention.
[0016] Figure 4 This is a schematic diagram of the overall framework of the weakly supervised video anomaly detection system based on boundary equalization guidance proposed in this invention. Detailed Implementation
[0017] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0018] These and other aspects of the embodiments of the present invention will become clear from the following description and accompanying drawings. In these descriptions and drawings, some specific embodiments of the present invention are specifically disclosed to provide some ways of implementing the principles of the embodiments of the present invention; however, it should be understood that the scope of the embodiments of the present invention is not limited thereto.
[0019] Please see Figure 1 This invention proposes a weakly supervised video anomaly detection method based on boundary equalization guidance, which includes the following steps: Step 1: Construct a prediction model based on the feature extraction module, probabilistic strategy encoding module, local payment modeling module, boundary equilibrium evaluation module, and fusion prediction module; input the original video stream into the feature extraction module, and use the pre-trained feature extractor to extract features to obtain the global feature sequence.
[0020] Please see Figure 2 In step 1, the original video stream is input into the feature extraction module, and a pre-trained feature extractor is used to extract features to obtain a global feature sequence. The corresponding relationship in the process is as follows: ; in, Represents the global feature sequence. This represents the feature vector of the first segment. Indicates the total number of segments is eigenvectors, Indicates the first Feature vectors of each segment Indicates feature dimension as A set of (e.g., 512 or 1024).
[0021] It should be noted that this step involves mapping high-dimensional raw pixels to a semantic space to initially capture motion and appearance information within the fragment.
[0022] In a preferred embodiment, each segment contains 16 consecutive frames.
[0023] Step 2: Input the global feature sequence into the probabilistic policy encoding module. Map the segment features in the global feature sequence to hidden representations through a lightweight backbone network. Based on the hidden representations, obtain the basic discriminant response values using a linear layer and convert the basic discriminant response values into the initial probabilistic policy.
[0024] Please see Figure 3 In step 2, the global feature sequence is input into the probabilistic policy encoding module. A lightweight backbone network maps the segment features in the global feature sequence to hidden representations. Based on these hidden representations, a linear layer is used to obtain the basic discriminative response value, which is then transformed into an initial probabilistic policy. Specifically, this includes the following steps: The global feature sequence is input into the probabilistic policy encoding module, and the fragment features in the global feature sequence are projected into the latent space through the linear layer in the lightweight backbone network to obtain the latent representation; Based on implicit representation, the basic discriminative response value is obtained using a linear layer; The basic discriminative response values are expanded and concatenated into a symmetric binary policy representation; Based on the symmetric binary policy representation, the initial probability policy is obtained through the softmax function.
[0025] The latent representation is obtained by projecting fragment features from the global feature sequence into the latent space through linear layers in a lightweight backbone network. The corresponding relationship in this process is as follows: ; in, The implicit representation of a fragment. This represents a function to randomly discard items. This indicates a modified linear unit activation function. This represents the weight matrix of the linear layer. This represents the bias term of the linear layer; In the step of obtaining the basic discriminative response value using a linear layer based on implicit representation, the corresponding relationship in the process is as follows: ; in, Indicates the basic discrimination response value. This represents the first parameter in the linear layer that serves as the discriminant layer. This represents the second parameter in the linear layer that serves as the discriminant layer; In the step of expanding and concatenating the basic discriminative response values into a symmetric binary policy representation, the corresponding relationship in the process is as follows: ; in, Representing a symmetric binary strategy. Indicates a splicing operation; In the step of obtaining the initial probabilistic policy through the softmax function in the symmetric binary policy representation, the corresponding relationship in the process is as follows: ; in, Indicates the initial probability policy. This represents the initial normal probability. Indicates the initial anomaly probability. This represents the softmax function.
[0026] In this embodiment, the design ensures that the model has an equivalent discriminative prior for positive / abnormal states in the initial stage. The lightweight backbone network consists of two linear layers and does not use batch normalization to ensure lightweight design.
[0027] Step 3: Construct two types of payment reference vectors, normal and abnormal. Use the local payment modeling module to calculate the local payment of the current feature segment in the global feature sequence for the two types of payment reference vectors, and perform a single-step policy update in combination with the initial probability policy to obtain a hybrid discrimination policy.
[0028] In step 3, two types of payment reference vectors, normal and abnormal, are constructed. The local payment modeling module is used to calculate the local payment of the current feature segment in the global feature sequence for the two types of payment reference vectors, and a single-step policy update is performed in conjunction with the initial probability policy to obtain a hybrid discrimination policy. Specifically, the steps are as follows: Construct normal reference vectors and abnormal reference vectors, and use exponential moving average to update the normal reference vectors and abnormal reference vectors to obtain updated normal reference vectors and updated abnormal reference vectors. Using the local payment modeling module, the local payment is calculated relative to the updated normal reference vector and the updated abnormal reference vector for the current feature segment in the global feature sequence; Based on the local payment of the updated normal reference vector and the updated abnormal reference vector, a single-step policy update is performed in conjunction with the initial probability policy to obtain a hybrid discrimination policy.
[0029] The relationship between calculating the local payoff of the current feature segment in the global feature sequence and the updated normal reference vector and the updated abnormal reference vector is as follows: ; in, This represents the updated normal reference vector. Represents the momentum factor. This represents the normal reference vector before the update. This represents the feature set of normal videos in the batch. Indicates the number of elements in the set. Represents a single feature vector in the feature set. This represents the updated anomaly reference vector. This represents the abnormal reference vector before the update. This represents the feature set of abnormal videos in the batch. Indicates the normal reference vector. Represents the abnormal reference vector; It should be noted that the normal reference vector With the abnormal reference vector The construction and dynamic evolution process of are as follows: First, in the initial stage of model training, the system initializes the reference vector pool in the storage space using the zero vector or the feature mean of the first training batch. Then, in each training batch, the model classifies samples based on video-level labels. For normal videos, it extracts the feature set of all segments. For abnormal videos, a ranking logic based on multi-instance learning is used to filter high-response features and add them to the set. Next, the arithmetic mean centroid of each batch of feature sets is calculated, and combined with the momentum factor. Perform the aforementioned exponential moving average (EMA) update. The physical meaning of this construction logic is that by coupling the long-term memory of historical distributions with the instantaneous feedback of the current batch, the reference vector forms a smooth evolutionary trajectory in the semantic space, thereby constructing a robust discrimination benchmark. This construction process only exists in the training optimization phase; the inference phase directly calls the solidified vectors after training to ensure detection efficiency.
[0030] In the step of calculating the local payment for the current feature segment in the global feature sequence using the local payment modeling module, the corresponding relationship between the updated abnormal reference vector and the updated normal reference vector is as follows: ; in, This represents the local payoff between the updated abnormal reference vector and the updated normal reference vector. This represents the cosine similarity between the current segment and the normal baseline. This represents the cosine similarity between the current segment and the abnormal baseline. Represents the cosine function; In the process of local payment based on the updated abnormal reference vector and the updated normal reference vector, combined with the initial probability policy to perform a single-step policy update to obtain the hybrid discrimination policy, the corresponding relationship is as follows: ; in, Indicates a hybrid discrimination strategy. This represents element-wise multiplication. Represents an exponential function. This represents the learnable, updated temperature coefficient. This represents the L1 norm.
[0031] Specifically, the processing logic for performing a single-step policy update is as follows: First, a non-linear weighting of the payoff is performed: using a learnable, updated temperature coefficient. For local pay vectors Scale the device using an exponential function. The similarity scores of each component are mapped to positive feedback gain weights. This step, through exponential nonlinear processing, amplifies the correlation strength between the discriminative features and the reference baseline, making the model more sensitive to subtle changes at boundary times. Secondly, the policy weights are interactively merged: the feedback gain weights are combined with the initial probability policy. The process involves performing element-wise multiplication (Hadamard Product). The physical significance of this step lies in simulating "strategy adjustment" during game evolution: if a discriminant component (normal or abnormal) has a higher payoff in the current local payoff environment, its corresponding strategy weight will be strengthened in this step; conversely, if the component does not conform to the global statistical distribution, its weight will be weakened. Finally, distribution normalization is implemented: the L1 norm of the interacting and merging vector is calculated, and division is performed on the vector using this norm, ensuring that the updated output once again satisfies the probability distribution constraint (i.e., the sum of all components is 1). This "single-step update" mechanism is characterized by the fact that it does not require complex iterative loops or multi-layered nonlinear stacking; it achieves dynamic alignment between the fragment-level apparent discriminant strategy and the global statistical evolution distribution through only one forward computation. This design ensures extremely low computational overhead (FLOPs) while guaranteeing the final hybrid discriminant strategy. It can take into account both the instantaneous features of a single frame and the long-term evolution law, providing a high signal-to-noise ratio logical input for subsequent accurate evaluation of boundary residuals.
[0032] It should be noted that this step introduces a "local reference" mechanism. During training, the model dynamically maintains two global payoff reference vectors: a normal reference vector and an abnormal reference vector. In each training batch, the reference vectors are updated using an exponential moving average (EMA).
[0033] In this embodiment, a multiplicative weight update method is used instead of an additive method to model the fragment discrimination process as a game-theoretic evolutionary logic. Specifically, the initial strategy is defined as a "discrimination prior strategy" based on the apparent features of the fragment, while the local payoff represents the "external feedback payoff" from the global contextual reference distribution. This specific mathematical architecture achieves decoupling between the apparent prior belief and the spatiotemporal contextual feedback. Through nonlinear adjustment of the learnable temperature coefficient update, the model can adaptively balance the weights between prior discrimination and external payoff, thereby enabling robust correction through global payoff when local discrimination fails due to drastic environmental fluctuations (such as illumination or occlusion). Furthermore, the use of this multiplicative update method is the only logical prerequisite for realizing the core innovation of this invention: boundary equilibrium residual calculation. Only a hybrid strategy based on this game-theoretic evolutionary framework can accurately derive the nonequilibrium residual component representing the "boundary destruction intensity." If conventional additive fusion or simple contrastive learning is used, it is impossible to quantify the degree of instability of the discrimination state from a unified evolutionary game perspective. Therefore, the specific evolutionary logic of this step is the cornerstone for achieving the core technical goal of "boundary equilibrium guidance".
[0034] Step 4: Based on the hybrid discrimination strategy and local payment, calculate the strategy weighted average payment using the boundary equilibrium evaluation module, define the strategy residual vector based on the strategy weighted average payment, and calculate the boundary residual.
[0035] In step 4, based on the hybrid discrimination strategy and local payment, the strategy-weighted average payment is calculated using the boundary equilibrium evaluation module. Based on the strategy-weighted average payment, a strategy residual vector is defined, and the boundary residuals are calculated. The corresponding relationships in this process are as follows: ; in, This indicates a strategy-weighted average payout. This indicates that the hybrid discrimination strategy is transposed. This indicates the transpose operation. Represents the policy residual vector. Represents a vector consisting entirely of 1s. Represents the boundary residual. Describing the L2 norm, The first term represents the hybrid discrimination strategy. Each strategy component The local payoff for the updated abnormal reference vector and the updated normal reference vector is represented by the first... Each payment component.
[0036] In a binary game, the equilibrium state requires that the payoffs of each strategy component be equal; therefore, the residual is defined as the difference between the payoff and the average payoff. The deviation is obtained by multiplying the all-1 vector by the average payoff and then subtracting it from the payoff vector.
[0037] It is important to emphasize that the fragment-level boundary residuals defined in this step are physically defined as the "dynamic instability strength of decision beliefs and environmental benefits." Unlike the policy gradient variance in reinforcement learning (RL), which is only used to characterize the uncertainty of the model search, the boundary residuals in this invention... As a physical quantity representing the dynamic stability evolution of video, it can explicitly indicate the start and end times of abnormal events through its pulse-like jumps in value on the time axis, thereby achieving accurate capture of the abnormal temporal structure of the video. In normal video segments, the payoffs generated by the discrimination strategy and local context reference are in a "Nash equilibrium" state, manifested as the residual approaching a minimum value; however, at the boundary moments of anomaly occurrence or disappearance, the originally stable local payoff balance is broken by sudden visual variants, causing the strategy to evolve drastically and produce significant equilibrium shifts, manifested as pulse-like jumps. This boundary perception logic based on "game equilibrium disruption" is fundamentally different from traditional methods based on feature amplitude changes or statistical outlier detection. This invention does not rely on the absolute strength of the abnormal signal, but captures anomalies by quantifying the "incoherence" of the decision logic in the local field. Furthermore, it is not only used as an evaluation index, but also as a core adjustment factor for "boundary adaptive gating" and "directional boundary energy" in subsequent steps. This design of transforming mathematical residuals into structured control signals with physical semantics constitutes the key innovative threshold that distinguishes this invention from existing technologies.
[0038] Step 5: Input the basic discrimination response value, the hybrid discrimination strategy after game evolution, and the boundary residual into the fusion prediction module. Extract the anomaly direction term from the hybrid discrimination strategy and perform smoothing gating processing on the boundary residual to obtain the boundary gating term. Then fuse the basic discrimination response value, the anomaly direction term, and the boundary gating term to obtain the anomaly score. Construct a loss function based on the boundary residual and the anomaly score to jointly optimize the prediction model and obtain the optimized prediction model. Use the optimized prediction model to make predictions and obtain the final anomaly score. Determine the final detection result based on the final anomaly score.
[0039] In step 5, the basic discriminant response value, the hybrid discriminant strategy after game evolution, and the boundary residuals are input into the fusion prediction module. Anomaly direction terms are extracted from the hybrid discriminant strategy and combined with the boundary residuals for smoothing gating to obtain boundary gating terms. Then, the basic discriminant response value, anomaly direction terms, and boundary gating terms are fused to obtain anomaly scores. Specifically, this includes the following sub-steps: The basic discrimination response value, the hybrid discrimination strategy after game evolution, and the boundary residual are input into the fusion prediction module. The abnormal direction term is extracted from the hybrid discrimination strategy. The corresponding relationship in the process is as follows: ; in, Indicates an abnormal direction item. Indicates the weight of the outlier component in the hybrid discrimination strategy; The boundary residuals are smoothed and gated using the hyperbolic tangent function to obtain the boundary gate term. The corresponding relationship is as follows: ; in, Indicates boundary gating terms, Represents the hyperbolic tangent function. Represents the learnable gating coefficient; The basic discriminant response value, anomaly direction term, and boundary gating term are weighted and fused, and then fused again using the sigmoid activation function to obtain the anomaly score. The corresponding relationship in this process is as follows: ; in, This represents the final response value after fusion. , These represent two different learnable fusion coefficients. Indicates the first The abnormal score of each segment.
[0040] It should be noted that this mechanism ensures that the model only operates when obvious boundary violations are observed. Large) and the offset direction is towards the abnormal ( A high score will only be awarded when the result is positive.
[0041] A loss function is constructed based on the boundary residuals and outlier scores to jointly optimize the prediction model, resulting in an optimized prediction model. The specific steps include the following: Construct a video-level cross-entropy loss function based on anomaly scores; Based on the boundary residuals and outlier scores, a directional equilibrium polarization loss function is constructed. The corresponding relationship in the process is as follows: ; in, This represents the directional equilibrium polarization loss function. This represents a collection of normal videos. This represents a collection of abnormal videos. This refers to the Softplus function. Indicates the first The arithmetic mean of the segment-level directional boundary energy within a normal video. This represents the preset positive boundary energy threshold. This represents the operation of calculating the mean of a preset number of elements with the largest values in the input sequence. Indicates the first Directed boundary energy sequences of each segment within an abnormal video; Construct a cross-package equilibrium dominance loss function based on boundary residuals and outlier scores; The prediction model is jointly optimized using the video-level cross-entropy loss function, the directional equalization polarization loss function, and the cross-packet equalization dominance loss function to obtain the optimized prediction model.
[0042] During the training and optimization phase, this invention utilizes the outlier scores obtained in step 5 above. The boundary residuals obtained in step 4 above Step-by-step fusion to construct directional boundary energy The corresponding relationship in the process is as follows: ; in, Represents the directional boundary energy; where, Its function is to: utilize The sign bit, used as a property determination operator, determines the undirected boundary destruction strength. Mapped to a directed discriminant space; when A value greater than 0 indicates boundary failure in an abnormal direction. A value less than 0 indicates a natural fluctuation towards a normal distribution. This is achieved through the directional boundary energy. The constraints enable the model to explicitly distinguish between "abnormal offsets that disrupt the normal structure" and "complex fluctuations within the normal distribution" under weak supervision, thereby reducing the false alarm rate of normal videos while enhancing the boundary response strength of key segments in abnormal videos.
[0043] It should be noted that the directional equalization polarization loss function constrains normal video from producing positive boundary violations, while ensuring that critical segments of anomalous video have sufficient positive energy, forcing normal video to maintain a low-energy state. The cross-packet equalization dominance loss function explicitly widens the statistical distance between the "worst-case pseudo-anomaly" in the normal packet and the "critical anomaly" in the anomalous packet.
[0044] It should be further pointed out that the directional boundary energy Multiplying the anomalous direction term (positive values indicate anomalous tendency, negative values indicate normal tendency) by the boundary residual (non-negative destructive strength) yields a signed energy value. When a fragment deviates from equilibrium in an anomalous direction, the value is positive and increases with destructive strength; when the fragment is normal or deviates towards the normal direction, the value is negative or close to zero.
[0045] Please see Figure 4 The present invention also proposes a weakly supervised video anomaly detection system based on boundary equalization guidance, the system comprising: Extraction module, used for: The prediction model is composed of a feature extraction module, a probabilistic strategy encoding module, a local payment modeling module, a boundary equilibrium evaluation module, and a fusion prediction module. The original video stream is input into the feature extraction module, and a pre-trained feature extractor is used to extract features to obtain a global feature sequence. Encoding module, used for: The global feature sequence is input into the probabilistic policy encoding module. The fragment features in the global feature sequence are mapped to hidden representations through a lightweight backbone network. Based on the hidden representations, the basic discriminative response values are obtained using linear layers and then converted into the initial probabilistic policy. The modeling module is used for: Two types of payment reference vectors, normal and abnormal, are constructed. The local payment modeling module is used to calculate the local payment of the current feature segment in the global feature sequence for the two types of payment reference vectors, and a single-step policy update is performed in combination with the initial probability policy to obtain a hybrid discrimination policy. The evaluation module is used for: Based on the hybrid discrimination strategy and local payment, the strategy weighted average payment is calculated using the boundary equilibrium evaluation module. Based on the strategy weighted average payment, the strategy residual vector is defined, and the boundary residual is calculated. The prediction module is used for: The basic discrimination response value, the hybrid discrimination strategy evolved from the game, and the boundary residuals are input into the fusion prediction module. Anomaly direction terms are extracted from the hybrid discrimination strategy and smoothed by gating the boundary residuals to obtain boundary gating terms. The basic discrimination response value, anomaly direction terms, and boundary gating terms are then fused to obtain anomaly scores. A loss function is constructed based on the boundary residuals and anomaly scores to jointly optimize the prediction model, resulting in an optimized prediction model. The optimized prediction model is then used for prediction to obtain the final anomaly score, and the final detection result is determined based on the final anomaly score.
[0046] To clearly illustrate the technical advantages and essential features of this invention, the key differences between this invention and the three closest comparative papers in the field of video anomaly detection (RTFM, VadCLIP, UR-DMU) are listed below: 1. The core discrimination logic has shifted from "feature saliency" to "boundary equilibrium": The difference from RTFM: Existing technologies (such as RTFM) mainly rely on the characteristic magnitude ranking logic, considering anomalies as outliers with high magnitudes. This makes them prone to false alarms when processing normal signals that generate high responses, such as sudden changes in lighting or camera shake. This invention defines boundary residuals in the specification. Its core logic is to treat anomalies as a disruption of the game equilibrium state. Even if a segment has a high characteristic magnitude, as long as its discrimination strategy is in dynamic equilibrium with the local reference background (i.e., the residual tends to 0), the model judges it as normal. This perspective, starting from the "instability intensity," essentially improves the discrimination robustness in complex dynamic backgrounds.
[0047] 2. Context modeling shifts from "multimodal external alignment" to "single-stream internal game evolution": The difference between this invention and VadCLIP: Existing technologies (such as VadCLIP) achieve semantic discrimination by introducing a massive vision-language branch, resulting in a model parameter count as high as 35M and significant inference latency, making them difficult to deploy at edge computing. This invention employs a multiplicative weight update mechanism in the enhanced description section of the specification. The model requires no external text branches; it adaptively corrects its discrimination bias solely through the game-like evolution between internal features and dynamic reference vectors. This design achieves an extremely lightweight design of 0.526M while its detection accuracy (88.52%) even surpasses that of heavy multimodal models, representing a generational leap in energy efficiency.
[0048] 3. The training constraint mechanism shifts from "relative ranking" to "absolute stable state polarization": Existing technologies (such as UR-DMU) focus on uncertainty adjustment and ranking constraints, lacking an explicit definition of the "normal distribution boundary," resulting in a still ambiguous discrimination space for pseudo-anomalies (normal segments that appear anomalous). This invention constructs a directional boundary energy and proposes a directional equalization polarization loss. This loss function enforces that the energy response of normal video in the direction of anomalies must remain in a "zero-energy" steady state. This method of establishing an absolute physical reference criterion through polarization provides a clearer decision boundary than relative ranking losses.
[0049] 4. Hardware adaptability shifts from "backend server dependence" to "frontend SoC chip self-adaptation": Existing benchmark methods (such as VadCLIP, 619.1MB; RTFM, 94.3MB) cannot run directly on front-end smart camera SoC chips with only 4MB-8MB of Flash space due to their excessively large model files. This invention, through single-stream strategy encoding logic, compresses the number of parameters to 0.526MB and reduces the model file to 2.016MB (as shown in Table 3 below). This reduction in scale makes this invention substantially capable of real-time operation on low-power embedded devices, solving the industrial pain point of migrating video anomaly detection technology from the backend to the frontend.
[0050] To verify the effectiveness and advancement of the weakly supervised video anomaly detection method based on boundary equalization guidance proposed in this invention, this embodiment conducted extensive quantitative and qualitative experiments on several publicly available standard datasets for video anomaly detection.
[0051] 1. Experimental setup and evaluation criteria; (1) Experimental dataset: (a) UCF-Crime: A large-scale real-world surveillance video dataset containing 13 types of anomalous behavior (such as theft, explosion, car accident, etc.) with severe background noise (such as sudden changes in lighting and camera shake), which is a challenging benchmark for testing the robustness of algorithms.
[0052] (b) ShanghaiTech: Includes various abnormal behaviors in campus scenarios to verify the model's ability to capture fine-grained behaviors in standard fixed scenarios.
[0053] (2) Feature extraction and parameter setting; This embodiment uses the CLIP visual encoder as the backbone network to extract segment features. The video is uniformly divided into segments of 16 frames each. In the policy evolution update step, the temperature coefficient is initially set to 0.1, and the momentum update factor is set to 0.9.
[0054] (3) Evaluation indicators; The industry-standard frame-level AUC (Area Under the ROC Curve) is used as the core evaluation metric. The closer the AUC value is to 1, the higher the model's ability to distinguish between normal and abnormal segments.
[0055] 2. Performance comparison experiment; The CDD-Net (Boundary Equalization Guided Network) proposed in this invention is compared with current leading international algorithms (such as RTFM, MGFN, VadCLIP, etc.) under the same conditions. The experimental results are shown in Table 1: Table 1: Performance Comparison with the Most Advanced Technologies (AUC / %)
[0056] The following is an in-depth analysis of the comparative experimental results: (1) Overcoming the limitations of "saliency mining": Traditional RTFM and MGFN primarily rely on multiple instance learning (MIL) to uncover saliency features of anomalous segments. However, in scenes like UCF-Crime, which involve dramatic changes in lighting, low-light conditions at night, and complex background motion, the "visual saliency" of normal behavior is often amplified by environmental noise, leading to false alarms. Experimental data shows that this invention achieves a state-of-the-art performance of 88.52% on UCF-Crime, significantly outperforming traditional methods. This demonstrates that the proposed "boundary equilibrium" mechanism can effectively distinguish between "natural fluctuations in normal behavior" and "genuine anomalous disruption." The model no longer blindly pursues high response values but instead determines whether the current response disrupts the local equilibrium state, thereby fundamentally suppressing false alarms in complex environments.
[0057] (2) Representation capabilities beyond multimodal information: VadCLIP introduces an additional language text branch (RGB+Text) to assist in discrimination, aiming to align visual features using semantic priors. In contrast, the present invention, CDD-Net, achieves a higher AUC score using only a single RGB modality.
[0058] From a logical perspective, this indicates that under weak supervision, complex semantic alignment may introduce noise from the "cross-modal semantic gap." However, this invention directly captures the dynamic relationship between fragments and local reference distributions in visual space through "local payment modeling." This "adaptive reference" mechanism is more targeted and accurate than static text priors, ensuring consistent discrimination in extremely variable scenarios.
[0059] (3) Extreme accuracy in fixed scenarios: On the ShanghaiTech dataset, this invention achieved a high detection rate of 98.15%. This demonstrates that, under a fixed monitoring perspective, the boundary equilibrium residual defined in this invention can extremely sensitively capture minute behavioral pattern deviations (such as cycling or fighting in the teaching area), proving the universality of this mechanism at different spatiotemporal granularities.
[0060] (4) A generational leap in precision and efficiency: Experimental results clearly demonstrate that this invention, with its extremely lightweight architecture, achieves comprehensive performance suppression of the latest top-tier algorithms of 2025. Compared to ProDisc-VAD (2025): This method, as a prototype discriminative frontier technology proposed in 2025, achieved high accuracy of 97.98% and 87.12% on two datasets, respectively. However, this invention (CDD-Net), with only about 1 / 48 of the parameter count, not only surpasses it in accuracy but also outperforms it by 1.4% on UCF-Crime. Compared to DSIB-Net (2025): DSIB-Net is a heavy-duty detection network built using the information bottleneck theory, achieving an extremely high level of 98.13% on ShanghaiTech. This invention, through a "boundary balance guidance" mechanism, maintains its leading accuracy (98.15%) with an extremely small parameter overhead of 0.526M and exhibits stronger robustness in the more complex UCF-Crime scenario (88.52% vs. 87.65%).
[0061] 3. In-depth analysis of ablation experiments on core modules To verify the independent contribution of each innovative module in this invention to the overall performance, ablation experiments were conducted on the UCF-Crime dataset, and the results are shown in Table 2 below: Table 2: Ablation Experiment Results of Core Module (AUC / %)
[0062] The following is an in-depth analysis of the ablation experiment results: (1) The corrective role of the strategy evolution mechanism: After adding "local payment modeling," the AUC improved by 1.72%. This indicates that the initial linear discriminator is susceptible to drift due to the quality of video features. By introducing normal / abnormal payment reference vectors, the model obtains a "dynamic baseline." When segment features generate random noise, the policy update process can automatically correct the instantaneous discrimination results using global statistical information, enhancing the stability of the discrimination.
[0063] (2) The core value of boundary equilibrium residuals: The introduction of a boundary equilibrium estimator further boosted performance by 2.29%. This is the core contribution of this invention. Experimental results clearly demonstrate that relying solely on "probabilistic prediction" is insufficient; it is essential to quantitatively analyze the "strength of boundary violation" by calculating the policy residuals.
[0064] This mechanism enables the model to automatically suppress abnormal scores with low residuals when faced with normal fluctuations that "look like anomalies but do not disrupt local equilibrium," thereby achieving a second leap in anomaly localization accuracy.
[0065] 4. Comparison of complexity of independent models To further verify the deployment value and technological advancement of this invention in real-world industrial scenarios, this embodiment conducts a specific comparative analysis of the algorithm's lightweight level. Considering that security monitoring terminals (such as edge-side smart cameras and embedded SOC chips) are typically subject to strict limitations in terms of video memory capacity and physical storage space, model complexity and storage scale are core indicators for measuring whether an algorithm can be implemented in the front end.
[0066] Therefore, this embodiment selects the classic benchmark algorithm RTFM and the currently leading heavyweight multimodal algorithm VadCLIP in the field of video anomaly detection as representative benchmarks. By quantitatively comparing the CDD-Net proposed in this invention with the aforementioned benchmark algorithms in two key dimensions—parameters and model file size—this aims to demonstrate that the present invention achieves high-precision anomaly detection while minimizing hardware resource consumption. The specific comparison results are shown in Table 3 below: Table 3: Comparison of Complexity of Mainstream Algorithm Models
[0067] Based on the experimental data in Table 3, the technological advancement of this invention can be analyzed in depth from the following three dimensions: (1) The value of drastic optimization of storage scale and strategic deployment: Experimental results show that this invention achieves a generational breakthrough in model storage efficiency. Compared to VadCLIP, the current industry-leading multimodal benchmark algorithm (whose model file is as large as 619.1MB), this invention, through a boundary balancing guidance mechanism, compresses the model file to an extreme of 2.016MB. The storage requirement of this invention is only about 1 / 307 of VadCLIP; even compared to the traditional heavyweight algorithm RTFM (94.3MB) without multimodal branches, the size of this invention is only 1 / 46.
[0068] In real-world smart security scenarios, the flash memory space of front-end smart cameras is typically only 4MB to 8MB. The extremely lightweight nature of this invention allows high-precision algorithms to reside directly in the internal storage of the camera chip, completely solving the pain point that existing algorithms must rely on expensive back-end GPU servers to run.
[0069] (2) The deep decoupling between parameter size and characterization efficiency: In terms of parameter count, this invention achieves the design goal of "simplicity over complexity." Using only 0.526M parameters, it surpasses the detection accuracy of VadCLIP (35.17M) and RTFM (24.71M). This deep decoupling of parameter size from representational capability strongly demonstrates that the "evolutionary strategy encoding" logic proposed in this invention is more efficient than traditional methods that brute-force stack network depth or introduce complex multimodal features. This invention can directly decouple the evolutionary trend of system stability from low-dimensional features, thereby capturing the dynamic essence of video anomalies with minimal computational load.
[0070] (3) Substantial technological progress supported by extremely high energy efficiency ratio: Based on the performance and efficiency data above (as seen in Tables 1 and 3), this invention achieves higher AUC detection accuracy (88.52% compared to 88.02%) while significantly reducing the number of model parameters (to approximately 1 / 66) and storage space (to approximately 1 / 307). This technical performance of "increasing accuracy without decreasing it, and exponentially reducing resource consumption" fully demonstrates that this invention has significant substantive features and remarkable technological progress compared to existing technologies. It meets the urgent needs of the security field for real-time performance, low cost, and large-scale edge deployment, and has extremely high industrial application thresholds and commercial closed-loop value.
[0071] 5. Assessment of Industrial Deployment Efficiency and Implementation Potential (1) High energy efficiency under a minimalist architecture: At the algorithm engineering level, this invention achieves a "golden ratio" of 0.526M parameters and 88.52% high accuracy.
[0072] Comparative analysis: Currently, mainstream Transformer-based detection models typically have tens or even hundreds of megabytes of parameters. This invention replaces the complex multi-branch fusion structure with "single-stream probabilistic strategy encoding," reducing the number of model parameters by more than 10 times. For intelligent monitoring networks requiring large-scale deployment, this means that real-time inference speeds exceeding 30 FPS can be achieved on existing edge-side NPUs (embedded neural network processors) without upgrading backend servers.
[0073] (2) The strategic significance of ultra-lightweight storage: The 2.016MB model size has profound engineering value. In the security industry, many front-end smart cameras have limited Flash storage space (typically only 8MB or 16MB). The algorithm of this invention can not only be easily loaded into memory, but also reserve sufficient space for storing logs or other business logic, greatly improving the system's integration.
[0074] (3) Explainability helps close the business loop: The boundary residuals output by this invention have clear physical meaning, quantifying the stability of the system state. In practical applications, security personnel can set up tiered early warning mechanisms based on changing trends: small fluctuations are automatically filtered out, while drastic residual jumps trigger high-priority alarms. This early warning logic based on "physical state change" is easier for industry users to understand and accept than early warnings based on "black box scores."
[0075] 6. Experimental Conclusions In summary, the boundary equilibrium guidance method proposed in this invention not only surpasses existing state-of-the-art technologies in all aspects of academic indicators, but also demonstrates significant advantages in terms of algorithm architecture simplicity, deployment economy, and the interpretability of the discrimination logic. It represents a significant technological upgrade in the WVAD field.
[0076] Compared with existing technologies, this invention has significant novelty and inventiveness. Its core innovations and beneficial effects are summarized as follows: 1. A fundamental shift in modeling perspective: from "saliency mining" to "boundary equilibrium assessment".
[0077] Existing technical limitations: Traditional weakly supervised video anomaly detection (WVAD) mainly follows the logic of "anomaly = statistical outlier," focusing excessively on how to enhance the saliency of anomalous segments. This makes the model prone to misclassifying "natural fluctuations" such as sudden changes in lighting, crowd fluctuations, and camera shake as anomalies, resulting in a large number of false positives.
[0078] Innovation of this invention: This invention is the first to propose modeling from the perspective of "whether the boundary is violated" rather than "whether the anomaly is significant". By introducing a "boundary equilibrium evaluator", fragment discrimination is modeled as a process of probabilistic policy evolution and equilibrium state shift.
[0079] Technical Results: This innovation effectively overcomes the "ambiguity of normal boundaries" commonly found in real-world surveillance scenarios. Experiments show that this invention can accurately distinguish between natural fluctuations in normal behavior and genuine abnormal damage, significantly reducing false alarm rates in complex scenarios such as UCF-Crime, and achieving a leading AUC performance of 88.52%.
[0080] 2. Highly efficient single-stream strategy coding architecture: balancing network simplicity with discrimination stability.
[0081] Existing technical limitations: Most advanced methods rely on complex multi-branch structures or heavy Transformer modules to capture spatiotemporal relationships, which not only leads to a surge in the number of parameters, but also easily causes semantic separation between "normal branches" and "abnormal branches".
[0082] The innovation of this invention lies in its design of a single-flow probabilistic policy encoder. By constructing a symmetric binary policy representation, it achieves unified encoding of positive and abnormal states while maintaining the single-flow nature of the network structure. Simultaneously, it incorporates dynamically updated local payment reference vectors to perform policy updates.
[0083] Technical benefits: This design avoids parameter redundancy caused by additional parallel branches. During the inference phase, the model can use the global statistical information (payment reference vector) accumulated during training to "adaptively correct" instantaneous judgments, greatly improving the robustness and consistency of the judgments.
[0084] 3. Refined directional boundary energy constraints: Explicitly differentiate between "pseudo-anomalies" and "true anomalies" statistically.
[0085] Limitations of existing technologies: Existing weakly supervised methods mostly use video-level cross-entropy or ranking loss, which lack explicit constraints on the evolution direction of segment-level boundaries and are difficult to handle normal segments that "look like anomalies" (i.e. pseudo-anomalies).
[0086] The innovation of this invention is that it constructs a directional boundary energy and designs directional equilibrium polarization loss and cross-packet equilibrium dominance loss accordingly.
[0087] Technical effects: It forces normal videos to maintain a low-energy state, preventing boundary disruptions towards the anomaly direction; through global comparison, it ensures that the key boundary responses of the anomaly video statistically absolutely suppress the highest pseudo-anomaly peak in the normal video. This refined constraint mechanism provides a clear boundary decision space for anomaly localization under weak supervision.
[0088] 4. Ultimate industrial application potential: Deep integration of extremely low parameter quantity and superior performance.
[0089] Limitations of existing technology: High-performance models are often bulky and difficult to deploy in security front-end devices (such as smart cameras) with limited computing power.
[0090] Innovation of this invention: Thanks to the single-stream architecture and lightweight strategy coding logic, this invention controls the number of model parameters to 0.526M and the model file size to only 2.016MB.
[0091] Technical Impact: This metric demonstrates strong industrial competitiveness. The model can be directly stored in the on-chip flash memory of embedded devices, supporting real-time inference at low-power edge devices. This means that the invention not only leads in academic metrics but also possesses the technical advantage of extremely low-cost, large-scale deployment, directly driving the intelligent upgrade of smart security systems.
[0092] 5. Intuitive interpretability: Provides physical evidence for anomaly attribution. Existing technical shortcomings: Traditional deep learning models are mostly "black box" models, and the abnormal scores they give lack logical support, making it difficult to gain the trust of business personnel in security practice.
[0093] Innovation of this invention: The boundary residual index output by this invention has a clear physical meaning, namely, "the intensity of the disruption of the equilibrium distribution by the current state".
[0094] Technical effect: Through visualized curves, security personnel can intuitively see the evolution of video footage from "equilibrium and stability" to "boundary instability." This output method, based on system dynamics logic, provides clear and reliable evidence for the post-event tracing and judgment of abnormal events.
[0095] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0096] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0097] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.
Claims
1. A weakly supervised video anomaly detection method based on boundary equalization guidance, characterized in that, The method includes the following steps: Step 1: Construct a prediction model based on the feature extraction module, probabilistic strategy encoding module, local payment modeling module, boundary equilibrium evaluation module, and fusion prediction module; input the original video stream into the feature extraction module, and use the pre-trained feature extractor to extract features to obtain a global feature sequence; Step 2: Input the global feature sequence into the probabilistic policy encoding module. Map the fragment features in the global feature sequence to hidden representations through a lightweight backbone network. Based on the hidden representations, obtain the basic discriminative response values using a linear layer and convert the basic discriminative response values into the initial probabilistic policy. Step 3: Construct two types of payment reference vectors, normal and abnormal. Use the local payment modeling module to calculate the local payment of the current feature segment in the global feature sequence for the two types of payment reference vectors, and perform a single-step policy update in combination with the initial probability policy to obtain a hybrid discrimination policy. Step 4: Based on the hybrid discrimination strategy and local payment, calculate the strategy weighted average payment using the boundary equilibrium evaluation module, define the strategy residual vector based on the strategy weighted average payment, and calculate the boundary residual; Step 5: Input the basic discrimination response value, the hybrid discrimination strategy after game evolution, and the boundary residual into the fusion prediction module. Extract the anomaly direction term from the hybrid discrimination strategy and perform smoothing gating processing on the boundary residual to obtain the boundary gating term. Then fuse the basic discrimination response value, the anomaly direction term, and the boundary gating term to obtain the anomaly score. Construct a loss function based on the boundary residual and the anomaly score to jointly optimize the prediction model and obtain the optimized prediction model. Use the optimized prediction model to make predictions and obtain the final anomaly score. Determine the final detection result based on the final anomaly score.
2. The weakly supervised video anomaly detection method based on boundary equalization guidance according to claim 1, characterized in that, In step 1, the original video stream is input into the feature extraction module, and a pre-trained feature extractor is used to extract features to obtain a global feature sequence. The corresponding relationship in the process is as follows: ; in, Represents the global feature sequence. This represents the feature vector of the first segment. Indicates the total number of segments is eigenvectors, Indicates the first Feature vectors of each segment Indicates feature dimension as A set of.
3. The weakly supervised video anomaly detection method based on boundary equalization guidance according to claim 2, characterized in that, In step 2, the global feature sequence is input into the probabilistic policy encoding module. A lightweight backbone network maps the segment features in the global feature sequence into hidden representations. Based on the hidden representations, a linear layer is used to obtain the basic discriminative response values, and the basic discriminative response values are transformed into an initial probabilistic policy. Specifically, this includes the following steps: The global feature sequence is input into the probabilistic policy encoding module, and the fragment features in the global feature sequence are projected into the latent space through the linear layer in the lightweight backbone network to obtain the latent representation; Based on implicit representation, the basic discriminative response value is obtained using a linear layer; The basic discriminative response values are expanded and concatenated into a symmetric binary policy representation; Based on the symmetric binary policy representation, the initial probability policy is obtained through the softmax function.
4. The weakly supervised video anomaly detection method based on boundary equalization guidance according to claim 3, characterized in that, The latent representation is obtained by projecting fragment features from the global feature sequence into the latent space through linear layers in a lightweight backbone network. The corresponding relationship in this process is as follows: ; in, The implicit representation of a fragment. This represents a function to randomly discard items. This indicates a modified linear unit activation function. This represents the weight matrix of the linear layer. This represents the bias term of the linear layer; In the step of obtaining the basic discriminative response value using a linear layer based on implicit representation, the corresponding relationship in the process is as follows: ; in, Indicates the basic discrimination response value. This represents the first parameter in the linear layer that serves as the discriminant layer. This represents the second parameter in the linear layer that serves as the discriminant layer; In the step of expanding and concatenating the basic discriminative response values into a symmetric binary policy representation, the corresponding relationship in the process is as follows: ; in, Representing a symmetric binary strategy. Indicates a splicing operation; In the step of obtaining the initial probabilistic policy through the softmax function in the symmetric binary policy representation, the corresponding relationship in the process is as follows: ; in, Indicates the initial probability policy. Indicates the initial normal probability. Indicates the initial anomaly probability. This represents the softmax function.
5. The weakly supervised video anomaly detection method based on boundary equalization guidance according to claim 4, characterized in that, In step 3, two types of payment reference vectors, normal and abnormal, are constructed. The local payment modeling module is used to calculate the local payment of the current feature segment in the global feature sequence for the two types of payment reference vectors, and a single-step policy update is performed in conjunction with the initial probability policy to obtain a hybrid discrimination policy. Specifically, the steps are as follows: Construct normal reference vectors and abnormal reference vectors, and use exponential moving average to update the normal reference vectors and abnormal reference vectors to obtain updated normal reference vectors and updated abnormal reference vectors. Using the local payment modeling module, the local payment is calculated relative to the updated normal reference vector and the updated abnormal reference vector for the current feature segment in the global feature sequence; Based on the local payment of the updated normal reference vector and the updated abnormal reference vector, a single-step policy update is performed in conjunction with the initial probability policy to obtain a hybrid discrimination policy.
6. The weakly supervised video anomaly detection method based on boundary equalization guidance according to claim 5, characterized in that, The relationship between calculating the local payoff of the current feature segment in the global feature sequence and the updated normal reference vector and the updated abnormal reference vector is as follows: ; in, This represents the updated normal reference vector. Represents the momentum factor. This represents the normal reference vector before the update. This represents the feature set of normal videos in the batch. Indicates the number of elements in the set. Represents a single feature vector in the feature set. This represents the updated anomaly reference vector. This represents the anomalous reference vector before the update. This represents the feature set of abnormal videos in the batch. Indicates the normal reference vector. Represents the abnormal reference vector; In the step of calculating the local payment for the current feature segment in the global feature sequence using the local payment modeling module, the corresponding process has the following relationship: ; in, This represents the local payoff between the updated abnormal reference vector and the updated normal reference vector. This represents the cosine similarity between the current segment and the normal baseline. This represents the cosine similarity between the current segment and the abnormal baseline. Represents the cosine function; In the process of local payment based on the updated abnormal reference vector and the updated normal reference vector, combined with the initial probability policy to perform a single-step policy update to obtain the hybrid discrimination policy, the corresponding relationship is as follows: ; in, Indicates a hybrid discrimination strategy. This represents element-wise multiplication. Represents an exponential function. This represents the learnable, updated temperature coefficient. This represents the L1 norm.
7. The weakly supervised video anomaly detection method based on boundary equalization guidance according to claim 6, characterized in that, In step 4, based on the hybrid discrimination strategy and local payment, the strategy-weighted average payment is calculated using the boundary equilibrium evaluation module. Based on the strategy-weighted average payment, a strategy residual vector is defined, and the boundary residual is calculated. The corresponding relationship in this process is as follows: ; in, This indicates a strategy-weighted average payment. This indicates that the hybrid discrimination strategy is transposed. This indicates the transpose operation. Represents the policy residual vector. Represents a vector consisting entirely of 1s. Represents the boundary residual. Describing the L2 norm, The first term represents the hybrid discrimination strategy. Each strategy component The local payoff for the updated abnormal reference vector and the updated normal reference vector is represented by the first... Each payment component.
8. The weakly supervised video anomaly detection method based on boundary equalization guidance according to claim 7, characterized in that, In step 5, the basic discriminant response value, the hybrid discriminant strategy after game evolution, and the boundary residual are input into the fusion prediction module. Anomaly direction terms are extracted from the hybrid discriminant strategy, and smoothing gating is performed on the boundary residuals to obtain boundary gating terms. Then, the basic discriminant response value, anomaly direction terms, and boundary gating terms are fused to obtain anomaly scores. Specifically, this includes the following sub-steps: The basic discrimination response value, the hybrid discrimination strategy after game evolution, and the boundary residual are input into the fusion prediction module. The abnormal direction term is extracted from the hybrid discrimination strategy. The corresponding relationship in the process is as follows: ; in, Indicates an abnormal direction item. Indicates the weight of the outlier component in the hybrid discrimination strategy; The boundary residuals are smoothed and gated using the hyperbolic tangent function to obtain the boundary gate term. The corresponding relationship is as follows: ; in, Indicates boundary gating terms, Represents the hyperbolic tangent function. Represents the learnable gating coefficient; The basic discriminant response value, anomaly direction term, and boundary gating term are weighted and fused, and then fused again using the sigmoid activation function to obtain the anomaly score. The corresponding relationship in this process is as follows: ; in, This represents the final response value after fusion. , These represent two different learnable fusion coefficients. Indicates the first The abnormal score of each segment.
9. The weakly supervised video anomaly detection method based on boundary equalization guidance according to claim 8, characterized in that, A loss function is constructed based on the boundary residuals and outlier scores to jointly optimize the prediction model, resulting in an optimized prediction model. The specific steps include the following: Construct a video-level cross-entropy loss function based on anomaly scores; Based on the boundary residuals and outlier scores, a directional equilibrium polarization loss function is constructed. The corresponding relationship in the process is as follows: ; in, This represents the directional equilibrium polarization loss function. This represents a collection of normal videos. This represents a collection of abnormal videos. This refers to the Softplus function. Indicates the first The arithmetic mean of the segment-level directional boundary energy within a normal video. This represents the preset positive boundary energy threshold. This represents the operation of calculating the mean of a preset number of elements with the largest values in the input sequence. Indicates the first Directed boundary energy sequences of each segment within an abnormal video; Construct a cross-package equilibrium dominance loss function based on boundary residuals and outlier scores; The prediction model is jointly optimized using the video-level cross-entropy loss function, the directional equalization polarization loss function, and the cross-packet equalization dominance loss function to obtain the optimized prediction model.
10. A weakly supervised video anomaly detection system based on boundary equalization guidance, characterized in that, The system employs the weakly supervised video anomaly detection method based on boundary equalization guidance as described in any one of claims 1-9, and the system comprises: Extraction module, used for: The prediction model is composed of a feature extraction module, a probabilistic strategy encoding module, a local payment modeling module, a boundary equilibrium evaluation module, and a fusion prediction module. The original video stream is input into the feature extraction module, and a pre-trained feature extractor is used to extract features to obtain a global feature sequence. Encoding module, used for: The global feature sequence is input into the probabilistic policy encoding module. The fragment features in the global feature sequence are mapped to hidden representations through a lightweight backbone network. Based on the hidden representations, the basic discriminative response values are obtained using linear layers and then converted into the initial probabilistic policy. The modeling module is used for: Two types of payment reference vectors, normal and abnormal, are constructed. The local payment modeling module is used to calculate the local payment of the current feature segment in the global feature sequence for the two types of payment reference vectors, and a single-step policy update is performed in combination with the initial probability policy to obtain a hybrid discrimination policy. The evaluation module is used for: Based on the hybrid discrimination strategy and local payment, the strategy weighted average payment is calculated using the boundary equilibrium evaluation module. Based on the strategy weighted average payment, the strategy residual vector is defined, and the boundary residual is calculated. The prediction module is used for: The basic discrimination response value, the hybrid discrimination strategy evolved from the game, and the boundary residuals are input into the fusion prediction module. Anomaly direction terms are extracted from the hybrid discrimination strategy and smoothed by gating the boundary residuals to obtain boundary gating terms. The basic discrimination response value, anomaly direction terms, and boundary gating terms are then fused to obtain anomaly scores. A loss function is constructed based on the boundary residuals and anomaly scores to jointly optimize the prediction model, resulting in an optimized prediction model. The optimized prediction model is then used for prediction to obtain the final anomaly score, and the final detection result is determined based on the final anomaly score.