AutoScientists

repository·main·Indexed 20 days ago

https://github.com/mims-harvard/autoscientists

A decentralized framework for long-running scientific experimentation using self-organizing AI agent teams. It utilizes Claude Code subagents and a local ClawInstitute server to coordinate parallel research trajectories. The system supports various task types, including optimization, BioMLBench (biomedical ML benchmarks across protein engineering, drug discovery, genomics, and imaging), and ProteinGym.

Tokens
133.1K
Snippets
242
Records
488
Agent score
72%

What's inside AutoScientists

  1. Overview of BioMLBench Tasks

    main

    BioMLBench consists of 24 biomedical ML benchmarks across four domains. For each task, agents are expected to read a TASK.md file (containing problem descriptions, data formats, metrics, and validation strategies), write a train.py script from scratch, and produce a submission.csv along with a local CV score.

    Task Domains

    • Protein Engineering (ProteinGym DMS): 6 tasks focusing on protein binding and indels.
    • Drug Discovery (Polaris / TDCommons): 9 tasks covering regression and classification (e.g., Caco2, Lipophilicity, HERG).
    • Single-Cell Genomics (OpenProblems): 5 tasks involving modality prediction, perturbations, and spatial variable genes.
    • Medical Imaging (Kaggle): 4 tasks including pulmonary fibrosis, cancer detection, brain tumor classification, and GI tract segmentation.
  2. Overview of AutoScientists

    main

    AutoScientists is a decentralized system of AI agents designed for long-running computational scientific experimentation. Unlike centralized planners, these agents self-organize into teams, critique proposals, and share results to avoid redundant exploration.

    The system is packaged as Claude Code subagents that coordinate via a local ClawInstitute server (utilizing workshops, workspaces, and message boards). The orchestrator acts as a pure coordinator, launching agents and harvesting results without performing training itself.

  3. Research Insights for TDCommons BBB Martins Permeability Prediction

    main

    This document summarizes the research findings for the tdcommons-bbb-martins task, specifically regarding BBB (Blood-Brain Barrier) permeability prediction. The core finding is that Mordred 2D molecular descriptors combined with tree-ensemble stacking significantly outperform neural models like ChemBERTa, UniMol, or Chemprop on this dataset (n ≈ 1,600 samples).

    Key Performance Benchmarks (Scaffold CV ROC-AUC):

    • Champion Submission: 0.9130 (Two-level stacking: XGBoost, RandomForest, ExtraTrees $\rightarrow$ LogisticRegression using Mordred+Morgan features).
    • Best Single Model: 0.9045 (XGBoost + Mordred + Morgan).
    • Neural Models:
      • UniMol: 0.8938
      • ChemBERTa: 0.8901 - 0.8913
      • Chemprop MPNN: 0.8763
    • Baseline: 0.8753 (XGBoost + Morgan fingerprints only).
  4. Research Insights for Kaggle OSIC Pulmonary Fibrosis Progression

    main

    This document summarizes the findings from the kaggle-osic-pulmonary-fibrosis-progression task, which involved 43 cycles and 168 experiment variants.

    Key Findings:

    • Most Productive Feature: The interaction feature fib_x_fvc = ct_frac_fibrosis * FVC provided the largest improvement (+0.007 mean CV Laplace log-likelihood) and stabilized predictions (lower fold variance).
    • Architecture Stability: The core architecture (Ridge + dual kNN + fibrosis-quartile blending + 2-group heteroscedastic sigma) was highly resistant to further improvement through micro-optimization.
    • Diminishing Returns: Systematic micro-optimization of hyperparameters (like kNN-eps, Ridge alpha, and PCA components) yielded marginal gains that were often below measurement noise once the core architecture was established.
    • Validation Discrepancy: The Out-of-Fold (OOF) validation score is consistently more pessimistic (0.26–0.45 LL worse) than the per-fold mean CV score due to differences in optimization strategies.
  5. Understand the Kaggle Histopathologic Cancer Detection task

    main

    The goal is to classify small pathology images. A positive label (1) indicates that the center 32x32px region of a patch contains at least one pixel of tumor tissue. Tumor tissue in the outer region of the patch does not influence the label. This outer region is included to support fully-convolutional models without zero-padding for consistent whole-slide image application.

    Data Structure:

    • train_labels.csv: Provides ground truth for images in the train folder.
    • test folder: Contains images for which you must predict labels.
    • sample_submission.csv: Use this to verify your output format.

    Required Output:

    • submission.csv: Your final submission file. It must strictly follow the format of sample_submission.csv.
  6. Research Insights for ProteinGym DMS PSAE_PICP2 Fitness Prediction

    main

    This document summarizes the findings from an AutoScientists run focused on fitness prediction for the PSAE_PICP2 dataset (68 amino acids, 1,579 variants).

    Key Finding: ESM2 LoRA fine-tuning with model-scale diversity and per-strategy weight optimization is the most effective approach.

    Performance Benchmarks (Spearman):

    • 7-way Ensemble (Champion): 0.9761 (using autoscientists.py with differential evolution optimized weights).
    • ESM2-35M LoRA (Single Model): 0.9645.
    • ESM2-8M LoRA (Baseline): 0.9538.
    • Full-finetune ESM2-35M (No LoRA): 0.9071.
    • GP + BLOSUM62 kernel: 0.8656.
    • GP + Hamming kernel: 0.8202.
  7. Understand the OpenProblems: Single-Cell Perturbation Prediction task

    main

    The goal is to predict differential gene expression (clipped_sign_log10_pval) for 144 drug compounds across B cells and Myeloid cells, based on training data from T cells, NK cells, and regulatory T cells.

    Key Details:

    • Metric: Mean Rowwise RMSE (MRRMSE) — lower is better.
    • Input: Compound identity and cell type.
    • Output: clipped_sign_log10_pval for 5317 genes.
    • Challenge: The model must generalize compound effects across different cell types.
    • Constraint: The test set consists of B cells and Myeloid cells only.
  8. Understand the RSNA-MICCAI Brain Tumor Radiogenomic Classification task

    main

    The goal of this task is to predict the presence of MGMT promoter methylation in glioblastoma patients using MRI (magnetic resonance imaging) scans. This is a radiogenomics problem where imaging data is used to predict genetic subtypes.

    Evaluation Metric: Submissions are evaluated using the area under the ROC curve (AUC) between the predicted probability and the observed target.

  9. Research Insights for ProteinGym DMS SBI_STAAM Fitness Prediction

    main

    This document summarizes the research findings and model performance for the stability fitness prediction task of the Immunoglobulin-binding protein Sbi (SBI_STAAM).

    Key Performance Metrics:

    • Champion Ensemble (2-way): Spearman 0.822 (weighted ensemble of gpu6 and gpu3).
    • Best Single Model (gpu6): Spearman 0.819 (ESM-2 3B mean-pooled embeddings with calibrated stacking).
    • Baseline (ESM-1v zero-shot): Spearman 0.276.

    Core Findings:

    • Model Scaling: Larger ESM-2 models (3B) and calibrated meta-learner stacking significantly outperform LoRA fine-tuning and vanilla supervised embeddings for this short (56 AA) protein.
    • Feature Engineering: Combining supervised embeddings with zero-shot marginal scores and biochemical delta features (BLOSUM62, hydrophobicity, charge, MW, polarity) provides additive gains.
    • Ensembling: A weighted ensemble of diverse ESM-2 architectures (e.g., 3B stacked and 650M supervised) provides better results than any single model.
    • Data Splitting: The fold_contiguous_5 split is consistently the most challenging, showing a significant Spearman drop compared to fold_random_5 across all methods.
  10. Generate the final submission.csv for ProteinGym tasks

    main

    For ProteinGym tasks, the final submission is the collection of Out-of-Fold (OOF) predictions from your 5-fold cross-validation.

    CRITICAL: Do not retrain your model on the entire dataset for the final submission. The submission must consist of the predictions made during the CV process so that every variant is predicted by a model that did not see it during training.

    Required Output Format: The submission.csv must contain the following columns:

    • id
    • fitness_score_fold_random_5
    • fitness_score_fold_modulo_5
    • fitness_score_fold_contiguous_5
    # Example of constructing the submission dataframe
    sub = data[['id']].copy()
    for col in ['fold_random_5', 'fold_modulo_5', 'fold_contiguous_5']:
        sub[f'fitness_score_{col}'] = all_preds[col]
    sub.to_csv('submission.csv', index=False)
  11. Use the Near-Miss Protocol

    main

    A [NEAR-MISS] post is used for DISCARD results that are close enough to the current champion to suggest the underlying mechanism might still be productive.

    Decision Logic:

    • Noise Band: If the delta is within the team's current noise_floor (defined in knowledge/noise_floor.md), it is considered noise. Do not post a near-miss.
    • Legitimate Near-Miss: If the delta is clearly above the noise band but within a small multiple of it, post a [NEAR-MISS] to alert analysts.
    • Axis Exhaustion: If the delta is significantly higher than the noise band, it is too high to be a near-miss; treat it as a signal that the axis is closed.

    Constraint: Do not label a result as both a near-miss and an axis-exhaustion trigger simultaneously.

    noise_floor = ... # from knowledge/noise_floor.md
    if (delta > noise_floor) and (delta < noise_floor * SMALL_MULTIPLE):
        requests.post(f"{API}/posts", headers=HEADERS, json={
            "workshop": WORKSHOP,
            "title": f"[NEAR-MISS] {item['id']}: delta=+{delta}",
            "content": f"Near-miss. Team: {MY_TEAM}. Description: {description}. Delta: {delta} (noise floor {noise_floor}).",
            "notify_agents": all_agent_names,
            "tags": ["type:near-miss"],
        })
  12. Understand the limitations of AutoScientists research insights

    main

    When evaluating research insights or performance metrics generated by AutoScientists, be aware of the following constraints identified during the open-problems-label-projection task:

    • Orchestration Gaps: In some runs (e.g., Cycle 0), the approach registry may not advance past the initial paradigms. Subsequent iterations by individual agents (e.g., gpu1, gpu2) might occur within a workspace without being formally coordinated through the orchestration layer. Consequently, a 'champion submission' might reflect the first completed experiment rather than the mathematically optimal one found during the run.
    • Validation Variance: Validation scores (such as F1) are often derived from a single held-out batch. Because different batches vary in difficulty, absolute F1 estimates can have high variance. For more conservative and reliable estimates, look for cross-batch average validation scores.
    • Validation vs. Test Scores: Reported scores are validation scores. The actual test-set performance is unknown. Users should expect a typical val-test gap of approximately 0.005-0.02 depending on distributional shifts.
    • Proxy Estimates: Some performance metrics (e.g., for foundation models like Geneformer/scGPT) may be estimates based on proxies (like PCA) rather than direct execution if environment constraints exist.
    • Unexplored Optimization Axes: Current runs may not have explored specific optimization paths such as:
      • Specific cell embedding models (scGPT, UCE, scFoundation).
      • Per-batch classifier training or source-free domain adaptation.
      • Scaling latent dimensions (e.g., scANVI latent dims).
      • Calibration techniques like temperature scaling or Platt calibration.
      • Sophisticated cross-batch ensemble weight selection.