Last updated: 2026-03-12
Checks: 2 0
Knit directory: misc/
This reproducible R Markdown analysis was created with workflowr (version 1.7.1). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.
Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.
Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.
The results in this page were generated with repository version 35f3d44. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.
Note that you need to be careful to ensure that all relevant files for
the analysis have been committed to Git prior to generating the results
(you can use wflow_publish or
wflow_git_commit). workflowr only checks the R Markdown
file, but you know if there are other scripts or data files that it
depends on. Below is the status of the Git repository when the results
were generated:
Ignored files:
Ignored: .DS_Store
Ignored: .Rhistory
Ignored: .Rproj.user/
Untracked files:
Untracked: analysis/ica_vs_flash_r1_rad copy.Rmd
Untracked: analysis/ica_vs_flash_r1_rad.Rmd
Untracked: analysis/ica_vs_flash_r1_update_2.Rmd
Untracked: analysis/preemble.tex
Untracked: analysis/references.bib
Untracked: code/references.bib
Unstaged changes:
Modified: analysis/ica_vs_flash_r1_update_1.Rmd
Modified: code/ebnm_rademacher.R
Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.
These are the previous versions of the repository in which changes were
made to the R Markdown (analysis/index.Rmd) and HTML
(docs/index.html) files. If you’ve configured a remote Git
repository (see ?wflow_git_remote), click on the hyperlinks
in the table below to view the files as they were in that past version.
| File | Version | Author | Date | Message |
|---|---|---|---|---|
| Rmd | 35f3d44 | junmingguan | 2026-03-12 | wflow_publish(c("analysis/eb_ica.Rmd", "analysis/index.Rmd")) |
| html | 316f105 | junmingguan | 2026-03-12 | Build site. |
| Rmd | a5e2613 | junmingguan | 2026-03-12 | wflow_publish(c("analysis/index.Rmd")) |
| html | 71e288e | junmingguan | 2025-11-13 | Build site. |
| html | 65a5c9c | junmingguan | 2025-11-13 | Build site. |
| Rmd | d08229b | junmingguan | 2025-11-13 | wflow_publish(c("analysis/ica_vs_flash_r1_update_1.Rmd", "analysis/index.Rmd")) |
| html | f6acacf | junmingguan | 2025-11-13 | Build site. |
| Rmd | 9109018 | junmingguan | 2025-11-13 | wflow_publish(c("analysis/ica_vs_flash_r1_update_1.Rmd", "analysis/index.Rmd")) |
| html | aec07da | junmingguan | 2025-11-08 | Build site. |
| Rmd | e4eb50a | junmingguan | 2025-11-08 | Publish the initial files for ICA vs flashier |
| Rmd | aaa922a | junmingguan | 2025-11-07 | Start workflowr project. |
This repo contains misc explorations.
We want to compare fastICA’s rank-1 update with that of flashier. Matthew previously examined an example where rank-1 fastICA almost perfectly picks up one column of the true mixing matrix, but flashier does not. Our conjecture is that flashier’s failure arises from an overemphasis on the fit term. We plan to investigate this further and potentially improve flashier’s rank-1 update.
rank-1 FastICA can be considered as an EM algorithm with a Rademacher prior on the sources, with a spectral shift step to accelerate convergence (Särelä and Valpola 2005). Therefore, it is also equivalent to rank-1 EBCD with Rademacher prior. Consider the model for \(Y\in \mathbb{R}^{n\times d}\)
\[ Y_{ij} \sim \mathcal{N}(a_i s_j, \sigma^2), \quad s_i \sim \text{Rad}(1/2),\quad \sum_{i}^n a_i^2=1. \]
fastICA estimates \(\mathbf{s}=\begin{bmatrix}s_1 & \dots s_d\end{bmatrix}^\top\) by first estimating the “inverse” of \(\mathbf{a}\), via the following steps:
Pick an initial \(\mathbf{w}\)
Iterate
\(\mathbf{s}=Y^\top \mathbf{w}\)
Denoising: \(\mathbf{s}^+=f(\mathbf{s})\)
\(\mathbf{w}^+=Y \mathbf{s}^+\)
\(\mathbf{w}=\mathbf{w}^+ / \|\mathbf{w}^+\|\).
The first two steps are the E-step that constructs the estimated posterior mean \(\mathbb{E}[\mathbf{s} \mid Y, \mathbf{w}]\), and the last two steps are the M-step that maximize \(\mathbb{E}_q[\log p(\mathbf{s}, Y \mid \mathbf{w})]\).
Wwe posit this following model for an observed data matrix \(\boldsymbol{Y}\in \mathbb{R}^{n\times d}\):
\[ \begin{aligned} \boldsymbol{Y} &= \boldsymbol{M}+ \boldsymbol{\ell f}^\top + \boldsymbol{E} \\ \ell_{i}&\stackrel{iid}{\sim} g_\ell \\ f_{j}&\stackrel{iid}{\sim} g_f \\ E_{ij}&\stackrel{iid}{\sim} \mathcal{N}(0, \sigma^2), \end{aligned} \]
where \(\boldsymbol{M}\in\mathbb{R}^{n\times d}\). We hope that \(\boldsymbol{M}\) can act as a ‘stand-in’ matrix—if one chooses to fit a rank-1 model even if the true signals are of rank>1, \(\boldsymbol{M}\) will capture any remaining true signals without leaking any to the error term.
Find a small example in which fastICA works but PCA does not.
In real data, does initializing flashier from fastICA produce better ELBO? Try it on some single cell data set. We should process the dataset in a way (e.g., log+1 transform) such that we can apply fastICA (which doesn’t handle non-negative constraints)
We conjecture that another possible reason why rank-1 flashier fails is the EB component. Try fixing the prior to the true data generating distribution.
Try the following update:
Update \(\boldsymbol{\ell}\) and \(\boldsymbol{f}\) by running flashier back fit on \(\boldsymbol{Y}-\boldsymbol{M}\).
Update \(\boldsymbol{M}\) by truncated SVD on \(\boldsymbol{Y} - \boldsymbol{\ell f}^\top\).