ChatPaper.aiChatPaper

Una teoría del aprendizaje contrastivo con imágenes naturales

A Theory of Contrastive Learning with Natural Images

July 8, 2026
Autores: Antonio Torralba, Yair Weiss
cs.AI

Resumen

¿Por qué el aprendizaje contrastivo con imágenes simples y aumentaciones produce representaciones útiles para tareas posteriores? Abordamos esta pregunta calculando analíticamente la representación óptima en términos de una pérdida contrastiva para un conjunto de aumentaciones básicas y cualquier conjunto de imágenes con estadísticas estacionarias. Demostramos que, para ciertas aumentaciones, el óptimo puede alcanzarse mediante una CNN cuyos filtros de la primera capa son sinusoides, seguidos de una no linealidad puntual, un promedio global de agrupamiento y una capa lineal final que realiza un blanqueamiento parcial. También mostramos que los pesos óptimos en dichas CNN para aumentaciones más complejas siguen siendo sinusoides. Las frecuencias de las sinusoides y sus pesos pueden calcularse mediante un algoritmo simple de llenado de agua, dado el espectro de potencia esperado del conjunto de datos. Experimentos con diferentes conjuntos de imágenes y aumentaciones muestran que dichas CNN entrenadas con SGD aprenden empíricamente sinusoides en su primera capa y a realizar un blanqueamiento parcial.
English
Why does contrastive learning with simple images and augmentations yield useful representations for downstream tasks? We address this question by analytically computing the optimal representation in terms of a contrastive loss for a range of basic augmentations and any image dataset with stationary statistics. We show that for certain augmentations the optimum can be attained by a CNN whose first layer filters are sinusoids, followed by a pointwise nonlinearity, global average pooling, and a final linear layer that performs partial whitening. We also show that the optimal weights in such CNNs for more complicated augmentations are still sinusoids. The frequencies of the sinusoids and their weights can be computed using a simple waterfilling algorithm given the dataset's expected power spectrum. Experiments with different image datasets and augmentations show that such CNNs trained with SGD empirically learn sinusoids in their first layer and to perform partial whitening