This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

High-Dimensional Overdispersed Generalized Factor Model with Application to Single-Cell Sequencing Data Analysis

Jinyu Nie1, Zhilong Qin2, Wei Liu3
1Center of Statistical Research and School of Statistics,
Southwestern University of Finance and Economics, Chengdu, China
2Institute of Western China Economic Research,
Southwestern University of Finance and Economics, Chengdu, China
3School of Mathematics, Sichuan University, Chengdu, China
Corresponding author. Email: [email protected]. The research was partially supported by National Natural Science Foundation of China (Nos. 11931014).
Abstract

The current high-dimensional linear factor models fail to account for the different types of variables, while high-dimensional nonlinear factor models often overlook the overdispersion present in mixed-type data. However, overdispersion is prevalent in practical applications, particularly in fields like biomedical and genomics studies. To address this practical demand, we propose an overdispersed generalized factor model (OverGFM) for performing high-dimensional nonlinear factor analysis on overdispersed mixed-type data. Our approach incorporates an additional error term to capture the overdispersion that cannot be accounted for by factors alone. However, this introduces significant computational challenges due to the involvement of two high-dimensional latent random matrices in the nonlinear model. To overcome these challenges, we propose a novel variational EM algorithm that integrates Laplace and Taylor approximations. This algorithm provides iterative explicit solutions for the complex variational parameters and is proven to possess excellent convergence properties. We also develop a criterion based on the singular value ratio to determine the optimal number of factors. Numerical results demonstrate the effectiveness of this criterion. Through comprehensive simulation studies, we show that OverGFM outperforms state-of-the-art methods in terms of estimation accuracy and computational efficiency. Furthermore, we demonstrate the practical merit of our method through its application to two datasets from genomics. To facilitate its usage, we have integrated the implementation of OverGFM into the R package GFM.

Key words and phrases: Generalized factor model; overdispersion; high dimension; mixed-type data; variational EM

1 Introduction

In recent years, there has been a notable resurgence of high-dimensional factor models, which have proven to be valuable tools for analyzing complex datasets characterized by a large number of variables  [1, 2, 3]. These models have found widespread applications across various fields, including economics and finance for asset pricing [4], genomics for cell type identification  [5, 6], and social sciences for human ability assessment [7], among others. The versatility of high-dimensional factor models has positioned them as indispensable tools for addressing the challenges posed by intricate datasets and has paved the way for innovative research and analysis in diverse domains.

High-dimensional factor models provide a powerful framework for capturing the underlying structure and relationships within complex datasets. Through decomposing the observed variables into a reduced number of latent factors, these models enable dimension reduction and facilitate the extraction of meaningful information. The latent factors effectively capture the shared sources of variation across the variables, resulting in a more concise and interpretable representation of the data. In the current literature, high-dimensional factor models can be divided into two categories: linear factor models and nonlinear factor models.

Bai et al. [8] pioneered the high-dimensional linear factor model (LFM) and significantly advanced the field by establishing estimation theory and demonstrating the consistency of factor number selection. Since then, numerous studies have delved into high-dimensional LFMs [9, 1, 10, 3, 11]. LFMs exhibit excellent performance when the relationship between observed variables and factors is linear. However, for high-dimensional data with intricate dependencies, including nonlinearities, LFMs often fall short in terms of goodness of fit [2].

To address the limitations of high-dimensional LFMs, generalized factor models (GFMs) have been proposed as a class of models that utilize the exponential family of distributions to capture the nonlinear relationship between the high-dimensional observed variables and factors, such as Chen et al. [7], Wang [12] and Liu et al. [2]. Among these, Chen et al. [7] implicitly assumed a uniform exponential family distribution for all variables, which is not suitable for analyzing mixed-type data. In contrast, Liu et al. [2] and Wang [12] considered variable-specific distributions to model mixed-type data, where different variable types corresponded to different distributions. Unfortunately, existing nonlinear factor models are unable to account for overdispersion in mixed-type data, which may result in unsatisfactory estimation [13, 14]. Overdispersion is commonly encountered in practice, particularly in biomedical studies involving count responses, where the variability in the observed number of events often exceeds Poisson variability [13]. Additionally, overdispersion has been frequently observed in genomics, specifically in the analysis of single-cell RNA sequencing data [14, 15].

To overcome the limitations of existing models, we propose an overdispersed generalized factor model, called OverGFM, which is capable of simultaneously accounting for high-dimensional large-scale mixed data with overdispersion. Building upon the models proposed by Chen et al. [7] and Liu et al. [2], we formulate a hierarchical structure in OverGFM that incorporates an additional error term to explain overdispersion that cannot be captured by factors alone. However, OverGFM introduces significant computational challenges stemming from multiple factors. Firstly, it incorporates two high-dimensional latent random matrices, which contribute substantially to the computational complexity. Moreover, the model’s inherent nonlinearity adds an additional layer of complexity. To address these challenges, we introduce a variational EM (VEM) algorithm for implementing our model. The VEM algorithm combines Laplace and Taylor approximations, providing iterative explicit solutions for the complex variational parameters. Notably, our proposed VEM algorithm exhibits a high computational efficiency with linear complexity concerning sample size and variable dimension. We have theoretically proved the convergence of the proposed VEM algorithm. Furthermore, we develop a criterion based on the singular value ratio to determine the number of factors. In simulation studies, OverGFM showed improved estimation accuracy and remarkable computational efficiency in comparison to existing methods. Finally, we employed OverGFM to analyze two sets of single-cell sequencing data. The results unequivocally showcase its capacity in delivering invaluable biological insights within the genomics field, alongside its impressive computational scalability when addressing vast and intricate datasets.

The remaining sections of the paper are organized as follows. In Section 2, we provide an introduction to the model setup of OverGFM. Next, in Section 3, we present the estimation method, specifically focusing on the variational EM algorithm of OverGFM, as well as the procedure for selecting tuning parameter. To evaluate the performance of OverGFM, we conduct simulation studies in Section 4 and analyze real data in Section 5. In Section 6, we briefly discuss potential avenues for further research in this field. Technical proofs and additional numerical results are provided in the Supplementary Materials. Furthermore, we have seamlessly integrated OverGFM into an efficient and user-friendly R package, conveniently accessible at https://github.com/feiyoung/GFM.

2 Model setup

Suppose that the observations {𝐱i,i=1,,n}\{{\bf x}_{i},i=1,\cdots,n\}, are independent and identically distributed (i.i.d.), where 𝐱i=(xi1,,xip)T{\bf x}_{i}=(x_{i1},\cdots,x_{ip})^{{}^{\mathrm{T}}} are variables of mixed types including continuous, binary, count variables, etc. Without loss of generality, we assume that there are dd variable types, and the index set of variables for each type ss is denoted by Gs,s=1,,dG_{s},s=1,\cdots,d. We consider an overdispersed generalized factor model given by a hierarchical formulation,

xij|yijEF(gs(yij)),\displaystyle x_{ij}|y_{ij}\sim EF(g_{s}(y_{ij})), (2)
yij=ai+𝐛jT𝐟i+μj+εij,jGs, 1in,\displaystyle y_{ij}=a_{i}+{\bf b}_{j}^{{}^{\mathrm{T}}}{\bf f}_{i}+\mu_{j}+\varepsilon_{ij},\ j\in G_{s},\ 1\leq i\leq n,

where EF()EF(\cdot) is an exponential family distribution and gs()g_{s}() is called mean function for variable type ss. For example, if xijx_{ij} is a continuous variable, then EF(gs(yij))=N(yij,0)EF(g_{s}(y_{ij}))=N(y_{ij},0), a degenerated normal distribution, i.e., xij=yijx_{ij}=y_{ij}, and gs(y)=yg_{s}(y)=y; if xijx_{ij} is a count variable, then EF(gs(yij))=Poisson(exp(yij))EF(g_{s}(y_{ij}))=Poisson(\exp(y_{ij})) and gs(y)=exp(y)g_{s}(y)=\exp(y); and if xijx_{ij} is a binary variable, then EF(gs(yij))=Bernoulli(11+exp(yij))EF(g_{s}(y_{ij}))=Bernoulli(\frac{1}{1+\exp(-y_{ij})}) and gs(y)=11+exp(y)g_{s}(y)=\frac{1}{1+\exp(-y)}. aia_{i} is a known offset term for unit ii, 𝐟iq{\bf f}_{i}\in\mathbb{R}^{q} is a vector called latent factors, and 𝐛j{\bf b}_{j} is the corresponding loading vector and μj\mu_{j} is an intercept. The most significant difference between OverGFM and existing GFMs [7, 2] is that OverGFM can account for the extra variations in xijx_{ij} not explained by factors. This is done with εiji.i.d.N(0,λj)\varepsilon_{ij}\stackrel{{\scriptstyle i.i.d.}}{{\sim}}N(0,\lambda_{j}), which considers these extra variations called overdispersion [13, 14]. Numerical findings demonstrate that this model design gives OverGFM a performance edge over existing GFMs.

Similar to Liu et al. [2], we mainly consider three variable types: continuous, count and binomial variables since they are popular in practice and the estimation procedure and the corresponding algorithm can be established similarly for other types belonging to the exponential family. Without loss of generality, let us assume types 1–3 corresponds to continuous, count and binomial variables, and denote ps=|Gs|p_{s}=|G_{s}|, where |||\cdot| is the cardinality of a set. The models of (2)–(2) for these variable types are explicitly written as

xij=yij,jG1,xij|yijPoisson(exp(yij)),jG2,\displaystyle x_{ij}=y_{ij},j\in G_{1},\quad\quad x_{ij}|y_{ij}\sim Poisson(\exp(y_{ij})),j\in G_{2},
P(xij=k|yij)=Cnjkpijk(1pij)njk,pij=11+exp(yij),jG3,\displaystyle P(x_{ij}=k|y_{ij})=C_{n_{j}}^{k}p_{ij}^{k}(1-p_{ij})^{n_{j}-k},p_{ij}=\frac{1}{1+\exp(-y_{ij})},j\in G_{3}, (3)
yij=ai+𝐛jT𝐟i+μj+εij,jG1G2G3,\displaystyle y_{ij}=a_{i}+{\bf b}_{j}^{{}^{\mathrm{T}}}{\bf f}_{i}+\mu_{j}+\varepsilon_{ij},j\in G_{1}\cup G_{2}\cup G_{3}, (4)

where njn_{j} is the number of trials for the jj-th variable such that jG3j\in G_{3}. If nj=1n_{j}=1 for all jj, the binomial variable xijx_{ij} reduces to the Bernoulli variable with success probability pijp_{ij}. Model (4) is unidentifiable due to the unobservability of 𝐟i{\bf f}_{i} [2]. Let 𝐁=(𝐛1,,𝐛p)T{\bf B}=({\bf b}_{1},\cdots,{\bf b}_{p})^{{}^{\mathrm{T}}} be the loading matrix, 𝐅=(𝐟1,,𝐟n)T{\bf F}=({\bf f}_{1},\cdots,{\bf f}_{n})^{{}^{\mathrm{T}}} be the latent factor matrix, and 𝐇=(𝐡1,,𝐡n)T{\bf H}=({\bf h}_{1},\cdots,{\bf h}_{n})^{{}^{\mathrm{T}}} be the realization values of 𝐅{\bf F}, i.e., factor score matrix. To make models computationally identifiable, we follow Bai et al. [9] and Liu et al. [2] to impose two conditions on the factor score matrix and loading matrix: (A1) 1ni=1n𝐡i=𝟎\frac{1}{n}\sum_{i=1}^{n}{\bf h}_{i}={\bf 0} and 1n𝐇T𝐇=𝐈q\frac{1}{n}{\bf H}^{\mathrm{T}}{\bf H}={\bf I}_{q}, where 𝐈q{\bf I}_{q} is a qq-by-qq identity matrix; and (A2) 𝐁T𝐁{\bf B}^{\mathrm{T}}{\bf B} is diagonal with decreasing diagonal elements and the first nonzero element in each column of 𝐁{\bf B} is positive.

3 Estimation

Let p=s=13psp=\sum_{s=1}^{3}p_{s}, 𝐗=(xij,i=1,,n,j=1,,p)n×p{\bf X}=(x_{ij},i=1,\cdots,n,j=1,\cdots,p)\in\mathbb{R}^{n\times p} and 𝐘=(yij,i=1,,n,jG2G3)n×(p2+p3){\bf Y}=(y_{ij},i=1,\cdots,n,j\in G_{2}\cup G_{3})\in\mathbb{R}^{n\times(p_{2}+p_{3})}. Denote 𝜽=(μj,𝐛j,λj,j=1,,p,𝐡i,i=1,,n){{\bm{\theta}}}=(\mu_{j},{\bf b}_{j},\lambda_{j},j=1,\cdots,{p},{\bf h}_{i},i=1,\cdots,n) that is the collection of unknown model parameters. The conditional log-likelihood (conditional on the latent factor matrix 𝐅{\bf F}) of models (3)–(4) is derived as

l(𝜽;𝐗,𝐘|𝐅=𝐇)=ijG112{(xijai𝐛jT𝐡iμj)2/λj+lnλj}\displaystyle l({\bm{\theta}};{\bf X},{\bf Y}|{\bf F}={\bf H})=\sum_{i}\sum_{j\in G_{1}}-\frac{1}{2}\{(x_{ij}-a_{i}-{\bf b}_{j}^{{}^{\mathrm{T}}}{\bf h}_{i}-\mu_{j})^{2}/\lambda_{j}+\ln\lambda_{j}\} (5)
+ijG2{(xijyijexp(yij))12{(yijai𝐛jT𝐡iμj)2/λj+lnλj}}\displaystyle+\sum_{i}\sum_{j\in G_{2}}\left\{(x_{ij}y_{ij}-\exp(y_{ij}))-\frac{1}{2}\{(y_{ij}-a_{i}-{\bf b}_{j}^{{}^{\mathrm{T}}}{\bf h}_{i}-\mu_{j})^{2}/\lambda_{j}+\ln\lambda_{j}\}\right\}
+ijG3{(xijnj)yijnjln(1+exp(yij))12{(yijai𝐛jT𝐡iμj)2/λj+lnλj}},\displaystyle+\sum_{i}\sum_{j\in G_{3}}\left\{(x_{ij}-n_{j})y_{ij}-n_{j}\ln(1+\exp(-y_{ij}))-\frac{1}{2}\{(y_{ij}-a_{i}-{\bf b}_{j}^{{}^{\mathrm{T}}}{\bf h}_{i}-\mu_{j})^{2}/\lambda_{j}+\ln\lambda_{j}\}\right\},

by omitting the constant independent of parameters. There are significant computational challenges associated with the fact that 𝐘{\bf Y} is a large random matrix and 𝐇{\bf H} is a large unknown matrix. In existing GFMs [7, 2], only the factor score matrix 𝐇{\bf H} is unobservable. As a result, the computational challenges were addressed by treating the latent factors as ”parameters” to maximize the conditional log-likelihood [7, 2]. However, this approach is not applicable to our overdispersed GFM because of the additional unobservable large random matrix 𝐘{\bf Y}. Therefore, we consider 𝐘{\bf Y} as latent variables handled by expectation-maximization (EM) algorithm, while 𝐇{\bf H} is regarded as a high-dimensional matrix parameter to be estimated directly. The EM algorithm [16] is a powerful and well-developed framework for handling models with latent variables, and involves the posterior distribution of the latent variables in a key step. However, in our model, computing the posterior distribution P(𝐘|𝐗,𝐇)P({\bf Y}|{\bf X},{\bf H}) is extremely challenging due to the high dimensionality of both 𝐘{\bf Y} and (𝐗,𝐇)({\bf X},{\bf H}), as well as the presence of nonlinear terms for Poisson and binomial variables in the log-likelihood (5).

To make the posterior distribution tractable, we utilize a mean field variational family, q(𝐘)q({\bf Y}), to approximate P(𝐘|𝐗,𝐇)P({\bf Y}|{\bf X},{\bf H}):

q(𝐘)=Πi,jG2G3N(yij;τij,σij2).q({\bf Y})=\Pi_{i,j\in G_{2}\cup G_{3}}N(y_{ij};\tau_{ij},\sigma^{2}_{ij}).

Let 𝜸=(τij,σij2,i=1,,n,jG2G3){\bm{\gamma}}=(\tau_{ij},\sigma^{2}_{ij},i=1,\cdots,n,j\in G_{2}\cup G_{3}) that is the collection of unknown variational parameters. In the proposed algorithm, 𝜸\bm{\gamma} is solved to seek an optimal approximation in the sense that KL divergence of q(𝐘)q({\bf Y}) and P(𝐘|𝐗,𝐇)P({\bf Y}|{\bf X},{\bf H}) is minimized.

Next, we derive the evidence lower bound (ELBO) function, which is given by

ELBO(𝜽;𝜸)=ijG112{[(xij𝐛jT𝐡iμjai)2]/λj+lnλj}\displaystyle ELBO({\bm{\theta}};\bm{\gamma})=\sum_{i}\sum_{j\in G_{1}}-\frac{1}{2}\{[(x_{ij}-{\bf b}_{j}^{{}^{\mathrm{T}}}{\bf h}_{i}-\mu_{j}-a_{i})^{2}]/\lambda_{j}+\ln\lambda_{j}\}
+ijG2{(xijτijexp(τij+σij22))12{[(τijai𝐛jT𝐡iμj)2+σij2]/λj\displaystyle+\sum_{i}\sum_{j\in G_{2}}\left.\bigg{\{}(x_{ij}\tau_{ij}-\exp(\tau_{ij}+{\frac{\sigma_{ij}^{2}}{2}}))-\frac{1}{2}\{[(\tau_{ij}-a_{i}-{\bf b}_{j}^{{}^{\mathrm{T}}}{\bf h}_{i}-\mu_{j})^{2}+\sigma_{ij}^{2}]/\lambda_{j}\right.
+lnλj}}+ijG3{(xijnj)τijnjEq(yij)ln(1+exp(yij))\displaystyle\left.+\ln\lambda_{j}\}\right.\bigg{\}}+\sum_{i}\sum_{j\in G_{3}}\bigg{\{}(x_{ij}-n_{j})\tau_{ij}-n_{j}\mathrm{E}_{q(y_{ij})}\ln(1+\exp(-y_{ij}))
12{[(τij𝐛jT𝐡iμjai)2+σij2]/λj+lnλj}}+12i,jG2G3ln(σij2),\displaystyle-\left.\frac{1}{2}\{[(\tau_{ij}-{\bf b}_{j}^{{}^{\mathrm{T}}}{\bf h}_{i}-\mu_{j}-a_{i})^{2}+\sigma_{ij}^{2}]/\lambda_{j}+\ln\lambda_{j}\}\right\}+\frac{1}{2}\sum_{i,j\in G_{2}\cup G_{3}}\ln(\sigma_{ij}^{2}),

where Eq(yij)F(yij)\mathrm{E}_{q(y_{ij})}F(y_{ij}) is taking the expectation of F(yij)F(y_{ij}) with respect to the random variable yijN(τij,σij2)y_{ij}\sim N(\tau_{ij},\sigma^{2}_{ij}). In the following, we present a variational EM algorithm designed to implement the model.

3.1 Variational E-step

Unlike the conventional EM algorithm, the variational EM approach transforms the posterior expectation in the E-step into an optimization problem involving the variational parameters. Then, we introduce how to update the variational parameters 𝜸=(τij,σij2,1in,jG2G3)\bm{\gamma}=(\tau_{ij},\sigma^{2}_{ij},1\leq i\leq n,j\in G_{2}\cup G_{3}) given model parameters 𝜽{\bm{\theta}}. However, it is very difficult to evaluate these parameters because q(𝐘)q({\bf Y}) is not a conjugate distribution to P(𝐗|𝐘)P({\bf X}|{\bf Y}). We turn to the Laplace approximation [17] to obtain an approximate posterior distribution of 𝐘{\bf Y}. Specifically, since P(𝐘|𝐗)P(𝐗|𝐘)P(𝐘|𝐇)P({\bf Y}|{\bf X})\propto P({\bf X}|{\bf Y})P({\bf Y}|{\bf H}), a Taylor approximation around the maximum a posterior point of P(𝐗|𝐘)P(𝐘|𝐇)P({\bf X}|{\bf Y})P({\bf Y}|{\bf H}) is adopted to construct a Gaussian proxy for the posterior.

For jG2j\in G_{2}, lnP(𝐗|𝐘)P(𝐘|𝐇)=ijG2{xijyijexp(yij)12{(yijaiμj𝐛jT𝐡i)2/λj}}+c\ln P({\bf X}|{\bf Y})P({\bf Y}|{\bf H})=\sum\limits_{i}\sum\limits_{j\in G_{2}}\{x_{ij}y_{ij}-\exp(y_{ij})-\frac{1}{2}\{(y_{ij}-a_{i}-\mu_{j}-{\bf b}_{j}^{{}^{\mathrm{T}}}{\bf h}_{i})^{2}/\lambda_{j}\}\}+c, where cc is a constant independent of parameters. Let fij(y)=xijyexp(y)12{(yaiμj𝐛jT𝐡i)2/λj}f_{ij}(y)=x_{ij}y-\exp(y)-\frac{1}{2}\{(y-a_{i}-\mu_{j}-{\bf b}_{j}^{{}^{\mathrm{T}}}{\bf h}_{i})^{2}/\lambda_{j}\}, then the posterior mean and variance of yijy_{ij} can be estimated by

τ^ij=argmaxyfij(y),σ^ij2=fij′′(τ^ij)1,i=1,,n,jG2,\hat{\tau}_{ij}=\arg\max_{y}f_{ij}(y),\hat{\sigma}^{2}_{ij}=-f^{\prime\prime}_{ij}(\hat{\tau}_{ij})^{-1},i=1,\cdots,n,j\in G_{2},

where fij′′(y)=exp(y)λj1f^{\prime\prime}_{ij}(y)=-\exp(y)-\lambda_{j}^{-1}. The derivation details are provided in Appendix A.1 of Supplementary Materials.

However, maximizing fij(y)f_{ij}(y) with respect to yy is computation-consuming since both nn and p2p_{2} may be very large. To improve the computational efficiency, we further enhance the Laplace approximation by creatively combination with Taylor approximation. Specifically, before maximizing fij(y)f_{ij}(y), we apply the Taylor approximation to the exponential term of fij(y)f_{ij}(y). Recalling g2(y)=exp(y)g_{2}(y)=\exp(y) and by Taylor’s theorem, we can approximate g2(y)g_{2}(y) by expanding around y0y_{0}, i.e., g2(y)g~2(y)=g2(y0)+g2(y0)(yy0)+12g2′′(y0)(yy0)2.g_{2}(y)\approx\tilde{g}_{2}(y)=g_{2}(y_{0})+g_{2}^{\prime}(y_{0})(y-y_{0})+\frac{1}{2}g_{2}^{\prime\prime}(y_{0})(y-y_{0})^{2}. Substituting g~2(y)\tilde{g}_{2}(y) into fij(y)f_{ij}(y) and taking derivative to yy, we obtain an explicit iterative value of τ^ij\hat{\tau}_{ij} as well as σ^ij2\hat{\sigma}_{ij}^{2},

τ^ij=xijexp(y0)(1y0)+λj1z~ijλj1+exp(y0),σ^ij2=1λj1+exp(τ^ij),\hat{\tau}_{ij}=\frac{x_{ij}-\exp(y_{0})(1-y_{0})+\lambda_{j}^{-1}\tilde{z}_{ij}}{\lambda_{j}^{-1}+\exp(y_{0})},\hat{\sigma}_{ij}^{2}=\frac{1}{\lambda_{j}^{-1}+\exp(\hat{\tau}_{ij})}, (6)

where y0y_{0} is taken as the previous iterative value of τij\tau_{ij}, and z~ij=ai+μj+𝐛jT𝐡i\tilde{z}_{ij}=a_{i}+\mu_{j}+{\bf b}_{j}^{{}^{\mathrm{T}}}{\bf h}_{i}.

Similarly, for jG3j\in G_{3}, let fij(y)=(xijnj)ynjln(1+exp(y))12{(y𝐛jT𝐡iμjai)2/λj}f_{ij}(y)=(x_{ij}-n_{j})y-n_{j}\ln(1+\exp(-y))-\frac{1}{2}\{(y-{\bf b}_{j}^{T}{\bf h}_{i}-\mu_{j}-a_{i})^{2}/\lambda_{j}\}, then

τ^ij=argmaxyfij(y),σ^ij2=fij′′(τ^ij)1.\hat{\tau}_{ij}=\arg\max_{y}f_{ij}(y),\hat{\sigma}^{2}_{ij}=-f^{\prime\prime}_{ij}(\hat{\tau}_{ij})^{-1}.

The explicit form of fij′′(y)=njg3(y)(1g3(y))λj1f^{\prime\prime}_{ij}(y)=-n_{j}g_{3}(y)(1-g_{3}(y))-\lambda_{j}^{-1} with g3(y)=11+exp(y)g_{3}(y)=\frac{1}{1+\exp(-y)}. Let h(y)=lng3(y)h(y)=\ln g_{3}(y), then the second-order Taylor expansion is h(y)h~(y)=h(y0)+h(y0)(yy0)+12h′′(y0)(yy0)2h(y)\approx\tilde{h}(y)=h(y_{0})+h^{\prime}(y_{0})(y-y_{0})+\frac{1}{2}h^{\prime\prime}(y_{0})(y-y_{0})^{2}, where h(y)=(1g3(y))h^{\prime}(y)=(1-g_{3}(y)) and h′′(y)=g3(y)(1g3(y))h^{\prime\prime}(y)=-g_{3}(y)(1-g_{3}(y)). Substituting h~(y)\tilde{h}(y) into fij(y)f_{ij}(y) and taking derivative to yy, we obtain

τ^ij=xijnjg3(y0)+njy0g3(y0)(1g3(y0))+λj1z~ijλj1+njg3(y0)(1g3(y0)),σ^ij2=1λj1+njg3(τ^ij)(1g3(τ^ij)).\hat{\tau}_{ij}=\frac{x_{ij}-n_{j}g_{3}(y_{0})+n_{j}y_{0}g_{3}(y_{0})(1-g_{3}(y_{0}))+\lambda_{j}^{-1}\tilde{z}_{ij}}{\lambda_{j}^{-1}+n_{j}g_{3}(y_{0})(1-g_{3}(y_{0}))},\hat{\sigma}^{2}_{ij}=\frac{1}{\lambda_{j}^{-1}+n_{j}g_{3}(\hat{\tau}_{ij})(1-g_{3}(\hat{\tau}_{ij}))}. (7)

The iterative closed-form solutions, as denoted in equations (6) and (7), play a pivotal role in achieving computational efficiency. Until now, the variational E-step is finished, then the variational M-step is considered to update the model parameters 𝜽{\bm{\theta}} by fixing the variational parameter 𝜸\bm{\gamma}.

3.2 Variational M-step

Taking derivative of ELBO(𝜽;𝜸)ELBO({\bm{\theta}};\bm{\gamma}) with respect to each model parameter and setting it to zero, we obtain the updated formula:

𝐛j\displaystyle{\bf b}_{j} =\displaystyle= (𝐇T𝐇)1i𝐡i(x¯ijμj),\displaystyle({\bf H}^{{}^{\mathrm{T}}}{\bf H})^{-1}\sum_{i}{\bf h}_{i}(\bar{x}_{ij}-\mu_{j}), (8)
𝐡i\displaystyle{\bf h}_{i} =\displaystyle= (𝐁TΛ1𝐁)1j𝐛j(x¯ijμj)/λj,\displaystyle({\bf B}^{{}^{\mathrm{T}}}\Lambda^{-1}{\bf B})^{-1}\sum_{j}{\bf b}_{j}(\bar{x}_{ij}-\mu_{j})/\lambda_{j}, (9)
μj\displaystyle\mu_{j} =\displaystyle= 1ni(x¯ij𝐛jT𝐡i),\displaystyle\frac{1}{n}\sum_{i}(\bar{x}_{ij}-{\bf b}_{j}^{T}{\bf h}_{i}), (10)
λj\displaystyle\lambda_{j} =\displaystyle= 1ni{(x¯ij𝐛jT𝐡iμj)2+σij2}.\displaystyle\frac{1}{n}\sum_{i}\{(\bar{x}_{ij}-{\bf b}_{j}^{T}{\bf h}_{i}-\mu_{j})^{2}+\sigma^{2}_{ij}\}. (11)

where x¯ij=xijai\bar{x}_{ij}=x_{ij}-a_{i} if jG1j\in G_{1}, x¯ij=τijai\bar{x}_{ij}=\tau_{ij}-a_{i} if jG2G3j\in G_{2}\cup G_{3}, σij2=0\sigma_{ij}^{2}=0 for jG1j\in G_{1}, and Λ=diag(λ1,,λp)\Lambda=\mathrm{diag}(\lambda_{1},\cdots,{\lambda_{p}}). According to Equations (6)–(11), it is straightforward to implement the variational EM algorithm summarized in Algorithm 1. The implementation details are given in Appendix A.3 of Supplementary Materials.

The proposed variational EM algorithm aims to iteratively maximize the evidence lower bound function by optimizing block coordinate directions. The parameter space 𝒢\mathcal{G} is defined as the set of parameters satisfying Conditions (A1) to (A2). In the Supplementary Materials, a formal proof is provided to demonstrate the convergence of the iterative algorithm. The result is stated as follows:

Theorem 3.1.

If conditions (B1)–(B2) in the Supplementary Materials hold, given the proposed variational EM algorithm, we have that all the limit points of (𝛉(t),𝛄(t))({\bm{\theta}}^{(t)},\bm{\gamma}^{(t)}) are local maxima of ELBO(𝛉,𝛄)ELBO({\bm{\theta}},\bm{\gamma}) in the parameter space 𝒢\mathcal{G}, and ELBO(𝛉,𝛄)ELBO({\bm{\theta}},\bm{\gamma}) converges monotonically to L=ELBO(𝛉,𝛄)L^{*}=ELBO({\bm{\theta}}^{*},\bm{\gamma}^{*}) for some (𝛉,𝛄)𝒢({\bm{\theta}}^{*},\bm{\gamma}^{*})\in\mathcal{G}^{*}, where 𝒢={set of local maxima in the interior\mathcal{G}^{*}=\{\mbox{set of local maxima in the interior}  of 𝒢}.\mbox{ of }~{}\mathcal{G}\}.

Algorithm 1 The proposed variational EM algorithm for OverGFM
0:  𝐗{\bf X}, qq, maximum iterations maxItermaxIter, relative tolerance of ELBOELBO (epsELBOepsELBO).
0:  𝐇^,𝐁^,𝝁^,Σ^,Λ^\widehat{\bf H},\widehat{\bf B},\widehat{\bm{\mu}},\widehat{\Sigma},\widehat{\Lambda}
1:  Initialize 𝜸(0)=(τij(0),σij2,(0),in,jp)\bm{\gamma}^{(0)}=(\tau^{(0)}_{ij},\sigma^{2,(0)}_{ij},i\leq n,j\leq p) and 𝜽(0)=(𝐁(0),𝝁(0),𝐇(0),Λ(0)){\bm{\theta}}^{(0)}=({\bf B}^{(0)},\bm{\mu}^{(0)},{\bf H}^{(0)},\Lambda^{(0)}).
2:  for  each t=1,,maxItert=1,\cdots,maxIter do
3:     Update variational parameters 𝜸(t)\bm{\gamma}^{(t)} based on Equations (6)–(7);
4:     Update model parameters 𝜽(t){\bm{\theta}}^{(t)} based on Equations (8)–(11);
5:     Evaluate the evidence lower bound ELBOt=ELBO(𝜽(t),𝜸(t))ELBO_{t}=ELBO({\bm{\theta}}^{(t)},\bm{\gamma}^{(t)}).
6:     if |ELBOtELBOt1|/|ELBOt1|<epsELBO|ELBO_{t}-ELBO_{t-1}|/|ELBO_{t-1}|<epsELBO then
7:        break;
8:     end if
9:  end for
10:  Exert the identifiability conditions (A1)–(A2) on 𝐇(t){\bf H}^{(t)} and 𝐁(t){\bf B}^{(t)}.
11:  return 𝐇^=𝐇(t),𝐁^=𝐁(t),𝝁^=𝝁(t),Λ^=Λ(t)\widehat{\bf H}={\bf H}^{(t)},\widehat{\bf B}={\bf B}^{(t)},\widehat{\bm{\mu}}=\bm{\mu}^{(t)},\widehat{\Lambda}=\Lambda^{(t)}.

3.3 Selection of the number of factors

The number of factors (qq) is an undetermined tuning parameter that requires selection. To tackle this issue, we present a simple and effective method based on singular value ratio (SVR) that can be easily implemented.

Our proposed SVR method draws inspiration from the eigenvalue ratio-based approach commonly employed to determine the number of factors in linear factor models [18]. In this method, the estimation of qq is carried out using q^=argmaxkqmaxκk(Φ^x)κk+1(Φ^x)\hat{q}=\arg\max_{k\leq q_{max}}\frac{\kappa_{k}(\hat{\Phi}_{x})}{\kappa_{k+1}(\hat{\Phi}_{x})}, where Φ^x\hat{\Phi}_{x} represents the sample covariance of 𝐱i{\bf x}_{i} within the linear factor model framework, and κk(Φ^x)\kappa_{k}(\hat{\Phi}_{x}) denotes the kk-th largest eigenvalue of Φ^x\hat{\Phi}_{x}. The underlying concept behind this approach can be intuitively understood as follows. Assuming that the true number of factors is qq, the eigenvalues κk(Φ^x)\kappa_{k}(\hat{\Phi}_{x}) for k>qk>q primarily originate from the error term’s variance, εi\varepsilon_{i}. Consequently, κk(Φ^x)\kappa_{k}(\hat{\Phi}_{x}) for k>qk>q is noticeably smaller compared to κq(Φ^x)\kappa_{q}(\hat{\Phi}_{x}), resulting in a considerably large value for κq(Φ^x)κq+1(Φ^x)\frac{\kappa_{q}(\hat{\Phi}_{x})}{\kappa_{q+1}(\hat{\Phi}_{x})}. However, applying this approach directly to our nonlinear factor model becomes challenging due to the absence of a linear structure between the observed variables and the factors.

Similar to Chen et al. [19], we introduce a surrogate, denoted by Φ^hb\hat{\Phi}_{hb}, for Φ^x\hat{\Phi}_{x}, to tackle this issue. It is defined as the sample covariance matrix of 𝐁^𝐡^i\widehat{\bf B}\widehat{\bf h}_{i}. Due to the identifiable conditions satisfied by 𝐇^\widehat{\bf H} and 𝐁^\widehat{\bf B}, we have Φ^hb=𝐁^𝐁^T\hat{\Phi}_{hb}=\widehat{\bf B}\widehat{\bf B}^{{}^{\mathrm{T}}}. Let qmaxq_{\max} be the upper bound for qq. First, we fit our model using q=qmaxq=q_{\max}, then define the estimator of qq as q^=argmaxkqmaxνk(𝐁^)νk+1(𝐁^)\hat{q}=\arg\max_{k\leq q_{max}}\frac{\nu_{k}(\widehat{\bf B})}{\nu_{k+1}(\widehat{\bf B})}, where νk(𝐁^)\nu_{k}(\widehat{\bf B}) is the kk-largest singular value of 𝐁^\widehat{\bf B}. This method is referred to as the singular value ratio (SVR) based method. The empirical results depicted in Figure 1, obtained from Scenario 4 of Section 4, demonstrate the performance of the SVR method and its potential to identify the true value of qq. As error’s variance increases, the maximum singular value ratio decreases, indicating an increase in the difficulty of accurately identifying the true value of qq. More comprehensive investigation is conducted in Section 4.

Refer to caption
Figure 1: The singular value ratio of 𝐁^\widehat{\mathbf{B}} obtained by OverGFM from a random sample under three different settings of the error variance, where λj=σ2{0.1,1,3},(n,p)=(300,300)\lambda_{j}=\sigma^{2}\in\{0.1,1,3\},(n,p)=(300,300) and the true value q=6q=6.

4 Simulation study

In this section, we showcase the effectiveness of the proposed OverGFM through simulation studies involving 200 realizations. We compare OverGFM with various state-of-the-art methods from the current literature. They include

  • (1)

    Generalized factor model [2] implemented in the R package GFM;

  • (2)

    Multi-response reduced-rank regression model  [MRRR, 20] implemented in rrpack R package;

  • (3)

    Principal component analysis for data with mix of qualitative and quantitative variables [21], implemented in the R package PCAmixdata;

  • (4)

    Generalized PCA (GPCA) [22] implemented in the R package generalizedPCA;

  • (5)

    High-dimensional LFM [8] implemented in the R package GFM;

  • (6)

    Poisson PCA [23] implemented in the R package PoissonPCA;

  • (7)

    PLNPCA [24] implemented in the R package PLNmodels;

Among the aforementioned methods, methods (1)-(3) are capable of handling mixed-type data. Method (4) can only analyze single-type data, including continuous, count, and categorical types. Method (5) is specifically designed for analyzing continuous variables, widely recognized as a benchmark with broad applications, notably in economics [25, 1] and genomics [26, 5], whereas methods (6) and (7) excel at analyzing count data.

We evaluate OverGFM in a total of eight scenarios. In scenarios 1-3, our main focus is comparing OverGFM with methods (1)-(3) and LFM, as LFM is widely utilized in practical applications [3, 6]. We generate data with a mixed-type of three variable types for these scenarios. In scenarios 4 and 5, we investigate the performance of the proposed SVR method in selecting the number of factors and the estimation performance under misselected qq, respectively. In scenario 6, we investigate the computational efficiency of OverGFM by comparing it with other methods. In scenario 7, we focus on special cases where data is generated using a combination of two variable types or a single variable type, aiming to compare OverGFM with methods (4), (6) and (7). In scenario 8, we delve into the interconnection between OverGFM and GFM. To conserve space, the results (Table S1–S3, Figure S2) pertaining to scenarios 7–8 are deferred to Appendix B of the Supplementary Materials. In implementing the compared methods, we maintain the default settings and solely adjust the argument for the number of factors/principal components (PCs). To facilitate a fair comparison, we set the number of factors/PCs to the true value for all methods.

In scenarios 1–3, we generate data from models (2) and (2), i.e., xij|yijEF(gs(yij))x_{ij}|y_{ij}\sim EF(g_{s}(y_{ij})), and yij=ai+𝐛jT𝐡i+μj+εijy_{ij}=a_{i}+{\bf b}_{j}^{{}^{\mathrm{T}}}{\bf h}_{i}+\mu_{j}+\varepsilon_{ij}, and consider the mix of three different variable types: continuous, count and binary variables, i.e., g1(y)=y,g2(y)=exp(y)g_{1}(y)=y,g_{2}(y)=\exp(y) and g3(y)=1/(1+exp(y))g_{3}(y)=1/(1+\exp(-y)). Without loss of generality, we set the offset ai=0a_{i}=0 for all ii’s. We set the number of variables of these three variable types to p3,p3\lfloor\frac{p}{3}\rfloor,\lfloor\frac{p}{3}\rfloor and p2p3p-2\lfloor\frac{p}{3}\rfloor, respectively. Next, we generate 𝐁˘=(b˘jk)p×q\breve{{\bf B}}=(\breve{b}_{jk})\in\mathbb{R}^{p\times q} with b˘jki.i.d.N(0,1)\breve{b}_{jk}\stackrel{{\scriptstyle i.i.d.}}{{\sim}}N(0,1). Let 𝐁˘s\breve{{\bf B}}_{s} be the submatrix of loading for variable type ss. We generate 𝐁¯s=ρs𝐁˘s\bar{{\bf B}}_{s}=\rho_{s}\breve{{\bf B}}_{s}, then construct 𝐁¯=(𝐁¯1T,𝐁¯2T,𝐁¯3T)T\bar{{\bf B}}=(\bar{{\bf B}}_{1}^{\mathrm{T}},\bar{{\bf B}}_{2}^{\mathrm{T}},\bar{{\bf B}}_{3}^{\mathrm{T}})^{\mathrm{T}}, where ρs\rho_{s} controls the signal strength of each variable type. To obtain the singular value decomposition (SVD), we decompose 𝐁¯=U2Λ2V2T\bar{{\bf B}}=U_{2}\Lambda_{2}V_{2}^{{}^{\mathrm{T}}}. Next, we define 𝐁0=U2Λ2{\bf B}_{0}=U_{2}\Lambda_{2}. We then generate 𝐡˘i\breve{{\bf h}}_{i} from N(𝟎q,(0.5|ij|)q×q)N({\bf 0}_{q},(0.5^{|i-j|})_{q\times q}) and denote 𝐇˘=(𝐡˘1,,𝐡˘n)T\breve{{\bf H}}=(\breve{{\bf h}}_{1},\cdots,\breve{{\bf h}}_{n})^{{}^{\mathrm{T}}}, perform column orthogonality for 𝐇˘\breve{{\bf H}} to obtain 𝐇¯\bar{\bf H}, and set 𝐇0=𝐇¯V2T/n{\bf H}_{0}=\bar{\bf H}V_{2}^{{}^{\mathrm{T}}}/\sqrt{n} such that 𝐇0T𝐇0/n=𝐈q{\bf H}_{0}^{{}^{\mathrm{T}}}{\bf H}_{0}/n={\bf I}_{q}. Note that 𝐇0{\bf H}_{0} and 𝐁0{\bf B}_{0} satisfy the identifiable conditions (A1)–(A2) given in Section 2. Finally, We generate μj=0.4zj,zjN(0,1)\mu_{j}=0.4z_{j},z_{j}\sim N(0,1), and εijN(0,σ2)\varepsilon_{ij}\sim N(0,\sigma^{2}). In all scenarios, we fix the number of latent factors (qq) to 6.

We assess the estimation accuracy of the intercept-loading matrix Υ=(𝝁,𝐁)p×(q+1)\Upsilon=(\bm{\mu},{\bf B})\in\mathbb{R}^{p\times(q+1)} and the factor matrix 𝐇{\bf H} by utilizing the commonly-used trace statistic [27] that measures the distance of the column space spanned by two matrices. For the factor score matrix, the trace statistic, denoted as Tr(𝐇^,𝐇0)\mathrm{Tr}(\widehat{\bf H},{\bf H}_{0}), is defined as Tr(𝐇^,𝐇0)=Tr(𝐇0𝐇^T(𝐇^T𝐇^)1𝐇^T𝐇0)Tr(𝐇0T𝐇0)\mathrm{Tr}(\widehat{\bf H},{\bf H}_{0})=\frac{\mathrm{Tr}({\bf H}_{0}\widehat{\bf H}^{{}^{\mathrm{T}}}(\widehat{\bf H}^{{}^{\mathrm{T}}}\widehat{\bf H})^{-1}\widehat{\bf H}^{{}^{\mathrm{T}}}{\bf H}_{0})}{\mathrm{Tr}({\bf H}_{0}^{{}^{\mathrm{T}}}{\bf H}_{0})}. The trace statistic yields a value between 0 and 1, with a higher value indicating greater accuracy in estimation.

Scenario 1. First, we aim to explore the impact of overdispersion on the performance of OverGFM and other methods under consideration. In this scenario, we set (n,p)=(500,500)(n,p)=(500,500) and (ρ1,ρ2,ρ3)=(0.05,0.2,0.1)(\rho_{1},\rho_{2},\rho_{3})=(0.05,0.2,0.1) as fixed values, while varying the overdispersion parameter σ2\sigma^{2} within the grid {0.3,0.5,0.7}\{0.3,0.5,0.7\}. We compare OverGFM with other methods such as GFM, MRRR, PCAmix and LFM since only GFM, MRRR and PCAmix are able to handle the mixed-type data while LFM is widely used in practice despite not explicitly considering variable types. As shown in Figure 2, the results clearly demonstrate that OverGFM outperforms the other methods under consideration. This superiority becomes even more evident as the values of σ2\sigma^{2} increase. Notably, PCAmix shows good accuracy in estimating the factor matrix, but it performs poorly when it comes to estimating the loading-intercept matrix. This limitation can be attributed to the fact that PCAmix simply combines PCA and multiple correspondence analysis (MCA) to handle mixed-type data, and does not distinguish between count and continuous variables [21]. Furthermore, we observe that LFM performs poorly in estimating the intercept-loading matrix since LFM focuses solely on modeling linear dependencies among variables at the mean scale. This underscores the significance of capturing nonlinear dependencies between mixed-type variables.Additionally, we find that GFM, which does not account for overdispersion, exhibits inadequate performance in factor estimation. This emphasizes the significance of incorporating overdispersion into the modeling approach to achieve accurate results.

In addition, we investigate the performance of the proposed method in comparison to its competitors when the overdispersion mechanism is incorrectly specified and there are highly heavy tails present. The results (Figure S1) show that OverGFM is not only flexible to the overdispersion but also robust to the heavy-tail data and model misspecification, making it a highly attractive and favorable choice in practical applications; see Appendix B.1 in Supplementary Materials.

Refer to caption
Figure 2: Comparison of estimation accuracy among OverGFM and other methods under secenario 1 with three mixed-type variables, where (n,p)=(500,500),q=6,σ2{0.3,0.5,0.7}(n,p)=(500,500),q=6,\sigma^{2}\in\{0.3,0.5,0.7\}, Tr_H and Tr_Gamma denote the trace statistics with respect to 𝐇{\bf H} and Υ\Upsilon, respectively.

Scenario 2. To assess the estimation accuracy as the sample size (nn) or the number of variables (pp) increases, we generate data with a fixed number of variables (p=500p=500) and varying sample sizes (n{300,500,700}n\in\{300,500,700\}), or a fixed sample size (n=500n=500) and varying numbers of variables (p{300,400,500}p\in\{300,400,500\}). We set the overdispersion parameter to σ2=0.7\sigma^{2}=0.7 and other setting same as that in the scenario 1. We compare OverGFM with GFM, MRRR, PCAmix and LFM. Figure 3 demonstrates that OverGFM surpasses other methods in terms of estimation accuracy for factor and loading-intercept matrices across various structural dimensions. As nn or pp increases, the performance of OverGFM becomes better. We observe that the enhancement in intercept-loading matrix estimation is more sensitive to the sample size nn, while the improvement in factor matrix estimation is more sensitive to the variable dimension pp. This distinction arises because each intercept-loading vector is estimated based on information from nn individuals, whereas each factor vector is estimated using information from pp variables.

Refer to caption
Refer to caption
Figure 3: (a) & (b): Comparison of estimation accuracy among OverGFM and other methods under scenario 2 with varying sample size, i.e., p=500,n=(300,500,700)p=500,n=(300,500,700), and varying variable dimension, i.e.,n=500,p=(300,400,500)n=500,p=(300,400,500).

Scenario 3. We then investigate the influence of the signal strength in loading matrix on the performance of OverGFM. Specifically, we fix σ2=0.7\sigma^{2}=0.7 and (n,p)=(500,500)(n,p)=(500,500) while increase the signal strength by setting (ρ1,ρ2,ρ3)=c×(0.05,0.2,0.1)(\rho_{1},\rho_{2},\rho_{3})=c\times(0.05,0.2,0.1) with c{0.75,1,1.5,2}c\in\{0.75,1,1.5,2\}. Figure 4 clearly illustrates that as the signal strength increases, both OverGFM and other methods that account for variable types (GFM and PCAmix) exhibit an upward trend in estimation peformance while LFM not. Importantly, OverGFM consistently outperforms the other methods under comparison.

Refer to caption
Figure 4: Comparison of estimation accuracy among OverGFM and other methods under secenario 3 with three mixed-type variables, where (n,p)=(500,500),q=6(n,p)=(500,500),q=6, and (ρ1,ρ2,ρ3)=c×(0.05,0.2,0.1)(\rho_{1},\rho_{2},\rho_{3})=c\times(0.05,0.2,0.1) with c{0.75,1,1.5,2}c\in\{0.75,1,1.5,2\}.

Scenario 4. Furthermore, we investigate the performance of the SVR criterion given in Section 3.3 that selects the number of factors. We compare our proposed SVR method with the information criterion (IC) for GFM in [2], eigenvalue ratio (ER) and ratio of the growth rates (GR) based methods in [18], and adjusted correlation thresholding (ACT) method in [28]. Note that the ER, GR, and ACT methods were proposed specifically for the linear factor model framework. To make comparison fair, we set the same range {1,2,,15}\{1,2,\cdots,15\} as candidated values for SVR and other compared methods. For our analysis, we examine two cases for data generation. In case 1, we generate data incorporating a combination of three variable types, following the same way as described in Scenario 1. In case 2, we generate data containing a mix of Poisson and binary variables, using the same data generating process as outlined in scenario 7. Case 1 has stronger signal than case 2 in terms of the variable type since case 1 includes the continuous variables. For both cases, we keep the dimensions fixed at (n,p)=(300,300)(n,p)=(300,300) while varying the error variance (σ2\sigma^{2}) across the grid values of {0.1,1,3,5}\{0.1,1,3,5\} to investigate the impact of the overdispersion. Figure 5 provides valuable insights. In case 1 where there is a strong signal in the variable type, when the overdispersion is low (σ2=0.1\sigma^{2}=0.1), all methods successfully identify the underlying structure dimension. Nevertheless, when overdispersion reaches 33, only SVR and IC prove effective, whereas ACT, ER, and GR falter in capturing the true structure. Further amplifying the overdispersion to 55, SVR stands alone in its effectiveness. Moving on to case 2, characterized by a weak signal in the variable type, SVR, ER, and GR perform well when the overdispersion is low (σ2=0.1\sigma^{2}=0.1). However, with the escalation of overdispersion, only SVR retains the capacity to identify the true number of factors. However, a subsequent increase in overdispersion renders all methods ineffective, attributable to insufficient signals. Notably, the algorithm for the IC method breaks down when the overdispersion is high (σ23\sigma^{2}\geq 3).

Refer to caption
Figure 5: Comparison of factor number identification performance between the proposed SVR method and four alternative methods under (n,p)=(300,300)(n,p)=(300,300) and q=6q=6. Upper panel: mix of three variable types: normal, Poisson and binary. Bottom panel: mix of two variable types: Poisson and binary. The algorithm for the IC method breaks down when σ23\sigma^{2}\geq 3.

Scenario 5. Inadequate data signal may lead to incorrect estimation of the number of factors, as showed in Scenario 4. We designed this scenario to study how estimators perform when the number of factors is misselected. We set (n,p)=(300,500)(n,p)=(300,500) and q=6q=6, and vary the selected qq from {4,5,6,7,8,9}\{4,5,6,7,8,9\}. Other settings remained the same as in Scenario 1. In Figure 6, we observe that the estimation accuracy of OverGFM is consistently higher than that of the compared methods across all selected qqs. More importantly, we find that the estimation accuracy of OverGFM with over-selected qq significantly outperforms that with under-selected qq. These results offer valuable guidance for practitioners using OverGFM. Based on the SVR method, users can opt for larger values of qq to achieve more reliable and robust applications of the model.

Refer to caption
Figure 6: Comparison of estimation performance for OverGFM and four other methods when the number of factors is misselected from {4,5,6,7,8,9}\{4,5,6,7,8,9\} and the true factor number is q=6q=6.

Scenario 6. Finally, we assess the computational efficiency of OverGFM in comparison to GFM, MRRR and PCAmix since only these methods account for mixed-type variables. We consider two cases by generating data as the same as scenario 2. In case 1, we fix pp at 500500 while vary nn from 500500 to 1000010000; in case 2, we fix nn at 500500 while vary pp from 500500 to 1000010000 (Figure 7). Figure 7 displays the average running time over 20 runs for each method. Remarkably, OverGFM exhibits linear computational complexity with respect to both nn and pp, and outperforms the other methods, particularly MRRR and PCAmix. Our observations reveal that MRRR exhibits poor scalability concerning both the sample size and variable dimension. As these parameters increase, MRRR’s running time experiences a substantial surge. Specifically, when the sample size reaches 10000, MRRR takes approximately 3000 seconds which are too long to display. This finding highlights the limited scalability of MRRR. Additionally, our analysis suggests that PCAmix struggles to handle increasing variable dimensions efficiently. In this scenario, our results clearly demonstrate that OverGFM outperforms other methods in terms of computational efficiency, making it a highly attractive and favorable choice.

Refer to caption
Figure 7: Comparison of the average running time over 20 runs for OverGFM and three other methods: GFM, MRRR and PCAmix. Left panel: p=500,n{500,1000,2000,5000,10000}p=500,n\in\{500,1000,2000,5000,10000\}. Right panel: n=500,p{500,1000,2000,5000,10000}n=500,p\in\{500,1000,2000,5000,10000\}.

5 Real data analysis

In this section, we showcase the successful application of OverGFM in analyzing single-cell sequencing data within the genomics field. This includes the utilization of OverGFM on both a single-cell RNA sequencing (scRNA-seq) dataset and a single-cell multimodal sequencing dataset. The results demonstrate the effectiveness and versatility of OverGFM in handling diverse genomics data types.

5.1 scRNA-seq data of mouse olfactory bulb

In the analysis of single-cell RNA sequencing (scRNA-seq) data, the common presence of overdispersion is noticeable across various studies [29, 30, 14]. To show the utility of OverGFM, we apply it to analyze the scRNA-seq data obtained from the mouse olfactory bulb (OB), a neural structure involved in processing olfactory information and enabling the sense of smell.

Investigating the cell type heterogeneity and identifying marker genes within the OB holds substantial significance in this context. The data set, which can be accessed at https://panglaodb.se/view_data.php?sra=SRA667466&srs=SRS3060025, consists of 1,578 cells and 24,109 genes measured using the 10X chromium technology. The expression levels of each gene are represented as count reads, and the website provides cell cluster labels for all cells. This enables us to assess the performance of OverGFM and compare it with other methods in terms of feature extraction, by examining the association between the extracted features and the annotated cell clusters. Following the guideline of scRNA-seq data analysis [31], we first select the top 1,000 highly variable genes of high quality. By computing the variance-to-mean ratio, a widely utilized metric for assessing overdispersion, for each gene, we noted a pronounced overdispersion. Please refer to Supplementary Figure S3, which aligns with the observations in the previous studies. Based on the 1,000 count variables, we construct the continuous and binary variables to form a data with three variable types. To obtain continuous variables, the specific log-normalization was performed on a gene expression read count value zijz_{ij}, i.e., xij=ln(1+zij)x_{ij}=\ln(1+z_{ij}) that avoids the the issue of zij=0z_{ij}=0. To create binary variable, we assign a value of xij=1x_{ij}=1 if zij>0z_{ij}>0, and xij=0x_{ij}=0 if zij=0z_{ij}=0. Our primary objective is to investigate the dimension reduction performance of OverGFM by comparison with three other methods that can handle the mixed-type data, i.e., GFM, MRRR, PCAmix. Furthermore, we also compared OverGFM to LFM, which is commonly used in practice.

To evaluate the performance of OverGFM and other methods, we fit each method with different numbers of factors by varying q{2,4,,18,20}q\in\{2,4,\cdots,18,20\}. Subsequently, we calculate the adjusted McFadden’s pseudo R2 [32] between the extracted features and the annotated cell clusters for each fitted model. This metric provides a measure of the amount of biological information captured by the features, where a higher value indicates superior performance in dimension reduction. Notably, we observe that GFM encountered difficulties when applied to this data. Similar to simulations, its algorithm displayed instability and ultimately failed. Therefore, in Figure 8(a), we only present the McFadden’s pseudo R2 results for OverGFM, MRRR, PCAmix, and LFM. Remarkably, these findings indicate that OverGFM outperformed the other methods across the range of qq values considered. Furthermore, we recorded the running time for each method in Figure 8(b). The results consistently demonstrated that OverGFM exhibited the highest efficiency compared to MRRR and PCAmix. This finding aligns with the conclusions drawn from our simulations. By varying the selection of highly variable genes from 1,000 to 5,000, we confirm that OverGFM demonstrates remarkable scalability with respect to the variable dimension, completing computations in less than 160 seconds even for p=15,000p=15,000, as illustrated in Supplementary Figure S4. Additionally, the robustness of OverGFM is verified by selecting 2,000 highly variable genes and comparing it with other methods, as shown in Supplementary Figure S5.

Refer to caption
Figure 8: Comparison of OverGFM and three other methods: MRRR, PCAmix and LFM. (a) The adjusted McFadden’s pseudo R2 across different numbers of factors; (b) The running time across different numbers of factors.

Next, we show the valuable utility of the estimated factor matrix obtained from OverGFM in essential downstream analyses, such as cell type identification and differential gene expression analysis. Based on the proposed SVR criterion, we select the number of factors q^=6\hat{q}=6 by setting qmax=15q_{\max}=15. Then we fit OverGFM to obtain 66-dimensional features, denoted by 𝐇^\widehat{\bf H}. We perform the Louvain clustering on 𝐇^\widehat{\bf H}, which is widely used in single-cell RNA sequencing data analysis [31], and identify 10 distinct cell clusters. By visualizing the identified clusters on two-dimensional tSNE embeddings [33] extracted from 𝐇^\widehat{\bf H}, we can observe a clear separation of distinct cell clusters (Figure 9(a)). Moreover, upon comparing the identified clusters with the annotated cell clusters, we observe a close alignment between them (Figure 9(b)). In addition, we identify two subtypes of the annotated cluster 2 in Figure 9(b), which are clusters 1 and 5 in Figure 9(a). Based on the identified clusters, we detect the differentially expressed genes for each cluster. The dot plot (Figure 9(c)) demonstrates the clear separation of the identified top marker genes across the 10 distinct clusters, providing further evidence of the high-quality cell clustering achieved using 𝐇^\widehat{\bf H}. Using the marker genes and the cell-type database, PanglaoDB (https://panglaodb.se/), we manually map the 10 identified cell clusters to specific cell types. Table 1 provides the cell types for the identified cell clusters, along with the marker genes that determine these cell types. Our manual annotations reveal that clusters 1 and 5 represent subtypes of Purkinje neurons. To explore the roles of these two subtypes in cellular functional mechanisms, we performed Gene Ontology gene set enrichment analysis to investigate the functions associated with each subtype; see Figure S6 and Appendix B.2 in Supplementary Materials. All these results conclusively demonstrate that the estimated factor matrix of OverGFM is highly valuable and beneficial for scRNA-seq data analysis.

Refer to caption
Figure 9: Downstream analysis using the extracted features from OverGFM. (a) tSNE plot for visualizing the cluster labels of Louvain clustering using 𝐇^\widehat{\bf H}; (b) tSNE plot for visualizing the annotated cluster labels; (c) Dot plot of top five marker genes for the 13 identified clusters by Louvain clustering. Y-axis: marker genes.
Table 1: Identification of cell types for the ten cell clusters based on the detected marker genes.
Cell cluster 1 2 3 4 5
Cell type Purkinje neurons Interneurons Astrocytes Schwann cells Purkinje neurons
Marker genes Pcp4, Atp2b1, Snca Stmn2, Tmsb10, Tubb3 Mt3, Clu, Plpp3, Slc1a2 Apod, Fabp7, Ptn Pcp4, Atp2b1, Snca
Cell cluster 6 7 8 9 10
Cell type Microglia Endothelial cells Oligodendrocytes Oligodendrocyte progenitor cells Interneurons
Marker genes C1qa, C1qb, C1qc Bsg, Car4, Ly6c1 Cldn11, Cnp, Mal Olig1, Ptgds Cck, Slc17a7, Sncb

5.2 SNARE-seq data of mouse cerebral cortex

We integrate multi-modal data using OverGFM, measured by SNARE-seq technology [34] in adult mouse cerebral cortex, which is available by GEO accession number GSE126074. The dataset has 10309 cells with two modalities: chromatin accessibility (binary) and mRNA expression (read counts). The chromatin accessibility has 244544 sites, and mRNA expression has 33160 genes [34]. To streamline the analysis, we first filter out sites with fewer than 500 nonzero entries across all cells, resulting in a selection of 10085 sites. Additionally, we identify the top 2000 highly variable genes, bringing the total features for subsequent analysis to 12085. As no ground truth about the cell clusters is available, our focus lies in comparing the computational cost of OverGFM with other methods capable of handling mixed-type data. Utilizing the SVR criterion, we select the number of factors as q^=5\hat{q}=5 by setting qmax=15q_{\max}=15. For fair comparison, we fix the number of factors for the other compared methods at 5 as well. Figure 10(a) illustrates the notable computational advantage of OverGFM, requiring only 17 minutes, while GFM, PCAmix, and MRRR demand 203, 408, and 1004 minutes, respectively.

Refer to caption
Figure 10: SNARE-seq data analysis using OverGFM. (a) Comparison of running time for OverGFM and other methods that can handle mixed-type data; (b) tSNE plot for visualizing the cluster labels based on the estimated factors by OverGFM; (c) Heatmap of expresson levels for top five marker genes of the 12 clusters. The clusters are annotated by the marker genes. Ex: excitatory neurons, In: Inhibitory neurons, and L6: layer 6; (d) Barplots showing significant pathways from gene set enrichment analysis for two gene sets in the biological process category of the GO database.

Based on the 𝐇^\widehat{\bf H} obtained through OverGFM, we employ Louvain clustering to group cells exhibiting similar chromatin accessibility and gene expression profiles into 12 distinct clusters. To visualize these clusters effectively, we employ two-dimensional tSNEs. Figure 10(b) showcases the impressive separation achieved for different clusters. Subsequently, we perform gene differential expression analysis to pinpoint marker genes for each cluster, which can serve as identifying characteristics. This analysis is depicted in Figure 10(c). To determine the cell types represented by these clusters, we compare our identified marker genes with those documented in the published paper [34]. The results are presented in Figure 10(c), revealing the cell types associated with each cluster.

Except for cell typing, in this data analysis, we demonstrate that the estimated loading matrix 𝐁^Rp×5\widehat{\bf B}\in\mathrm{R}^{p\times 5} by OverGFM enhances the discovery of important gene sets, where p=2000+10085p=2000+10085. Specifically, we identify these crucial gene sets by ranking the magnitudes of loadings for each of the five directions. This approach is motivated by the fact that the magnitudes of loadings reflect the contribution of genes to the feature extraction process. Genes with larger loadings are deemed to contain more critical and informative characteristics, making them essential for the analysis and interpretation of the data. For each column of the 20002000-by-55 submatrix in the upper block of 𝐁^\widehat{\bf B}, we select the top 50 genes with the largest loading magnitudes to form a gene set; see Table S4 and Figure S7(a) in Supplementary Materials. Next, we conduct gene set enrichment analysis for the biological process category in the Gene Ontology database to explore the functions of these gene sets. Interestingly, Figure 10(d) and Supplementary Figure S7(b) show that gene sets 1-4, corresponding to loadings 1-4, are significantly enriched in biological processes related to cell junction assembly, cell-cell adhesion via plasma-membrane adhesion molecules, and synapse organization. These findings suggest that these gene sets play a vital role in establishing and maintaining the complex organization of the highly specialized brain region.

This data example unequivocally demonstrates that OverGFM is an immensely valuable and advantageous tool for multi-modal sequencing data analysis.

6 Discussion

We have introduced a novel statistical model named OverGFM, designed for the analysis of high-dimensional overdispersed mixed-type data. This model proves particularly valuable when dealing with scenarios where both the sample size (n) and variable dimension (p) are substantial. To address the computational challenges of large-scale data, we have developed a computationally efficient variational EM (VEM) algorithm. The VEM algorithm exhibits linear computational complexity with respect to sample size and variable dimension, ensuring its scalability. It offers straightforward implementation with explicit iterative solutions for all parameters and guarantees convergence, supported by theoretical proofs. Moreover, we developed a singular value ratio based method to determine the number of factors. In a series of numerical experiments, we have demonstrated that OverGFM surpasses existing methods, achieving superior estimation accuracy while reducing computation time. This makes OverGFM a compelling choice for analyzing extensive mixed-type datasets. Additionally, our application of OverGFM in the analysis of scRNA-seq and SNARE-seq data has proved its efficacy in unveiling the underlying structure of complex genomics data. We are confident that OverGFM holds the potential to enable essential discoveries not only in the field of genomics but also across other scientific domains. Its versatility and efficiency make it a promising tool for data analysis in various research areas.

A straightforward extension for OverGFM involves managing the high-dimensional mixed-type data with additional high-dimensional covariates. This extension would enable the model to explore the association between mixed-type variables and the extra covariates while also considering the presence of unobserved latent factors that cannot be explained by the covariates alone. We plan to pursue this direction in our future work, as it holds the promise of further enhancing the model’s capabilities and broadening its applicability to a wider range of real-world data analysis scenarios.

References

  • [1] Fan J, Xue L, Yao J. Sufficient forecasting using factor models. Journal of Econometrics 2017.
  • [2] Liu W, Lin H, Zheng S, Liu J. Generalized factor model for ultra-high dimensional correlated variables with mixed types. Journal of the American Statistical Association 2023; 118(542): 1385–1401.
  • [3] Jin S, Miao K, Su L. On factor models with random missing: EM estimation, inference, and cross validation. Journal of Econometrics 2021; 222(1): 745–777.
  • [4] Fama EF, French KR. Common risk factors in the returns on stocks and bonds. Journal of Financial Economics 1993; 33(1): 3–56.
  • [5] Liu W, Liao X, Yang Y, et al. Joint dimension reduction and clustering analysis of single-cell RNA-seq and spatial transcriptomics data. Nucleic Acids Research 2022; 50(12): e72–e72.
  • [6] Liu W, Liao X, Luo Z, et al. Probabilistic embedding, clustering, and alignment for integrating spatial transcriptomics data with PRECAST. Nature Communications 2023; 14(1): 296.
  • [7] Chen Y, Li X, Zhang S. Structured latent factor analysis for large-scale data: Identifiability, estimability, and their implications. Journal of the American Statistical Association 2020; 115(532): 1756–1770.
  • [8] Bai J, Ng S. Determining the number of factors in approximate factor models. Econometrica 2002; 70(1): 191–221.
  • [9] Bai J, Ng S. Principal components estimation and identification of static factors. Journal of Econometrics 2013; 176(1): 18–29.
  • [10] Li Q, Cheng G, Fan J, Wang Y. Embracing the blessing of dimensionality in factor models. Journal of the American Statistical Association 2018; 113(521): 380–389.
  • [11] Chen L, Dolado JJ, Gonzalo J. Quantile factor models. Econometrica 2021; 89(2): 875–910.
  • [12] Wang F. Maximum likelihood estimation and inference for high dimensional generalized factor models with application to factor-augmented regressions. Journal of Econometrics 2020.
  • [13] Liang KY, McCullagh P. Case studies in binary dispersion. Biometrics 1993: 623–630.
  • [14] Choudhary S, Satija R. Comparison and evaluation of statistical error models for scRNA-seq. Genome Biology 2022; 23(1): 27.
  • [15] Xia C, Fan J, Emanuel G, Hao J, Zhuang X. Spatial transcriptome profiling by MERFISH reveals subcellular RNA compartmentalization and cell cycle-dependent gene expression. Proceedings of the National Academy of Sciences 2019; 116(39): 19490–19499.
  • [16] Dempster AP, Laird NM, Rubin DB. Maximum likelihood from incomplete data via the EM algorithm. Journal of the Royal Statistical Society: Series B (Methodological) 1977; 39(1): 1–22.
  • [17] Wang C, Blei DM. Variational inference in nonconjugate models. Journal of Machine Learning Research 2013.
  • [18] Ahn SC, Horenstein AR. Eigenvalue ratio test for the number of factors. Econometrica 2013; 81(3): 1203–1227.
  • [19] Chen M, Fernández-Val I, Weidner M. Nonlinear factor models for network and panel data. Journal of Econometrics 2021; 220(2): 296–324.
  • [20] Luo C, Liang J, Li G, et al. Leveraging mixed and incomplete outcomes via reduced-rank modeling. Journal of Multivariate Analysis 2018; 167: 378–394.
  • [21] Chavent M, Kuentz V, Labenne A, Saracco J. Multivariate analysis of mixed data. The R Package PCAmixdata. Electronic Journal of Applied Statistical Analysis 2022; 15(3): 606–645.
  • [22] Landgraf AJ, Lee Y. Generalized principal component analysis: Projection of saturated model parameters. Technometrics 2020; 62(4): 459–472.
  • [23] Kenney T, Gu H, Huang T. Poisson PCA: Poisson measurement error corrected PCA, with application to microbiome data. Biometrics 2021; 77(4): 1369–1384.
  • [24] Chiquet J, Mariadassou M, Robin S. Variational inference for probabilistic Poisson PCA. The Annals of Applied Statistics 2018; 12(4): 2674–2698.
  • [25] Bai J, Ng S. Matrix completion, counterfactuals, and factor analysis of missing data. Journal of the American Statistical Association 2021; 116(536): 1746–1763.
  • [26] Argelaguet R, Arnol D, Bredikhin D, et al. MOFA+: a statistical framework for comprehensive integration of multi-modal single-cell data. Genome Biology 2020; 21(1): 1–17.
  • [27] Doz C, Giannone D, Reichlin L. A quasi–maximum likelihood approach for large, approximate dynamic factor models. Review of Economics and Statistics 2012; 94(4): 1014–1024.
  • [28] Fan J, Guo J, Zheng S. Estimating number of factors by adjusted eigenvalues thresholding. Journal of the American Statistical Association 2022; 117(538): 852–861.
  • [29] Kharchenko PV. The triumphs and limitations of computational methods for scRNA-seq. Nature Methods 2021; 18(7): 723–732.
  • [30] Hafemeister C, Satija R. Normalization and variance stabilization of single-cell RNA-seq data using regularized negative binomial regression. Genome Biology 2019; 20(1): 296.
  • [31] Stuart T, Butler A, Hoffman P, et al. Comprehensive integration of single-cell data. Cell 2019; 177(7): 1888–1902.
  • [32] McFadden D. Regression-based specification tests for the multinomial logit model. Journal of Econometrics 1987; 34(1-2): 63–82.
  • [33] Maaten V. dL, Hinton G. Visualizing data using t-SNE.. Journal of Machine Learning Research 2008; 9(11).
  • [34] Chen S, Lake BB, Zhang K. High-throughput sequencing of the transcriptome and chromatin accessibility in the same cell. Nature Biotechnology 2019; 37(12): 1452–1457.