# Poster 30537

- Kind: Poster
- Talk page and recording: https://iclr.cc/virtual/2025/poster/30537

> Transcript of the talk's recording (session_asr), made by speech recognition or taken from the host's captions. It may contain errors. The words are the speakers'; listen to the recording on the talk's page before quoting it.

Hi, my name is Arnas. I'll present our work on intermediate level classifiers for auto distribution generalization. This is a joint work with Sanjuno at the University of Tübingen.
Distribution chips are everywhere. They happen anytime we move from a controlled lab setting to any real-world environment. What inevitably changes is the data distribution, the joint distribution over inputs and outputs during training might not match the testing time. To illustrate this, we show a few examples that exhibit the population shift.
On the left you can see that certain groups like background or hair color are more common during training than at the testing time. This imbalance leads to a sharp drop in performance seen on the right even when the task itself remains the same. This is the core problem that we aim to address. To address this problem recent work has pointed out that the visual features extracted from deep models often appear to transfer surprisingly well across distributions.
A sudden view is to break the model into two parts, the feature extractor and the linear classifier. Several papers suggest that under distribution shifts, it's not the feature extractor that fails to transfer, it is the classifier. In this work, we ask, does the feature extractor actually generalize across distribution shifts? To test whether features at different depths actually generalize, we introduce intermediate layer classifiers.
We view the model as a sequence of layers from 1 to L. Then we attach a linear classifier on top of each layer and train it either using in-distribution or out -of-distribution data. This setup allows us to directly measure how well each layer's features support generalization under distribution shifts.
We start by comparing lastly our retraining on out-of-distribution data to the best performing intermediate layer in our framework. Across nearly all datasets, the intermediate layer outperforms the last layer retraining. This suggests that intermediate features are more informative for classification under distribution shifts than the penultimate layer. Next, we evaluate how strong these features are when no out-of-distribution data is available.
Here we train the classifier only in distribution and evaluate them directly on out of distribution data. Surprisingly, the best intermediate layers still outperform last layer retraining, even though both are trained on the exact same in distribution data. This suggests that these features are simply less affected by distribution shifts and therefore transfer better.
To give insight into why intermediate layers might be more robust than the penultimate layer, we look at how sensitive each layer's features are to distribution shifts.
Specifically, we come up with a layer sensitivity score. A layer sensitivity score suggests that a layer represents in-distribution and out-of-distribution data far apart from each other. What we found is that intermediate layers are less sensitive than the penultimate layer, particularly under distribution shifts where the model performs the worst.
In the example below we show features under the population shifts. The features from layer 6 stay relatively stable for the majority class. Layer 8 shifts noticeably, especially for the minority points. This suggests why intermediate layers unless disrupted by distribution shifts.
If you have a question or would like to discuss the work, please reach out and please check out the paper for more experiments, details and results.
