Probabilistic Hash Embeddings for Online Learning of Categorical Features

Aodong Li, Abishek Sankararaman, Balakrishnan Narayanaswamy
11/25/2025
2 citations
cs.LGstat.ML

Official code: aodongli/probabilistic-hash-embeddings (0 stars, Python, last commit 2025-11-30).

Abstract

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.

Show full abstract

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

View on arXivView PDF

Code Implementations(1)

Official repository for AAAI 2026 oral paper Probabilisitic Hash Embedding for Online Learning of Categorical Features

00PythonNov 13, 20251 years ago

Similar Papers

Cite this paper

@article{li2025probabilistic,
  title  = {Probabilistic Hash Embeddings for Online Learning of Categorical Features},
  author = {Aodong Li and Abishek Sankararaman and Balakrishnan Narayanaswamy},
  year   = {2025},
  eprint = {2511.20893},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2511.20893v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2511.20893.svg)](https://codeofpaper.com/paper/2511.20893)

Discussion