Edge Selection for the Effective use of Piecewise-Constant Distributions as Neural Network Outputs for Event Prediction
Organizations: School of Life Sciences, University of Sussex, UK · School of Engineering and Informatics, University of Sussex, UK · Institute of Ophthalmic Research, University of Tübingen, Germany
Abstract
We study the output representation of a neural network used for next event prediction. We propose partitioning the time axis into a fixed set of intervals and having a neural network output a categorical distribution over them, which we map to a (mostly) piecewise-constant probability density. We present an optimization procedure that selects interval edges in order to maximize data likelihood under the representation. The representation is well suited to processes whose inter-event distribution is a mixture of smooth and sharply peaked componentsa pattern we find common in event data recorded from real-world processes.
Figures & tables
| Label | Stem description | Input | Layers | Heads | Embed dim. | Parameters |
| rnn | gated recurrent unit ( Cho et al., 2014 ) | 32 | 1 | NA | 64 | 13k |
| gpt-a | GPT-2 transformer ( Radford et al., 2019 ) | 128 | 2 | 4 | 16 | 108k |
| gpt-b | GPT-2 transformer | 128 | 6 | 4 | 32 | 1.20M |
| NLL | MAE | ||||
|---|---|---|---|---|---|
| Dataset | Unit | rnn-logmix | rnn-pc | rnn-logmix | rnn-pc |
| Yelp airport | minutes | 4.71 | 4.69 | 34.68 | 35.04 |
| Yelp Mississauga | minutes | 3.92 | 3.26 | 21.36 | 21.30 |
| minutes | 4.04 | 3.02 | 37.23 | 37.34 | |
| Wikipedia | minutes | 4.36 | 1.96 | 198.2 | 198.4 |
| Yelp Toronto | hours | 4.81 | 4.60 | 62.82 | 62.75 |
Appendix figures & tables25 assets
Supplementary material from the paper’s appendix.
Appendix
| Dataset | rnn-logmix | rnn-pc |
|---|---|---|
| Yelp airport | 4.715 2.16e-02 | 4.685 3.74e-02 |
| Yelp Mississauga | 3.916 1.93e-02 | 3.260 3.89e-02 |
| 4.043 4.44e-02 | 3.017 7.35e-02 | |
| Wikipedia | 4.364 6.35e-02 | 1.962 1.18e-01 |
| Yelp Toronto | 4.810 6.27e-02 | 4.598 6.98e-02 |
| MOOC | 1.023 1.38e-01 | -6.227 2.90e-02 |
| Dataset | rnn-logmix | rnn-pc |
|---|---|---|
| Yelp airport | 34.68 7.42e-01 | 35.04 7.75e-01 |
| Yelp Mississauga | 21.36 4.65e-01 | 21.30 5.27e-01 |
| 37.23 6.05e-01 | 37.34 6.28e-01 | |
| Wikipedia | 198.2 7.39e+00 | 198.4 7.44e+00 |
| Yelp Toronto | 62.82 2.18e+00 | 62.75 2.19e+00 |
| MOOC | 290.5 4.07e+00 | 290.4 4.08e+00 |
| NLL rank | MAE rank | |||
| Model | # | mean | # | mean |
| rnn-logmix | 5 | 5.36 | 2 | 5.29 |
| gpt-a-logmix | 4 | 4.86 | 7 | 6.71 |
| gpt-b-logmix | 6 | 5.71 | 5 | 6.29 |
| rnn-pc | 2 | 2.14 | 1 | 5.14 |
| gpt-a-pc | 1 | 1.50 | 6 | 6.64 |
| NLL rank | MAE rank | |||||
|---|---|---|---|---|---|---|
| Head | rnn | gpt-a | gpt-b | rnn | gpt-a | gpt-b |
| logmix | 2.21 | 1.50 | 2.29 | 1.71 | 2.07 | 2.21 |
| pc | 2.07 | 1.50 | 2.43 | 1.71 | 2.07 | 2.21 |
| nn | 1.93 | 1.79 | 2.29 | 1.79 | 2.00 | 2.21 |
| softplus | 1.79 | 1.79 | 2.43 | 1.93 | 1.86 | 2.21 |
| exp | 1.64 | 2.21 | 2.14 | 1.79 | 2.14 | 2.07 |
| NLL | MAE | |||||||
|---|---|---|---|---|---|---|---|---|
| Dataset | rnn-logmix | rnn-pc | rnn-qpc | rnn-wpc | rnn-logmix | rnn-pc | rnn-qpc | rnn-wpc |
| Yelp airport | 4.715 | 4.685 | 4.779 | 4.772 | 34.68 | 35.04 | 35.11 | 35.10 |
| Yelp Miss. | 3.916 | 3.260 | 3.949 | 3.968 | 21.36 | 21.30 | 21.64 | 21.52 |
| 4.043 | 3.017 | 4.089 | 4.173 | 37.23 | 37.34 | 37.54 | 37.50 | |
| Wiki. | 4.364 | 1.962 | 4.385 | 5.417 | 198.2 | 198.4 | 198.5 | 211.6 |
| Yelp Toronto | 4.810 | 4.598 | 4.808 | 5.005 | 62.82 | 62.75 | 62.75 | 62.79 |
| NLL | MAE | |||||
|---|---|---|---|---|---|---|
| Dataset | rnn-pc | rnn-qpch | rnn-pch | rnn-pc | rnn-qpch | rnn-pch |
| Yelp airport | 4.685 | 4.781 | 4.682 | 35.04 | 35.22 | 35.16 |
| Yelp Mississauga | 3.260 | 3.947 | 3.234 | 21.30 | 21.78 | 21.61 |
| 3.017 | 4.089 | 2.998 | 37.34 | 37.55 | 37.37 | |
| Wikipedia | 1.962 | 4.376 | 1.927 | 198.4 | 198.7 | 198.4 |
| Yelp Toronto | 4.598 | 4.805 | 4.646 | 62.75 | 62.76 | 62.77 |
| model | NLL | MAE |
|---|---|---|
| rnn-logmix | -0.036 2.32e-03 | 0.954 1.56e-03 |
| gpt-a-logmix | -0.036 3.75e-03 | 0.954 2.44e-03 |
| gpt-b-logmix | -0.035 3.60e-03 | 0.954 2.42e-03 |
| rnn-pc | -0.029 3.74e-03 | 0.955 2.43e-03 |
| gpt-a-pc | -0.034 3.75e-03 | 0.954 2.45e-03 |
| gpt-b-pc | -0.031 3.70e-03 | 0.954 2.47e-03 |
| Dataset | Event type | Unit | Source |
|---|---|---|---|
| Yelp airport | Time between check-ins at McCarran International Airport. | minutes | ( Lüdke et al., 2023 ) |
| Yelp Mississauga | Time between check-ins at businesses in Mississauga. | minutes | ( Lüdke et al., 2023 ) |
| Time between tweets of a single user. | minutes | ( Lüdke et al., 2023 ) | |
| Wikipedia | Time between edits of the site’s top edited pages. | minutes | ( Shchur et al., 2020 ) |
| Yelp Toronto | Time between check-ins at restaurants in Toronto. | hours | ( Shchur et al., 2020 ) |
| MOOC | Time between user interactions on an online course system. | minutes | ( Shchur et al., 2020 ; Kumar et al., 2019 ) |
| Dataset | Gini coefficient |
|---|---|
| Amazon | 0.000 |
| Stack Overflow | 0.141 |
| Yelp airport | 0.148 |
| Yelp Toronto | 0.192 |
| Yelp Mississauga | 0.361 |
| 0.438 |