# Integrated Model Selection and Scalability in Functional Data Analysis Through Bayesian Learning
## Appendix C Scalable Update for BSFDA  
### Implicit Factorization  
We initialize the inactive precision parameters as  
\[\mathbb{E}_{\mathcal{Q}_{\sigma_{i}}}[\alpha_{j}] =\epsilon^{-1},\forall j>I^{(\mathrm{a})} \tag{104}\] \[\mathbb{E}_{\mathcal{Q}_{\bar{\
u}_{k}}}[\beta_{k}] =\epsilon^{-1},\forall k>K^{(\mathrm{a})} \tag{105}\]  
Under these settings and subsequent variational updates (using Equations (104) and (105)), in the limit as \(\epsilon\to 0\), the surrogate distributions satisfy  
\[\mu_{Z_{iB}} =0,\ \Sigma_{Z_{i}B}=\epsilon I^{(J-I^{(\mathrm{a})})},\ \Sigma_{Z_{i}[A,B]}=\left(\Sigma_{Z_{i}[B,A]}\right)^{T}=0 \tag{106}\] \[\mu_{ZB} =0,\ \Sigma_{Z[B,B]}=\epsilon I^{(K-K^{(\mathrm{a})})},\ \Sigma_{Z[A,B]}= \Sigma_{Z[B,A]}^{T}=0\] (107) \[\mu_{\mathrm{vec}\,(W)}{}_{B} =0,\ \mu_{\mathrm{vec}\,(W)}{}_{C}=0,\ \mu_{\mathrm{vec}\,(W)}{}_{D}=0,\ \Sigma_{\mathrm{vec}\,(W)}{}_{B}= \epsilon I^{(K^{(\mathrm{a})}J-K^{(\mathrm{a})}J^{(\mathrm{a})})},\] \[\Sigma_{\mathrm{vec}\,(W)}{}_{[C,C]} =\epsilon I^{(J^{(\mathrm{a})}K-J^{(\mathrm{a})}K^{(\mathrm{a})})},\ \Sigma_{\mathrm{vec}\,(W)}{}_{[D,D]}=\epsilon I^{(JK+I^{(\mathrm{a})}K^{( \mathrm{a})}-JK^{(\mathrm{a})}-J^{(\mathrm{a})}K)},\] \[\Sigma_{\mathrm{vec}\,(W)}{}_{[x,y]} =0,\forall(x,y)\
otin\{(A,A),(B,B),(C,C),(D,D)\} \tag{108}\]  
For convenience, we initialize \(\mathcal{Q}\) with the above properties. **Lemma A1**. : _If \(\mathcal{Q}_{\alpha_{j}}[\alpha_{j}]=\epsilon,\forall j\geq I^{(\mathrm{a})}\) and \(\mathcal{Q}_{\beta_{k}}[\beta_{k}]=\epsilon,\forall k\geq K^{(\mathrm{a})}\), then the variational distribution over \(W\) factorizes as \(\mathcal{Q}_{W}=\mathcal{Q}_{W_{A}}\mathcal{Q}_{W_{B}}\mathcal{Q}_{W_{C}} \mathcal{Q}_{W_{D}}\) in the limit as \(\epsilon\to 0\)._  
Proof. : We express the distribution as  
\[\mathcal{Q}_{W} =\mathcal{N}(\mathrm{vec}(W)|\mu_{\mathrm{vec}\,(W)}{}_{\mathrm{ vec}\,(W)})\] \[=\exp\biggl{(}-\frac{1}{2}\Bigl{(}\ln|2\pi\Sigma_{\mathrm{vec}\, (W)}|+\mu_{\mathrm{vec}\,(W)}{}_{\mathrm{vec}\,(W)}{}^{-1}\mu_{\mathrm{vec}\, (W)}{}^{T}\Bigr{)}\biggr{)}.\]  
The factorization holds if the off-diagonal block matrices in \(\Sigma_{\mathrm{vec}\,(W)}\), e.g., \(\Sigma_{[W_{A},W_{B}]}\), are all zero, i.e., the blocks are mutually independent. Initially, this is ensured by the definition for the initial status in Equation (108). Thus, we only need to show that the statement remains true after \(\mathcal{Q}_{W}\) is updated, i.e., after Equation (22) is applied with the inactive scale parameters \(\mathcal{Q}_{\alpha_{j}}[\alpha_{j}]\) and \(\mathcal{Q}_{\beta_{k}}[\beta_{k}]\) fixed at \(\epsilon\). First, we regard \(\Sigma_{[W_{ABC}]}\), i.e., the covariance of the union of \(W_{A},W_{B},W_{C}\) after vectorization, as one block. By the block matrix inversion formula, we obtain \(\Sigma_{[W_{ABC},W_{D}]}\propto\epsilon^{2}\to 0\) and consequently \(\mathcal{Q}_{W}=\mathcal{Q}_{W_{ABC}}\mathcal{Q}_{W_{D}}\). Next,we apply the block matrix inversion formula to \(\Sigma_{[W_{ABC}]}\) in Equation (22) and we obtain \((\Sigma_{[W_{B},W_{A}]},\Sigma_{[W_{B},W_{C}]},\Sigma_{[W_{C},W_{A}]},\Sigma_{[W_{ C},W_{B}]})\propto\epsilon\to 0\), yielding the desired factorization. If \(\mathcal{Q}_{\beta_{k}}[\beta_{k}]=\epsilon,\forall k\geq K^{(a)}\), then the implicit factorization \(\mathcal{Q}_{Z}=\mathcal{Q}_{Z_{A}}\mathcal{Q}_{Z_{B}}\) holds in the limit as \(\epsilon\to 0\). Proof. : The proof is similar to the proof for Lemma A. Because \(\mathcal{Q}_{Z}=\mathcal{N}(\mu_{Z},\Sigma_{Z})\), we need only the off-diagonal block to be zero, i.e., \(\Sigma_{\Sigma_{[A,B]}}=0\). Initially, this is ensured by definition for the initial status in Equation (A37). \(Q_{Z}\) is updated by Equation (20). Applying the block matrix inversion formula with the inactive \(\mathcal{Q}_{\beta_{k}}[\beta_{k}]\), we obtain \(\Sigma_{\Sigma_{[A,B]}}\propto\epsilon\to 0\), establishing the factorization.