{"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/anomalybert-self-supervised-transformer-for","title":"AnomalyBERT: Self-Supervised Transformer for Time Series Anomaly Detection using Data Degradation Scheme","arxiv_id":"2305.04468","date":"2023-05-08","proceeding":null,"authors":["Yungi Jeong","Eunseok Yang","Jung Hyun Ryu","Imseong Park","Myungjoo Kang"],"abstract":"Mechanical defects in real situations affect observation values and cause abnormalities in multivariate time series, such as sensor values or network data. To perceive abnormalities in such data, it is crucial to understand the temporal context and interrelation between variables simultaneously. The anomaly detection task for time series, especially for unlabeled data, has been a challenging problem, and we address it by applying a suitable data degradation scheme to self-supervised model training. We define four types of synthetic outliers and propose the degradation scheme in which a portion of input data is replaced with one of the synthetic outliers. Inspired by the self-attention mechanism, we design a Transformer-based architecture to recognize the temporal context and detect unnatural sequences with high efficiency. Our model converts multivariate data points into temporal representations with relative position bias and yields anomaly scores from these representations. Our method, AnomalyBERT, shows a great capability of detecting anomalies contained in complex time series and surpasses previous state-of-the-art methods on five real-world benchmarks. Our code is available at https://github.com/Jhryu30/AnomalyBERT.","url_abs":"https://arxiv.org/abs/2305.04468v1","url_pdf":"https://arxiv.org/pdf/2305.04468v1.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":"anomalybert-self-supervised-transformer-for","repo_url":"https://github.com/jhryu30/anomalybert","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"anomaly-detection","task_name":"Anomaly Detection"},{"task_slug":"time-series-1","task_name":"Time Series"},{"task_slug":"time-series-anomaly-detection","task_name":"Time Series Anomaly Detection"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2305.04468","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2305.04468"}},"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":"deterministic:regex_extraction","url":"https://github.com/Jhryu30/AnomalyBERT","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/jhryu30/anomalybert","reach":null}],"summary":{"ran":1,"ran_draft_wrong":1},"by_repo_kind":{"official":{"samples":2,"ran":2,"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":2,"samples":[{"code_sha256_prefix":"85d5e5dbb6db1438","entry":"AnomalyTransformer","repo":"jhryu30/anomalybert","repo_kind":"official","path":"models/anomaly_transformer.py","file_url":"https://github.com/jhryu30/anomalybert/blob/HEAD/models/anomaly_transformer.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":"85d5e5dbb6db1438"}},{"code_sha256_prefix":"afd9fe5a924fcb74","entry":"estimate","repo":"Jhryu30/AnomalyBERT","repo_kind":"official","path":"estimate.py","file_url":"https://github.com/Jhryu30/AnomalyBERT/blob/HEAD/estimate.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"afd9fe5a924fcb74"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}