Event2Vec: additive event embeddings decompose linear scores into per-event terms

sulcantonin · reddit · 2026-10-14

The author released Event2Vec (NeurReps@NeurIPS Workshop paper, arXiv 2509.12188), an open-source library for embedding discrete event sequences (purchases, logs, clinical codes) with a deliberately simple structure: a history is the running, norm-clipped sum of event vectors, trained self-supervised via next-event prediction plus a reconstruction term — no labels needed.

The key property: since the history is a sum, any linear score (churn, risk) decomposes exactly into per-event contributions, score = Σ ei·w + b, giving inherent interpretability. To the objection that vector addition is commutative and loses order, the training is not; the library also ships non-commutative geometric spaces: hyperbolic (Möbius addition, for hierarchies), κ-stereographic (one curvature dial from hyperbolic to spherical), spherical (cyclic structure), SO(n) rotations (order changes the endpoint), the Heisenberg group (same endpoint but a signed-area coordinate recording order), and products of these.

It grew out of root-cause analysis of fault sequences at Berkeley Lab's Advanced Light Source, where the author was naively using Word2Vec on event logs and wanted directionality without an opaque sequence model. Scikit-learn-style API (fit/transform, gensim-style mostsimilar), PyTorch backend, CPU/CUDA/MPS, MIT license, with interactive docs at event2vec.com.

Original post →

More from Research

Research channel →