agentsclimarketplace

Neural network hyperparameter optimization

Skill HolobiomicsLab/asb-skill-collections/collections/metabolomics/v2/skills/neural-network-hyperparameter-optimization

Curated, evidence-grounded skill and software-tool collections for scientific AI agents, generated by the AgenticScienceBuilder

Install
npx -y skills add HolobiomicsLab/asb-skill-collections --skill neural-network-hyperparameter-optimization

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 14 stars14 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Use when when you have preprocessed joint ST/SM AnnData objects (output from joint_adata_sm_st and normalize_total_joint_adata_sm_st) and need to fit a ConditionalVAESTSM model to unify spatial transcriptomics and spatial metabolomics data to a common resolution.

The file declares its own license as CC-BY-4.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

7.3 KB, ~1.2k tokens by cl100k_base, as published. Nobody here has run it

neural-network-hyperparameter-optimization

Summary

Optimize the architecture and training parameters of a conditional VAE model for joint spatial transcriptomics and metabolomics alignment. This skill tunes latent dimension, encoder/decoder layer sizes, and conditional layer dimensions to maximize the model's ability to learn shared representations across modalities.

When to use

When you have preprocessed joint ST/SM AnnData objects (output from joint_adata_sm_st and normalize_total_joint_adata_sm_st) and need to fit a ConditionalVAESTSM model to unify spatial transcriptomics and spatial metabolomics data to a common resolution. Use this skill when you are uncertain about appropriate architecture parameters or when the default initialization produces poor alignment or unstable training.

When NOT to use

  • Input data is not jointly preprocessed or normalized using the SpatialMETA pipeline (joint_adata_sm_st and normalize_total_joint_adata_sm_st).
  • You have only single-modality data (ST only or SM only); ConditionalVAESTSM is designed for multi-modal alignment.
  • Spatial resolution alignment has already been performed by another method; this skill is redundant if ST and SM are already at unified resolution.

Inputs

  • Preprocessed joint ST/SM AnnData object with normalized expression data
  • ConditionalVAESTSM model architecture specification (latent dimension, layer sizes, conditional layer dimension)

Outputs

  • Trained ConditionalVAESTSM model state
  • Latent embeddings (stored in AnnData.obsm)
  • Normalized expression predictions for validation

How to apply

Initialize ConditionalVAESTSM with candidate architecture parameters: latent dimension (typically 10–50), encoder/decoder layer sizes (e.g., 256, 128 units per layer), and conditional layer dimension. Call ConditionalVAESTSM.fit() on the normalized joint expression data, monitoring the conditional VAE objective function across epochs to detect convergence or overfitting. Extract latent embeddings via ConditionalVAESTSM.get_latent_embedding() and validate alignment by comparing normalized expression predictions (ConditionalVAESTSM.get_normalized_expression()) against the input data; inspect whether ST and SM modalities occupy the same latent space by examining embedding distributions and cross-modal spatial pattern consistency. Adjust parameters iteratively if embeddings collapse to low rank, if the objective plateaus prematurely, or if predicted expression diverges significantly from the input.

Related tools

  • spatialMETA (Provides ConditionalVAESTSM model class, joint data preparation (joint_adata_sm_st, normalize_total_joint_adata_sm_st), and latent embedding extraction methods) — https://github.com/WanluLiuLab/SpatialMETA

Examples

from spatialmeta.model import ConditionalVAESTSM; model = ConditionalVAESTSM(latent_dim=32, encoder_dims=[256, 128], decoder_dims=[128, 256], conditional_dim=64); model.fit(adata_joint, epochs=100); latent = model.get_latent_embedding(); adata_joint.obsm['latent_embedding'] = latent

Evaluation signals

  • Conditional VAE objective function converges smoothly without early plateau or divergence during training.
  • Latent embeddings are non-degenerate (rank > 1 and variance explained across latent dimensions is distributed, not concentrated in one dimension).
  • Reconstructed normalized expression (via get_normalized_expression) exhibits low mean squared error or correlation > 0.8 with input expression data.
  • Spatial transcriptomics and metabolomics samples cluster together in latent space (low inter-modality distance), indicating successful alignment.
  • Extracted latent embeddings stored in AnnData.obsm match expected shape (n_spots, latent_dimension) and contain no NaNs or infinities.

Limitations

  • Model convergence and embedding quality depend on the choice of latent dimension and layer sizes; no automatic hyperparameter search is documented in the README.
  • ConditionalVAESTSM requires normalized joint ST/SM data; poor preprocessing or batch effects upstream will degrade alignment.
  • The article does not provide explicit guidance on hyperparameter ranges, learning rate, or stopping criteria; practitioners must experiment or rely on defaults.
  • Validation relies on comparing reconstructed vs. input expression; systematic evaluation against ground truth cross-modal spatial patterns is not documented.

Evidence

  • [other] Initialize ConditionalVAESTSM with architecture parameters (latent dimension, encoder/decoder layer sizes, conditional layer dimension).: "Initialize ConditionalVAESTSM with architecture parameters (latent dimension, encoder/decoder layer sizes, conditional layer dimension)."
  • [other] Call ConditionalVAESTSM.fit() to train the model on normalized expression data, optimizing the conditional VAE objective to learn shared latent representations across ST and SM modalities.: "Call ConditionalVAESTSM.fit() to train the model on normalized expression data, optimizing the conditional VAE objective to learn shared latent representations across ST and SM modalities."
  • [other] Extract latent embeddings using ConditionalVAESTSM.get_latent_embedding() and store in AnnData.obsm.: "Extract latent embeddings using ConditionalVAESTSM.get_latent_embedding() and store in AnnData.obsm."
  • [other] Retrieve normalized expression predictions via ConditionalVAESTSM.get_normalized_expression() for validation.: "Retrieve normalized expression predictions via ConditionalVAESTSM.get_normalized_expression() for validation."
  • [readme] Update spatialmeta.model.ConditionalVAESTSM: "Update spatialmeta.model.ConditionalVAESTSM"
  • [other] SpatialMETA implements an alignment mechanism that unifies ST and SM data to a common spatial resolution as a core component of its multi-omics integration workflow.: "SpatialMETA implements an alignment mechanism that unifies ST and SM data to a common spatial resolution as a core component of its multi-omics integration workflow."

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.