Compressed Sensing for Capability Localization in Large Language Models
Abstract
Lay Summary
Large language models can do many different things, including solving math problems, and writing code. But how does a single model handle all of these abilities? How is the processing of these various abilities organized within the model? We found that for many capabilities, a surprisingly small number of components inside the model are critical for performance. Just five out of more than a thousand "attention heads" can be responsible for a model's ability to do math. Disable those five, and the model's math performance collapses, but its ability to answer general knowledge questions or generate fluent text stays intact. Finding these critical components could require testing them one at a time, which is slow. We borrowed a technique called compressed sensing, which was originally designed to reconstruct signals from very few measurements, and used it to identify these components much more efficiently. Our method works across different models of varying sizes and several capabilities, and could be used to help researchers better understand how language models work.