techlist.io

Resnet

3 posts

OpenAI2021-03-033 min readCurated summary

Multimodal neurons in artificial neural networks

# Multimodal neurons in CLIP reveal how the model abstracts concepts OpenAI found neurons in CLIP that respond to the same concept whether it appears literally, symbolically, or conceptually. This helps explain CLIP's accuracy on surprising visual renditions of objects, and it is a step toward understanding the associations and biases such models learn. The same abstraction that makes CLIP versatile also makes it vulnerable to text-based attacks and inherited social biases. ## Multimodal neurons, from neuroscience to CLIP - Quiroga et al. (2005) found "multimodal" neurons in the human brain, such as the "Halle Berry" neuron, which responds to photos, sketches, and the written name but not to other names. - CLIP, a general-purpose vision system that matches ResNet-50 accuracy, outperforms existing models on stress tests like ObjectNet, ImageNet Rendition, and ImageNet Sketch, which involve abstractions such as sketches, cartoons, and statues. - The authors found a "Spider-Man" neuron in CLIP that responds to a spider, the word "spider," and the Spider-Man character in costume or illustration. - Using feature visualization and dataset examples, most neurons in CLIP RN50x4 are interpretable. They behave like the "multi-faceted neurons" described in earlier work, but at a higher level of abstraction. - Many categories mirror neurons found in the human medial temporal lobe, including neurons for emotions, animals, and famous people. - Other neurons handle counting, art styles, and signs of digital alteration. ## Limits of neuron-level analysis - CLIP can geolocate photos to the level of a city or neighborhood, but the authors found no "San Francisco" neuron. The information seems to be encoded in a more distributed way, such as a direction or manifold, which they call a promising direction for future research. ## How concepts combine - With a sparse linear probe, one can see which concepts combine to produce an ImageNet classification. - For text, concepts are encoded almost linearly, similar to word2vec, so they form a simple algebra that can be inspected much like a linear probe. ## Abstraction as an attack surface - At the highest layers, CLIP's representations are dominated by high-level abstractions that generalize across literal and iconic forms. This generalization is a double-edged sword. - The "finance" neuron fires for piggy banks and for the string "$$$." Forcing it to fire can make CLIP classify a dog as a piggy bank. - These "typographic attacks" work with handwritten text on paper, which makes them a real-world threat that requires no technology beyond a pen. - Subtler forms of over-abstraction may also cause overgeneralization without being obvious. ## Biases inherited from training data - Despite being trained on a curated subset of the internet, CLIP has learned associations that could cause representational harm. Examples include a "Middle East" neuron linked to terrorism, an "immigration" neuron that responds to Latin America, and a neuron that fires for both dark-skinned people and gorillas. - Such biases can persist in fine-tuned and zero-shot use, and they are hard to anticipate in advance. Interpretability tools may help practitioners find some of these problems before deployment. ## Release and outlook - OpenAI updated the Microscope catalog with feature visualizations, dataset examples, and text feature visualizations for every neuron in CLIP RN50x4. - The weights of CLIP RN50x4 and RN101 are released for research purposes only, and the authors were still deciding whether to release larger versions. The authors position this work as only a first look at CLIP's behavior and invite the research community to build on these tools. For practitioners, the takeaway is that CLIP's strong generalization comes with specific, testable vulnerabilities and biases, so interpretability checks should be part of evaluation before deployment.

OpenAI2019-12-042 min readCurated summary

Deep double descent

# Deep Double Descent OpenAI's research shows that the double descent phenomenon appears in modern deep learning architectures, including CNNs, ResNets, and transformers. Performance first improves, then worsens, then improves again as model size, data size, or training time increases. The effect is often hidden by careful regularization. The authors do not yet fully understand why it happens and call further study an important research direction. ## Model-wise Double Descent Test error follows a non-monotonic curve as parameter count grows, which contradicts both classical statistics ("larger models overfit") and the modern view that bigger is always better. - Test error decreases, rises, and then decreases again as the number of parameters increases. - The peak occurs at the "critical regime" (the interpolation threshold), where the model is just barely able to fit the training set. - Changes that move the interpolation threshold, such as the optimizer, the number of training samples, or the amount of label noise, move the test error peak with it. - The effect is most visible with added label noise. Without it, the peak is smaller and easy to miss. ## Sample-wise Non-monotonicity Adding more training data can make performance worse. - In transformer experiments on a language-translation task without label noise, more samples generally lower the test error curve. - More samples also require larger models to fit, which shifts the interpolation threshold and its test error peak to the right. - For intermediate model sizes, these two effects combine, and training on 4.5x more samples actually hurts test performance. ## Epoch-wise Double Descent The double descent pattern also appears over training time for a fixed model size. - As training proceeds, test and train error decrease, increase, and decrease again. - The peak again appears when the model is just barely able to fit the training set. - The authors' intuition is that at the interpolation threshold, only one model fits the training data, and forcing it to fit slightly noisy labels destroys its global structure. - In the over-parameterized regime, many models fit the training set, and some of them generalize well. The implicit bias of stochastic gradient descent appears to steer training toward these models, though the authors do not yet understand why. ## Practical Takeaway Regularization and early stopping can hide the peak, so practitioners should not assume that more data, larger models, or longer training always helps. Performance can degrade in the critical regime before it recovers.