ABSTRACT This paper proposes a novel firm embedding long short‐term memory (LSTM) model for panel data analysis, which integrates firm‐level embeddings with an LSTM network. The model jointly addresses unobserved heterogeneity and temporal dependence, providing a high‐performing solution for dynamic financial prediction tasks. To achieve this, each firm is represented by a trainable low‐dimensional embedding vector, concatenated with financial inputs and fed into an LSTM network. This architecture is trained end‐to‐end to jointly capture firm characteristics and temporal financial patterns. This integration significantly enhances predictive performance by leveraging both cross‐sectional firm information and temporal financial dynamics. Experiments on earnings management prediction were conducted using data from 334 Vietnamese listed firms over a 7‐year period (2014–2020), with discretionary accruals estimated via the Modified Jones model. In our setting, standalone machine learning models underperform their econometric benchmark, whereas the proposed embedding LSTM framework achieves superior performance.
Hoang et al. (Mon,) studied this question.