Event2Vec: additive event embeddings where a linear score on a history decomposes exactly into per-event terms [P]

Reddit r/MachineLearning Papers

Summary

作者介绍 Event2Vec,一个通过自监督下一个事件预测学习离散事件序列加性嵌入的小型库,使任意线性评分可精确分解为逐事件项之和,并支持双曲、球面及非交换几何空间;论文见 arXiv 2509.12188,代码以 MIT 协议开源。

I've been working on Event2Vec, a small library for learning embeddings of discrete event sequences (purchases, logs, clinical codes, etc.) with a deliberately simple structure: a history is the running sum of its event vectors. h_t = h_{t-1} + e_{x_t} (norm-clipped) p(x_{t+1} | h_t) = softmax(W h_t + b) Training is self-supervised next-event prediction, plus a reconstruction term that asks h_t - h_{t-1} to recover e_{x_t}. No labels needed(details why the machinery works are in NeurReps@NeuralIPS Workshop paper, it is a bunch of losses that attempts the reconstruction and obey the arithmetic during training)) The history is a sum, any linear model on top of it is also a sum. For instance, a churn or risk score(see teaser) score = w·h + b = Σ_i (e_i·w) + b One might question, e1+e2 = e2+e1 = e3, but training is, so while vector embedding in (Euclidean) space is commutative, the training isn't. Furthermore, there are several alternative spaces that are gyro/non-commutative, that are part of the library(checkout the website) hyperbolic (Möbius addition), for hierarchies κ-stereographic, one curvature dial from hyperbolic through flat to spherical (Bachmann et al., 2020) spherical, for cyclic structure SO(n) rotations, which are non-commutative, so order changes the endpoint Heisenberg group, same endpoint but a signed-area coordinate that records order products of the above I started this for root-cause analysis of fault sequences at the Advanced Light Source (Berkeley Lab), where I'd been naively using Word2Vec on event logs and needed directionality without going to an opaque sequence model. Links Paper: arXiv 2509.12188 Code (MIT): github: event2vec_public, pip install event2vector Docs with interactive figures: event2vec.com scikit-learn-style API (fit/transform, gensim-style most_similar), PyTorch backend, runs on CPU/CUDA/MPS
Original Article

Similar Articles

What are vector embeddings? An interactive guide

Reddit r/ArtificialInteligence

互动式指南讲解向量嵌入的历史、原理与实践应用,通过可视化展示语义空间、向量运算与语义相似性,并演示语义搜索、聚类、零样本分类等真实场景。文中使用 Kanon 2 Embedder 的真实嵌入构建了一个交互式词语地图游戏。