Using Random Effects to Account for High-Cardinality Categorical Features and Repeated Measures in Deep Neural Networks
Giora Simchoni, Saharon Rosset
Abstract
High-cardinality categorical features are a major challenge for machine learning methods in general and for deep learning in particular. Existing solutions such as one-hot encoding and entity embeddings can be hard to scale when the cardinality is very high, require much space, are hard to interpret or may overfit the data. A special scenario of interest is that of repeated measures, where the categorical feature is the identity of the individual or object, and each object is measured several times, possibly under different conditions (values of the other features). We propose accounting for high-cardinality categorical features as random effects variables in a regression setting, and consequently adopt the corresponding negative log likelihood loss from the linear mixed models (LMM) statistical literature and integrate it in a deep learning framework. We test our model which we call LMMNN on simulated as well as real datasets with a single categorical feature with high cardinality, using various baseline neural networks architectures such as convolutional networks and LSTM, and various applications in e-commerce, healthcare and computer vision. Our results show that treating high-cardinality categorical features as random effects leads to a significant improvement in prediction performance compared to state of the art alternatives. Potential extensions such as accounting for multiple categorical features and classification settings are discussed. Our code and simulations are available at https://github.com/gsimchoni/lmmnn
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 2ae051bc-0380-4ec2-8de3-3e4f3ffb6642Cited by top-tier papers4
- Label Correction of Crowdsourced Noisy Annotations with an Instance-Dependent Noise Transition ModelHui Guo, Boyu Wang, Grace YiNeurIPS 2023 · 21 citations
- H-Likelihood Approach to Deep Neural Networks with Temporal-Spatial Random Effects for High-Cardinality Categorical FeaturesHangbin Lee, Youngjo LeeICML 2023 · 4 citations
- Training Normalizing Flows from Dependent DataMatthias Kirchler, Christoph Lippert, Marius KloftICML 2023 · 2 citations
- Hamiltonian Monte Carlo Inference of Marginalized Linear Mixed-Effects ModelsJinlin Lai, Justin Domke, Daniel R. SheldonNeurIPS 2024 · 2 citations
Builds on1
Related papers
- LMLFM: Longitudinal Multi-Level Factorization MachineJunjie Liang, Dongkuan Xu, Yiwei Sun, Vasant G. HonavarAAAI 2020 · 12 citations
- How do Categorical Duplicates Affect ML? A New Benchmark and Empirical AnalysesVraj Shah, Thomas J. Parashos, Arun KumarVLDB 2024 · 8 citations
- Learning to Embed Categorical Features without Embedding Tables for RecommendationWang-Cheng Kang, Derek Zhiyuan Cheng, Tiansheng Yao, Xinyang Yi et al.KDD 2021 · 46 citations
- Unified Embedding: Battle-Tested Feature Representations for Web-Scale ML SystemsBenjamin Coleman, Wang-Cheng Kang, Matthew Fahrbach, Ruoxi Wang et al.NeurIPS 2023 · 30 citations
- Field-wise Learning for Multi-field Categorical DataZhibin Li, Jian Zhang, Yongshun Gong, Yazhou Yao et al.NeurIPS 2020 · 10 citations
