Skip to content
Back to skills

Retrieval Based Brain Decoding Alignment

ASecurity

Retrieval-Based Brain Decoding by Alignment, not Complexity. Linear contrastive decoders outperform ridge regression and non-linear alternatives across images, text, and sound. Decoding gains arise from training objective choice, not architectural complexity.

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 11, 2026
researchpythonperformance

Works with

  • cli

Security analysis

A100/100

Scanned September 11, 2026

npx -y skills add hiyenwong/ai_collection --skill retrieval-based-brain-decoding-alignment --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Retrieval Based Brain Decoding Alignment?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Retrieval Based Brain Decoding Alignment
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/hiyenwong-retrieval-based-brain-decoding-alignment/badge)](https://www.skillsdirectory.com/skills/hiyenwong-retrieval-based-brain-decoding-alignment)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: retrieval-based-brain-decoding-alignment
description: Retrieval-Based Brain Decoding by Alignment, not Complexity. Linear contrastive decoders outperform ridge regression and non-linear alternatives across images, text, and sound. Decoding gains arise from training objective choice, not architectural complexity.
version: 1.0
author: Matteo Ciferri, Matteo Ferrante, Nicola Toschi
arxiv: 2606.19081
date: 2026-06-17
tags: [brain-decoding, contrastive-learning, fMRI, foundation-models, linear-decoding, retrieval, alignment]
---

# Retrieval-Based Brain Decoding by Alignment, Not Complexity

## Core Innovation

**Problem**: Brain decoding methods often rely on architectural complexity, but the key factor may be the training objective itself.

**Discovery**: Linear contrastive decoders consistently outperform ridge regression and non-linear alternatives across multiple modalities (images, text, sound), indicating decoding gains arise from **objective choice** rather than architectural complexity.

## Theoretical Framework

### Cognitive Science Premise
- Concepts in brain organized as **high-dimensional vectors**
- Semantic meaning captured by **directions and relative angles** in vector space
- Brain decoding = finding function that approximates how brain represents concepts

### Linearization Hypothesis
- Neural computations: highly non-linear at **microscale**
- fMRI measurements: **average signals across space and time**, further smoothed by noise
- Result: effectively **linearizes observable representation**

## Methodology

### Contrastive Decoding Approach

**Key Insight**: Contrastive objectives are **biologically plausible candidates** to reverse brain loss function.

```
┌─────────────────┐      ┌─────────────────┐
│   Brain Activity│ --> │   Linear        │ --> │   Foundation    │
│   (fMRI)         │      │   Contrastive   │      │   Model Embed   │
│                  │      │   Decoder       │      │   Space         │
└─────────────────┘      └─────────────────┘      └─────────────────┘
```

### Experiments

**Datasets**: Multiple datasets across modalities
- **Images**: Visual stimuli → fMRI → vision foundation models
- **Text**: Language stimuli → fMRI → language foundation models  
- **Sound**: Audio stimuli → fMRI → audio foundation models

**Baselines**:
- Ridge regression (linear)
- Non-linear alternatives (MLP, deep networks)

**Finding**: Linear contrastive decoders **consistently outperform** both ridge regression and non-linear alternatives

## Key Results

### Performance Comparison

| Method | Modality | Performance | Key Insight |
|--------|----------|-------------|--------------|
| Ridge Regression | Image | Baseline | Standard linear approach |
| Non-linear (MLP) | Image | Below baseline | Complexity doesn't help |
| **Linear Contrastive** | **Image** | **Best** | **Objective matters** |
| **Linear Contrastive** | **Text** | **Best** | **Cross-modal generalization** |
| **Linear Contrastive** | **Sound** | **Best** | **Universal principle** |

### Conclusion

**Decoding gains arise more from training objective choice than architectural complexity**

→ Linear contrastive models are **principled strategy** for brain decoding

## Implementation

### Linear Contrastive Decoder

```python
# Conceptual framework
class LinearContrastiveDecoder:
    def __init__(self, embedding_dim, brain_dim):
        self.W = Linear(brain_dim, embedding_dim)  # Linear mapping
        
    def forward(self, brain_activity):
        # Map brain activity to embedding space
        embedding = self.W(brain_activity)
        return embedding
    
    def contrastive_loss(self, embedding, target_embedding):
        # Alignment loss (e.g., cosine similarity)
        return contrastive_objective(embedding, target_embedding)
```

### Foundation Model Integration

- **Vision**: CLIP, DINO, MAE embeddings
- **Language**: BERT, GPT embeddings  
- **Audio**: CLAP, AudioCLIP embeddings

### Training Protocol

1. Extract brain activity (fMRI voxels)
2. Extract stimulus embeddings from frozen foundation model
3. Train linear contrastive decoder to align brain → embedding space
4. Retrieve nearest neighbors in embedding space as decoded stimulus

## Technical Pitfalls

### Avoid
1. **Over-complicating architecture**: Non-linear doesn't help
2. **Ignoring linearization**: fMRI averaging linearizes representation
3. **Wrong objective**: Use contrastive, not reconstruction

### Best Practices
1. Use **simple linear mapping**
2. Apply **contrastive objectives** (InfoNCE, cosine similarity)
3. Leverage **frozen foundation models** (CLIP, BERT)
4. Test across **multiple modalities**

## Activation

Use when:
- Decoding stimuli from fMRI brain activity
- Building brain-to-embedding mapping
- Retrieving representations from neural signals
- Understanding brain encoding principles

**Trigger words**: retrieval-based decoding, contrastive decoder, linear alignment, brain decoding, foundation model alignment, fMRI decoding

## Related Skills

- `brain-llm-alignment-training-data`
- `beyond-neural-activity-prediction`
- `vlm-lam-brain-alignment`
- `brain-guided-llm-reasoning-alignment`

## References

- arXiv:2606.19081
- Related: Contrastive learning, foundation models, brain encoding

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…