arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2403.08673cs.LGstat.ML
收藏

何时可以用神经正切核与主成分分析近似宽对比模型?

When can we Approximate Wide Contrastive Models with Neural Tangent Kernels and Principal Component Analysis?

Indian Institute of Technology Madras(印度马德拉斯理工学院);Technical University of Munich(慕尼黑工业大学)

Gautham Govind Anil, Pascal Esser, Debarghya Ghoshdastidar

AI总结:

本文分析两层对比模型训练动态,首次给出对比损失下神经正切核收敛性结果,证明宽模型在余弦相似度损失下接近核PCA,且所学表示接近随机特征矩阵主成分。

摘要:

对比学习是一种从无标注数据中学习表示的学习范式,在图像和文本数据上已取得巨大成功。近期多项研究通过分析对比损失,声称对比模型实际上学习的是谱嵌入,同时也有少量工作展示了(宽)对比模型与核主成分分析(PCA)之间的联系。然而,经过训练的对比模型是否确实对应于核方法或PCA,目前尚不清楚。在本工作中,我们分析了具有非线性激活的两层对比模型的训练动态,并回答了这些模型在何种情况下接近PCA或核方法。众所周知,在监督学习场景下,神经网络等价于神经正切核(NTK)机器,且无限宽网络的NTK在训练过程中保持不变。我们首次提供了对比损失下NTK的收敛性结果,并呈现了一幅细致的图景:对于基于余弦相似度的对比损失,宽网络的NTK几乎保持不变,但对于基于点积相似度的损失则不然。我们进一步研究了输出层带有正交约束的对比模型的训练动态,这一约束在将对比学习与谱嵌入联系起来的工作中被隐式假设。我们的偏差界表明,对比模型学习到的表示接近于由随机特征计算得到的某个矩阵的主成分。我们通过实验表明,我们的理论结果可能超越两层网络而成立。

英文摘要:

Contrastive learning is a paradigm for learning representations from unlabelled data that has been highly successful for image and text data. Several recent works have examined contrastive losses to claim that contrastive models effectively learn spectral embeddings, while few works show relations between (wide) contrastive models and kernel principal component analysis (PCA). However, it is not known if trained contrastive models indeed correspond to kernel methods or PCA. In this work, we analyze the training dynamics of two-layer contrastive models, with non-linear activation, and answer when these models are close to PCA or kernel methods. It is well known in the supervised setting that neural networks are equivalent to neural tangent kernel (NTK) machines, and that the NTK of infinitely wide networks remains constant during training. We provide the first convergence results of NTK for contrastive losses, and present a nuanced picture: NTK of wide networks remains almost constant for cosine similarity based contrastive losses, but not for losses based on dot product similarity. We further study the training dynamics of contrastive models with orthogonality constraints on output layer, which is implicitly assumed in works relating contrastive learning to spectral embedding. Our deviation bounds suggest that representations learned by contrastive models are close to the principal components of a certain matrix computed from random features. We empirically show that our theoretical results possibly hold beyond two-layer networks.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑