Low ESS values ​​for some parameters

72 views
Skip to first unread message

Bingying Li

unread,
Jun 21, 2025, 8:31:55 PMJun 21
to beast-users
Hi everyone,

I am running a nucleotide dataset of the influenza HA gene with ~1300 sequences, 4 independent runs, with a chain length of ~10 million. My ESS values ​​are high except for 4 parameters (joint, prior, treeLength, shygrid etc.). How can I improve them?

Thank you

微信图片_20250621211107.png微信图片_20250621211122.png微信图片_20250621211118.png微信图片_20250621211114.png

Artem B

unread,
Jun 23, 2025, 9:33:15 PMJun 23
to beast-users
Hi Bingying,

It looks like you set 100 million per run, not 10. You have a large data set and your model is complex so it's not surprising it takes time to converge.
The most straightforward way is by increasing the total length of MCMC by 10 times to get the ESS for treeLength 23 * 10 ~ 230.
Perhaps there is some kind of trick with operators, but I'm not sure it improve the situation much.

Cheers,
Artem

воскресенье, 22 июня 2025 г. в 08:31:55 UTC+8, Bingying Li:

Bingying Li

unread,
Jun 24, 2025, 3:35:45 AMJun 24
to beast-users

Hi Artem,

Thanks for your suggestion. Increasing the chain length is indeed an effective way to improve the ESS value, but given the size of my dataset, the computational speed becomes a limiting factor. The time cost of such an expansion would be very high.
I would like to look for other ways to improve the ESS value, such as by adjusting parameter priors or operators. If you or others have any insights on optimizing these analytical aspects, I would be grateful.

Best regards,
Bingying

Omar Idris

unread,
Jul 14, 2025, 2:47:14 PMJul 14
to beast...@googlegroups.com, beast-users
✅ 1. Tune MCMC Operators
- Use adaptive operators: Ensure your XML uses `adaptiveOperatorWeight` or similar auto-optimization during burn-in.
- Manually adjust weights:
  - Increase the weight of `treeScaler`, `treeRootScaler`, or `treeSlide` if `treeLength` has low ESS.
  - Increase weights for `scaleOperator` on clock rates or population size parameters (helpful for `skygrid`).
- Check operator acceptance rates: Aim for ~20–40%. If too low/high, adjust step sizes.

✅ 2. Adjust Priors
- Tree prior: Try switching from a strict coalescent prior to a more flexible one like *Skygrid* or *Skyride*.
- Clock model priors: If using narrow priors, widen them (e.g., use a lognormal with a larger SD).
- Skygrid settings: Too many grid points can lower ESS. Reduce the number of change points if necessary.

✅ 3. Use Coupled MCMC or BEAGLE
- Coupled MCMC: Enables better sampling over complex posteriors. Useful for correlated parameters or rugged posteriors.
- BEAGLE: Use GPU or multicore acceleration to improve performance, allowing longer chains if needed.

✅ 4. Combine Independent Runs Properly
- Combine log/tree files using `LogCombiner` *after removing burn-in*.
- Resample logs to equalize weight across runs.
- If ESS differs across runs, it may indicate convergence problems.

✅ 5. Try Different Tree Models
- Switch to a relaxed clock model (e.g., *lognormal relaxed clock*) if using a strict one.
- Try a birth-death prior for highly sampled datasets like viral phylogenies.
- Avoid overparameterization in substitution models.

✅ 6. Diagnose with Tracer
- Use Tracer to inspect:
  - Autocorrelation time for low-ESS parameters.
  - Trace plots for proper mixing.
  - Posterior histograms for multimodality or poor convergence.
Sent from my iPhone
--
You received this message because you are subscribed to the Google Groups "beast-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beast-users...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/beast-users/c87ca163-2f5a-4715-8c5c-4b0d2fff124cn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages