The crossed random effects model is widely used, finding applications in various fields such as longitudinal studies, e-commerce, and recommender systems, among others. However, these models encounter scalability challenges, as the computational time for standard algorithms grows superlinearly with the number N of observations in the data set, commonly $\Omega(N^{3/2})$ or worse. Recent published works present scalable methods for crossed random effects in linear models and some generalized linear models, but those methods only allow for random intercepts. In this paper, we devise scalable algorithms for models that include random slopes. This addition brings substantial difficulty in estimating the random-effect covariance matrices in a scalable way. We address this issue by using a variational EM algorithm. Our proposed approach accommodates both diagonal covariance matrices and cases where no structure is assumed-a scenario common in fields such as psychology and neuroscience. In simulations, the proposed method is substantially faster than standard methods for large $N$. It is also more efficient than ordinary least squares which has a problem of greatly underestimating the sampling uncertainty in parameter estimates. We illustrate the new method on a MovieLens dataset, as well as a large data set (five million observations) from the online retailer Stitch Fix.
翻译:交叉随机效应模型被广泛应用,在纵向研究、电子商务和推荐系统等多个领域均有重要应用。然而,这些模型面临可扩展性挑战,因为标准算法的计算时间随数据集中观测数量 N 呈超线性增长,通常为 $\Omega(N^{3/2})$ 或更差。近期发表的研究提出了适用于线性模型及部分广义线性模型的交叉随机效应可扩展方法,但这些方法仅支持随机截距。本文设计了包含随机斜率的模型的可扩展算法。这一扩展为以可扩展方式估计随机效应协方差矩阵带来了显著困难。我们通过使用变分EM算法来解决这一问题。所提出的方法既适用于对角协方差矩阵,也适用于不假设任何结构的情况——后者在心理学和神经科学等领域中十分常见。在模拟实验中,对于较大的 $N$,所提出的方法比标准方法快得多。它也比普通最小二乘法更高效,后者存在严重低估参数估计抽样不确定性的问题。我们在MovieLens数据集以及来自在线零售商Stitch Fix的大型数据集(五百万条观测)上演示了新方法的应用。