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-decoding-encoding-alignment-critiquegit clone https://github.com/hiyenwong/ai_collection.gitcp ai_collection/SKILL.MD ~/.claude/skills/hiyenwong-ai-collection-collection-skills-decoding-encoding-alignment-critique/SKILL.md---
name: decoding-encoding-alignment-critique
description: >
Critical analysis framework for brain-model alignment methods (RSA, encoding, decoding).
Exposes that decoding alignment does NOT imply computational similarity — high RSA/DSA
scores can arise from small non-representative neuron subpopulations. Introduces encoding
manifolds as complementary analysis tool. Covers representational collapse, feature
confounding, stimulus-set dependency, and subpopulation dominance.
Use when: (1) evaluating brain-model alignment methodologies, (2) designing RSA studies,
(3) interpreting encoding/decoding results, (4) selecting appropriate alignment metrics,
(5) reviewing neuroscience-AI alignment papers, (6) avoiding alignment pitfalls.
Trigger words: RSA critique, encoding model limitations, representational similarity pitfalls,
brain-model alignment, representational collapse, feature confounding, alignment validity,
stimulus-set dependency, cross-decoding, transformation alignment, encoding manifold,
subpopulation dominance, neural system comparison.
---
# Decoding-Encoding-Alignment Critique
Critical framework for evaluating and interpreting brain-model alignment methods.
## Core Thesis
Standard alignment metrics (RSA, encoding models, linear decoding) have systematic blind spots
that can produce misleading conclusions about brain-AI similarity. **Decoding alignment does NOT
imply computational similarity.**
## Key Limitations Exposed
### 1. Subpopulation Dominance (NEW - arXiv:2605.05907)
**Problem**: High RSA/DSA alignment can arise from tiny, non-representative subpopulations of
neurons. The representational geometry reflects a few neurons, not the whole population.
**Evidence**:
- Similar decoding behavior and high alignment from small subpopulations while overall encoding
topology differs completely
- Causal MNIST experiment: decoding metrics unchanged when encoding topology is manipulated
via training loss
- Alignment metrics are blind to how function is distributed across neurons
**Detection**:
```python
def subpopulation_rsa(neural_responses_a, neural_responses_b, n_range=[5,10,20,50,100]):
"""Test RSA stability across random subpopulations."""
import numpy as np
from scipy.spatial.distance import pdist, squareform
from scipy.stats import spearmanr
results = {}
for n in n_range:
if n >= min(neural_responses_a.shape[0], neural_responses_b.shape[0]):
continue
rsa_scores = []
for _ in range(100):
idx_a = np.random.choice(neural_responses_a.shape[0], n, replace=False)
idx_b = np.random.choice(neural_responses_b.shape[0], n, replace=False)
rdm_a = squareform(pdist(neural_responses_a[idx_a], metric='correlation'))
rdm_b = squareform(pdist(neural_responses_b[idx_b], metric='correlation'))
rsa_scores.append(spearmanr(rdm_a.ravel(), rdm_b.ravel())[0])
results[n] = {'mean': np.mean(rsa_scores), 'std': np.std(rsa_scores)}
return results
```
### 2. Encoding-Decoding Decoupling (NEW - arXiv:2605.05907)
**Problem**: Alignment metrics capture WHAT is represented (decoding) but not HOW it's
implemented (encoding). Two systems can have identical decoding but completely different
encoding structures.
**Solution - Dual Manifold Analysis**:
| Aspect | Decoding Manifold | Encoding Manifold |
|--------|-------------------|-------------------|
| What it measures | Stimulus distinguishability from neural activity | How neurons are organized across responses |
| Unit of analysis | Stimulus space geometry | Neural population space geometry |
| Answers | "What information is represented?" | "How is it implemented across neurons?" |
| Sensitivity | Insensitive to which neurons contribute | Captures global neuronal organization |
```python
# Encoding RDM: pairwise similarity of neuron tuning curves
def compute_encoding_rdm(neural_responses):
"""Rows are neurons; captures neuron-neuron similarity structure."""
from scipy.spatial.distance import pdist, squareform
return squareform(pdist(neural_responses.T, metric='correlation'))
```
### 3. Representational Collapse
**Problem**: RSA can report high similarity when both representations are degenerate/collapsed.
Two uninformative representations can have high RSM correlation.
**Detection**: Check representational dimensionality (participation ratio, intrinsic dimension).
Compare against low-dimensional baselines.
### 4. Feature Confounding
**Problem**: Encoding models can achieve high performance by capturing low-level confounds
(pixel statistics, image size, contrast) rather than semantic representations.
**Detection**: Control for low-level features; cross-validate across stimulus sets.
### 5. Stimulus-Set Dependency
**Problem**: Alignment scores vary dramatically with stimulus selection.
**Detection**: Test on multiple diverse stimulus sets; report cross-stimulus generalization.
### 6. Linear Probing Artifacts
**Problem**: High linear decoding accuracy only proves information is linearly extractable,
not that the model uses the same representations as the brain.
## Recommended Evaluation Protocol
1. **Dual-manifold analysis**: Always pair decoding (RSA/DSA) with encoding analysis
2. **Subpopulation sensitivity**: Test alignment stability across neuron subsamples
3. **Dimensionality matching**: Compare representations at matched dimensionalities
4. **Cross-stimulus validation**: Test generalization across stimulus distributions
5. **Null model comparison**: Include trivial baselines
6. **Transformation analysis**: Test if representations transform similarly, not just match statically
## Common Pitfalls in Alignment Studies
| Pitfall | Symptom | Fix |
|---------|---------|-----|
| Subpopulation dominance | High RSA driven by few neurons | Subpopulation stability analysis |
| Encoding blindness | Identical decoding, different implementation | Encoding manifold analysis |
| RSA inflation | High RSM correlation with degenerate RSMs | Check RSM condition number |
| Encoding overfitting | High R² but poor generalization | Cross-validate across stimulus sets |
| Decoding ceiling | Near-perfect decoding from both | Use matched-capacity probes |
| Category confound | Alignment driven by coarse categories | Control for category structure |
## When to Use
- Evaluating brain-DNN alignment beyond RSA
- Comparing neural coding across brain regions
- Understanding how information is distributed in populations
- Critiquing representational similarity studies
- Designing comprehensive neural system comparisons
## arXiv References
### Primary: Subpopulation Dominance in RSA
- Paper: "Decoding Alignment without Encoding Alignment: A critique of similarity analysis in neuroscience"
- Authors: Bertram, J., Dyballa, L., Keller, T.A., Kinger, S., & Zucker, S.W. (2026)
- ID: arXiv:2605.05907v1 | Category: q-bio.NC | Date: 2026-05-07
- Key finding: RSA alignment can be driven by tiny subpopulations; encoding topology must be analyzed complementarily
### Secondary: Transformation Alignment
- Paper: "Beyond Object-Level Alignment: Do Brains and DNNs Preserve the Same Transformations?"
- Author: Yukiyasu Kamitani (2026)
- ID: arXiv:2605.06420v1 | Category: q-bio.NC
- Proposes category-theoretic approach: do brain and model preserve the same candidate transformations?