SAHP ==== Summary ------- A self-attentive history encoder with mark-specific states that relax exponentially toward a learned asymptote. Intensity and objective ----------------------- ``state_decay`` computes the pre-intensity state from the history encoding. The ``mu`` and ``eta`` heads use GELU; ``gamma`` uses softplus. The loss and sampling paths apply scaled softplus: .. math:: z_k(u)&=\mu_k+(\eta_k-\mu_k)\exp(-\gamma_k u),\\ \lambda_k(u)&=\operatorname{ScaledSoftplus}_k(z_k(u)). The loss is the negative marked event log-intensity sum plus the integrated total intensity, using the shared :doc:`../likelihood_integration` helper. Implementation: `easy_tpp/model/sahp.py `_. The formulas above summarize this implementation, including its numerical choices, rather than asserting equivalence to every variant in the reference. Original reference ------------------ `Self-Attentive Hawkes process `_ (as listed in the repository README). Shipped preset -------------- This is the packaged model fragment. :doc:`/user_manual/configuration` explains how it merges with the dataset and shared trainer presets. .. literalinclude:: ../../../../easy_tpp/configs/model/SAHP.yaml :language: yaml API --- :class:`easy_tpp.model.SAHP` ยท :doc:`/api/models`