提出概率哈希嵌入模型,解决在线学习中类别特征动态变化的遗忘问题。
Probabilistic Hash Embeddings for Online Learning of Categorical Features
- 将哈希嵌入视为随机变量,用贝叶斯在线学习更新
- 支持无限增长词汇表,不遗忘旧类别,内存仅需1/2~1/4的独热编码表
- 对类别到达顺序不变,适合实时推荐、序列建模等场景
我们研究流数据中的分类特征,其取值词汇表随时间动态变化甚至无限增长。特征哈希常用于将这些分类值映射到固定维度的特征空间,以学习嵌入表示。尽管现有方法在离线或批量设置下表现良好,但本文关注在线学习场景。我们发现确定性嵌入对类别到达顺序敏感,在在线学习中易产生遗忘,导致性能下降。为此,我们提出概率哈希嵌入(PHE)模型,将哈希嵌入视为随机变量,采用贝叶斯在线学习实现增量更新。基于PHE结构,我们推导出一种可扩展的推断算法,用于学习模型参数并更新哈希嵌入及其他隐变量的后验分布。该算法具备四个特性:(i) 可处理不断演化的分类项词汇表,(ii) 对新项自适应且不遗忘旧项,(iii) 参数量有界,不随观察到的唯一值数量增长,(iv) 对项目到达顺序不变。在分类、序列建模和推荐系统等在线学习任务上的实验表明,PHE性能更优且内存效率高(内存消耗仅为独热编码表的2~4倍)。补充材料见https://github.com/aodongli/probabilistic-hash-embeddings。
原文摘要 · Abstract (English)
We study streaming data with categorical features where the vocabulary of categorical feature values is changing and can even grow unboundedly over time. Feature hashing is commonly used as a pre-processing step to map these categorical values into a feature space of fixed size before learning their embeddings. While these methods have been developed and evaluated for offline or batch settings, in this paper we consider online settings. We show that deterministic embeddings are sensitive to the arrival order of categories and suffer from forgetting in online learning, leading to performance deterioration. To mitigate this issue, we propose a probabilistic hash embedding (PHE) model that treats hash embeddings as stochastic and applies Bayesian online learning to learn incrementally from data. Based on the structure of PHE, we derive a scalable inference algorithm to learn model parameters and infer/update the posteriors of hash embeddings and other latent variables. Our algorithm (i) can handle an evolving vocabulary of categorical items, (ii) is adaptive to new items without forgetting old items, (iii) is implementable with a bounded set of parameters that does not grow with the number of distinct observed values on the stream, and (iv) is invariant to the item arrival order. Experiments in classification, sequence modeling, and recommendation systems in online learning setups demonstrate the superior performance of PHE while maintaining high memory efficiency (consumes as low as 2~4 memory of a one-hot embedding table). Supplementary materials are at https://github.com/aodongli/probabilistic-hash-embeddings
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。