Tedana - How to reduce tedana runtime when ICA fails to converge? (FastICA iteration limit, seed, or other strategies)

Hello everyone,

I am currently running tedana ICA denoising and would like to ask for suggestions regarding long runtime caused by ICA convergence issues.

Since my priority is to minimize computational time, I am currently using the tedpca approach for PCA dimensionality reduction before ICA. However, I noticed that under the same parameter settings, different datasets can produce substantially different estimated PCA model orders. For some datasets, the estimated number of PCA components is relatively high, and the subsequent ICA step may fail to converge.

Here’s one example:

image

In this case, ICA failed to converge when using both AIC and KIC for PCA model order estimation.

When ICA convergence problems occur, the program can continue running for more than one hour for a single dataset. In my case, the main concern is not necessarily achieving a successful denoising result at all costs, but rather ensuring that the pipeline can terminate within a reasonable time.

I would like to ask:

  1. Are there recommended ways to force tedana/ICA to terminate earlier when convergence is not achieved?

  2. Is it possible or recommended to modify parameters such as:

    • maximum ICA iterations (max_iter)?

    • random seed initialization?

    • number of ICA repetitions or retries?

    • convergence tolerance?

  3. Would reducing the number of PCA components before ICA be an appropriate strategy to improve runtime stability?

  4. Are there alternative ICA settings or decomposition methods (e.g., RobustICA, which may improve convergence stability but is not ideal for our workflow due to its higher computational cost)that are more likely to finish within a predictable runtime?

My sequence setting:

  • Voxel size (mm): 3 × 3 × 3
  • Slice thickness (mm): 3
  • Number of slices: 45
  • TR (ms): 2000
  • TEs (ms): 11.6, 30, 48.4
  • Flip angle (deg): 80
  • Effective echo spacing (ms): 0.275

My current workflow uses:

  • PCA method: tedpca
  • ICA method: FastICA
  • fittype:loglin
  • Spatial mask: an all-one mask was provided to preserve extracranial structures, including the skull
  • All other processing parameters were left unchanged and set to the default values provided by tedana.

Ideally, I would like the pipeline to either:

  1. complete ICA within a reasonable time, or

  2. terminate/fail gracefully after reaching a predefined computational limit.

Any recommendations regarding parameter settings or best practices would be greatly appreciated.

Thank you!

This message slipped past me & I responded to your more recent one first. ICA non-convergence and data quality in tedana / ME-ICA That other post partially answers your above questions.

Looking at the above parameters, you don’t list the number of volumes per run, but, if 95% variance explained is 434 components, then I assume these are fairly long runs. 157 components (AIC) for over 434 volumes doesn’t seem inherently bad, but more components means each iteration will be slower.

One way to identify if there are issues earlier would be to set –-maxrestart 0 --maxit 700 The random seed is random. Sometimes that is just a poor pick and it’s worth running again (the maxrestart option) but if there’s an issue & it fails once, it’s more likely there will be an issue with another random seed. You’re going to miss some runs that would have converged with a different seed if you set maxrestart to 0, but you’ll save compute time & will flag the runs that are worth a closer look. In my above suggestion, I also added --maxit 700The default is 500. This means the fastICA algorithm will iterate more before sending out the failure-to-converge message. I’ve seen cases where it’s close and just needs a few more iterations so maybe iterating an extra 200 times might be better than iterating 500 more times with a different seed.

If your concern is speed, I would not run RobustICA because that will just repeat ICA even more times.

Reducing the number of PCA components should make ICA run faster and may lead to better convergence, but 83 components (MDL) has only 57.6% variance explained. This already seems low to me, but it’s hard to say for sure. The expected percent variance explained will be affected both by your MRI measurement noise and how much explainable noise is in the signal. For example, a big scanning artifact or a lot of head motion would increase variance explained so 57% might be fine for a 3T scanner & a run with very little head motion or artifacts.

One thing you can do is look at the runs that do converge & see if there are similarities to the failed runs in the relationship between number of components for each estimation method and variance explained.

I also noticed “Spatial mask: an all-one mask was provided to preserve extracranial structures, including the skull” Having non-brain voxels with higher variance fluctuations definitely might cause troubles with how data are parse along PCA and ICA components. I have a colleague also doing this. If you are interested in signal in these extracranial areas, it’s definititely worth trying, but it may also be the source of some of your challenges. For the runs that do not converge, do you see any very high variance extracranial components? Maybe set a voxelwise variance threshold for extracranial voxels and remove extracranial voxels form your mask that have particularly high variance.

Best

Dan

Thank you for the detailed answers. I’ve posted my latest questions in the newer thread.

I just have one additional question about the variance explained. You mentioned that 57.6% seemed low. In your experience, is there a rough range of variance explained that you would generally consider reasonable or acceptable for fMRI PCA/model-order estimation? Or is this too dependent on the dataset and noise characteristics to define a practical range?

Thanks again for taking the time to clarify these points.