File size: 7,777 Bytes
2ad608a dfcde1c 2ad608a dfcde1c 2ad608a dfcde1c 2ad608a dfcde1c 2ad608a dfcde1c 2ad608a dfcde1c 2ad608a dfcde1c 2ad608a dfcde1c 2ad608a dfcde1c 2ad608a dfcde1c 2ad608a dfcde1c 2ad608a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | ---
license: apache-2.0
pretty_name: AUTOENCODIX initial-config portfolios
tags:
- autoencodix
- hyperparameter-optimization
- transfer-learning
- zero-shot
- multi-omics
- autoencoder
viewer: false
---
# AUTOENCODIX initial-config portfolios
This repository holds the data that
[`autoencodix.propose_initial_config()`](https://github.com/jan-forest/autoencodix_package) uses to suggest
a strong starting hyperparameter configuration for an AUTOENCODIX model. You don't have to tune
from the generic schema defaults.
Everything here comes from the **BBOmix** benchmark: about 105,000 AUTOENCODIX training runs
across several architectures, two datasets and many downstream tasks. There are two kinds of files:
- **`initial_configs.json`**: ranked portfolios computed offline by fitting Syne Tune's
`ZeroShotTransfer` scheduler to BBOmix. A default call just looks up this JSON and validates the
result with Pydantic; no optimizer runs.
- **`evaluations/*.parquet` + `search_space.json`** (from `v2`): the BBOmix evaluations themselves,
in compact form. They are used when you fix some hyperparameters (`fixed={...}`). The package
then fits a random-forest surrogate on them and proposes the remaining hyperparameters *given*
your fixed values.
## Usage
```python
import autoencodix as acx
# newest portfolio (revision "main"), top-ranked config for the downstream objective
config = acx.propose_initial_config("varix")
# pin a published version for reproducibility
config = acx.propose_initial_config("varix", revision="v1")
# list the available versions
acx.tuning.list_portfolio_versions() # e.g. ["v1", "v2"]
# fix some hyperparameters, propose the rest given them (needs v2 or later)
config = acx.propose_initial_config("varix", fixed={"latent_dim": 16, "batch_size": 64})
```
The package downloads the files it needs from here on first use and caches them locally with
`huggingface_hub`. After that it also works offline (`HF_HUB_OFFLINE=1`). You can also use a
portfolio of your own:
```python
acx.propose_initial_config("varix", repo_id="<user>/<repo>") # your own HF dataset
acx.propose_initial_config("varix", artifact_path="path/to/initial_configs.json") # local file, no Hub
```
With `artifact_path` and `fixed`, the evaluation files are expected in this repository's layout
next to the JSON (`search_space.json`, `evaluations/<architecture>.parquet`).
See the *Propose Initial Config* tutorial in the AUTOENCODIX docs for all options (`objective`,
`budget_epochs`, `dataset`, `top_k`, `fixed`, overrides).
### `fixed` vs. overrides
Keyword overrides (`propose_initial_config("varix", latent_dim=16)`) only overwrite that field of
the static proposal. The other values stay the ones tuned together with a different `latent_dim`.
`fixed={"latent_dim": 16}` re-proposes the other hyperparameters for `latent_dim=16`.
In a leave-one-task-out check on the `v2` data, we held out each task, fixed one of `latent_dim`,
`n_layers`, `batch_size` or `k_filter` at several values, and compared proposals on the held-out
task among configs with that value. Conditional proposals reached the **87.7th percentile** on
average, compared with the 72.4th for the static top config + override. Conditional was better in
81% of 546 cases, and it was better on average for every architecture and both objectives.
## Versions
`main` always points to the newest portfolio. So with the default `revision="main"`, proposals can
change when a new version is published. Each published portfolio is also tagged, and you can pin
that tag.
| Tag | Description |
|------|-------------|
| `v1` | Initial BBOmix zero-shot portfolio: vanillix, varix, ontix, disentanglix; datasets `tcga`, `schc` |
| `v2` | Same portfolio as `v1`, plus `evaluations/*.parquet` and `search_space.json` for conditional proposals (`fixed=`) |
### Publishing a new version (maintainers)
The evaluation files are produced by `benchmarking/tuning/export_evaluations.py` in the
AUTOENCODIX repository, from the local Syne Tune blackbox repository.
```bash
python benchmarking/tuning/export_evaluations.py --out <dir> # evaluations/ + search_space.json
hf upload autoencodix/initial-configs <dir> . --repo-type dataset \
--commit-message "Portfolio v3: <what changed>"
hf repo tag create autoencodix/initial-configs v3 --repo-type dataset -m "<what changed>"
```
Then add a row to the table above. The files must keep the layouts described below. The
package checks dataset names and budgets against whatever the files contain, so you can add new
datasets or budgets without a package release.
## File layout
`initial_configs.json` is a single nested JSON object:
```text
{
"<architecture>": { # vanillix | varix | ontix | disentanglix
"combined": <scope>, # pooled across all source datasets (recommended default)
"<dataset>": <scope>, # one BBOmix dataset, e.g. "tcga", "schc"
...
},
...
}
<scope> = {
"downstream": [<config>, ...], # ranked best-first, full training budget
"reconstruction": {
"<budget_epochs>": [<config>, ...], # ranked best-first, budgets 10, 25, 50, 100, 150, 200, 300
...
}
}
```
Each `<config>` is a flat mapping of AUTOENCODIX config fields. It's passed straight to the
matching config class (`VanillixConfig`, `VarixConfig`, ...). In `v1`, every list holds 10 ranked
configs.
| Architecture | Hyperparameters |
|----------------|-----------------|
| `vanillix` | `k_filter`, `n_layers`, `enc_factor`, `latent_dim`, `batch_size`, `learning_rate`, `drop_p`, `weight_decay`, `epochs`, `checkpoint_interval`, `loss_reduction` |
| `varix` | as vanillix + `beta` |
| `ontix` | as vanillix + `beta`, without `latent_dim` |
| `disentanglix` | as vanillix + `beta_mi`, `beta_tc`, `beta_dimKL` |
### Objectives
- **`downstream`**: maximizes an aggregate downstream classification score. The score was only
measured at the final epoch, so these configs always use the full training budget
(`epochs = 300`).
- **`reconstruction`**: minimizes reconstruction loss, which was recorded every epoch. Each budget
key holds configs tuned for training that many epochs (`epochs` and `checkpoint_interval` are
set to the budget).
### `search_space.json`
```text
{
"constants": {"epochs": 300, "checkpoint_interval": 300, "loss_reduction": "sum"}, # held constant in BBOmix
"budgets": [10, 25, 50, 100, 150, 200, 300], # reconstruction budgets in the evaluation tables
"architectures": {
"<architecture>": {
"<hp>": {"choices": [...], "low": .., "high": ..}, # grid-sampled (integer) hps
"<hp>": {"scale": "log" | "linear", "low": .., "high": ..}, # continuous hps
...
}
}
}
```
`low`/`high` are the range actually covered by the evaluations, which can be narrower than the
declared BBOmix search space. Only these hyperparameters can be fixed. Fixed values outside the
range trigger a warning, because the proposal is then extrapolated.
### `evaluations/<architecture>.parquet`
One row per (task, config). All tasks of a dataset share the same 1000 sampled configs.
| Column | Meaning |
|--------|---------|
| `dataset` | BBOmix dataset, e.g. `tcga`, `schc` |
| `task` | BBOmix task (data modality combination, plus ontology for ontix) |
| `config_id` | Index of the config within its dataset |
| `<hp>` columns | Hyperparameter values, as in `search_space.json` |
| `downstream` | `metric_avg_ml_task_performance` at the final epoch, mean over 3 seeds (higher is better) |
| `reconstruction_<b>` | `metric_valid_recon_loss` at epoch `b`, mean over 3 seeds (lower is better) |
## License
Apache-2.0, the same license as the AUTOENCODIX package.
|