---
title: 'Rosetta Neurons: Shared Representations'
url: https://www.emergentmind.com/topics/rosetta-neurons
type: topic
---

# Rosetta Neurons: Shared Representations

Searching arXiv for the specified papers and related work on Rosetta Neurons.
Rosetta Neurons are common units across different neural networks whose activation maps are strongly positively correlated over a shared set of inputs and spatial locations. The term was introduced to describe shared features across vision models with different architectures, different tasks, and different types of supervision, including class-supervised, text-supervised, self-supervised, discriminative, and generative settings [2306.09346]. In the original formulation, Rosetta Neurons are mined by identifying mutual top-\(K\) nearest neighbors under Pearson correlation between channels from different models, then aggregating these correspondences into tuples anchored by a generator and several discriminative models. The resulting correspondences are used both as an empirical probe of representational overlap and as a practical mechanism for cross-model visualization, inversion, and editing [2306.09346]. Subsequent work treated Rosetta Neurons as an internal observable for scaling-law analysis, reporting sublinear growth of the shared neuron population with model size and a concurrent increase in selectivity and specialization [2606.03990].

## 1. Formal definition

A Rosetta Neuron is defined as two or more units, that is, channels in different networks, whose activation maps are strongly positively correlated over a shared set of inputs and spatial locations [2306.09346]. Let \(F^{(1)}\) and \(F^{(2)}\) be two models, where one may be a generator \(G\) and the other a discriminator \(D\); let \(\{I_i\}_{i=1}^n\) be a set of \(n\) images; and let \(F_i^j \in \mathbb{R}^{h \times w}\) denote the activation map of channel \(j\) on input \(I_i\). For a generative model, noises \(z_i\) are sampled first and images are set as \(I_i = G(z_i)\) [2306.09346].

The activation maps are first resized to a common spatial size \((m \times m)\) by bilinear interpolation. The across-dataset-and-space mean and variance of channel \(j\) are then defined over all images \(i\) and pixels \(x \in \{1,\dots,m\}^2\) as
\[
\overline{F^j}
= \frac{1}{n\,m^2}\sum_{i,x}F_{i,x}^j,
\quad
\mathrm{var}(F^j)
= \frac{1}{n\,m^2-1}\sum_{i,x}\bigl(F_{i,x}^j-\overline{F^j}\bigr)^2.
\]
Using these quantities, the Pearson-correlation distance between unit \(j\) in model 1 and unit \(k\) in model 2 is
\[
d\bigl(F^{(1)j},F^{(2)k}\bigr)
= \frac
{\sum_{i,x}\bigl(F_{i,x}^{(1)j}-\overline{F^{(1)j}}\bigr)\,
\bigl(F_{i,x}^{(2)k}-\overline{F^{(2)k}}\bigr)}
{\sqrt{\mathrm{var}(F^{(1)j})\;\mathrm{var}(F^{(2)k})}}.
\]
A best-buddies pair \((j,k)\) is one that is mutual among the top-\(K\) nearest neighbors under this distance:
\[
BB(F^{(1)},F^{(2)};K)
= \bigl\{(j,k)\,\bigm|\,
j\!\in\!KNN(F^{(2)k},F^{(1)},K)\;\land\;
k\!\in\!KNN(F^{(1)j},F^{(2)},K)
\bigr\}.
\]
For \(m\) discriminative models \(D_1,\dots,D_m\) all paired to the same generator \(G\), a Rosetta Neuron across models is the tuple
\[
R(G;D_1,\dots,D_m)
= \bigl\{\,\bigl(j,k_1,\dots,k_m\bigr)\,\bigm|\,
(j,k_i)\in BB(G,D_i;K)\;\forall\,i=1..m
\bigr\}.
\]
Each tuple identifies a common concept expressed by channel \(j\) in \(G\) and by channel \(k_i\) in each \(D_i\) [2306.09346].

A later formulation generalized the identification procedure to intermediate MLP activations in language and vision Transformers. In that setting, the similarity is again Pearson correlation over aligned token or patch positions, and Rosetta Neurons are defined as mutual top-\(k\) nearest neighbors, with \(k = 1\) in almost all experiments [2606.03990]. This suggests that the concept is not restricted to convolutional feature maps, even though the original paper was centered on vision models and spatially aligned activations.

## 2. Mining procedure and model zoo

The mining pipeline begins with a generative model \(G\), a set of discriminative or representation models \(D_1,\dots,D_m\), a dataset of \(n\) inputs, and a neighborhood size \(K\), typically \(K = 5\) [2306.09346]. For each input, \(z_i \to G(z_i)\) is used to obtain a synthetic image when \(G\) is a generator, and the same image is then fed into each discriminative model. All intermediate post-ReLU/GeLU feature maps are recorded. For every channel pair across the generator and each discriminative model, both maps are resized to a common \(m \times m\), the mean and variance are computed, and the correlation distance is evaluated. Top-\(K\) nearest neighbors are then computed and pruned to mutual pairs. The final Rosetta set is obtained by intersecting best-buddy sets across all participating discriminative models [2306.09346].

The procedure also includes a synonym-clustering step. Channels in the generator can have “synonyms,” meaning multiple channels that respond similarly. Tuples \((j,k_1,\dots)\) are clustered by testing which generator channels are themselves best buddies in \(BB(G,G;K)\), and each cluster is treated as one visual concept. A curated dictionary is then assembled by collecting example generated images and overlaying normalized activation heatmaps from each model’s matched channel. This yields a dictionary of approximately \(50\)–\(80\) shared concepts per dataset [2306.09346].

The original analysis mined Rosetta Neurons among eight vision models [2306.09346]:

| Model | Training signal or role | Resolution |
|---|---|---|
| Class-supervised ResNet-50 | ImageNet | \(224^2\) |
| DINO-ResNet-50 | self-supervised DINO | \(224^2\) |
| DINO-ViT-base | self-supervised | \(224^2\) |
| MAE | Masked Autoencoder | \(224^2\) |
| CLIP-ResNet-50 | text-supervised, WebImageText | \(224^2\) |
| BigGAN | ImageNet generator | \(256^2\) |
| StyleGAN-2 | LSUN cats and LSUN horses | \(256^2\) and \(512^2\) |
| StyleGAN-XL | ImageNet generator | \(256^2\) |

Each discriminative model contributes a distinct embedding “language,” while generators contribute spatially detailed activation maps that can be visualized and manipulated [2306.09346]. A plausible implication is that the generator is not merely an auxiliary component for image synthesis, but a structural anchor that makes the shared features operationally accessible through latent optimization.

## 3. Empirical findings in vision

The central empirical claim of the original study is that common features exist across models with different architectures, different tasks, and different types of supervision [2306.09346]. These shared concepts span low-level, mid-level, and some higher-level structure. Reported examples include edges, textures, and colors at the low level; object parts such as head, beak, and paw at the mid level; and structures such as faces and windows at the higher level. Non-semantic cues, including shading, contour, and brightness, also emerge without forcing a semantic dictionary [2306.09346].

The paper explicitly states that no external semantic labels or segmentation maps are used, and that concepts are discovered bottom-up [2306.09346]. This matters methodologically because the mining criterion depends only on cross-model correlation structure rather than on annotation or task-specific supervision. The authors therefore interpret the shared units as evidence that certain visual concepts and structures are inherently embedded in the natural world and can be learned by different models regardless of the specific task or architecture, and without the use of semantic labels [2306.09346].

The reported scale of the mined dictionaries is domain-dependent but stable enough to be summarized as about \(50\)–\(80\) common units per domain [2306.09346]. Mutual neighbors are described as extremely unlikely to arise by chance in the “Best Buddies” analysis, and the choice \(K = 5\) is presented as a robustness measure for the matching rule [2306.09346]. This suggests that the method is intended to favor precision of correspondences over exhaustive recall of shared structure.

A later study extended the notion of Rosetta Neurons from a model-zoo alignment problem to a scaling-law observable. In language models from \(100\)M to \(30\)B parameters and vision models from \(80\)M to \(5\)B parameters, the population of Rosetta Neurons was reported to follow a sublinear power law in model size, growing in absolute number while occupying a shrinking fraction of the total neuron count [2606.03990]. In both modalities, the fitted exponent was reported as \(\beta \approx 0.6 \pm 0.05\), with \(R^2 \approx 0.99\), and the trend disappeared in untrained networks or under random permutation of input alignments [2606.03990]. Although this later analysis is not restricted to the original vision pipeline, it frames Rosetta Neurons as a recurring, measurable population rather than as isolated pairwise correspondences.

## 4. Visualization, inversion, and editing

A distinctive feature of the original framework is that one Rosetta partner is a generator, which makes direct visualization possible through latent-code optimization [2306.09346]. For inversion without pixel supervision, the paper minimizes
\[
\min_z\;-\frac{1}{|BB(G,D)|}
\sum_{(j,k)\in BB(G,D)}
\frac{\sum_x\bigl(G^j_x(z)-\overline{G^j}\bigr)\,\bigl(D^k_x(I_v)-\overline{D^k}\bigr)}
{\sqrt{\mathrm{var}(G^j)\,\mathrm{var}(D^k)}}
\;+\;\alpha\|z\|^2.
\]
This objective depends only on matched Rosetta activations and a latent regularizer, rather than on direct pixel reconstruction [2306.09346].

The paper reports several inversion-based manipulations enabled by this setup. For image-to-image translation such as dog-to-cat, “nose,” “ears,” and “pose” neurons from DINO-RN are matched to StyleGAN2 trained on LSUN cats, and the optimized cat retains the dog-input pose [2306.09346]. For out-of-distribution inversion such as sketches-to-photos, no pixel loss is used; only matched Rosetta activations are imposed, allowing a pencil sketch to be inverted into a realistic GAN image that preserves layout [2306.09346].

Editing is performed by directly manipulating activation maps and then re-optimizing the latent code. The operations reported are zoom, implemented by upsampling each selected activation map and cropping; shift, implemented by spatial translation of the activations; copy-paste of halves of two activations; and single-neuron removal or addition, implemented by clamping one heatmap to zero or to its maximum [2306.09346]. All of these require no further network training, only latent-space optimization guided by pre-mined Rosetta correspondences [2306.09346].

For GAN inversion quality on \(5{,}000\) ImageNet images, guiding StyleGAN-XL with Rosetta matches improved PSNR from \(13.99\) to \(15.42\), SSIM from \(0.340\) to \(0.365\), and LPIPS from \(0.48\) to \(0.46\) [2306.09346]. Within the scope of the reported experiments, these numbers locate Rosetta guidance not only as an interpretability device but also as an empirical constraint for downstream generative manipulation.

## 5. Selectivity, scaling, and specialization

The later scaling study examined whether Rosetta populations evolve predictably with model size [2606.03990]. In paired models of approximately matched scale, the count of Rosetta correspondences \(|\mathcal{R}|\) versus total neuron count \(x\) was fit as
\[
|\mathcal{R}|(x) \simeq c x^\alpha,
\]
which was then converted to parameter count \(S\) as
\[
N_R(S)=\alpha' S^\beta.
\]
The fitted exponent was consistently sublinear in both language and vision, with \(\beta \approx 0.6 \pm 0.05\) [2606.03990]. For language models, the paper reports approximately \(40\)K Rosetta neurons at \(100\)M parameters and approximately \(2\)M at \(30\)B parameters, with implied prefactor \(\alpha' \approx 0.3\). For vision models, the prefactor was reported as \(\alpha' \approx 0.8\) [2606.03990].

Beyond sheer count, the study reports a “Neuron Polarization Effect”: as models grow, Rosetta Neurons become more selective and increasingly monosemantic, while the larger non-Rosetta population remains less selective [2606.03990]. In language, selectivity was quantified by projecting each neuron’s output weight onto the vocabulary unembedding and computing excess kurtosis of token-similarity scores; Rosetta neurons rose from near zero to well above \(2.0\), whereas non-Rosetta neurons remained close to zero [2606.03990]. In vision, a vision-language model was asked to judge whether top-20 activating images plus heatmaps reflected one coherent visual feature; the fraction judged monosemantic increased from approximately \(60\%\) to approximately \(90\%\) for Rosetta Neurons as scale increased, while non-Rosetta neurons decreased from approximately \(40\%\) to approximately \(20\%\) [2606.03990].

The same study also reports domain specialization with scale. In Pythia from \(160\)M to \(12\)B parameters, Rosetta neurons increasingly over-fired on code, with normalized firing from approximately \(1.2\) to \(1.8\), and on math, from approximately \(1.0\) to \(1.5\), while under-firing on prose and conversation [2606.03990]. In a JavaScript filtering case study, a single JavaScript-selective Rosetta Neuron in Pythia-6.9B was used to score CodeSearchNet functions by mean activation, selecting the top \(16\)M tokens’ worth of functions. This filter recovered JavaScript with \(F1 = 0.98\), nearly the oracle’s \(1.00\), and after continued pretraining of GPT2-1.5B on the filtered data achieved test perplexity \(3.02\) versus \(3.01\) for the oracle; a matched non-Rosetta neuron yielded only \(F1 = 0.09\) and \(PPL = 3.23\) [2606.03990]. These results do not alter the original vision definition, but they extend the concept into a broader claim about shared and increasingly selective neuron-level structure.

## 6. Limitations, interpretation, and related significance

The original paper identifies several limitations. GAN-to-GAN direct matching is described as not trivial, and the pipeline always goes through a discriminator [2306.09346]. Diffusion models proved resistant to the approach, perhaps because their features are more step-wise and noisy [2306.09346]. Correlation can also mine spurious matches, such as tongues activating where context suggests them [2306.09346]. These caveats constrain interpretation: positive correlation and mutual-nearest-neighbor filtering are sufficient to expose many robust common units, but they do not guarantee semantic purity or comprehensive coverage of all shared computations.

The framework nevertheless supports several applications explicitly listed in the source material: model-to-model translation of concepts such as “flower” or “wheel” between vision networks; unsupervised discovery of interpretable units for neuroscience or cognitive-science analogies; conditional generation or image editing without specialized training, including object removal by switching off single neurons; and improved GAN inversion and downstream generative manipulation by imposing early-layer constraints [2306.09346]. The later scaling study adds a different interpretability significance: Rosetta Neurons may form a shared population whose size, selectivity, and specialization follow simple power laws, thereby connecting macroscopic scaling laws to internal building blocks of trained networks [2606.03990].

A common misconception would be to treat Rosetta Neurons as a claim that all models share the same representations in a strong global sense. The reported results are narrower. The original paper identifies about \(50\)–\(80\) common units per domain across heterogeneous vision models [2306.09346], while the later scaling work shows that even as the absolute number of Rosetta Neurons grows, their fraction shrinks with model size [2606.03990]. Another misconception would be to equate Rosetta status with semantics alone. The mined concepts include non-semantic cues such as shading, contour, and brightness, and the method does not force a semantic dictionary [2306.09346].

Taken together, these studies position Rosetta Neurons as a lightweight, fully unsupervised bridge between diverse trained models, with two complementary meanings. In the original vision setting, they are a practical mechanism for identifying, visualizing, and manipulating shared concepts across a model zoo [2306.09346]. In the later scaling setting, they are a measurable neuron-level population whose growth, monosemanticity, and specialization can be studied quantitatively as models expand [2606.03990].

Source: https://www.emergentmind.com/topics/rosetta-neurons