All models

Transformer Hawkes Process (THP)

A self-attention model of event sequences in continuous time.

Time series · 194 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (17 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
21.2M
Operations
194
Framework
PyTorch
Recurrent
No
Published
ICML 2020
Cited by
136 (as of 24 October 2026)
Authors
Simiao Zuo, Haoming Jiang, Zichong Li and others
License
MIT
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m21044
Graph hash
a514325ff69e950c6e641f1235b1061af0c5ccfe699c8d2fb63406b01413cb08
Skeleton hash
0ac904b5134f4ece423fd2e3ba62f5cf02aa1c9d32c0712e5b7f92157973f456
Architecture hash
a2b4a8bf0c9bbbf118b7cb974e20dcf747d4686d1d130844a558653d9fddecb4
Diagram SHA-256
e6fe0e0b24864f7be58a41e3b50f951d6518e44e0eab292a1ff8432fa9715d45
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

The Transformer Hawkes Process (THP) is a point process model for event sequence data, the kind produced in social media, healthcare and financial markets. It uses self-attention where earlier neural point process models used recurrent networks, which the paper says fail to capture short-term and long-term temporal dependencies.

Each event gets a temporal encoding of its time stamp and an embedding of its event type, and the sequence then passes through the self-attention module. The attention is masked so that no position sees future positions. The hidden representations exist only at the discrete event time stamps, so the paper adds an interpolated continuous-time intensity function. That function uses a softplus, which keeps the intensity positive. Parameters are learned by maximizing the log-likelihood across all sequences.

The paper reports that, in experiments on various datasets, THP outperformed existing models in both likelihood and event prediction accuracy. It also gives an example in which THP learns multiple point processes together and gains prediction performance from their relational information. The released code adds an optional recurrent layer to its Transformer class.

Key idea. The paper proposes the Transformer Hawkes Process, a point process model that uses self-attention to capture long-term dependencies in event sequences while remaining computationally efficient.

  • transformer hawkes process
  • thp
  • temporal point process
  • hawkes process
  • event sequence
  • neural point process
  • event prediction
  • self-attention point process

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{zuo2021transformerhawkesprocess,
      title={Transformer Hawkes Process}, 
      author={Simiao Zuo and Haoming Jiang and Zichong Li and Tuo Zhao and Hongyuan Zha},
      year={2021},
      eprint={2002.09291},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/2002.09291}, 
}