[Upstream sync] K-Dense-AI/scientific-agent-skills (github) — 0 added, 22 modified #25
@@ -1,465 +1,247 @@
|
|||||||
---
|
---
|
||||||
lineage_type: import
|
lineage_type: import
|
||||||
upstream_source: https://github.com/K-Dense-AI/scientific-agent-skills/blob/9c9bd2e9/skills/torchdrug/SKILL.md
|
upstream_source: https://github.com/K-Dense-AI/scientific-agent-skills/blob/e8727695/skills/torchdrug/SKILL.md
|
||||||
upstream_sha: 9c9bd2e9
|
upstream_sha: e8727695
|
||||||
imported_at: 2026-06-27
|
imported_at: 2026-07-20
|
||||||
prompt_class: unknown
|
prompt_class: catalogue
|
||||||
upstream_changes: accepted
|
upstream_changes: accepted
|
||||||
name: torchdrug
|
name: torchdrug
|
||||||
description: PyTorch-native graph neural networks for molecules and proteins. Use when building custom GNN architectures for drug discovery, protein modeling, or knowledge graph reasoning. Best for custom model development, protein property prediction, retrosynthesis. For pre-trained models and diverse featurizers use deepchem; for benchmark datasets use pytdc.
|
description: Build and troubleshoot TorchDrug 0.2.1 workflows for molecular graphs, property prediction, self-supervised pretraining, molecule generation, retrosynthesis, protein representation learning, and knowledge graph reasoning. Use when code imports torchdrug or needs its datasets, models, tasks, or Engine.
|
||||||
license: Apache-2.0 license
|
license: Apache-2.0 license
|
||||||
metadata: {"version": "1.0", "skill-author": "K-Dense Inc."}
|
compatibility: TorchDrug 0.2.1 requires Python 3.7-3.10 and supports PyTorch 1.8-2.0. Apple Silicon is CPU-only; MPS is unsupported.
|
||||||
|
allowed-tools: Read Write Edit Bash
|
||||||
|
metadata:
|
||||||
|
version: "1.1"
|
||||||
|
skill-author: K-Dense Inc.
|
||||||
---
|
---
|
||||||
|
|
||||||
# TorchDrug
|
# TorchDrug
|
||||||
|
|
||||||
## Overview
|
Use TorchDrug as a modular PyTorch graph-learning stack:
|
||||||
|
|
||||||
TorchDrug is a comprehensive PyTorch-based machine learning toolbox for drug discovery and molecular science. Apply graph neural networks, pre-trained models, and task definitions to molecules, proteins, and biological knowledge graphs, including molecular property prediction, protein modeling, knowledge graph reasoning, molecular generation, retrosynthesis planning, with 40+ curated datasets and 20+ model architectures.
|
1. load a `datasets.*` dataset,
|
||||||
|
2. choose a `models.*` representation model,
|
||||||
|
3. wrap it in a `tasks.*` objective,
|
||||||
|
4. train and evaluate it with `core.Engine`.
|
||||||
|
|
||||||
## When to Use This Skill
|
The current official documentation and latest release are both **0.2.1**. Treat
|
||||||
|
newer Python or PyTorch combinations as unverified rather than silently assuming
|
||||||
|
compatibility.
|
||||||
|
|
||||||
This skill should be used when working with:
|
## Start with the version guard
|
||||||
|
|
||||||
**Data Types:**
|
Before generating or debugging code, inspect the environment:
|
||||||
- SMILES strings or molecular structures
|
|
||||||
- Protein sequences or 3D structures (PDB files)
|
|
||||||
- Chemical reactions and retrosynthesis
|
|
||||||
- Biomedical knowledge graphs
|
|
||||||
- Drug discovery datasets
|
|
||||||
|
|
||||||
**Tasks:**
|
|
||||||
- Predicting molecular properties (solubility, toxicity, activity)
|
|
||||||
- Protein function or structure prediction
|
|
||||||
- Drug-target binding prediction
|
|
||||||
- Generating new molecular structures
|
|
||||||
- Planning chemical synthesis routes
|
|
||||||
- Link prediction in biomedical knowledge bases
|
|
||||||
- Training graph neural networks on scientific data
|
|
||||||
|
|
||||||
**Libraries and Integration:**
|
|
||||||
- TorchDrug is the primary library
|
|
||||||
- Often used with RDKit for cheminformatics
|
|
||||||
- Compatible with PyTorch and PyTorch Lightning
|
|
||||||
- Integrates with AlphaFold and ESM for proteins
|
|
||||||
|
|
||||||
## Getting Started
|
|
||||||
|
|
||||||
### Installation
|
|
||||||
|
|
||||||
TorchDrug **0.2.1** (latest on PyPI, July 2023) requires **Python 3.7–3.10** and **PyTorch 1.8–2.0**. Install PyTorch and `torch-scatter` / `torch-cluster` first (wheel URL depends on your PyTorch and CUDA versions — see [installation docs](https://torchdrug.ai/docs/installation.html)).
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
uv pip install torch
|
python --version
|
||||||
# Match torch/CUDA in the URL, e.g. torch-2.0.0+cu118 or cpu
|
python -c "import torch; print(torch.__version__)"
|
||||||
uv pip install torch-scatter torch-cluster -f https://pytorch-geometric.com/whl/torch-2.0.0+cu118.html
|
python -c "import torchdrug; print(torchdrug.__version__)"
|
||||||
uv pip install torchdrug==0.2.1
|
|
||||||
```
|
```
|
||||||
|
|
||||||
On Apple Silicon, compile scatter/cluster from source; TorchDrug runs on CPU only (no MPS). Conda: `conda install torchdrug -c milagraph -c conda-forge -c pytorch -c pyg`.
|
The supported matrix for TorchDrug 0.2.1 is:
|
||||||
|
|
||||||
### Quick Example
|
- Python 3.7 through 3.10
|
||||||
|
- PyTorch 1.8 through 2.0
|
||||||
|
- Linux, Windows, or macOS
|
||||||
|
- Apple Silicon: PyTorch 1.13 or later, CPU only; no MPS support
|
||||||
|
|
||||||
|
If the project uses Python 3.11+ or PyTorch 2.1+, create a compatible environment
|
||||||
|
or explicitly test a source build. Do not present such combinations as supported.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
Prefer a dedicated Python 3.10 environment and pin the TorchDrug release:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
uv venv --python 3.10
|
||||||
|
source .venv/bin/activate
|
||||||
|
uv pip install "torch==2.0.0"
|
||||||
|
```
|
||||||
|
|
||||||
|
Install `torch-scatter` and `torch-cluster` wheels matched to the exact PyTorch
|
||||||
|
and CUDA pair, following the
|
||||||
|
[official installation page](https://torchdrug.ai/docs/installation.html). For a
|
||||||
|
CPU-only PyTorch 2.0 environment, one reproducible wheel combination is:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
uv pip install "torch-scatter==2.1.1" "torch-cluster==1.6.1" \
|
||||||
|
--find-links "https://data.pyg.org/whl/torch-2.0.0+cpu.html"
|
||||||
|
uv pip install "torchdrug==0.2.1"
|
||||||
|
```
|
||||||
|
|
||||||
|
Do not copy a CUDA wheel URL between environments. Match the PyTorch version,
|
||||||
|
CUDA build, Python ABI, and platform. On Apple Silicon, the official docs require
|
||||||
|
building `torch-scatter` and `torch-cluster` from source; pin reviewed source
|
||||||
|
revisions and expect CPU execution.
|
||||||
|
|
||||||
|
## Canonical property-prediction workflow
|
||||||
|
|
||||||
|
Use the documented ClinTox → GIN → `PropertyPrediction` → `Engine` pattern:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
import torch
|
import torch
|
||||||
from torchdrug import datasets, models, tasks
|
from torchdrug import core, datasets, models, tasks
|
||||||
from torch.utils.data import DataLoader
|
|
||||||
|
|
||||||
# Load molecular dataset
|
dataset = datasets.ClinTox("~/molecule-datasets/")
|
||||||
dataset = datasets.BBBP("~/molecule-datasets/")
|
lengths = [int(0.8 * len(dataset)), int(0.1 * len(dataset))]
|
||||||
train_set, valid_set, test_set = dataset.split()
|
lengths.append(len(dataset) - sum(lengths))
|
||||||
|
train_set, valid_set, test_set = torch.utils.data.random_split(dataset, lengths)
|
||||||
|
|
||||||
# Define GNN model
|
|
||||||
model = models.GIN(
|
model = models.GIN(
|
||||||
input_dim=dataset.node_feature_dim,
|
input_dim=dataset.node_feature_dim,
|
||||||
hidden_dims=[256, 256, 256],
|
hidden_dims=[256, 256, 256, 256],
|
||||||
edge_input_dim=dataset.edge_feature_dim,
|
short_cut=True,
|
||||||
batch_norm=True,
|
batch_norm=True,
|
||||||
readout="mean"
|
concat_hidden=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
# Create property prediction task
|
|
||||||
task = tasks.PropertyPrediction(
|
task = tasks.PropertyPrediction(
|
||||||
model,
|
model,
|
||||||
task=dataset.tasks,
|
task=dataset.tasks,
|
||||||
criterion="bce",
|
criterion="bce",
|
||||||
metric=["auroc", "auprc"]
|
metric=("auprc", "auroc"),
|
||||||
)
|
)
|
||||||
|
|
||||||
# Train with PyTorch
|
|
||||||
optimizer = torch.optim.Adam(task.parameters(), lr=1e-3)
|
optimizer = torch.optim.Adam(task.parameters(), lr=1e-3)
|
||||||
train_loader = DataLoader(train_set, batch_size=32, shuffle=True)
|
solver = core.Engine(
|
||||||
|
task,
|
||||||
for epoch in range(100):
|
train_set,
|
||||||
for batch in train_loader:
|
valid_set,
|
||||||
loss = task(batch)
|
test_set,
|
||||||
optimizer.zero_grad()
|
optimizer,
|
||||||
loss.backward()
|
batch_size=1024,
|
||||||
optimizer.step()
|
|
||||||
```
|
|
||||||
|
|
||||||
## Core Capabilities
|
|
||||||
|
|
||||||
### 1. Molecular Property Prediction
|
|
||||||
|
|
||||||
Predict chemical, physical, and biological properties of molecules from structure.
|
|
||||||
|
|
||||||
**Use Cases:**
|
|
||||||
- Drug-likeness and ADMET properties
|
|
||||||
- Toxicity screening
|
|
||||||
- Quantum chemistry properties
|
|
||||||
- Binding affinity prediction
|
|
||||||
|
|
||||||
**Key Components:**
|
|
||||||
- 20+ molecular datasets (BBBP, HIV, Tox21, QM9, etc.)
|
|
||||||
- GNN models (GIN, GAT, SchNet)
|
|
||||||
- PropertyPrediction and MultipleBinaryClassification tasks
|
|
||||||
|
|
||||||
**Reference:** See `references/molecular_property_prediction.md` for:
|
|
||||||
- Complete dataset catalog
|
|
||||||
- Model selection guide
|
|
||||||
- Training workflows and best practices
|
|
||||||
- Feature engineering details
|
|
||||||
|
|
||||||
### 2. Protein Modeling
|
|
||||||
|
|
||||||
Work with protein sequences, structures, and properties.
|
|
||||||
|
|
||||||
**Use Cases:**
|
|
||||||
- Enzyme function prediction
|
|
||||||
- Protein stability and solubility
|
|
||||||
- Subcellular localization
|
|
||||||
- Protein-protein interactions
|
|
||||||
- Structure prediction
|
|
||||||
|
|
||||||
**Key Components:**
|
|
||||||
- 15+ protein datasets (EnzymeCommission, GeneOntology, PDBBind, etc.)
|
|
||||||
- Sequence models (ESM, ProteinBERT, ProteinLSTM)
|
|
||||||
- Structure models (GearNet, SchNet)
|
|
||||||
- Multiple task types for different prediction levels
|
|
||||||
|
|
||||||
**Reference:** See `references/protein_modeling.md` for:
|
|
||||||
- Protein-specific datasets
|
|
||||||
- Sequence vs structure models
|
|
||||||
- Pre-training strategies
|
|
||||||
- Integration with AlphaFold and ESM
|
|
||||||
|
|
||||||
### 3. Knowledge Graph Reasoning
|
|
||||||
|
|
||||||
Predict missing links and relationships in biological knowledge graphs.
|
|
||||||
|
|
||||||
**Use Cases:**
|
|
||||||
- Drug repurposing
|
|
||||||
- Disease mechanism discovery
|
|
||||||
- Gene-disease associations
|
|
||||||
- Multi-hop biomedical reasoning
|
|
||||||
|
|
||||||
**Key Components:**
|
|
||||||
- General KGs (FB15k, WN18) and biomedical (Hetionet)
|
|
||||||
- Embedding models (TransE, RotatE, ComplEx)
|
|
||||||
- KnowledgeGraphCompletion task
|
|
||||||
|
|
||||||
**Reference:** See `references/knowledge_graphs.md` for:
|
|
||||||
- Knowledge graph datasets (including Hetionet with 45k biomedical entities)
|
|
||||||
- Embedding model comparison
|
|
||||||
- Evaluation metrics and protocols
|
|
||||||
- Biomedical applications
|
|
||||||
|
|
||||||
### 4. Molecular Generation
|
|
||||||
|
|
||||||
Generate novel molecular structures with desired properties.
|
|
||||||
|
|
||||||
**Use Cases:**
|
|
||||||
- De novo drug design
|
|
||||||
- Lead optimization
|
|
||||||
- Chemical space exploration
|
|
||||||
- Property-guided generation
|
|
||||||
|
|
||||||
**Key Components:**
|
|
||||||
- Autoregressive generation
|
|
||||||
- GCPN (policy-based generation)
|
|
||||||
- GraphAutoregressiveFlow
|
|
||||||
- Property optimization workflows
|
|
||||||
|
|
||||||
**Reference:** See `references/molecular_generation.md` for:
|
|
||||||
- Generation strategies (unconditional, conditional, scaffold-based)
|
|
||||||
- Multi-objective optimization
|
|
||||||
- Validation and filtering
|
|
||||||
- Integration with property prediction
|
|
||||||
|
|
||||||
### 5. Retrosynthesis
|
|
||||||
|
|
||||||
Predict synthetic routes from target molecules to starting materials.
|
|
||||||
|
|
||||||
**Use Cases:**
|
|
||||||
- Synthesis planning
|
|
||||||
- Route optimization
|
|
||||||
- Synthetic accessibility assessment
|
|
||||||
- Multi-step planning
|
|
||||||
|
|
||||||
**Key Components:**
|
|
||||||
- USPTO-50k reaction dataset
|
|
||||||
- CenterIdentification (reaction center prediction)
|
|
||||||
- SynthonCompletion (reactant prediction)
|
|
||||||
- End-to-end Retrosynthesis pipeline
|
|
||||||
|
|
||||||
**Reference:** See `references/retrosynthesis.md` for:
|
|
||||||
- Task decomposition (center ID → synthon completion)
|
|
||||||
- Multi-step synthesis planning
|
|
||||||
- Commercial availability checking
|
|
||||||
- Integration with other retrosynthesis tools
|
|
||||||
|
|
||||||
### 6. Graph Neural Network Models
|
|
||||||
|
|
||||||
Comprehensive catalog of GNN architectures for different data types and tasks.
|
|
||||||
|
|
||||||
**Available Models:**
|
|
||||||
- General GNNs: GCN, GAT, GIN, RGCN, MPNN
|
|
||||||
- 3D-aware: SchNet, GearNet
|
|
||||||
- Protein-specific: ESM, ProteinBERT, GearNet
|
|
||||||
- Knowledge graph: TransE, RotatE, ComplEx, SimplE
|
|
||||||
- Generative: GraphAutoregressiveFlow
|
|
||||||
|
|
||||||
**Reference:** See `references/models_architectures.md` for:
|
|
||||||
- Detailed model descriptions
|
|
||||||
- Model selection guide by task and dataset
|
|
||||||
- Architecture comparisons
|
|
||||||
- Implementation tips
|
|
||||||
|
|
||||||
### 7. Datasets
|
|
||||||
|
|
||||||
40+ curated datasets spanning chemistry, biology, and knowledge graphs.
|
|
||||||
|
|
||||||
**Categories:**
|
|
||||||
- Molecular properties (drug discovery, quantum chemistry)
|
|
||||||
- Protein properties (function, structure, interactions)
|
|
||||||
- Knowledge graphs (general and biomedical)
|
|
||||||
- Retrosynthesis reactions
|
|
||||||
|
|
||||||
**Reference:** See `references/datasets.md` for:
|
|
||||||
- Complete dataset catalog with sizes and tasks
|
|
||||||
- Dataset selection guide
|
|
||||||
- Loading and preprocessing
|
|
||||||
- Splitting strategies (random, scaffold)
|
|
||||||
|
|
||||||
## Common Workflows
|
|
||||||
|
|
||||||
### Workflow 1: Molecular Property Prediction
|
|
||||||
|
|
||||||
**Scenario:** Predict blood-brain barrier penetration for drug candidates.
|
|
||||||
|
|
||||||
**Steps:**
|
|
||||||
1. Load dataset: `datasets.BBBP()`
|
|
||||||
2. Choose model: GIN for molecular graphs
|
|
||||||
3. Define task: `PropertyPrediction` with binary classification
|
|
||||||
4. Train with scaffold split for realistic evaluation
|
|
||||||
5. Evaluate using AUROC and AUPRC
|
|
||||||
|
|
||||||
**Navigation:** `references/molecular_property_prediction.md` → Dataset selection → Model selection → Training
|
|
||||||
|
|
||||||
### Workflow 2: Protein Function Prediction
|
|
||||||
|
|
||||||
**Scenario:** Predict enzyme function from sequence.
|
|
||||||
|
|
||||||
**Steps:**
|
|
||||||
1. Load dataset: `datasets.EnzymeCommission()`
|
|
||||||
2. Choose model: ESM (pre-trained) or GearNet (with structure)
|
|
||||||
3. Define task: `PropertyPrediction` with multi-class classification
|
|
||||||
4. Fine-tune pre-trained model or train from scratch
|
|
||||||
5. Evaluate using accuracy and per-class metrics
|
|
||||||
|
|
||||||
**Navigation:** `references/protein_modeling.md` → Model selection (sequence vs structure) → Pre-training strategies
|
|
||||||
|
|
||||||
### Workflow 3: Drug Repurposing via Knowledge Graphs
|
|
||||||
|
|
||||||
**Scenario:** Find new disease treatments in Hetionet.
|
|
||||||
|
|
||||||
**Steps:**
|
|
||||||
1. Load dataset: `datasets.Hetionet()`
|
|
||||||
2. Choose model: RotatE or ComplEx
|
|
||||||
3. Define task: `KnowledgeGraphCompletion`
|
|
||||||
4. Train with negative sampling
|
|
||||||
5. Query for "Compound-treats-Disease" predictions
|
|
||||||
6. Filter by plausibility and mechanism
|
|
||||||
|
|
||||||
**Navigation:** `references/knowledge_graphs.md` → Hetionet dataset → Model selection → Biomedical applications
|
|
||||||
|
|
||||||
### Workflow 4: De Novo Molecule Generation
|
|
||||||
|
|
||||||
**Scenario:** Generate drug-like molecules optimized for target binding.
|
|
||||||
|
|
||||||
**Steps:**
|
|
||||||
1. Train property predictor on activity data
|
|
||||||
2. Choose generation approach: GCPN for RL-based optimization
|
|
||||||
3. Define reward function combining affinity, drug-likeness, synthesizability
|
|
||||||
4. Generate candidates with property constraints
|
|
||||||
5. Validate chemistry and filter by drug-likeness
|
|
||||||
6. Rank by multi-objective scoring
|
|
||||||
|
|
||||||
**Navigation:** `references/molecular_generation.md` → Conditional generation → Multi-objective optimization
|
|
||||||
|
|
||||||
### Workflow 5: Retrosynthesis Planning
|
|
||||||
|
|
||||||
**Scenario:** Plan synthesis route for target molecule.
|
|
||||||
|
|
||||||
**Steps:**
|
|
||||||
1. Load dataset: `datasets.USPTO50k()`
|
|
||||||
2. Train center identification model (RGCN)
|
|
||||||
3. Train synthon completion model (GIN)
|
|
||||||
4. Combine into end-to-end retrosynthesis pipeline
|
|
||||||
5. Apply recursively for multi-step planning
|
|
||||||
6. Check commercial availability of building blocks
|
|
||||||
|
|
||||||
**Navigation:** `references/retrosynthesis.md` → Task types → Multi-step planning
|
|
||||||
|
|
||||||
## Integration Patterns
|
|
||||||
|
|
||||||
### With RDKit
|
|
||||||
|
|
||||||
Convert between TorchDrug molecules and RDKit:
|
|
||||||
```python
|
|
||||||
from torchdrug import data
|
|
||||||
from rdkit import Chem
|
|
||||||
|
|
||||||
# SMILES → TorchDrug molecule
|
|
||||||
smiles = "CCO"
|
|
||||||
mol = data.Molecule.from_smiles(smiles)
|
|
||||||
|
|
||||||
# TorchDrug → RDKit
|
|
||||||
rdkit_mol = mol.to_molecule()
|
|
||||||
|
|
||||||
# RDKit → TorchDrug
|
|
||||||
rdkit_mol = Chem.MolFromSmiles(smiles)
|
|
||||||
mol = data.Molecule.from_molecule(rdkit_mol)
|
|
||||||
```
|
|
||||||
|
|
||||||
### With AlphaFold/ESM
|
|
||||||
|
|
||||||
Use predicted structures:
|
|
||||||
```python
|
|
||||||
from torchdrug import data
|
|
||||||
|
|
||||||
# Load AlphaFold predicted structure
|
|
||||||
protein = data.Protein.from_pdb("AF-P12345-F1-model_v4.pdb")
|
|
||||||
|
|
||||||
# Build graph with spatial edges
|
|
||||||
graph = protein.residue_graph(
|
|
||||||
node_position="ca",
|
|
||||||
edge_types=["sequential", "radius"],
|
|
||||||
radius_cutoff=10.0
|
|
||||||
)
|
)
|
||||||
|
solver.train(num_epoch=100)
|
||||||
|
solver.evaluate("valid")
|
||||||
```
|
```
|
||||||
|
|
||||||
### With PyTorch Lightning
|
Add `gpus=[0]` only when a supported CUDA device is available. Omit `gpus` for
|
||||||
|
CPU execution.
|
||||||
|
|
||||||
Wrap tasks for Lightning training:
|
For binary classification, `task.predict(batch)` returns logits; apply
|
||||||
```python
|
`torch.sigmoid` when probabilities are needed. In 0.2.1, normalized regression
|
||||||
import pytorch_lightning as pl
|
predictions are returned on the original target scale, which is a breaking change
|
||||||
|
from older releases.
|
||||||
|
|
||||||
class LightningTask(pl.LightningModule):
|
## Choose the official workflow
|
||||||
def __init__(self, torchdrug_task):
|
|
||||||
super().__init__()
|
|
||||||
self.task = torchdrug_task
|
|
||||||
|
|
||||||
def training_step(self, batch, batch_idx):
|
### Molecular property prediction
|
||||||
return self.task(batch)
|
|
||||||
|
|
||||||
def validation_step(self, batch, batch_idx):
|
- Dataset: `datasets.ClinTox`, `BBBP`, `Tox21`, `QM9`, or another documented
|
||||||
pred = self.task.predict(batch)
|
molecule dataset.
|
||||||
target = self.task.target(batch)
|
- Model: start with `models.GIN`; use `edge_input_dim` when the selected feature
|
||||||
return {"pred": pred, "target": target}
|
configuration supplies edge features.
|
||||||
|
- Task: `tasks.PropertyPrediction`.
|
||||||
|
- Read [molecular property prediction](references/molecular_property_prediction.md).
|
||||||
|
|
||||||
def configure_optimizers(self):
|
### Self-supervised molecular pretraining
|
||||||
return torch.optim.Adam(self.parameters(), lr=1e-3)
|
|
||||||
```
|
|
||||||
|
|
||||||
## Technical Details
|
- InfoGraph: `models.InfoGraph(gin_model, separate_model=False)` wrapped by
|
||||||
|
`tasks.Unsupervised`.
|
||||||
|
- Attribute masking: `tasks.AttributeMasking(model, mask_rate=0.15)`.
|
||||||
|
- Recreate the same encoder for fine-tuning, then load the checkpoint with
|
||||||
|
`strict=False` before training `tasks.PropertyPrediction`.
|
||||||
|
- Read [molecular property prediction](references/molecular_property_prediction.md).
|
||||||
|
|
||||||
For deep dives into TorchDrug's architecture:
|
### Molecule generation
|
||||||
|
|
||||||
**Core Concepts:** See `references/core_concepts.md` for:
|
- Dataset: `datasets.ZINC250k(..., kekulize=True, atom_feature="symbol")`.
|
||||||
- Architecture philosophy (modular, configurable)
|
- GCPN: an `models.RGCN` encoder wrapped by `tasks.GCPNGeneration`.
|
||||||
- Data structures (Graph, Molecule, Protein, PackedGraph)
|
- GraphAF: node and edge `models.GraphAF` flows wrapped by
|
||||||
- Model interface and forward function signature
|
`tasks.AutoregressiveGeneration`.
|
||||||
- Task interface (predict, target, forward, evaluate)
|
- Supported optimization tasks in the tutorial are `"qed"` and `"plogp"`;
|
||||||
- Training workflows and best practices
|
criteria are `"nll"` and/or `"ppo"`.
|
||||||
- Loss functions and metrics
|
- Read [molecular generation](references/molecular_generation.md).
|
||||||
- Common pitfalls and debugging
|
|
||||||
|
|
||||||
## Quick Reference Cheat Sheet
|
### Retrosynthesis
|
||||||
|
|
||||||
**Choose Dataset:**
|
- Create two synchronized `datasets.USPTO50k` views: reaction mode for center
|
||||||
- Molecular property → `references/datasets.md` → Molecular section
|
identification and `as_synthon=True` for synthon completion.
|
||||||
- Protein task → `references/datasets.md` → Protein section
|
- Train `tasks.CenterIdentification` and `tasks.SynthonCompletion` separately.
|
||||||
- Knowledge graph → `references/datasets.md` → Knowledge graph section
|
- Combine the trained tasks with `tasks.Retrosynthesis`; do not pass raw models
|
||||||
|
directly to the end-to-end task.
|
||||||
|
- Read [retrosynthesis](references/retrosynthesis.md).
|
||||||
|
|
||||||
**Choose Model:**
|
### Knowledge graph reasoning
|
||||||
- Molecules → `references/models_architectures.md` → GNN section → GIN/GAT/SchNet
|
|
||||||
- Proteins (sequence) → `references/models_architectures.md` → Protein section → ESM
|
|
||||||
- Proteins (structure) → `references/models_architectures.md` → Protein section → GearNet
|
|
||||||
- Knowledge graph → `references/models_architectures.md` → KG section → RotatE/ComplEx
|
|
||||||
|
|
||||||
**Common Tasks:**
|
- Embedding workflow: `datasets.FB15k237` → `models.RotatE` →
|
||||||
- Property prediction → `references/molecular_property_prediction.md` or `references/protein_modeling.md`
|
`tasks.KnowledgeGraphCompletion`.
|
||||||
- Generation → `references/molecular_generation.md`
|
- Neural reasoning workflow: `models.NeuralLP` with `fact_ratio=0.75`.
|
||||||
- Retrosynthesis → `references/retrosynthesis.md`
|
- Read [knowledge graph reasoning](references/knowledge_graphs.md).
|
||||||
- KG reasoning → `references/knowledge_graphs.md`
|
|
||||||
|
|
||||||
**Understand Architecture:**
|
### Protein modeling
|
||||||
- Data structures → `references/core_concepts.md` → Data Structures
|
|
||||||
- Model design → `references/core_concepts.md` → Model Interface
|
|
||||||
- Task design → `references/core_concepts.md` → Task Interface
|
|
||||||
|
|
||||||
## Troubleshooting Common Issues
|
- Build proteins with `data.Protein.from_sequence`, `from_pdb`, or
|
||||||
|
`from_molecule`.
|
||||||
|
- Sequence encoders include `models.ESM`, `ProteinCNN`, `ProteinResNet`,
|
||||||
|
`ProteinLSTM`, and `ProteinBERT`; structure encoders include `models.GearNet`.
|
||||||
|
- Use documented graph-construction layers rather than a nonexistent
|
||||||
|
`protein.residue_graph()` convenience method.
|
||||||
|
- Read [protein modeling](references/protein_modeling.md).
|
||||||
|
|
||||||
**Issue: Dimension mismatch errors**
|
## Rules for reliable TorchDrug code
|
||||||
→ Check `model.input_dim` matches `dataset.node_feature_dim`
|
|
||||||
→ See `references/core_concepts.md` → Essential Attributes
|
|
||||||
|
|
||||||
**Issue: Poor performance on molecular tasks**
|
1. **Follow the 0.2.1 API.** The official docs are not a rolling latest-version
|
||||||
→ Use scaffold splitting, not random
|
site.
|
||||||
→ Try GIN instead of GCN
|
2. **Prefer documented feature names.** Use `atom_feature`, `bond_feature`,
|
||||||
→ See `references/molecular_property_prediction.md` → Best Practices
|
`residue_feature`, and `mol_feature`; `node_feature`, `edge_feature`, and
|
||||||
|
`graph_feature` are deprecated aliases in relevant dataset constructors.
|
||||||
|
3. **Let `Engine` preprocess tasks.** If composing pre-trained tasks without
|
||||||
|
constructing their solvers, call each task's `preprocess()` manually.
|
||||||
|
4. **Keep paired splits synchronized.** For retrosynthesis, reset the same random
|
||||||
|
seed before splitting reaction and synthon datasets.
|
||||||
|
5. **Use TorchDrug collation.** Use `data.graph_collate` or `core.Engine`;
|
||||||
|
generic PyTorch collation does not know how to pack TorchDrug graphs.
|
||||||
|
6. **Separate model, task, and engine arguments.** A common source of invented
|
||||||
|
code is passing task options to a model or passing raw models where a composed
|
||||||
|
task is required.
|
||||||
|
7. **Validate generated chemistry.** Treat model outputs as candidates, not as
|
||||||
|
experimentally valid or synthesizable compounds.
|
||||||
|
|
||||||
**Issue: Protein model not learning**
|
## Troubleshooting
|
||||||
→ Use pre-trained ESM for sequence tasks
|
|
||||||
→ Check edge construction for structure models
|
|
||||||
→ See `references/protein_modeling.md` → Training Workflows
|
|
||||||
|
|
||||||
**Issue: Memory errors with large graphs**
|
### Installation or import failure
|
||||||
→ Reduce batch size
|
|
||||||
→ Use gradient accumulation
|
|
||||||
→ See `references/core_concepts.md` → Memory Efficiency
|
|
||||||
|
|
||||||
**Issue: Generated molecules are invalid**
|
Check Python, PyTorch, `torch-scatter`, and `torch-cluster` as one compatibility
|
||||||
→ Add validity constraints
|
set. Most failures are binary-wheel mismatches, unsupported Python versions, or
|
||||||
→ Post-process with RDKit validation
|
attempts to use MPS.
|
||||||
→ See `references/molecular_generation.md` → Validation and Filtering
|
|
||||||
|
|
||||||
## Version Notes (0.2.1)
|
### Feature dimension mismatch
|
||||||
|
|
||||||
- `PropertyPrediction.predict()` returns **original-scale** values (not standardized); code written for older TorchDrug may need metric/threshold updates ([release notes](https://github.com/DeepGraphLearning/torchdrug/releases/tag/v0.2.1)).
|
Build model dimensions from the loaded dataset:
|
||||||
- Dataset constructors prefer `atom_feature` / `bond_feature` / `mol_feature`; `node_feature` / `edge_feature` / `graph_feature` are deprecated aliases.
|
|
||||||
- `EvolutionaryScaleModeling` supports ESM-2 checkpoints in addition to ESM-1b.
|
|
||||||
|
|
||||||
## Resources
|
- `dataset.node_feature_dim`
|
||||||
|
- `dataset.edge_feature_dim`
|
||||||
|
- `dataset.num_bond_type`
|
||||||
|
- `dataset.num_entity` and `dataset.num_relation` for knowledge graphs
|
||||||
|
|
||||||
**Official Documentation:** https://torchdrug.ai/docs/ (0.2.1)
|
Do not hard-code dimensions copied from a different feature configuration.
|
||||||
**GitHub:** https://github.com/DeepGraphLearning/torchdrug
|
|
||||||
**Paper:** TorchDrug: A Powerful and Flexible Machine Learning Platform for Drug Discovery
|
|
||||||
|
|
||||||
## Summary
|
### Device mismatch
|
||||||
|
|
||||||
Navigate to the appropriate reference file based on your task:
|
Pass `gpus=[0]` to `core.Engine` for supported CUDA execution. For manual
|
||||||
|
prediction, collate first and move the entire nested batch with `utils.cuda`.
|
||||||
|
|
||||||
1. **Molecular property prediction** → `molecular_property_prediction.md`
|
### Checkpoint mismatch
|
||||||
2. **Protein modeling** → `protein_modeling.md`
|
|
||||||
3. **Knowledge graphs** → `knowledge_graphs.md`
|
|
||||||
4. **Molecular generation** → `molecular_generation.md`
|
|
||||||
5. **Retrosynthesis** → `retrosynthesis.md`
|
|
||||||
6. **Model selection** → `models_architectures.md`
|
|
||||||
7. **Dataset selection** → `datasets.md`
|
|
||||||
8. **Technical details** → `core_concepts.md`
|
|
||||||
|
|
||||||
Each reference provides comprehensive coverage of its domain with examples, best practices, and common use cases.
|
Recreate the same model and feature configuration. For pretraining-to-fine-tuning
|
||||||
|
transfer, load the checkpoint's `"model"` state with `strict=False`; for a complete
|
||||||
|
solver, use `solver.save()` and `solver.load()`.
|
||||||
|
|
||||||
|
## Reference index
|
||||||
|
|
||||||
|
- [Core concepts and data structures](references/core_concepts.md)
|
||||||
|
- [Datasets](references/datasets.md)
|
||||||
|
- [Models and architectures](references/models_architectures.md)
|
||||||
|
- [Molecular property prediction and pretraining](references/molecular_property_prediction.md)
|
||||||
|
- [Protein modeling](references/protein_modeling.md)
|
||||||
|
- [Molecular generation](references/molecular_generation.md)
|
||||||
|
- [Retrosynthesis](references/retrosynthesis.md)
|
||||||
|
- [Knowledge graph reasoning](references/knowledge_graphs.md)
|
||||||
|
|
||||||
|
## Upstream sources
|
||||||
|
|
||||||
|
- [TorchDrug 0.2.1 documentation](https://torchdrug.ai/docs/)
|
||||||
|
- [Tutorial index](https://torchdrug.ai/docs/tutorials/)
|
||||||
|
- [Installation](https://torchdrug.ai/docs/installation.html)
|
||||||
|
- [Package reference](https://torchdrug.ai/docs/api/)
|
||||||
|
- [TorchDrug 0.2.1 release notes](https://github.com/DeepGraphLearning/torchdrug/releases/tag/v0.2.1)
|
||||||
|
|||||||
+145
-346
@@ -1,393 +1,192 @@
|
|||||||
---
|
---
|
||||||
title: "Datasets Reference"
|
title: "Datasets"
|
||||||
task: ""
|
task: ""
|
||||||
lineage_type: import
|
lineage_type: import
|
||||||
upstream_source: https://github.com/K-Dense-AI/scientific-agent-skills/blob/9c9bd2e9/skills/torchdrug/references/datasets.md
|
upstream_source: https://github.com/K-Dense-AI/scientific-agent-skills/blob/e8727695/skills/torchdrug/references/datasets.md
|
||||||
upstream_sha: 9c9bd2e9
|
upstream_sha: e8727695
|
||||||
imported_at: 2026-06-27
|
imported_at: 2026-07-20
|
||||||
prompt_class: catalogue
|
prompt_class: catalogue
|
||||||
upstream_changes: accepted
|
upstream_changes: accepted
|
||||||
author: upstream
|
author: upstream
|
||||||
validated: false
|
validated: false
|
||||||
---
|
---
|
||||||
|
|
||||||
# Datasets Reference
|
# Datasets
|
||||||
|
|
||||||
## Overview
|
Use the
|
||||||
|
[TorchDrug 0.2.1 dataset reference](https://torchdrug.ai/docs/api/datasets.html)
|
||||||
|
as the class inventory and signature source. Dataset constructors download and
|
||||||
|
cache data under the path supplied by the caller.
|
||||||
|
|
||||||
TorchDrug provides 40+ curated datasets across multiple domains: molecular property prediction, protein modeling, knowledge graph reasoning, and retrosynthesis. All datasets support lazy loading, automatic downloading, and customizable feature extraction.
|
## Dataset families
|
||||||
|
|
||||||
## Molecular Property Prediction Datasets
|
### Molecule property prediction
|
||||||
|
|
||||||
### Drug Discovery Classification
|
Documented classes include:
|
||||||
|
|
||||||
| Dataset | Size | Task | Classes | Description |
|
- Classification: `BACE`, `BBBP`, `ClinTox`, `HIV`, `MUV`, `SIDER`, `Tox21`,
|
||||||
|---------|------|------|---------|-------------|
|
`ToxCast`
|
||||||
| **BACE** | 1,513 | Binary | 2 | β-secretase inhibition for Alzheimer's |
|
- Regression / quantum properties: `FreeSolv`, `Lipophilicity`, `QM8`, `QM9`,
|
||||||
| **BBBP** | 2,039 | Binary | 2 | Blood-brain barrier penetration |
|
`PCQM4M`
|
||||||
| **HIV** | 41,127 | Binary | 2 | Inhibition of HIV replication |
|
- Pretraining / generation: `ChEMBLFiltered`, `ZINC250k`, `ZINC2m`, `MOSES`
|
||||||
| **ClinTox** | 1,478 | Multi-label | 2 | Clinical trial toxicity |
|
|
||||||
| **SIDER** | 1,427 | Multi-label | 27 | Side effects by system organ class |
|
|
||||||
| **Tox21** | 7,831 | Multi-label | 12 | Toxicity across 12 targets |
|
|
||||||
| **ToxCast** | 8,576 | Multi-label | 617 | High-throughput toxicology |
|
|
||||||
| **MUV** | 93,087 | Multi-label | 17 | Unbiased validation for screening |
|
|
||||||
|
|
||||||
**Key Features:**
|
The official property tutorial uses `ClinTox`; the pretraining tutorial uses
|
||||||
- All use scaffold splits for realistic evaluation
|
`ClinTox` for a small demonstration and recommends larger data such as `ZINC2m`
|
||||||
- Binary classification metrics: AUROC, AUPRC
|
for real pretraining; the generation tutorial uses `ZINC250k`.
|
||||||
- Multi-label handles missing values
|
|
||||||
|
|
||||||
**Use Cases:**
|
|
||||||
- Drug safety prediction
|
|
||||||
- Virtual screening
|
|
||||||
- ADMET property prediction
|
|
||||||
|
|
||||||
### Drug Discovery Regression
|
|
||||||
|
|
||||||
| Dataset | Size | Property | Units | Description |
|
|
||||||
|---------|------|----------|-------|-------------|
|
|
||||||
| **ESOL** | 1,128 | Solubility | log(mol/L) | Water solubility |
|
|
||||||
| **FreeSolv** | 642 | Hydration | kcal/mol | Hydration free energy |
|
|
||||||
| **Lipophilicity** | 4,200 | LogD | - | Octanol/water distribution |
|
|
||||||
| **SAMPL** | 643 | Solvation | kcal/mol | Solvation free energies |
|
|
||||||
|
|
||||||
**Metrics:** MAE, RMSE, R²
|
|
||||||
**Use Cases:** ADME optimization, lead optimization
|
|
||||||
|
|
||||||
### Quantum Chemistry
|
|
||||||
|
|
||||||
| Dataset | Size | Properties | Description |
|
|
||||||
|---------|------|------------|-------------|
|
|
||||||
| **QM7** | 7,165 | 1 | Atomization energy |
|
|
||||||
| **QM8** | 21,786 | 12 | Electronic spectra, excited states |
|
|
||||||
| **QM9** | 133,885 | 12 | Geometric, energetic, electronic, thermodynamic |
|
|
||||||
| **PCQM4M** | 3.8M | 1 | Large-scale HOMO-LUMO gap |
|
|
||||||
|
|
||||||
**Properties (QM9):**
|
|
||||||
- Dipole moment
|
|
||||||
- Isotropic polarizability
|
|
||||||
- HOMO/LUMO energies
|
|
||||||
- Internal energy, enthalpy, free energy
|
|
||||||
- Heat capacity
|
|
||||||
- Electronic spatial extent
|
|
||||||
|
|
||||||
**Use Cases:**
|
|
||||||
- Quantum property prediction
|
|
||||||
- Method development benchmarking
|
|
||||||
- Pre-training molecular models
|
|
||||||
|
|
||||||
### Large Molecule Databases
|
|
||||||
|
|
||||||
| Dataset | Size | Description | Use Case |
|
|
||||||
|---------|------|-------------|----------|
|
|
||||||
| **ZINC250k** | 250,000 | Drug-like molecules | Generative model training |
|
|
||||||
| **ZINC2M** | 2,000,000 | Drug-like molecules | Large-scale pre-training |
|
|
||||||
| **ChEMBL** | Millions | Bioactive molecules | Property prediction, generation |
|
|
||||||
|
|
||||||
## Protein Datasets
|
|
||||||
|
|
||||||
### Function Prediction
|
|
||||||
|
|
||||||
| Dataset | Size | Task | Classes | Description |
|
|
||||||
|---------|------|------|---------|-------------|
|
|
||||||
| **EnzymeCommission** | 17,562 | Multi-class | 7 levels | EC number classification |
|
|
||||||
| **GeneOntology** | 46,796 | Multi-label | 489 | GO term prediction (BP/MF/CC) |
|
|
||||||
| **BetaLactamase** | 5,864 | Regression | - | Enzyme activity levels |
|
|
||||||
| **Fluorescence** | 54,025 | Regression | - | GFP fluorescence intensity |
|
|
||||||
| **Stability** | 53,614 | Regression | - | Thermostability (ΔΔG) |
|
|
||||||
|
|
||||||
**Features:**
|
|
||||||
- Sequence and/or structure input
|
|
||||||
- Evolutionary information available
|
|
||||||
- Multiple train/test splits
|
|
||||||
|
|
||||||
**Use Cases:**
|
|
||||||
- Protein engineering
|
|
||||||
- Function annotation
|
|
||||||
- Enzyme design
|
|
||||||
|
|
||||||
### Localization and Solubility
|
|
||||||
|
|
||||||
| Dataset | Size | Task | Classes | Description |
|
|
||||||
|---------|------|------|---------|-------------|
|
|
||||||
| **Solubility** | 62,478 | Binary | 2 | Protein solubility |
|
|
||||||
| **BinaryLocalization** | 22,168 | Binary | 2 | Membrane vs soluble |
|
|
||||||
| **SubcellularLocalization** | 8,943 | Multi-class | 10 | Subcellular compartment |
|
|
||||||
|
|
||||||
**Use Cases:**
|
|
||||||
- Protein expression optimization
|
|
||||||
- Target identification
|
|
||||||
- Cell biology
|
|
||||||
|
|
||||||
### Structure Prediction
|
|
||||||
|
|
||||||
| Dataset | Size | Task | Description |
|
|
||||||
|---------|------|------|-------------|
|
|
||||||
| **Fold** | 16,712 | Multi-class (1,195) | Structural fold recognition |
|
|
||||||
| **SecondaryStructure** | 8,678 | Sequence labeling | 3-state or 8-state prediction |
|
|
||||||
| **ProteinNet** | Varied | Contact prediction | Residue-residue contacts |
|
|
||||||
|
|
||||||
**Use Cases:**
|
|
||||||
- Structure prediction pipelines
|
|
||||||
- Fold recognition
|
|
||||||
- Contact map generation
|
|
||||||
|
|
||||||
### Protein Interactions
|
|
||||||
|
|
||||||
| Dataset | Size | Positives | Negatives | Description |
|
|
||||||
|---------|------|-----------|-----------|-------------|
|
|
||||||
| **HumanPPI** | 1,412 proteins | 6,584 | - | Human protein interactions |
|
|
||||||
| **YeastPPI** | 2,018 proteins | 6,451 | - | Yeast protein interactions |
|
|
||||||
| **PPIAffinity** | 2,156 pairs | - | - | Binding affinity values |
|
|
||||||
|
|
||||||
**Use Cases:**
|
|
||||||
- PPI prediction
|
|
||||||
- Network biology
|
|
||||||
- Drug target identification
|
|
||||||
|
|
||||||
### Protein-Ligand Binding
|
|
||||||
|
|
||||||
| Dataset | Size | Type | Description |
|
|
||||||
|---------|------|------|-------------|
|
|
||||||
| **BindingDB** | ~1.5M | Affinity | Comprehensive binding data |
|
|
||||||
| **PDBBind** | 20,000+ | 3D complexes | Structure-based binding |
|
|
||||||
| - Refined Set | 5,316 | High quality | Curated crystal structures |
|
|
||||||
| - Core Set | 285 | Benchmark | Diverse test set |
|
|
||||||
|
|
||||||
**Use Cases:**
|
|
||||||
- Binding affinity prediction
|
|
||||||
- Structure-based drug design
|
|
||||||
- Scoring function development
|
|
||||||
|
|
||||||
### Large Protein Databases
|
|
||||||
|
|
||||||
| Dataset | Size | Description |
|
|
||||||
|---------|------|-------------|
|
|
||||||
| **AlphaFoldDB** | 200M+ | Predicted structures for most known proteins |
|
|
||||||
| **UniProt** | Integration | Sequence and annotation data |
|
|
||||||
|
|
||||||
## Knowledge Graph Datasets
|
|
||||||
|
|
||||||
### General Knowledge
|
|
||||||
|
|
||||||
| Dataset | Entities | Relations | Triples | Domain |
|
|
||||||
|---------|----------|-----------|---------|--------|
|
|
||||||
| **FB15k** | 14,951 | 1,345 | 592,213 | Freebase (general knowledge) |
|
|
||||||
| **FB15k-237** | 14,541 | 237 | 310,116 | Filtered Freebase |
|
|
||||||
| **WN18** | 40,943 | 18 | 151,442 | WordNet (lexical) |
|
|
||||||
| **WN18RR** | 40,943 | 11 | 93,003 | Filtered WordNet |
|
|
||||||
|
|
||||||
**Relation Types (FB15k-237):**
|
|
||||||
- `/people/person/nationality`
|
|
||||||
- `/film/film/genre`
|
|
||||||
- `/location/location/contains`
|
|
||||||
- `/business/company/founders`
|
|
||||||
- Many more...
|
|
||||||
|
|
||||||
**Use Cases:**
|
|
||||||
- Link prediction
|
|
||||||
- Relation extraction
|
|
||||||
- Knowledge base completion
|
|
||||||
|
|
||||||
### Biomedical Knowledge
|
|
||||||
|
|
||||||
| Dataset | Entities | Relations | Triples | Description |
|
|
||||||
|---------|----------|-----------|---------|-------------|
|
|
||||||
| **Hetionet** | 45,158 | 24 | 2,250,197 | Integrates 29 biomedical databases |
|
|
||||||
|
|
||||||
**Entity Types in Hetionet:**
|
|
||||||
- Genes (20,945)
|
|
||||||
- Compounds (1,552)
|
|
||||||
- Diseases (137)
|
|
||||||
- Anatomy (400)
|
|
||||||
- Pathways (1,822)
|
|
||||||
- Pharmacologic classes
|
|
||||||
- Side effects
|
|
||||||
- Symptoms
|
|
||||||
- Molecular functions
|
|
||||||
- Biological processes
|
|
||||||
- Cellular components
|
|
||||||
|
|
||||||
**Relation Types:**
|
|
||||||
- Compound-binds-Gene
|
|
||||||
- Gene-associates-Disease
|
|
||||||
- Disease-presents-Symptom
|
|
||||||
- Compound-treats-Disease
|
|
||||||
- Compound-causes-Side effect
|
|
||||||
- Gene-participates-Pathway
|
|
||||||
- And 18 more...
|
|
||||||
|
|
||||||
**Use Cases:**
|
|
||||||
- Drug repurposing
|
|
||||||
- Disease mechanism discovery
|
|
||||||
- Target identification
|
|
||||||
- Multi-hop reasoning in biomedicine
|
|
||||||
|
|
||||||
## Citation Network Datasets
|
|
||||||
|
|
||||||
| Dataset | Nodes | Edges | Classes | Description |
|
|
||||||
|---------|-------|-------|---------|-------------|
|
|
||||||
| **Cora** | 2,708 | 5,429 | 7 | Machine learning papers |
|
|
||||||
| **CiteSeer** | 3,327 | 4,732 | 6 | Computer science papers |
|
|
||||||
| **PubMed** | 19,717 | 44,338 | 3 | Biomedical papers |
|
|
||||||
|
|
||||||
**Use Cases:**
|
|
||||||
- Node classification
|
|
||||||
- GNN baseline comparisons
|
|
||||||
- Method development
|
|
||||||
|
|
||||||
## Retrosynthesis Datasets
|
|
||||||
|
|
||||||
| Dataset | Size | Description |
|
|
||||||
|---------|------|-------------|
|
|
||||||
| **USPTO-50k** | 50,017 | Curated patent reactions, single-step |
|
|
||||||
|
|
||||||
**Features:**
|
|
||||||
- Product → Reactants mapping
|
|
||||||
- Atom mapping for reaction centers
|
|
||||||
- Canonicalized SMILES
|
|
||||||
- Balanced across reaction types
|
|
||||||
|
|
||||||
**Splits:**
|
|
||||||
- Train: ~40,000
|
|
||||||
- Validation: ~5,000
|
|
||||||
- Test: ~5,000
|
|
||||||
|
|
||||||
**Use Cases:**
|
|
||||||
- Retrosynthesis prediction
|
|
||||||
- Reaction type classification
|
|
||||||
- Synthetic route planning
|
|
||||||
|
|
||||||
## Dataset Usage Patterns
|
|
||||||
|
|
||||||
### Loading Datasets
|
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from torchdrug import datasets
|
from torchdrug import datasets
|
||||||
|
|
||||||
# Basic loading
|
dataset = datasets.ClinTox(
|
||||||
dataset = datasets.BBBP("~/molecule-datasets/")
|
"~/molecule-datasets/",
|
||||||
|
atom_feature="default",
|
||||||
# With transforms
|
bond_feature="default",
|
||||||
from torchdrug import transforms
|
)
|
||||||
transform = transforms.VirtualNode()
|
print(dataset.tasks)
|
||||||
dataset = datasets.BBBP("~/molecule-datasets/", transform=transform)
|
print(dataset.node_feature_dim)
|
||||||
|
print(dataset.edge_feature_dim)
|
||||||
# Protein dataset
|
|
||||||
dataset = datasets.EnzymeCommission("~/protein-datasets/")
|
|
||||||
|
|
||||||
# Knowledge graph
|
|
||||||
dataset = datasets.FB15k237("~/kg-datasets/")
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Data Splitting
|
Common molecule options include `atom_feature`, `bond_feature`, `mol_feature`,
|
||||||
|
`with_hydrogen`, and `kekulize`. Availability varies by class; inspect the class
|
||||||
|
signature before adding options.
|
||||||
|
|
||||||
|
### Protein properties and structure
|
||||||
|
|
||||||
|
Documented families include:
|
||||||
|
|
||||||
|
- Sequence / property: `BetaLactamase`, `BinaryLocalization`,
|
||||||
|
`SubcellularLocalization`
|
||||||
|
- Structure / function: `EnzymeCommission`, `GeneOntology`, `AlphaFoldDB`
|
||||||
|
- Structure labels: `Fold`, `SecondaryStructure`
|
||||||
|
- Protein-protein: `HumanPPI`, `YeastPPI`, `PPIAffinity`
|
||||||
|
- Protein-ligand: `BindingDB`, `PDBBind`
|
||||||
|
|
||||||
```python
|
```python
|
||||||
# Random split
|
dataset = datasets.EnzymeCommission(
|
||||||
train, valid, test = dataset.split([0.8, 0.1, 0.1])
|
"~/protein-datasets/",
|
||||||
|
atom_feature=None,
|
||||||
# Scaffold split (for molecules)
|
bond_feature=None,
|
||||||
from torchdrug import utils
|
residue_feature="default",
|
||||||
train, valid, test = dataset.split(
|
|
||||||
utils.scaffold_split(dataset, [0.8, 0.1, 0.1])
|
|
||||||
)
|
)
|
||||||
|
train_set, valid_set, test_set = dataset.split()
|
||||||
# Predefined splits (some datasets)
|
|
||||||
train, valid, test = dataset.split()
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Feature Extraction
|
Protein datasets can be expensive to parse. Where supported, `lazy=True` trades
|
||||||
|
lower startup memory for slower item loading. For sequence-only models, omitting
|
||||||
|
atom and bond features avoids unnecessary atom-level construction.
|
||||||
|
|
||||||
**Node Features (Molecules):**
|
### Knowledge graphs
|
||||||
- Atom type (one-hot or embedding)
|
|
||||||
- Formal charge
|
|
||||||
- Hybridization
|
|
||||||
- Aromaticity
|
|
||||||
- Number of hydrogens
|
|
||||||
- Chirality
|
|
||||||
|
|
||||||
**Edge Features (Molecules):**
|
Documented classes:
|
||||||
- Bond type (single, double, triple, aromatic)
|
|
||||||
- Stereochemistry
|
|
||||||
- Conjugation
|
|
||||||
- Ring membership
|
|
||||||
|
|
||||||
**Node Features (Proteins):**
|
- `FB15k`
|
||||||
- Amino acid type (one-hot)
|
- `FB15k237`
|
||||||
- Physicochemical properties
|
- `WN18`
|
||||||
- Position in sequence
|
- `WN18RR`
|
||||||
- Secondary structure
|
- `Hetionet`
|
||||||
- Solvent accessibility
|
|
||||||
|
|
||||||
**Edge Features (Proteins):**
|
```python
|
||||||
- Edge type (sequential, spatial, contact)
|
dataset = datasets.FB15k237("~/kg-datasets/")
|
||||||
- Distance
|
train_set, valid_set, test_set = dataset.split()
|
||||||
- Angles and dihedrals
|
|
||||||
|
|
||||||
## Choosing Datasets
|
print(dataset.num_entity)
|
||||||
|
print(dataset.num_relation)
|
||||||
|
```
|
||||||
|
|
||||||
### By Task
|
These datasets provide predefined benchmark splits. Preserve those splits for
|
||||||
|
comparable evaluation.
|
||||||
|
|
||||||
**Molecular Property Prediction:**
|
### Retrosynthesis
|
||||||
- Start with BBBP or HIV (medium size, clear task)
|
|
||||||
- Use QM9 for quantum properties
|
|
||||||
- ESOL/FreeSolv for regression
|
|
||||||
|
|
||||||
**Protein Function:**
|
`USPTO50k` contains 50,017 reactions across 10 reaction classes. The official
|
||||||
- EnzymeCommission (well-defined classes)
|
G2Gs workflow loads two views:
|
||||||
- GeneOntology (comprehensive annotations)
|
|
||||||
|
|
||||||
**Drug Safety:**
|
```python
|
||||||
- Tox21 (standard benchmark)
|
reaction_dataset = datasets.USPTO50k(
|
||||||
- ClinTox (clinical relevance)
|
"~/molecule-datasets/",
|
||||||
|
atom_feature="center_identification",
|
||||||
|
kekulize=True,
|
||||||
|
)
|
||||||
|
synthon_dataset = datasets.USPTO50k(
|
||||||
|
"~/molecule-datasets/",
|
||||||
|
as_synthon=True,
|
||||||
|
atom_feature="synthon_completion",
|
||||||
|
kekulize=True,
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
**Structure-Based:**
|
Reaction mode yields reactant/product pairs for center identification. Synthon
|
||||||
- PDBBind (protein-ligand)
|
mode yields reactant/synthon pairs for synthon completion.
|
||||||
- ProteinNet (structure prediction)
|
|
||||||
|
|
||||||
**Knowledge Graph:**
|
## Splitting correctly
|
||||||
- FB15k-237 (standard benchmark)
|
|
||||||
- Hetionet (biomedical applications)
|
|
||||||
|
|
||||||
**Generation:**
|
Some benchmark datasets expose predefined splits:
|
||||||
- ZINC250k (training)
|
|
||||||
- QM9 (with properties)
|
|
||||||
|
|
||||||
**Retrosynthesis:**
|
```python
|
||||||
- USPTO-50k (only choice)
|
train_set, valid_set, test_set = dataset.split()
|
||||||
|
```
|
||||||
|
|
||||||
### By Size and Resources
|
For the property-prediction tutorial's random 80/10/10 split, use PyTorch:
|
||||||
|
|
||||||
**Small (<5k, for testing):**
|
```python
|
||||||
- BACE, FreeSolv, ClinTox
|
import torch
|
||||||
- Core set of PDBBind
|
|
||||||
|
|
||||||
**Medium (5k-100k):**
|
lengths = [int(0.8 * len(dataset)), int(0.1 * len(dataset))]
|
||||||
- BBBP, HIV, ESOL, Tox21
|
lengths.append(len(dataset) - sum(lengths))
|
||||||
- EnzymeCommission, Fold
|
train_set, valid_set, test_set = torch.utils.data.random_split(dataset, lengths)
|
||||||
- FB15k-237, WN18RR
|
```
|
||||||
|
|
||||||
**Large (>100k):**
|
Do not assume `dataset.split([0.8, 0.1, 0.1])` is a documented universal API.
|
||||||
- QM9, MUV, PCQM4M
|
|
||||||
- GeneOntology, AlphaFoldDB
|
|
||||||
- ZINC2M, BindingDB
|
|
||||||
|
|
||||||
### By Domain
|
For paired retrosynthesis views, reset the same seed before each `split()`:
|
||||||
|
|
||||||
**Drug Discovery:** BBBP, HIV, Tox21, ESOL, ZINC
|
```python
|
||||||
**Quantum Chemistry:** QM7, QM8, QM9, PCQM4M
|
torch.manual_seed(1)
|
||||||
**Protein Engineering:** Fluorescence, Stability, Solubility
|
reaction_train, reaction_valid, reaction_test = reaction_dataset.split()
|
||||||
**Structural Biology:** Fold, PDBBind, ProteinNet, AlphaFoldDB
|
torch.manual_seed(1)
|
||||||
**Biomedical:** Hetionet, GeneOntology, EnzymeCommission
|
synthon_train, synthon_valid, synthon_test = synthon_dataset.split()
|
||||||
**Retrosynthesis:** USPTO-50k
|
```
|
||||||
|
|
||||||
## Best Practices
|
This preserves sample alignment.
|
||||||
|
|
||||||
1. **Start Small**: Test on small datasets before scaling
|
## Feature configuration
|
||||||
2. **Scaffold Split**: Use for realistic drug discovery evaluation
|
|
||||||
3. **Balanced Metrics**: Use AUROC + AUPRC for imbalanced data
|
Dataset dimensions depend on feature choices. Construct models from the loaded
|
||||||
4. **Multiple Runs**: Report mean ± std over multiple random seeds
|
dataset rather than hard-coding dimensions:
|
||||||
5. **Data Leakage**: Be careful with pre-trained models
|
|
||||||
6. **Domain Knowledge**: Understand what you're predicting
|
```python
|
||||||
7. **Validation**: Always use held-out test set
|
model = models.GIN(
|
||||||
8. **Preprocessing**: Standardize features, handle missing values
|
input_dim=dataset.node_feature_dim,
|
||||||
|
hidden_dims=[256, 256, 256],
|
||||||
|
edge_input_dim=dataset.edge_feature_dim,
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
Generation and retrosynthesis often require specialized feature sets:
|
||||||
|
|
||||||
|
- Pretraining: `atom_feature="pretrain"`, `bond_feature="pretrain"`
|
||||||
|
- GCPN / GraphAF: `atom_feature="symbol"`, `kekulize=True`
|
||||||
|
- Center identification: `atom_feature="center_identification"`
|
||||||
|
- Synthon completion: `atom_feature="synthon_completion"`
|
||||||
|
|
||||||
|
Do not mix checkpoint weights across incompatible feature configurations.
|
||||||
|
|
||||||
|
## Data integrity and evaluation
|
||||||
|
|
||||||
|
- Cache datasets in a controlled project or user data directory.
|
||||||
|
- Record TorchDrug version, feature arguments, split method, and random seed.
|
||||||
|
- Preserve predefined KG splits.
|
||||||
|
- For molecular benchmarks, use the split protocol required by the benchmark;
|
||||||
|
do not claim a random split is a scaffold split.
|
||||||
|
- Inspect downloaded data licenses and provenance before redistribution.
|
||||||
|
- Validate labels, missing-value masks, and task names before training.
|
||||||
|
|
||||||
|
## Source links
|
||||||
|
|
||||||
|
- [Dataset API](https://torchdrug.ai/docs/api/datasets.html)
|
||||||
|
- [Property prediction tutorial](https://torchdrug.ai/docs/tutorials/property_prediction.html)
|
||||||
|
- [Pretraining tutorial](https://torchdrug.ai/docs/tutorials/pretrain.html)
|
||||||
|
- [Generation tutorial](https://torchdrug.ai/docs/tutorials/generation.html)
|
||||||
|
- [Retrosynthesis tutorial](https://torchdrug.ai/docs/tutorials/retrosynthesis.html)
|
||||||
|
- [Knowledge graph tutorial](https://torchdrug.ai/docs/tutorials/reasoning.html)
|
||||||
|
|||||||
+174
-492
@@ -2,10 +2,10 @@
|
|||||||
title: "Models and Architectures"
|
title: "Models and Architectures"
|
||||||
task: ""
|
task: ""
|
||||||
lineage_type: import
|
lineage_type: import
|
||||||
upstream_source: https://github.com/K-Dense-AI/scientific-agent-skills/blob/9c9bd2e9/skills/torchdrug/references/models_architectures.md
|
upstream_source: https://github.com/K-Dense-AI/scientific-agent-skills/blob/e8727695/skills/torchdrug/references/models_architectures.md
|
||||||
upstream_sha: 9c9bd2e9
|
upstream_sha: e8727695
|
||||||
imported_at: 2026-06-27
|
imported_at: 2026-07-20
|
||||||
prompt_class: unknown
|
prompt_class: catalogue
|
||||||
upstream_changes: accepted
|
upstream_changes: accepted
|
||||||
author: upstream
|
author: upstream
|
||||||
validated: false
|
validated: false
|
||||||
@@ -13,542 +13,224 @@ validated: false
|
|||||||
|
|
||||||
# Models and Architectures
|
# Models and Architectures
|
||||||
|
|
||||||
## Overview
|
This is a selection guide for the
|
||||||
|
[TorchDrug 0.2.1 model API](https://torchdrug.ai/docs/api/models.html). Verify
|
||||||
TorchDrug provides a comprehensive collection of pre-built model architectures for various graph-based learning tasks. This reference catalogs all available models with their characteristics, use cases, and implementation details.
|
constructor signatures on that page before generating code; similarly named
|
||||||
|
models in other graph libraries are not API-compatible.
|
||||||
## Graph Neural Networks
|
|
||||||
|
## Graph representation models
|
||||||
### GCN (Graph Convolutional Network)
|
|
||||||
|
Documented graph neural networks include:
|
||||||
**Type:** Spatial message passing
|
|
||||||
**Paper:** Semi-Supervised Classification with Graph Convolutional Networks (Kipf & Welling, 2017)
|
- `models.GCN`
|
||||||
|
- `models.GAT`
|
||||||
**Characteristics:**
|
- `models.GIN`
|
||||||
- Simple and efficient aggregation
|
- `models.MPNN`
|
||||||
- Normalized adjacency matrix convolution
|
- `models.NFP`
|
||||||
- Works well for homophilic graphs
|
- `models.RGCN`
|
||||||
- Good baseline for many tasks
|
- `models.ChebNet`
|
||||||
|
- `models.SchNet`
|
||||||
**Best For:**
|
- `models.GearNet`
|
||||||
- Initial experiments and baselines
|
|
||||||
- When computational efficiency is important
|
|
||||||
- Graphs with clear local structure
|
|
||||||
|
|
||||||
**Parameters:**
|
|
||||||
- `input_dim`: Node feature dimension
|
|
||||||
- `hidden_dims`: List of hidden layer dimensions
|
|
||||||
- `edge_input_dim`: Edge feature dimension (optional)
|
|
||||||
- `batch_norm`: Apply batch normalization
|
|
||||||
- `activation`: Activation function (relu, elu, etc.)
|
|
||||||
- `dropout`: Dropout rate
|
|
||||||
|
|
||||||
**Use Cases:**
|
|
||||||
- Molecular property prediction
|
|
||||||
- Citation network classification
|
|
||||||
- Social network analysis
|
|
||||||
|
|
||||||
### GAT (Graph Attention Network)
|
|
||||||
|
|
||||||
**Type:** Attention-based message passing
|
|
||||||
**Paper:** Graph Attention Networks (Veličković et al., 2018)
|
|
||||||
|
|
||||||
**Characteristics:**
|
|
||||||
- Learns attention weights for neighbors
|
|
||||||
- Different importance for different neighbors
|
|
||||||
- Multi-head attention for robustness
|
|
||||||
- Handles varying node degrees naturally
|
|
||||||
|
|
||||||
**Best For:**
|
|
||||||
- When neighbor importance varies
|
|
||||||
- Heterogeneous graphs
|
|
||||||
- Interpretable predictions
|
|
||||||
|
|
||||||
**Parameters:**
|
|
||||||
- `input_dim`, `hidden_dims`: Standard dimensions
|
|
||||||
- `num_heads`: Number of attention heads
|
|
||||||
- `negative_slope`: LeakyReLU slope
|
|
||||||
- `concat`: Concatenate or average multi-head outputs
|
|
||||||
|
|
||||||
**Use Cases:**
|
|
||||||
- Protein-protein interaction prediction
|
|
||||||
- Molecule generation with attention to reactive sites
|
|
||||||
- Knowledge graph reasoning with relation importance
|
|
||||||
|
|
||||||
### GIN (Graph Isomorphism Network)
|
|
||||||
|
|
||||||
**Type:** Maximally powerful message passing
|
|
||||||
**Paper:** How Powerful are Graph Neural Networks? (Xu et al., 2019)
|
|
||||||
|
|
||||||
**Characteristics:**
|
|
||||||
- Theoretically most expressive GNN architecture
|
|
||||||
- Injective aggregation function
|
|
||||||
- Can distinguish graph structures GCN cannot
|
|
||||||
- Often best performance on molecular tasks
|
|
||||||
|
|
||||||
**Best For:**
|
|
||||||
- Molecular property prediction (state-of-the-art)
|
|
||||||
- Tasks requiring structural discrimination
|
|
||||||
- Graph classification
|
|
||||||
|
|
||||||
**Parameters:**
|
|
||||||
- `input_dim`, `hidden_dims`: Standard dimensions
|
|
||||||
- `edge_input_dim`: Include edge features
|
|
||||||
- `batch_norm`: Typically use true
|
|
||||||
- `readout`: Graph pooling ("sum", "mean", "max")
|
|
||||||
- `eps`: Learnable or fixed epsilon
|
|
||||||
|
|
||||||
**Use Cases:**
|
|
||||||
- Drug property prediction (BBBP, HIV, etc.)
|
|
||||||
- Molecular generation
|
|
||||||
- Reaction prediction
|
|
||||||
|
|
||||||
### RGCN (Relational Graph Convolutional Network)
|
|
||||||
|
|
||||||
**Type:** Multi-relational message passing
|
|
||||||
**Paper:** Modeling Relational Data with Graph Convolutional Networks (Schlichtkrull et al., 2018)
|
|
||||||
|
|
||||||
**Characteristics:**
|
|
||||||
- Handles multiple edge/relation types
|
|
||||||
- Relation-specific weight matrices
|
|
||||||
- Basis decomposition for parameter efficiency
|
|
||||||
- Essential for knowledge graphs
|
|
||||||
|
|
||||||
**Best For:**
|
|
||||||
- Knowledge graph reasoning
|
|
||||||
- Heterogeneous molecular graphs
|
|
||||||
- Multi-relational data
|
|
||||||
|
|
||||||
**Parameters:**
|
|
||||||
- `num_relation`: Number of relation types
|
|
||||||
- `hidden_dims`: Layer dimensions
|
|
||||||
- `num_bases`: Basis decomposition (reduce parameters)
|
|
||||||
|
|
||||||
**Use Cases:**
|
|
||||||
- Knowledge graph completion
|
|
||||||
- Retrosynthesis (different bond types)
|
|
||||||
- Protein interaction networks
|
|
||||||
|
|
||||||
### MPNN (Message Passing Neural Network)
|
|
||||||
|
|
||||||
**Type:** General message passing framework
|
|
||||||
**Paper:** Neural Message Passing for Quantum Chemistry (Gilmer et al., 2017)
|
|
||||||
|
|
||||||
**Characteristics:**
|
|
||||||
- Flexible message and update functions
|
|
||||||
- Edge features in message computation
|
|
||||||
- GRU updates for node hidden states
|
|
||||||
- Set2Set readout for graph representation
|
|
||||||
|
|
||||||
**Best For:**
|
|
||||||
- Quantum chemistry predictions
|
|
||||||
- Tasks with important edge information
|
|
||||||
- When node states evolve over multiple iterations
|
|
||||||
|
|
||||||
**Parameters:**
|
|
||||||
- `input_dim`, `hidden_dim`: Feature dimensions
|
|
||||||
- `edge_input_dim`: Edge feature dimension
|
|
||||||
- `num_layer`: Message passing iterations
|
|
||||||
- `num_mlp_layer`: MLP layers in message function
|
|
||||||
|
|
||||||
**Use Cases:**
|
|
||||||
- QM9 quantum property prediction
|
|
||||||
- Molecular dynamics
|
|
||||||
- 3D conformation-aware tasks
|
|
||||||
|
|
||||||
### SchNet (Continuous-Filter Convolutional Network)
|
|
||||||
|
|
||||||
**Type:** 3D geometry-aware convolution
|
|
||||||
**Paper:** SchNet: A continuous-filter convolutional neural network (Schütt et al., 2017)
|
|
||||||
|
|
||||||
**Characteristics:**
|
|
||||||
- Operates on 3D atomic coordinates
|
|
||||||
- Continuous filter convolutions
|
|
||||||
- Rotation and translation invariant
|
|
||||||
- Excellent for quantum chemistry
|
|
||||||
|
|
||||||
**Best For:**
|
|
||||||
- 3D molecular structure tasks
|
|
||||||
- Quantum property prediction
|
|
||||||
- Protein structure analysis
|
|
||||||
- Energy and force prediction
|
|
||||||
|
|
||||||
**Parameters:**
|
|
||||||
- `input_dim`: Atom features
|
|
||||||
- `hidden_dims`: Layer dimensions
|
|
||||||
- `num_gaussian`: RBF basis functions for distances
|
|
||||||
- `cutoff`: Interaction cutoff distance
|
|
||||||
|
|
||||||
**Use Cases:**
|
|
||||||
- QM9 property prediction
|
|
||||||
- Molecular dynamics simulations
|
|
||||||
- Protein-ligand binding with structures
|
|
||||||
- Crystal property prediction
|
|
||||||
|
|
||||||
### ChebNet (Chebyshev Spectral CNN)
|
|
||||||
|
|
||||||
**Type:** Spectral convolution
|
|
||||||
**Paper:** Convolutional Neural Networks on Graphs (Defferrard et al., 2016)
|
|
||||||
|
|
||||||
**Characteristics:**
|
|
||||||
- Spectral graph convolution
|
|
||||||
- Chebyshev polynomial approximation
|
|
||||||
- Captures global graph structure
|
|
||||||
- Computationally efficient
|
|
||||||
|
|
||||||
**Best For:**
|
|
||||||
- Tasks requiring global information
|
|
||||||
- When graph Laplacian is informative
|
|
||||||
- Theoretical analysis
|
|
||||||
|
|
||||||
**Parameters:**
|
|
||||||
- `input_dim`, `hidden_dims`: Dimensions
|
|
||||||
- `num_cheb`: Order of Chebyshev polynomial
|
|
||||||
|
|
||||||
**Use Cases:**
|
|
||||||
- Citation network classification
|
|
||||||
- Brain network analysis
|
|
||||||
- Signal processing on graphs
|
|
||||||
|
|
||||||
### NFP (Neural Fingerprint)
|
|
||||||
|
|
||||||
**Type:** Molecular fingerprint learning
|
|
||||||
**Paper:** Convolutional Networks on Graphs for Learning Molecular Fingerprints (Duvenaud et al., 2015)
|
|
||||||
|
|
||||||
**Characteristics:**
|
|
||||||
- Learns differentiable molecular fingerprints
|
|
||||||
- Alternative to hand-crafted fingerprints (ECFP)
|
|
||||||
- Circular convolutions like ECFP
|
|
||||||
- Interpretable learned features
|
|
||||||
|
|
||||||
**Best For:**
|
|
||||||
- Molecular similarity learning
|
|
||||||
- Property prediction with limited data
|
|
||||||
- When interpretability is important
|
|
||||||
|
|
||||||
**Parameters:**
|
|
||||||
- `input_dim`, `output_dim`: Feature dimensions
|
|
||||||
- `hidden_dims`: Layer dimensions
|
|
||||||
- `num_layer`: Circular convolution depth
|
|
||||||
|
|
||||||
**Use Cases:**
|
|
||||||
- Virtual screening
|
|
||||||
- Molecular similarity search
|
|
||||||
- QSAR modeling
|
|
||||||
|
|
||||||
## Protein-Specific Models
|
|
||||||
|
|
||||||
### GearNet (Geometry-Aware Relational Graph Network)
|
|
||||||
|
|
||||||
**Type:** Protein structure encoder
|
|
||||||
**Paper:** Protein Representation Learning by Geometric Structure Pretraining (Zhang et al., 2023)
|
|
||||||
|
|
||||||
**Characteristics:**
|
|
||||||
- Incorporates 3D geometric information
|
|
||||||
- Multiple edge types (sequential, spatial, KNN)
|
|
||||||
- Designed specifically for proteins
|
|
||||||
- State-of-the-art on protein tasks
|
|
||||||
|
|
||||||
**Best For:**
|
|
||||||
- Protein structure prediction
|
|
||||||
- Protein function prediction
|
|
||||||
- Protein-protein interaction
|
|
||||||
- Any task with protein 3D structures
|
|
||||||
|
|
||||||
**Parameters:**
|
|
||||||
- `input_dim`: Residue features
|
|
||||||
- `hidden_dims`: Layer dimensions
|
|
||||||
- `num_relation`: Edge types (sequence, radius, KNN)
|
|
||||||
- `edge_input_dim`: Geometric features (distances, angles)
|
|
||||||
- `batch_norm`: Typically true
|
|
||||||
|
|
||||||
**Use Cases:**
|
|
||||||
- Enzyme function prediction (EnzymeCommission)
|
|
||||||
- Protein fold recognition
|
|
||||||
- Contact prediction
|
|
||||||
- Binding site identification
|
|
||||||
|
|
||||||
### ESM (Evolutionary Scale Modeling)
|
|
||||||
|
|
||||||
**Type:** Protein language model (transformer)
|
|
||||||
**Paper:** Biological structure and function emerge from scaling unsupervised learning (Rives et al., 2021)
|
|
||||||
|
|
||||||
**Characteristics:**
|
|
||||||
- Pre-trained on 250M+ protein sequences
|
|
||||||
- Captures evolutionary and structural information
|
|
||||||
- Transformer architecture
|
|
||||||
- Transfer learning for downstream tasks
|
|
||||||
|
|
||||||
**Best For:**
|
|
||||||
- Any sequence-based protein task
|
|
||||||
- When no structure available
|
|
||||||
- Transfer learning with limited data
|
|
||||||
|
|
||||||
**Variants:**
|
Their forward methods generally accept:
|
||||||
- ESM-1b: 650M parameters
|
|
||||||
- ESM-2: Multiple sizes (8M to 15B parameters)
|
|
||||||
|
|
||||||
**Use Cases:**
|
|
||||||
- Protein function prediction
|
|
||||||
- Variant effect prediction
|
|
||||||
- Protein design
|
|
||||||
- Structure prediction (ESMFold)
|
|
||||||
|
|
||||||
### ProteinBERT
|
|
||||||
|
|
||||||
**Type:** Masked language model for proteins
|
```python
|
||||||
|
output = model(graph, input, all_loss=None, metric=None)
|
||||||
|
```
|
||||||
|
|
||||||
**Characteristics:**
|
Graph encoders return a dictionary containing node- and/or graph-level
|
||||||
- BERT-style pre-training
|
representations. Inspect the selected model's documented return fields.
|
||||||
- Masked amino acid prediction
|
|
||||||
- Bidirectional context
|
|
||||||
- Good for sequence-based tasks
|
|
||||||
|
|
||||||
**Use Cases:**
|
### GIN for molecular properties
|
||||||
- Function annotation
|
|
||||||
- Subcellular localization
|
|
||||||
- Stability prediction
|
|
||||||
|
|
||||||
### ProteinCNN / ProteinResNet
|
The official property tutorial uses:
|
||||||
|
|
||||||
**Type:** Convolutional networks for sequences
|
```python
|
||||||
|
model = models.GIN(
|
||||||
|
input_dim=dataset.node_feature_dim,
|
||||||
|
hidden_dims=[256, 256, 256, 256],
|
||||||
|
short_cut=True,
|
||||||
|
batch_norm=True,
|
||||||
|
concat_hidden=True,
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
**Characteristics:**
|
The pretraining tutorial includes bond features:
|
||||||
- 1D convolutions on sequences
|
|
||||||
- Local pattern recognition
|
```python
|
||||||
- Faster than transformers
|
model = models.GIN(
|
||||||
- Good for motif detection
|
input_dim=dataset.node_feature_dim,
|
||||||
|
hidden_dims=[300, 300, 300, 300, 300],
|
||||||
|
edge_input_dim=dataset.edge_feature_dim,
|
||||||
|
batch_norm=True,
|
||||||
|
readout="mean",
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
**Use Cases:**
|
Use the exact feature configuration that produced
|
||||||
- Binding site prediction
|
`dataset.node_feature_dim` and `dataset.edge_feature_dim`.
|
||||||
- Secondary structure prediction
|
|
||||||
- Domain identification
|
|
||||||
|
|
||||||
### ProteinLSTM
|
### RGCN for typed edges
|
||||||
|
|
||||||
**Type:** Recurrent network for sequences
|
The official generation and retrosynthesis tutorials use `RGCN`:
|
||||||
|
|
||||||
**Characteristics:**
|
```python
|
||||||
- Bidirectional LSTM
|
model = models.RGCN(
|
||||||
- Captures long-range dependencies
|
input_dim=dataset.node_feature_dim,
|
||||||
- Sequential processing
|
hidden_dims=[256, 256, 256, 256],
|
||||||
- Good baseline for sequence tasks
|
num_relation=dataset.num_bond_type,
|
||||||
|
batch_norm=False,
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
**Use Cases:**
|
`num_relation` must match the graph relation vocabulary. For molecule graphs in
|
||||||
- Order prediction
|
these tutorials, it comes from `dataset.num_bond_type`.
|
||||||
- Sequential annotation
|
|
||||||
- Time-series protein data
|
|
||||||
|
|
||||||
## Knowledge Graph Models
|
### 3D and protein structure models
|
||||||
|
|
||||||
### TransE (Translation Embedding)
|
- `SchNet` requires a `node_position` graph attribute.
|
||||||
|
- `GearNet` is the documented geometry-aware relational model for protein
|
||||||
|
structures.
|
||||||
|
|
||||||
**Type:** Translation-based embedding
|
Use graph-construction layers to create required spatial and sequential edges;
|
||||||
**Paper:** Translating Embeddings for Modeling Multi-relational Data (Bordes et al., 2013)
|
do not assume loading a PDB automatically creates every relation a structure
|
||||||
|
model expects.
|
||||||
|
|
||||||
**Characteristics:**
|
## Protein sequence encoders
|
||||||
- h + r ≈ t (head + relation ≈ tail)
|
|
||||||
- Simple and interpretable
|
|
||||||
- Works well for 1-to-1 relations
|
|
||||||
- Memory efficient
|
|
||||||
|
|
||||||
**Best For:**
|
Documented classes and aliases include:
|
||||||
- Large knowledge graphs
|
|
||||||
- Initial experiments
|
|
||||||
- Interpretable embeddings
|
|
||||||
|
|
||||||
**Parameters:**
|
- `models.ESM` (`EvolutionaryScaleModeling`)
|
||||||
- `num_entity`, `num_relation`: Graph size
|
- `models.ProteinCNN`
|
||||||
- `embedding_dim`: Embedding dimensions (typically 50-500)
|
- `models.ProteinResNet`
|
||||||
|
- `models.ProteinLSTM`
|
||||||
|
- `models.ProteinBERT`
|
||||||
|
|
||||||
### RotatE (Rotation Embedding)
|
The 0.2.1 ESM constructor is:
|
||||||
|
|
||||||
**Type:** Rotation in complex space
|
```python
|
||||||
**Paper:** RotatE: Knowledge Graph Embedding by Relational Rotation in Complex Space (Sun et al., 2019)
|
model = models.ESM(
|
||||||
|
path="~/model-weights/esm/",
|
||||||
|
model="ESM-1b",
|
||||||
|
readout="mean",
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
**Characteristics:**
|
The release notes add ESM-2 support, but checkpoint names and availability
|
||||||
- Relations as rotations in complex space
|
should be verified against the API/source before use. Do not use the unsupported
|
||||||
- Handles symmetric, antisymmetric, inverse, composition
|
pattern `models.ESM(path="checkpoint-file.pt")`; `path` is the directory where
|
||||||
- State-of-the-art on many benchmarks
|
TorchDrug stores model weights.
|
||||||
|
|
||||||
**Best For:**
|
Protein sequence encoders return residue and graph features. Respect the model's
|
||||||
- Most knowledge graph tasks
|
maximum input length and tokenization behavior.
|
||||||
- Complex relation patterns
|
|
||||||
- When accuracy is critical
|
|
||||||
|
|
||||||
**Parameters:**
|
## Knowledge graph models
|
||||||
- `num_entity`, `num_relation`: Graph size
|
|
||||||
- `embedding_dim`: Must be even (complex embeddings)
|
|
||||||
- `max_score`: Score clipping value
|
|
||||||
|
|
||||||
### DistMult
|
Embedding models:
|
||||||
|
|
||||||
**Type:** Bilinear model
|
- `models.TransE`
|
||||||
|
- `models.DistMult`
|
||||||
|
- `models.ComplEx`
|
||||||
|
- `models.SimplE`
|
||||||
|
- `models.RotatE`
|
||||||
|
|
||||||
**Characteristics:**
|
Neural reasoning models:
|
||||||
- Symmetric relation modeling
|
|
||||||
- Fast and efficient
|
|
||||||
- Cannot model antisymmetric relations
|
|
||||||
|
|
||||||
**Best For:**
|
- `models.NeuralLP` (alias of `NeuralLogicProgramming`)
|
||||||
- Symmetric relations (e.g., "similar to")
|
- `models.KBGAT`
|
||||||
- When speed is critical
|
|
||||||
- Large-scale graphs
|
|
||||||
|
|
||||||
### ComplEx
|
The official embedding tutorial uses:
|
||||||
|
|
||||||
**Type:** Complex-valued embeddings
|
```python
|
||||||
|
model = models.RotatE(
|
||||||
|
num_entity=dataset.num_entity,
|
||||||
|
num_relation=dataset.num_relation,
|
||||||
|
embedding_dim=2048,
|
||||||
|
max_score=9,
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
**Characteristics:**
|
The official NeuralLP tutorial uses:
|
||||||
- Handles asymmetric and symmetric relations
|
|
||||||
- Better than DistMult for most graphs
|
|
||||||
- Good balance of expressiveness and efficiency
|
|
||||||
|
|
||||||
**Best For:**
|
```python
|
||||||
- General knowledge graph completion
|
model = models.NeuralLP(
|
||||||
- Mixed relation types
|
num_relation=dataset.num_relation,
|
||||||
- When RotatE is too complex
|
hidden_dim=128,
|
||||||
|
num_step=3,
|
||||||
|
num_lstm_layer=2,
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
### SimplE
|
Both are wrapped by `tasks.KnowledgeGraphCompletion`; model construction alone
|
||||||
|
does not define negative sampling or evaluation.
|
||||||
|
|
||||||
**Type:** Enhanced embedding model
|
## Generative and self-supervised models
|
||||||
|
|
||||||
**Characteristics:**
|
### GCPN
|
||||||
- Two embeddings per entity (canonical + inverse)
|
|
||||||
- Fully expressive
|
|
||||||
- Slightly more parameters than ComplEx
|
|
||||||
|
|
||||||
**Best For:**
|
GCPN is exposed as a task rather than a `models.GCPN` class:
|
||||||
- When full expressiveness needed
|
|
||||||
- Inverse relations are important
|
|
||||||
|
|
||||||
## Generative Models
|
```python
|
||||||
|
task = tasks.GCPNGeneration(
|
||||||
|
model,
|
||||||
|
dataset.atom_types,
|
||||||
|
max_edge_unroll=12,
|
||||||
|
max_node=38,
|
||||||
|
criterion="nll",
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
### GraphAutoregressiveFlow
|
The `model` argument is the graph representation model, normally `RGCN` in the
|
||||||
|
official tutorial.
|
||||||
|
|
||||||
**Type:** Normalizing flow for molecules
|
### GraphAF
|
||||||
|
|
||||||
**Characteristics:**
|
GraphAF uses two flow models:
|
||||||
- Exact likelihood computation
|
|
||||||
- Invertible transformations
|
|
||||||
- Stable training (no adversarial)
|
|
||||||
- Conditional generation support
|
|
||||||
|
|
||||||
**Best For:**
|
- node flow: `models.GraphAF(..., use_edge=False, ...)`
|
||||||
- Molecular generation
|
- edge flow: `models.GraphAF(..., use_edge=True, ...)`
|
||||||
- Density estimation
|
|
||||||
- Interpolation between molecules
|
|
||||||
|
|
||||||
**Parameters:**
|
Wrap both in:
|
||||||
- `input_dim`: Atom features
|
|
||||||
- `hidden_dims`: Coupling layers
|
|
||||||
- `num_flow`: Number of flow transformations
|
|
||||||
|
|
||||||
**Use Cases:**
|
```python
|
||||||
- De novo drug design
|
task = tasks.AutoregressiveGeneration(
|
||||||
- Chemical space exploration
|
node_flow,
|
||||||
- Property-targeted generation
|
edge_flow,
|
||||||
|
max_node=38,
|
||||||
|
max_edge_unroll=12,
|
||||||
|
criterion="nll",
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
## Pre-training Models
|
`models.GraphAF` is an alias for `GraphAutoregressiveFlow`. It is not itself the
|
||||||
|
training task.
|
||||||
|
|
||||||
### InfoGraph
|
### Self-supervised encoders
|
||||||
|
|
||||||
**Type:** Contrastive learning
|
The official pretraining tutorial documents:
|
||||||
|
|
||||||
**Characteristics:**
|
- `models.InfoGraph` wrapped by `tasks.Unsupervised`
|
||||||
- Maximizes mutual information
|
- a base GNN wrapped directly by `tasks.AttributeMasking`
|
||||||
- Graph-level and node-level contrast
|
|
||||||
- Unsupervised pre-training
|
|
||||||
- Good for small datasets
|
|
||||||
|
|
||||||
**Use Cases:**
|
Other API-documented self-supervised components include `MultiviewContrast`.
|
||||||
- Pre-train molecular encoders
|
Do not infer a task constructor from a paper name; check whether the component
|
||||||
- Few-shot learning
|
lives under `models` or `tasks`.
|
||||||
- Transfer learning
|
|
||||||
|
|
||||||
### MultiviewContrast
|
## Model selection checklist
|
||||||
|
|
||||||
**Type:** Multi-view contrastive learning for proteins
|
1. Identify the graph/data type.
|
||||||
|
2. Check required graph attributes and relation counts.
|
||||||
|
3. Build dimensions from the loaded dataset.
|
||||||
|
4. Confirm whether the algorithm is a model or a task.
|
||||||
|
5. Match checkpoint architecture and feature configuration exactly.
|
||||||
|
6. Wrap the model in the task used by the official tutorial or API.
|
||||||
|
7. Start with a small batch and one epoch before scaling.
|
||||||
|
|
||||||
**Characteristics:**
|
## Source links
|
||||||
- Contrasts different views of proteins
|
|
||||||
- Geometric pre-training
|
|
||||||
- Uses 3D structure information
|
|
||||||
- Excellent for protein models
|
|
||||||
|
|
||||||
**Use Cases:**
|
- [Model API](https://torchdrug.ai/docs/api/models.html)
|
||||||
- Pre-train GearNet on protein structures
|
- [Task API](https://torchdrug.ai/docs/api/tasks.html)
|
||||||
- Transfer to property prediction
|
- [Property tutorial](https://torchdrug.ai/docs/tutorials/property_prediction.html)
|
||||||
- Limited labeled data scenarios
|
- [Pretraining tutorial](https://torchdrug.ai/docs/tutorials/pretrain.html)
|
||||||
|
- [Generation tutorial](https://torchdrug.ai/docs/tutorials/generation.html)
|
||||||
## Model Selection Guide
|
- [Reasoning tutorial](https://torchdrug.ai/docs/tutorials/reasoning.html)
|
||||||
|
|
||||||
### By Task Type
|
|
||||||
|
|
||||||
**Molecular Property Prediction:**
|
|
||||||
1. GIN (first choice)
|
|
||||||
2. GAT (interpretability)
|
|
||||||
3. SchNet (3D available)
|
|
||||||
|
|
||||||
**Protein Tasks:**
|
|
||||||
1. ESM (sequence only)
|
|
||||||
2. GearNet (structure available)
|
|
||||||
3. ProteinBERT (sequence, lighter than ESM)
|
|
||||||
|
|
||||||
**Knowledge Graphs:**
|
|
||||||
1. RotatE (best performance)
|
|
||||||
2. ComplEx (good balance)
|
|
||||||
3. TransE (large graphs, efficiency)
|
|
||||||
|
|
||||||
**Molecular Generation:**
|
|
||||||
1. GraphAutoregressiveFlow (exact likelihood)
|
|
||||||
2. GCPN with GIN backbone (property optimization)
|
|
||||||
|
|
||||||
**Retrosynthesis:**
|
|
||||||
1. GIN (synthon completion)
|
|
||||||
2. RGCN (center identification with bond types)
|
|
||||||
|
|
||||||
### By Dataset Size
|
|
||||||
|
|
||||||
**Small (< 1k):**
|
|
||||||
- Use pre-trained models (ESM for proteins)
|
|
||||||
- Simpler architectures (GCN, ProteinCNN)
|
|
||||||
- Heavy regularization
|
|
||||||
|
|
||||||
**Medium (1k-100k):**
|
|
||||||
- GIN for molecules
|
|
||||||
- GAT for interpretability
|
|
||||||
- Standard training
|
|
||||||
|
|
||||||
**Large (> 100k):**
|
|
||||||
- Any model works
|
|
||||||
- Deeper architectures
|
|
||||||
- Can train from scratch
|
|
||||||
|
|
||||||
### By Computational Budget
|
|
||||||
|
|
||||||
**Low:**
|
|
||||||
- GCN (simplest)
|
|
||||||
- DistMult (KG)
|
|
||||||
- ProteinLSTM
|
|
||||||
|
|
||||||
**Medium:**
|
|
||||||
- GIN
|
|
||||||
- GAT
|
|
||||||
- ComplEx
|
|
||||||
|
|
||||||
**High:**
|
|
||||||
- ESM (large)
|
|
||||||
- SchNet (3D)
|
|
||||||
- RotatE with high dim
|
|
||||||
|
|
||||||
## Implementation Tips
|
|
||||||
|
|
||||||
1. **Start Simple**: Begin with GCN or GIN baseline
|
|
||||||
2. **Use Pre-trained**: ESM for proteins, InfoGraph for molecules
|
|
||||||
3. **Tune Depth**: 3-5 layers typically sufficient
|
|
||||||
4. **Batch Normalization**: Usually helps (except KG embeddings)
|
|
||||||
5. **Residual Connections**: Important for deep networks
|
|
||||||
6. **Readout Function**: "mean" usually works well
|
|
||||||
7. **Edge Features**: Include when available (bonds, distances)
|
|
||||||
8. **Regularization**: Dropout, weight decay, early stopping
|
|
||||||
|
|||||||
+259
@@ -0,0 +1,259 @@
|
|||||||
|
---
|
||||||
|
title: "Molecular Generation"
|
||||||
|
task: ""
|
||||||
|
lineage_type: import
|
||||||
|
upstream_source: https://github.com/K-Dense-AI/scientific-agent-skills/blob/e8727695/skills/torchdrug/references/molecular_generation.md
|
||||||
|
upstream_sha: e8727695
|
||||||
|
imported_at: 2026-07-20
|
||||||
|
prompt_class: unknown
|
||||||
|
upstream_changes: accepted
|
||||||
|
author: upstream
|
||||||
|
validated: false
|
||||||
|
---
|
||||||
|
|
||||||
|
# Molecular Generation
|
||||||
|
|
||||||
|
The official
|
||||||
|
[TorchDrug 0.2.1 generation tutorial](https://torchdrug.ai/docs/tutorials/generation.html)
|
||||||
|
implements GCPN and GraphAF on ZINC250k. It pretrains with negative
|
||||||
|
log-likelihood (NLL), then optionally fine-tunes with proximal policy optimization
|
||||||
|
(PPO) for QED or penalized logP.
|
||||||
|
|
||||||
|
## Shared dataset
|
||||||
|
|
||||||
|
```python
|
||||||
|
from torchdrug import datasets
|
||||||
|
|
||||||
|
dataset = datasets.ZINC250k(
|
||||||
|
"~/molecule-datasets/",
|
||||||
|
kekulize=True,
|
||||||
|
atom_feature="symbol",
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
The tutorial assumes:
|
||||||
|
|
||||||
|
- maximum graph size: 38 atoms
|
||||||
|
- 9 atom types
|
||||||
|
- 3 bond types
|
||||||
|
- `max_edge_unroll=12`
|
||||||
|
|
||||||
|
If using another dataset, recompute these assumptions instead of copying the
|
||||||
|
ZINC250k values.
|
||||||
|
|
||||||
|
## GCPN
|
||||||
|
|
||||||
|
### Pretraining task
|
||||||
|
|
||||||
|
```python
|
||||||
|
import torch
|
||||||
|
from torchdrug import core, models, tasks
|
||||||
|
|
||||||
|
model = models.RGCN(
|
||||||
|
input_dim=dataset.node_feature_dim,
|
||||||
|
num_relation=dataset.num_bond_type,
|
||||||
|
hidden_dims=[256, 256, 256, 256],
|
||||||
|
batch_norm=False,
|
||||||
|
)
|
||||||
|
task = tasks.GCPNGeneration(
|
||||||
|
model,
|
||||||
|
dataset.atom_types,
|
||||||
|
max_edge_unroll=12,
|
||||||
|
max_node=38,
|
||||||
|
criterion="nll",
|
||||||
|
)
|
||||||
|
|
||||||
|
optimizer = torch.optim.Adam(task.parameters(), lr=1e-3)
|
||||||
|
solver = core.Engine(
|
||||||
|
task,
|
||||||
|
dataset,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
optimizer,
|
||||||
|
batch_size=128,
|
||||||
|
log_interval=10,
|
||||||
|
)
|
||||||
|
solver.train(num_epoch=1)
|
||||||
|
solver.save("gcpn-zinc250k.pth")
|
||||||
|
```
|
||||||
|
|
||||||
|
Use `gpus=(0,)` or `gpus=[0]` only on supported CUDA hardware.
|
||||||
|
|
||||||
|
### Generate samples
|
||||||
|
|
||||||
|
```python
|
||||||
|
solver.load("gcpn-zinc250k.pth")
|
||||||
|
results = task.generate(num_sample=32, max_resample=5)
|
||||||
|
print(results.to_smiles())
|
||||||
|
```
|
||||||
|
|
||||||
|
`results` is a packed molecule object. Validate all returned structures before
|
||||||
|
downstream use.
|
||||||
|
|
||||||
|
### Goal-directed fine-tuning
|
||||||
|
|
||||||
|
The documented optimization tasks are `"qed"` and `"plogp"`. The task does not
|
||||||
|
accept an arbitrary `reward_function=` callback in 0.2.1.
|
||||||
|
|
||||||
|
```python
|
||||||
|
task = tasks.GCPNGeneration(
|
||||||
|
model,
|
||||||
|
dataset.atom_types,
|
||||||
|
max_edge_unroll=12,
|
||||||
|
max_node=38,
|
||||||
|
task="plogp",
|
||||||
|
criterion="ppo",
|
||||||
|
reward_temperature=1,
|
||||||
|
agent_update_interval=3,
|
||||||
|
gamma=0.9,
|
||||||
|
)
|
||||||
|
|
||||||
|
optimizer = torch.optim.Adam(task.parameters(), lr=1e-5)
|
||||||
|
solver = core.Engine(
|
||||||
|
task,
|
||||||
|
dataset,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
optimizer,
|
||||||
|
batch_size=16,
|
||||||
|
log_interval=10,
|
||||||
|
)
|
||||||
|
solver.load("gcpn-zinc250k.pth", load_optimizer=False)
|
||||||
|
solver.train(num_epoch=10)
|
||||||
|
```
|
||||||
|
|
||||||
|
For mixed supervised/RL training, the tutorial also uses:
|
||||||
|
|
||||||
|
```python
|
||||||
|
criterion = ("ppo", "nll")
|
||||||
|
```
|
||||||
|
|
||||||
|
or a weighted criterion mapping where supported by the task.
|
||||||
|
|
||||||
|
## GraphAF
|
||||||
|
|
||||||
|
GraphAF has three distinct layers:
|
||||||
|
|
||||||
|
1. an `RGCN` representation model,
|
||||||
|
2. node and edge flow models exposed as `models.GraphAF`,
|
||||||
|
3. `tasks.AutoregressiveGeneration` as the training objective.
|
||||||
|
|
||||||
|
The representation model uses discrete atom-type input:
|
||||||
|
|
||||||
|
```python
|
||||||
|
model = models.RGCN(
|
||||||
|
input_dim=dataset.num_atom_type,
|
||||||
|
num_relation=dataset.num_bond_type,
|
||||||
|
hidden_dims=[256, 256, 256],
|
||||||
|
batch_norm=True,
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
Create the node and edge priors exactly as shown in the upstream tutorial, then
|
||||||
|
construct one flow for nodes and one for edges:
|
||||||
|
|
||||||
|
```python
|
||||||
|
from torchdrug.layers import distribution
|
||||||
|
|
||||||
|
num_atom_type = dataset.num_atom_type
|
||||||
|
num_bond_type = dataset.num_bond_type + 1 # one extra class for no edge
|
||||||
|
|
||||||
|
node_prior = distribution.IndependentGaussian(
|
||||||
|
torch.zeros(num_atom_type),
|
||||||
|
torch.ones(num_atom_type),
|
||||||
|
)
|
||||||
|
edge_prior = distribution.IndependentGaussian(
|
||||||
|
torch.zeros(num_bond_type),
|
||||||
|
torch.ones(num_bond_type),
|
||||||
|
)
|
||||||
|
node_flow = models.GraphAF(
|
||||||
|
model,
|
||||||
|
node_prior,
|
||||||
|
num_layer=12,
|
||||||
|
)
|
||||||
|
edge_flow = models.GraphAF(
|
||||||
|
model,
|
||||||
|
edge_prior,
|
||||||
|
use_edge=True,
|
||||||
|
num_layer=12,
|
||||||
|
)
|
||||||
|
|
||||||
|
task = tasks.AutoregressiveGeneration(
|
||||||
|
node_flow,
|
||||||
|
edge_flow,
|
||||||
|
max_node=38,
|
||||||
|
max_edge_unroll=12,
|
||||||
|
criterion="nll",
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
Do not omit the documented prior construction. The node and edge prior shapes
|
||||||
|
must match the dataset's atom and bond vocabularies.
|
||||||
|
|
||||||
|
Train and generate through the task:
|
||||||
|
|
||||||
|
```python
|
||||||
|
optimizer = torch.optim.Adam(task.parameters(), lr=1e-3)
|
||||||
|
solver = core.Engine(
|
||||||
|
task,
|
||||||
|
dataset,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
optimizer,
|
||||||
|
batch_size=128,
|
||||||
|
log_interval=10,
|
||||||
|
)
|
||||||
|
solver.train(num_epoch=10)
|
||||||
|
solver.save("graphaf-zinc250k.pth")
|
||||||
|
|
||||||
|
solver.load("graphaf-zinc250k.pth")
|
||||||
|
results = task.generate(num_sample=32)
|
||||||
|
print(results.to_smiles())
|
||||||
|
```
|
||||||
|
|
||||||
|
For PPO fine-tuning, rebuild `AutoregressiveGeneration` with `task="qed"` or
|
||||||
|
`task="plogp"`, a PPO criterion, and the tutorial's reward/baseline settings;
|
||||||
|
then load the pretrained checkpoint with `load_optimizer=False`.
|
||||||
|
|
||||||
|
## What the API does not provide
|
||||||
|
|
||||||
|
Avoid these unsupported patterns:
|
||||||
|
|
||||||
|
```python
|
||||||
|
# Not a TorchDrug 0.2.1 API
|
||||||
|
tasks.GCPNGeneration(model, reward_function=my_reward, criterion="ppo")
|
||||||
|
```
|
||||||
|
|
||||||
|
TorchDrug 0.2.1's built-in generation task names are limited to QED and penalized
|
||||||
|
logP. A custom objective requires extending the task implementation rather than
|
||||||
|
passing a callback shown in another library.
|
||||||
|
|
||||||
|
The tutorial does not document generic scaffold-conditioned or
|
||||||
|
fragment-conditioned constructors. Do not claim those capabilities without a
|
||||||
|
separate implementation.
|
||||||
|
|
||||||
|
## Evaluation and safety
|
||||||
|
|
||||||
|
At minimum report:
|
||||||
|
|
||||||
|
- validity
|
||||||
|
- uniqueness
|
||||||
|
- novelty against the training set
|
||||||
|
- duplicate-aware property distributions
|
||||||
|
- failure and resampling rates
|
||||||
|
|
||||||
|
Also:
|
||||||
|
|
||||||
|
- canonicalize and sanitize with a chemistry toolkit,
|
||||||
|
- reject disconnected or chemically implausible structures as appropriate,
|
||||||
|
- screen structural alerts and undesirable substructures,
|
||||||
|
- assess synthetic accessibility separately,
|
||||||
|
- avoid presenting QED or penalized logP as evidence of efficacy or safety,
|
||||||
|
- keep generated structures out of automated synthesis without expert review.
|
||||||
|
|
||||||
|
## Source links
|
||||||
|
|
||||||
|
- [Generation tutorial](https://torchdrug.ai/docs/tutorials/generation.html)
|
||||||
|
- [Generation benchmark](https://torchdrug.ai/docs/benchmark/generation.html)
|
||||||
|
- [Generation task API](https://torchdrug.ai/docs/api/tasks.html#molecule-generation-tasks)
|
||||||
|
- [Flow model API](https://torchdrug.ai/docs/api/models.html#normalizing-flows)
|
||||||
+252
@@ -0,0 +1,252 @@
|
|||||||
|
---
|
||||||
|
title: "Molecular Property Prediction and Pretraining"
|
||||||
|
task: ""
|
||||||
|
lineage_type: import
|
||||||
|
upstream_source: https://github.com/K-Dense-AI/scientific-agent-skills/blob/e8727695/skills/torchdrug/references/molecular_property_prediction.md
|
||||||
|
upstream_sha: e8727695
|
||||||
|
imported_at: 2026-07-20
|
||||||
|
prompt_class: catalogue
|
||||||
|
upstream_changes: accepted
|
||||||
|
author: upstream
|
||||||
|
validated: false
|
||||||
|
---
|
||||||
|
|
||||||
|
# Molecular Property Prediction and Pretraining
|
||||||
|
|
||||||
|
Follow the official
|
||||||
|
[property prediction](https://torchdrug.ai/docs/tutorials/property_prediction.html)
|
||||||
|
and
|
||||||
|
[pretrained molecular representations](https://torchdrug.ai/docs/tutorials/pretrain.html)
|
||||||
|
tutorials for TorchDrug 0.2.1.
|
||||||
|
|
||||||
|
## Supervised property prediction
|
||||||
|
|
||||||
|
### 1. Load and split data
|
||||||
|
|
||||||
|
The official tutorial uses a random 80/10/10 ClinTox split:
|
||||||
|
|
||||||
|
```python
|
||||||
|
import torch
|
||||||
|
from torchdrug import datasets
|
||||||
|
|
||||||
|
dataset = datasets.ClinTox("~/molecule-datasets/")
|
||||||
|
lengths = [int(0.8 * len(dataset)), int(0.1 * len(dataset))]
|
||||||
|
lengths.append(len(dataset) - sum(lengths))
|
||||||
|
train_set, valid_set, test_set = torch.utils.data.random_split(dataset, lengths)
|
||||||
|
```
|
||||||
|
|
||||||
|
This is a random split, not a scaffold split. If a benchmark requires a scaffold
|
||||||
|
split, implement or import that protocol explicitly and record it in the
|
||||||
|
experiment configuration.
|
||||||
|
|
||||||
|
### 2. Define the representation model
|
||||||
|
|
||||||
|
```python
|
||||||
|
from torchdrug import models
|
||||||
|
|
||||||
|
model = models.GIN(
|
||||||
|
input_dim=dataset.node_feature_dim,
|
||||||
|
hidden_dims=[256, 256, 256, 256],
|
||||||
|
short_cut=True,
|
||||||
|
batch_norm=True,
|
||||||
|
concat_hidden=True,
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. Define the task
|
||||||
|
|
||||||
|
```python
|
||||||
|
from torchdrug import tasks
|
||||||
|
|
||||||
|
task = tasks.PropertyPrediction(
|
||||||
|
model,
|
||||||
|
task=dataset.tasks,
|
||||||
|
criterion="bce",
|
||||||
|
metric=("auprc", "auroc"),
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
`task` means the target field name(s) or a mapping of target names to weights. It
|
||||||
|
does not mean `"node"`, `"edge"`, or `"graph"`.
|
||||||
|
|
||||||
|
Documented `PropertyPrediction` criteria are:
|
||||||
|
|
||||||
|
- `"mse"`
|
||||||
|
- `"bce"`
|
||||||
|
- `"ce"`
|
||||||
|
|
||||||
|
Documented metrics are:
|
||||||
|
|
||||||
|
- `"mae"`
|
||||||
|
- `"rmse"`
|
||||||
|
- `"auprc"`
|
||||||
|
- `"auroc"`
|
||||||
|
|
||||||
|
Other useful constructor options include `num_mlp_layer`, `normalization`,
|
||||||
|
`num_class`, `mlp_batch_norm`, `mlp_dropout`, and
|
||||||
|
`graph_construction_model`.
|
||||||
|
|
||||||
|
For large multi-label problems, inspect `tasks.MultipleBinaryClassification`,
|
||||||
|
which has its own task IDs, metrics, and reweighting behavior.
|
||||||
|
|
||||||
|
### 4. Train with Engine
|
||||||
|
|
||||||
|
```python
|
||||||
|
from torchdrug import core
|
||||||
|
|
||||||
|
optimizer = torch.optim.Adam(task.parameters(), lr=1e-3)
|
||||||
|
solver = core.Engine(
|
||||||
|
task,
|
||||||
|
train_set,
|
||||||
|
valid_set,
|
||||||
|
test_set,
|
||||||
|
optimizer,
|
||||||
|
batch_size=1024,
|
||||||
|
)
|
||||||
|
solver.train(num_epoch=100)
|
||||||
|
solver.evaluate("valid")
|
||||||
|
```
|
||||||
|
|
||||||
|
Add `gpus=[0]` only for supported CUDA execution. Start with one epoch and a
|
||||||
|
smaller batch for a smoke test.
|
||||||
|
|
||||||
|
## Manual prediction
|
||||||
|
|
||||||
|
Use TorchDrug collation:
|
||||||
|
|
||||||
|
```python
|
||||||
|
from torch.nn import functional as F
|
||||||
|
from torchdrug import data
|
||||||
|
|
||||||
|
batch = data.graph_collate(valid_set[:8])
|
||||||
|
logits = task.predict(batch)
|
||||||
|
probabilities = F.sigmoid(logits)
|
||||||
|
targets = task.target(batch)
|
||||||
|
```
|
||||||
|
|
||||||
|
For binary classification, `predict()` returns logits and the tutorial applies
|
||||||
|
sigmoid. For normalized regression, TorchDrug 0.2.1 returns predictions on the
|
||||||
|
original target scale; this changed from earlier releases.
|
||||||
|
|
||||||
|
When predicting on CUDA manually, move the whole nested batch:
|
||||||
|
|
||||||
|
```python
|
||||||
|
from torchdrug import utils
|
||||||
|
|
||||||
|
batch = utils.cuda(batch)
|
||||||
|
```
|
||||||
|
|
||||||
|
## Self-supervised pretraining
|
||||||
|
|
||||||
|
The tutorial uses ClinTox only as a small illustration and recommends a larger
|
||||||
|
unlabeled corpus such as ZINC2m for real pretraining.
|
||||||
|
|
||||||
|
Use matching pretraining features:
|
||||||
|
|
||||||
|
```python
|
||||||
|
dataset = datasets.ClinTox(
|
||||||
|
"~/molecule-datasets/",
|
||||||
|
atom_feature="pretrain",
|
||||||
|
bond_feature="pretrain",
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
### InfoGraph
|
||||||
|
|
||||||
|
```python
|
||||||
|
from torchdrug import core, models, tasks
|
||||||
|
|
||||||
|
gin_model = models.GIN(
|
||||||
|
input_dim=dataset.node_feature_dim,
|
||||||
|
hidden_dims=[300, 300, 300, 300, 300],
|
||||||
|
edge_input_dim=dataset.edge_feature_dim,
|
||||||
|
batch_norm=True,
|
||||||
|
readout="mean",
|
||||||
|
)
|
||||||
|
model = models.InfoGraph(gin_model, separate_model=False)
|
||||||
|
task = tasks.Unsupervised(model)
|
||||||
|
|
||||||
|
optimizer = torch.optim.Adam(task.parameters(), lr=1e-3)
|
||||||
|
solver = core.Engine(
|
||||||
|
task,
|
||||||
|
dataset,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
optimizer,
|
||||||
|
batch_size=256,
|
||||||
|
)
|
||||||
|
solver.train(num_epoch=100)
|
||||||
|
solver.save("gin-infograph.pth")
|
||||||
|
```
|
||||||
|
|
||||||
|
### Attribute masking
|
||||||
|
|
||||||
|
```python
|
||||||
|
model = models.GIN(
|
||||||
|
input_dim=dataset.node_feature_dim,
|
||||||
|
hidden_dims=[300, 300, 300, 300, 300],
|
||||||
|
edge_input_dim=dataset.edge_feature_dim,
|
||||||
|
batch_norm=True,
|
||||||
|
readout="mean",
|
||||||
|
)
|
||||||
|
task = tasks.AttributeMasking(model, mask_rate=0.15)
|
||||||
|
|
||||||
|
optimizer = torch.optim.Adam(task.parameters(), lr=1e-3)
|
||||||
|
solver = core.Engine(
|
||||||
|
task,
|
||||||
|
dataset,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
optimizer,
|
||||||
|
batch_size=256,
|
||||||
|
)
|
||||||
|
solver.train(num_epoch=100)
|
||||||
|
solver.save("gin-attribute-masking.pth")
|
||||||
|
```
|
||||||
|
|
||||||
|
### Fine-tune the encoder
|
||||||
|
|
||||||
|
Recreate the same GIN architecture and feature dimensions, then wrap it in the
|
||||||
|
supervised task:
|
||||||
|
|
||||||
|
```python
|
||||||
|
model = models.GIN(
|
||||||
|
input_dim=dataset.node_feature_dim,
|
||||||
|
hidden_dims=[300, 300, 300, 300, 300],
|
||||||
|
edge_input_dim=dataset.edge_feature_dim,
|
||||||
|
batch_norm=True,
|
||||||
|
readout="mean",
|
||||||
|
)
|
||||||
|
task = tasks.PropertyPrediction(
|
||||||
|
model,
|
||||||
|
task=dataset.tasks,
|
||||||
|
criterion="bce",
|
||||||
|
metric=("auprc", "auroc"),
|
||||||
|
)
|
||||||
|
|
||||||
|
checkpoint = torch.load("gin-attribute-masking.pth")["model"]
|
||||||
|
task.load_state_dict(checkpoint, strict=False)
|
||||||
|
```
|
||||||
|
|
||||||
|
Then construct a new optimizer and supervised `Engine`. `strict=False` is
|
||||||
|
intentional because the pretraining and supervised task heads differ. Review
|
||||||
|
missing and unexpected keys if changing the architecture.
|
||||||
|
|
||||||
|
## Experiment checks
|
||||||
|
|
||||||
|
- Confirm `dataset.tasks` names and label shapes.
|
||||||
|
- Confirm classification vs regression before choosing criterion and metrics.
|
||||||
|
- Record the exact split protocol; do not mislabel random splits as scaffold
|
||||||
|
splits.
|
||||||
|
- Use AUPRC as well as AUROC for heavily imbalanced binary tasks.
|
||||||
|
- Keep feature arguments identical when loading pretrained weights.
|
||||||
|
- Fit preprocessing only on the training split.
|
||||||
|
- Reserve the test split until model selection is complete.
|
||||||
|
|
||||||
|
## Source links
|
||||||
|
|
||||||
|
- [Property tutorial](https://torchdrug.ai/docs/tutorials/property_prediction.html)
|
||||||
|
- [Pretraining tutorial](https://torchdrug.ai/docs/tutorials/pretrain.html)
|
||||||
|
- [Property task API](https://torchdrug.ai/docs/api/tasks.html#property-prediction-tasks)
|
||||||
|
- [Molecule dataset API](https://torchdrug.ai/docs/api/datasets.html#molecule-property-prediction-datasets)
|
||||||
|
- [0.2.1 release notes](https://github.com/DeepGraphLearning/torchdrug/releases/tag/v0.2.1)
|
||||||
+234
@@ -0,0 +1,234 @@
|
|||||||
|
---
|
||||||
|
title: "Protein Modeling"
|
||||||
|
task: ""
|
||||||
|
lineage_type: import
|
||||||
|
upstream_source: https://github.com/K-Dense-AI/scientific-agent-skills/blob/e8727695/skills/torchdrug/references/protein_modeling.md
|
||||||
|
upstream_sha: e8727695
|
||||||
|
imported_at: 2026-07-20
|
||||||
|
prompt_class: catalogue
|
||||||
|
upstream_changes: accepted
|
||||||
|
author: upstream
|
||||||
|
validated: false
|
||||||
|
---
|
||||||
|
|
||||||
|
# Protein Modeling
|
||||||
|
|
||||||
|
TorchDrug 0.2.1 documents protein data structures, datasets, sequence encoders,
|
||||||
|
and geometry-aware graph models in its
|
||||||
|
[data](https://torchdrug.ai/docs/api/data.html),
|
||||||
|
[dataset](https://torchdrug.ai/docs/api/datasets.html), and
|
||||||
|
[model](https://torchdrug.ai/docs/api/models.html) APIs. The primary tutorial
|
||||||
|
index focuses on molecular and knowledge-graph workflows, so avoid inventing a
|
||||||
|
protein tutorial API that upstream does not provide.
|
||||||
|
|
||||||
|
## Build protein objects
|
||||||
|
|
||||||
|
### From sequence
|
||||||
|
|
||||||
|
```python
|
||||||
|
from torchdrug import data
|
||||||
|
|
||||||
|
protein = data.Protein.from_sequence(
|
||||||
|
"MKTAYIAKQRQISFVKSHFSRQ",
|
||||||
|
atom_feature=None,
|
||||||
|
bond_feature=None,
|
||||||
|
residue_feature="default",
|
||||||
|
)
|
||||||
|
print(protein.to_sequence())
|
||||||
|
```
|
||||||
|
|
||||||
|
For sequence-only work, setting atom and bond features to `None` avoids the cost
|
||||||
|
of constructing a full atom-level representation.
|
||||||
|
|
||||||
|
### From PDB
|
||||||
|
|
||||||
|
```python
|
||||||
|
protein = data.Protein.from_pdb(
|
||||||
|
"protein.pdb",
|
||||||
|
atom_feature="default",
|
||||||
|
bond_feature="default",
|
||||||
|
residue_feature="default",
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
Use trusted local PDB files and validate chain selection, missing residues,
|
||||||
|
alternate locations, and nonstandard residues before training.
|
||||||
|
|
||||||
|
Documented conversion methods include:
|
||||||
|
|
||||||
|
- `Protein.from_sequence`
|
||||||
|
- `Protein.from_pdb`
|
||||||
|
- `Protein.from_molecule`
|
||||||
|
- `Protein.to_sequence`
|
||||||
|
- `Protein.to_pdb`
|
||||||
|
- `Protein.to_molecule`
|
||||||
|
|
||||||
|
Packed equivalents operate on lists:
|
||||||
|
|
||||||
|
- `PackedProtein.from_sequence(sequences)`
|
||||||
|
- `PackedProtein.from_pdb(pdb_files)`
|
||||||
|
- `PackedProtein.from_molecule(mols)`
|
||||||
|
|
||||||
|
## Protein datasets
|
||||||
|
|
||||||
|
Documented dataset families include:
|
||||||
|
|
||||||
|
- Property / sequence: `BetaLactamase`, `BinaryLocalization`,
|
||||||
|
`SubcellularLocalization`
|
||||||
|
- Function / structure: `EnzymeCommission`, `GeneOntology`, `AlphaFoldDB`
|
||||||
|
- Structure labels: `Fold`, `SecondaryStructure`
|
||||||
|
- Protein-protein: `HumanPPI`, `YeastPPI`, `PPIAffinity`
|
||||||
|
- Protein-ligand: `BindingDB`, `PDBBind`
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
```python
|
||||||
|
from torchdrug import datasets
|
||||||
|
|
||||||
|
dataset = datasets.EnzymeCommission(
|
||||||
|
"~/protein-datasets/",
|
||||||
|
atom_feature=None,
|
||||||
|
bond_feature=None,
|
||||||
|
residue_feature="default",
|
||||||
|
)
|
||||||
|
train_set, valid_set, test_set = dataset.split()
|
||||||
|
```
|
||||||
|
|
||||||
|
Class signatures differ. Options such as `branch`, `test_cutoff`, `lazy`, or
|
||||||
|
species/split IDs are dataset-specific; check the API before using them.
|
||||||
|
|
||||||
|
## Sequence encoders
|
||||||
|
|
||||||
|
### ESM
|
||||||
|
|
||||||
|
`models.ESM` is the alias for `EvolutionaryScaleModeling`. The constructor takes
|
||||||
|
a directory for downloaded weights, not a checkpoint filename:
|
||||||
|
|
||||||
|
```python
|
||||||
|
from torchdrug import models
|
||||||
|
|
||||||
|
model = models.ESM(
|
||||||
|
path="~/model-weights/esm/",
|
||||||
|
model="ESM-2-150M",
|
||||||
|
readout="mean",
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
TorchDrug 0.2.1 supports these ESM-2 names:
|
||||||
|
|
||||||
|
- `ESM-2-8M`
|
||||||
|
- `ESM-2-35M`
|
||||||
|
- `ESM-2-150M`
|
||||||
|
- `ESM-2-650M`
|
||||||
|
- `ESM-2-3B`
|
||||||
|
- `ESM-2-15B`
|
||||||
|
|
||||||
|
It also supports `ESM-1b` and `ESM-1v`. Maximum sequence input is 1022 residues
|
||||||
|
before special tokens. Large checkpoints require substantial memory; start with
|
||||||
|
`ESM-2-8M` or `ESM-2-35M` for pipeline validation.
|
||||||
|
|
||||||
|
### Other sequence models
|
||||||
|
|
||||||
|
Documented classes include:
|
||||||
|
|
||||||
|
- `models.ProteinCNN`
|
||||||
|
- `models.ProteinResNet`
|
||||||
|
- `models.ProteinLSTM`
|
||||||
|
- `models.ProteinBERT`
|
||||||
|
|
||||||
|
These models require explicit input/hidden dimensions. Derive input dimensions
|
||||||
|
from the dataset's residue feature configuration.
|
||||||
|
|
||||||
|
## Structure encoders
|
||||||
|
|
||||||
|
Documented structure-aware models include:
|
||||||
|
|
||||||
|
- `models.GearNet`
|
||||||
|
- `models.SchNet`
|
||||||
|
- general graph models such as `GCN`, `GAT`, `GIN`, and `RGCN`
|
||||||
|
|
||||||
|
`SchNet` requires `node_position`. `GearNet` requires a graph whose relation and
|
||||||
|
geometric feature configuration matches its constructor.
|
||||||
|
|
||||||
|
Use TorchDrug graph-construction and geometry layers to create sequential,
|
||||||
|
radius, and nearest-neighbor relations. Do not use a nonexistent
|
||||||
|
`protein.residue_graph(...)` method.
|
||||||
|
|
||||||
|
Before training a structure model, inspect:
|
||||||
|
|
||||||
|
```python
|
||||||
|
print(protein.num_node)
|
||||||
|
print(protein.num_residue)
|
||||||
|
print(protein.node_position.shape)
|
||||||
|
print(protein.residue_feature.shape)
|
||||||
|
```
|
||||||
|
|
||||||
|
Confirm whether nodes represent atoms or residues and ensure the model input
|
||||||
|
matches that choice.
|
||||||
|
|
||||||
|
## Property-prediction task
|
||||||
|
|
||||||
|
Protein-level classification or regression can use the same task abstraction as
|
||||||
|
molecules:
|
||||||
|
|
||||||
|
```python
|
||||||
|
from torchdrug import tasks
|
||||||
|
|
||||||
|
task = tasks.PropertyPrediction(
|
||||||
|
model,
|
||||||
|
task=dataset.tasks,
|
||||||
|
criterion="bce",
|
||||||
|
metric=("auprc", "auroc"),
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
Choose criterion and metrics from the actual dataset target:
|
||||||
|
|
||||||
|
- binary or multi-label classification: BCE, AUPRC/AUROC
|
||||||
|
- multiclass classification: CE and the documented compatible metrics
|
||||||
|
- regression: MSE, MAE/RMSE
|
||||||
|
|
||||||
|
For large multi-label ontology tasks, inspect
|
||||||
|
`tasks.MultipleBinaryClassification` rather than treating labels as one
|
||||||
|
multiclass target.
|
||||||
|
|
||||||
|
## Workflow checks
|
||||||
|
|
||||||
|
1. Decide sequence-only versus structure-aware modeling.
|
||||||
|
2. Configure protein features to match that representation.
|
||||||
|
3. Verify dataset splits and sequence identity cutoffs.
|
||||||
|
4. Check maximum sequence length before selecting ESM.
|
||||||
|
5. Build graph relations explicitly for structure models.
|
||||||
|
6. Derive dimensions from the loaded dataset.
|
||||||
|
7. Smoke-test one batch before long training.
|
||||||
|
8. Record checkpoint name, feature settings, split, and TorchDrug version.
|
||||||
|
|
||||||
|
## Common failures
|
||||||
|
|
||||||
|
### ESM constructor error
|
||||||
|
|
||||||
|
Use `models.ESM(path=<directory>, model=<supported-name>)`. Do not pass a
|
||||||
|
downloaded `.pt` filename as `path`.
|
||||||
|
|
||||||
|
### Out-of-memory error
|
||||||
|
|
||||||
|
Choose a smaller ESM model, reduce batch size, crop or filter long sequences, or
|
||||||
|
freeze the encoder and precompute embeddings.
|
||||||
|
|
||||||
|
### Missing coordinates
|
||||||
|
|
||||||
|
Sequence-created proteins do not acquire experimental 3D coordinates. Load a PDB
|
||||||
|
or another validated structure source before using coordinate-dependent models.
|
||||||
|
|
||||||
|
### Relation mismatch
|
||||||
|
|
||||||
|
Build the same relation types expected by the structure model and set
|
||||||
|
`num_relation` accordingly.
|
||||||
|
|
||||||
|
## Source links
|
||||||
|
|
||||||
|
- [Protein data API](https://torchdrug.ai/docs/api/data.html#protein)
|
||||||
|
- [Protein datasets](https://torchdrug.ai/docs/api/datasets.html#protein-property-prediction-datasets)
|
||||||
|
- [Protein sequence encoders](https://torchdrug.ai/docs/api/models.html#protein-sequence-encoders)
|
||||||
|
- [Graph neural networks](https://torchdrug.ai/docs/api/models.html#graph-neural-networks)
|
||||||
|
- [TorchDrug 0.2.1 release notes](https://github.com/DeepGraphLearning/torchdrug/releases/tag/v0.2.1)
|
||||||
+260
@@ -0,0 +1,260 @@
|
|||||||
|
---
|
||||||
|
title: "Retrosynthesis"
|
||||||
|
task: ""
|
||||||
|
lineage_type: import
|
||||||
|
upstream_source: https://github.com/K-Dense-AI/scientific-agent-skills/blob/e8727695/skills/torchdrug/references/retrosynthesis.md
|
||||||
|
upstream_sha: e8727695
|
||||||
|
imported_at: 2026-07-20
|
||||||
|
prompt_class: unknown
|
||||||
|
upstream_changes: accepted
|
||||||
|
author: upstream
|
||||||
|
validated: false
|
||||||
|
---
|
||||||
|
|
||||||
|
# Retrosynthesis
|
||||||
|
|
||||||
|
The official
|
||||||
|
[TorchDrug 0.2.1 retrosynthesis tutorial](https://torchdrug.ai/docs/tutorials/retrosynthesis.html)
|
||||||
|
implements the G2Gs workflow:
|
||||||
|
|
||||||
|
1. identify reaction centers,
|
||||||
|
2. split products into synthons,
|
||||||
|
3. complete synthons into reactants,
|
||||||
|
4. combine both trained tasks for end-to-end prediction.
|
||||||
|
|
||||||
|
This is a single-step reactant prediction pipeline. Multi-step route search,
|
||||||
|
commercial availability, conditions, yields, and cost optimization are not
|
||||||
|
provided by `tasks.Retrosynthesis`.
|
||||||
|
|
||||||
|
## Prepare synchronized datasets
|
||||||
|
|
||||||
|
```python
|
||||||
|
import torch
|
||||||
|
from torchdrug import datasets
|
||||||
|
|
||||||
|
reaction_dataset = datasets.USPTO50k(
|
||||||
|
"~/molecule-datasets/",
|
||||||
|
atom_feature="center_identification",
|
||||||
|
kekulize=True,
|
||||||
|
)
|
||||||
|
synthon_dataset = datasets.USPTO50k(
|
||||||
|
"~/molecule-datasets/",
|
||||||
|
as_synthon=True,
|
||||||
|
atom_feature="synthon_completion",
|
||||||
|
kekulize=True,
|
||||||
|
)
|
||||||
|
|
||||||
|
torch.manual_seed(1)
|
||||||
|
reaction_train, reaction_valid, reaction_test = reaction_dataset.split()
|
||||||
|
torch.manual_seed(1)
|
||||||
|
synthon_train, synthon_valid, synthon_test = synthon_dataset.split()
|
||||||
|
```
|
||||||
|
|
||||||
|
The repeated seed is required to align the reaction and synthon splits.
|
||||||
|
|
||||||
|
- Reaction mode stores `(reactants, product)` pairs.
|
||||||
|
- Synthon mode stores `(reactant, synthon)` pairs.
|
||||||
|
|
||||||
|
## Center identification
|
||||||
|
|
||||||
|
The official tutorial uses RGCN and three feature groups:
|
||||||
|
|
||||||
|
```python
|
||||||
|
from torchdrug import core, models, tasks
|
||||||
|
|
||||||
|
reaction_model = models.RGCN(
|
||||||
|
input_dim=reaction_dataset.node_feature_dim,
|
||||||
|
hidden_dims=[256, 256, 256, 256, 256, 256],
|
||||||
|
num_relation=reaction_dataset.num_bond_type,
|
||||||
|
concat_hidden=True,
|
||||||
|
)
|
||||||
|
reaction_task = tasks.CenterIdentification(
|
||||||
|
reaction_model,
|
||||||
|
feature=("graph", "atom", "bond"),
|
||||||
|
)
|
||||||
|
|
||||||
|
reaction_optimizer = torch.optim.Adam(
|
||||||
|
reaction_task.parameters(),
|
||||||
|
lr=1e-3,
|
||||||
|
)
|
||||||
|
reaction_solver = core.Engine(
|
||||||
|
reaction_task,
|
||||||
|
reaction_train,
|
||||||
|
reaction_valid,
|
||||||
|
reaction_test,
|
||||||
|
reaction_optimizer,
|
||||||
|
batch_size=128,
|
||||||
|
)
|
||||||
|
reaction_solver.train(num_epoch=50)
|
||||||
|
reaction_solver.evaluate("valid")
|
||||||
|
reaction_solver.save("g2gs-reaction.pth")
|
||||||
|
```
|
||||||
|
|
||||||
|
`CenterIdentification` predicts reaction centers. Its
|
||||||
|
`predict_synthon(batch, k=...)` method returns top-k records containing synthons,
|
||||||
|
reaction centers, reaction metadata, and log likelihoods.
|
||||||
|
|
||||||
|
## Synthon completion
|
||||||
|
|
||||||
|
The official tutorial again uses RGCN:
|
||||||
|
|
||||||
|
```python
|
||||||
|
synthon_model = models.RGCN(
|
||||||
|
input_dim=synthon_dataset.node_feature_dim,
|
||||||
|
hidden_dims=[256, 256, 256, 256, 256, 256],
|
||||||
|
num_relation=synthon_dataset.num_bond_type,
|
||||||
|
concat_hidden=True,
|
||||||
|
)
|
||||||
|
synthon_task = tasks.SynthonCompletion(
|
||||||
|
synthon_model,
|
||||||
|
feature=("graph",),
|
||||||
|
)
|
||||||
|
|
||||||
|
synthon_optimizer = torch.optim.Adam(
|
||||||
|
synthon_task.parameters(),
|
||||||
|
lr=1e-3,
|
||||||
|
)
|
||||||
|
synthon_solver = core.Engine(
|
||||||
|
synthon_task,
|
||||||
|
synthon_train,
|
||||||
|
synthon_valid,
|
||||||
|
synthon_test,
|
||||||
|
synthon_optimizer,
|
||||||
|
batch_size=128,
|
||||||
|
)
|
||||||
|
synthon_solver.train(num_epoch=10)
|
||||||
|
synthon_solver.evaluate("valid")
|
||||||
|
synthon_solver.save("g2gs-synthon.pth")
|
||||||
|
```
|
||||||
|
|
||||||
|
Do not substitute a GIN constructor copied from another implementation unless
|
||||||
|
you intentionally redesign and validate the model.
|
||||||
|
|
||||||
|
## End-to-end task
|
||||||
|
|
||||||
|
Combine the **tasks**, not the raw models:
|
||||||
|
|
||||||
|
```python
|
||||||
|
task = tasks.Retrosynthesis(
|
||||||
|
reaction_task,
|
||||||
|
synthon_task,
|
||||||
|
center_topk=2,
|
||||||
|
num_synthon_beam=5,
|
||||||
|
max_prediction=10,
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
If neither subtask has been attached to an `Engine`, preprocess them manually
|
||||||
|
before composition:
|
||||||
|
|
||||||
|
```python
|
||||||
|
reaction_task.preprocess(reaction_train, None, None)
|
||||||
|
synthon_task.preprocess(synthon_train, None, None)
|
||||||
|
```
|
||||||
|
|
||||||
|
The `Retrosynthesis` constructor accepts:
|
||||||
|
|
||||||
|
- `center_identification`
|
||||||
|
- `synthon_completion`
|
||||||
|
- `center_topk`
|
||||||
|
- `num_synthon_beam`
|
||||||
|
- `max_prediction`
|
||||||
|
- top-k metrics
|
||||||
|
|
||||||
|
It does not accept `model=`, `synthon_model=`, or a raw GNN pair.
|
||||||
|
|
||||||
|
## Checkpoint loading
|
||||||
|
|
||||||
|
The official workflow saves each subtask and loads checkpoints without optimizer
|
||||||
|
state when composing the pipeline:
|
||||||
|
|
||||||
|
```python
|
||||||
|
optimizer = torch.optim.Adam(task.parameters(), lr=1e-3)
|
||||||
|
solver = core.Engine(
|
||||||
|
task,
|
||||||
|
reaction_train,
|
||||||
|
reaction_valid,
|
||||||
|
reaction_test,
|
||||||
|
optimizer,
|
||||||
|
batch_size=32,
|
||||||
|
)
|
||||||
|
solver.load("g2gs-reaction.pth", load_optimizer=False)
|
||||||
|
solver.load("g2gs-synthon.pth", load_optimizer=False)
|
||||||
|
solver.evaluate("valid")
|
||||||
|
```
|
||||||
|
|
||||||
|
Keep model architectures, feature sets, and dataset metadata identical to the
|
||||||
|
training run. Inspect missing or unexpected keys if adapting this pattern.
|
||||||
|
|
||||||
|
## Prediction output
|
||||||
|
|
||||||
|
The end-to-end task returns packed reactant predictions and a count per input:
|
||||||
|
|
||||||
|
```python
|
||||||
|
from torchdrug import data, utils
|
||||||
|
|
||||||
|
batch = data.graph_collate(reaction_valid[:4])
|
||||||
|
batch = utils.cuda(batch)
|
||||||
|
predictions, num_prediction = task.predict(batch)
|
||||||
|
|
||||||
|
top1_index = num_prediction.cumsum(0) - num_prediction
|
||||||
|
for index in top1_index.tolist():
|
||||||
|
reactants = predictions[index].connected_components()[0]
|
||||||
|
print(reactants.to_smiles())
|
||||||
|
```
|
||||||
|
|
||||||
|
Call `utils.cuda` only when the task/models are on CUDA. Keep the batch on CPU
|
||||||
|
for CPU execution.
|
||||||
|
|
||||||
|
## Evaluation
|
||||||
|
|
||||||
|
The end-to-end task supports top-k exact-match metrics such as top-1, top-3,
|
||||||
|
top-5, and top-10. Also inspect:
|
||||||
|
|
||||||
|
- chemical validity,
|
||||||
|
- duplicate predictions,
|
||||||
|
- performance by reaction class,
|
||||||
|
- atom-map consistency,
|
||||||
|
- stereochemistry retention,
|
||||||
|
- uncertainty or score gaps.
|
||||||
|
|
||||||
|
Top-k exact match against USPTO50k is not proof that a reaction is practical.
|
||||||
|
|
||||||
|
## Scope and safety
|
||||||
|
|
||||||
|
TorchDrug's tutorial predicts reactant connectivity. It does not directly
|
||||||
|
predict:
|
||||||
|
|
||||||
|
- reagents, catalysts, solvent, temperature, or pressure,
|
||||||
|
- yield or selectivity,
|
||||||
|
- commercial availability,
|
||||||
|
- multi-step search trees,
|
||||||
|
- process safety or scale-up feasibility.
|
||||||
|
|
||||||
|
Treat outputs as model proposals requiring forward validation, literature
|
||||||
|
precedent, and expert chemistry review.
|
||||||
|
|
||||||
|
## Common failures
|
||||||
|
|
||||||
|
### Reaction and synthon samples do not align
|
||||||
|
|
||||||
|
Reset the same seed immediately before each `split()`.
|
||||||
|
|
||||||
|
### Feature dimension mismatch
|
||||||
|
|
||||||
|
Use the dedicated `center_identification` and `synthon_completion` atom features
|
||||||
|
and derive model dimensions from each corresponding dataset.
|
||||||
|
|
||||||
|
### End-to-end constructor error
|
||||||
|
|
||||||
|
Pass `reaction_task` and `synthon_task`, not their models.
|
||||||
|
|
||||||
|
### Uninitialized metadata
|
||||||
|
|
||||||
|
Construct each subtask's engine first or call `preprocess()` manually.
|
||||||
|
|
||||||
|
## Source links
|
||||||
|
|
||||||
|
- [Retrosynthesis tutorial](https://torchdrug.ai/docs/tutorials/retrosynthesis.html)
|
||||||
|
- [Retrosynthesis tasks](https://torchdrug.ai/docs/api/tasks.html#retrosynthesis-tasks)
|
||||||
|
- [USPTO50k dataset](https://torchdrug.ai/docs/api/datasets.html#uspto50k)
|
||||||
+193
-611
@@ -1,693 +1,275 @@
|
|||||||
---
|
---
|
||||||
lineage_type: import
|
lineage_type: import
|
||||||
upstream_source: https://github.com/K-Dense-AI/scientific-agent-skills/blob/9c9bd2e9/skills/venue-templates/SKILL.md
|
upstream_source: https://github.com/K-Dense-AI/scientific-agent-skills/blob/e8727695/skills/venue-templates/SKILL.md
|
||||||
upstream_sha: 9c9bd2e9
|
upstream_sha: e8727695
|
||||||
imported_at: 2026-06-27
|
imported_at: 2026-07-20
|
||||||
prompt_class: catalogue
|
prompt_class: unknown
|
||||||
upstream_changes: accepted
|
upstream_changes: accepted
|
||||||
name: venue-templates
|
name: venue-templates
|
||||||
description: Access comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
|
description: Prepare journal manuscripts, conference papers, research posters, and grant documents using venue-specific formatting guidance and bundled LaTeX scaffolds. Use when selecting an official template, checking current page or anonymity rules, adapting academic writing to a venue, or inspecting a submission PDF.
|
||||||
allowed-tools: Read Write Edit Bash
|
|
||||||
license: MIT license
|
license: MIT license
|
||||||
required_environment_variables: [{"name": "OPENROUTER_API_KEY", "prompt": "OpenRouter API key for the skill's LLM-powered steps.", "required_for": "optional features"}]
|
compatibility: Requires Python 3.11+ for helper scripts; LaTeX and Poppler command-line tools are optional for compilation and PDF inspection.
|
||||||
metadata: {"version": "1.1", "skill-author": "K-Dense Inc.", "openclaw": {"primaryEnv": "OPENROUTER_API_KEY", "envVars": [{"name": "OPENROUTER_API_KEY", "required": false, "description": "OpenRouter API key for the skill's LLM-powered steps."}]}}
|
metadata:
|
||||||
|
version: "1.2"
|
||||||
|
skill-author: K-Dense Inc.
|
||||||
---
|
---
|
||||||
|
|
||||||
# Venue Templates
|
# Venue Templates
|
||||||
|
|
||||||
## Overview
|
Prepare publication and funding documents without treating stale formatting details as authoritative. This skill combines:
|
||||||
|
|
||||||
Access comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues, academic conferences, research posters, and grant proposals. This skill provides ready-to-use templates and detailed specifications for successful academic submissions across disciplines.
|
- a verification-first workflow for current venue rules;
|
||||||
|
- bundled LaTeX scaffolds for a small, explicit set of document types;
|
||||||
|
- writing-style and reviewer-expectation guides; and
|
||||||
|
- local helpers for discovering, copying, and inspecting templates.
|
||||||
|
|
||||||
Use this skill when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
|
## Mandatory Currency Rule
|
||||||
|
|
||||||
## When to Use This Skill
|
Venue requirements are time-sensitive. Before giving exact page limits, deadlines, style-file names, anonymity rules, or required sections:
|
||||||
|
|
||||||
This skill should be used when:
|
1. Identify the exact venue, year or funding cycle, track, and article or proposal type.
|
||||||
- Preparing a manuscript for submission to a specific journal (Nature, Science, PLOS, IEEE, etc.)
|
2. Open the official author instructions, call, solicitation, notice of funding opportunity (NOFO), or policy guide.
|
||||||
- Writing a conference paper with specific formatting requirements (NeurIPS, ICML, CHI, etc.)
|
3. Record the source URL and the date checked.
|
||||||
- Creating an academic research poster for conferences
|
4. Distinguish initial submission, revision/rebuttal, and camera-ready rules.
|
||||||
- Drafting grant proposals for federal agencies (NSF, NIH, DOE, DARPA) or private foundations
|
5. Treat bundled files as scaffolds unless this skill explicitly says they are a copy of an official template.
|
||||||
- Checking formatting requirements and page limits for target venues
|
|
||||||
- Customizing templates with author information and project details
|
|
||||||
- Verifying document compliance with venue specifications
|
|
||||||
|
|
||||||
## Visual Enhancement with Scientific Schematics
|
Never infer a current style-file name by changing the year in an old filename. Never present a generic scaffold as an official venue template.
|
||||||
|
|
||||||
**When creating documents with this skill, always consider adding scientific diagrams and schematics to enhance visual communication.**
|
## When to Use
|
||||||
|
|
||||||
If your document does not already contain schematics or diagrams:
|
Use this skill for:
|
||||||
- Use the **scientific-schematics** skill to generate AI-powered publication-quality diagrams
|
|
||||||
- Simply describe your desired diagram in natural language
|
|
||||||
- Nano Banana Pro will automatically generate, review, and refine the schematic
|
|
||||||
|
|
||||||
**For new documents:** Scientific schematics should be generated by default to visually represent key concepts, workflows, architectures, or relationships described in the text.
|
- locating official journal or conference author instructions;
|
||||||
|
- checking page limits, required sections, anonymity, supplemental-material rules, or citation style;
|
||||||
|
- choosing and adapting a bundled LaTeX scaffold;
|
||||||
|
- preparing NSF, NIH, DOE, DARPA, or foundation proposal documents;
|
||||||
|
- designing a research poster after checking event-specific dimensions;
|
||||||
|
- adapting prose to a venue's audience and reviewer expectations; or
|
||||||
|
- inspecting a PDF's page count and embedded fonts.
|
||||||
|
|
||||||
**How to generate schematics:**
|
## Verification-First Workflow
|
||||||
```bash
|
|
||||||
python scripts/generate_schematic.py "your diagram description" -o figures/output.png
|
### 1. Resolve the exact target
|
||||||
|
|
||||||
|
Ask for or derive:
|
||||||
|
|
||||||
|
- venue or funding agency;
|
||||||
|
- year/cycle and track;
|
||||||
|
- document type, such as research article, short paper, main track, R01, or R21;
|
||||||
|
- submission stage; and
|
||||||
|
- authoring format, such as LaTeX or Word.
|
||||||
|
|
||||||
|
Do not combine rules from similarly named venues or tracks.
|
||||||
|
|
||||||
|
### 2. Consult the right reference
|
||||||
|
|
||||||
|
| Need | Reference |
|
||||||
|
|---|---|
|
||||||
|
| Journal submission and official publisher resources | `references/journals_formatting.md` |
|
||||||
|
| Conference rules and 2026 verified snapshots | `references/conferences_formatting.md` |
|
||||||
|
| Poster sizes, layout, and accessibility | `references/posters_guidelines.md` |
|
||||||
|
| NSF, NIH, DOE, DARPA, and foundation proposals | `references/grants_requirements.md` |
|
||||||
|
| Cross-venue writing comparison | `references/venue_writing_styles.md` |
|
||||||
|
| Nature and Science writing | `references/nature_science_style.md` |
|
||||||
|
| Cell Press writing | `references/cell_press_style.md` |
|
||||||
|
| Medical journal writing | `references/medical_journal_styles.md` |
|
||||||
|
| ML and computer-vision conference writing | `references/ml_conference_style.md` |
|
||||||
|
| ACL, EMNLP, CHI, and other CS writing | `references/cs_conference_style.md` |
|
||||||
|
| Review criteria and rebuttals | `references/reviewer_expectations.md` |
|
||||||
|
|
||||||
|
Reference files summarize rules but do not override the current official source.
|
||||||
|
|
||||||
|
### 3. Capture a compliance note
|
||||||
|
|
||||||
|
Before editing, write a short note in the working document or task log:
|
||||||
|
|
||||||
|
```text
|
||||||
|
Target: ICML 2026 main track, initial submission
|
||||||
|
Official source: https://icml.cc/Conferences/2026/AuthorInstructions
|
||||||
|
Checked: 2026-07-20
|
||||||
|
Main-text limit: 8 pages
|
||||||
|
References/appendices: additional pages allowed in the same PDF
|
||||||
|
Anonymity: required
|
||||||
|
Official template: ICML 2026 style package linked by the author instructions
|
||||||
```
|
```
|
||||||
|
|
||||||
The AI will automatically:
|
This makes later validation reproducible.
|
||||||
- Create publication-quality images with proper formatting
|
|
||||||
- Review and refine through multiple iterations
|
|
||||||
- Ensure accessibility (colorblind-friendly, high contrast)
|
|
||||||
- Save outputs in the figures/ directory
|
|
||||||
|
|
||||||
**When to add schematics:**
|
### 4. Start from the official template
|
||||||
- Methodology flowcharts for papers
|
|
||||||
- Conceptual framework diagrams
|
|
||||||
- System architecture illustrations
|
|
||||||
- Data flow diagrams
|
|
||||||
- Experimental design visualizations
|
|
||||||
- Research workflow diagrams
|
|
||||||
- Any complex concept that benefits from visualization
|
|
||||||
|
|
||||||
For detailed guidance on creating schematics, refer to the scientific-schematics skill documentation.
|
For annual conferences and publisher-managed workflows:
|
||||||
|
|
||||||
---
|
1. Download the template from the official source.
|
||||||
|
2. Keep its class/style files unchanged.
|
||||||
|
3. Add content without overriding margins, font sizes, spacing, or headers.
|
||||||
|
4. Use a bundled scaffold only for drafting or when the official source explicitly permits it.
|
||||||
|
|
||||||
## Core Capabilities
|
For grants, many components are entered or uploaded separately. Do not submit a combined bundled `.tex` file as if it were an agency-issued form.
|
||||||
|
|
||||||
### 1. Journal Article Templates
|
### 5. Validate manually and mechanically
|
||||||
|
|
||||||
Access LaTeX templates and formatting guidelines for 50+ major scientific journals across disciplines:
|
Verify at least:
|
||||||
|
|
||||||
**Nature Portfolio**:
|
- main-text and total-file page rules;
|
||||||
- Nature, Nature Methods, Nature Biotechnology, Nature Machine Intelligence
|
- font, margin, line-spacing, and paper-size rules;
|
||||||
- Nature Communications, Nature Protocols
|
- anonymity and metadata;
|
||||||
- Scientific Reports
|
- required sections, statements, checklists, and disclosures;
|
||||||
|
- figure/table placement and accessibility;
|
||||||
|
- reference and supplemental-material treatment; and
|
||||||
|
- source-package and PDF requirements.
|
||||||
|
|
||||||
**Science Family**:
|
The helper can inspect page totals and embedded fonts, but it cannot prove that margins, font sizes, excluded sections, or hidden metadata comply.
|
||||||
- Science, Science Advances, Science Translational Medicine
|
|
||||||
- Science Immunology, Science Robotics
|
|
||||||
|
|
||||||
**PLOS (Public Library of Science)**:
|
## Bundled Assets
|
||||||
- PLOS ONE, PLOS Biology, PLOS Computational Biology
|
|
||||||
- PLOS Medicine, PLOS Genetics
|
|
||||||
|
|
||||||
**Cell Press**:
|
The repository intentionally bundles only the following templates. Other venues listed in references require an official external template.
|
||||||
- Cell, Neuron, Immunity, Cell Reports
|
|
||||||
- Molecular Cell, Developmental Cell
|
|
||||||
|
|
||||||
**IEEE Publications**:
|
### Journal and conference scaffolds
|
||||||
- IEEE Transactions (various disciplines)
|
|
||||||
- IEEE Access, IEEE Journal templates
|
|
||||||
|
|
||||||
**ACM Publications**:
|
| File | Status |
|
||||||
- ACM Transactions, Communications of the ACM
|
|---|---|
|
||||||
- ACM conference proceedings
|
| `assets/journals/nature_article.tex` | Generic Nature-oriented writing scaffold; not an official Nature template |
|
||||||
|
| `assets/journals/plos_one.tex` | PLOS ONE-oriented scaffold; compare with the current official PLOS LaTeX package |
|
||||||
|
| `assets/journals/neurips_article.tex` | NeurIPS 2026 wrapper; requires the official `neurips_2026.sty` |
|
||||||
|
| `assets/journals/elsarticle-template-num.tex` | Elsevier `elsarticle` numeric example |
|
||||||
|
| `assets/journals/elsarticle-template-num-names.tex` | Elsevier `elsarticle` numbered/name example |
|
||||||
|
| `assets/journals/elsarticle-template-harv.tex` | Elsevier `elsarticle` author-year example |
|
||||||
|
|
||||||
**Other Major Publishers**:
|
The matching Elsevier `.bst` files are in `assets/journals/`.
|
||||||
- Springer journals (various disciplines)
|
|
||||||
- Elsevier journals (custom templates)
|
|
||||||
- Wiley journals
|
|
||||||
- BMC journals
|
|
||||||
- Frontiers journals
|
|
||||||
|
|
||||||
### 2. Conference Paper Templates
|
### Grant scaffolds
|
||||||
|
|
||||||
Conference-specific templates with proper formatting for major academic conferences:
|
| File | Status |
|
||||||
|
|---|---|
|
||||||
|
| `assets/grants/nsf_proposal_template.tex` | Planning scaffold for common NSF narrative components; upload components separately |
|
||||||
|
| `assets/grants/nih_specific_aims.tex` | Writing scaffold for a one-page NIH Specific Aims attachment |
|
||||||
|
|
||||||
**Machine Learning & AI**:
|
Use SciENcv and agency-provided common forms where required. Do not recreate biosketch or current-support forms in LaTeX.
|
||||||
- NeurIPS (Neural Information Processing Systems)
|
|
||||||
- ICML (International Conference on Machine Learning)
|
|
||||||
- ICLR (International Conference on Learning Representations)
|
|
||||||
- CVPR (Computer Vision and Pattern Recognition)
|
|
||||||
- AAAI (Association for the Advancement of Artificial Intelligence)
|
|
||||||
|
|
||||||
**Computer Science**:
|
### Poster scaffold
|
||||||
- ACM CHI (Human-Computer Interaction)
|
|
||||||
- SIGKDD (Knowledge Discovery and Data Mining)
|
|
||||||
- EMNLP (Empirical Methods in Natural Language Processing)
|
|
||||||
- SIGIR (Information Retrieval)
|
|
||||||
- USENIX conferences
|
|
||||||
|
|
||||||
**Biology & Bioinformatics**:
|
| File | Status |
|
||||||
- ISMB (Intelligent Systems for Molecular Biology)
|
|---|---|
|
||||||
- RECOMB (Research in Computational Molecular Biology)
|
| `assets/posters/beamerposter_academic.tex` | Venue-agnostic beamerposter scaffold; set dimensions from the event's current presenter instructions |
|
||||||
- PSB (Pacific Symposium on Biocomputing)
|
|
||||||
|
|
||||||
**Engineering**:
|
## Common Workflows
|
||||||
- IEEE conference templates (various disciplines)
|
|
||||||
- ASME, AIAA conferences
|
|
||||||
|
|
||||||
### 3. Research Poster Templates
|
### Annual conference paper
|
||||||
|
|
||||||
Academic poster templates for conference presentations:
|
1. Open `references/conferences_formatting.md`.
|
||||||
|
2. Follow the official link for the exact year and track.
|
||||||
|
3. Download the official author kit.
|
||||||
|
4. Draft in the official template.
|
||||||
|
5. Keep identifying information out of every submitted file when review is blind.
|
||||||
|
6. Check the paper checklist, supplement, rebuttal, and camera-ready rules separately.
|
||||||
|
|
||||||
**Standard Formats**:
|
For NeurIPS 2026, the bundled wrapper can be copied after downloading the official style file:
|
||||||
- A0 (841 × 1189 mm / 33.1 × 46.8 in)
|
|
||||||
- A1 (594 × 841 mm / 23.4 × 33.1 in)
|
|
||||||
- 36" × 48" (914 × 1219 mm) - Common US size
|
|
||||||
- 42" × 56" (1067 × 1422 mm)
|
|
||||||
- 48" × 36" (landscape orientation)
|
|
||||||
|
|
||||||
**Template Packages**:
|
|
||||||
- **beamerposter**: Classic academic poster template
|
|
||||||
- **tikzposter**: Modern, colorful poster design
|
|
||||||
- **baposter**: Structured multi-column layout
|
|
||||||
|
|
||||||
**Design Features**:
|
|
||||||
- Optimal font sizes for readability at distance
|
|
||||||
- Color schemes (colorblind-safe palettes)
|
|
||||||
- Grid layouts and column structures
|
|
||||||
- QR code integration for supplementary materials
|
|
||||||
|
|
||||||
### 4. Grant Proposal Templates
|
|
||||||
|
|
||||||
Templates and formatting requirements for major funding agencies:
|
|
||||||
|
|
||||||
**NSF (National Science Foundation)**:
|
|
||||||
- Full proposal template (15-page project description)
|
|
||||||
- Project Summary (1 page: Overview, Intellectual Merit, Broader Impacts)
|
|
||||||
- Budget and budget justification
|
|
||||||
- Biographical sketch (3-page limit)
|
|
||||||
- Facilities, Equipment, and Other Resources
|
|
||||||
- Data Management Plan
|
|
||||||
|
|
||||||
**NIH (National Institutes of Health)**:
|
|
||||||
- R01 Research Grant (multi-year)
|
|
||||||
- R21 Exploratory/Developmental Grant
|
|
||||||
- K Awards (Career Development)
|
|
||||||
- Specific Aims Page (1 page, most critical component)
|
|
||||||
- Research Strategy (Significance, Innovation, Approach)
|
|
||||||
- Biographical sketches (5-page limit)
|
|
||||||
|
|
||||||
**DOE (Department of Energy)**:
|
|
||||||
- Office of Science proposals
|
|
||||||
- ARPA-E templates
|
|
||||||
- Technology Readiness Level (TRL) descriptions
|
|
||||||
- Commercialization and impact sections
|
|
||||||
|
|
||||||
**DARPA (Defense Advanced Research Projects Agency)**:
|
|
||||||
- BAA (Broad Agency Announcement) responses
|
|
||||||
- Heilmeier Catechism framework
|
|
||||||
- Technical approach and milestones
|
|
||||||
- Transition planning
|
|
||||||
|
|
||||||
**Private Foundations**:
|
|
||||||
- Gates Foundation
|
|
||||||
- Wellcome Trust
|
|
||||||
- Howard Hughes Medical Institute (HHMI)
|
|
||||||
- Chan Zuckerberg Initiative (CZI)
|
|
||||||
|
|
||||||
## Workflow: Finding and Using Templates
|
|
||||||
|
|
||||||
### Step 1: Identify Target Venue
|
|
||||||
|
|
||||||
Determine the specific publication venue, conference, or funding agency:
|
|
||||||
|
|
||||||
```
|
|
||||||
Example queries:
|
|
||||||
- "I need to submit to Nature"
|
|
||||||
- "What are the requirements for NeurIPS 2025?"
|
|
||||||
- "Show me NSF proposal formatting"
|
|
||||||
- "I'm creating a poster for ISMB"
|
|
||||||
```
|
|
||||||
|
|
||||||
### Step 2: Query Template and Requirements
|
|
||||||
|
|
||||||
Access venue-specific templates and formatting guidelines:
|
|
||||||
|
|
||||||
**For Journals**:
|
|
||||||
```bash
|
|
||||||
# Load journal formatting requirements
|
|
||||||
Reference: references/journals_formatting.md
|
|
||||||
Search for: "Nature" or specific journal name
|
|
||||||
|
|
||||||
# Retrieve template
|
|
||||||
Template: assets/journals/nature_article.tex
|
|
||||||
```
|
|
||||||
|
|
||||||
**For Conferences**:
|
|
||||||
```bash
|
|
||||||
# Load conference formatting
|
|
||||||
Reference: references/conferences_formatting.md
|
|
||||||
Search for: "NeurIPS" or specific conference
|
|
||||||
|
|
||||||
# Retrieve template
|
|
||||||
Template: assets/journals/neurips_article.tex
|
|
||||||
```
|
|
||||||
|
|
||||||
**For Posters**:
|
|
||||||
```bash
|
|
||||||
# Load poster guidelines
|
|
||||||
Reference: references/posters_guidelines.md
|
|
||||||
|
|
||||||
# Retrieve template
|
|
||||||
Template: assets/posters/beamerposter_academic.tex
|
|
||||||
```
|
|
||||||
|
|
||||||
**For Grants**:
|
|
||||||
```bash
|
|
||||||
# Load grant requirements
|
|
||||||
Reference: references/grants_requirements.md
|
|
||||||
Search for: "NSF" or specific agency
|
|
||||||
|
|
||||||
# Retrieve template
|
|
||||||
Template: assets/grants/nsf_proposal_template.tex
|
|
||||||
```
|
|
||||||
|
|
||||||
### Step 3: Review Formatting Requirements
|
|
||||||
|
|
||||||
Check critical specifications before customizing:
|
|
||||||
|
|
||||||
**Key Requirements to Verify**:
|
|
||||||
- Page limits (varies by venue)
|
|
||||||
- Font size and family
|
|
||||||
- Margin specifications
|
|
||||||
- Line spacing
|
|
||||||
- Citation style (APA, Vancouver, Nature, etc.)
|
|
||||||
- Figure/table requirements
|
|
||||||
- File format (PDF, Word, LaTeX source)
|
|
||||||
- Anonymization (for double-blind review)
|
|
||||||
- Supplementary material limits
|
|
||||||
|
|
||||||
### Step 4: Customize Template
|
|
||||||
|
|
||||||
Use helper scripts or manual customization:
|
|
||||||
|
|
||||||
**Option 1: Helper Script (Recommended)**:
|
|
||||||
```bash
|
```bash
|
||||||
python scripts/customize_template.py \
|
python scripts/customize_template.py \
|
||||||
--template assets/journals/nature_article.tex \
|
--template neurips_article.tex \
|
||||||
--title "Your Paper Title" \
|
--output my_neurips_2026_paper.tex
|
||||||
--authors "First Author, Second Author" \
|
|
||||||
--affiliations "University Name" \
|
|
||||||
--output my_nature_paper.tex
|
|
||||||
```
|
```
|
||||||
|
|
||||||
**Option 2: Manual Editing**:
|
### Journal manuscript
|
||||||
- Open template file
|
|
||||||
- Replace placeholder text (marked with comments)
|
|
||||||
- Fill in title, authors, affiliations, abstract
|
|
||||||
- Add your content to each section
|
|
||||||
|
|
||||||
### Step 5: Validate Format
|
1. Resolve the exact journal and article type.
|
||||||
|
2. Determine whether initial submission is format-flexible.
|
||||||
|
3. Use the journal's official template or submission format when required.
|
||||||
|
4. Apply the appropriate writing-style reference.
|
||||||
|
5. Recheck final-production instructions only after acceptance or revision.
|
||||||
|
|
||||||
Check compliance with venue requirements:
|
Do not apply a publisher-wide template when the journal provides its own Guide for Authors.
|
||||||
|
|
||||||
```bash
|
### Grant proposal
|
||||||
python scripts/validate_format.py \
|
|
||||||
--file my_paper.pdf \
|
|
||||||
--venue "Nature" \
|
|
||||||
--check-all
|
|
||||||
```
|
|
||||||
|
|
||||||
**Validation Checks**:
|
1. Read the solicitation or NOFO before general agency guidance.
|
||||||
- Page count within limits
|
2. Confirm the effective policy guide and form set.
|
||||||
- Font sizes correct
|
3. Map every required component to its page limit and upload field.
|
||||||
- Margins meet specifications
|
4. Use agency systems and common forms for biosketches and support disclosures.
|
||||||
- References formatted correctly
|
5. Use bundled `.tex` files only as drafting aids.
|
||||||
- Figures meet resolution requirements
|
6. Have the institution's sponsored-research office review the final package.
|
||||||
|
|
||||||
### Step 6: Compile and Review
|
### Research poster
|
||||||
|
|
||||||
Compile LaTeX and review output:
|
1. Read the event's presenter instructions.
|
||||||
|
2. Confirm physical dimensions, orientation, file format, and upload deadline.
|
||||||
```bash
|
3. Set the poster dimensions in the scaffold.
|
||||||
# Compile LaTeX
|
4. Use readable type, high contrast, color-independent encodings, and a logical reading order.
|
||||||
pdflatex my_paper.tex
|
5. Export and inspect the PDF at final size.
|
||||||
bibtex my_paper
|
|
||||||
pdflatex my_paper.tex
|
|
||||||
pdflatex my_paper.tex
|
|
||||||
|
|
||||||
# Or use latexmk for automated compilation
|
|
||||||
latexmk -pdf my_paper.tex
|
|
||||||
```
|
|
||||||
|
|
||||||
Review checklist:
|
|
||||||
- [ ] All sections present and properly formatted
|
|
||||||
- [ ] Citations render correctly
|
|
||||||
- [ ] Figures appear with proper captions
|
|
||||||
- [ ] Page count within limits
|
|
||||||
- [ ] Author guidelines followed
|
|
||||||
- [ ] Supplementary materials prepared (if needed)
|
|
||||||
|
|
||||||
## Integration with Other Skills
|
|
||||||
|
|
||||||
This skill works seamlessly with other scientific skills:
|
|
||||||
|
|
||||||
### Scientific Writing
|
|
||||||
- Use **scientific-writing** skill for content guidance (IMRaD structure, clarity, precision)
|
|
||||||
- Apply venue-specific templates from this skill for formatting
|
|
||||||
- Combine for complete manuscript preparation
|
|
||||||
|
|
||||||
### Literature Review
|
|
||||||
- Use **literature-review** skill for systematic literature search and synthesis
|
|
||||||
- Apply appropriate citation style from venue requirements
|
|
||||||
- Format references according to template specifications
|
|
||||||
|
|
||||||
### Peer Review
|
|
||||||
- Use **peer-review** skill to evaluate manuscript quality
|
|
||||||
- Use this skill to verify formatting compliance
|
|
||||||
- Ensure adherence to reporting guidelines (CONSORT, STROBE, etc.)
|
|
||||||
|
|
||||||
### Research Grants
|
|
||||||
- Cross-reference with **research-grants** skill for content strategy
|
|
||||||
- Use this skill for agency-specific templates and formatting
|
|
||||||
- Combine for comprehensive grant proposal preparation
|
|
||||||
|
|
||||||
### LaTeX Posters
|
|
||||||
- This skill provides venue-agnostic poster templates
|
|
||||||
- Use for conference-specific poster requirements
|
|
||||||
- Integrate with visualization skills for figure creation
|
|
||||||
|
|
||||||
## Template Categories
|
|
||||||
|
|
||||||
### By Document Type
|
|
||||||
|
|
||||||
| Category | Template Count | Common Venues |
|
|
||||||
|----------|---------------|---------------|
|
|
||||||
| **Journal Articles** | 30+ | Nature, Science, PLOS, IEEE, ACM, Cell Press |
|
|
||||||
| **Conference Papers** | 20+ | NeurIPS, ICML, CVPR, CHI, ISMB |
|
|
||||||
| **Research Posters** | 10+ | A0, A1, 36×48, various packages |
|
|
||||||
| **Grant Proposals** | 15+ | NSF, NIH, DOE, DARPA, foundations |
|
|
||||||
|
|
||||||
### By Discipline
|
|
||||||
|
|
||||||
| Discipline | Supported Venues |
|
|
||||||
|------------|------------------|
|
|
||||||
| **Life Sciences** | Nature, Cell Press, PLOS, ISMB, RECOMB |
|
|
||||||
| **Physical Sciences** | Science, Physical Review, ACS, APS |
|
|
||||||
| **Engineering** | IEEE, ASME, AIAA, ACM |
|
|
||||||
| **Computer Science** | ACM, IEEE, NeurIPS, ICML, ICLR |
|
|
||||||
| **Medicine** | NEJM, Lancet, JAMA, BMJ |
|
|
||||||
| **Interdisciplinary** | PNAS, Nature Communications, Science Advances |
|
|
||||||
|
|
||||||
## Helper Scripts
|
## Helper Scripts
|
||||||
|
|
||||||
### query_template.py
|
Run scripts from the skill directory.
|
||||||
|
|
||||||
Search and retrieve templates by venue name, type, or keywords:
|
### List bundled templates
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Find templates for a specific journal
|
|
||||||
python scripts/query_template.py --venue "Nature" --type "article"
|
|
||||||
|
|
||||||
# Search by keyword
|
|
||||||
python scripts/query_template.py --keyword "machine learning"
|
|
||||||
|
|
||||||
# List all available templates
|
|
||||||
python scripts/query_template.py --list-all
|
python scripts/query_template.py --list-all
|
||||||
|
python scripts/query_template.py --venue NeurIPS --requirements
|
||||||
# Get requirements for a venue
|
python scripts/query_template.py --type grants
|
||||||
python scripts/query_template.py --venue "NeurIPS" --requirements
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### customize_template.py
|
The query helper reports only assets that exist in this skill and includes source/currency notes.
|
||||||
|
|
||||||
Customize templates with author and project information:
|
### Copy and customize a scaffold
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Basic customization
|
|
||||||
python scripts/customize_template.py \
|
python scripts/customize_template.py \
|
||||||
--template assets/journals/nature_article.tex \
|
--template nature_article.tex \
|
||||||
|
--title "Your Paper Title" \
|
||||||
|
--authors "First Author, Second Author" \
|
||||||
|
--affiliations "Institution Name" \
|
||||||
--output my_paper.tex
|
--output my_paper.tex
|
||||||
|
|
||||||
# With author information
|
|
||||||
python scripts/customize_template.py \
|
|
||||||
--template assets/journals/nature_article.tex \
|
|
||||||
--title "Novel Approach to Protein Folding" \
|
|
||||||
--authors "Jane Doe, John Smith, Alice Johnson" \
|
|
||||||
--affiliations "MIT, Stanford, Harvard" \
|
|
||||||
--email "[email protected]" \
|
|
||||||
--output my_paper.tex
|
|
||||||
|
|
||||||
# Interactive mode
|
|
||||||
python scripts/customize_template.py --interactive
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### validate_format.py
|
Review every replacement and compile before adding substantial content. User-provided text may need LaTeX escaping.
|
||||||
|
|
||||||
Check document compliance with venue requirements:
|
### Inspect a PDF
|
||||||
|
|
||||||
|
Use a verified preset:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Validate a compiled PDF
|
|
||||||
python scripts/validate_format.py \
|
python scripts/validate_format.py \
|
||||||
--file my_paper.pdf \
|
--file paper.pdf \
|
||||||
--venue "Nature" \
|
--venue icml-2026 \
|
||||||
--check-all
|
--content-pages 8 \
|
||||||
|
--check page-count,fonts
|
||||||
|
```
|
||||||
|
|
||||||
# Check specific aspects
|
Or provide an explicit limit and source:
|
||||||
|
|
||||||
|
```bash
|
||||||
python scripts/validate_format.py \
|
python scripts/validate_format.py \
|
||||||
--file my_paper.pdf \
|
--file proposal.pdf \
|
||||||
--venue "NeurIPS" \
|
--max-pages 15 \
|
||||||
--check page-count,margins,fonts
|
--content-pages 15 \
|
||||||
|
--source-url "https://www.nsf.gov/policies/pappg" \
|
||||||
# Generate validation report
|
--check page-count,fonts \
|
||||||
python scripts/validate_format.py \
|
--report validation.txt
|
||||||
--file my_paper.pdf \
|
|
||||||
--venue "Science" \
|
|
||||||
--report validation_report.txt
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Best Practices
|
`--content-pages` must be counted according to the official rule. The script does not infer where references or appendices begin.
|
||||||
|
|
||||||
### Template Selection
|
## Final Compliance Checklist
|
||||||
1. **Verify currency**: Check template date and compare with latest author guidelines
|
|
||||||
2. **Check official sources**: Many journals provide official LaTeX classes
|
|
||||||
3. **Test compilation**: Compile template before adding content
|
|
||||||
4. **Read comments**: Templates include helpful inline comments
|
|
||||||
|
|
||||||
### Customization
|
- [ ] Exact venue, year/cycle, track, article type, and stage identified
|
||||||
1. **Preserve structure**: Don't remove required sections or packages
|
- [ ] Official source URL recorded with date checked
|
||||||
2. **Follow placeholders**: Replace marked placeholder text systematically
|
- [ ] Official template or form used where required
|
||||||
3. **Maintain formatting**: Don't override venue-specific formatting
|
- [ ] Page-limit scope understood, including excluded sections
|
||||||
4. **Keep backups**: Save original template before customization
|
- [ ] Required statements, checklists, and disclosures present
|
||||||
|
- [ ] Blind-review files and PDF metadata checked for identity leaks
|
||||||
|
- [ ] Figures and tables are legible and accessible
|
||||||
|
- [ ] References, appendices, and supplements follow current rules
|
||||||
|
- [ ] PDF and source package compile cleanly
|
||||||
|
- [ ] Submission portal preview reviewed before final submission
|
||||||
|
|
||||||
### Compliance
|
## Maintenance
|
||||||
1. **Check page limits**: Verify before final submission
|
|
||||||
2. **Validate citations**: Use correct citation style for venue
|
|
||||||
3. **Test figures**: Ensure figures meet resolution requirements
|
|
||||||
4. **Review anonymization**: Remove identifying information if required
|
|
||||||
|
|
||||||
### Submission
|
|
||||||
1. **Follow instructions**: Read complete author guidelines
|
|
||||||
2. **Include all files**: LaTeX source, figures, bibliography
|
|
||||||
3. **Generate properly**: Use recommended compilation method
|
|
||||||
4. **Check output**: Verify PDF matches expectations
|
|
||||||
|
|
||||||
## Common Formatting Requirements
|
|
||||||
|
|
||||||
### Page Limits (Typical)
|
|
||||||
|
|
||||||
| Venue Type | Typical Limit | Notes |
|
|
||||||
|------------|---------------|-------|
|
|
||||||
| **Nature Article** | 5 pages | ~3000 words excluding refs |
|
|
||||||
| **Science Report** | 5 pages | Figures count toward limit |
|
|
||||||
| **PLOS ONE** | No limit | Unlimited length |
|
|
||||||
| **NeurIPS** | 8 pages | + unlimited refs/appendix |
|
|
||||||
| **ICML** | 8 pages | + unlimited refs/appendix |
|
|
||||||
| **NSF Proposal** | 15 pages | Project description only |
|
|
||||||
| **NIH R01** | 12 pages | Research strategy |
|
|
||||||
|
|
||||||
### Citation Styles by Venue
|
|
||||||
|
|
||||||
| Venue | Citation Style | Format |
|
|
||||||
|-------|---------------|--------|
|
|
||||||
| **Nature** | Numbered (superscript) | Nature style |
|
|
||||||
| **Science** | Numbered (superscript) | Science style |
|
|
||||||
| **PLOS** | Numbered (brackets) | Vancouver |
|
|
||||||
| **Cell Press** | Author-year | Cell style |
|
|
||||||
| **ACM** | Numbered | ACM style |
|
|
||||||
| **IEEE** | Numbered (brackets) | IEEE style |
|
|
||||||
| **APA journals** | Author-year | APA 7th |
|
|
||||||
|
|
||||||
### Figure Requirements
|
|
||||||
|
|
||||||
| Venue | Resolution | Format | Color |
|
|
||||||
|-------|-----------|--------|-------|
|
|
||||||
| **Nature** | 300+ dpi | TIFF, EPS, PDF | RGB or CMYK |
|
|
||||||
| **Science** | 300+ dpi | TIFF, PDF | RGB |
|
|
||||||
| **PLOS** | 300-600 dpi | TIFF, EPS | RGB |
|
|
||||||
| **IEEE** | 300+ dpi | EPS, PDF | RGB or Grayscale |
|
|
||||||
|
|
||||||
## Writing Style Guides
|
|
||||||
|
|
||||||
Beyond formatting, this skill provides comprehensive **writing style guides** that capture how papers should *read* at different venues—not just how they should look.
|
|
||||||
|
|
||||||
### Why Style Matters
|
|
||||||
|
|
||||||
The same research written for Nature will read very differently than when written for NeurIPS:
|
|
||||||
- **Nature/Science**: Accessible to non-specialists, story-driven, broad significance
|
|
||||||
- **Cell Press**: Mechanistic depth, comprehensive data, graphical abstract required
|
|
||||||
- **Medical journals**: Patient-centered, evidence-graded, structured abstracts
|
|
||||||
- **ML conferences**: Contribution bullets, ablation studies, reproducibility focus
|
|
||||||
- **CS conferences**: Field-specific conventions, varying evaluation standards
|
|
||||||
|
|
||||||
### Available Style Guides
|
|
||||||
|
|
||||||
| Guide | Covers | Key Topics |
|
|
||||||
|-------|--------|------------|
|
|
||||||
| `venue_writing_styles.md` | Master overview | Style spectrum, quick reference |
|
|
||||||
| `nature_science_style.md` | Nature, Science, PNAS | Accessibility, story-telling, broad impact |
|
|
||||||
| `cell_press_style.md` | Cell, Neuron, Immunity | Graphical abstracts, eTOC, Highlights |
|
|
||||||
| `medical_journal_styles.md` | NEJM, Lancet, JAMA, BMJ | Structured abstracts, evidence language |
|
|
||||||
| `ml_conference_style.md` | NeurIPS, ICML, ICLR, CVPR | Contribution bullets, ablations |
|
|
||||||
| `cs_conference_style.md` | ACL, EMNLP, CHI, SIGKDD | Field-specific conventions |
|
|
||||||
| `reviewer_expectations.md` | All venues | What reviewers look for, rebuttal tips |
|
|
||||||
|
|
||||||
### Writing Examples
|
|
||||||
|
|
||||||
Concrete examples are available in `assets/examples/`:
|
|
||||||
- `nature_abstract_examples.md`: Flowing paragraph abstracts for high-impact journals
|
|
||||||
- `neurips_introduction_example.md`: ML conference intro with contribution bullets
|
|
||||||
- `cell_summary_example.md`: Cell Press Summary, Highlights, eTOC format
|
|
||||||
- `medical_structured_abstract.md`: NEJM, Lancet, JAMA structured format
|
|
||||||
|
|
||||||
### Workflow: Adapting to a Venue
|
|
||||||
|
|
||||||
1. **Identify target venue** and load the appropriate style guide
|
|
||||||
2. **Review writing conventions**: Tone, voice, abstract format, structure
|
|
||||||
3. **Check examples** for section-specific guidance
|
|
||||||
4. **Review expectations**: What do reviewers at this venue prioritize?
|
|
||||||
5. **Apply formatting**: Use LaTeX template from `assets/`
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Resources
|
|
||||||
|
|
||||||
### Bundled Resources
|
|
||||||
|
|
||||||
**Writing Style Guides** (in `references/`):
|
|
||||||
- `venue_writing_styles.md`: Master style overview and comparison
|
|
||||||
- `nature_science_style.md`: Nature/Science writing conventions
|
|
||||||
- `cell_press_style.md`: Cell Press journal style
|
|
||||||
- `medical_journal_styles.md`: Medical journal writing guide
|
|
||||||
- `ml_conference_style.md`: ML conference writing conventions
|
|
||||||
- `cs_conference_style.md`: CS conference writing guide
|
|
||||||
- `reviewer_expectations.md`: What reviewers look for by venue
|
|
||||||
|
|
||||||
**Formatting Requirements** (in `references/`):
|
|
||||||
- `journals_formatting.md`: Comprehensive journal formatting requirements
|
|
||||||
- `conferences_formatting.md`: Conference paper specifications
|
|
||||||
- `posters_guidelines.md`: Research poster design and sizing
|
|
||||||
- `grants_requirements.md`: Grant proposal requirements by agency
|
|
||||||
|
|
||||||
**Writing Examples** (in `assets/examples/`):
|
|
||||||
- `nature_abstract_examples.md`: High-impact journal abstract examples
|
|
||||||
- `neurips_introduction_example.md`: ML conference introduction format
|
|
||||||
- `cell_summary_example.md`: Cell Press Summary/Highlights/eTOC
|
|
||||||
- `medical_structured_abstract.md`: NEJM/Lancet/JAMA abstract format
|
|
||||||
|
|
||||||
**Templates** (in `assets/`):
|
|
||||||
- `journals/`: Journal article LaTeX templates
|
|
||||||
- `posters/`: Research poster templates
|
|
||||||
- `grants/`: Grant proposal templates
|
|
||||||
|
|
||||||
**Scripts** (in `scripts/`):
|
|
||||||
- `query_template.py`: Search and retrieve templates
|
|
||||||
- `customize_template.py`: Customize with author info
|
|
||||||
- `validate_format.py`: Check compliance with requirements
|
|
||||||
|
|
||||||
### External Resources
|
|
||||||
|
|
||||||
**Journal Author Guidelines**:
|
|
||||||
- Nature: https://www.nature.com/nature/for-authors
|
|
||||||
- Science: https://www.science.org/content/page/instructions-authors
|
|
||||||
- PLOS: https://plos.org/resources/for-authors/
|
|
||||||
- Cell Press: https://www.cell.com/author-guidelines
|
|
||||||
|
|
||||||
**Conference Formatting**:
|
|
||||||
- NeurIPS: https://neurips.cc/Conferences/2024/CallForPapers
|
|
||||||
- ICML: https://icml.cc/Conferences/2024/StyleAuthorInstructions
|
|
||||||
- CVPR: https://cvpr.thecvf.com/Conferences/2024/AuthorGuidelines
|
|
||||||
|
|
||||||
**Grant Resources**:
|
|
||||||
- NSF PAPPG: https://www.nsf.gov/publications/pub_summ.jsp?ods_key=pappg
|
|
||||||
- NIH Forms: https://grants.nih.gov/grants/how-to-apply-application-guide.html
|
|
||||||
- DOE Funding: https://science.osti.gov/grants
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
### Example 1: Nature Article Submission
|
|
||||||
|
|
||||||
```markdown
|
|
||||||
User: "I need to prepare a manuscript for Nature"
|
|
||||||
|
|
||||||
Response:
|
|
||||||
1. Load Nature formatting requirements (references/journals_formatting.md)
|
|
||||||
2. Retrieve Nature template (assets/journals/nature_article.tex)
|
|
||||||
3. Key requirements:
|
|
||||||
- Length: ~3000 words, ~5 pages
|
|
||||||
- Format: Single column, 12pt font
|
|
||||||
- Citations: Numbered superscript (Nature style)
|
|
||||||
- Figures: 300+ dpi, RGB color
|
|
||||||
4. Customize template with your title, authors, affiliations
|
|
||||||
5. Compile and validate against requirements
|
|
||||||
```
|
|
||||||
|
|
||||||
### Example 2: NeurIPS Conference Paper
|
|
||||||
|
|
||||||
```markdown
|
|
||||||
User: "What are the formatting requirements for NeurIPS?"
|
|
||||||
|
|
||||||
Response:
|
|
||||||
From references/conferences_formatting.md:
|
|
||||||
- Page limit: 8 pages main text + unlimited references/appendix
|
|
||||||
- Format: Two-column, 10pt font
|
|
||||||
- Template: neurips_2024.sty (official style file)
|
|
||||||
- Anonymization: Required for initial submission
|
|
||||||
- Citations: Numbered (brackets)
|
|
||||||
- Figures: High resolution, colorblind-safe recommended
|
|
||||||
```
|
|
||||||
|
|
||||||
### Example 3: NSF Proposal
|
|
||||||
|
|
||||||
```markdown
|
|
||||||
User: "Help me format an NSF proposal"
|
|
||||||
|
|
||||||
Response:
|
|
||||||
NSF requirements (from references/grants_requirements.md):
|
|
||||||
- Project Description: 15 pages maximum
|
|
||||||
- Project Summary: 1 page (Overview, Intellectual Merit, Broader Impacts)
|
|
||||||
- Budget Justification: 3-5 pages
|
|
||||||
- Biographical Sketch: 3 pages per senior personnel
|
|
||||||
- Font: Minimum 10pt, Times Roman or similar
|
|
||||||
- Margins: 1 inch all sides
|
|
||||||
Template: assets/grants/nsf_proposal_template.tex
|
|
||||||
```
|
|
||||||
|
|
||||||
### Example 4: Conference Poster
|
|
||||||
|
|
||||||
```markdown
|
|
||||||
User: "I need to create a poster for ISMB"
|
|
||||||
|
|
||||||
Response:
|
|
||||||
ISMB poster specifications:
|
|
||||||
- Size: Typically A0 portrait (33.1 × 46.8 inches)
|
|
||||||
- Recommended template: beamerposter or tikzposter
|
|
||||||
- Font sizes: Title 60-85pt, Headers 36-48pt, Body 24-32pt
|
|
||||||
- Include: QR code for paper/supplementary materials
|
|
||||||
Available templates:
|
|
||||||
- assets/posters/beamerposter_academic.tex
|
|
||||||
```
|
|
||||||
|
|
||||||
## Updates and Maintenance
|
|
||||||
|
|
||||||
**Template Currency**:
|
|
||||||
- Templates updated annually or when venues release new guidelines
|
|
||||||
- Last updated: 2024
|
|
||||||
- Check official venue sites for most current requirements
|
|
||||||
|
|
||||||
**Reporting Issues**:
|
|
||||||
- Template compilation errors
|
|
||||||
- Outdated formatting requirements
|
|
||||||
- Missing venue templates
|
|
||||||
- Incorrect specifications
|
|
||||||
|
|
||||||
## Summary
|
|
||||||
|
|
||||||
The venue-templates skill provides comprehensive access to:
|
|
||||||
|
|
||||||
1. **50+ publication venue templates** across disciplines
|
|
||||||
2. **Detailed formatting requirements** for journals, conferences, posters, grants
|
|
||||||
3. **Helper scripts** for template discovery, customization, and validation
|
|
||||||
4. **Integration** with other scientific writing skills
|
|
||||||
5. **Best practices** for successful academic submissions
|
|
||||||
|
|
||||||
Use this skill whenever you need venue-specific formatting guidance or templates for academic publishing.
|
|
||||||
|
|
||||||
|
This skill was reviewed on 2026-07-20. Annual conference snapshots are labeled with their year. When updating:
|
||||||
|
|
||||||
|
1. replace year-specific claims only after checking official sources;
|
||||||
|
2. avoid adding links to assets that are not bundled;
|
||||||
|
3. keep generic guidance separate from official requirements;
|
||||||
|
4. update helper presets and examples together; and
|
||||||
|
5. increment `metadata.version`.
|
||||||
|
|||||||
+16
-13
@@ -2,9 +2,9 @@
|
|||||||
title: "Cell Press Writing Style Guide"
|
title: "Cell Press Writing Style Guide"
|
||||||
task: ""
|
task: ""
|
||||||
lineage_type: import
|
lineage_type: import
|
||||||
upstream_source: https://github.com/K-Dense-AI/scientific-agent-skills/blob/9c9bd2e9/skills/venue-templates/references/cell_press_style.md
|
upstream_source: https://github.com/K-Dense-AI/scientific-agent-skills/blob/e8727695/skills/venue-templates/references/cell_press_style.md
|
||||||
upstream_sha: 9c9bd2e9
|
upstream_sha: e8727695
|
||||||
imported_at: 2026-06-27
|
imported_at: 2026-07-20
|
||||||
prompt_class: catalogue
|
prompt_class: catalogue
|
||||||
upstream_changes: accepted
|
upstream_changes: accepted
|
||||||
author: upstream
|
author: upstream
|
||||||
@@ -15,7 +15,9 @@ validated: false
|
|||||||
|
|
||||||
Comprehensive writing guide for Cell, Neuron, Immunity, Molecular Cell, Developmental Cell, Cell Reports, and other Cell Press journals.
|
Comprehensive writing guide for Cell, Neuron, Immunity, Molecular Cell, Developmental Cell, Cell Reports, and other Cell Press journals.
|
||||||
|
|
||||||
**Last Updated**: 2024
|
**Reviewed**: 2026-07-20
|
||||||
|
|
||||||
|
Cell Press requirements differ by journal and article type. Verify each front-matter and STAR Methods element in the current author instructions.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -33,15 +35,15 @@ Cell Press journals emphasize **mechanistic depth**, **rigorous experimentation*
|
|||||||
|
|
||||||
## Unique Cell Press Features
|
## Unique Cell Press Features
|
||||||
|
|
||||||
Cell Press has several distinctive elements not found in other journals:
|
Cell Press journals may use several distinctive elements not found in other journals:
|
||||||
|
|
||||||
### 1. Summary (Not Abstract)
|
### 1. Summary (Not Abstract)
|
||||||
|
|
||||||
Cell uses "Summary" instead of "Abstract" - functionally similar but emphasizes synthesis.
|
Cell uses "Summary" instead of "Abstract" - functionally similar but emphasizes synthesis.
|
||||||
|
|
||||||
### 2. Graphical Abstract (REQUIRED)
|
### 2. Graphical Abstract
|
||||||
|
|
||||||
A visual summary appearing on the table of contents. **This is mandatory for all Cell Press journals.**
|
A visual summary for discovery and the table of contents. It is required for some journals and article types; verify the current target-journal instructions.
|
||||||
|
|
||||||
### 3. eTOC Blurb
|
### 3. eTOC Blurb
|
||||||
|
|
||||||
@@ -466,12 +468,13 @@ Nature 479, 232–236.
|
|||||||
|
|
||||||
## Pre-Submission Checklist
|
## Pre-Submission Checklist
|
||||||
|
|
||||||
### Required Elements
|
### Required Elements (verify for the exact journal and article type)
|
||||||
- [ ] Graphical abstract (square format)
|
- [ ] Graphical abstract, if required
|
||||||
- [ ] Highlights (3-4 bullets, ≤85 characters each)
|
- [ ] Highlights, eTOC blurb, and Summary within the current limits
|
||||||
- [ ] eTOC blurb (30-50 words)
|
- [ ] Key Resources Table and STAR Methods components, if required
|
||||||
- [ ] Summary (≤150 words)
|
- [ ] Limitations of the Study
|
||||||
- [ ] Key Resources Table
|
- [ ] Resource Availability and Lead Contact information
|
||||||
|
- [ ] Declaration of generative AI and AI-assisted technologies, when applicable
|
||||||
|
|
||||||
### Content
|
### Content
|
||||||
- [ ] Mechanistic depth throughout
|
- [ ] Mechanistic depth throughout
|
||||||
|
|||||||
+123
-512
@@ -2,9 +2,9 @@
|
|||||||
title: "Conference Formatting Requirements"
|
title: "Conference Formatting Requirements"
|
||||||
task: ""
|
task: ""
|
||||||
lineage_type: import
|
lineage_type: import
|
||||||
upstream_source: https://github.com/K-Dense-AI/scientific-agent-skills/blob/9c9bd2e9/skills/venue-templates/references/conferences_formatting.md
|
upstream_source: https://github.com/K-Dense-AI/scientific-agent-skills/blob/e8727695/skills/venue-templates/references/conferences_formatting.md
|
||||||
upstream_sha: 9c9bd2e9
|
upstream_sha: e8727695
|
||||||
imported_at: 2026-06-27
|
imported_at: 2026-07-20
|
||||||
prompt_class: catalogue
|
prompt_class: catalogue
|
||||||
upstream_changes: accepted
|
upstream_changes: accepted
|
||||||
author: upstream
|
author: upstream
|
||||||
@@ -13,565 +13,176 @@ validated: false
|
|||||||
|
|
||||||
# Conference Formatting Requirements
|
# Conference Formatting Requirements
|
||||||
|
|
||||||
Comprehensive formatting requirements and submission guidelines for major academic conferences across disciplines.
|
Current-year conference rules change independently by track. Use this guide to find the authoritative source and to understand the scope of the rule; do not carry a page limit or style file into another year.
|
||||||
|
|
||||||
**Last Updated**: 2024
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Machine Learning & Artificial Intelligence
|
|
||||||
|
|
||||||
### NeurIPS (Neural Information Processing Systems)
|
|
||||||
|
|
||||||
**Conference Type**: Top-tier machine learning conference
|
|
||||||
**Frequency**: Annual (December)
|
|
||||||
|
|
||||||
**Formatting Requirements**:
|
|
||||||
- **Page Limit**:
|
|
||||||
- Main paper: 8 pages (excluding references)
|
|
||||||
- References: Unlimited
|
|
||||||
- Appendix/Supplementary: Unlimited (optional, reviewed at discretion)
|
|
||||||
- **Format**: Two-column
|
|
||||||
- **Font**: Times or Times New Roman, 10pt for body text
|
|
||||||
- **Line spacing**: Single-spaced
|
|
||||||
- **Margins**: 1 inch (2.54 cm) all sides
|
|
||||||
- **Column separation**: 0.25 inch (0.635 cm)
|
|
||||||
- **Paper size**: US Letter (8.5 × 11 inches)
|
|
||||||
- **Anonymization**: **Required** for initial submission (double-blind review)
|
|
||||||
- Remove author names, affiliations
|
|
||||||
- Anonymize self-citations ("Author et al." → "Anonymous et al.")
|
|
||||||
- Remove acknowledgments revealing identity
|
|
||||||
- **Citations**: Numbered in square brackets [1], [2-4]
|
|
||||||
- **References**: Any consistent style (commonly uses numbered references)
|
|
||||||
- **Figures**:
|
|
||||||
- High resolution (300+ dpi)
|
|
||||||
- Colorblind-friendly palettes recommended
|
|
||||||
- Can span both columns if needed
|
|
||||||
- **Tables**: Clear, readable at publication size
|
|
||||||
- **Equations**: Numbered if referenced
|
|
||||||
- **LaTeX Class**: `neurips_2024.sty` (updated annually)
|
|
||||||
- **Supplementary Materials**:
|
|
||||||
- Code strongly encouraged (GitHub, anonymous repo for review)
|
|
||||||
- Additional experiments, proofs
|
|
||||||
- Not counted toward page limit
|
|
||||||
|
|
||||||
**LaTeX Template**: `assets/journals/neurips_article.tex`
|
|
||||||
|
|
||||||
**Submission Notes**:
|
|
||||||
- Use official style file (changes yearly)
|
|
||||||
- Paper ID on first page (auto-generated during submission)
|
|
||||||
- Include "broader impact" statement (varies by year)
|
|
||||||
- Reproducibility checklist required
|
|
||||||
|
|
||||||
**Website**: https://neurips.cc/
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### ICML (International Conference on Machine Learning)
|
|
||||||
|
|
||||||
**Conference Type**: Top-tier machine learning conference
|
|
||||||
**Frequency**: Annual (July)
|
|
||||||
|
|
||||||
**Formatting Requirements**:
|
|
||||||
- **Page Limit**:
|
|
||||||
- Main paper: 8 pages (excluding references and appendix)
|
|
||||||
- References: Unlimited
|
|
||||||
- Appendix: Unlimited (optional)
|
|
||||||
- **Format**: Two-column
|
|
||||||
- **Font**: Times, 10pt
|
|
||||||
- **Line spacing**: Single-spaced
|
|
||||||
- **Margins**: 1 inch all sides
|
|
||||||
- **Paper size**: US Letter
|
|
||||||
- **Anonymization**: **Required** (double-blind)
|
|
||||||
- **Citations**: Numbered or author-year (consistent style)
|
|
||||||
- **Figures**: High resolution, colorblind-safe recommended
|
|
||||||
- **LaTeX Class**: `icml2024.sty` (updated yearly)
|
|
||||||
- **Supplementary**: Strongly encouraged (code, data, appendix)
|
|
||||||
|
|
||||||
**LaTeX Template**: `assets/journals/icml_article.tex`
|
|
||||||
|
|
||||||
**Submission Notes**:
|
|
||||||
- Must use official ICML style file
|
|
||||||
- Checklist for reproducibility
|
|
||||||
- Ethics statement if applicable
|
|
||||||
|
|
||||||
**Website**: https://icml.cc/
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### ICLR (International Conference on Learning Representations)
|
|
||||||
|
|
||||||
**Conference Type**: Top-tier deep learning conference
|
|
||||||
**Frequency**: Annual (April/May)
|
|
||||||
|
|
||||||
**Formatting Requirements**:
|
|
||||||
- **Page Limit**:
|
|
||||||
- Main paper: 8 pages (excluding references, appendix, ethics statement)
|
|
||||||
- References: Unlimited
|
|
||||||
- Appendix: Unlimited
|
|
||||||
- **Format**: Two-column
|
|
||||||
- **Font**: Times, 10pt
|
|
||||||
- **Anonymization**: **Required** (double-blind)
|
|
||||||
- **Citations**: Numbered [1] or author-year
|
|
||||||
- **LaTeX Class**: `iclr2024_conference.sty`
|
|
||||||
- **Supplementary**: Code and data encouraged (anonymous GitHub)
|
|
||||||
- **Open Review**: Reviews and responses are public post-decision
|
|
||||||
|
|
||||||
**LaTeX Template**: `assets/journals/iclr_article.tex`
|
|
||||||
|
|
||||||
**Unique Features**:
|
|
||||||
- OpenReview platform (transparent review process)
|
|
||||||
- Author-reviewer discussion during review
|
|
||||||
- Camera-ready can exceed 8 pages
|
|
||||||
|
|
||||||
**Website**: https://iclr.cc/
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### CVPR (Computer Vision and Pattern Recognition)
|
|
||||||
|
|
||||||
**Conference Type**: Top-tier computer vision conference
|
|
||||||
**Frequency**: Annual (June)
|
|
||||||
|
|
||||||
**Formatting Requirements**:
|
|
||||||
- **Page Limit**:
|
|
||||||
- Main paper: 8 pages (including figures and tables, excluding references)
|
|
||||||
- References: Unlimited (separate section)
|
|
||||||
- **Format**: Two-column
|
|
||||||
- **Font**: Times Roman, 10pt
|
|
||||||
- **Anonymization**: **Required** (double-blind)
|
|
||||||
- Blur faces in images if needed
|
|
||||||
- Anonymize datasets if they reveal identity
|
|
||||||
- **Paper size**: US Letter
|
|
||||||
- **Citations**: Numbered [1]
|
|
||||||
- **Figures**: High resolution, can be color
|
|
||||||
- **LaTeX Template**: CVPR official template (changes yearly)
|
|
||||||
- **Supplementary Material**:
|
|
||||||
- Video demonstrations encouraged
|
|
||||||
- Additional results, code
|
|
||||||
- 100 MB limit for all supplementary files
|
|
||||||
|
|
||||||
**LaTeX Template**: `assets/journals/cvpr_article.tex`
|
**Reviewed:** 2026-07-20
|
||||||
|
|
||||||
**Website**: https://cvpr.thecvf.com/
|
## How to Use This Guide
|
||||||
|
|
||||||
---
|
For every submission, record:
|
||||||
|
|
||||||
### AAAI (Association for the Advancement of Artificial Intelligence)
|
|
||||||
|
|
||||||
**Conference Type**: Major AI conference
|
|
||||||
**Frequency**: Annual (February)
|
|
||||||
|
|
||||||
**Formatting Requirements**:
|
1. conference year and track;
|
||||||
- **Page Limit**:
|
2. initial, rebuttal, or camera-ready stage;
|
||||||
- Technical papers: 7 pages (excluding references)
|
3. official author-instruction URL and date checked;
|
||||||
- References: Unlimited
|
4. page-limit scope, including references and appendices;
|
||||||
- **Format**: Two-column
|
5. anonymity and external-link policy; and
|
||||||
- **Font**: Times Roman, 10pt
|
6. exact official template package.
|
||||||
- **Anonymization**: **Required** (double-blind)
|
|
||||||
- **Paper size**: US Letter
|
|
||||||
- **Citations**: Various styles accepted (be consistent)
|
|
||||||
- **LaTeX Template**: AAAI official style
|
|
||||||
- **Supplementary**: Optional appendix
|
|
||||||
|
|
||||||
**LaTeX Template**: `assets/journals/aaai_article.tex`
|
|
||||||
|
|
||||||
**Website**: https://aaai.org/conference/aaai/
|
|
||||||
|
|
||||||
---
|
Official instructions and files override every summary below.
|
||||||
|
|
||||||
### IJCAI (International Joint Conference on Artificial Intelligence)
|
## Verified 2026 ML and Vision Snapshots
|
||||||
|
|
||||||
**Conference Type**: Major AI conference
|
### NeurIPS 2026 — Main Track
|
||||||
**Frequency**: Annual
|
|
||||||
|
|
||||||
**Formatting Requirements**:
|
**Official sources**
|
||||||
- **Page Limit**: 7 pages (excluding references)
|
|
||||||
- **Format**: Two-column
|
|
||||||
- **Font**: Times, 10pt
|
|
||||||
- **Anonymization**: **Required**
|
|
||||||
- **LaTeX Template**: IJCAI official style
|
|
||||||
|
|
||||||
---
|
- Call for Papers: https://neurips.cc/Conferences/2026/CallForPapers
|
||||||
|
- Main Track Handbook: https://neurips.cc/Conferences/2026/MainTrackHandbook
|
||||||
|
- Official formatting package: linked from the Call for Papers
|
||||||
|
|
||||||
## Computer Science
|
**Initial submission**
|
||||||
|
|
||||||
### ACM CHI (Human-Computer Interaction)
|
- Up to **9 content pages**, including figures.
|
||||||
|
- Additional pages containing acknowledgments, references, the required paper checklist, and optional technical appendices do not count as content pages.
|
||||||
|
- Omit both the `final` and `preprint` style options; the official style then anonymizes the submission and adds line numbers.
|
||||||
|
- Do not include acknowledgments in the anonymized submission.
|
||||||
|
- The **NeurIPS Paper Checklist is required**; omitting it can cause desk rejection.
|
||||||
|
- Technical appendices may be included after the references. Reviewers are not required to rely on them.
|
||||||
|
|
||||||
**Conference Type**: Premier HCI conference
|
**Template rule**
|
||||||
**Frequency**: Annual (April/May)
|
|
||||||
|
|
||||||
**Formatting Requirements**:
|
Use the exact NeurIPS 2026 package. The bundled `assets/journals/neurips_article.tex` is only a wrapper and requires the official `neurips_2026.sty` and checklist files.
|
||||||
- **Page Limit**:
|
|
||||||
- Papers: 10 pages (excluding references)
|
|
||||||
- Late-Breaking Work: 4 pages
|
|
||||||
- **Format**: Single-column ACM format
|
|
||||||
- **Font**: Depends on ACM template
|
|
||||||
- **Anonymization**: **Required** for Papers track
|
|
||||||
- **LaTeX Class**: `acmart` with CHI proceedings format
|
|
||||||
- **Citations**: ACM style (numbered or author-year)
|
|
||||||
- **Figures**: High quality, accessibility considered
|
|
||||||
- **Accessibility**: Alt text for figures encouraged
|
|
||||||
|
|
||||||
**LaTeX Template**: `assets/journals/chi_article.tex`
|
### ICML 2026 — Main Track
|
||||||
|
|
||||||
**Website**: https://chi.acm.org/
|
**Official sources**
|
||||||
|
|
||||||
---
|
- Author Instructions: https://icml.cc/Conferences/2026/AuthorInstructions
|
||||||
|
- Call for Papers: https://icml.cc/Conferences/2026/CallForPapers
|
||||||
|
- Official style package: https://media.icml.cc/Conferences/ICML2026/Styles/icml2026.zip
|
||||||
|
|
||||||
### SIGKDD (Knowledge Discovery and Data Mining)
|
**Initial submission**
|
||||||
|
|
||||||
**Conference Type**: Top data mining conference
|
- Main body: up to **8 pages**.
|
||||||
**Frequency**: Annual (August)
|
- References and appendices may use additional pages and remain in the same PDF.
|
||||||
|
- Submissions must use LaTeX, be anonymized, and follow the official style.
|
||||||
|
- The camera-ready version permits one extra main-body page.
|
||||||
|
- Material essential to evaluation belongs in the main body; reviewers may decline to read appendices or separate supplements.
|
||||||
|
|
||||||
**Formatting Requirements**:
|
### ICLR 2026
|
||||||
- **Page Limit**:
|
|
||||||
- Research Track: 9 pages (excluding references)
|
|
||||||
- Applied Data Science: 9 pages
|
|
||||||
- **Format**: Two-column
|
|
||||||
- **LaTeX Class**: `acmart` (sigconf format)
|
|
||||||
- **Font**: ACM template default
|
|
||||||
- **Anonymization**: **Required** (double-blind)
|
|
||||||
- **Citations**: ACM numbered style
|
|
||||||
- **Supplementary**: Code and data encouraged
|
|
||||||
|
|
||||||
**LaTeX Template**: `assets/journals/kdd_article.tex`
|
**Official source**
|
||||||
|
|
||||||
**Website**: https://kdd.org/
|
- Author Guide: https://iclr.cc/Conferences/2026/AuthorGuide
|
||||||
|
|
||||||
---
|
**Initial submission**
|
||||||
|
|
||||||
### EMNLP (Empirical Methods in Natural Language Processing)
|
- Main text: up to **9 pages**.
|
||||||
|
- References do not count toward the limit.
|
||||||
|
- Appendices may use additional pages, but reviewers are not required to read them.
|
||||||
|
- Submissions are double blind; identifying information in the paper or supplement can cause desk rejection.
|
||||||
|
- Use the `iclr2026` package linked by the Author Guide.
|
||||||
|
|
||||||
**Conference Type**: Top NLP conference
|
**Later stages**
|
||||||
**Frequency**: Annual (November/December)
|
|
||||||
|
|
||||||
**Formatting Requirements**:
|
- The discussion/rebuttal and camera-ready limit increases to **10 main-text pages**.
|
||||||
- **Page Limit**:
|
- Do not apply that later-stage allowance to the initial submission.
|
||||||
- Long papers: 8 pages (+ unlimited references and appendix)
|
|
||||||
- Short papers: 4 pages (+ unlimited references)
|
|
||||||
- **Format**: Two-column
|
|
||||||
- **Font**: Times New Roman, 11pt
|
|
||||||
- **Anonymization**: **Required** (double-blind)
|
|
||||||
- Do not include author names or affiliations
|
|
||||||
- Self-citations should be anonymized
|
|
||||||
- **Paper size**: US Letter or A4
|
|
||||||
- **Citations**: Named style similar to ACL
|
|
||||||
- **LaTeX Template**: ACL/EMNLP official style
|
|
||||||
- **Supplementary**: Appendix unlimited, code encouraged
|
|
||||||
|
|
||||||
**LaTeX Template**: `assets/journals/emnlp_article.tex`
|
### CVPR 2026
|
||||||
|
|
||||||
**Website**: https://www.emnlp.org/
|
**Official source**
|
||||||
|
|
||||||
---
|
- Author Guidelines: https://cvpr.thecvf.com/Conferences/2026/AuthorGuidelines
|
||||||
|
|
||||||
### ACL (Association for Computational Linguistics)
|
**Initial submission**
|
||||||
|
|
||||||
**Conference Type**: Premier NLP conference
|
- Main paper: up to **8 pages**, including figures and tables.
|
||||||
**Frequency**: Annual (July)
|
- Additional pages may contain cited references only.
|
||||||
|
- Use the official CVPR 2026 author kit linked by the Author Guidelines.
|
||||||
|
- Papers must be anonymized. Identifying acknowledgments, grant IDs, videos, attached papers, or external links can violate anonymity.
|
||||||
|
- External links that expand submitted content or bypass length restrictions are prohibited.
|
||||||
|
|
||||||
**Formatting Requirements**:
|
**Rebuttal**
|
||||||
- **Page Limit**: 8 pages (long), 4 pages (short), excluding references
|
|
||||||
- **Format**: Two-column
|
|
||||||
- **Font**: Times, 11pt
|
|
||||||
- **Anonymization**: **Required**
|
|
||||||
- **LaTeX Template**: ACL official style (acl.sty)
|
|
||||||
|
|
||||||
**LaTeX Template**: `assets/journals/acl_article.tex`
|
- The rebuttal is a one-page PDF using the rebuttal template from the author kit.
|
||||||
|
- It must remain anonymous and may not add external material.
|
||||||
|
|
||||||
---
|
## Other Conference Families
|
||||||
|
|
||||||
### USENIX Security Symposium
|
The following links are discovery starting points, not cached requirements.
|
||||||
|
|
||||||
**Conference Type**: Top security conference
|
| Venue/family | Official starting point | Template rule |
|
||||||
**Frequency**: Annual (August)
|
|---|---|---|
|
||||||
|
| AAAI | https://aaai.org/conference/aaai/ | Use the target year's author kit |
|
||||||
|
| IJCAI | https://www.ijcai.org/ | Use the target year's call and style |
|
||||||
|
| ACL / ARR | https://aclrollingreview.org/ | Check ARR submission requirements and the committing venue |
|
||||||
|
| EMNLP | https://www.emnlp.org/ | Check the current call and ACL style package |
|
||||||
|
| ACM CHI | https://chi.acm.org/ | Check the current papers track and ACM workflow |
|
||||||
|
| ACM SIGKDD | https://kdd.org/ | Check the exact track; limits differ |
|
||||||
|
| ACM SIGIR | https://sigir.org/ | Check the target year's call |
|
||||||
|
| USENIX Security | https://www.usenix.org/conference/usenixsecurity | Check the current submission cycle and artifact rules |
|
||||||
|
| ISMB | https://www.iscb.org/ismb | Check the proceedings track and journal instructions |
|
||||||
|
| RECOMB | https://www.recomb.org/ | Check the target year's Springer/author kit |
|
||||||
|
| PSB | https://psb.stanford.edu/ | Check the current author instructions |
|
||||||
|
| IEEE conferences | https://conferences.ieeeauthorcenter.ieee.org/ | Use the conference-selected IEEE template |
|
||||||
|
| ICRA | https://www.ieee-ras.org/conferences-workshops/fully-sponsored/icra | Check the current author kit and page charges |
|
||||||
|
|
||||||
**Formatting Requirements**:
|
Do not assume that last year's page limit, review model, supplement policy, or class options survived unchanged.
|
||||||
- **Page Limit**:
|
|
||||||
- Papers: No strict limit (typically 15-20 pages including everything)
|
|
||||||
- Well-written, concise papers preferred
|
|
||||||
- **Format**: Two-column
|
|
||||||
- **Font**: Times, 10pt
|
|
||||||
- **Anonymization**: **Required** (double-blind)
|
|
||||||
- **LaTeX Template**: USENIX official template
|
|
||||||
- **Citations**: Numbered
|
|
||||||
- **Paper size**: US Letter
|
|
||||||
|
|
||||||
**LaTeX Template**: `assets/journals/usenix_article.tex`
|
## Official Template Workflow
|
||||||
|
|
||||||
**Website**: https://www.usenix.org/conference/usenixsecurity
|
1. Download the package from the conference's official author page.
|
||||||
|
2. Keep all `.sty`, `.cls`, bibliography, and checklist files together.
|
||||||
|
3. Compile the sample before editing.
|
||||||
|
4. Copy the sample and replace content without changing layout commands.
|
||||||
|
5. Preserve submission mode for review; enable camera-ready options only after acceptance.
|
||||||
|
6. Re-download the package if the organizers announce a revision.
|
||||||
|
|
||||||
---
|
Avoid unofficial mirrors when an official package exists. Do not rename an old style file to a new year.
|
||||||
|
|
||||||
### SIGIR (Information Retrieval)
|
## Blind-Review Checklist
|
||||||
|
|
||||||
**Conference Type**: Top information retrieval conference
|
Check the manuscript, supplement, source archive, PDF metadata, figures, and linked resources.
|
||||||
**Frequency**: Annual (July)
|
|
||||||
|
|
||||||
**Formatting Requirements**:
|
- Remove names, affiliations, emails, acknowledgments, grant numbers, and institution-identifying text when required.
|
||||||
- **Page Limit**:
|
- Follow the venue's self-citation policy; do not automatically replace every self-citation with “Anonymous.”
|
||||||
- Full papers: 10 pages (excluding references)
|
- Remove identifying paths, usernames, comments, Git metadata, document properties, and image metadata.
|
||||||
- Short papers: 4 pages (excluding references)
|
- Use only external links permitted by the current policy.
|
||||||
- **Format**: Single-column ACM format
|
- Ensure code and data packages are anonymized if submitted for review.
|
||||||
- **LaTeX Class**: `acmart` (sigconf)
|
- Do not disclose the submission's venue status where the conference prohibits it.
|
||||||
- **Anonymization**: **Required**
|
|
||||||
- **Citations**: ACM style
|
|
||||||
|
|
||||||
**LaTeX Template**: `assets/journals/sigir_article.tex`
|
## Page-Limit Interpretation
|
||||||
|
|
||||||
---
|
“Eight pages” is incomplete without scope. Record whether the limit applies to:
|
||||||
|
|
||||||
## Biology & Bioinformatics
|
- main text only;
|
||||||
|
- figures and tables;
|
||||||
|
- acknowledgments;
|
||||||
|
- references;
|
||||||
|
- appendices;
|
||||||
|
- checklists or impact statements; and
|
||||||
|
- the combined PDF or a separate supplement.
|
||||||
|
|
||||||
### ISMB (Intelligent Systems for Molecular Biology)
|
When using `scripts/validate_format.py`, supply `--content-pages` after manually counting according to this scope. Total PDF pages alone cannot establish compliance.
|
||||||
|
|
||||||
**Conference Type**: Premier computational biology conference
|
## Supplementary Material
|
||||||
**Frequency**: Annual (July)
|
|
||||||
|
|
||||||
**Formatting Requirements**:
|
- Put claims essential to acceptance in the main paper.
|
||||||
- **Publication**: Proceedings published in *Bioinformatics* journal
|
- Treat appendices as optional reading unless the current instructions say otherwise.
|
||||||
- **Page Limit**:
|
- Apply the same anonymity rules to supplements.
|
||||||
- Typically 7-8 pages including figures and references
|
- Check file count, type, and size limits.
|
||||||
- **Format**: Two-column
|
- Do not use links or supplements to evade the main-paper limit.
|
||||||
- **Font**: Times, 10pt
|
- Confirm whether code/data uploads share the paper deadline.
|
||||||
- **Citations**: Numbered (Oxford style similar to Bioinformatics journal)
|
|
||||||
- **LaTeX Template**: Oxford Bioinformatics template
|
|
||||||
- **Anonymization**: **Not required** (single-blind)
|
|
||||||
- **Figures**: High resolution, color acceptable
|
|
||||||
- **Supplementary**: Encouraged for additional data/methods
|
|
||||||
|
|
||||||
**LaTeX Template**: `assets/journals/ismb_article.tex`
|
## Camera-Ready Preparation
|
||||||
|
|
||||||
**Website**: https://www.iscb.org/ismb
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### RECOMB (Research in Computational Molecular Biology)
|
|
||||||
|
|
||||||
**Conference Type**: Top computational biology conference
|
|
||||||
**Frequency**: Annual (April/May)
|
|
||||||
|
|
||||||
**Formatting Requirements**:
|
|
||||||
- **Publication**: Proceedings published as Springer LNCS (Lecture Notes in Computer Science)
|
|
||||||
- **Page Limit**:
|
|
||||||
- Extended abstracts: 12-15 pages (including references)
|
|
||||||
- **Format**: Single-column
|
|
||||||
- **Font**: Based on Springer LNCS template
|
|
||||||
- **LaTeX Class**: `llncs` (Springer)
|
|
||||||
- **Citations**: Numbered or author-year
|
|
||||||
- **Anonymization**: **Required** (double-blind)
|
|
||||||
- **Supplementary**: Appendix can be submitted
|
|
||||||
|
|
||||||
**LaTeX Template**: `assets/journals/recomb_article.tex`
|
|
||||||
|
|
||||||
**Website**: https://www.recomb.org/
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### PSB (Pacific Symposium on Biocomputing)
|
|
||||||
|
|
||||||
**Conference Type**: Biomedical informatics conference
|
|
||||||
**Frequency**: Annual (January)
|
|
||||||
|
|
||||||
**Formatting Requirements**:
|
|
||||||
- **Page Limit**: 12 pages including figures and references
|
|
||||||
- **Format**: Single-column
|
|
||||||
- **Font**: Times, 11pt
|
|
||||||
- **Margins**: 1 inch all sides
|
|
||||||
- **Citations**: Numbered
|
|
||||||
- **Anonymization**: **Not required**
|
|
||||||
- **Figures**: Embedded in text
|
|
||||||
- **LaTeX Template**: PSB official template
|
|
||||||
|
|
||||||
**LaTeX Template**: `assets/journals/psb_article.tex`
|
|
||||||
|
|
||||||
**Website**: https://psb.stanford.edu/
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Engineering
|
|
||||||
|
|
||||||
### IEEE International Conference on Robotics and Automation (ICRA)
|
|
||||||
|
|
||||||
**Formatting Requirements**:
|
|
||||||
- **Page Limit**: 8 pages (including figures and references)
|
|
||||||
- **Format**: Two-column
|
|
||||||
- **Font**: Times, 10pt
|
|
||||||
- **LaTeX Class**: IEEEtran
|
|
||||||
- **Citations**: IEEE style [1]
|
|
||||||
- **Anonymization**: **Required** for initial submission
|
|
||||||
- **Video**: Optional video submissions encouraged
|
|
||||||
|
|
||||||
**LaTeX Template**: `assets/journals/icra_article.tex`
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)
|
|
||||||
|
|
||||||
**Formatting**: Same as ICRA (IEEE robotics template)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### International Conference on Computer-Aided Design (ICCAD)
|
|
||||||
|
|
||||||
**Formatting Requirements**:
|
|
||||||
- **Page Limit**: 8 pages
|
|
||||||
- **Format**: Two-column
|
|
||||||
- **LaTeX Class**: IEEE template
|
|
||||||
- **Citations**: IEEE style
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### Design Automation Conference (DAC)
|
|
||||||
|
|
||||||
**Formatting Requirements**:
|
|
||||||
- **Page Limit**: 6 pages
|
|
||||||
- **Format**: Two-column
|
|
||||||
- **Font**: Times, 10pt
|
|
||||||
- **LaTeX Class**: ACM or IEEE template (check yearly guidelines)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Multidisciplinary
|
|
||||||
|
|
||||||
### AAAS Annual Meeting
|
|
||||||
|
|
||||||
**Conference Type**: Broad scientific conference
|
|
||||||
**Formatting**: Varies by symposium (typically extended abstracts)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Quick Reference Table
|
|
||||||
|
|
||||||
| Conference | Pages | Format | Blind | Citations | Template |
|
|
||||||
|------------|-------|--------|-------|-----------|----------|
|
|
||||||
| **NeurIPS** | 8 + refs | Two-col | Double | [1] | `neurips_article.tex` |
|
|
||||||
| **ICML** | 8 + refs | Two-col | Double | [1] | `icml_article.tex` |
|
|
||||||
| **ICLR** | 8 + refs | Two-col | Double | [1] | `iclr_article.tex` |
|
|
||||||
| **CVPR** | 8 + refs | Two-col | Double | [1] | `cvpr_article.tex` |
|
|
||||||
| **AAAI** | 7 + refs | Two-col | Double | Various | `aaai_article.tex` |
|
|
||||||
| **CHI** | 10 + refs | Single-col | Double | ACM | `chi_article.tex` |
|
|
||||||
| **SIGKDD** | 9 + refs | Two-col | Double | ACM [1] | `kdd_article.tex` |
|
|
||||||
| **EMNLP** | 8 + refs | Two-col | Double | Named | `emnlp_article.tex` |
|
|
||||||
| **ISMB** | 7-8 pages | Two-col | Single | [1] | `ismb_article.tex` |
|
|
||||||
| **RECOMB** | 12-15 pages | Single-col | Double | Springer | `recomb_article.tex` |
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## General Conference Submission Guidelines
|
|
||||||
|
|
||||||
### Anonymization Best Practices (Double-Blind Review)
|
|
||||||
|
|
||||||
**Remove**:
|
|
||||||
- Author names, affiliations, emails from title page
|
|
||||||
- Acknowledgments section
|
|
||||||
- Funding information that reveals identity
|
|
||||||
- Any "our previous work" citations that make identity obvious
|
|
||||||
|
|
||||||
**Anonymize**:
|
|
||||||
- Self-citations: "Smith et al. [5]" → "Anonymous et al. [5]" or "Prior work [5]"
|
|
||||||
- Institution-specific details: "our university" → "a large research university"
|
|
||||||
- Dataset names if they reveal identity
|
|
||||||
|
|
||||||
**Keep Anonymous**:
|
|
||||||
- Code repositories (use anonymous GitHub for review)
|
|
||||||
- Supplementary materials
|
|
||||||
- Any URLs or links
|
|
||||||
|
|
||||||
### Supplementary Materials
|
|
||||||
|
|
||||||
**Common Inclusions**:
|
|
||||||
- Source code (GitHub repository, zip file)
|
|
||||||
- Additional experimental results
|
|
||||||
- Proofs and derivations
|
|
||||||
- Extended related work
|
|
||||||
- Dataset descriptions
|
|
||||||
- Video demonstrations
|
|
||||||
- Interactive demos
|
|
||||||
|
|
||||||
**Best Practices**:
|
|
||||||
- Keep supplementary well-organized
|
|
||||||
- Reference supplementary clearly from main paper
|
|
||||||
- Ensure supplementary is anonymized for blind review
|
|
||||||
- Check file size limits (typically 50-100 MB)
|
|
||||||
|
|
||||||
### Camera-Ready Preparation
|
|
||||||
|
|
||||||
After acceptance:
|
After acceptance:
|
||||||
1. **De-anonymize**: Add author names, affiliations
|
|
||||||
2. **Add acknowledgments**: Funding, contributions
|
|
||||||
3. **Copyright**: Add conference copyright notice
|
|
||||||
4. **Formatting**: Follow camera-ready specific guidelines
|
|
||||||
5. **Page limit**: May allow 1-2 extra pages (check guidelines)
|
|
||||||
6. **PDF/A compliance**: Some conferences require PDF/A format
|
|
||||||
|
|
||||||
### Accessibility Considerations
|
1. switch to the official final/camera-ready mode;
|
||||||
|
2. add authors and permitted acknowledgments;
|
||||||
**For All Conferences**:
|
3. apply the camera-ready page allowance, if any;
|
||||||
- Use colorblind-safe color palettes
|
4. complete rights, licensing, accessibility, and metadata forms;
|
||||||
- Ensure sufficient contrast
|
5. include only accepted and permitted supplementary material; and
|
||||||
- Provide alt text for figures (where supported)
|
6. inspect the publisher or proceedings proof.
|
||||||
- Use clear, readable fonts
|
|
||||||
- Avoid solely color-based distinctions
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Common Mistakes to Avoid
|
|
||||||
|
|
||||||
1. **Wrong style file**: Using outdated conference style file
|
|
||||||
2. **Page limit violation**: Figures/tables pushing over limit
|
|
||||||
3. **Font size manipulation**: Changing fonts to fit more content
|
|
||||||
4. **Margin adjustments**: Modifying margins to gain space
|
|
||||||
5. **De-anonymization**: Accidentally revealing identity in blind review
|
|
||||||
6. **Missing references**: Not citing relevant prior work
|
|
||||||
7. **Low-quality figures**: Pixelated or illegible figures
|
|
||||||
8. **Inconsistent formatting**: Different sections using different styles
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Getting Official Templates
|
|
||||||
|
|
||||||
**Where to Find Official Templates**:
|
|
||||||
1. **Conference website**: "Call for Papers" or "Author Instructions"
|
|
||||||
2. **GitHub**: Many conferences host templates on GitHub
|
|
||||||
3. **Overleaf**: Many official templates available on Overleaf
|
|
||||||
4. **CTAN**: LaTeX class files often on CTAN repository
|
|
||||||
|
|
||||||
**Template Naming**:
|
|
||||||
- Conferences often update templates yearly
|
|
||||||
- Use the correct year's template (e.g., `neurips_2024.sty`)
|
|
||||||
- Check for "camera-ready" vs. "submission" versions
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Notes
|
|
||||||
|
|
||||||
1. **Annual updates**: Conference requirements change; always check current year's CFP
|
|
||||||
2. **Deadline types**:
|
|
||||||
- Abstract deadline (often 1 week before paper deadline)
|
|
||||||
- Paper deadline (firm, no extensions typically)
|
|
||||||
- Supplementary deadline (may be a few days after paper)
|
|
||||||
3. **Timezone**: Pay attention to deadline timezone (often AOE - Anywhere on Earth)
|
|
||||||
4. **Rebuttal**: Many conferences have author response/rebuttal periods
|
|
||||||
5. **Dual submission**: Check conference policy on concurrent submissions
|
|
||||||
6. **Poster/Oral**: Acceptance often comes with presentation format
|
|
||||||
|
|
||||||
## Conference Tiers (Informal)
|
|
||||||
|
|
||||||
**Machine Learning**:
|
|
||||||
- **Tier 1**: NeurIPS, ICML, ICLR
|
|
||||||
- **Tier 2**: AAAI, IJCAI, UAI
|
|
||||||
|
|
||||||
**Computer Vision**:
|
|
||||||
- **Tier 1**: CVPR, ICCV, ECCV
|
|
||||||
|
|
||||||
**Natural Language Processing**:
|
|
||||||
- **Tier 1**: ACL, EMNLP, NAACL
|
|
||||||
|
|
||||||
**Bioinformatics**:
|
|
||||||
- **Tier 1**: RECOMB, ISMB
|
|
||||||
- **Tier 2**: PSB, WABI
|
|
||||||
|
|
||||||
(Tiers are informal and field-dependent; not official rankings)
|
|
||||||
|
|
||||||
|
Submission and camera-ready rules are different contracts. Re-verify both.
|
||||||
|
|||||||
+11
-9
@@ -2,9 +2,9 @@
|
|||||||
title: "CS Conference Writing Style Guide"
|
title: "CS Conference Writing Style Guide"
|
||||||
task: ""
|
task: ""
|
||||||
lineage_type: import
|
lineage_type: import
|
||||||
upstream_source: https://github.com/K-Dense-AI/scientific-agent-skills/blob/9c9bd2e9/skills/venue-templates/references/cs_conference_style.md
|
upstream_source: https://github.com/K-Dense-AI/scientific-agent-skills/blob/e8727695/skills/venue-templates/references/cs_conference_style.md
|
||||||
upstream_sha: 9c9bd2e9
|
upstream_sha: e8727695
|
||||||
imported_at: 2026-06-27
|
imported_at: 2026-07-20
|
||||||
prompt_class: catalogue
|
prompt_class: catalogue
|
||||||
upstream_changes: accepted
|
upstream_changes: accepted
|
||||||
author: upstream
|
author: upstream
|
||||||
@@ -15,7 +15,9 @@ validated: false
|
|||||||
|
|
||||||
Comprehensive writing guide for ACL, EMNLP, NAACL (NLP), CHI, CSCW (HCI), SIGKDD, WWW, SIGIR (data mining/IR), and other major CS conferences.
|
Comprehensive writing guide for ACL, EMNLP, NAACL (NLP), CHI, CSCW (HCI), SIGKDD, WWW, SIGIR (data mining/IR), and other major CS conferences.
|
||||||
|
|
||||||
**Last Updated**: 2024
|
**Reviewed**: 2026-07-20
|
||||||
|
|
||||||
|
Page limits and required sections vary by year, track, ARR cycle, and committing venue. Treat numeric limits as writing context until checked against the current instructions.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -102,7 +104,7 @@ prior approaches.
|
|||||||
## NLP-Specific Requirements
|
## NLP-Specific Requirements
|
||||||
|
|
||||||
### Datasets
|
### Datasets
|
||||||
- Use **standard benchmarks**: GLUE, SQuAD, CoNLL, OntoNotes
|
- Use **task-appropriate current evaluations**: established datasets such as SQuAD, CoNLL, or OntoNotes where they fit, plus current strong-model, human, robustness, safety, or multilingual evaluations as appropriate
|
||||||
- Report **dataset statistics**: train/dev/test sizes
|
- Report **dataset statistics**: train/dev/test sizes
|
||||||
- **Data preprocessing**: Document all steps
|
- **Data preprocessing**: Document all steps
|
||||||
|
|
||||||
@@ -125,7 +127,7 @@ Table 3: Human Evaluation Results (100 samples, 3 annotators)
|
|||||||
Method | Fluency | Coherence | Factuality | Overall
|
Method | Fluency | Coherence | Factuality | Overall
|
||||||
─────────────────────────────────────────────────────────────
|
─────────────────────────────────────────────────────────────
|
||||||
Baseline | 3.8 | 3.2 | 3.5 | 3.5
|
Baseline | 3.8 | 3.2 | 3.5 | 3.5
|
||||||
GPT-3.5 | 4.2 | 4.0 | 3.7 | 4.0
|
Strong Baseline| 4.2 | 4.0 | 3.7 | 4.0
|
||||||
Our Method | 4.4 | 4.3 | 4.1 | 4.3
|
Our Method | 4.4 | 4.3 | 4.1 | 4.3
|
||||||
─────────────────────────────────────────────────────────────
|
─────────────────────────────────────────────────────────────
|
||||||
Inter-annotator κ = 0.72. Scale: 1-5 (higher is better).
|
Inter-annotator κ = 0.72. Scale: 1-5 (higher is better).
|
||||||
@@ -135,8 +137,8 @@ Inter-annotator κ = 0.72. Scale: 1-5 (higher is better).
|
|||||||
|
|
||||||
- **ARR (ACL Rolling Review)**: Shared review system across ACL venues
|
- **ARR (ACL Rolling Review)**: Shared review system across ACL venues
|
||||||
- **Responsible NLP checklist**: Ethics, limitations, risks
|
- **Responsible NLP checklist**: Ethics, limitations, risks
|
||||||
- **Long (8 pages) vs. Short (4 pages)**: Different expectations
|
- **Long vs. short papers**: Different expectations; verify current page-count exclusions for Limitations, ethics material, references, and appendices
|
||||||
- **Findings papers**: Lower-tier acceptance track
|
- **Findings papers**: Distinct publication track with its own selection and commitment process
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -433,7 +435,7 @@ All CS venues increasingly expect:
|
|||||||
| **Evaluation** | Benchmarks + human | User studies | Large-scale exp | Datasets |
|
| **Evaluation** | Benchmarks + human | User studies | Large-scale exp | Datasets |
|
||||||
| **Theory weight** | Moderate | Low | Moderate | Moderate |
|
| **Theory weight** | Moderate | Low | Moderate | Moderate |
|
||||||
| **Industry value** | High | Medium | Very high | High |
|
| **Industry value** | High | Medium | Very high | High |
|
||||||
| **Page limit** | 8 long / 4 short | 10 + refs | 9 + refs | 10 + refs |
|
| **Typical paper length** | Long/short categories | Venue-defined | Track-defined | Track-defined |
|
||||||
| **Review style** | ARR | Direct | Direct | Direct |
|
| **Review style** | ARR | Direct | Direct | Direct |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
+183
-703
@@ -2,9 +2,9 @@
|
|||||||
title: "Grant Proposal Requirements"
|
title: "Grant Proposal Requirements"
|
||||||
task: ""
|
task: ""
|
||||||
lineage_type: import
|
lineage_type: import
|
||||||
upstream_source: https://github.com/K-Dense-AI/scientific-agent-skills/blob/9c9bd2e9/skills/venue-templates/references/grants_requirements.md
|
upstream_source: https://github.com/K-Dense-AI/scientific-agent-skills/blob/e8727695/skills/venue-templates/references/grants_requirements.md
|
||||||
upstream_sha: 9c9bd2e9
|
upstream_sha: e8727695
|
||||||
imported_at: 2026-06-27
|
imported_at: 2026-07-20
|
||||||
prompt_class: catalogue
|
prompt_class: catalogue
|
||||||
upstream_changes: accepted
|
upstream_changes: accepted
|
||||||
author: upstream
|
author: upstream
|
||||||
@@ -13,788 +13,268 @@ validated: false
|
|||||||
|
|
||||||
# Grant Proposal Requirements
|
# Grant Proposal Requirements
|
||||||
|
|
||||||
Comprehensive requirements and formatting guidelines for major federal and private foundation grant programs.
|
Funding requirements are controlled by the current solicitation or notice of funding opportunity (NOFO), the effective agency guide, and the submission portal. A general agency summary never overrides the call.
|
||||||
|
|
||||||
**Last Updated**: 2024
|
**Reviewed:** 2026-07-20
|
||||||
|
|
||||||
---
|
## Required Order of Authority
|
||||||
|
|
||||||
## NSF (National Science Foundation)
|
Use sources in this order:
|
||||||
|
|
||||||
### Overview
|
1. current solicitation, NOFO, or Broad Agency Announcement (BAA);
|
||||||
|
2. amendments and agency notices;
|
||||||
|
3. effective agency application guide and form set;
|
||||||
|
4. submission-portal validation; and
|
||||||
|
5. institutional sponsored-research guidance.
|
||||||
|
|
||||||
**Agency**: National Science Foundation
|
Record the source URLs, versions, and date checked in the proposal workspace.
|
||||||
**Typical Award**: $100K-$500K per year, 3-5 years
|
|
||||||
**Success Rate**: 20-25% (varies by program)
|
|
||||||
**Review Criteria**: Intellectual Merit + Broader Impacts (equally weighted)
|
|
||||||
|
|
||||||
---
|
## NSF
|
||||||
|
|
||||||
### NSF Standard Grant Proposal
|
### Current policy basis
|
||||||
|
|
||||||
**Page Limits (NSF PAPPG - Proposal & Award Policies & Procedures Guide)**:
|
- PAPPG landing page: https://www.nsf.gov/policies/pappg
|
||||||
|
- Proposal preparation overview: https://www.nsf.gov/funding/preparing-proposal
|
||||||
|
- Current PAPPG Chapter II: follow the version marked current on the landing page
|
||||||
|
- SciENcv: https://www.ncbi.nlm.nih.gov/sciencv/
|
||||||
|
|
||||||
| Component | Page Limit | Font | Spacing |
|
As reviewed on 2026-07-20, **NSF 24-1** remains the current PAPPG for proposals submitted or due on or after 2024-05-20, with later supplemental policy notices listed on the PAPPG landing page. Recheck this status for every deadline.
|
||||||
|-----------|-----------|------|---------|
|
|
||||||
| **Project Summary** | 1 page | Any readable, 10pt+ | Any |
|
|
||||||
| **Project Description** | 15 pages | Times Roman 11pt or similar | Single |
|
|
||||||
| **References Cited** | No limit | Times Roman 11pt | Single |
|
|
||||||
| **Biographical Sketch** | 3 pages per person | Times Roman 11pt | Single |
|
|
||||||
| **Budget Justification** | 3-5 pages | Any readable | Any |
|
|
||||||
| **Current & Pending Support** | No limit | Times Roman 11pt | Single |
|
|
||||||
| **Facilities, Equipment** | 2 pages | Any readable | Any |
|
|
||||||
| **Data Management Plan** | 2 pages | Any readable | Any |
|
|
||||||
|
|
||||||
**Margins**: 1 inch (2.54 cm) on all sides (strictly enforced)
|
### Verified common research-proposal rules
|
||||||
|
|
||||||
---
|
Unless the solicitation modifies them:
|
||||||
|
|
||||||
### NSF Project Summary (1 page)
|
| Component | Current general rule |
|
||||||
|
|---|---|
|
||||||
|
| Project Summary | No more than 1 page; include Overview, Intellectual Merit, and Broader Impacts |
|
||||||
|
| Project Description | Up to 15 pages for a standard research proposal |
|
||||||
|
| References Cited | Separate section; follow PAPPG content rules |
|
||||||
|
| Data Management and Sharing Plan | No more than 2 pages |
|
||||||
|
| Biographical Sketch | Generated in SciENcv for each senior/key person; no old three-page cap |
|
||||||
|
| Current and Pending (Other) Support | Generated and certified in SciENcv |
|
||||||
|
| Synergistic Activities | Separate document, up to 1 page and up to 5 examples per senior/key person |
|
||||||
|
|
||||||
**Required Sections** (clearly labeled):
|
**General formatting**
|
||||||
|
|
||||||
1. **Overview** (1-2 paragraphs)
|
- Times New Roman or Computer Modern at 11 points or larger under the current general rule.
|
||||||
- Concise description of research activity
|
- No more than six lines of text in one vertical inch.
|
||||||
- Objectives and methods
|
- Margins of at least one inch in every direction.
|
||||||
|
- Portal-generated forms and solicitation-specific instructions may control individual sections.
|
||||||
|
|
||||||
2. **Intellectual Merit** (1 paragraph)
|
### Important change from older guidance
|
||||||
- How project advances knowledge
|
|
||||||
- Innovation and transformative potential
|
|
||||||
- Qualifications of research team
|
|
||||||
|
|
||||||
3. **Broader Impacts** (1 paragraph)
|
Do not use the obsolete “three-page NSF biosketch with Synergistic Activities inside it” pattern.
|
||||||
- Benefits to society
|
|
||||||
- Broadening participation
|
|
||||||
- Dissemination and outreach
|
|
||||||
|
|
||||||
**Format**: Can be full-page text or sectioned
|
Current workflow:
|
||||||
**Audience**: Non-specialists (broad scientific community)
|
|
||||||
|
|
||||||
**Template**: `assets/grants/nsf_project_summary.tex`
|
1. prepare and certify the Biographical Sketch in SciENcv;
|
||||||
|
2. prepare and certify Current and Pending (Other) Support in SciENcv; and
|
||||||
|
3. upload Synergistic Activities as its own one-page document.
|
||||||
|
|
||||||
---
|
### Project Summary
|
||||||
|
|
||||||
### NSF Project Description (15 pages)
|
Clearly label:
|
||||||
|
|
||||||
**Typical Structure**:
|
- **Overview** — proposed activity, objectives, and methods;
|
||||||
|
- **Intellectual Merit** — potential to advance knowledge; and
|
||||||
|
- **Broader Impacts** — potential to benefit society and produce desired societal outcomes.
|
||||||
|
|
||||||
1. **Introduction/Background** (2-3 pages)
|
The summary should be understandable to a broad scientific audience and is not merely the proposal abstract.
|
||||||
- Current state of knowledge
|
|
||||||
- Research gap
|
|
||||||
- Preliminary work/feasibility
|
|
||||||
- Team qualifications
|
|
||||||
|
|
||||||
2. **Research Plan** (8-10 pages)
|
### Project Description
|
||||||
- Objectives and hypotheses
|
|
||||||
- Methods and approach
|
|
||||||
- Timeline and milestones
|
|
||||||
- Expected outcomes
|
|
||||||
|
|
||||||
3. **Broader Impacts** (1-2 pages)
|
A practical drafting structure is:
|
||||||
- Educational activities
|
|
||||||
- Broadening participation (underrepresented groups)
|
|
||||||
- Dissemination (publications, conferences, public outreach)
|
|
||||||
- Societal benefits
|
|
||||||
|
|
||||||
4. **Results from Prior NSF Support** (1 page, if applicable)
|
1. problem, prior work, and gap;
|
||||||
- Required if PI has had NSF support in past 5 years
|
2. objectives or hypotheses;
|
||||||
- Intellectual merit and broader impacts of prior work
|
3. research plan and methods;
|
||||||
- Publications from prior NSF grants
|
4. expected outcomes, risks, and alternatives;
|
||||||
|
5. timeline and team roles;
|
||||||
|
6. Intellectual Merit and Broader Impacts; and
|
||||||
|
7. Results from Prior NSF Support when required.
|
||||||
|
|
||||||
**Key Requirements**:
|
This is writing guidance, not a required section order. Follow the solicitation.
|
||||||
- Intellectual Merit and Broader Impacts integrated throughout
|
|
||||||
- Figures and tables allowed (count toward page limit)
|
|
||||||
- Citations to references (use References Cited section)
|
|
||||||
|
|
||||||
**Template**: `assets/grants/nsf_proposal_template.tex`
|
### Data Management and Sharing Plan
|
||||||
|
|
||||||
---
|
Address applicable plans for:
|
||||||
|
|
||||||
### NSF Biographical Sketch (3 pages)
|
- data and other research products;
|
||||||
|
- standards and metadata;
|
||||||
|
- access, sharing, and any justified restrictions;
|
||||||
|
- reuse and redistribution;
|
||||||
|
- preservation and archiving; and
|
||||||
|
- roles and responsibilities.
|
||||||
|
|
||||||
**Required Sections**:
|
Directorate, office, division, or program guidance may add requirements.
|
||||||
1. **Professional Preparation**: Institutions, degrees, fields
|
|
||||||
2. **Appointments**: Current and previous positions
|
|
||||||
3. **Products**: Up to 5 most relevant, up to 5 other significant products
|
|
||||||
- Can include publications, datasets, software, patents
|
|
||||||
4. **Synergistic Activities**: Up to 5 examples of impact beyond research
|
|
||||||
|
|
||||||
**Format**:
|
### Bundled NSF scaffold
|
||||||
- NSF template must be used (SciENcv or NSF-approved format)
|
|
||||||
- No longer uses "Publications" but "Products"
|
|
||||||
|
|
||||||
---
|
`assets/grants/nsf_proposal_template.tex` is a planning scaffold for common narrative components. It is not an NSF-issued upload package. Split content into the appropriate Research.gov or Grants.gov fields and use SciENcv/common forms where required.
|
||||||
|
|
||||||
### NSF Broader Impacts
|
## NIH
|
||||||
|
|
||||||
**NSF-Recognized Categories** (demonstrate ≥1):
|
### Current policy basis
|
||||||
1. **Advance discovery while promoting teaching/learning**
|
|
||||||
2. **Broaden participation** of underrepresented groups
|
|
||||||
3. **Disseminate broadly** to enhance scientific/technological understanding
|
|
||||||
4. **Benefits to society** (economic, health, environment, national security)
|
|
||||||
5. **Develop scientific workforce** and infrastructure
|
|
||||||
|
|
||||||
**Best Practices**:
|
- Application Guide: https://grants.nih.gov/grants-process/write-application/how-to-apply-application-guide
|
||||||
- Be specific with measurable outcomes
|
- Attachment formatting: https://grants.nih.gov/grants-process/write-application/how-to-apply-application-guide/format-attachments
|
||||||
- Explain how activities will be assessed
|
- Page limits: https://grants.nih.gov/grants-process/write-application/how-to-apply-application-guide/page-limits
|
||||||
- Integrate with research (don't treat as "add-on")
|
|
||||||
- Budget for broader impacts activities
|
|
||||||
|
|
||||||
**Examples**:
|
Use the form set and instructions applicable to the due date. The NOFO always takes precedence over general page-limit tables.
|
||||||
- K-12 outreach programs
|
|
||||||
- Curriculum development
|
|
||||||
- Training underrepresented students
|
|
||||||
- Public science communication
|
|
||||||
- Open-source software development
|
|
||||||
|
|
||||||
---
|
### Verified common page limits
|
||||||
|
|
||||||
### NSF Budget
|
As reviewed on 2026-07-20:
|
||||||
|
|
||||||
**Typical Categories**:
|
| Attachment | General limit unless the NOFO says otherwise |
|
||||||
- **Senior Personnel**: PI, co-PIs (% effort, salary)
|
|---|---|
|
||||||
- **Other Personnel**: Postdocs, graduate students, undergrads
|
| Specific Aims | 1 page |
|
||||||
- **Fringe Benefits**: Institutional rates
|
| R01 Research Strategy | 12 pages |
|
||||||
- **Equipment**: Items >$5,000
|
| R21 Research Strategy | 6 pages; combined mechanisms can differ |
|
||||||
- **Travel**: Domestic and foreign
|
| Introduction to resubmission/revision | 1 page |
|
||||||
- **Participant Support**: Workshops, conferences (separate category)
|
| Project Summary/Abstract | 30 lines |
|
||||||
- **Other Direct Costs**: Materials, publication, subawards
|
| Project Narrative | 3 sentences for most activity codes |
|
||||||
- **Indirect Costs**: Institutional F&A rate
|
| Legacy Biographical Sketch | 5 pages |
|
||||||
|
| Biographical Sketch Common Form and Supplement | No hard page limit; length is controlled through SciENcv data entry |
|
||||||
|
|
||||||
**Budget Justification**: Explain need for each item
|
Not every activity code uses every attachment. Check the NOFO and activity-code instructions.
|
||||||
|
|
||||||
---
|
### Attachment formatting
|
||||||
|
|
||||||
### NSF Data Management Plan (2 pages)
|
Verify the current guide for:
|
||||||
|
|
||||||
**Required Content**:
|
- accepted PDF format;
|
||||||
- Types of data produced
|
- paper size and margins;
|
||||||
- Standards for data format and metadata
|
- approved fonts and minimum size;
|
||||||
- Policies for access and sharing
|
- file naming;
|
||||||
- Policies for re-use and redistribution
|
- hyperlinks;
|
||||||
- Plans for archiving and preservation
|
- headers, footers, and page numbers; and
|
||||||
|
- whether a format page or common form is mandatory.
|
||||||
|
|
||||||
**Acceptable Approaches**:
|
Do not compress text or figures to evade a page limit.
|
||||||
- Deposit in domain-specific repository
|
|
||||||
- Institutional repository
|
|
||||||
- Data available upon request (with restrictions justification)
|
|
||||||
|
|
||||||
---
|
### Specific Aims
|
||||||
|
|
||||||
### NSF Review Process
|
A useful writing pattern is:
|
||||||
|
|
||||||
**Review Criteria** (equally weighted):
|
1. significance and unresolved gap;
|
||||||
|
2. long-term goal and proposal objective;
|
||||||
|
3. central hypothesis or guiding premise;
|
||||||
|
4. concise aims with approach and expected outcome; and
|
||||||
|
5. impact and next-step payoff.
|
||||||
|
|
||||||
1. **Intellectual Merit**:
|
The pattern is not an NIH-mandated outline. Adapt it to the mechanism and science.
|
||||||
- What is the potential to advance knowledge?
|
|
||||||
- How well-conceived and organized?
|
|
||||||
- Qualifications of PI and team?
|
|
||||||
- Availability of resources?
|
|
||||||
|
|
||||||
2. **Broader Impacts**:
|
`assets/grants/nih_specific_aims.tex` is a writing scaffold for the one-page attachment. Confirm the current font, margin, and PDF rules before use.
|
||||||
- What are the potential benefits to society?
|
|
||||||
- How well-suited to achieve broader impacts?
|
|
||||||
|
|
||||||
**Panel Review**: Proposals reviewed by panel of experts
|
### Research Strategy
|
||||||
**Timeline**: Typically 6 months from deadline to award decision
|
|
||||||
|
|
||||||
---
|
For R01-style research applications, organize around:
|
||||||
|
|
||||||
### NSF LaTeX Templates
|
- Significance;
|
||||||
|
- Innovation; and
|
||||||
|
- Approach.
|
||||||
|
|
||||||
- **Full Proposal**: `assets/grants/nsf_proposal_template.tex`
|
Address rigor, feasibility, analysis, expected outcomes, potential problems, alternatives, milestones, and relevant biological variables where applicable. Mechanism- and NOFO-specific instructions can add or replace requirements.
|
||||||
- **Project Summary**: `assets/grants/nsf_project_summary.tex`
|
|
||||||
- **Biographical Sketch**: Use NSF SciENcv or template
|
|
||||||
|
|
||||||
**Resources**:
|
### Biosketch and common forms
|
||||||
- NSF PAPPG: https://www.nsf.gov/publications/pub_summ.jsp?ods_key=pappg
|
|
||||||
- NSF Fastlane: https://www.fastlane.nsf.gov/
|
|
||||||
|
|
||||||
---
|
Do not rely on the old assumption that every NIH biosketch is a manually edited five-page PDF. Determine whether the application uses:
|
||||||
|
|
||||||
## NIH (National Institutes of Health)
|
- a legacy biosketch format page; or
|
||||||
|
- the Biographical Sketch Common Form and NIH supplement through SciENcv.
|
||||||
|
|
||||||
### Overview
|
Use the current forms directory and due-date-specific instructions.
|
||||||
|
|
||||||
**Agency**: National Institutes of Health
|
## DOE
|
||||||
**Funding Mechanisms**:
|
|
||||||
- **R01**: Research Project Grant (most common)
|
|
||||||
- **R21**: Exploratory/Developmental Research Grant
|
|
||||||
- **K Awards**: Career Development Awards
|
|
||||||
**Success Rate**: 10-20% (varies by institute and mechanism)
|
|
||||||
|
|
||||||
---
|
### Official starting points
|
||||||
|
|
||||||
### NIH R01 Research Grant
|
- Office of Science funding opportunities: https://science.osti.gov/grants
|
||||||
|
- DOE funding opportunities: https://www.energy.gov/funding-financing
|
||||||
|
- SAM.gov: https://sam.gov/content/opportunities
|
||||||
|
|
||||||
**Page Limits** (Research Strategy):
|
DOE requirements vary substantially by Funding Opportunity Announcement. Extract exact rules for:
|
||||||
|
|
||||||
| Component | Page Limit | Font | Spacing |
|
- pre-application or concept paper;
|
||||||
|-----------|-----------|------|---------|
|
- project narrative;
|
||||||
| **Specific Aims** | 1 page | Arial 11pt minimum | Any |
|
- resumes/biosketches and support disclosures;
|
||||||
| **Research Strategy** | 12 pages | Arial 11pt minimum | 0.5 inch margins minimum |
|
- data management or data-sharing plan;
|
||||||
| - Significance | Part of 12 | | |
|
- budget files and cost sharing;
|
||||||
| - Innovation | Part of 12 | | |
|
- current/pending support;
|
||||||
| - Approach | Part of 12 | | |
|
- milestones, deliverables, and technology readiness; and
|
||||||
| **Bibliography** | No limit | Arial 11pt | |
|
- submission system.
|
||||||
| **Biographical Sketch** | 5 pages per person | Arial 11pt | |
|
|
||||||
|
|
||||||
**Margins**: 0.5 inch minimum (all sides)
|
No DOE template is bundled in this skill.
|
||||||
**Paper Size**: Letter (8.5 × 11 inches)
|
|
||||||
|
|
||||||
---
|
## DARPA
|
||||||
|
|
||||||
### NIH Specific Aims Page (1 page)
|
### Official starting points
|
||||||
|
|
||||||
**THE MOST CRITICAL COMPONENT**
|
- Opportunities: https://www.darpa.mil/work-with-us/opportunities
|
||||||
|
- SAM.gov: https://sam.gov/content/opportunities
|
||||||
|
|
||||||
**Structure** (recommended):
|
Every BAA defines its own volumes, page limits, abstract/full-proposal stages, security markings, cost package, and submission channel. Do not apply a generic “20–25 page DARPA proposal” limit.
|
||||||
|
|
||||||
1. **Opening paragraph** (2-3 sentences)
|
Use the Heilmeier questions as a thinking aid when relevant:
|
||||||
- Hook: Significance of problem
|
|
||||||
- Gap: What's not known
|
|
||||||
|
|
||||||
2. **Long-term goal** (1 sentence)
|
- What are you trying to do?
|
||||||
- Overarching research vision
|
- How is it done today, and what are the limits?
|
||||||
|
- What is new, and why might it succeed?
|
||||||
|
- Who cares, and what difference will success make?
|
||||||
|
- What are the risks, cost, schedule, and measurable tests?
|
||||||
|
|
||||||
3. **Objective** (1-2 sentences)
|
The BAA controls the actual proposal structure. No DARPA template is bundled.
|
||||||
- What this proposal will accomplish
|
|
||||||
- Central hypothesis
|
|
||||||
|
|
||||||
4. **Rationale** (2-3 sentences)
|
|
||||||
- Why you expect success
|
|
||||||
- Preliminary data supporting hypothesis
|
|
||||||
|
|
||||||
5. **Specific Aims** (3 aims typical)
|
|
||||||
- **Aim 1**: [Title]. [1-2 sentence description. Working hypothesis. Expected outcome.]
|
|
||||||
- **Aim 2**: [Title]. [1-2 sentence description. Working hypothesis. Expected outcome.]
|
|
||||||
- **Aim 3**: [Title]. [1-2 sentence description. Working hypothesis. Expected outcome.]
|
|
||||||
|
|
||||||
6. **Payoff paragraph** (2-3 sentences)
|
|
||||||
- Impact and significance
|
|
||||||
- Innovation
|
|
||||||
- Future directions
|
|
||||||
|
|
||||||
**Best Practices**:
|
|
||||||
- Crystal clear, compelling narrative
|
|
||||||
- State hypothesis explicitly
|
|
||||||
- Explain expected outcomes
|
|
||||||
- Show innovation and impact
|
|
||||||
|
|
||||||
**Template**: `assets/grants/nih_specific_aims.tex`
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### NIH Research Strategy (12 pages)
|
|
||||||
|
|
||||||
**Required Sections**:
|
|
||||||
|
|
||||||
#### 1. Significance (typically 2-3 pages)
|
|
||||||
- **Importance**: Critical barrier to progress
|
|
||||||
- **Knowledge gap**: What's not known
|
|
||||||
- **Impact**: How project advances field
|
|
||||||
- **Rigor**: Scientific premise/prior work
|
|
||||||
- **References**: Cite key literature
|
|
||||||
|
|
||||||
#### 2. Innovation (typically 1-2 pages)
|
|
||||||
- **Novelty**: New concepts, approaches, methods
|
|
||||||
- **Challenge paradigms**: Shift thinking
|
|
||||||
- **Refined/new methodologies**: Technical innovation
|
|
||||||
- **Novel applications**: Existing tools in new ways
|
|
||||||
|
|
||||||
#### 3. Approach (typically 7-9 pages)
|
|
||||||
**For Each Aim**:
|
|
||||||
- **Rationale**: Why this aim
|
|
||||||
- **Experimental design**: Detailed methods
|
|
||||||
- **Expected outcomes**: What results mean
|
|
||||||
- **Potential problems & alternatives**: Mitigation strategies
|
|
||||||
- **Rigor and reproducibility**: Controls, replication, statistics
|
|
||||||
- **Timeline**: When each aim completed
|
|
||||||
|
|
||||||
**Additional Approach Content**:
|
|
||||||
- Preliminary data (critical for R01)
|
|
||||||
- Power analyses for sample sizes
|
|
||||||
- Statistical analysis plans
|
|
||||||
- Rigor of prior research cited
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### NIH Biographical Sketch (5 pages)
|
|
||||||
|
|
||||||
**Sections** (NIH format):
|
|
||||||
1. **Personal Statement** (4 sentences explaining why you're suited)
|
|
||||||
2. **Positions, Honors, and Scientific Appointments**
|
|
||||||
3. **Contributions to Science** (Up to 5 contributions, up to 4 pubs each)
|
|
||||||
4. **Research Support** (current and completed grants, overlap checked)
|
|
||||||
|
|
||||||
**Format**: Must use NIH template (fillable PDF or format page)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### NIH Review Criteria
|
|
||||||
|
|
||||||
**Scored Criteria** (1-9 scale, 1=best):
|
|
||||||
1. **Significance**: Importance, impact
|
|
||||||
2. **Investigator(s)**: Qualifications, track record
|
|
||||||
3. **Innovation**: Novel concepts, methods
|
|
||||||
4. **Approach**: Feasibility, rigor, design
|
|
||||||
5. **Environment**: Institutional support, resources
|
|
||||||
|
|
||||||
**Additional Considerations** (not scored but noted):
|
|
||||||
- Vertebrate animals
|
|
||||||
- Biohazards
|
|
||||||
- Human subjects protections
|
|
||||||
- Inclusion of women, minorities, children
|
|
||||||
- Budget appropriateness
|
|
||||||
|
|
||||||
**Overall Impact Score**: 1-9 (synthesizes all criteria)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### NIH R21 (Exploratory Grant)
|
|
||||||
|
|
||||||
**Key Differences from R01**:
|
|
||||||
- **Research Strategy**: 6 pages (vs. 12 for R01)
|
|
||||||
- **Duration**: 2 years maximum
|
|
||||||
- **Budget**: $275K total costs over 2 years
|
|
||||||
- **Preliminary data**: Not required (exploratory nature)
|
|
||||||
- **Purpose**: High-risk, high-reward projects; new directions
|
|
||||||
|
|
||||||
**When to Choose R21 vs. R01**:
|
|
||||||
- R21: Early-stage, limited preliminary data, high-risk
|
|
||||||
- R01: Established line of research, strong preliminary data
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### NIH K Awards (Career Development)
|
|
||||||
|
|
||||||
**Mechanisms**:
|
|
||||||
- **K01**: Mentored Research Scientist Development Award
|
|
||||||
- **K08**: Mentored Clinical Scientist Research Career Development Award
|
|
||||||
- **K23**: Mentored Patient-Oriented Research Career Development Award
|
|
||||||
- **K99/R00**: Pathway to Independence Award (postdoc to faculty)
|
|
||||||
|
|
||||||
**Key Components**:
|
|
||||||
- **Career Development Plan**: Training goals, timeline
|
|
||||||
- **Research Plan**: 6-12 pages (mechanism-dependent)
|
|
||||||
- **Mentor(s)**: Letters of support, mentoring plan
|
|
||||||
- **Institutional Commitment**: Environment, resources
|
|
||||||
- **Protected Time**: 75% research effort typical
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### NIH Budget
|
|
||||||
|
|
||||||
**Modular vs. Detailed**:
|
|
||||||
- **Modular**: ≤$250K direct costs per year (25K increments)
|
|
||||||
- **Detailed**: >$250K direct costs per year
|
|
||||||
|
|
||||||
**Modular Budget**: Only need budget justification for personnel, consortium, equipment >$25K
|
|
||||||
|
|
||||||
**Budget Period**: Year-by-year (usually 5 years for R01)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### NIH LaTeX Templates
|
|
||||||
|
|
||||||
- **R01 Full Proposal**: `assets/grants/nih_r01_template.tex`
|
|
||||||
- **Specific Aims**: `assets/grants/nih_specific_aims.tex`
|
|
||||||
- **Biographical Sketch**: Use NIH fillable PDF or format page
|
|
||||||
|
|
||||||
**Resources**:
|
|
||||||
- NIH Application Guide: https://grants.nih.gov/grants/how-to-apply-application-guide.html
|
|
||||||
- SF424 Forms: https://grants.nih.gov/grants/how-to-apply-application-guide/forms-e/general-forms-e.pdf
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## DOE (Department of Energy)
|
|
||||||
|
|
||||||
### Overview
|
|
||||||
|
|
||||||
**Agency**: U.S. Department of Energy
|
|
||||||
**Offices**:
|
|
||||||
- **Office of Science**: Basic research (BES, BER, ASCR, NP, HEP, FES)
|
|
||||||
- **ARPA-E**: High-risk, high-reward energy technologies
|
|
||||||
- **EERE**: Energy efficiency and renewable energy
|
|
||||||
|
|
||||||
**Typical Award**: $200K-$1M per year, 3 years
|
|
||||||
**Success Rate**: 10-30% (varies by program)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### DOE Office of Science Proposal
|
|
||||||
|
|
||||||
**Page Limits** (typical, varies by FOA):
|
|
||||||
|
|
||||||
| Component | Page Limit | Format |
|
|
||||||
|-----------|-----------|--------|
|
|
||||||
| **Project Narrative** | 10-20 pages | Times 11pt, 1" margins |
|
|
||||||
| **References** | No limit | |
|
|
||||||
| **Budget Justification** | 3-5 pages | |
|
|
||||||
| **Biographical Sketches** | 2-3 pages each | |
|
|
||||||
| **Current & Pending** | No limit | |
|
|
||||||
| **Facilities & Resources** | No limit | |
|
|
||||||
| **Data Management Plan** | 2 pages | |
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### DOE Project Narrative Structure
|
|
||||||
|
|
||||||
**Typical Sections**:
|
|
||||||
|
|
||||||
1. **Background and Significance** (2-3 pages)
|
|
||||||
- Energy relevance
|
|
||||||
- Current state of knowledge
|
|
||||||
- Research need
|
|
||||||
|
|
||||||
2. **Preliminary Work** (1-2 pages)
|
|
||||||
- Team's qualifications
|
|
||||||
- Relevant prior results
|
|
||||||
|
|
||||||
3. **Research Plan** (10-15 pages)
|
|
||||||
- **Objectives**: Clear goals
|
|
||||||
- **Technical approach**: Detailed methods
|
|
||||||
- **Milestones and deliverables**: Specific, measurable
|
|
||||||
- **Timeline**: Gantt chart common
|
|
||||||
- **Team and management**: Roles, collaboration
|
|
||||||
|
|
||||||
4. **Broader Impacts** (1-2 pages)
|
|
||||||
- Workforce development
|
|
||||||
- Technology transfer potential
|
|
||||||
- Publications and dissemination
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### DOE-Specific Requirements
|
|
||||||
|
|
||||||
**Energy Relevance**: Must clearly tie to DOE mission
|
|
||||||
- Basic science: Fundamental understanding for energy applications
|
|
||||||
- Applied: Energy efficiency, renewable energy, grid, storage
|
|
||||||
|
|
||||||
**Technology Readiness Levels (TRLs)**: Often required to specify
|
|
||||||
- **TRL 1-3**: Basic research, proof of concept
|
|
||||||
- **TRL 4-6**: Component/subsystem validation
|
|
||||||
- **TRL 7-9**: System demonstration, deployment
|
|
||||||
|
|
||||||
**National Laboratory Collaboration**: Encouraged
|
|
||||||
- Include lab scientists as co-PIs or collaborators
|
|
||||||
- Letter of collaboration from lab
|
|
||||||
|
|
||||||
**Cost Sharing**: Sometimes required (check FOA)
|
|
||||||
- Can be in-kind (equipment, time)
|
|
||||||
- Must be documented
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### DOE Budget Considerations
|
|
||||||
|
|
||||||
**Allowable Costs**:
|
|
||||||
- Personnel (salaries, benefits)
|
|
||||||
- Equipment
|
|
||||||
- Travel (especially to DOE national labs)
|
|
||||||
- Materials and supplies
|
|
||||||
- Subcontracts
|
|
||||||
- Indirect costs (negotiated F&A rate)
|
|
||||||
|
|
||||||
**Unallowable**:
|
|
||||||
- Construction
|
|
||||||
- Entertainment
|
|
||||||
- Some indirect costs (depends on institution type)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### DOE LaTeX Template
|
|
||||||
|
|
||||||
**Template**: `assets/grants/doe_proposal_template.tex`
|
|
||||||
|
|
||||||
**Resources**:
|
|
||||||
- DOE Office of Science Funding: https://science.osti.gov/grants
|
|
||||||
- EERE Funding: https://www.energy.gov/eere/funding/eere-funding-opportunities
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## DARPA (Defense Advanced Research Projects Agency)
|
|
||||||
|
|
||||||
### Overview
|
|
||||||
|
|
||||||
**Agency**: Defense Advanced Research Projects Agency (DoD)
|
|
||||||
**Mission**: High-risk, high-reward research for national security
|
|
||||||
**Typical Award**: $500K-$5M per year, 2-4 years
|
|
||||||
**Success Rate**: 5-15% (highly competitive)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### DARPA BAA (Broad Agency Announcement) Response
|
|
||||||
|
|
||||||
**Page Limits** (typical, varies by BAA):
|
|
||||||
|
|
||||||
| Component | Page Limit | Format |
|
|
||||||
|-----------|-----------|--------|
|
|
||||||
| **Technical and Management Proposal** | 20-25 pages | Times 12pt, 1" margins |
|
|
||||||
| **Cost Proposal** | Separate volume | |
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### DARPA Technical Proposal Structure
|
|
||||||
|
|
||||||
**Key Sections**:
|
|
||||||
|
|
||||||
1. **Executive Summary** (1 page)
|
|
||||||
- Vision and impact
|
|
||||||
- Technical approach overview
|
|
||||||
- Team qualifications
|
|
||||||
|
|
||||||
2. **Heilmeier Catechism** (1-2 pages)
|
|
||||||
DARPA requires answering these questions:
|
|
||||||
- **What are you trying to do?** Articulate objectives without jargon
|
|
||||||
- **How is it done today? Limitations?** Current practice and shortcomings
|
|
||||||
- **What is new in your approach?** Innovation
|
|
||||||
- **Who cares?** Impact if successful
|
|
||||||
- **If successful, what difference will it make?** Transformation
|
|
||||||
- **What are the risks?** Technical risks and mitigation
|
|
||||||
- **How much will it cost?** Budget overview
|
|
||||||
- **How long will it take?** Timeline
|
|
||||||
- **What are the mid-term and final exams?** Milestones for success
|
|
||||||
|
|
||||||
3. **Technical Approach** (10-15 pages)
|
|
||||||
- Detailed technical plan
|
|
||||||
- Task breakdown
|
|
||||||
- Risk mitigation
|
|
||||||
- Innovation justification
|
|
||||||
|
|
||||||
4. **Management Plan** (2-3 pages)
|
|
||||||
- Team organization
|
|
||||||
- Key personnel roles
|
|
||||||
- Collaboration approach
|
|
||||||
- Milestone schedule (Gantt chart)
|
|
||||||
|
|
||||||
5. **Capabilities and Experience** (2-3 pages)
|
|
||||||
- Team qualifications
|
|
||||||
- Relevant facilities and equipment
|
|
||||||
- Similar past programs
|
|
||||||
|
|
||||||
6. **Transition Plan** (1-2 pages)
|
|
||||||
- Path to DoD transition
|
|
||||||
- End users identified
|
|
||||||
- Technology transfer approach
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### DARPA-Specific Considerations
|
|
||||||
|
|
||||||
**Engagement with Program Manager (PM)**:
|
|
||||||
- **Strongly encouraged** to contact PM before submission
|
|
||||||
- Discuss idea alignment with program goals
|
|
||||||
- PM can provide feedback on approach
|
|
||||||
|
|
||||||
**Transformative Impact**:
|
|
||||||
- Must demonstrate potential for "game-changing" impact
|
|
||||||
- Not incremental improvements
|
|
||||||
|
|
||||||
**Technical Risk**:
|
|
||||||
- High-risk approaches acceptable (even encouraged)
|
|
||||||
- Must show mitigation strategies
|
|
||||||
|
|
||||||
**National Security Relevance**:
|
|
||||||
- Clear connection to defense applications
|
|
||||||
- Dual-use (civilian + military) often valuable
|
|
||||||
|
|
||||||
**Metrics for Success**:
|
|
||||||
- Quantifiable milestones
|
|
||||||
- "Go/no-go" decision points
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### DARPA Budget
|
|
||||||
|
|
||||||
**Full Cost Accounting**: Detailed justification required
|
|
||||||
- **Labor**: Hourly rates, hours per task
|
|
||||||
- **Materials**: Itemized
|
|
||||||
- **Equipment**: Justification for purchases
|
|
||||||
- **Travel**: Specific trips with purpose
|
|
||||||
- **Subcontracts**: Detailed subcontract budgets
|
|
||||||
- **Indirect Costs**: Negotiated rates
|
|
||||||
|
|
||||||
**Cost Realism**: Budget must be realistic for proposed work
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### DARPA LaTeX Template
|
|
||||||
|
|
||||||
**Template**: `assets/grants/darpa_baa_response.tex`
|
|
||||||
|
|
||||||
**Resources**:
|
|
||||||
- DARPA Opportunities: https://www.darpa.mil/work-with-us/opportunities
|
|
||||||
- BAA Listings: SAM.gov (formerly FedBizOpps)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Private Foundations
|
## Private Foundations
|
||||||
|
|
||||||
### Gates Foundation
|
Foundation programs change frequently. Start from the exact open call and capture:
|
||||||
|
|
||||||
**Focus Areas**: Global health, poverty alleviation, education
|
- eligibility and geographic restrictions;
|
||||||
**Typical Award**: Varies widely ($100K to $10M+)
|
- concept-note or invitation stage;
|
||||||
|
- narrative questions and character limits;
|
||||||
|
- indirect-cost policy;
|
||||||
|
- budget template and currency;
|
||||||
|
- required partners or letters;
|
||||||
|
- data, open-science, and intellectual-property terms; and
|
||||||
|
- portal deadline and timezone.
|
||||||
|
|
||||||
**Proposal Requirements**:
|
Do not use remembered award sizes or historical success rates as current facts.
|
||||||
- **Letter of Inquiry** (2-3 pages): Initial screening
|
|
||||||
- **Full Proposal** (if invited): 10-15 pages
|
|
||||||
- **Theory of Change**: How intervention leads to impact
|
|
||||||
- **Monitoring & Evaluation**: Metrics, data collection
|
|
||||||
|
|
||||||
**Key Emphases**:
|
## Proposal Compliance Matrix
|
||||||
- Scalability and sustainability
|
|
||||||
- Impact in low-resource settings
|
|
||||||
- Partnerships with local organizations
|
|
||||||
- Data-driven decision making
|
|
||||||
|
|
||||||
---
|
Create a matrix before drafting:
|
||||||
|
|
||||||
### Wellcome Trust
|
| Requirement | Source and section | Limit/format | Owner | Status |
|
||||||
|
|---|---|---|---|---|
|
||||||
|
| Project narrative | NOFO §IV | Example: 12 pages | PI | Drafting |
|
||||||
|
| Biosketch | Agency guide | SciENcv common form | Each senior/key person | Pending |
|
||||||
|
| Budget justification | NOFO §IV | Portal PDF | Administrator | Pending |
|
||||||
|
| Data plan | Policy + NOFO | Example: 2 pages | Data lead | Drafting |
|
||||||
|
|
||||||
**Focus**: Biomedical research, global health
|
Use the exact source language rather than paraphrasing ambiguous limits.
|
||||||
**Geographic**: UK and international
|
|
||||||
**Typical Award**: £100K to £5M
|
|
||||||
|
|
||||||
**Proposal Format** (varies by scheme):
|
## General Proposal Checklist
|
||||||
- **Investigator Awards**: Track record and research vision
|
|
||||||
- **Project Grants**: Specific research project
|
|
||||||
- **Career Development**: Early/mid-career researchers
|
|
||||||
|
|
||||||
**Requirements**:
|
- [ ] Solicitation/NOFO number and amendment date recorded
|
||||||
- Research plan
|
- [ ] Effective agency guide and form set confirmed
|
||||||
- Track record
|
- [ ] Eligibility and registration complete
|
||||||
- Value for money justification
|
- [ ] Every component mapped to a portal field
|
||||||
- Patient and public involvement
|
- [ ] Page, character, font, margin, and file rules verified
|
||||||
|
- [ ] Biosketch/support forms use the required current system
|
||||||
|
- [ ] Budget and cost-sharing rules reviewed institutionally
|
||||||
|
- [ ] Human/animal subjects, export control, security, and data rules addressed
|
||||||
|
- [ ] Required letters and certifications collected
|
||||||
|
- [ ] Portal validation and institutional review completed before the deadline
|
||||||
|
|
||||||
---
|
## Timing
|
||||||
|
|
||||||
### Howard Hughes Medical Institute (HHMI)
|
Begin compliance mapping before writing. Build in time for:
|
||||||
|
|
||||||
**Type**: Investigator appointments (not grants)
|
- collaborator and subaward documents;
|
||||||
**Award**: ~$9M over 7 years (renewable)
|
- SciENcv/common-form certification;
|
||||||
**Focus**: Biomedical research, early-career scientists
|
- institutional budget and compliance review;
|
||||||
|
- PDF conversion and portal validation; and
|
||||||
**Selection**:
|
- correction of errors before the deadline.
|
||||||
- Nomination by institution
|
|
||||||
- Track record of innovation
|
|
||||||
- Research vision for next 5-7 years
|
|
||||||
- Scientific leadership potential
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### Chan Zuckerberg Initiative (CZI)
|
|
||||||
|
|
||||||
**Focus**: Science, education, justice & opportunity
|
|
||||||
**Award Types**:
|
|
||||||
- **Imaging**: Advanced imaging technologies
|
|
||||||
- **Neurodegeneration Challenge**: AD, ALS, PD, FTD
|
|
||||||
- **Single-Cell Biology**: Tools and resources
|
|
||||||
|
|
||||||
**Emphasis**:
|
|
||||||
- Open science (data sharing, open-source)
|
|
||||||
- Collaboration across institutions
|
|
||||||
- Technology development
|
|
||||||
- Diversity and inclusion
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Quick Reference Table
|
|
||||||
|
|
||||||
| Agency | Typical Award | Duration | Key Criteria | Template |
|
|
||||||
|--------|--------------|----------|--------------|----------|
|
|
||||||
| **NSF** | $100K-500K/yr | 3-5 yrs | Intellectual Merit + Broader Impacts | `nsf_proposal_template.tex` |
|
|
||||||
| **NIH R01** | $250K-500K/yr | 5 yrs | Significance, Innovation, Approach | `nih_r01_template.tex` |
|
|
||||||
| **NIH R21** | $275K total | 2 yrs | Exploratory, high-risk | `nih_r21_template.tex` |
|
|
||||||
| **DOE** | $200K-1M/yr | 3 yrs | Energy relevance, TRLs | `doe_proposal_template.tex` |
|
|
||||||
| **DARPA** | $500K-5M/yr | 2-4 yrs | Transformative, Heilmeier | `darpa_baa_response.tex` |
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## General Best Practices
|
|
||||||
|
|
||||||
### Writing Effective Proposals
|
|
||||||
|
|
||||||
1. **Start early**: 2-3 months minimum
|
|
||||||
2. **Read the call carefully**: Follow requirements exactly
|
|
||||||
3. **Know your reviewers**: Write for expert audience
|
|
||||||
4. **Tell a story**: Compelling narrative with clear logic
|
|
||||||
5. **Be specific**: Concrete objectives, methods, outcomes
|
|
||||||
6. **Show feasibility**: Preliminary data, expertise
|
|
||||||
7. **Address weaknesses**: Acknowledge and mitigate risks
|
|
||||||
|
|
||||||
### Common Mistakes to Avoid
|
|
||||||
|
|
||||||
1. **Vague objectives**: "Understand X" → "Determine whether X causes Y"
|
|
||||||
2. **Lack of innovation**: Incremental vs. transformative
|
|
||||||
3. **Poor broader impacts** (NSF): Generic, unintegrated
|
|
||||||
4. **Weak specific aims** (NIH): Most critical page!
|
|
||||||
5. **Missing preliminary data**: Show feasibility
|
|
||||||
6. **Unrealistic timeline**: Be honest about what's achievable
|
|
||||||
7. **Formatting violations**: Auto-rejection possible
|
|
||||||
8. **Typos and errors**: Suggests lack of care
|
|
||||||
|
|
||||||
### Timeline for Proposal Development
|
|
||||||
|
|
||||||
**3 months before deadline**:
|
|
||||||
- Identify opportunity
|
|
||||||
- Assemble team
|
|
||||||
- Outline aims/objectives
|
|
||||||
|
|
||||||
**2 months before**:
|
|
||||||
- Draft aims/objectives
|
|
||||||
- Preliminary budget
|
|
||||||
- Contact program officer (if allowed)
|
|
||||||
|
|
||||||
**1 month before**:
|
|
||||||
- Full first draft
|
|
||||||
- Internal review
|
|
||||||
- Revise based on feedback
|
|
||||||
|
|
||||||
**2 weeks before**:
|
|
||||||
- Final revisions
|
|
||||||
- Proofread carefully
|
|
||||||
- Assemble all documents
|
|
||||||
|
|
||||||
**1 week before**:
|
|
||||||
- Institutional review/approval
|
|
||||||
- Budget finalization
|
|
||||||
- Submission system upload
|
|
||||||
|
|
||||||
**2 days before**:
|
|
||||||
- Final check
|
|
||||||
- Submit (don't wait until deadline!)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Resources
|
|
||||||
|
|
||||||
### Grant Writing Guides
|
|
||||||
- NSF PAPPG: https://www.nsf.gov/publications/pub_summ.jsp?ods_key=pappg
|
|
||||||
- NIH Application Guide: https://grants.nih.gov/grants/how-to-apply-application-guide.html
|
|
||||||
- GrantForward (database): https://www.grantforward.com/
|
|
||||||
- Pivot (database): https://pivot.proquest.com/
|
|
||||||
|
|
||||||
### Institutional Resources
|
|
||||||
- Office of Sponsored Research (OSR)
|
|
||||||
- Grant writing workshops
|
|
||||||
- Internal mock reviews
|
|
||||||
- Budget/compliance offices
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Summary
|
|
||||||
|
|
||||||
**Key Takeaways**:
|
|
||||||
|
|
||||||
1. **Know the agency**: Different missions, different emphases
|
|
||||||
2. **Follow the rules**: Page limits, fonts, margins strictly enforced
|
|
||||||
3. **Tell a compelling story**: Clear problem, innovative solution, feasible plan
|
|
||||||
4. **Demonstrate impact**: Intellectual merit (NSF/NIH) or mission relevance (DOE/DARPA)
|
|
||||||
5. **Show feasibility**: Preliminary data, team expertise, resources
|
|
||||||
6. **Budget realistically**: Justify all costs
|
|
||||||
7. **Proofread carefully**: Typos undermine credibility
|
|
||||||
8. **Submit early**: Technical glitches happen
|
|
||||||
|
|
||||||
**Remember**: Grant writing is a skill developed over time. Seek feedback, revise, and persist!
|
|
||||||
|
|
||||||
|
Never use a generic template as evidence that the final package is compliant.
|
||||||
|
|||||||
+213
@@ -0,0 +1,213 @@
|
|||||||
|
---
|
||||||
|
title: "Journal Formatting Requirements"
|
||||||
|
task: ""
|
||||||
|
lineage_type: import
|
||||||
|
upstream_source: https://github.com/K-Dense-AI/scientific-agent-skills/blob/e8727695/skills/venue-templates/references/journals_formatting.md
|
||||||
|
upstream_sha: e8727695
|
||||||
|
imported_at: 2026-07-20
|
||||||
|
prompt_class: catalogue
|
||||||
|
upstream_changes: accepted
|
||||||
|
author: upstream
|
||||||
|
validated: false
|
||||||
|
---
|
||||||
|
|
||||||
|
# Journal Formatting Requirements
|
||||||
|
|
||||||
|
Journal requirements vary by journal, article type, and submission stage. Publisher-wide conventions are useful for discovery but do not replace the target journal's current Guide for Authors.
|
||||||
|
|
||||||
|
**Reviewed:** 2026-07-20
|
||||||
|
|
||||||
|
## Verification Workflow
|
||||||
|
|
||||||
|
Before formatting:
|
||||||
|
|
||||||
|
1. identify the exact journal and article type;
|
||||||
|
2. open the journal's official author instructions;
|
||||||
|
3. determine whether the initial submission is format-flexible;
|
||||||
|
4. distinguish initial-submission rules from revised/final-production rules;
|
||||||
|
5. record length, abstract, display-item, data/code, reporting, and disclosure requirements; and
|
||||||
|
6. use the official template only when the journal requires or recommends it.
|
||||||
|
|
||||||
|
Do not apply rules from a flagship journal to every journal in the same publisher family.
|
||||||
|
|
||||||
|
## Nature Portfolio
|
||||||
|
|
||||||
|
### Nature
|
||||||
|
|
||||||
|
**Official resources**
|
||||||
|
|
||||||
|
- Author hub: https://www.nature.com/nature/for-authors
|
||||||
|
- Initial submission: https://www.nature.com/nature/for-authors/initial-submission
|
||||||
|
- Formatting guide: https://www.nature.com/nature/for-authors/formatting-guide
|
||||||
|
|
||||||
|
Nature states that initial submissions are flexible in format within reason. Authors are encouraged to combine text and figures in one Word file or PDF for review. The formatting guide describes article formats and typical final print lengths; these are not a generic “five-page submission limit.”
|
||||||
|
|
||||||
|
For Articles, the formatting guide describes:
|
||||||
|
|
||||||
|
- a fully referenced summary paragraph, ideally no more than 200 words;
|
||||||
|
- typical final print lengths that differ for physical-science and biological/clinical/social-science papers; and
|
||||||
|
- detailed figure, reference, methods, and reporting requirements.
|
||||||
|
|
||||||
|
Use `assets/journals/nature_article.tex` only as a writing scaffold. It is not an official Nature class or a guarantee of compliance.
|
||||||
|
|
||||||
|
### Other Nature Portfolio journals
|
||||||
|
|
||||||
|
Open the exact journal's **Submission Guidelines**. Some Nature Portfolio journals explicitly accept PDF, Word, or compiled TeX/LaTeX for a format-flexible initial submission, while others provide journal-specific structure and final-format instructions.
|
||||||
|
|
||||||
|
Do not assume that Nature, Nature Communications, Scientific Reports, and subject journals share one word limit or template.
|
||||||
|
|
||||||
|
## Science Family
|
||||||
|
|
||||||
|
**Official starting point**
|
||||||
|
|
||||||
|
- Science author instructions: https://www.science.org/content/page/instructions-authors
|
||||||
|
|
||||||
|
Resolve the exact journal and contribution type before applying length, abstract, reference, or supplementary-material rules. Science, Science Advances, and specialist journals have different workflows.
|
||||||
|
|
||||||
|
No Science template is bundled in this skill. Use the official instructions and files provided by the target journal.
|
||||||
|
|
||||||
|
## PLOS
|
||||||
|
|
||||||
|
**Official resources**
|
||||||
|
|
||||||
|
- PLOS ONE submission guidelines: https://journals.plos.org/plosone/s/submission-guidelines
|
||||||
|
- PLOS journal-specific LaTeX pages are linked from each journal's author resources.
|
||||||
|
|
||||||
|
PLOS supplies an official LaTeX package and BibTeX style for LaTeX submissions. Follow the target PLOS journal's package and upload instructions; manuscript and figure-file handling can be specific to the journal and submission stage.
|
||||||
|
|
||||||
|
`assets/journals/plos_one.tex` is a drafting scaffold, not a substitute for the current PLOS package.
|
||||||
|
|
||||||
|
## Cell Press
|
||||||
|
|
||||||
|
**Official starting point**
|
||||||
|
|
||||||
|
- Cell author resources: https://www.cell.com/cell/authors
|
||||||
|
|
||||||
|
Check the exact journal and article type for:
|
||||||
|
|
||||||
|
- Summary and Highlights limits;
|
||||||
|
- graphical abstract or eTOC requirements;
|
||||||
|
- STAR Methods or other methods structure;
|
||||||
|
- Resource Availability and Lead Contact sections;
|
||||||
|
- Limitations of the Study;
|
||||||
|
- data/code availability declarations; and
|
||||||
|
- generative-AI or AI-assisted-technology declarations.
|
||||||
|
|
||||||
|
No Cell Press LaTeX template is bundled. Use `references/cell_press_style.md` for writing guidance and the official author resources for submission requirements.
|
||||||
|
|
||||||
|
## IEEE
|
||||||
|
|
||||||
|
**Official resources**
|
||||||
|
|
||||||
|
- IEEE journal templates: https://journals.ieeeauthorcenter.ieee.org/create-your-ieee-journal-article/authoring-tools-and-templates/tools-for-ieee-authors/ieee-article-templates
|
||||||
|
- IEEE Template Selector: https://template-selector.ieee.org/
|
||||||
|
|
||||||
|
Use the Template Selector to resolve the publication-specific Word or LaTeX package. Page limits, review layout, biographies, open-access declarations, and overlength charges vary by journal.
|
||||||
|
|
||||||
|
No IEEE template is bundled in this skill.
|
||||||
|
|
||||||
|
## ACM
|
||||||
|
|
||||||
|
**Official resources**
|
||||||
|
|
||||||
|
- ACM LaTeX preparation: https://authors.acm.org/proceedings/production-information/preparing-your-article-with-latex
|
||||||
|
- ACM journals submission process: https://authors.acm.org/journals/submission-process
|
||||||
|
|
||||||
|
ACM uses the `acmart` class with publication-specific options and the TAPS production workflow. The review format selected by a conference or journal may differ from the final TAPS output.
|
||||||
|
|
||||||
|
No ACM template is bundled. Use the official ACM Master Article Template and the target publication's instructions.
|
||||||
|
|
||||||
|
## Elsevier
|
||||||
|
|
||||||
|
**Official resource**
|
||||||
|
|
||||||
|
- LaTeX instructions: https://www.elsevier.com/researcher/author/policies-and-guidelines/latex-instructions
|
||||||
|
|
||||||
|
Elsevier documents the `elsarticle` class and provides separate CAS single- and double-column templates. The exact journal's Guide for Authors determines word limits, article structure, reference style, highlights, graphical abstracts, and whether PDF-only initial submission is accepted.
|
||||||
|
|
||||||
|
Bundled examples:
|
||||||
|
|
||||||
|
| File | Citation mode | Matching bibliography style |
|
||||||
|
|---|---|---|
|
||||||
|
| `assets/journals/elsarticle-template-num.tex` | numeric | `elsarticle-num.bst` |
|
||||||
|
| `assets/journals/elsarticle-template-num-names.tex` | numeric, sorted/compressed | `elsarticle-num-names.bst` |
|
||||||
|
| `assets/journals/elsarticle-template-harv.tex` | author-year | `elsarticle-harv.bst` |
|
||||||
|
|
||||||
|
These are examples for the `elsarticle` workflow. Compare them with the current class documentation and target journal instructions before submission.
|
||||||
|
|
||||||
|
## Other Publisher and Society Starting Points
|
||||||
|
|
||||||
|
| Publisher or journal | Official starting point | Key caution |
|
||||||
|
|---|---|---|
|
||||||
|
| Springer Nature journals | Target journal's “Submission Guidelines” | Template and reference style vary by journal |
|
||||||
|
| BMC | https://www.biomedcentral.com/getpublished | Article type and declaration sections vary |
|
||||||
|
| Frontiers | https://www.frontiersin.org/guidelines/author-guidelines | Check article-type limits and required statements |
|
||||||
|
| PNAS | https://www.pnas.org/author-center | Check article type and current significance-statement rules |
|
||||||
|
| APS / PRL | https://journals.aps.org/authors | Use current REVTeX and journal-specific length rules |
|
||||||
|
| NEJM | https://www.nejm.org/author-center | Use article-type instructions and reporting guidelines |
|
||||||
|
| The Lancet | https://www.thelancet.com/what-we-publish | Use journal and article-type author guidance |
|
||||||
|
|
||||||
|
## What to Extract From Author Instructions
|
||||||
|
|
||||||
|
### Manuscript structure
|
||||||
|
|
||||||
|
- article type and section order;
|
||||||
|
- structured or unstructured abstract;
|
||||||
|
- word, character, display-item, and reference limits;
|
||||||
|
- required methods, limitations, reporting, and availability sections; and
|
||||||
|
- title-page and contributor information.
|
||||||
|
|
||||||
|
### Files and formatting
|
||||||
|
|
||||||
|
- accepted initial manuscript format;
|
||||||
|
- whether figures are embedded or uploaded separately;
|
||||||
|
- official Word/LaTeX package;
|
||||||
|
- line numbering, page numbering, and spacing;
|
||||||
|
- figure dimensions, color mode, and resolution;
|
||||||
|
- editable table requirements; and
|
||||||
|
- source archive requirements after acceptance.
|
||||||
|
|
||||||
|
### Policy and declarations
|
||||||
|
|
||||||
|
- authorship and contributor roles;
|
||||||
|
- competing interests and funding;
|
||||||
|
- ethics approval, consent, and trial registration;
|
||||||
|
- data, code, and materials availability;
|
||||||
|
- preprint and related-manuscript policy;
|
||||||
|
- reporting guideline/checklist; and
|
||||||
|
- use of generative AI or AI-assisted tools.
|
||||||
|
|
||||||
|
## Initial Submission Versus Production
|
||||||
|
|
||||||
|
Many journals accept a readable, format-flexible initial PDF and impose detailed house style only after revision or acceptance. Formatting a first submission to mimic the published two-column layout may add work without improving compliance.
|
||||||
|
|
||||||
|
Use this order:
|
||||||
|
|
||||||
|
1. satisfy the current initial-submission requirements;
|
||||||
|
2. preserve editable source and high-quality figures;
|
||||||
|
3. wait for journal-specific revision or production instructions; and
|
||||||
|
4. reformat only when requested or required.
|
||||||
|
|
||||||
|
## Bundled Asset Inventory
|
||||||
|
|
||||||
|
Only these journal-oriented assets are present:
|
||||||
|
|
||||||
|
- `assets/journals/nature_article.tex`
|
||||||
|
- `assets/journals/plos_one.tex`
|
||||||
|
- `assets/journals/neurips_article.tex`
|
||||||
|
- three Elsevier `elsarticle` examples and their `.bst` files
|
||||||
|
|
||||||
|
If a template is not in this list, obtain it from the official source. Do not invent a relative asset path.
|
||||||
|
|
||||||
|
## Final Journal Checklist
|
||||||
|
|
||||||
|
- [ ] Exact journal and article type confirmed
|
||||||
|
- [ ] Official instructions checked and dated
|
||||||
|
- [ ] Initial versus revised/final rules distinguished
|
||||||
|
- [ ] Official template used if required
|
||||||
|
- [ ] Length and display-item limits checked
|
||||||
|
- [ ] Required reporting guideline and checklist included
|
||||||
|
- [ ] Ethics, consent, trial registration, and disclosures complete
|
||||||
|
- [ ] Data/code/materials statements complete
|
||||||
|
- [ ] Figures and tables meet current technical requirements
|
||||||
|
- [ ] Source archive and PDF reviewed in the submission portal
|
||||||
+10
-9
@@ -2,9 +2,9 @@
|
|||||||
title: "Medical Journal Writing Style Guide"
|
title: "Medical Journal Writing Style Guide"
|
||||||
task: ""
|
task: ""
|
||||||
lineage_type: import
|
lineage_type: import
|
||||||
upstream_source: https://github.com/K-Dense-AI/scientific-agent-skills/blob/9c9bd2e9/skills/venue-templates/references/medical_journal_styles.md
|
upstream_source: https://github.com/K-Dense-AI/scientific-agent-skills/blob/e8727695/skills/venue-templates/references/medical_journal_styles.md
|
||||||
upstream_sha: 9c9bd2e9
|
upstream_sha: e8727695
|
||||||
imported_at: 2026-06-27
|
imported_at: 2026-07-20
|
||||||
prompt_class: unknown
|
prompt_class: unknown
|
||||||
upstream_changes: accepted
|
upstream_changes: accepted
|
||||||
author: upstream
|
author: upstream
|
||||||
@@ -15,7 +15,9 @@ validated: false
|
|||||||
|
|
||||||
Comprehensive writing guide for NEJM, Lancet, JAMA, BMJ, Annals of Internal Medicine, and other major medical journals.
|
Comprehensive writing guide for NEJM, Lancet, JAMA, BMJ, Annals of Internal Medicine, and other major medical journals.
|
||||||
|
|
||||||
**Last Updated**: 2024
|
**Reviewed**: 2026-07-20
|
||||||
|
|
||||||
|
Article-type instructions and reporting guidelines change. Verify every numeric limit with the journal's current author center.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -210,7 +212,7 @@ treated (NNT=40; 95% CI, 28 to 67)."
|
|||||||
- Why this matters clinically
|
- Why this matters clinically
|
||||||
|
|
||||||
```
|
```
|
||||||
"Type 2 diabetes affects more than 450 million adults worldwide and is
|
"Type 2 diabetes affects hundreds of millions of adults worldwide and is
|
||||||
a leading cause of cardiovascular disease, renal failure, and premature
|
a leading cause of cardiovascular disease, renal failure, and premature
|
||||||
death. Despite advances in glucose-lowering therapies, patients with
|
death. Despite advances in glucose-lowering therapies, patients with
|
||||||
diabetes continue to face a two- to four-fold increased risk of
|
diabetes continue to face a two- to four-fold increased risk of
|
||||||
@@ -382,8 +384,7 @@ longer periods.
|
|||||||
|
|
||||||
- **Word limit**: 2,700 words (excluding abstract, references)
|
- **Word limit**: 2,700 words (excluding abstract, references)
|
||||||
- **Abstract**: 250 words, structured
|
- **Abstract**: 250 words, structured
|
||||||
- **References**: ~40-50 typical
|
- **References and display items**: Check the current Original Article instructions in the NEJM Author Center; do not rely on cached generic counts
|
||||||
- **Figures/Tables**: 4-5 combined
|
|
||||||
- **Style**: Definitive, authoritative
|
- **Style**: Definitive, authoritative
|
||||||
- **Emphasis**: Major clinical trials, transformative research
|
- **Emphasis**: Major clinical trials, transformative research
|
||||||
|
|
||||||
@@ -424,7 +425,7 @@ longer periods.
|
|||||||
|
|
||||||
### CONSORT (RCTs)
|
### CONSORT (RCTs)
|
||||||
|
|
||||||
**25-item checklist** including:
|
**CONSORT 2025 uses a 30-item checklist and flow diagram** covering:
|
||||||
- Trial design, randomization, blinding
|
- Trial design, randomization, blinding
|
||||||
- Participant flow (diagram required)
|
- Participant flow (diagram required)
|
||||||
- All outcomes with effect sizes and CIs
|
- All outcomes with effect sizes and CIs
|
||||||
@@ -544,5 +545,5 @@ Standard presentation:
|
|||||||
- `venue_writing_styles.md` - Master style overview
|
- `venue_writing_styles.md` - Master style overview
|
||||||
- `journals_formatting.md` - Technical formatting requirements
|
- `journals_formatting.md` - Technical formatting requirements
|
||||||
- `reviewer_expectations.md` - What medical reviewers seek
|
- `reviewer_expectations.md` - What medical reviewers seek
|
||||||
- Reporting guideline resources: consort-statement.org, strobe-statement.org
|
- Reporting guideline resources: https://www.consort-spirit.org/ and https://www.strobe-statement.org/
|
||||||
|
|
||||||
|
|||||||
+24
-18
@@ -2,9 +2,9 @@
|
|||||||
title: "ML Conference Writing Style Guide"
|
title: "ML Conference Writing Style Guide"
|
||||||
task: ""
|
task: ""
|
||||||
lineage_type: import
|
lineage_type: import
|
||||||
upstream_source: https://github.com/K-Dense-AI/scientific-agent-skills/blob/9c9bd2e9/skills/venue-templates/references/ml_conference_style.md
|
upstream_source: https://github.com/K-Dense-AI/scientific-agent-skills/blob/e8727695/skills/venue-templates/references/ml_conference_style.md
|
||||||
upstream_sha: 9c9bd2e9
|
upstream_sha: e8727695
|
||||||
imported_at: 2026-06-27
|
imported_at: 2026-07-20
|
||||||
prompt_class: catalogue
|
prompt_class: catalogue
|
||||||
upstream_changes: accepted
|
upstream_changes: accepted
|
||||||
author: upstream
|
author: upstream
|
||||||
@@ -15,7 +15,9 @@ validated: false
|
|||||||
|
|
||||||
Comprehensive writing guide for NeurIPS, ICML, ICLR, CVPR, ECCV, ICCV, and other major machine learning and computer vision conferences.
|
Comprehensive writing guide for NeurIPS, ICML, ICLR, CVPR, ECCV, ICCV, and other major machine learning and computer vision conferences.
|
||||||
|
|
||||||
**Last Updated**: 2024
|
**Reviewed**: 2026-07-20
|
||||||
|
|
||||||
|
Annual format, checklist, and review rules must be checked in the current author kit. See `conferences_formatting.md` for source links and verified 2026 snapshots.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -347,7 +349,7 @@ FlashAttention-1 (baseline) | 1.0x | 1.0x
|
|||||||
- **Organized by theme**: Not chronological
|
- **Organized by theme**: Not chronological
|
||||||
- **Position your work**: How you differ from each line of work
|
- **Position your work**: How you differ from each line of work
|
||||||
- **Fair characterization**: Don't misrepresent prior work
|
- **Fair characterization**: Don't misrepresent prior work
|
||||||
- **Recent citations**: Include 2023-2024 papers
|
- **Recent citations**: Include relevant work from the last two to three years as well as foundational papers
|
||||||
|
|
||||||
### Example Structure
|
### Example Structure
|
||||||
|
|
||||||
@@ -401,9 +403,9 @@ hold for future hardware generations.
|
|||||||
|
|
||||||
## Reproducibility
|
## Reproducibility
|
||||||
|
|
||||||
### Reproducibility Checklist (NeurIPS/ICML)
|
### Paper and Reproducibility Checklists
|
||||||
|
|
||||||
Most ML conferences require a reproducibility checklist covering:
|
Many ML conferences use a paper checklist, reproducibility statement, or related disclosures. The exact name and questions vary. Common topics include:
|
||||||
|
|
||||||
- [ ] Code availability
|
- [ ] Code availability
|
||||||
- [ ] Dataset availability
|
- [ ] Dataset availability
|
||||||
@@ -472,7 +474,7 @@ Self-contained captions that explain:
|
|||||||
|
|
||||||
### Reference Guidelines
|
### Reference Guidelines
|
||||||
|
|
||||||
- **Cite recent work**: 2022-2024 papers expected
|
- **Cite recent work**: Cover relevant work from the last two to three years without omitting foundational results
|
||||||
- **Don't over-cite yourself**: Raises bias concerns
|
- **Don't over-cite yourself**: Raises bias concerns
|
||||||
- **Cite arxiv appropriately**: Use published version when available
|
- **Cite arxiv appropriately**: Use published version when available
|
||||||
- **Include all relevant prior work**: Missing citations hurt review
|
- **Include all relevant prior work**: Missing citations hurt review
|
||||||
@@ -481,33 +483,37 @@ Self-contained captions that explain:
|
|||||||
|
|
||||||
## Venue-Specific Notes
|
## Venue-Specific Notes
|
||||||
|
|
||||||
|
The limits below are verified 2026 snapshots for initial submissions. Recheck the exact year and track before use.
|
||||||
|
|
||||||
### NeurIPS
|
### NeurIPS
|
||||||
|
|
||||||
- **8 pages** main + unlimited appendix/references
|
- **9 content pages**, including figures
|
||||||
- **Broader Impact** section sometimes required
|
- Acknowledgments, references, the required Paper Checklist, and optional technical appendices do not count as content pages
|
||||||
- **Reproducibility checklist** mandatory
|
- A separately titled Broader Impacts section is not universally required; discuss impacts where relevant and answer the checklist
|
||||||
- OpenReview submission, public reviews
|
- Initial submission uses the anonymous mode of the official style
|
||||||
|
|
||||||
### ICML
|
### ICML
|
||||||
|
|
||||||
- **8 pages** main + unlimited appendix/references
|
- **8 pages** main body + additional references/appendices in the same PDF
|
||||||
- Strong emphasis on **theory + experiments**
|
- Strong emphasis on **theory + experiments**
|
||||||
- Reproducibility statement encouraged
|
- Use the official 2026 LaTeX style and anonymized submission mode
|
||||||
|
|
||||||
### ICLR
|
### ICLR
|
||||||
|
|
||||||
- **8 pages** main (camera-ready can exceed)
|
- **9 pages** main text for initial submission; 10 during discussion/rebuttal and camera-ready
|
||||||
- OpenReview with **public reviews and discussion**
|
- OpenReview with **public reviews and discussion**
|
||||||
- Author response period is interactive
|
- Author response period is interactive
|
||||||
- Strong emphasis on **novelty and insight**
|
- Strong emphasis on **novelty and insight**
|
||||||
|
|
||||||
### CVPR/ICCV/ECCV
|
### CVPR
|
||||||
|
|
||||||
- **8 pages** main including references
|
- **8 pages** including figures and tables, excluding cited-reference-only pages
|
||||||
- **Supplementary video** encouraged
|
- Use the official CVPR 2026 author kit and follow its external-link restrictions
|
||||||
- Heavy emphasis on **visual results**
|
- Heavy emphasis on **visual results**
|
||||||
- Benchmark performance critical
|
- Benchmark performance critical
|
||||||
|
|
||||||
|
ICCV and ECCV have independent yearly instructions; do not inherit CVPR's current rules.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Common Mistakes
|
## Common Mistakes
|
||||||
|
|||||||
+8
-6
@@ -2,9 +2,9 @@
|
|||||||
title: "Nature and Science Writing Style Guide"
|
title: "Nature and Science Writing Style Guide"
|
||||||
task: ""
|
task: ""
|
||||||
lineage_type: import
|
lineage_type: import
|
||||||
upstream_source: https://github.com/K-Dense-AI/scientific-agent-skills/blob/9c9bd2e9/skills/venue-templates/references/nature_science_style.md
|
upstream_source: https://github.com/K-Dense-AI/scientific-agent-skills/blob/e8727695/skills/venue-templates/references/nature_science_style.md
|
||||||
upstream_sha: 9c9bd2e9
|
upstream_sha: e8727695
|
||||||
imported_at: 2026-06-27
|
imported_at: 2026-07-20
|
||||||
prompt_class: catalogue
|
prompt_class: catalogue
|
||||||
upstream_changes: accepted
|
upstream_changes: accepted
|
||||||
author: upstream
|
author: upstream
|
||||||
@@ -15,7 +15,9 @@ validated: false
|
|||||||
|
|
||||||
Comprehensive writing guide for Nature, Science, and related high-impact multidisciplinary journals (Nature Communications, Science Advances, PNAS).
|
Comprehensive writing guide for Nature, Science, and related high-impact multidisciplinary journals (Nature Communications, Science Advances, PNAS).
|
||||||
|
|
||||||
**Last Updated**: 2024
|
**Reviewed**: 2026-07-20
|
||||||
|
|
||||||
|
Writing guidance is descriptive. Check the exact journal, contribution type, and current author instructions before applying numeric limits.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -63,9 +65,9 @@ Nature and Science are the world's premier multidisciplinary scientific journals
|
|||||||
### Style Requirements
|
### Style Requirements
|
||||||
|
|
||||||
- **Flowing paragraphs** (NOT structured with labeled sections)
|
- **Flowing paragraphs** (NOT structured with labeled sections)
|
||||||
- **150-200 words** for Nature; up to 250 for Nature Communications
|
- **Nature Articles**: the summary paragraph is ideally no more than 200 words; other journals and contribution types vary
|
||||||
- **No citations** in abstract
|
- **No citations** in abstract
|
||||||
- **No abbreviations** (or define at first use if essential)
|
- **Avoid numbers, abbreviations, acronyms, and measurements unless essential** in a Nature summary paragraph
|
||||||
- **Self-contained**: Understandable without reading the paper
|
- **Self-contained**: Understandable without reading the paper
|
||||||
|
|
||||||
### Abstract Structure (Implicit)
|
### Abstract Structure (Implicit)
|
||||||
|
|||||||
+18
-13
@@ -2,9 +2,9 @@
|
|||||||
title: "Reviewer Expectations by Venue"
|
title: "Reviewer Expectations by Venue"
|
||||||
task: ""
|
task: ""
|
||||||
lineage_type: import
|
lineage_type: import
|
||||||
upstream_source: https://github.com/K-Dense-AI/scientific-agent-skills/blob/9c9bd2e9/skills/venue-templates/references/reviewer_expectations.md
|
upstream_source: https://github.com/K-Dense-AI/scientific-agent-skills/blob/e8727695/skills/venue-templates/references/reviewer_expectations.md
|
||||||
upstream_sha: 9c9bd2e9
|
upstream_sha: e8727695
|
||||||
imported_at: 2026-06-27
|
imported_at: 2026-07-20
|
||||||
prompt_class: unknown
|
prompt_class: unknown
|
||||||
upstream_changes: accepted
|
upstream_changes: accepted
|
||||||
author: upstream
|
author: upstream
|
||||||
@@ -15,7 +15,9 @@ validated: false
|
|||||||
|
|
||||||
Understanding what reviewers look for at different venues is essential for crafting successful submissions. This guide covers evaluation criteria, common rejection reasons, and how to address reviewer concerns.
|
Understanding what reviewers look for at different venues is essential for crafting successful submissions. This guide covers evaluation criteria, common rejection reasons, and how to address reviewer concerns.
|
||||||
|
|
||||||
**Last Updated**: 2024
|
**Reviewed**: 2026-07-20
|
||||||
|
|
||||||
|
Review forms and scoring scales change by cycle. Use the current reviewer guidelines when predicting criteria or preparing a rebuttal.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -43,7 +45,7 @@ Reviewers at different venues prioritize different aspects. Understanding these
|
|||||||
|
|
||||||
### Review Process
|
### Review Process
|
||||||
|
|
||||||
1. **Editorial triage**: Most papers rejected without review (Nature: ~92%)
|
1. **Editorial triage**: Highly selective journals reject many submissions before external review; do not confuse overall rejection rate with desk-rejection rate
|
||||||
2. **Expert review**: 2-4 reviewers if sent out
|
2. **Expert review**: 2-4 reviewers if sent out
|
||||||
3. **Cross-discipline reviewer**: Often includes non-specialist
|
3. **Cross-discipline reviewer**: Often includes non-specialist
|
||||||
4. **Quick turnaround**: First decision typically 2-4 weeks
|
4. **Quick turnaround**: First decision typically 2-4 weeks
|
||||||
@@ -188,15 +190,18 @@ Reviewers at different venues prioritize different aspects. Understanding these
|
|||||||
|
|
||||||
### Scoring Dimensions
|
### Scoring Dimensions
|
||||||
|
|
||||||
Typical NeurIPS/ICML scoring:
|
Current ML review forms commonly separate dimensions such as:
|
||||||
|
|
||||||
| Dimension | Score Range | What's Evaluated |
|
| Dimension | What's Evaluated |
|
||||||
|-----------|-------------|------------------|
|
|-----------|------------------|
|
||||||
| **Soundness** | 1-4 | Technical correctness |
|
| **Quality** | Technical correctness, evidence, and rigor |
|
||||||
| **Contribution** | 1-4 | Significance of results |
|
| **Clarity** | Organization, explanation, and reproducibility |
|
||||||
| **Presentation** | 1-4 | Clarity and organization |
|
| **Significance** | Importance and likely impact |
|
||||||
| **Overall** | 1-10 | Holistic assessment |
|
| **Originality** | Novelty relative to prior work |
|
||||||
| **Confidence** | 1-5 | Reviewer expertise |
|
| **Overall assessment** | Holistic recommendation under the current rubric |
|
||||||
|
| **Confidence** | Reviewer's expertise and certainty |
|
||||||
|
|
||||||
|
Do not cache numeric ranges across years or venues; quote the current review form when a score matters.
|
||||||
|
|
||||||
### What Gets a Paper Rejected
|
### What Gets a Paper Rejected
|
||||||
|
|
||||||
|
|||||||
+7
-5
@@ -2,9 +2,9 @@
|
|||||||
title: "Venue Writing Styles: Master Guide"
|
title: "Venue Writing Styles: Master Guide"
|
||||||
task: ""
|
task: ""
|
||||||
lineage_type: import
|
lineage_type: import
|
||||||
upstream_source: https://github.com/K-Dense-AI/scientific-agent-skills/blob/9c9bd2e9/skills/venue-templates/references/venue_writing_styles.md
|
upstream_source: https://github.com/K-Dense-AI/scientific-agent-skills/blob/e8727695/skills/venue-templates/references/venue_writing_styles.md
|
||||||
upstream_sha: 9c9bd2e9
|
upstream_sha: e8727695
|
||||||
imported_at: 2026-06-27
|
imported_at: 2026-07-20
|
||||||
prompt_class: unknown
|
prompt_class: unknown
|
||||||
upstream_changes: accepted
|
upstream_changes: accepted
|
||||||
author: upstream
|
author: upstream
|
||||||
@@ -15,7 +15,9 @@ validated: false
|
|||||||
|
|
||||||
This guide provides an overview of how writing style varies across publication venues. Understanding these differences is essential for crafting papers that read like authentic publications at each venue.
|
This guide provides an overview of how writing style varies across publication venues. Understanding these differences is essential for crafting papers that read like authentic publications at each venue.
|
||||||
|
|
||||||
**Last Updated**: 2024
|
**Reviewed**: 2026-07-20
|
||||||
|
|
||||||
|
Writing conventions are descriptive, not submission requirements. Check the exact venue and article type before treating any element as mandatory.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -173,7 +175,7 @@ ML abstracts are **dense and numbers-focused**:
|
|||||||
### ACL/EMNLP (NLP)
|
### ACL/EMNLP (NLP)
|
||||||
|
|
||||||
- **Task-focused**: Clear problem definition
|
- **Task-focused**: Clear problem definition
|
||||||
- **Benchmark-heavy**: Standard datasets (GLUE, SQuAD, etc.)
|
- **Evaluation-heavy**: Use task-appropriate current benchmarks, strong model baselines, human evaluation, or safety/robustness tests; classic datasets such as GLUE or SQuAD remain relevant only for matching tasks
|
||||||
- **Error analysis valued**: Where does it fail?
|
- **Error analysis valued**: Where does it fail?
|
||||||
- **Human evaluation**: Often expected alongside automatic metrics
|
- **Human evaluation**: Often expected alongside automatic metrics
|
||||||
- **Ethical considerations**: Bias, fairness, environmental cost
|
- **Ethical considerations**: Bias, fairness, environmental cost
|
||||||
|
|||||||
+166
-513
@@ -1,601 +1,254 @@
|
|||||||
---
|
---
|
||||||
title: "Core Concepts and Technical Details"
|
title: "Core Concepts and Data Structures"
|
||||||
task: ""
|
task: ""
|
||||||
lineage_type: import
|
lineage_type: import
|
||||||
upstream_source: https://github.com/K-Dense-AI/scientific-agent-skills/blob/9c9bd2e9/skills/torchdrug/references/core_concepts.md
|
upstream_source: https://github.com/K-Dense-AI/scientific-agent-skills/blob/e8727695/skills/torchdrug/references/core_concepts.md
|
||||||
upstream_sha: 9c9bd2e9
|
upstream_sha: e8727695
|
||||||
imported_at: 2026-06-27
|
imported_at: 2026-07-20
|
||||||
prompt_class: prompt
|
prompt_class: prompt
|
||||||
upstream_changes: accepted
|
upstream_changes: accepted
|
||||||
author: upstream
|
author: upstream
|
||||||
validated: false
|
validated: false
|
||||||
---
|
---
|
||||||
|
|
||||||
# Core Concepts and Technical Details
|
# Core Concepts and Data Structures
|
||||||
|
|
||||||
## Overview
|
This reference follows the
|
||||||
|
[TorchDrug 0.2.1 data API](https://torchdrug.ai/docs/api/data.html),
|
||||||
|
[quick start](https://torchdrug.ai/docs/quick_start.html), and
|
||||||
|
[notes](https://torchdrug.ai/docs/notes/).
|
||||||
|
|
||||||
This reference covers TorchDrug's fundamental architecture, design principles, and technical implementation details.
|
## Component hierarchy
|
||||||
|
|
||||||
## Architecture Philosophy
|
TorchDrug separates four concerns:
|
||||||
|
|
||||||
### Modular Design
|
- `torchdrug.data`: tensor-backed `Graph`, `Molecule`, `Protein`, and packed
|
||||||
|
variants.
|
||||||
|
- `torchdrug.datasets`: downloadable datasets whose samples contain graphs and
|
||||||
|
targets.
|
||||||
|
- `torchdrug.models`: reusable graph, sequence, embedding, flow, and
|
||||||
|
self-supervised encoders.
|
||||||
|
- `torchdrug.tasks`: objectives that wrap models and implement prediction, loss,
|
||||||
|
and evaluation.
|
||||||
|
- `torchdrug.core.Engine`: preprocessing, batching, optimization, checkpointing,
|
||||||
|
and evaluation.
|
||||||
|
|
||||||
TorchDrug separates concerns into distinct modules:
|
Keep these layers separate. A model creates representations; a task defines what
|
||||||
|
to learn; an engine executes the experiment.
|
||||||
|
|
||||||
1. **Representation Models** (models.py): Encode graphs into embeddings
|
## Graphs and molecules
|
||||||
2. **Task Definitions** (tasks.py): Define learning objectives and evaluation
|
|
||||||
3. **Data Handling** (data.py, datasets.py): Graph structures and datasets
|
|
||||||
4. **Core Components** (core.py): Base classes and utilities
|
|
||||||
|
|
||||||
**Benefits:**
|
|
||||||
- Reuse representations across tasks
|
|
||||||
- Mix and match components
|
|
||||||
- Easy experimentation and prototyping
|
|
||||||
- Clear separation of concerns
|
|
||||||
|
|
||||||
### Configurable System
|
|
||||||
|
|
||||||
All components inherit from `core.Configurable`:
|
|
||||||
- Serialize to configuration dictionaries
|
|
||||||
- Reconstruct from configurations
|
|
||||||
- Save and load complete pipelines
|
|
||||||
- Reproducible experiments
|
|
||||||
|
|
||||||
## Core Components
|
|
||||||
|
|
||||||
### core.Configurable
|
|
||||||
|
|
||||||
Base class for all TorchDrug components.
|
|
||||||
|
|
||||||
**Key Methods:**
|
|
||||||
- `config_dict()`: Serialize to dictionary
|
|
||||||
- `load_config_dict(config)`: Load from dictionary
|
|
||||||
- `save(file)`: Save to file
|
|
||||||
- `load(file)`: Load from file
|
|
||||||
|
|
||||||
**Example:**
|
|
||||||
```python
|
```python
|
||||||
from torchdrug import core, models
|
import torchdrug as td
|
||||||
|
from torchdrug import data
|
||||||
|
|
||||||
model = models.GIN(input_dim=10, hidden_dims=[256, 256])
|
edge_list = [[0, 1], [1, 2], [2, 3], [3, 4], [4, 5], [5, 0]]
|
||||||
|
graph = data.Graph(edge_list, num_node=6)
|
||||||
|
|
||||||
# Save configuration
|
mol = data.Molecule.from_smiles(
|
||||||
config = model.config_dict()
|
"CCOC(=O)N",
|
||||||
# {'class': 'GIN', 'input_dim': 10, 'hidden_dims': [256, 256], ...}
|
atom_feature="default",
|
||||||
|
bond_feature="default",
|
||||||
|
)
|
||||||
|
print(mol.node_feature.shape)
|
||||||
|
print(mol.edge_feature.shape)
|
||||||
|
|
||||||
# Reconstruct model
|
node_in, node_out, _ = mol.edge_list.t()
|
||||||
model2 = core.Configurable.load_config_dict(config)
|
carbon_edge = (mol.atom_type[node_in] == td.CARBON) | (
|
||||||
|
mol.atom_type[node_out] == td.CARBON
|
||||||
|
)
|
||||||
|
carbon_subgraph = mol.edge_mask(carbon_edge)
|
||||||
```
|
```
|
||||||
|
|
||||||
### core.Registry
|
Molecular bonds are represented by two directed edges. Do not assume a stable
|
||||||
|
ordering of those edges.
|
||||||
|
|
||||||
Decorator for registering models, tasks, and datasets.
|
Useful conversions:
|
||||||
|
|
||||||
**Usage:**
|
- `data.Molecule.from_smiles(smiles)`
|
||||||
```python
|
- `data.Molecule.from_molecule(rdkit_mol)`
|
||||||
from torchdrug import core as core_td
|
- `molecule.to_smiles()`
|
||||||
|
- `molecule.to_molecule()`
|
||||||
|
- `data.PackedMolecule.from_smiles(smiles_list)`
|
||||||
|
- `data.PackedMolecule.from_molecule(rdkit_mols)`
|
||||||
|
|
||||||
@core_td.register("models.CustomModel")
|
`PackedMolecule.to_smiles()` and `.to_molecule()` return lists.
|
||||||
class CustomModel(nn.Module, core_td.Configurable):
|
|
||||||
def __init__(self, input_dim, hidden_dim):
|
|
||||||
super().__init__()
|
|
||||||
self.linear = nn.Linear(input_dim, hidden_dim)
|
|
||||||
|
|
||||||
def forward(self, graph, input, all_loss, metric):
|
## Proteins
|
||||||
# Model implementation
|
|
||||||
pass
|
|
||||||
```
|
|
||||||
|
|
||||||
**Benefits:**
|
|
||||||
- Models automatically serializable
|
|
||||||
- String-based model specification
|
|
||||||
- Easy model lookup and instantiation
|
|
||||||
|
|
||||||
## Data Structures
|
|
||||||
|
|
||||||
### Graph
|
|
||||||
|
|
||||||
Core data structure representing molecular or protein graphs.
|
|
||||||
|
|
||||||
**Attributes:**
|
|
||||||
- `num_node`: Number of nodes
|
|
||||||
- `num_edge`: Number of edges
|
|
||||||
- `node_feature`: Node feature tensor [num_node, feature_dim]
|
|
||||||
- `edge_feature`: Edge feature tensor [num_edge, feature_dim]
|
|
||||||
- `edge_list`: Edge connectivity [num_edge, 2 or 3]
|
|
||||||
- `num_relation`: Number of edge types (for multi-relational)
|
|
||||||
|
|
||||||
**Methods:**
|
|
||||||
- `node_mask(mask)`: Select subset of nodes
|
|
||||||
- `edge_mask(mask)`: Select subset of edges
|
|
||||||
- `undirected()`: Make graph undirected
|
|
||||||
- `directed()`: Make graph directed
|
|
||||||
|
|
||||||
**Batching:**
|
|
||||||
- Graphs batched into single disconnected graph
|
|
||||||
- Automatic batching in DataLoader
|
|
||||||
- Preserves node/edge indices per graph
|
|
||||||
|
|
||||||
### Molecule (extends Graph)
|
|
||||||
|
|
||||||
Specialized graph for molecules.
|
|
||||||
|
|
||||||
**Additional Attributes:**
|
|
||||||
- `atom_type`: Atomic numbers
|
|
||||||
- `bond_type`: Bond types (single, double, triple, aromatic)
|
|
||||||
- `formal_charge`: Atomic formal charges
|
|
||||||
- `explicit_hs`: Explicit hydrogen counts
|
|
||||||
|
|
||||||
**Methods:**
|
|
||||||
- `from_smiles(smiles)`: Create from SMILES string
|
|
||||||
- `from_molecule(mol)`: Create from RDKit molecule
|
|
||||||
- `to_smiles()`: Convert to SMILES
|
|
||||||
- `to_molecule()`: Convert to RDKit molecule
|
|
||||||
- `ion_to_molecule()`: Neutralize charges
|
|
||||||
|
|
||||||
**Example:**
|
|
||||||
```python
|
```python
|
||||||
from torchdrug import data
|
from torchdrug import data
|
||||||
|
|
||||||
# From SMILES
|
sequence_protein = data.Protein.from_sequence(
|
||||||
mol = data.Molecule.from_smiles("CCO")
|
"MKTAYIAKQRQISFVKSHFSRQ",
|
||||||
|
atom_feature=None,
|
||||||
|
bond_feature=None,
|
||||||
|
residue_feature="default",
|
||||||
|
)
|
||||||
|
structure_protein = data.Protein.from_pdb(
|
||||||
|
"protein.pdb",
|
||||||
|
residue_feature="default",
|
||||||
|
)
|
||||||
|
|
||||||
# Atom features
|
print(sequence_protein.to_sequence())
|
||||||
print(mol.atom_type) # [6, 6, 8] (C, C, O)
|
|
||||||
print(mol.bond_type) # [1, 1] (single bonds)
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Protein (extends Graph)
|
For sequence-only work, setting `atom_feature=None` and `bond_feature=None`
|
||||||
|
avoids constructing unnecessary atom-level features and can substantially reduce
|
||||||
|
loading cost.
|
||||||
|
|
||||||
Specialized graph for proteins.
|
Documented protein constructors and conversions include:
|
||||||
|
|
||||||
**Additional Attributes:**
|
- `Protein.from_sequence`
|
||||||
- `residue_type`: Amino acid types
|
- `Protein.from_pdb`
|
||||||
- `atom_name`: Atom names (CA, CB, etc.)
|
- `Protein.from_molecule`
|
||||||
- `atom_type`: Atomic numbers
|
- `Protein.to_sequence`
|
||||||
- `residue_number`: Residue numbering
|
- `Protein.to_pdb`
|
||||||
- `chain_id`: Chain identifiers
|
- `Protein.to_molecule`
|
||||||
|
|
||||||
**Methods:**
|
Protein graph construction is handled by the documented geometry/graph
|
||||||
- `from_pdb(pdb_file)`: Load from PDB file
|
construction layers. `Protein` does not provide a `residue_graph()` method in
|
||||||
- `from_sequence(sequence)`: Create from sequence
|
0.2.1.
|
||||||
- `to_pdb(pdb_file)`: Save to PDB file
|
|
||||||
|
|
||||||
**Graph Construction:**
|
## Packed graphs and collation
|
||||||
- Nodes typically represent residues (not atoms)
|
|
||||||
- Edges can be sequential, spatial (KNN), or contact-based
|
Graphs of different sizes are packed into a block-diagonal representation:
|
||||||
- Configurable edge construction strategies
|
|
||||||
|
|
||||||
**Example:**
|
|
||||||
```python
|
```python
|
||||||
from torchdrug import data
|
from torchdrug import data
|
||||||
|
|
||||||
# Load protein
|
graphs = [
|
||||||
protein = data.Protein.from_pdb("1a3x.pdb")
|
data.Molecule.from_smiles("CCO"),
|
||||||
|
data.Molecule.from_smiles("c1ccccc1"),
|
||||||
# Build graph with multiple edge types
|
]
|
||||||
graph = protein.residue_graph(
|
batch = data.Graph.pack(graphs)
|
||||||
node_position="ca", # Use Cα positions
|
restored = batch.unpack()
|
||||||
edge_types=["sequential", "radius"] # Sequential + spatial edges
|
|
||||||
)
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### PackedGraph
|
For dataset samples, use:
|
||||||
|
|
||||||
Efficient batching structure for heterogeneous graphs.
|
|
||||||
|
|
||||||
**Purpose:**
|
|
||||||
- Batch graphs of different sizes
|
|
||||||
- Single GPU memory allocation
|
|
||||||
- Efficient parallel processing
|
|
||||||
|
|
||||||
**Attributes:**
|
|
||||||
- `num_nodes`: List of node counts per graph
|
|
||||||
- `num_edges`: List of edge counts per graph
|
|
||||||
- `graph_ind`: Graph index for each node
|
|
||||||
|
|
||||||
**Use Cases:**
|
|
||||||
- Automatic in DataLoader
|
|
||||||
- Custom batching strategies
|
|
||||||
- Multi-graph operations
|
|
||||||
|
|
||||||
## Model Interface
|
|
||||||
|
|
||||||
### Forward Function Signature
|
|
||||||
|
|
||||||
All TorchDrug models follow a standardized interface:
|
|
||||||
|
|
||||||
```python
|
```python
|
||||||
def forward(self, graph, input, all_loss=None, metric=None):
|
batch = data.graph_collate(samples)
|
||||||
"""
|
|
||||||
Args:
|
|
||||||
graph (Graph): Batch of graphs
|
|
||||||
input (Tensor): Node input features
|
|
||||||
all_loss (Tensor, optional): Accumulator for losses
|
|
||||||
metric (dict, optional): Dictionary for metrics
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
dict: Output dictionary with representation keys
|
|
||||||
"""
|
|
||||||
# Model computation
|
|
||||||
output = self.layers(graph, input)
|
|
||||||
|
|
||||||
return {
|
|
||||||
"node_feature": output,
|
|
||||||
"graph_feature": graph_pooling(output)
|
|
||||||
}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
**Key Points:**
|
`graph_collate` recursively collates nested containers and uses `Graph.pack` for
|
||||||
- `graph`: Batched graph structure
|
graph values. Prefer it to PyTorch's default collator for manual inference.
|
||||||
- `input`: Node features [num_node, input_dim]
|
|
||||||
- `all_loss`: Accumulated loss (for multi-task)
|
|
||||||
- `metric`: Shared metric dictionary
|
|
||||||
- Returns dict with representation types
|
|
||||||
|
|
||||||
### Essential Attributes
|
Packed graph operations include:
|
||||||
|
|
||||||
**All models must define:**
|
- `subbatch(index)` for selecting graphs
|
||||||
- `input_dim`: Expected input feature dimension
|
- `node_mask(index, compact=...)`
|
||||||
- `output_dim`: Output representation dimension
|
- `edge_mask(index)`
|
||||||
|
- `graph_mask(index, compact=...)`
|
||||||
|
- `repeat(count)` / `repeat_interleave(repeats)`
|
||||||
|
- `unpack()`
|
||||||
|
|
||||||
**Purpose:**
|
## Attributes and references
|
||||||
- Automatic dimension checking
|
|
||||||
- Compose models in pipelines
|
TorchDrug graph attributes carry semantic scopes. When adding custom attributes,
|
||||||
- Error checking and validation
|
register them in the matching context:
|
||||||
|
|
||||||
**Example:**
|
|
||||||
```python
|
```python
|
||||||
class CustomModel(nn.Module):
|
with mol.atom():
|
||||||
def __init__(self, input_dim, hidden_dim):
|
mol.is_carbon = mol.atom_type == td.CARBON
|
||||||
super().__init__()
|
|
||||||
self.input_dim = input_dim
|
with mol.edge():
|
||||||
self.output_dim = hidden_dim
|
mol.is_single_bond = mol.bond_type == td.SINGLE
|
||||||
# ... layers ...
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Task Interface
|
Use node, edge, graph, and reference contexts so masking, packing, and device
|
||||||
|
transfer update custom values correctly. See
|
||||||
|
[Deal with References](https://torchdrug.ai/docs/notes/reference.html).
|
||||||
|
|
||||||
### Core Task Methods
|
## Model interface
|
||||||
|
|
||||||
All tasks implement these methods:
|
Graph representation models use this general call shape:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
class CustomTask(tasks.Task):
|
output = model(graph, graph.node_feature)
|
||||||
def preprocess(self, train_set, valid_set, test_set):
|
graph_feature = output["graph_feature"]
|
||||||
"""Dataset-specific preprocessing (optional)"""
|
node_feature = output["node_feature"]
|
||||||
pass
|
|
||||||
|
|
||||||
def predict(self, batch):
|
|
||||||
"""Generate predictions for a batch"""
|
|
||||||
graph, label = batch
|
|
||||||
output = self.model(graph, graph.node_feature)
|
|
||||||
pred = self.mlp(output["graph_feature"])
|
|
||||||
return pred
|
|
||||||
|
|
||||||
def target(self, batch):
|
|
||||||
"""Extract ground truth labels"""
|
|
||||||
graph, label = batch
|
|
||||||
return label
|
|
||||||
|
|
||||||
def forward(self, batch):
|
|
||||||
"""Compute training loss"""
|
|
||||||
pred = self.predict(batch)
|
|
||||||
target = self.target(batch)
|
|
||||||
loss = self.criterion(pred, target)
|
|
||||||
return loss
|
|
||||||
|
|
||||||
def evaluate(self, pred, target):
|
|
||||||
"""Compute evaluation metrics"""
|
|
||||||
metrics = {}
|
|
||||||
metrics["auroc"] = compute_auroc(pred, target)
|
|
||||||
metrics["auprc"] = compute_auprc(pred, target)
|
|
||||||
return metrics
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Task Components
|
Protein sequence models may return `residue_feature` instead of `node_feature`.
|
||||||
|
Inspect the selected model's API page rather than assuming every model returns
|
||||||
|
the same keys.
|
||||||
|
|
||||||
**Typical Task Structure:**
|
Most models accept optional `all_loss` and `metric` accumulators:
|
||||||
1. **Representation Model**: Encodes graph to embeddings
|
|
||||||
2. **Readout/Prediction Head**: Maps embeddings to predictions
|
|
||||||
3. **Loss Function**: Training objective
|
|
||||||
4. **Metrics**: Evaluation measures
|
|
||||||
|
|
||||||
**Example:**
|
|
||||||
```python
|
```python
|
||||||
from torchdrug import tasks, models
|
output = model(graph, graph.node_feature, all_loss=all_loss, metric=metric)
|
||||||
|
|
||||||
# Representation model
|
|
||||||
model = models.GIN(input_dim=10, hidden_dims=[256, 256])
|
|
||||||
|
|
||||||
# Task wraps model with prediction head
|
|
||||||
task = tasks.PropertyPrediction(
|
|
||||||
model=model,
|
|
||||||
task=["task1", "task2"], # Multi-task
|
|
||||||
criterion="bce",
|
|
||||||
metric=["auroc", "auprc"],
|
|
||||||
num_mlp_layer=2
|
|
||||||
)
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Version Notes (0.2.1)
|
Tasks use those accumulators for auxiliary losses and metrics.
|
||||||
|
|
||||||
- Pin installs with `uv pip install torchdrug==0.2.1` (Python 3.7–3.10, PyTorch 1.8–2.0).
|
## Task and Engine lifecycle
|
||||||
- `PropertyPrediction.predict()` returns unstandardized targets/predictions (breaking vs older releases).
|
|
||||||
- Prefer `atom_feature` / `bond_feature` on dataset constructors; `node_feature` / `edge_feature` are deprecated aliases (dataset properties like `node_feature_dim` are unchanged).
|
|
||||||
|
|
||||||
## Training Workflow
|
The normal lifecycle is:
|
||||||
|
|
||||||
### Standard Training Loop
|
1. construct model,
|
||||||
|
2. construct task,
|
||||||
|
3. construct optimizer over `task.parameters()`,
|
||||||
|
4. construct `core.Engine`,
|
||||||
|
5. call `solver.train()` and `solver.evaluate()`.
|
||||||
|
|
||||||
|
When `Engine` is created, it calls task preprocessing against the supplied
|
||||||
|
train/validation/test sets. This matters because tasks may infer target
|
||||||
|
statistics or metadata during preprocessing.
|
||||||
|
|
||||||
```python
|
```python
|
||||||
import torch
|
|
||||||
from torch.utils.data import DataLoader
|
|
||||||
from torchdrug import core, models, tasks, datasets
|
|
||||||
|
|
||||||
# 1. Load dataset
|
|
||||||
dataset = datasets.BBBP("~/datasets/")
|
|
||||||
train_set, valid_set, test_set = dataset.split()
|
|
||||||
|
|
||||||
# 2. Create data loaders
|
|
||||||
train_loader = DataLoader(train_set, batch_size=32, shuffle=True)
|
|
||||||
valid_loader = DataLoader(valid_set, batch_size=32)
|
|
||||||
|
|
||||||
# 3. Define model and task
|
|
||||||
model = models.GIN(input_dim=dataset.node_feature_dim,
|
|
||||||
hidden_dims=[256, 256, 256])
|
|
||||||
task = tasks.PropertyPrediction(model, task=dataset.tasks,
|
|
||||||
criterion="bce", metric=["auroc", "auprc"])
|
|
||||||
|
|
||||||
# 4. Setup optimizer
|
|
||||||
optimizer = torch.optim.Adam(task.parameters(), lr=1e-3)
|
optimizer = torch.optim.Adam(task.parameters(), lr=1e-3)
|
||||||
|
solver = core.Engine(
|
||||||
# 5. Training loop
|
task,
|
||||||
for epoch in range(100):
|
train_set,
|
||||||
# Train
|
valid_set,
|
||||||
task.train()
|
test_set,
|
||||||
for batch in train_loader:
|
optimizer,
|
||||||
loss = task(batch)
|
batch_size=128,
|
||||||
optimizer.zero_grad()
|
)
|
||||||
loss.backward()
|
solver.train(num_epoch=10)
|
||||||
optimizer.step()
|
metrics = solver.evaluate("valid")
|
||||||
|
|
||||||
# Validate (inference_mode disables autograd; train(False) disables dropout/BN)
|
|
||||||
with torch.inference_mode():
|
|
||||||
task.train(False)
|
|
||||||
preds, targets = [], []
|
|
||||||
for batch in valid_loader:
|
|
||||||
pred = task.predict(batch)
|
|
||||||
target = task.target(batch)
|
|
||||||
preds.append(pred)
|
|
||||||
targets.append(target)
|
|
||||||
|
|
||||||
preds = torch.cat(preds)
|
|
||||||
targets = torch.cat(targets)
|
|
||||||
metrics = task.evaluate(preds, targets)
|
|
||||||
print(f"Epoch {epoch}: {metrics}")
|
|
||||||
task.train(True)
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Built-in Engine (`core.Engine`)
|
Use `gpus=[0]` for one supported CUDA device. Omit it on CPU. For manual nested
|
||||||
|
batches, `torchdrug.utils.cuda(batch)` moves all tensors and graphs together.
|
||||||
|
|
||||||
For standard train/validate loops without hand-written epochs, use the configurable engine:
|
## Configuration and checkpoints
|
||||||
|
|
||||||
|
`core.Configurable` serializes component constructor configuration:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
|
import json
|
||||||
from torchdrug import core
|
from torchdrug import core
|
||||||
|
|
||||||
solver = core.Engine(task, train_set, valid_set, test_set, optimizer,
|
with open("solver.json", "w") as fout:
|
||||||
gpus=[0], batch_size=32)
|
json.dump(solver.config_dict(), fout)
|
||||||
solver.train(num_epoch=100)
|
solver.save("solver.pth")
|
||||||
solver.evaluate("valid")
|
|
||||||
|
with open("solver.json") as fin:
|
||||||
|
restored_solver = core.Configurable.load_config_dict(json.load(fin))
|
||||||
|
restored_solver.load("solver.pth")
|
||||||
```
|
```
|
||||||
|
|
||||||
### PyTorch Lightning Integration
|
For transfer learning, a solver checkpoint stores model state under `"model"`:
|
||||||
|
|
||||||
TorchDrug tasks are compatible with PyTorch Lightning:
|
|
||||||
|
|
||||||
```python
|
```python
|
||||||
import pytorch_lightning as pl
|
checkpoint = torch.load("pretrained.pth")["model"]
|
||||||
|
task.load_state_dict(checkpoint, strict=False)
|
||||||
class LightningWrapper(pl.LightningModule):
|
|
||||||
def __init__(self, task):
|
|
||||||
super().__init__()
|
|
||||||
self.task = task
|
|
||||||
self._val_outputs = []
|
|
||||||
|
|
||||||
def training_step(self, batch, batch_idx):
|
|
||||||
loss = self.task(batch)
|
|
||||||
return loss
|
|
||||||
|
|
||||||
def validation_step(self, batch, batch_idx):
|
|
||||||
pred = self.task.predict(batch)
|
|
||||||
target = self.task.target(batch)
|
|
||||||
self._val_outputs.append({"pred": pred, "target": target})
|
|
||||||
|
|
||||||
def on_validation_epoch_end(self):
|
|
||||||
preds = torch.cat([o["pred"] for o in self._val_outputs])
|
|
||||||
targets = torch.cat([o["target"] for o in self._val_outputs])
|
|
||||||
metrics = self.task.evaluate(preds, targets)
|
|
||||||
self.log_dict(metrics)
|
|
||||||
self._val_outputs.clear()
|
|
||||||
|
|
||||||
def configure_optimizers(self):
|
|
||||||
return torch.optim.Adam(self.parameters(), lr=1e-3)
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Loss Functions
|
Use `strict=False` only when intentionally transferring a compatible subset, such
|
||||||
|
as a pretrained encoder into a property-prediction task.
|
||||||
|
|
||||||
### Built-in Criteria
|
## Feature naming in 0.2.1
|
||||||
|
|
||||||
**Classification:**
|
Prefer:
|
||||||
- `"bce"`: Binary cross-entropy
|
|
||||||
- `"ce"`: Cross-entropy (multi-class)
|
|
||||||
|
|
||||||
**Regression:**
|
- `atom_feature`
|
||||||
- `"mse"`: Mean squared error
|
- `bond_feature`
|
||||||
- `"mae"`: Mean absolute error
|
- `residue_feature`
|
||||||
|
- `mol_feature`
|
||||||
|
|
||||||
**Knowledge Graph:**
|
The older `node_feature`, `edge_feature`, and `graph_feature` constructor names
|
||||||
- `"bce"`: Binary classification of triples
|
are deprecated aliases where documented. Runtime properties such as
|
||||||
- `"ce"`: Cross-entropy ranking loss
|
`dataset.node_feature_dim` and `graph.node_feature` remain valid.
|
||||||
- `"margin"`: Margin-based ranking
|
|
||||||
|
|
||||||
### Custom Loss
|
|
||||||
|
|
||||||
```python
|
|
||||||
class CustomTask(tasks.Task):
|
|
||||||
def forward(self, batch):
|
|
||||||
pred = self.predict(batch)
|
|
||||||
target = self.target(batch)
|
|
||||||
|
|
||||||
# Custom loss computation
|
|
||||||
loss = custom_loss_function(pred, target)
|
|
||||||
|
|
||||||
return loss
|
|
||||||
```
|
|
||||||
|
|
||||||
## Metrics
|
|
||||||
|
|
||||||
### Common Metrics
|
|
||||||
|
|
||||||
**Classification:**
|
|
||||||
- **AUROC**: Area under ROC curve
|
|
||||||
- **AUPRC**: Area under precision-recall curve
|
|
||||||
- **Accuracy**: Overall accuracy
|
|
||||||
- **F1**: Harmonic mean of precision and recall
|
|
||||||
|
|
||||||
**Regression:**
|
|
||||||
- **MAE**: Mean absolute error
|
|
||||||
- **RMSE**: Root mean squared error
|
|
||||||
- **R²**: Coefficient of determination
|
|
||||||
- **Pearson**: Pearson correlation
|
|
||||||
|
|
||||||
**Ranking (Knowledge Graph):**
|
|
||||||
- **MR**: Mean rank
|
|
||||||
- **MRR**: Mean reciprocal rank
|
|
||||||
- **Hits@K**: Percentage in top K
|
|
||||||
|
|
||||||
### Multi-Task Metrics
|
|
||||||
|
|
||||||
For multi-label or multi-task:
|
|
||||||
- Metrics computed per task
|
|
||||||
- Macro-average across tasks
|
|
||||||
- Can weight by task importance
|
|
||||||
|
|
||||||
## Data Transforms
|
|
||||||
|
|
||||||
### Molecule Transforms
|
|
||||||
|
|
||||||
```python
|
|
||||||
from torchdrug import transforms
|
|
||||||
|
|
||||||
# Add virtual node connected to all atoms
|
|
||||||
transform1 = transforms.VirtualNode()
|
|
||||||
|
|
||||||
# Add virtual edges
|
|
||||||
transform2 = transforms.VirtualEdge()
|
|
||||||
|
|
||||||
# Compose transforms
|
|
||||||
transform = transforms.Compose([transform1, transform2])
|
|
||||||
|
|
||||||
dataset = datasets.BBBP("~/datasets/", transform=transform)
|
|
||||||
```
|
|
||||||
|
|
||||||
### Protein Transforms
|
|
||||||
|
|
||||||
```python
|
|
||||||
# Add edges based on spatial proximity
|
|
||||||
transform = transforms.TruncateProtein(max_length=500)
|
|
||||||
|
|
||||||
dataset = datasets.Fold("~/datasets/", transform=transform)
|
|
||||||
```
|
|
||||||
|
|
||||||
## Best Practices
|
|
||||||
|
|
||||||
### Memory Efficiency
|
|
||||||
|
|
||||||
1. **Gradient Accumulation**: For large models
|
|
||||||
2. **Mixed Precision**: FP16 training
|
|
||||||
3. **Batch Size Tuning**: Balance speed and memory
|
|
||||||
4. **Data Loading**: Multiple workers for I/O
|
|
||||||
|
|
||||||
### Reproducibility
|
|
||||||
|
|
||||||
1. **Set Seeds**: PyTorch, NumPy, Python random
|
|
||||||
2. **Deterministic Operations**: `torch.use_deterministic_algorithms(True)`
|
|
||||||
3. **Save Configurations**: Use `core.Configurable`
|
|
||||||
4. **Version Control**: Track TorchDrug version
|
|
||||||
|
|
||||||
### Debugging
|
|
||||||
|
|
||||||
1. **Check Dimensions**: Verify `input_dim` and `output_dim`
|
|
||||||
2. **Validate Batching**: Print batch statistics
|
|
||||||
3. **Monitor Gradients**: Watch for vanishing/exploding
|
|
||||||
4. **Overfit Small Batch**: Ensure model capacity
|
|
||||||
|
|
||||||
### Performance Optimization
|
|
||||||
|
|
||||||
1. **GPU Utilization**: Monitor with `nvidia-smi`
|
|
||||||
2. **Profile Code**: Use PyTorch profiler
|
|
||||||
3. **Optimize Data Loading**: Prefetch, pin memory
|
|
||||||
4. **Compile Models**: Use TorchScript if possible
|
|
||||||
|
|
||||||
## Advanced Topics
|
|
||||||
|
|
||||||
### Multi-Task Learning
|
|
||||||
|
|
||||||
Train single model on multiple related tasks:
|
|
||||||
```python
|
|
||||||
task = tasks.PropertyPrediction(
|
|
||||||
model,
|
|
||||||
task=["task1", "task2", "task3"],
|
|
||||||
criterion="bce",
|
|
||||||
metric=["auroc"],
|
|
||||||
task_weight=[1.0, 1.0, 2.0] # Weight task 3 more
|
|
||||||
)
|
|
||||||
```
|
|
||||||
|
|
||||||
### Transfer Learning
|
|
||||||
|
|
||||||
1. Pre-train on large dataset
|
|
||||||
2. Fine-tune on target dataset
|
|
||||||
3. Optionally freeze early layers
|
|
||||||
|
|
||||||
### Self-Supervised Pre-training
|
|
||||||
|
|
||||||
Use pre-training tasks:
|
|
||||||
- `AttributeMasking`: Mask node features
|
|
||||||
- `EdgePrediction`: Predict edge existence
|
|
||||||
- `ContextPrediction`: Contrastive learning
|
|
||||||
|
|
||||||
### Custom Layers
|
|
||||||
|
|
||||||
Extend TorchDrug with custom GNN layers:
|
|
||||||
```python
|
|
||||||
from torchdrug import layers
|
|
||||||
|
|
||||||
class CustomConv(layers.MessagePassingBase):
|
|
||||||
def message(self, graph, input):
|
|
||||||
# Custom message function
|
|
||||||
pass
|
|
||||||
|
|
||||||
def aggregate(self, graph, message):
|
|
||||||
# Custom aggregation
|
|
||||||
pass
|
|
||||||
|
|
||||||
def combine(self, input, update):
|
|
||||||
# Custom combination
|
|
||||||
pass
|
|
||||||
```
|
|
||||||
|
|
||||||
## Common Pitfalls
|
|
||||||
|
|
||||||
1. **Forgetting `input_dim` and `output_dim`**: Models won't compose
|
|
||||||
2. **Not Batching Properly**: Use PackedGraph for variable-sized graphs
|
|
||||||
3. **Data Leakage**: Be careful with scaffold splits and pre-training
|
|
||||||
4. **Ignoring Edge Features**: Bonds/spatial info can be critical
|
|
||||||
5. **Wrong Evaluation Metrics**: Match metrics to task (AUROC for imbalanced)
|
|
||||||
6. **Insufficient Regularization**: Use dropout, weight decay, early stopping
|
|
||||||
7. **Not Validating Chemistry**: Generated molecules must be valid
|
|
||||||
8. **Overfitting Small Datasets**: Use pre-training or simpler models
|
|
||||||
|
|||||||
+165
-259
@@ -2,9 +2,9 @@
|
|||||||
title: "Knowledge Graph Reasoning"
|
title: "Knowledge Graph Reasoning"
|
||||||
task: ""
|
task: ""
|
||||||
lineage_type: import
|
lineage_type: import
|
||||||
upstream_source: https://github.com/K-Dense-AI/scientific-agent-skills/blob/9c9bd2e9/skills/torchdrug/references/knowledge_graphs.md
|
upstream_source: https://github.com/K-Dense-AI/scientific-agent-skills/blob/e8727695/skills/torchdrug/references/knowledge_graphs.md
|
||||||
upstream_sha: 9c9bd2e9
|
upstream_sha: e8727695
|
||||||
imported_at: 2026-06-27
|
imported_at: 2026-07-20
|
||||||
prompt_class: prompt
|
prompt_class: prompt
|
||||||
upstream_changes: accepted
|
upstream_changes: accepted
|
||||||
author: upstream
|
author: upstream
|
||||||
@@ -13,321 +13,227 @@ validated: false
|
|||||||
|
|
||||||
# Knowledge Graph Reasoning
|
# Knowledge Graph Reasoning
|
||||||
|
|
||||||
## Overview
|
The official
|
||||||
|
[TorchDrug 0.2.1 reasoning tutorial](https://torchdrug.ai/docs/tutorials/reasoning.html)
|
||||||
|
covers two workflows:
|
||||||
|
|
||||||
Knowledge graphs represent structured information as entities and relations in a graph format. TorchDrug provides comprehensive support for knowledge graph completion (link prediction) using embedding-based models and neural reasoning approaches.
|
- knowledge graph embeddings with RotatE,
|
||||||
|
- neural inductive logic programming with NeuralLP.
|
||||||
|
|
||||||
## Available Datasets
|
Both use `tasks.KnowledgeGraphCompletion`.
|
||||||
|
|
||||||
### General Knowledge Graphs
|
## Datasets
|
||||||
|
|
||||||
**FB15k (Freebase subset):**
|
Documented knowledge graph datasets:
|
||||||
- 14,951 entities
|
|
||||||
- 1,345 relation types
|
|
||||||
- 592,213 triples
|
|
||||||
- General world knowledge from Freebase
|
|
||||||
|
|
||||||
**FB15k-237:**
|
- `FB15k`: 14,951 entities, 1,345 relations, 592,213 triplets
|
||||||
- 14,541 entities
|
- `FB15k237`: 14,541 entities, 237 relations, 310,116 triplets
|
||||||
- 237 relation types
|
- `WN18`: 40,943 entities, 18 relations, 151,442 triplets
|
||||||
- 310,116 triples
|
- `WN18RR`: 40,943 entities, 11 relations, 93,003 triplets
|
||||||
- Filtered version removing inverse relations
|
- `Hetionet`: 45,158 entities, 24 relations, 2,025,177 triplets
|
||||||
- More challenging benchmark
|
|
||||||
|
|
||||||
**WN18 (WordNet):**
|
Use predefined splits:
|
||||||
- 40,943 entities (word senses)
|
|
||||||
- 18 relation types (lexical relations)
|
|
||||||
- 151,442 triples
|
|
||||||
- Linguistic knowledge graph
|
|
||||||
|
|
||||||
**WN18RR:**
|
|
||||||
- 40,943 entities
|
|
||||||
- 11 relation types
|
|
||||||
- 93,003 triples
|
|
||||||
- Filtered WordNet removing easy inverse patterns
|
|
||||||
|
|
||||||
### Biomedical Knowledge Graphs
|
|
||||||
|
|
||||||
**Hetionet:**
|
|
||||||
- 45,158 entities (genes, compounds, diseases, pathways, etc.)
|
|
||||||
- 24 relation types (treats, causes, binds, etc.)
|
|
||||||
- 2,250,197 edges
|
|
||||||
- Integrates 29 public biomedical databases
|
|
||||||
- Designed for drug repurposing and disease understanding
|
|
||||||
|
|
||||||
## Task: KnowledgeGraphCompletion
|
|
||||||
|
|
||||||
The primary task for knowledge graphs is link prediction - given a head entity and relation, predict the tail entity (or vice versa).
|
|
||||||
|
|
||||||
### Task Modes
|
|
||||||
|
|
||||||
**Head Prediction:**
|
|
||||||
- Given (?, relation, tail), predict head entity
|
|
||||||
- "What can cause Disease X?"
|
|
||||||
|
|
||||||
**Tail Prediction:**
|
|
||||||
- Given (head, relation, ?), predict tail entity
|
|
||||||
- "What diseases does Gene X cause?"
|
|
||||||
|
|
||||||
**Both:**
|
|
||||||
- Predict both head and tail
|
|
||||||
- Standard evaluation protocol
|
|
||||||
|
|
||||||
### Evaluation Metrics
|
|
||||||
|
|
||||||
**Ranking Metrics:**
|
|
||||||
- **Mean Rank (MR)**: Average rank of correct entity
|
|
||||||
- **Mean Reciprocal Rank (MRR)**: Average of 1/rank
|
|
||||||
- **Hits@K**: Percentage of correct entities in top K predictions
|
|
||||||
- Typically reported for K=1, 3, 10
|
|
||||||
|
|
||||||
**Filtered vs Raw:**
|
|
||||||
- **Filtered**: Remove other known true triples from ranking
|
|
||||||
- **Raw**: Rank among all possible entities
|
|
||||||
- Filtered is standard for evaluation
|
|
||||||
|
|
||||||
## Embedding Models
|
|
||||||
|
|
||||||
### Translational Models
|
|
||||||
|
|
||||||
**TransE (Translation Embedding):**
|
|
||||||
- Represents relations as translations in embedding space
|
|
||||||
- h + r ≈ t (head + relation ≈ tail)
|
|
||||||
- Simple and effective baseline
|
|
||||||
- Works well for 1-to-1 relations
|
|
||||||
- Struggles with N-to-N relations
|
|
||||||
|
|
||||||
**RotatE (Rotation Embedding):**
|
|
||||||
- Relations as rotations in complex space
|
|
||||||
- Better handles symmetric and inverse relations
|
|
||||||
- State-of-the-art on many benchmarks
|
|
||||||
- Can model composition patterns
|
|
||||||
|
|
||||||
### Semantic Matching Models
|
|
||||||
|
|
||||||
**DistMult:**
|
|
||||||
- Bilinear scoring function
|
|
||||||
- Handles symmetric relations naturally
|
|
||||||
- Cannot model asymmetric relations
|
|
||||||
- Fast and memory efficient
|
|
||||||
|
|
||||||
**ComplEx:**
|
|
||||||
- Complex-valued embeddings
|
|
||||||
- Models asymmetric and inverse relations
|
|
||||||
- Better than DistMult for most graphs
|
|
||||||
- Balances expressiveness and efficiency
|
|
||||||
|
|
||||||
**SimplE:**
|
|
||||||
- Extends DistMult with inverse relations
|
|
||||||
- Fully expressive (can represent any relation pattern)
|
|
||||||
- Two embeddings per entity (canonical and inverse)
|
|
||||||
|
|
||||||
### Neural Logic Models
|
|
||||||
|
|
||||||
**NeuralLP (Neural Logic Programming):**
|
|
||||||
- Learns logical rules through differentiable operations
|
|
||||||
- Interprets predictions via learned rules
|
|
||||||
- Good for sparse knowledge graphs
|
|
||||||
- Computationally more expensive
|
|
||||||
|
|
||||||
**KBGAT (Knowledge Base Graph Attention):**
|
|
||||||
- Graph attention networks for KG completion
|
|
||||||
- Learns entity representations from neighborhood
|
|
||||||
- Handles unseen entities through inductive learning
|
|
||||||
- Better for incomplete graphs
|
|
||||||
|
|
||||||
## Training Workflow
|
|
||||||
|
|
||||||
### Basic Pipeline
|
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from torchdrug import datasets, models, tasks, core
|
from torchdrug import datasets
|
||||||
|
|
||||||
# Load dataset
|
|
||||||
dataset = datasets.FB15k237("~/kg-datasets/")
|
dataset = datasets.FB15k237("~/kg-datasets/")
|
||||||
|
train_set, valid_set, test_set = dataset.split()
|
||||||
|
```
|
||||||
|
|
||||||
|
## RotatE embedding workflow
|
||||||
|
|
||||||
|
### Model
|
||||||
|
|
||||||
|
```python
|
||||||
|
import torch
|
||||||
|
from torchdrug import core, models, tasks
|
||||||
|
|
||||||
# Define model
|
|
||||||
model = models.RotatE(
|
model = models.RotatE(
|
||||||
num_entity=dataset.num_entity,
|
num_entity=dataset.num_entity,
|
||||||
num_relation=dataset.num_relation,
|
num_relation=dataset.num_relation,
|
||||||
embedding_dim=2000,
|
embedding_dim=2048,
|
||||||
max_score=9
|
max_score=9,
|
||||||
)
|
)
|
||||||
|
|
||||||
# Define task
|
|
||||||
task = tasks.KnowledgeGraphCompletion(
|
|
||||||
model,
|
|
||||||
num_negative=128,
|
|
||||||
adversarial_temperature=2,
|
|
||||||
criterion="bce"
|
|
||||||
)
|
|
||||||
|
|
||||||
# Train with PyTorch Lightning or custom loop
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Negative Sampling
|
`embedding_dim=2048` follows the tutorial and may be reduced for memory or speed.
|
||||||
|
|
||||||
**Strategies:**
|
### Task
|
||||||
- **Uniform**: Sample entities uniformly at random
|
|
||||||
- **Self-Adversarial**: Weight samples by current model's scores
|
|
||||||
- **Type-Constrained**: Sample only valid entity types for relation
|
|
||||||
|
|
||||||
**Parameters:**
|
```python
|
||||||
- `num_negative`: Number of negative samples per positive triple
|
task = tasks.KnowledgeGraphCompletion(
|
||||||
- `adversarial_temperature`: Temperature for self-adversarial weighting
|
model,
|
||||||
- Higher temperature = more focus on hard negatives
|
num_negative=256,
|
||||||
|
adversarial_temperature=1,
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
### Loss Functions
|
- `num_negative` controls negative samples per positive.
|
||||||
|
- `adversarial_temperature` enables score-weighted negative sampling.
|
||||||
|
|
||||||
**Binary Cross-Entropy (BCE):**
|
### Train and evaluate
|
||||||
- Treats each triple independently
|
|
||||||
- Balanced classification between positive and negative
|
|
||||||
|
|
||||||
**Margin Loss:**
|
```python
|
||||||
- Ensures positive scores higher than negative by margin
|
optimizer = torch.optim.Adam(task.parameters(), lr=2e-5)
|
||||||
- `max(0, margin + score_neg - score_pos)`
|
solver = core.Engine(
|
||||||
|
task,
|
||||||
|
train_set,
|
||||||
|
valid_set,
|
||||||
|
test_set,
|
||||||
|
optimizer,
|
||||||
|
batch_size=1024,
|
||||||
|
)
|
||||||
|
solver.train(num_epoch=200)
|
||||||
|
solver.evaluate("valid")
|
||||||
|
```
|
||||||
|
|
||||||
**Logistic Loss:**
|
Add `gpus=[0]` for a supported CUDA device. Reduce the epoch count for smoke
|
||||||
- Smooth version of margin loss
|
tests.
|
||||||
- Better gradient properties
|
|
||||||
|
|
||||||
## Model Selection Guide
|
## NeuralLP workflow
|
||||||
|
|
||||||
### By Relation Patterns
|
NeuralLP learns weighted chain-like rules up to a configured maximum length.
|
||||||
|
|
||||||
**1-to-1 Relations:**
|
```python
|
||||||
- TransE works well
|
model = models.NeuralLP(
|
||||||
- Any model will likely succeed
|
num_relation=dataset.num_relation,
|
||||||
|
hidden_dim=128,
|
||||||
|
num_step=3,
|
||||||
|
num_lstm_layer=2,
|
||||||
|
)
|
||||||
|
|
||||||
**1-to-N Relations:**
|
task = tasks.KnowledgeGraphCompletion(
|
||||||
- DistMult, ComplEx, SimplE
|
model,
|
||||||
- Avoid TransE
|
fact_ratio=0.75,
|
||||||
|
num_negative=256,
|
||||||
|
sample_weight=False,
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
**N-to-1 Relations:**
|
`fact_ratio=0.75` reserves 75% of training facts for the background graph used
|
||||||
- DistMult, ComplEx, SimplE
|
for reasoning.
|
||||||
- Avoid TransE
|
|
||||||
|
|
||||||
**N-to-N Relations:**
|
```python
|
||||||
- ComplEx, SimplE, RotatE
|
optimizer = torch.optim.Adam(task.parameters(), lr=1e-3)
|
||||||
- Most challenging pattern
|
solver = core.Engine(
|
||||||
|
task,
|
||||||
|
train_set,
|
||||||
|
valid_set,
|
||||||
|
test_set,
|
||||||
|
optimizer,
|
||||||
|
batch_size=64,
|
||||||
|
)
|
||||||
|
solver.train(num_epoch=10)
|
||||||
|
solver.evaluate("valid")
|
||||||
|
```
|
||||||
|
|
||||||
**Symmetric Relations:**
|
## Other documented models
|
||||||
- DistMult, ComplEx
|
|
||||||
- RotatE with proper initialization
|
|
||||||
|
|
||||||
**Antisymmetric Relations:**
|
Embedding models:
|
||||||
- ComplEx, SimplE, RotatE
|
|
||||||
- Avoid DistMult
|
|
||||||
|
|
||||||
**Inverse Relations:**
|
- `models.TransE`
|
||||||
- ComplEx, SimplE, RotatE
|
- `models.DistMult`
|
||||||
- Important for bidirectional reasoning
|
- `models.ComplEx`
|
||||||
|
- `models.SimplE`
|
||||||
|
- `models.RotatE`
|
||||||
|
|
||||||
**Composition:**
|
Graph-attention model:
|
||||||
- RotatE (best)
|
|
||||||
- TransE (reasonable)
|
|
||||||
- Captures multi-hop paths
|
|
||||||
|
|
||||||
### By Dataset Characteristics
|
- `models.KBGAT`
|
||||||
|
|
||||||
**Small Graphs (< 50k entities):**
|
Verify each constructor in the
|
||||||
- ComplEx or SimplE
|
[model API](https://torchdrug.ai/docs/api/models.html#knowledge-graph-reasoning-models).
|
||||||
- Lower embedding dimensions (200-500)
|
Do not transfer argument names from PyKEEN, DGL-KE, or PyTorch Geometric.
|
||||||
|
|
||||||
**Large Graphs (> 100k entities):**
|
## Task behavior
|
||||||
- DistMult for efficiency
|
|
||||||
- RotatE for accuracy
|
|
||||||
- Higher dimensions (500-2000)
|
|
||||||
|
|
||||||
**Sparse Graphs:**
|
`KnowledgeGraphCompletion` owns:
|
||||||
- NeuralLP (learns rules from limited data)
|
|
||||||
- Pre-train embeddings on larger graphs
|
|
||||||
|
|
||||||
**Dense, Complete Graphs:**
|
- negative sampling,
|
||||||
- Any embedding model works well
|
- fact-graph construction,
|
||||||
- Choose based on relation patterns
|
- loss computation,
|
||||||
|
- head and tail prediction,
|
||||||
|
- filtered ranking evaluation.
|
||||||
|
|
||||||
**Biomedical/Domain Graphs:**
|
Important constructor options include:
|
||||||
- Consider type constraints in sampling
|
|
||||||
- Use domain-specific negative sampling
|
|
||||||
- Hetionet benefits from relation-specific models
|
|
||||||
|
|
||||||
## Advanced Techniques
|
- `criterion`
|
||||||
|
- `metric`
|
||||||
|
- `num_negative`
|
||||||
|
- `margin`
|
||||||
|
- `adversarial_temperature`
|
||||||
|
- `strict_negative`
|
||||||
|
- `fact_ratio`
|
||||||
|
- `sample_weight`
|
||||||
|
- `full_batch_eval`
|
||||||
|
|
||||||
### Multi-Hop Reasoning
|
TorchDrug 0.2.1 added full-batch evaluation support. Choose it according to graph
|
||||||
|
size and available memory.
|
||||||
|
|
||||||
Chain multiple relations to answer complex queries:
|
## Evaluation
|
||||||
- "What drugs treat diseases caused by gene X?"
|
|
||||||
- Requires path-based or rule-based reasoning
|
|
||||||
- NeuralLP naturally supports this
|
|
||||||
|
|
||||||
### Temporal Knowledge Graphs
|
Use filtered ranking metrics:
|
||||||
|
|
||||||
Extend to time-varying facts:
|
- mean rank (MR)
|
||||||
- Add temporal information to triples
|
- mean reciprocal rank (MRR)
|
||||||
- Predict future facts
|
- Hits@1
|
||||||
- Requires temporal encoding in models
|
- Hits@3
|
||||||
|
- Hits@10
|
||||||
|
|
||||||
### Few-Shot Learning
|
Filtered evaluation removes other known true triples before ranking. Preserve
|
||||||
|
training, validation, and test facts exactly as the task expects to avoid leakage
|
||||||
|
or incorrect filtering.
|
||||||
|
|
||||||
Handle relations with few examples:
|
Also report:
|
||||||
- Meta-learning approaches
|
|
||||||
- Transfer from related relations
|
|
||||||
- Important for emerging knowledge
|
|
||||||
|
|
||||||
### Inductive Learning
|
- results by relation,
|
||||||
|
- head vs tail prediction,
|
||||||
|
- variance across seeds,
|
||||||
|
- memory/runtime settings,
|
||||||
|
- whether reciprocal relations were added.
|
||||||
|
|
||||||
Generalize to unseen entities:
|
## Biomedical use
|
||||||
- KBGAT and other GNN-based methods
|
|
||||||
- Use entity features/descriptions
|
|
||||||
- Critical for evolving knowledge graphs
|
|
||||||
|
|
||||||
## Biomedical Applications
|
Hetionet supports biomedical link-prediction experiments, but a high model score
|
||||||
|
does not establish a new treatment, causal mechanism, or validated association.
|
||||||
|
|
||||||
### Drug Repurposing
|
For drug-repurposing analysis:
|
||||||
|
|
||||||
Predict "drug treats disease" links in Hetionet:
|
1. define the exact relation being predicted,
|
||||||
1. Train on known drug-disease associations
|
2. preserve entity and relation type constraints,
|
||||||
2. Predict new treatment candidates
|
3. exclude known positives correctly,
|
||||||
3. Filter by mechanism (gene, pathway involvement)
|
4. check for train/test leakage through inverse or duplicate relations,
|
||||||
4. Validate predictions experimentally
|
5. calibrate or rank model scores,
|
||||||
|
6. validate candidates against independent evidence and domain experts.
|
||||||
|
|
||||||
### Disease Gene Discovery
|
TorchDrug's generic `KnowledgeGraphCompletion` API does not automatically apply
|
||||||
|
biomedical type constraints or causal interpretation.
|
||||||
|
|
||||||
Identify genes associated with diseases:
|
## Common failures
|
||||||
1. Model gene-disease-pathway networks
|
|
||||||
2. Predict missing gene-disease links
|
|
||||||
3. Incorporate protein interactions, expression data
|
|
||||||
4. Prioritize candidates for validation
|
|
||||||
|
|
||||||
### Protein Function Prediction
|
### Entity/relation mismatch
|
||||||
|
|
||||||
Link proteins to biological processes:
|
Build model sizes from `dataset.num_entity` and `dataset.num_relation`.
|
||||||
1. Integrate protein interactions, GO terms
|
|
||||||
2. Predict missing GO annotations
|
|
||||||
3. Transfer function from similar proteins
|
|
||||||
|
|
||||||
## Common Issues and Solutions
|
### Evaluation out of memory
|
||||||
|
|
||||||
**Issue: Poor performance on specific relation types**
|
Lower batch size or disable full-batch evaluation. Reducing negative samples
|
||||||
- Solution: Analyze relation patterns, choose appropriate model, or use relation-specific models
|
mainly affects training, not the size of all-entity ranking.
|
||||||
|
|
||||||
**Issue: Overfitting on small graphs**
|
### NeuralLP produces invalid shapes
|
||||||
- Solution: Reduce embedding dimension, increase regularization, or use simpler models
|
|
||||||
|
|
||||||
**Issue: Slow training on large graphs**
|
Use `num_relation=dataset.num_relation` and let
|
||||||
- Solution: Reduce negative samples, use DistMult for efficiency, or implement mini-batch training
|
`KnowledgeGraphCompletion.preprocess()` construct the fact graph.
|
||||||
|
|
||||||
**Issue: Cannot handle new entities**
|
### Inflated metrics
|
||||||
- Solution: Use inductive models (KBGAT), incorporate entity features, or pre-compute embeddings for new entities based on their neighbors
|
|
||||||
|
|
||||||
## Best Practices
|
Check for inverse-relation leakage, duplicate triples, accidental use of test
|
||||||
|
facts, and raw rather than filtered ranking.
|
||||||
|
|
||||||
1. Start with ComplEx or RotatE for most tasks
|
## Source links
|
||||||
2. Use self-adversarial negative sampling
|
|
||||||
3. Tune embedding dimension (typically 500-2000)
|
- [Reasoning tutorial](https://torchdrug.ai/docs/tutorials/reasoning.html)
|
||||||
4. Apply regularization to prevent overfitting
|
- [Knowledge graph datasets](https://torchdrug.ai/docs/api/datasets.html#knowledge-graph-datasets)
|
||||||
5. Use filtered evaluation metrics
|
- [Knowledge graph models](https://torchdrug.ai/docs/api/models.html#knowledge-graph-reasoning-models)
|
||||||
6. Analyze performance per relation type
|
- [KnowledgeGraphCompletion task](https://torchdrug.ai/docs/api/tasks.html#knowledge-graph-completion)
|
||||||
7. Consider relation-specific models for heterogeneous graphs
|
|
||||||
8. Validate predictions with domain experts
|
|
||||||
|
|||||||
+10
-8
@@ -2,9 +2,9 @@
|
|||||||
title: "Research Poster Guidelines"
|
title: "Research Poster Guidelines"
|
||||||
task: ""
|
task: ""
|
||||||
lineage_type: import
|
lineage_type: import
|
||||||
upstream_source: https://github.com/K-Dense-AI/scientific-agent-skills/blob/9c9bd2e9/skills/venue-templates/references/posters_guidelines.md
|
upstream_source: https://github.com/K-Dense-AI/scientific-agent-skills/blob/e8727695/skills/venue-templates/references/posters_guidelines.md
|
||||||
upstream_sha: 9c9bd2e9
|
upstream_sha: e8727695
|
||||||
imported_at: 2026-06-27
|
imported_at: 2026-07-20
|
||||||
prompt_class: prompt
|
prompt_class: prompt
|
||||||
upstream_changes: accepted
|
upstream_changes: accepted
|
||||||
author: upstream
|
author: upstream
|
||||||
@@ -15,7 +15,9 @@ validated: false
|
|||||||
|
|
||||||
Comprehensive guidelines for creating effective academic research posters including sizing, layout, typography, and design best practices.
|
Comprehensive guidelines for creating effective academic research posters including sizing, layout, typography, and design best practices.
|
||||||
|
|
||||||
**Last Updated**: 2024
|
**Reviewed**: 2026-07-20
|
||||||
|
|
||||||
|
Poster dimensions and upload rules are event-specific. Confirm the current presenter instructions before choosing a size, orientation, or file format.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -347,7 +349,7 @@ Use colorblind-friendly color combinations:
|
|||||||
- Steeper learning curve
|
- Steeper learning curve
|
||||||
- Can be slow to compile
|
- Can be slow to compile
|
||||||
|
|
||||||
**Template**: `assets/posters/tikzposter_research.tex`
|
**Bundled template**: None. Start from the current `tikzposter` package documentation or an event-provided template.
|
||||||
|
|
||||||
**Example Usage**:
|
**Example Usage**:
|
||||||
```latex
|
```latex
|
||||||
@@ -371,7 +373,7 @@ Use colorblind-friendly color combinations:
|
|||||||
- Complex syntax
|
- Complex syntax
|
||||||
- Less commonly used
|
- Less commonly used
|
||||||
|
|
||||||
**Template**: `assets/posters/baposter_conference.tex`
|
**Bundled template**: None. Start from the current `baposter` package documentation or an event-provided template.
|
||||||
|
|
||||||
**Example Usage**:
|
**Example Usage**:
|
||||||
```latex
|
```latex
|
||||||
@@ -607,8 +609,8 @@ Generate QR codes linking to:
|
|||||||
|
|
||||||
### LaTeX Templates
|
### LaTeX Templates
|
||||||
- `assets/posters/beamerposter_academic.tex`
|
- `assets/posters/beamerposter_academic.tex`
|
||||||
- `assets/posters/tikzposter_research.tex`
|
|
||||||
- `assets/posters/baposter_conference.tex`
|
This is the only poster template bundled with the skill. `tikzposter` and `baposter` remain possible external authoring packages, but no local templates are provided for them.
|
||||||
|
|
||||||
### Online Resources
|
### Online Resources
|
||||||
- Better Posters Blog: https://betterposters.blogspot.com/
|
- Better Posters Blog: https://betterposters.blogspot.com/
|
||||||
|
|||||||
Reference in New Issue
Block a user