{"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/transformer-hawkes-process","title":"Transformer Hawkes Process","arxiv_id":"2002.09291","date":"2020-02-21","proceeding":"ICML 2020 1","authors":["Simiao Zuo","Haoming Jiang","Zichong Li","Tuo Zhao","Hongyuan Zha"],"abstract":"Modern data acquisition routinely produce massive amounts of event sequence data in various domains, such as social media, healthcare, and financial markets. These data often exhibit complicated short-term and long-term temporal dependencies. However, most of the existing recurrent neural network based point process models fail to capture such dependencies, and yield unreliable prediction performance. To address this issue, we propose a Transformer Hawkes Process (THP) model, which leverages the self-attention mechanism to capture long-term dependencies and meanwhile enjoys computational efficiency. Numerical experiments on various datasets show that THP outperforms existing models in terms of both likelihood and event prediction accuracy by a notable margin. Moreover, THP is quite general and can incorporate additional structural knowledge. We provide a concrete example, where THP achieves improved prediction performance for learning multiple point processes when incorporating their relational information.","url_abs":"https://arxiv.org/abs/2002.09291v5","url_pdf":"https://arxiv.org/pdf/2002.09291v5.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":"transformer-hawkes-process","repo_url":"https://github.com/SimiaoZuo/Transformer-Hawkes-Process","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"transformer-hawkes-process","repo_url":"https://github.com/vladislavzh/cotic","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"transformer-hawkes-process","repo_url":"https://github.com/yangalan123/anhp-andtt","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"computational-efficiency","task_name":"Computational Efficiency"},{"task_slug":"point-processes","task_name":"Point Processes"},{"task_slug":"prediction","task_name":"Prediction"}],"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":"relu","method_name":"ReLU"},{"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":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2002.09291","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2002.09291"}},"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/yangalan123/anhp-andtt","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/vladislavzh/cotic","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/SimiaoZuo/Transformer-Hawkes-Process","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":1,"unverified":4},"by_repo_kind":{"official":{"samples":4,"ran":0,"repositories":1},"listed":{"samples":1,"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":0,"samples":[{"code_sha256_prefix":"8abbfdabbdf5e708","entry":"attention","repo":"yangalan123/anhp-andtt","repo_kind":"listed","path":"thp/thp_testing/model/xfmr.py","file_url":"https://github.com/yangalan123/anhp-andtt/blob/HEAD/thp/thp_testing/model/xfmr.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8abbfdabbdf5e708"}},{"code_sha256_prefix":"9f0d5b1b034631ff","entry":"compute_event","repo":"SimiaoZuo/Transformer-Hawkes-Process","repo_kind":"official","path":"Utils.py","file_url":"https://github.com/SimiaoZuo/Transformer-Hawkes-Process/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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9f0d5b1b034631ff"}},{"code_sha256_prefix":"255c7fc5631b2fe3","entry":"compute_integral_biased","repo":"SimiaoZuo/Transformer-Hawkes-Process","repo_kind":"official","path":"Utils.py","file_url":"https://github.com/SimiaoZuo/Transformer-Hawkes-Process/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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"255c7fc5631b2fe3"}},{"code_sha256_prefix":"5e95e556552625a6","entry":"get_subsequent_mask","repo":"SimiaoZuo/Transformer-Hawkes-Process","repo_kind":"official","path":"transformer/Models.py","file_url":"https://github.com/SimiaoZuo/Transformer-Hawkes-Process/blob/HEAD/transformer/Models.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5e95e556552625a6"}},{"code_sha256_prefix":"61d4401b78d08587","entry":"softplus","repo":"SimiaoZuo/Transformer-Hawkes-Process","repo_kind":"official","path":"Utils.py","file_url":"https://github.com/SimiaoZuo/Transformer-Hawkes-Process/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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"61d4401b78d08587"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}