{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/dual-memory-units-with-uncertainty-regulation","title":"Dual Memory Units with Uncertainty Regulation for Weakly Supervised Video Anomaly Detection","arxiv_id":"2302.05160","date":"2023-02-10","proceeding":null,"authors":["Hang Zhou","Junqing Yu","Wei Yang"],"abstract":"Learning discriminative features for effectively separating abnormal events from normality is crucial for weakly supervised video anomaly detection (WS-VAD) tasks. Existing approaches, both video and segment-level label oriented, mainly focus on extracting representations for anomaly data while neglecting the implication of normal data. We observe that such a scheme is sub-optimal, i.e., for better distinguishing anomaly one needs to understand what is a normal state, and may yield a higher false alarm rate. To address this issue, we propose an Uncertainty Regulated Dual Memory Units (UR-DMU) model to learn both the representations of normal data and discriminative features of abnormal data. To be specific, inspired by the traditional global and local structure on graph convolutional networks, we introduce a Global and Local Multi-Head Self Attention (GL-MHSA) module for the Transformer network to obtain more expressive embeddings for capturing associations in videos. Then, we use two memory banks, one additional abnormal memory for tackling hard samples, to store and separate abnormal and normal prototypes and maximize the margins between the two representations. Finally, we propose an uncertainty learning scheme to learn the normal data latent space, that is robust to noise from camera switching, object changing, scene transforming, etc. Extensive experiments on XD-Violence and UCF-Crime datasets demonstrate that our method outperforms the state-of-the-art methods by a sizable margin.","url_abs":"https://arxiv.org/abs/2302.05160v1","url_pdf":"https://arxiv.org/pdf/2302.05160v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"dual-memory-units-with-uncertainty-regulation","repo_url":"https://github.com/henrryzh1/UR-DMU","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"anomaly-detection","task_name":"Anomaly Detection"},{"task_slug":"video-anomaly-detection","task_name":"Video Anomaly Detection"},{"task_slug":"weakly-supervised-video-anomaly-detection","task_name":"Weakly-supervised Video Anomaly Detection"}],"methods":[{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/weakly-supervised-video-anomaly-detection-on","task":"Weakly-supervised Video Anomaly Detection","dataset":"ShanghaiTech Weakly Supervised","model":"DMU","rank_in_archive_order":5,"of":16,"metrics":{"AUC-ROC":"97.57"},"uses_additional_data":false},{"leaderboard":"/sota/weakly-supervised-video-anomaly-detection-on-1","task":"Weakly-supervised Video Anomaly Detection","dataset":"UBnormal","model":"DMU","rank_in_archive_order":10,"of":11,"metrics":{"AUC-ROC":"59.91"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2302.05160","atlas_url":"https://app.syntology.ai/?focus=2302.05160","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2302.05160"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/henrryzh1/UR-DMU","reach":null}],"summary":{"ran":6,"ran_honours":1},"by_repo_kind":{"official":{"samples":7,"ran":7,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"6eb1cd66063dfaf2","entry":"ADCLS_head","repo":"henrryzh1/UR-DMU","repo_kind":"official","path":"model.py","file_url":"https://github.com/henrryzh1/UR-DMU/blob/HEAD/model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6eb1cd66063dfaf2"}},{"code_sha256_prefix":"aa81f706d91cb317","entry":"Attention","repo":"henrryzh1/UR-DMU","repo_kind":"official","path":"model.py","file_url":"https://github.com/henrryzh1/UR-DMU/blob/HEAD/model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"aa81f706d91cb317"}},{"code_sha256_prefix":"b7bb6a554cfa451a","entry":"Memory_Unit","repo":"henrryzh1/UR-DMU","repo_kind":"official","path":"model.py","file_url":"https://github.com/henrryzh1/UR-DMU/blob/HEAD/model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b7bb6a554cfa451a"}},{"code_sha256_prefix":"537d0af038296857","entry":"Temporal","repo":"henrryzh1/UR-DMU","repo_kind":"official","path":"model.py","file_url":"https://github.com/henrryzh1/UR-DMU/blob/HEAD/model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"537d0af038296857"}},{"code_sha256_prefix":"59707b55a4ff0dc8","entry":"Transformer","repo":"henrryzh1/UR-DMU","repo_kind":"official","path":"model.py","file_url":"https://github.com/henrryzh1/UR-DMU/blob/HEAD/model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"59707b55a4ff0dc8"}},{"code_sha256_prefix":"8a67026cd1770a13","entry":"WSAD","repo":"henrryzh1/UR-DMU","repo_kind":"official","path":"model.py","file_url":"https://github.com/henrryzh1/UR-DMU/blob/HEAD/model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8a67026cd1770a13"}},{"code_sha256_prefix":"21d247685c39adc6","entry":"norm","repo":"henrryzh1/UR-DMU","repo_kind":"official","path":"model.py","file_url":"https://github.com/henrryzh1/UR-DMU/blob/HEAD/model.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"21d247685c39adc6"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}