跳到正文
r/MachineLearning· /u/sulcantonin·· 6 小时前AI 评分44

Event2Vec:历史线性评分可精确分解为逐事件项的可加事件嵌入

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

AI 导读

Event2Vec 是一个学习离散事件序列嵌入的轻量库,将历史表示为事件向量的累加和,用自监督下一事件预测加重建项训练,无需标签。其线性评分可精确分解为逐事件项之和,并支持双曲、球面、SO(n) 旋转、Heisenberg 群等非交换空间以保留顺序信息。

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

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)

  1. hyperbolic (Möbius addition), for hierarchies
  2. κ-stereographic, one curvature dial from hyperbolic through flat to spherical (Bachmann et al., 2020)
  3. spherical, for cyclic structure
  4. SO(n) rotations, which are non-commutative, so order changes the endpoint
  5. Heisenberg group, same endpoint but a signed-area coordinate that records order
  6. 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

submitted by /u/sulcantonin
[link] [留言]

来源:r/MachineLearning · reddit.com