Soft Nearest Neighbor Lossを探索して展開し、表現空間内のクラス多様体の絡み合いを測定します。つまり、同じクラスのポイントのペアが異なるクラスのポイントのペアに対してどれだけ近いかを測定します。損失のいくつかのユースケースを示します。分析ツールとして、学習中のクラス類似構造の進化に関する洞察を提供します。驚いたことに、隠れ層の異なるクラスの表現の絡み合いを最大化することは、おそらく表現がクラスに依存しない類似構造を識別することを促進するため、最終層の識別に有益であることがわかります。隠れ層のソフト最近傍損失を最大化すると、一般化が改善されるだけでなく、外れ値データの不確実性のより正確な推定値が得られます。トレーニング分布からではないデータは、隠れ層で、予測されたクラスからの通常の隣接数よりも少ないことを観察することで認識できます。
We explore and expand the Soft Nearest Neighbor Loss to measure the entanglement of class manifolds in representation space: i.e., how close pairs of points from the same class are relative to pairs of points from different classes. We demonstrate several use cases of the loss. As an analytical tool, it provides insights into the evolution of class similarity structures during learning. Surprisingly, we find that maximizing the entanglement of representations of different classes in the hidden layers is beneficial for discrimination in the final layer, possibly because it encourages representations to identify class-independent similarity structures. Maximizing the soft nearest neighbor loss in the hidden layers leads not only to improved generalization but also to better-calibrated estimates of uncertainty on outlier data. Data that is not from the training distribution can be recognized by observing that in the hidden layers, it has fewer than the normal number of neighbors from the predicted class.