Free SKILL.md scraped from GitHub. Clone the repo or copy the file directly into your Claude Code skills directory.
npx versuz@latest install hiyenwong-ai-collection-collection-skills-brainstr-spatiotemporal-brain-networksgit clone https://github.com/hiyenwong/ai_collection.gitcp ai_collection/SKILL.MD ~/.claude/skills/hiyenwong-ai-collection-collection-skills-brainstr-spatiotemporal-brain-networks/SKILL.md--- name: brainstr-spatiotemporal-brain-networks description: BrainSTR methodology for interpretable dynamic brain network analysis using spatiotemporal contrastive learning. Identifies time-varying functional connectivity patterns with interpretability guarantees. Based on arXiv:2604.14288 (April 2026). tags: [brain networks, dynamic connectivity, contrastive learning, spatiotemporal, interpretability, fMRI] --- # BrainSTR: Spatiotemporal Contrastive Brain Networks ## Overview BrainSTR (Brain Spatiotemporal Representation) methodology for interpretable dynamic brain network analysis using contrastive learning across both spatial and temporal dimensions. **Paper**: arXiv:2604.14288 (April 2026) ## Key Innovations ### 1. Spatiotemporal Contrastive Learning - Joint spatial and temporal augmentation strategies - Positive pairs: same brain state, different augmentations - Negative pairs: different brain states or time points - Captures both spatial organization and temporal evolution ### 2. Interpretable Network Construction - Learned representations map to identifiable brain regions - Temporal dynamics preserve neurobiological meaning - Connection strengths reflect meaningful neural coupling - No black-box feature extraction ### 3. Dynamic State Detection - Automatic identification of recurring brain states - State transition probability matrices - Dwell time distributions per state - State-specific connectivity patterns ## Methodology Steps ### Preprocessing 1. Standard fMRI preprocessing pipeline - Motion correction - Slice timing correction - Spatial normalization - Temporal filtering 2. Parcellation into ROIs 3. Temporal segmentation into windows or events ### Contrastive Pre-training 1. **Spatial Augmentations** - Regional masking - Spatial permutation (within constraints) - Node dropout - Edge perturbation 2. **Temporal Augmentations** - Time warping - Subsequence sampling - Temporal shuffling (within windows) - Phase randomization 3. **Contrastive Objective** - InfoNCE loss for representation alignment - Multi-scale temporal sampling - Cross-subject negative sampling ### Network Inference 1. Learn connectivity weights from representations 2. Threshold based on statistical significance 3. Validate against known anatomical constraints 4. Track temporal evolution of connections ## Applications ### Clinical - Biomarker discovery for neurological disorders - Disease progression monitoring - Treatment response prediction - Individualized network profiling ### Cognitive Neuroscience - Task-evoked network reconfiguration - Resting-state dynamics characterization - Individual differences in network organization - Developmental trajectory analysis ## Advantages 1. **Interpretability** - Mappings back to brain regions - Meaningful connection strengths - Temporal dynamics preserved - Clinical relevance maintained 2. **Data Efficiency** - Self-supervised pre-training reduces labeled data needs - Transfer learning across datasets - Few-shot adaptation to new populations 3. **Robustness** - Handles noise and artifacts - Subject-level variability accounted for - Cross-scanner generalization ## Best Practices ### Augmentation Design 1. Respect neurobiological constraints 2. Avoid augmentations that destroy meaningful signal 3. Balance spatial and temporal augmentation strength 4. Validate augmentations with domain experts ### Evaluation 1. Compare with static connectivity baselines 2. Test on known functional networks (DMN, FPN, etc.) 3. Validate state transitions against behavioral data 4. Cross-dataset generalization tests ### Deployment 1. Standardize preprocessing across sites 2. Provide uncertainty estimates 3. Include quality control metrics 4. Document limitations and assumptions ## Pitfalls - Over-augmentation destroying meaningful neural signal - Ignoring hemodynamic response function in temporal analysis - Not accounting for subject motion in dynamic analysis - Assuming stationarity within analysis windows - Overfitting contrastive objective to dataset-specific patterns - Missing validation against established neuroscience findings ## Related Skills - brain-dit-universal-multi-state - time-varying-brain-connectivity - functional-connectome-fingerprint - brain-network-integration-segregation-dfc ## References - arXiv:2604.14288 (April 2026)