{"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/hierarchical-gaussian-mixture-normalizing","title":"Hierarchical Gaussian Mixture Normalizing Flow Modeling for Unified Anomaly Detection","arxiv_id":"2403.13349","date":"2024-03-20","proceeding":null,"authors":["Xincheng Yao","Ruoqi Li","Zefeng Qian","Lu Wang","Chongyang Zhang"],"abstract":"Unified anomaly detection (AD) is one of the most challenges for anomaly detection, where one unified model is trained with normal samples from multiple classes with the objective to detect anomalies in these classes. For such a challenging task, popular normalizing flow (NF) based AD methods may fall into a \"homogeneous mapping\" issue,where the NF-based AD models are biased to generate similar latent representations for both normal and abnormal features, and thereby lead to a high missing rate of anomalies. In this paper, we propose a novel Hierarchical Gaussian mixture normalizing flow modeling method for accomplishing unified Anomaly Detection, which we call HGAD. Our HGAD consists of two key components: inter-class Gaussian mixture modeling and intra-class mixed class centers learning. Compared to the previous NF-based AD methods, the hierarchical Gaussian mixture modeling approach can bring stronger representation capability to the latent space of normalizing flows, so that even complex multi-class distribution can be well represented and learned in the latent space. In this way, we can avoid mapping different class distributions into the same single Gaussian prior, thus effectively avoiding or mitigating the \"homogeneous mapping\" issue. We further indicate that the more distinguishable different class centers, the more conducive to avoiding the bias issue. Thus, we further propose a mutual information maximization loss for better structuring the latent feature space. We evaluate our method on four real-world AD benchmarks, where we can significantly improve the previous NF-based AD methods and also outperform the SOTA unified AD methods.","url_abs":"https://arxiv.org/abs/2403.13349v2","url_pdf":"https://arxiv.org/pdf/2403.13349v2.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":"hierarchical-gaussian-mixture-normalizing","repo_url":"https://github.com/xcyao00/hgad","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"anomaly-detection","task_name":"Anomaly Detection"},{"task_slug":"multi-class-anomaly-detection","task_name":"Multi-class Anomaly Detection"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/multi-class-anomaly-detection-on-mvtec-ad","task":"Multi-class Anomaly Detection","dataset":"MVTec AD","model":"HGAD","rank_in_archive_order":7,"of":13,"metrics":{"Detection AUROC":"98.4","Segmentation AUROC":"97.9"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2403.13349","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2403.13349"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+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/xcyao00/hgad","reach":{"status":"ok"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/xcyao00/HGAD","reach":{"status":"ok"}}],"summary":{"ran":1,"unverified":2},"by_repo_kind":{"official":{"samples":3,"ran":1,"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":3,"samples":[{"code_sha256_prefix":"a7e2b063f1913a27","entry":"warmup_learning_rate","repo":"xcyao00/HGAD","repo_kind":"official","path":"utils.py","file_url":"https://github.com/xcyao00/HGAD/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a7e2b063f1913a27"}},{"code_sha256_prefix":"601a426815a800ff","entry":"onehot","repo":"xcyao00/HGAD","repo_kind":"official","path":"utils.py","file_url":"https://github.com/xcyao00/HGAD/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"601a426815a800ff"}},{"code_sha256_prefix":"3f068df64f534372","entry":"subnet_fc","repo":"xcyao00/HGAD","repo_kind":"official","path":"models/nf_model.py","file_url":"https://github.com/xcyao00/HGAD/blob/HEAD/models/nf_model.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3f068df64f534372"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}