All models

SurvTRACE

Transformer over patient covariates that predicts discrete-time hazards for single or competing events.

Tabular and recommender · 67 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 (46 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
26.3K
Operations
67
Framework
PyTorch
Recurrent
No
Published
ACM-BCB 2022
Cited by
131 (as of 26 November 2026)
Authors
Zifeng Wang, Jimeng Sun
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
m20669
Graph hash
1c841f728f3c2e5d030e1a4dd02ff940845e15fadc4255f88dcd88c8c1af4ece
Skeleton hash
fcfc887fcd43bf1ff6710b1a8127d908cff273a15549cdd34e5e701dc39e1a5a
Architecture hash
a48b43684d772d4ae81aebd576bc003983ca4f8ef525e2f7cd137245bb486464
Diagram SHA-256
41d40093dc1213b0ac5b569ff10bf56bd9ec5dac5464111e0093509d79309753
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

SurvTRACE is a transformer for survival analysis, which in medicine studies the time duration to events of interest such as mortality. The paper proposes it as a model that makes no assumption about the underlying survival distribution and can handle competing events, such as multiple disease diagnoses.

The input is a row of patient covariates, numerical and discrete, encoded through two embedding matrices. Multi-head self-attention then lets the covariate embeddings interact, so that feature combinations are learned instead of engineered by hand. The encoder builds a shared representation that serves all downstream tasks. Cause-specific sub-networks attached to it perform the hazard prediction, one per event, over a set of discrete time points.

Two training ideas accompany the architecture. A learning method based on inverse propensity score (IPS) addresses the selection bias in survival data with competing risks, and multiple auxiliary tasks are designed for multi-task learning so the transformer can be trained from scratch. The paper's large-scale test uses SEER data on 476,746 patients, with breast cancer and heart diseases treated as two competing events and 18 covariates. On METABRIC, SUPPORT and SEER the paper reports that SurvTRACE outperformed its baselines. The code repository's function list marks single event and competing events survival analysis as done and multi-task learning as not yet done.

Key idea. SurvTRACE applies a transformer encoder over covariate embeddings to survival analysis with competing events, with inverse-propensity debiasing and auxiliary tasks for multi-task training.

  • SurvTRACE
  • survival analysis
  • competing events
  • competing risks
  • time-to-event
  • hazard prediction
  • tabular transformer
  • SEER
  • METABRIC
  • SUPPORT

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

Cite the paper

@misc{wang2022survtracetransformerssurvivalanalysis,
      title={SurvTRACE: Transformers for Survival Analysis with Competing Events}, 
      author={Zifeng Wang and Jimeng Sun},
      year={2022},
      eprint={2110.00855},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      doi={https://doi.org/10.1145/3535508.3545521},
      url={https://arxiv.org/abs/2110.00855}, 
}