VAExEDE
A repository to host the trained models from https://arxiv.org/abs/2502.09810, where we trained a variational autoencoder (VAE) on CMB temperature power spectra for early dark energy (EDE) models, to discover novel, data-driven parametrizations.
Installation
To use the trained models, follow these steps:
-
(optional)
conda create -n vaexede python=3.11 jupyter(create a customcondaenvironment with python 3.11) -
(optional)
conda activate vaexede(activate it) -
Install the package:
pip install vaexede python -c 'from vaexede.load_models import load_model'or alternatively, clone the repository and install it:
git clone https://github.com/dpiras/VAExEDE.git cd VAExEDE pip install . python -c 'from vaexede.load_models import load_model'
The latter option will also give you access to a Jupyter notebook with a quick walkthrough on how to use the models.
Usage
A simple way to load and use the trained models looks like this:
model = 'lcdm' # either 'lcdm' or 'ede'
lcdm_model = load_model(model) # load the trained network
# add your unitless D_ell temperature spectrum here, in the ell range [30, 2500]
# should also support batches of data, has not been tested though
# D_ell = C_ell * ell * (ell+1) / 2pi
input_spectrum = # your spectrum here
# and preprocess it as described in the paper
input_spectrum_preprocess = preprocess(input_spectrum, model)
# here the preprocessed spectrum gets encoded, samples from the latent space are obtained
# then the spectrum is decoded and unpreprocessed
mean, logvar = lcdm_model.encode(input_spectrum_preprocess.reshape(1, -1))
z = lcdm_model.reparameterize(mean, logvar) # here we sample from the latent distribution
decoded_spectrum = lcdm_model.decode(z)
output_spectrum_lcdm = unpreprocess(decoded_spectrum[0, :, 0], model)
Disclaimer
The repository contains only some of the material needed to reproduce the paper. If you need more or would like to add a feature, feel free to fork this repository to work on it; otherwise, please raise an issue or contact Davide Piras.
Contributors
Laura Herold and Luisa Lucie-Smith contributed to this code.
Citation
If you use this code, please cite the corresponding paper:
@article{Piras:2025eip,
author = "Piras, Davide and Herold, Laura and Lucie-Smith, Luisa and Komatsu, Eiichiro",
title = "{$\Lambda$CDM and early dark energy in latent space: a data-driven parametrization of the CMB temperature power spectrum}",
eprint = "2502.09810",
archivePrefix = "arXiv",
primaryClass = "astro-ph.CO",
month = "2",
year = "2025"
}
License
This code is released under the GPL-3 license - see LICENSE-, subject to the non-commercial use condition - see LICENSE_EXT.
VAExEDE
Copyright (C) 2025 Davide Piras & contributors
This program is released under the GPL-3 license (see LICENSE.txt),
subject to a non-commercial use condition (see LICENSE_EXT.txt).
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Metadata
Release files for vaexede 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vaexede-0.1.0.tar.gz | 1.4 MB | Without provenance | Details for vaexede-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vaexede-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for vaexede-0.1.0-py3-none-any.whl |
Total release size: 2.8 MB
Release files / vaexede-0.1.0.tar.gz
| Download URL | vaexede-0.1.0.tar.gz |
|---|---|
| Size | 1.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
00cdbae71b73f23610d94c0c180eb04ec24514338db3ab63042a8bbffe72e461
|
|
BLAKE2b-256 checksum How to use checksums |
2a63b553083dcdddc6ecb13bf51e5fbdb2d0c51f8d8da5f852e6c60e26e2790c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.11
|
Release files / vaexede-0.1.0-py3-none-any.whl
| Download URL | vaexede-0.1.0-py3-none-any.whl |
|---|---|
| Size | 1.4 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7ffeff484bb9d9ee4405ff68c28819a57cb2008db75fdfac0858fdd2163e8b2f
|
|
BLAKE2b-256 checksum How to use checksums |
7dfef79b619981e8478d15bfe3b42fdd0e2d8f693fdb2cd7cd36d35ff5152d7e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.11
|
Security for vaexede 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.