{"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/deep-generative-model-with-hierarchical","title":"Deep Generative model with Hierarchical Latent Factors for Time Series Anomaly Detection","arxiv_id":"2202.07586","date":"2022-02-15","proceeding":null,"authors":["Cristian Challu","Peihong Jiang","Ying Nian Wu","Laurent Callot"],"abstract":"Multivariate time series anomaly detection has become an active area of research in recent years, with Deep Learning models outperforming previous approaches on benchmark datasets. Among reconstruction-based models, most previous work has focused on Variational Autoencoders and Generative Adversarial Networks. This work presents DGHL, a new family of generative models for time series anomaly detection, trained by maximizing the observed likelihood by posterior sampling and alternating back-propagation. A top-down Convolution Network maps a novel hierarchical latent space to time series windows, exploiting temporal dynamics to encode information efficiently. Despite relying on posterior sampling, it is computationally more efficient than current approaches, with up to 10x shorter training times than RNN based models. Our method outperformed current state-of-the-art models on four popular benchmark datasets. Finally, DGHL is robust to variable features between entities and accurate even with large proportions of missing values, settings with increasing relevance with the advent of IoT. We demonstrate the superior robustness of DGHL with novel occlusion experiments in this literature. Our code is available at https://github.com/cchallu/dghl.","url_abs":"https://arxiv.org/abs/2202.07586v2","url_pdf":"https://arxiv.org/pdf/2202.07586v2.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":"deep-generative-model-with-hierarchical","repo_url":"https://github.com/cchallu/dghl","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"anomaly-detection","task_name":"Anomaly Detection"},{"task_slug":"missing-values","task_name":"Missing Values"},{"task_slug":"time-series-1","task_name":"Time Series"},{"task_slug":"time-series","task_name":"Time Series Analysis"},{"task_slug":"time-series-anomaly-detection","task_name":"Time Series Anomaly Detection"}],"methods":[{"method_slug":"convolution","method_name":"Convolution"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2202.07586","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2202.07586"}},"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/cchallu/dghl","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"unverified":9},"by_repo_kind":{"official":{"samples":9,"ran":0,"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":"1b878bb336dd7f23","entry":"basic_mc","repo":"cchallu/dghl","repo_kind":"official","path":"src/run_dghl.py","file_url":"https://github.com/cchallu/dghl/blob/HEAD/src/run_dghl.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1b878bb336dd7f23"}},{"code_sha256_prefix":"8e74acf865a526e6","entry":"basic_mc","repo":"cchallu/dghl","repo_kind":"official","path":"src/run_dghl_encoder.py","file_url":"https://github.com/cchallu/dghl/blob/HEAD/src/run_dghl_encoder.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8e74acf865a526e6"}},{"code_sha256_prefix":"06d6fbe636976a01","entry":"de_unfold","repo":"cchallu/dghl","repo_kind":"official","path":"src/utils/utils.py","file_url":"https://github.com/cchallu/dghl/blob/HEAD/src/utils/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"06d6fbe636976a01"}},{"code_sha256_prefix":"93baef73fc0030f8","entry":"f1_score","repo":"cchallu/dghl","repo_kind":"official","path":"src/utils/utils.py","file_url":"https://github.com/cchallu/dghl/blob/HEAD/src/utils/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"93baef73fc0030f8"}},{"code_sha256_prefix":"4e028d15677dddee","entry":"get_random_occlusion_mask","repo":"cchallu/dghl","repo_kind":"official","path":"src/utils/utils_data.py","file_url":"https://github.com/cchallu/dghl/blob/HEAD/src/utils/utils_data.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"4e028d15677dddee"}},{"code_sha256_prefix":"76419d3a75ab871a","entry":"kl_multivariate_gaussian","repo":"cchallu/dghl","repo_kind":"official","path":"src/utils/utils.py","file_url":"https://github.com/cchallu/dghl/blob/HEAD/src/utils/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"76419d3a75ab871a"}},{"code_sha256_prefix":"bb30cd2f51702968","entry":"load_nasa","repo":"cchallu/dghl","repo_kind":"official","path":"src/utils/utils_data.py","file_url":"https://github.com/cchallu/dghl/blob/HEAD/src/utils/utils_data.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"bb30cd2f51702968"}},{"code_sha256_prefix":"e466e4669c19f99b","entry":"load_smd","repo":"cchallu/dghl","repo_kind":"official","path":"src/utils/utils_data.py","file_url":"https://github.com/cchallu/dghl/blob/HEAD/src/utils/utils_data.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e466e4669c19f99b"}},{"code_sha256_prefix":"20cec477742f30a3","entry":"smd_load_scores","repo":"cchallu/dghl","repo_kind":"official","path":"src/utils/utils_evaluation.py","file_url":"https://github.com/cchallu/dghl/blob/HEAD/src/utils/utils_evaluation.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"20cec477742f30a3"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}