AI-aided translation of in vitro transcriptomic responses into in vivo profiles for toxicological applications
Quick Start • Workflow & Scripts • Methods • Data & Outputs • Citation
AIVIVE translates in vitro transcriptomic profiles into synthetic in vivo profiles using a GAN-based translator and biologically informed local optimization.
AIVIVE (AI-aided In Vitro–In Vivo Extrapolation) is a generative AI framework designed to translate in vitro transcriptomic responses into corresponding synthetic in vivo profiles.
The framework combines a GAN-based translator with module-specific local optimizers based on biologically meaningful gene clusters to improve in vitro–in vivo extrapolation of toxicogenomic responses.
AIVIVE was developed using rat liver transcriptomic data from Open TG-GATEs and evaluated across multiple levels of biological organization, including global expression-profile agreement, differentially expressed genes, pathway-level concordance, adverse outcome pathway-associated genes, and necrosis prediction.
| Framework | GAN-based translator + local optimizers |
| Input | Rat liver in vitro transcriptomic profiles |
| Output | Synthetic in vivo transcriptomic profiles |
| Dataset | Open TG-GATEs |
| Gene space | Rat S1500+ and biologically defined gene modules |
| Profile evaluation | Cosine similarity, RMSE, MAPE |
| Gene-level evaluation | Differentially expressed genes |
| Pathway evaluation | KEGG pathway concordance |
| Mechanistic evaluation | AOP-associated gene expression |
| Toxicological application | Necrosis prediction |
git clone https://github.com/CHANDMX20/AIVIVE.git
cd AIVIVEThe RMA-normalized rat liver in vitro and in vivo training/test datasets used by AIVIVE are available through Zenodo:
The data were divided into training (80%) and held-out test (20%) sets based on unique compounds.
| Goal | Start from |
|---|---|
| Reproduce preprocessing from raw data | Open TG-GATEs CEL files |
| Train AIVIVE from the beginning | RMA-normalized Zenodo inputs |
| Generate synthetic in vivo profiles | Trained AIVIVE generator and local optimizers |
| Run biological applications | Real and AIVIVE-generated profiles |
All analysis scripts are listed once in the workflow below.
Open TG-GATEs
│
▼
Preprocessing
RMA + Annotation
│
▼
In Vitro Profiles
│
▼
GAN-Based Translator
│
▼
Initial Synthetic In Vivo Profiles
│
▼
Module-Specific Local Optimizers
│
▼
Optimized Synthetic In Vivo Profiles
│
├──────────────┬──────────────┬──────────────┐
▼ ▼ ▼ ▼
Profile DEG Pathway Toxicity
Evaluation Analysis / AOP Prediction
│
▼
Cosine • RMSE • MAPE
Scripts can be executed after configuring their required local input and output paths.
| Stage | Analysis | Script(s) |
|---|---|---|
| 1A | RMA normalization | rma_vivo_single.R |
| 1B | Rat gene annotation | rat_annotation.R |
| 2A | GAN translator training | vitro_vivo_GAN.py |
| 2B | Generator predictions | train_test_samples.py |
| 2C | Module-specific local optimization | training/modules/ |
| 2D | Optimized module predictions | module_test_evals.py |
| 3A | Negative-control benchmark | negative_control.py |
| 3B | AIVIVE cosine similarity | cosine.py |
| 3C | AIVIVE RMSE | rmse.py |
| 3D | AIVIVE MAPE | mape.py |
| 3E | Positive-control benchmark | positive_control.py |
| 4A | Real-profile fold change | real_fold.py |
| 4B | Synthetic-profile fold change | gen_fold.py |
| 4C | Real-profile DEG identification | real_deg.py |
| 4D | Synthetic-profile DEG identification | gen_union.py |
| 4E | DEG overlap | overlap_deg.py |
| 5A | KEGG pathway enrichment | kegg_pathway.R |
| 5B | KEGG pathway overlap | overlap_pathways.py |
| 6 | AOP-associated gene analysis | AOP.py |
| 7 | Necrosis prediction | necrosis_prediction.py |
Expand the sections below for additional methodological detail.
🧬 Transcriptomic preprocessing
Gene-expression data are prepared before AIVIVE model development using RMA (Robust Multi-array Average) normalization and rat gene annotation.
Raw microarray expression data are normalized using RMA to generate processed gene-expression profiles suitable for downstream analysis.
Probe identifiers are mapped to relevant rat gene identifiers, and the resulting annotations are processed to generate a unique gene-level expression dataset.
These preprocessing steps generate the expression profiles used for AIVIVE model development and evaluation.
🧠 GAN translator and local optimization
AIVIVE consists of two principal modeling stages.
The GAN-based translator learns a mapping from:
In Vitro Transcriptomic Profile
│
▼
GAN-Based Translator
│
▼
Synthetic In Vivo Profile
The generator is trained to produce synthetic in vivo transcriptomic profiles from corresponding in vitro responses.
Following global GAN translation, biologically meaningful gene modules are processed using module-specific local neural-network optimizers.
These local optimizers refine the translated profiles at the module level and are designed to improve the biological correspondence between synthetic and real in vivo gene-expression patterns.
📏 Global expression-profile evaluation
AIVIVE performance on the held-out test set is evaluated using three agreement metrics:
- Cosine similarity
- Root mean squared error (RMSE)
- Mean absolute percentage error (MAPE)
Performance is interpreted relative to two real-data benchmarks.
Agreement is calculated between two real in vivo profiles while excluding biological replicates.
This provides a lower-reference benchmark for profile similarity.
Agreement is calculated between each optimized synthetic in vivo profile generated by AIVIVE and its corresponding real in vivo profile.
Agreement is calculated between biological replicates within a treatment.
This provides a benchmark representing the level of agreement observed between real biological samples.
🧬 Differential gene-expression analysis
Differentially expressed genes (DEGs) are evaluated in both real and AIVIVE-generated synthetic profiles.
The same general workflow is used for the Rat S1500+ and module-specific gene sets, with the relevant input files changed depending on the analysis.
Fold change is calculated as:
A gene is classified as differentially expressed when:
Agreement between DEGs identified using real and generated profiles is evaluated as:
For synthetic profiles, the union of DEGs across subgroups of a treatment group is used where applicable.
🛣️ KEGG pathway analysis
KEGG (Kyoto Encyclopedia of Genes and Genomes) pathway enrichment analysis is used to evaluate whether AIVIVE-generated transcriptomic profiles preserve pathway-level biological interpretation.
The analysis consists of two stages.
Differentially expressed genes are mapped to known KEGG pathways to identify enriched biological processes.
The overlap between pathways enriched using real in vivo profiles and those enriched using AIVIVE-generated profiles is then evaluated.
This provides a pathway-level assessment of biological concordance beyond individual gene-expression values.
🔗 AOP-associated gene-expression analysis
The Adverse Outcome Pathway (AOP) analysis evaluates expression agreement for AOP-associated genes represented within the Rat S1500+ gene set.
Percentage error between real and AIVIVE-generated gene-expression values is calculated as:
The resulting errors are visualized using heatmaps to identify patterns of agreement between real and synthetic profiles across AOP-associated genes.
🧪 Necrosis prediction
A downstream predictive model is used to assess whether AIVIVE-generated synthetic in vivo profiles retain information relevant to a toxicological endpoint.
The necrosis prediction model is trained using real in vivo training profiles.
The trained model is evaluated independently on:
- Real in vivo test profiles
- AIVIVE-generated optimized synthetic in vivo test profiles
This analysis evaluates whether synthetic profiles generated from in vitro measurements preserve transcriptomic information relevant to necrosis prediction.
All AIVIVE data-related information is consolidated here.
AIVIVE was developed using rat liver transcriptomic data from Open TG-GATEs.
Raw Open TG-GATEs data can be obtained from:
The rat liver in vitro and in vivo single-dose transcriptomic profiles used for model development are distributed through Zenodo:
The data are RMA normalized and split into:
- Training set: 80%
- Held-out test set: 20%
The split is based on unique compounds.
Supporting data required for individual analyses are retained in data/.
📂 Show supporting data files
| File | Purpose |
|---|---|
final_rat_genes.csv |
Rat S1500+ gene set used for AIVIVE development and training |
open_tggates_cel_file_attribute.csv |
Open TG-GATEs metadata |
modules_genes/ |
Module gene sets used for local optimization |
aop_overlap_genes.csv |
AOP-associated genes overlapping the Rat S1500+ gene set |
necrosis_df.csv |
Open TG-GATEs pathological findings used for necrosis analysis |
📁 Show repository structure
AIVIVE/
│
├── preprocessing/ # RMA normalization and gene annotation
│
├── training/ # GAN translator training and prediction
│ └── modules/ # Module-specific local optimizers
│
├── applications/ # Evaluation, KEGG, AOP, and necrosis analyses
│
├── degs/ # Differential gene-expression analyses
│
├── data/ # Supporting data and gene sets
│
├── README.md
└── LICENSE
Individual scripts are listed in the Workflow & Scripts section.
AIVIVE was developed using:
| Software | Version |
|---|---|
| Python | 3.11.7 |
| TensorFlow-GPU | 2.4.1 |
| R | 4.4.1 |
| Bioconductor | 3.19 |
| rat2302.db | 3.13.0 |
Additional Python and R dependencies are imported within the corresponding analysis scripts.
AIVIVE supports multiple levels of reproducibility depending on the desired starting point.
|
|
The repository separates preprocessing, model development, prediction, profile-level evaluation, and downstream biological applications so that individual stages can be reproduced independently.
If you use AIVIVE in your research, please cite the associated paper and dataset.
AIVIVE: AI-aided In Vitro-In Vivo Extrapolation. Toxicological Sciences. https://doi.org/10.1093/toxsci/kfaf100
This article was selected as a ToxSpotlight article by Toxicological Sciences.
AIVIVE rat liver in vitro/in vivo transcriptomic data and associated model outputs. Zenodo. https://doi.org/10.5281/zenodo.14984579
This project is licensed under the MIT License.
See the LICENSE file for details.
AIVIVE
AI-aided in vitro–in vivo extrapolation for toxicogenomic applications
