readApaper#11 The Neural Hawkes Process: A Neurally Self-Modulating Multivariate Point Process
Reading time: about 6–7 minutes · 2026-10-28 · NeurIPS 2017
Why does one event make another more likely—and why can that influence change several times before the next event even occurs?
Mei and Eisner’s Neural Hawkes Process offers a way to learn the timing and types of events from their history. The key idea is to couple a continuous-time LSTM with a temporal point process: the LSTM remembers what happened, while the point process predicts when the next event will happen and what kind of event it will be. The memory changes when an event arrives and keeps evolving during the quiet intervals between events.
1. Start with Hawkes: the past changes the future
Imagine observing neurons A and B. A fires at 10 ms; B fires at 14 ms. Does A’s firing make B more likely to fire next? Does that effect disappear after a few milliseconds?
A classical Hawkes process describes precisely this kind of history dependence. Every event type has a time-varying intensity, , meaning its instantaneous expected event rate. Within a very short interval , the probability of an event of type is approximately .
In the classical exponentially decaying version,
The baseline is the background event rate. Each past event adds an influence of size , which fades with decay rate . In the standard self-exciting Hawkes process, those added influences are positive.
This works nicely for simple excitation, but some event sequences are more intricate. An event may inhibit another event; repeated events may produce diminishing returns; the effects may depend on the order of earlier events; and an effect may appear only after a delay. Neural Hawkes learns such patterns from the sequence rather than insisting on one fixed additive rule.
2. The key innovation: an LSTM that also changes between events
An ordinary LSTM updates its state as new inputs arrive. The paper designs a continuous-time LSTM (CT-LSTM) with two complementary operations.
When event occurs: the event type and the preceding state pass through LSTM-like gates. They determine a new memory value , a target memory , and a positive decay-rate vector .
While no new event occurs: every memory component follows a continuous curve:
The formula is intuitive. Immediately after an event, memory starts at . As time passes, it approaches . The learned decides how quickly that happens. Because these are vectors, some dimensions can remember very recent events while others carry longer-lived context.
The target memory matters: the state is relaxing toward a learned, history-dependent value, not necessarily toward zero. The interval without events therefore carries information too—the model’s state keeps changing as time passes.
Schematic of the continuous-time loop. Each event updates the CT-LSTM, which determines the memory dynamics between events; the resulting intensities govern the next event. Self-drawn from the mechanism in Section 3.2.2.
In the original paper’s Figure 1, the purple and green intensity curves show how the same event can excite one event type but inhibit another. The curves can jump when an event occurs, then change continuously afterward. See original Figure 1 in the paper.
3. Turning continuous memory into future-event predictions
The changing cell memory is converted to a hidden state by an output gate and a nonlinear function. Then each event type receives its own intensity:
The scaled softplus function keeps the intensity positive. The weight vector maps the shared history representation to event type ; controls the transfer function’s scale.
For neurons, we might interpret the event type as a neuron ID and each event as a spike. The model then assigns every neuron a time-varying firing intensity. In the paper’s experiments, event types instead represent observations such as social-media actions, online phrases, or clinical records.
How is it trained? By maximizing the point-process log-likelihood:
The first term rewards high intensity where events actually occur. The second measures the total predicted intensity across all the periods in which events could have occurred. Together, they teach the model both the observed event timings and the intervals of silence. The authors approximate the integral with Monte Carlo sampling.
4. What did the experiments show?
The authors compared three models: classical self-exciting Hawkes (SE-MPP), Hawkes with inhibition and nonlinear intensity (D-SM-MPP), and the proposed Neural Hawkes (N-SM-MPP).
On Retweets (three event types) and MemeTrack (5,000 event types), the neural version achieved substantially better test log-likelihood per event. The improvement over D-SM-MPP is particularly informative: adding inhibition helps, but the recurrent representation of complete event history adds further predictive power. See Figure 2 for the learning curves and Figure 3 for the per-sequence comparisons.
The paper also examined synthetic streams and real datasets involving financial activity, MIMIC-II clinical events, and Stack Overflow. In an experiment that systematically hid selected event types, the neural model outperformed classical Hawkes across all 31 evaluated missing-event-type combinations (Figure 4). On next-event prediction, its improvements were especially consistent for event type; results for event time were more mixed.
5. Why does this matter beyond the equations?
Think about a viral post. One retweet may briefly increase the chance of another. Several retweets in quick succession can create a wave of attention. But what if no one retweets it for an hour? That quiet interval also tells us something about what might happen next.
The same principle applies to other event streams, from online discussions to sequences of clinical records. What happened matters, but so do the order of events and the time between them. A model that keeps track of time between observations can use both the events and the gaps to build a better picture of what comes next.
Neural Hawkes makes this possible by giving the past a changing influence: every new event reshapes the model’s memory, and that memory continues to evolve until another event appears.
Takeaway
Neural Hawkes gives event sequences a memory that keeps changing even when nothing happens. Instead of treating the past as a simple collection of fading signals, it learns how different events interact over time. The central lesson is simple: to predict the next event, we need to understand not only what happened, but also when it happened.
References / 参考资料
- Mei, H., & Eisner, J. (2017). The Neural Hawkes Process: A Neurally Self-Modulating Multivariate Point Process. Advances in Neural Information Processing Systems, 30. NeurIPS paper · Full PDF.
- Author’s original code (Theano).
- Schematic diagram is original and explanatory, based on the architecture described by Mei & Eisner (2017), Section 3.2.2.
预计阅读时间:约 6–7 分钟 · 2026-10-28 · NeurIPS 2017
一个事件发生以后,为什么另一个事件会变得更容易发生?这种影响又为什么会随着时间改变,甚至先抑制、后促进?
Mei 和 Eisner 在 2017 年提出的 Neural Hawkes Process(神经霍克斯过程),尝试让模型直接从历史事件中学习下一个事件什么时候发生、属于哪一种类型。它将连续时间 LSTM与时间点过程(Temporal Point Process)结合:事件来临时更新记忆,两次事件之间记忆仍然不断演化。
1. 从传统 Hawkes 说起:过去的事件会影响未来
设想两个神经元 A、B。A 在 10 ms 发放,B 在 14 ms 发放。A 的发放是否会影响 B 接下来产生 spike 的机会?这种影响经过几毫秒后是否会消失?
传统 Hawkes Process 可以描述这样的历史依赖。它用强度函数(intensity) 表示事件类型 在时刻 的瞬时发生率。在足够短的 时间内,发生该事件的概率约为 。
经典的指数衰减 Hawkes 模型写成:
其中 是背景发生率;每个历史事件都会贡献一份大小为 的影响,并以速率 随时间衰减。在经典自激发 Hawkes 中,这些贡献是正的。
但现实中的事件关系往往更加复杂:过去的事件可能抑制未来事件;同一个事件重复十次,效果未必是一次的十倍;先发生 A 后发生 B 与相反顺序可能得到不同结果;有些影响还会延迟出现。这篇论文希望让模型从数据中学习这些模式,而不再受固定叠加形式的约束。
2. 核心机制:两次事件之间仍然在变化的 LSTM
普通 LSTM 主要在收到新输入时更新隐藏状态。论文设计的 Continuous-time LSTM(CT-LSTM)则把状态变化分成两部分。
第一部分:事件到达时更新。 模型读取新事件的类型及之前的隐藏状态,通过类似 LSTM 的门控结构得到新的记忆 、目标记忆 ,以及衰减速率 。
第二部分:事件之间持续演化。 没有新输入时,记忆仍按照下面的规律变化:
这条公式可以直接读成:记忆从当前值 出发,逐渐靠近目标值 ;靠近的速度由可学习参数 决定。
这里的 、 和 都是向量,所以不同记忆维度可以有不同的时间尺度。有的维度只记得刚刚发生的事件,有的维度能保留更长时间的信息。
更巧妙的是,目标记忆本身也由历史决定,记忆并不总是衰减到零。即使没有事件发生,模型内部对下一次事件的预测也会随着时间改变。
自绘示意图|事件触发 CT-LSTM 状态更新,事件间隔内记忆连续演化,最后生成不同事件类型的强度函数。对应原论文 Section 3.2.2。
再看原论文 Figure 1:紫色和绿色曲线分别是两类事件的发生强度。新事件到来时,曲线可能突然跳变;随后又在连续时间中变化。同一事件还可以提高一种事件的强度、降低另一种事件的强度。查看原论文 Figure 1。
3. 如何从记忆预测下一次事件?
CT-LSTM 将连续变化的记忆 转换为隐藏状态 ,再为每种事件计算发生强度:
其中 将共享记忆映射到事件类型 , 是带有可学习尺度 的 Softplus 函数,用来确保发生强度始终为正。
如果把模型用于神经活动,事件类型可以对应“哪一个神经元”,事件时间则对应“什么时候发放 spike”。不过本文的实际数据来自转发、媒体短语、医疗事件等事件序列。
模型训练使用点过程最大似然:
可以把它理解为两项配合:真实事件发生时,模型应该给出较高强度;整个观察期内,也不能随意把所有时间点的发生强度都抬高。 第二项积分把事件之间的“安静时段”也纳入学习。作者通过 Monte Carlo 采样近似积分。
4. 实验验证:增加记忆真的有用吗?
作者比较了三种模型:
- SE-MPP:传统的自激发 Hawkes。
- D-SM-MPP:加入抑制效应与非线性强度函数的 Hawkes。
- N-SM-MPP:本文提出、使用 CT-LSTM 的 Neural Hawkes。
在 Retweets(三种事件类型)和 MemeTrack(5,000 种事件类型)数据上,Neural Hawkes 获得了更好的测试集单事件对数似然。Figure 2 显示随训练数据量增加的性能曲线,Figure 3 则比较了每条测试序列上的差异。加入抑制机制本身已有帮助,而进一步用循环网络编码事件的完整历史,又取得了额外提升。
论文还评估了合成序列、金融活动、MIMIC-II 医疗记录和 Stack Overflow。在一组系统性隐藏部分事件类型的实验中,Neural Hawkes 在全部 31 种受测的事件类型缺失组合上都优于经典 Hawkes(Figure 4)。它对下一事件类型的预测改善更稳定,而事件发生时间的预测则依数据集有所不同。
5. 除了公式,这个模型有什么意义?
想象一条突然火起来的帖子。一次转发可能短暂提高下一次转发的机会;短时间内接连出现的转发,则可能形成一波关注。但如果接下来一个小时完全没人转发呢?这段安静的时间,同样会改变我们对下一次转发的预期。
这种现象也出现在其他事件序列中,例如网络讨论或医疗记录。重要的不只是发生过什么,还有事件先后顺序,以及两次事件之间隔了多久。 如果模型能在事件间隔内持续追踪时间,就能同时利用实际发生的事件和它们之间的空白。
Neural Hawkes 正是这样处理历史的:每当新事件出现,它都会调整记忆;而在下一个事件到来前,这份记忆也在不断变化。
总结
Neural Hawkes 为事件序列加入了一种“即使没有新事件,也会随时间变化”的记忆。
它不再仅仅把过去的影响看作几条逐渐消失的曲线,而是学习不同事件怎样随时间相互影响。理解这篇论文,可以记住一句话:想预测接下来会发生什么,不仅要知道过去发生了什么,还要知道它们是什么时候发生的。
References / 参考资料
- Mei, H., & Eisner, J. (2017). The Neural Hawkes Process: A Neurally Self-Modulating Multivariate Point Process. Advances in Neural Information Processing Systems, 30. NeurIPS paper · Full PDF.
- Author’s original code (Theano).
- Schematic diagram is original and explanatory, based on the architecture described by Mei & Eisner (2017), Section 3.2.2.
