Extracted main text — title through conclusion, appendix excluded. This is what our citation measures are computed over, published so the extraction can be checked by eye.
87,818 characters · 17 sections · 53 citation commands
Coresets for Regressions with Panel Data
\thispagestyle{empty}
{\tiny }
\thispagestyle{empty}
\setcounter{page}{1}
Panel data, represented as $X\in \mathbb{R}^{N\times T\times d}$ and $Y\in \mathbb{R}^{N\times T}$ where $N$ is the number of entities/individuals, $T$ is the number of time periods and $d$ is the number of features is widely used in statistics and applied machine learning. Such data track features of a cross-section of entities (e.g., customers) longitudinally over time. Such data are widely preferred in supervised machine learning for more accurate prediction and unbiased inference of relationships between variables relative to cross-sectional data (where each entity is observed only once) hsiao2003analysis, baltagi2008econometric.
The most common method for inferring relationships between variables using observational data involves solving regression problems on panel data. The main difference between regression on panel data when compared to cross-sectional data is that there may exist correlations within observations associated with entities over time periods. Consequently, the regression problem for panel data is the following optimization problem over regression variables $\beta \in \mathbb{R}^d$ and the covariance matrix $\Omega$ that is induced by the abovementioned correlations: $\min_{\beta\in \mathbb{R}^d, \Omega\in \mathbb{R}^{T\times T}} \sum_{i\in [N]} (y_i - X_i \beta)^\top \Omega^{-1} (y_i - X_i \beta).$ Here $X_i\in \mathbb{R}^{T\times d}$ denotes the observation matrix of entity $i$ whose $t$-th row is $x_{it}$ and $\Omega$ is constrained to have largest eigenvalue at most 1 where $\Omega_{t t'}$ represents the correlation between time periods $t$ and $t'$. This regression model is motivated by the random effects model (Eq. (ref) and Appendix (ref)), common in the panel data literature hoechle2007robust,griffiths1985theory,frees2004longitudinal. A common way to define the correlation between observations is an autocorrelation structure $\mathsf{AR}(q)$ haddad1998simple,lesage1999theory whose covariance matrix $\Omega$ is induced by a vector $\rho\in \mathbb{R}^{q}$ (integer $q\geq 1$). This type of correlation results in the generalized least-squares estimator (GLSE), where the parameter space is ${\mathcal{P}} = R^{d+q}$.
As the ability to track entities on various features in real-time has grown, panel datasets have grown massively in size. However, the size of these datasets limits the ability to apply standard learning algorithms due to space and time constraints. Further, organizations owning data may want to share only a subset of data with others seeking to gain insights to mitigate privacy or intellectual property related risks. Hence, a question arises: {\em can we construct a smaller subset of the panel data on which we can solve the regression problems with performance guarantees that are close enough to those obtained when working with the complete dataset?}
One approach to this problem is to appeal to the theory of “coresets.” Coresets, proposed in agarwal2004approximating, are weighted subsets of the data that allow for fast approximate inference for a large dataset by solving the problem on the smaller coreset. Coresets have been developed for a variety of unsupervised and supervised learning problems; for a survey, see phillips2016coresets. But, thus, far coresets have been developed only for $\ell_2$-regression cross-sectional data drineas2006sampling,li2013iterative,boutsidis2013near,cohen2015uniform,jubran2019fast; no coresets have been developed for regressions on panel data -- an important limitation, given their widespread use and advantages.
Roughly, a coreset for cross-sectional data is a weighted subset of observations associated with entities that approximates the regression objective for every possible choice of regression parameters. An idea, thus, is to construct a coreset for each time period (cross-section) and output their union as a coreset for panel data. However, this union contains at least $T$ observations which is undesirable since $T$ can be large. Further, due to the covariance matrix $\Omega$, it is not obvious how to use this union to approximately compute regression objectives. With panel data, one needs to consider both how to sample entities, and within each entity how to sample observations across time. Moreover, we also need to define how to compute regression objectives on such a coreset consisting of entity-time pairs.
Our contributions. We initiate the study of coresets for versions of $\ell_2$-regression with panel data, including the ordinary least-squares estimator (OLSE; Definition (ref)), the generalized least-squares estimator (GLSE; Definition (ref)), and a clustering extension of GLSE (GLSE$_k$; Definition (ref)) in which all entities are partitioned into $k$ clusters and each cluster shares the same regression parameters.
Overall, we formulate the definitions of coresets and propose efficient construction of $\varepsilon$-coresets of sizes independent of $N$ and $T$. Our key contributions are:
Our coresets for GLSE/GLSE$_k$ leverage the Feldman-Langberg (FL) framework feldman2011unified (Algorithms (ref) and (ref)). The $\rho$ variables make the objective function of GLSE non-convex in contrast to the cross-sectional data setting where objective functions are convex. Thus, bounding the “sensitivity” (Lemma (ref)) of each entity-time pair for GLSE, which is a key step in coreset construction using the FL framework, becomes significantly difficult. We handle this by upper-bounding the maximum effect of $\rho$, based on the observation that the gap between the regression objectives of GLSE and OLSE with respect to the same $\beta\in \mathbb{R}^d$ is always constant, which enables us to reduce the problem to the cross-sectional setting. For GLSE$_k$, a key difficulty is that the clustering centers are subspaces induced by regression vectors, instead of points as in Gaussian mixture models or $k$-means. Hence, it is unclear how GLSE$_k$ can be reduced to projective clustering used in Gaussian mixture models; see feldman2019coresets. To bypass this, we consider observation vectors of an individual as one entity and design a two-staged framework in which the first stage selects a subset of individuals that captures the $\min$ operations in the objective function and the second stage applies our coreset construction for GLSE on each selected individuals. As in the case of GLSE, bounding the “sensitivity” (Lemma (ref)) of each entity for GLSE$_k$ is a key step at the first stage. Towards this, we relate the total sensitivity of entities to a certain “flexibility” (Lemma (ref)) of each individual regression objective which is, in turn, shown to be controlled by the $M$-bounded assumption (Definition (ref)).
We implement our GLSE coreset construction algorithm and test it on synthetic and real-world datasets while varying $\varepsilon$. Our coresets perform well relative to uniform samples on multiple datasets with different generative distributions. Importanty, the relative performance is robust and better on datasets with outliers. The maximum empirical error of our coresets is always below the guaranteed $\varepsilon$ unlike with uniform samples. Further, for comparable levels of empircal error, our coresets perform much better than uniform sampling in terms of sample size and coreset construction speed.
With panel data, depending on different generative models, there exist several ways to define $\ell_2$-regression hoechle2007robust,griffiths1985theory,frees2004longitudinal, including the pooled model, the fixed effects model, the random effects model, and the random parameters model. In this paper, we consider the random effects model (Equation (ref)) since the number of parameters is independent of $N$ and $T$ (see Section (ref) for more discussion).
For cross-sectional data, there is more than a decade of extensive work on coresets for regression; e.g., $\ell_2$-regression drineas2006sampling,li2013iterative,boutsidis2013near,cohen2015uniform,jubran2019fast, $\ell_1$-regression clarkson2005subgradient,sohler2011subspace,clarkson2016fast, generalized linear models huggins2016coresets,molina2018core and logistic regression reddi2015communication,huggins2016coresets,munteanu2018coresets,Tolochinsky2018GenericCF. The most relevant for our paper is $\ell_2$-regression (least-squares regression), which admits an $\varepsilon$-coreset of size $O(d/\varepsilon^2)$ boutsidis2013near and an accurate coreset of size $O(d^2)$ jubran2019fast.
With cross-sectional data, coresets have been developed for a large family of problems in machine learning and statistics, including clustering feldman2011unified,feldman2013turning,huang2020coresets, mixture model lucic2017training, low rank approximation cohen2017input, kernel regression zheng2017coresets and logistic regression munteanu2018coresets. We refer interested readers to recent surveys munteanu2018survey,feldman2020survey. It is interesting to investigate whether these results can be generalized to panel data.
{There exist other variants of regression sketches beyond coreset, including weighted low rank approximation Clarkson2017LowRankAA, row sampling cohen2015lp, and subspace embedding sohler2011subspace,meng2013low. These methods mainly focus on the cross-sectional setting. It is interesting to investigate whether they can be adapted to the panel data setting that with an additional covariance matrix.}
We consider the following generative model of $\ell_2$-regression: for $(i,t)\in [N]\times [T]$,
where $\beta_i\in \mathbb{R}^d$ and $e_{it}\in \mathbb{R}$ is the error term drawn from a normal distribution. Sometimes, we may include an additional entity or individual specified effect $\alpha_i\in \mathbb{R}$ so that the outcome can be represented by $y_{it} = x_{it}^\top \beta_i+ \alpha_i + e_{it}$. This is equivalent to Equation (ref) by appending an additional constant feature to each observation $x_{it}$.
As in the case of cross-sectional data, we assume there is no correlation between individuals. Using this assumption, the $\ell_2$-regression function can be represented as follows: for any regression parameters $\zeta\in {\mathcal{P}}$ (${\mathcal{P}}$ is the parameter space), $ \psi(\zeta) = \sum_{i\in [N]} \psi_i(\zeta), $ where $\psi_i$ is the individual regression function. Depending on whether there is correlation within individuals and whether $\beta_i$ is unique, there are several variants of $\psi_i$. The simplest setting is when all $\beta_i$s are the same, say $\beta_i=\beta$, and there is no correlation within individuals. This setting results in the ordinary least-squares estimator (OLSE); summarized in the following definition.
Consider the case when $\beta_i$ are the same but there may be correlations between time periods within individuals. A common way to define the correlation is called autocorrelation $\mathsf{AR}(q)$ haddad1998simple,lesage1999theory, in which there exists $\rho\in B^q$, where $q\geq 1$ is an integer and $B^q = \left\{x\in \mathbb{R}^q: \|x\|_2<1\right\}$, such that
This autocorrelation results in the generalized least-squares estimator (GLSE).
The main difference from OLSE is that a sub-function $\psi^{(G,q)}_{it}$ is not only determined by a single observation $(x_{it},y_{it})$; instead, the objective of $\psi^{(G,q)}_{it}$ may be decided by up to $q+1$ contiguous observations $(x_{i,\max\left\{1,t-q\right\}},y_{i,\max\left\{1,t-q\right\}}),\ldots,(x_{it},y_{it})$.
Motivated by $k$-means clustering tan2006cluster, we also consider a generalized setting of GLSE, called GLSE$_k$ ($k\geq 1$ is an integer), in which all individuals are partitioned into $k$ clusters and each cluster corresponds to the same regression parameters with respect to some GLSE.
GLSE$_k$ is a basic problem with applications in many real-world fields; as accounting for unobserved heterogeneity in panel regressions is critical for unbiased estimates arellano2002panel,halaby2004panel. Note that each individual selects regression parameters $(\beta^{(l)}, \rho^{(l)})$ ($l\in [k]$) that minimizes its individual regression objective for GLSE. Note that GLSE$_1$ is exactly GLSE. Also note that GLSE$_k$ can be regarded as a generalized version of clustered linear regression ari2002clustered, in which there is no correlation within individuals.
In this section, we show how to define coresets for regression on panel data, including OLSE and GLSE. Due to the additional autocorrelation parameters, it is not straightforward to define coresets for GLSE as in the cross-sectional setting. One way is to consider all observations of an individual as an indivisible group and select a collection of individuals as a coreset. However, this construction results in a coreset of size depending on $T$, which violates the expectation that the coreset size should be independent of $N$ and $T$. To avoid a large coreset size, we introduce a generalized definition: coresets of a query space, which captures the coreset definition for OLSE and GLSE.
Intuitively, $\psi$ represents a linear combination of weighted functions indexed by ${\mathcal{X}}$, and ${\mathcal{P}}$ represents the ground set of $\psi$. Due to the separability of $\psi$, we have the following coreset definition.
Here, $\psi_S$ is a computation function over the coreset that is used to estimate the total cost of ${\mathcal{X}}$. By Definitions (ref) and (ref), the regression objectives of OLSE and GLSE can be decomposed into $NT$ sub-functions. Thus, we can apply the above definition to define coresets for OLSE and GLSE. Note that OLSE is a special case of GLSE for $q=0$. Thus, we only need to provide the coreset definition for GLSE. We let $u=1$ and ${\mathcal{P}} = \mathbb{R}^d\times B^q$. The index set of GLSE has the following form:
where each element $z_{it}$ consists of at most $q+1$ observations. Also, for every $z_{it}\in Z^{(G,q)}$ and $\zeta=(\beta,\rho)\in {\mathcal{P}}$, the cost function $\psi_{it}$ is: if $t=1$, $ \psi^{(G,q)}_{it}(\zeta) = (1-\|\rho\|_2^2)\cdot (y_{i1}-x_{i1}^\top \beta)^2; $ and if $t\neq 1$, $ \psi^{(G,q)}_{it}(\zeta) =\left((y_{it}-x_{it}^\top \beta)-\sum_{j=1}^{\min\left\{t-1,q\right\}} \rho_j (y_{i,t-j}-x_{i,t-j}^\top \beta)\right)^2. $ Thus, $(Z^{(G,q)},{\mathcal{P}},\psi^{(G,q)})$ is a query space of GLSE.\footnote{Here, we slightly abuse the notation by using $\psi^{(G,q)}_{it}(\zeta)$ instead of $\psi^{(G,q)}_{z_{it}}(\zeta)$.} Then by Definition (ref), we have the following coreset definition for GLSE.
The weighted set $S$ is exactly an $\varepsilon$-coreset of the query space $(Z^{(G,q)},{\mathcal{P}},\psi^{(G,q)})$. Note that the number of points in this coreset $S$ is at most $(q+1)\cdot|S|$. Specifically, for OLSE, the parameter space is $\mathbb{R}^d$ since $q=0$, and the corresponding index set is $ Z^{(O)} = \left\{z_{it}=(x_{it},y_{it}) : (i,t)\in [N]\times [T] \right\}. $ Consequently, the query space of OLSE is $(Z^{(O)},\mathbb{R}^d,\psi^{(O)})$.
\paragraph{Coresets for GLSE$_k$} Due to the $\min$ operation in Definition (ref), the objective function $\psi^{(G,q,k)}$ can only be decomposed into sub-functions $\psi^{(G,q,k)}_i$ instead of individual-time pairs. Then let $u=1$, ${\mathcal{P}}^k = \left(\mathbb{R}^{d}\times B^q\right)^k$, and $ Z^{(G,q,k)}=\left\{z_i=(x_{i1},y_{i1},\ldots, x_{iT},y_{iT}): i\in [N]\right\}. $ We can regard $(Z^{(G,q,k)},{\mathcal{P}}^k,\psi^{(G,q,k)})$ as a query space of GLSE$_k$. By Definition (ref), an $\varepsilon$-coreset of $(Z^{(G,q,k)},{\mathcal{P}}^k,\psi^{(G,q,k)})$ is a subset $I_S\subseteq [N]$ together with a weight function $w': I_S\rightarrow \mathbb{R}_{\geq 0}$ such that for any $\zeta\in {\mathcal{P}}^k$,
However, each $z_i\in Z^{(G,q,k)}$ consists of $T$ observations, and hence, the number of points in this coreset $S$ is $T\cdot |S|$. To avoid the size dependence of $T$, we propose a new coreset definition for GLSE$_k$. The intuition is to further select a subset of time periods to estimate $\psi^{(G,q,k)}_i$.
Given $S\subseteq [N]\times [T]$, we denote $I_S := \left\{i\in [N]: \exists t\in [T], s.t., (i,t)\in S \right\}$ as the collection of individuals that appear in $S$. Moreover, for each $i\in I_S$, we denote $J_{S,i}:=\left\{t\in [T]: (i,t)\in S\right\}$ to be the collection of observations for individual $i$ in $S$.
The key is to incorporate $\min$ operations in the computation function $\psi^{(G,q,k)}_S$ over the coreset. Similar to GLSE, the number of points in such a coreset $S$ is at most $(q+1)\cdot|S|$.
{ In this section, we show how to construct coresets for GLSE. We let the parameter space be ${\mathcal{P}}_\lambda = \mathbb{R}^d\times B^q_{1-\lambda}$ for some constant $\lambda\in (0,1)$ where $B^q_{1-\lambda}=\left\{\rho\in \mathbb{R}^q: \|\rho\|_2^2\leq 1-\lambda \right\}$. The assumption of the parameter space $B^q_{1-\lambda}$ for $\rho$ is based on the fact that $\|\rho\|_2^2< 1$ ($\lambda\rightarrow 0$) is a stationary condition for $\mathsf{AR}(q)$ lesage1999theory.
\sloppy Note that the coreset in the above theorem contains at most $ (q+1)\cdot O\left(\varepsilon^{-2}\lambda^{-1} qd\left(\max\left\{q^2d, qd^2\right\}\cdot \log \frac{d}{\lambda}+\log \frac{1}{\delta}\right) \right) $ points $(x_{it},y_{it})$, which is independent of both $N$ and $T$. Also note that if both $\lambda$ and $\delta$ are away from 0, e.g., $\lambda=\delta=0.1$ the number of points in the coreset can be further simplified: $ O\left(\varepsilon^{-2} \max\left\{q^4 d^2, q^3 d^3\right\}\cdot \log d\right) = \operatorname{poly}(q,d,1/\varepsilon). $
We summarize the algorithm of Theorem (ref) in Algorithm (ref), which takes a panel dataset $(X,Y)$ as input and outputs a coreset $S$ of individual-time pairs. The main idea is to use importance sampling (Lines 6-7) leveraging the Feldman-Langberg (FL) framework feldman2011unified,braverman2016new. The key new step appears in Line 5, which computes a sensitivity function $s$ for GLSE that defines the sampling distribution. Also note that the construction of $s$ is based on another function $s^{(O)}$ (Line 4), which is actually a sensitivity function for OLSE that has been studied in the literature boutsidis2013near.
Feldman and Langberg feldman2011unified show how to construct coresets by importance sampling and the coreset size has been improved by braverman2016new.
Here, the sensitivity function $s$ measures the maximum influence for each $x_{it}\in X$.
Note that the above is an importance sampling framework that takes samples from a distribution proportional to sensitivities. The sample complexity is controlled by the total sensitivity ${\mathcal{G}}$ and the pseudo-dimension $\dim$. Hence, to apply the FL framework, we need to upper bound the pseudo-dimension and construct a sensitivity function.
Algorithm (ref) applies the FL framework (Feldman and Langberg feldman2011unified) that constructs coresets by importance sampling and the coreset size has been improved by braverman2016new. The key is to verify the “pseudo-dimension” (Lemma (ref)) and “sensitivities” (Lemma (ref)) separately; summarized as follows.
\paragraph{Upper bounding the pseudo-dimension.} We have the following lemma that upper bounds the pseudo-dimension of $(Z^{(G,q)},{\mathcal{P}}_\lambda,\psi^{(G,q)})$.
The proof can be found in Section (ref). The main idea is to apply the prior results anthony2009neural,vidyasagar2002theory which shows that the pseudo-dimension is polynomially dependent on the number of regression parameters ($q+d$ for GLSE) and the number of operations of individual regression objectives ($O(qd)$ for GLSE). Consequently, we obtain the bound $O\left((q+d)qd \right)$ in Lemma (ref).
\paragraph{Constructing a sensitivity function.} Next, we show that the function $s$ constructed in Line 5 of Algorithm (ref) is indeed a sensitivity function of GLSE that measures the maximum influence for each $x_{it}\in X$; summarized by the following lemma.
Intuitively, if the sensitivity $s(i,t)$ is large, e.g., close to 1, $\psi^{(G,q)}_{it}$ must contribute significantly to the objective with respect to some parameter $\zeta\in {\mathcal{P}}_\lambda$. The sampling ensures that we are likely to include such pair $(i,t)$ in the coreset for estimating $\psi(\zeta)$. Due to the fact that the objective function of GLSE is non-convex which is different from OLSE, bounding the sensitivity of each individual-time pair for GLSE becomes significantly difficult. To handle this difficulty, we develop a reduction of sensitivities from GLSE to OLSE (Line 5 of Algorithm (ref)), based on the relations between $\psi^{(G,q)}$ and $\psi^{(O)}$, i.e., for any $\zeta=(\beta,\rho)\in {\mathcal{P}}_\lambda$ we prove that $ \psi^{(G,q)}_i(\zeta) \geq \lambda \cdot \psi^{(O)}_i(\beta) \text{ and } \psi^{(G,q)}_{it}(\zeta) \leq 2\cdot\left(\psi^{(O)}_{it} (\beta) +\sum_{j=1}^{\min\left\{t-1,q\right\}} \psi^{(O)}_{i,t-j}(\beta)\right). $ The first inequality follows from the fact that the smallest eigenvalue of $\Omega_\rho^{-1}$ (the inverse covariance matrix induced by $\rho$) is at least $\lambda$. The intuition of the second inequality is from the form of function $\psi^{(G,q)}_{it}$, which relates to $\min\left\{t, q+1\right\}$ individual-time pairs, say $(x_{i,\min\left\{1,t-q\right\}}, y_{i,\min\left\{1, t-q\right\}}), \ldots, (x_{it},y_{it})$. Combining these two inequalities, we obtain a relation between the sensitivity function $s$ for GLSE and the sensitivity function $s^{(O)}$ for OLSE, based on the following observation: for any $\zeta=(\beta,\rho)\in {\mathcal{P}}_\lambda$,
which leads to the construction of $s$ in Line 5 of Algorithm (ref). Then it suffices to construct $s^{(O)}$ (Lines 2-4 of Algorithm (ref)), which reduces to the cross-sectional data setting and has total sensitivity at most $d+1$ (Lemma (ref)). Consequently, we conclude that the total sensitivity ${\mathcal{G}}$ of GLSE is $O(\lambda^{-1}qd)$ by the definition of $s$.
Now we are ready to prove Theorem (ref).
Our proof idea is similar to that in lucic2017training. For preparation, we need the following lemma which is proposed to bound the pseudo-dimension of feed-forward neural networks.
Note that the above lemma requires that the range of functions $f_x$ is $[0,1]$. We have the following lemma which can help extend this range to $\mathbb{R}$.
Now we are ready to prove Lemma (ref).
We prove Lemma (ref) by relating sensitivities between GLSE and OLSE. For preparation, we give the following lemma that upper bounds the total sensitivity of OLSE. Given two integers $a,b\geq 1$, denote $T(a,b)$ to be the computation time of a column basis of a matrix in $\mathbb{R}^{a\times b}$. For instance, a column basis of a matrix in $\mathbb{R}^{a\times b}$ can be obtained by computing its SVD decomposition, which costs $O(\min\left\{a^2 b, ab^2\right\})$ time by cline2006computation.
Now we are ready to prove Lemma (ref).
Following from Section (ref), we assume that the parameter space is ${\mathcal{P}}_\lambda^k = (\mathbb{R}^d \times B^q_{1-\lambda})^k$ for some given constant $\lambda\in (0,1)$. Given a panel dataset $X\in \mathbb{R}^{N\times T\times d}$ and $Y\in \mathbb{R}^{N\times T}$, let $Z^{(i)}\in \mathbb{R}^{T\times (d+1)}$ denote a matrix whose $t$-th row is $(x_{it},y_{it})\in \mathbb{R}^{d+1}$ for all $t\in [T]$ ($i\in [N]$). Assume there exists constant $M\geq 1$ such that the input dataset satisfies the following property.
If there exists $i\in [N]$ and $\beta\in \mathbb{R}^d$ such that $\psi^{(O)}_i(\beta)=0$, we let $M=\infty$. Specifically, if all $(Z^{(i)})^\top Z^{(i)}$ are identity matrix whose eigenvalues are all 1, i.e., for any $\beta$, $\psi^{(O)}_i(\beta) = \|\beta\|_2^2+1$, we can set $M=1$. Another example is that if $n\gg d$ and all elements of $Z^{(i)}$ are independently and identically distributed standard normal random variables, then the condition number of matrix $(Z^{(i)})^\top Z^{(i)}$ is upper bounded by some constant with high probability (and constant in expectation) chen2005condition,shi2013the, which may also imply $M = O(1)$. The main theorem is as follows.
Similar to GLSE, this coreset for GLSE$_k$ ($k\geq 2$) contains at most \[ (q+1)\cdot O\left(\varepsilon^{-4} \lambda^{-2} M k^2 \max\left\{q^7 d^4, q^5 d^6\right\} \cdot \log \frac{Mq}{ \lambda} \log \frac{kd}{\lambda} \right) \] points $(x_{it},y_{it})$, which is independent of both $N$ and $T$ when $M$ is constant. Note that the size contains an addtional factor $M$ which can be unbounded. Our algorithm is summarized in Algorithm (ref) and we outline Algorithm (ref) and discuss the novelty in the following.
We also provide a lower bound theorem which shows that the size of a coreset for GLSE$_k$ can be up to $\Omega(N)$. It indicates that the coreset size should contain additional factors than $k,q,d,1/\varepsilon$, which reflects the reasonability of the $M$-bounded assumption.
We first give a proof overview for summarization.
\paragraph{Proof overview of Theorem (ref).} For GLSE$_k$, we propose a two-staged framework (Algorithm (ref)): first sample a collection of individuals and then run $\mathbf{CGLSE}$ on every selected individuals. By Theorem (ref), each subset $J_{S,i}$ at the second stage is of size $\operatorname{poly}(q,d)$. Hence, we only need to upper bound the size of $I_S$ at the first stage. By a similar argument as that for GLSE, we can define the pseudo-dimension of GLSE$_k$ and upper bound it by $\operatorname{poly}(k,q,d)$, and hence, the main difficulty is to upper bound the total sensitivity of GLSE$_k$. We show that the gap between the individual regression objectives of GLSE$_k$ and OLSE$_k$ (GLSE$_k$ with $q=0$) with respect to the same $(\beta^{(1)},\ldots,\beta^{(k)})$ is at most $\frac{2(q+1)}{\lambda}$, which relies on $ \psi^{(G,q)}_i(\zeta) \geq \lambda \cdot \psi^{(O)}_i(\beta)$ and an observation that for any $\zeta=(\beta^{(1)},\ldots,\beta^{(k)},\rho^{(1)},\ldots,\rho^{(k)})\in {\mathcal{P}}^k$, $ \psi^{(G,q,k)}_i(\zeta) \leq 2(q+1)\cdot \min_{l\in [k]} \psi^{(O)}_{i}(\beta^{(l)}). $ Thus, it suffices to provide an upper bound of the total sensitivity for OLSE$_k$. We claim that the maximum influence of individual $i$ is at most $\frac{u_i}{u_i+\sum_{j\neq i} \ell_j}$ where $u_i$ is the largest eigenvalue of $(Z^{(i)})^\top Z^{(i)}$ and $\ell_j$ is the smallest eigenvalue of $(Z^{(j)})^\top Z^{(j)}$. This fact comes from the following observation: $ \min_{l\in [k]}\|Z^{(i)} (\beta^{(l)},-1)\|_2^2 \leq \frac{u_i}{\ell_j}\cdot \min_{l\in [k]}\|Z^{(j)} (\beta^{(l)},-1)\|_2^2, $ and results in an upper bound $M$ of the total sensitivity for OLSE$_k$ since $ \sum_{i\in [N]} \frac{u_i}{u_i+\sum_{j\neq i} \ell_j} \leq \frac{\sum_{i\in [N]} u_i}{\sum_{j\in [N]} \ell_j} \leq M. $
\paragraph{Proof overview of Theorem (ref).} For GLSE$_k$, we provide a lower bound $\Omega(N)$ of the coreset size by constructing an instance in which any 0.5-coreset should contain observations from all individuals. Note that we consider $T=1$ which reduces to an instance with cross-sectional data. Our instance is to let $x_{i1}=(4^i,\frac{1}{4^i})$ and $y_{i1}=0$ for all $i\in [N]$. Then letting $\zeta^{(i)}=(\beta^{(1)},\beta^{(2)},\rho^{(1)},\rho^{(2)})$ where $\beta^{(1)}=(\frac{1}{4^i},0)$, $\beta^{(2)}=(0,4^i)$ and $\rho^{(1)}=\rho^{(2)}=0$, we observe that $\psi^{(G,q,k)}(\zeta^{(i)})\approx \psi^{(G,q,k)}_i(\zeta^{(i)})$. Hence, all individuals should be contained in the coreset such that regression objectives with respect to all $\zeta^{(i)}$ are approximately preserved.
The proof of Theorem (ref) relies on the following two theorems. The first theorem shows that $I_S$ of Algorithm (ref) is an $\frac{\varepsilon}{3}$-coreset of $\left(Z^{G,q,k},{\mathcal{P}}_\lambda^k,\psi^{(G,q,k)}\right)$. The second one is a reduction theorem that for each individual in $I_S$ constructs an $\varepsilon$-coreset $J_{S,i}$.
We defer the proof of Theorem (ref) later.
Observe that Theorem (ref) is a direct corollary of Theorems (ref) and (ref).
\paragraph{Proof of Theorem (ref): $I_S$ is a coreset of $\left(Z^{(G,q,k)},{\mathcal{P}}_\lambda^k,\psi^{(G,q,k)}\right)$.} It remains to prove Theorem (ref). Note that the construction of $I_S$ applies the Feldman-Langberg framework. The analysis is similar to Section (ref) in which we provide upper bounds for both the total sensitivity and the pseudo-dimension.
We first discuss how to bound the total sensitivity of $(Z^{(G,q,k)},{\mathcal{P}}^k,\psi^{(G,q,k)})$. Similar to Section (ref), the idea is to first bound the total sensitivity of $(Z^{(G,0,k)},{\mathcal{P}}^k,\psi^{(G,0,k)})$ -- we call it the query space of OLSE$_k$ whose covariance matrices of all individuals are identity matrices.
Note that by the above argument, we can also assume \[ \sum_{i\in [N]}\frac{u_i}{u_i+\sum_{i'\neq i} \ell_{i'}} \leq M, \] which leads to the same upper bound for the total sensitivity ${\mathcal{G}}^{(O)}$. Now we are ready to upper bound the total sensitivity of $(Z^{(G,q,k)},{\mathcal{P}}^k,\psi^{(G,q,k)})$.
Next, we upper bound the pseudo-dimension of GLSE$_k$. The proof is similar to that of GLSE by applying Lemmas (ref) and (ref).
Combining with the above lemmas and Theorem (ref), we are ready to prove Theorem (ref).
Actually, we prove a stronger version of Theorem (ref) in the following. We show that both the coreset size and the total sensitivity of the query space $(Z^{(G,q,k)},u,{\mathcal{P}}_\lambda^k,\psi^{(G,q,k)})$ may be $\Omega(N)$, even for the simple case that $T=1$ and $d=k=2$.
We implement our coreset algorithms for GLSE, and compare the performance with uniform sampling on synthetic datasets and a real-world dataset. The experiments are conducted by PyCharm on a 4-Core desktop CPU with 8GB RAM.\footnote{Codes are in \url{https://github.com/huanglx12/Coresets-for-regressions-with-panel-data}.}
\noindentDatasets. We experiment using synthetic datasets with $N=T=500$ ($250k$ observations), $d=10$, $q=1$ and $\lambda = 0.2$. For each individual $i\in [N]$, we first generate a mean vector $\overline{x}_i\in \mathbb{R}^{d}$ by first uniformly sampling a unit vector $x'_i\in \mathbb{R}^d$, and a length $\tau\in [0,5]$, and then letting $\overline{x}_i = \tau x'_i$. Then for each time period $t\in [T]$, we generate observation $x_{it}$ from a multivariate normal distribution $N(\overline{x}_i, \|\overline{x}_i\|_2^2\cdot I)$ tong2012multivariate.\footnote{The assumption that the covariance of each individual is proportional to $\|\overline{x}_i\|_2^2$ is common in econometrics. We also fix the last coordinate of $x_{it}$ to be 1 to capture individual specific fixed effects.} Next, we generate outcomes $Y$. First, we generate a regression vector $\beta\in \mathbb{R}^d$ from distribution $N(0,I)$. Then we generate an autoregression vector $\rho\in \mathbb{R}^q$ by first uniformly sampling a unit vector $\rho'\in \mathbb{R}^q$ and a length $\tau\in [0,1-\lambda]$, and then letting $\rho = \tau \rho'$. Based on $\rho$, we generate error terms $e_{it}$ as in Equation (ref). To assess performance robustness in the presence of outliers, we simulate another dataset replacing $N(0,I)$ in Equation (ref) with the heavy tailed Cauchy(0,2) distribution ma2014statistical. Finally, the outcome $y_{it} = x_{it}^\top \beta+e_{it}$ is the same as Equation (ref).
We also experiment on a real-world dataset involving the prediction of monthly profits from customers for a credit card issuer as a function of demographics, past behaviors, and current balances and fees. The panel dataset consisted of 250k observations: 50 months of data ($T=50$) from 5000 customers ($N=5000$) with 11 features ($d=11$). We set $q=1$ and $\lambda = 0.2$.
\noindentBaseline and metrics. As a baseline coreset, we use uniform sampling (Uni), perhaps the simplest approach to construct coresets: Given an integer $\Gamma$, uniformly sample $\Gamma$ individual-time pairs $(i,t)\in [N]\times [T]$ with weight $\frac{NT}{\Gamma}$ for each.
Given regression parameters $\zeta$ and a subset $S\subseteq [N]\times [T]$, we define the empirical error as $\left| \frac{\psi^{(G,q)}_S(\zeta)}{\psi^{(G,q)}(\zeta)}-1 \right|$. We summarize the empirical errors $e_1,\ldots, e_n$ by maximum, average, standard deviation (std) and root mean square error (RMSE), where RMSE$= \sqrt{\frac{1}{n}\sum_{i\in [n]}e_i^2}$. By penalizing larger errors, RMSE combines information in both average and standard deviation as a performance metric,. The running time for solving GLSE on dataset $X$ and our coreset $S$ are $T_X$ and $T_S$ respectively. $T_C$ is the running time for coreset $S$ construction .
\noindentSimulation setup. We vary $\varepsilon = 0.1, 0.2, 0.3, 0.4, 0.5$ and generate 100 independent random tuples $\zeta=(\beta,\rho)\in \mathbb{R}^{d+q}$ (the same as described in the generation of the synthetic dataset). For each $\varepsilon$, we run our algorithm $\mathbf{CGLSE}$ and Uni to generate coresets. We guarantee that the total number of sampled individual-time pairs of $\mathbf{CGLSE}$ and Uni are the same. We also implement IRLS jorgensen2006iteratively for solving GLSE. We run IRLS on both the full dataset and coresets and record the runtime.
\noindentResults. Table (ref) summarizes the accuracy-size trade-off of our coresets for GLSE for different error guarantees $\varepsilon$. The maximum empirical error of Uni is always larger than that of our coresets (1.16-793x). Further, there is no error guarantee with Uni, but errors are always below the error guarantee with our coresets. The speed-up with our coresets relative to full data ($\frac{T_X}{T_C+T_S}$) in solving GLSE is 1.2x-108x. To achieve the maximum empirical error of .294 for GLSE in the real-world data, only 1534 individual-time pairs (0.6%) are necessary for $\mathbf{CGLSE}$. With Uni, to get the closest maximum empirical error of 0.438, at least 2734 individual-time pairs) (1.1%) is needed; i.e.., $\mathbf{CGLSE}$ achieves a smaller empirical error with a smaller sized coreset. Though Uni may sometimes provide lower average error than $\mathbf{CGLSE}$, it always has higher RMSE, say 1.2-745x of $\mathbf{CGLSE}$. When there are outliers as with Cauchy, our coresets perform even better on all metrics relative to \textbf{Uni}. This is because $\mathbf{CGLSE}$ captures tails/outliers in the coreset, while \textbf{Uni} does not. Figure (ref) presents the boxplots of the empirical errors.
This paper initiates a theoretical study of coreset construction for regression problems with panel data. We formulate the definitions of coresets for several variants of $\ell_2$-regression, including OLSE, GLSE, and GLSE$_k$. For each variant, we propose efficient algorithms that construct a coreset of size independent of both $N$ and $T$, based on the FL framework. Our empirical results indicate that our algorithms can accelerate the evaluation time and perform significantly better than uniform sampling.
For GLSE$_k$, our coreset size contains a factor $M$, which may be unbounded and result in a coreset of size $\Omega(N)$ in the worst case. In practice, if $M$ is large, each sensitivity $s(i)$ in Line 5 of Algorithm (ref) will be close or even equal to 1. In this case, $I_S$ is drawn from all individuals via uniform sampling which weakens the performance of Algorithm (ref) relative to Uni. Future research should investigate whether a different assumption than the $M$-bound can generate a coreset of a smaller size.
There are several directions for future work. Currenly, $q$ and $d$ have a relatively large impact on coreset size; future work needs to reduce this effect. This will advance the use of coresets for machine learning, where $d$ is typically large, and $q$ is large in high frequency data. This paper focused on coreset construction for panel data with $\ell_2$-regression. The natural next steps would be to construct coresets with panel data for other regression problems, e.g., $\ell_1$-regression, generalized linear models and logistic regression, and beyond regression to other supervised machine learning algorithms.
\paragraph{Broader impact.} In terms of broader impact on practice, many organizations have to routinely outsource data processing to external consultants and statisticians. But a major practical challenge for organizations in doing this is to minimize issues of data security in terms of exposure of their data for potential abuse. Further, minimization of such exposure is considered as necessary due diligence by laws such as GDPR and CCPA which mandates firms to minimize security breaches that violate the privacy rights of the data owner shastri2019seven, ke2020privacy. Coreset based approaches to sharing data for processing can be very valuable for firms in addressing data security and to be in compliance with privacy regulations like GDPR and CCPA.
Further, for policy and managerial decision making in economics, social sciences and management, obtaining unbiased estimates of the regression relationships from observational data is critical. Panel data is a critical ingredient for obtaining such unbiased estimates. As ML methods are being adopted by many social scientists athey2015machine, ML scholars are becoming sensitive to these issues and our work in using coreset methods for panel data can have significant impact for these scholars.
A practical concern is that coresets constructed and shared for one purpose or model may be used by the data processor for other kinds of models, which may lead to erroneous conclusions. Further, there is also the potential for issues of fairness to arise as different groups may not be adequately represented in the coreset without incorporating fairness constraints huang2019coresets. These issues need to be explored in future research.
This research was conducted when LH was at Yale and was supported in part by an NSF CCF-1908347 grant.