# 深度表示学习

在自监督形式的深度表示学习中，训练信号来自数据本身：网络根据输入的某一部分，预测另一部分，或预测可由其程序化推导出的标签，而所选的前置任务决定了所学表示的不变性。<sup>[1](https://ar5iv.labs.arxiv.org/html/2110.09327)</sup> 此类表示即使没有标签也与语义类别对齐；自监督模型的最近类均值测试准确率可以超过训练至完美训练准确率的有监督模型。<sup>[2](https://proceedings.neurips.cc/paper_files/paper/2023/file/b63ad8c24354b0e5bcb7aea16490beab-Paper-Conference.pdf)</sup> 已发表的工作将这些目标分为预测式、对比式和生成式三类。<sup>[3](https://link.springer.com/article/10.1007/s10994-024-06708-7)</sup>

| 事实 | 详情 |
|---|---|
| 所学内容 | 一个嵌入向量；自监督目标根据输入的一部分预测另一部分 <sup>[1](https://ar5iv.labs.arxiv.org/html/2110.09327)</sup> |
| SimCLR 线性探针 | 使用 ResNet-50 在 ImageNet 上达到 76.5% top-1，与有监督 ResNet-50 相当 <sup>[4](https://proceedings.mlr.press/v119/chen20j.html)</sup> |
| 低标签情形 | 在 1% 的 ImageNet 标签上微调达到 85.8% top-5，仅用百分之一的标签数就超过 AlexNet <sup>[4](https://proceedings.mlr.press/v119/chen20j.html)</sup> |
| InfoNCE 损失 | 对一个正样本和 \( K \) 个负样本做 \( (K+1) \) 路 softmax，带温度 \( \tau \) <sup>[5](https://arxiv.org/pdf/2010.05113)</sup> |
| 无负样本记录 | BYOL：使用 ResNet-50 达到 74.3% top-1 线性评估，无负样本对 <sup>[6](https://proceedings.neurips.cc/paper_files/paper/2020/file/f3ada80d5c4ee70142b17b8192b2958e-Paper.pdf)</sup> |
| 掩码建模 | MAE 掩蔽约 75% 的图像块并重建它们 <sup>[3](https://link.springer.com/article/10.1007/s10994-024-06708-7)</sup> |
| 规模 | DINOv2 训练一个 10 亿参数的 ViT，并将其蒸馏为更小的模型，在大多数图像级和像素级基准上超过 OpenCLIP <sup>[7](https://doi.org/10.48550/arxiv.2304.07193)</sup> |

## 工作原理

当同一输入的两个增强视图映射得彼此接近、不同输入的视图映射得彼此远离，且表示仍有足够变化以携带任务信息时，嵌入才是有用的。对自监督目标的分析发现两个组成部分：一个不变性项，将增强样本拉近；一个正则化项，防止坍缩，并改善表示与语义类别之间的对齐。<sup>[2](https://proceedings.neurips.cc/paper_files/paper/2023/file/b63ad8c24354b0e5bcb7aea16490beab-Paper-Conference.pdf)</sup>

主流的对比损失 InfoNCE 在候选集上执行多类分类，以判定哪个样本是正样本，这与原始 NCE 的二分类不同。<sup>[8](https://mabehrendt.github.io/files/2023representationsurvey.pdf)</sup> 设相似度得分为 \( s_{\psi} \)、锚点 \( y^{*} \)、正样本 \( y_{c} \)，它最小化

\[ \mathcal{L} = -\log \frac{s_{\psi}(y^{*}, y_{c})}{\sum_{c'=1}^{n} s_{\psi}(y^{*}, y_{c'})} \]

温度 \( \tau \) 缩放相似度乘积，分母对一个正样本对和 K 个负样本对求和，给出一个 \( (K+1) \) 路 softmax。<sup>[5](https://arxiv.org/pdf/2010.05113)</sup> 最小化该损失即最大化视图间互信息的下界：\( I(v_{1}; v_{2}) \geq \log K - \mathcal{L}_{\mathrm{NCE}} \)。<sup>[9](https://proceedings.neurips.cc/paper/2020/file/4c2e5eaae9152079b9e95845750bb9ab-Paper.pdf)</sup> 负样本之所以重要，是因为完全去掉它们就没有分离特征的动力，嵌入会坍缩为单一常向量。<sup>[1](https://ar5iv.labs.arxiv.org/html/2110.09327)</sup>

## 实现方式

典型的视觉配方遵循 SimCLR：一个 ResNet-50 编码器、一个将维度投影到 128 的 2 层 MLP 投影头、NT-Xent 损失、学习率为 4.8（= 0.3 × BatchSize/256）的 LARS 优化器、权重衰减 \( 10^{-6} \)、批大小 4096、100 个训练轮次。<sup>[4](https://proceedings.mlr.press/v119/chen20j.html)</sup> 增强方式的选择至关重要：随机裁剪和颜色失真单独使用都不能带来高性能，但组合使用可消除浅层的颜色直方图捷径。<sup>[10](https://research.google/blog/advancing-self-supervised-and-semi-supervised-learning-with-simclr/)</sup> 投影头起着重要作用：非线性头比线性头在线性评估上提高约 3%，比无投影提高超过 10%，且投影头之前的层比之后的层作为表示更好，差距超过 10%。<sup>[4](https://proceedings.mlr.press/v119/chen20j.html)</sup> 预训练之后，实践者要么冻结编码器并训练线性分类器，要么微调；相对于有监督预训练的优势在固定特征迁移中最大，在完整网络微调后缩小。<sup>[11](https://arxiv.org/pdf/2103.13517v3.pdf)</sup>

## 起源

SimCLR 框架由陈霆（Ting Chen）及其同事于 2020 年在 arXiv 上报告。<sup>[12](https://doi.org/10.48550/arxiv.2002.05709)</sup> MoCo 通过将在线网络与动量更新的离线网络配对，减少了对大批次的需求，由[何恺明](https://www.edgepedia.org/zh/kaiming-he)（Kaiming He）及其同事于 2019 年在 arXiv 上报告。<sup>[13](https://doi.org/10.48550/arxiv.1911.05722)</sup> 自举你自己的潜在表示（Bootstrap Your Own Latent，BYOL）无需负样本对进行学习，由让-巴斯蒂安·格里尔（Jean-Bastien Grill）及其同事于 2020 年在 arXiv 上报告。<sup>[14](https://doi.org/10.48550/arxiv.2006.07733)</sup> Barlow Twins 减少嵌入之间的冗余，由尤雷·兹邦塔尔（Jure Zbontar）及其同事于 2021 年在 arXiv 上报告，<sup>[15](https://doi.org/10.48550/arxiv.2103.03230)</sup> VICReg 对方差、不变性和协方差进行正则化，由阿德里安·巴尔德斯（Adrien Bardes）、让·蓬斯（Jean Ponce）和[杨立昆](https://www.edgepedia.org/zh/yann-lecun)（Yann LeCun）于 2021 年在 arXiv 上报告。<sup>[16](https://doi.org/10.48550/arxiv.2105.04906)</sup> 掩码自编码器由何恺明及其同事于 2021 年在 arXiv 上报告，<sup>[17](https://doi.org/10.48550/arxiv.2111.06377)</sup> 同年还有谢振达（Zhenda Xie）及其同事的 SimMIM<sup>[18](https://doi.org/10.48550/arxiv.2111.09886)</sup> 和用在线分词器预训练的 iBOT，由周敬浩（Jinghao Zhou）及其同事提出。<sup>[19](https://doi.org/10.48550/arxiv.2111.07832)</sup> 对比学习中维度坍缩的分析由李静（Li Jing）及其同事于 2021 年在 arXiv 上报告。<sup>[20](https://doi.org/10.48550/arxiv.2110.09348)</sup> data2vec 是一个横跨语音、视觉和语言的单一框架，由阿列克谢·巴耶夫斯基（Alexei Baevski）及其同事于 2022 年在 arXiv 上报告，<sup>[21](https://doi.org/10.48550/arxiv.2202.03555)</sup> DINOv2 由马克西姆·奥卡布（Maxime Oquab）及其同事于 2023 年在 arXiv 上报告。<sup>[7](https://doi.org/10.48550/arxiv.2304.07193)</sup> 更早的预测式前置任务和噪声对比损失先于这一系列工作。

## 变体

SimCLR 和 MoCo 等对比方法使用负样本对避免坍缩，使用正样本对实现不变性。<sup>[13](https://doi.org/10.48550/arxiv.1911.05722)</sup><sup> • </sup><sup>[22](https://arxiv.org/abs/2304.12210)</sup> [自蒸馏](https://www.edgepedia.org/zh/self-distillation)方法舍弃负样本：BYOL 使用一个以学生网络指数移动平均更新的教师网络，采用均方误差损失。<sup>[6](https://proceedings.neurips.cc/paper_files/paper/2020/file/f3ada80d5c4ee70142b17b8192b2958e-Paper.pdf)</sup> SimSiam 无需负样本或动量编码器即可获得高质量表示，使用一个孪生网络，一侧带有停止梯度操作和预测 MLP。<sup>[23](https://pmc.ncbi.nlm.nih.gov/articles/PMC9029566/)</sup> DINO 将教师-学生设置改造为带软标签的蒸馏，并通过中心化和锐化防止坍缩。<sup>[3](https://link.springer.com/article/10.1007/s10994-024-06708-7)</sup> 信息最大化方法对特征去相关：Barlow Twins 对视图间的互相关进行归一化，<sup>[15](https://doi.org/10.48550/arxiv.2103.03230)</sup> VICReg 对方差、不变性和协方差进行正则化，<sup>[16](https://doi.org/10.48550/arxiv.2105.04906)</sup> W-MSE 对嵌入进行白化；与 SimCLR 不同，VICReg 和 Barlow Twins 对较小批大小相对稳健。<sup>[3](https://link.springer.com/article/10.1007/s10994-024-06708-7)</sup> 掩码图像建模重建输入：MAE 掩蔽约 75% 的图像块，<sup>[3](https://link.springer.com/article/10.1007/s10994-024-06708-7)</sup> MAE 和 SimMIM 直接重建图像块，而非像 [BEiT](https://www.edgepedia.org/zh/beit) 那样重建离散词元。<sup>[22](https://arxiv.org/abs/2304.12210)</sup> 最强的冻结编码器方法 iBOT 和 DINOv2 将掩码图像建模与自蒸馏混合。<sup>[22](https://arxiv.org/abs/2304.12210)</sup> DINOv2 在精选数据上训练一个 10 亿参数的 ViT，并将其蒸馏为更小的模型，在大多数图像级和像素级基准上超过 OpenCLIP；其配方结合了 DINO 和 iBOT 损失与 SwAV 中心化，训练速度约为类似的判别式自监督方法的 2 倍，内存用量约为其三分之一。<sup>[7](https://doi.org/10.48550/arxiv.2304.07193)</sup> CLIP 对爬取的图像-文本对进行对比，支持基于语言的图像检索。<sup>[22](https://arxiv.org/abs/2304.12210)</sup>

## 应用

CLIP 风格的图像-文本对比模型支撑基于语言的图像检索。<sup>[22](https://arxiv.org/abs/2304.12210)</sup> data2vec 将一种掩码预测、自蒸馏方法应用于语音、视觉和语言，从掩码视图预测完整输入的上下文化潜在目标，教师目标由权重按指数移动平均更新的教师网络生成，并对多个层的输出取平均；它在 ViT-B 和 ViT-L 上于 ImageNet-1K 上优于此前的自监督工作，改善了低资源 Libri-light 语音结果，并在 GLUE 上击败 [RoBERTa](https://www.edgepedia.org/zh/roberta)。<sup>[21](https://doi.org/10.48550/arxiv.2202.03555)</sup> 多模态嵌入如今服务于统一检索：[Gemini Embedding](https://www.edgepedia.org/zh/gemini-embedding) 2 将视频、音频、图像和文本嵌入同一空间，在 MSCOCO 上得分 62.9 R@1，在 Vatex 上 68.8 NDCG@10，在 MTEB 多语言上 69.9，在 MTEB Code 上 84.0。<sup>[24](https://arxiv.org/abs/2605.27295)</sup>

## 局限与替代方案

基于不变性的方法存在表示坍缩的风险，即满足目标但信息价值很小的平凡常表示。<sup>[3](https://link.springer.com/article/10.1007/s10994-024-06708-7)</sup> 对比训练还可能遭受维度坍缩，即嵌入占据一个低维子空间。<sup>[20](https://doi.org/10.48550/arxiv.2110.09348)</sup> 用负样本稳定训练需要大内存和复杂的队列系统，而无负样本方法存在平凡解的风险；防止坍缩的机制包括额外预测器、停止梯度、聚类和去相关。<sup>[25](https://link.springer.com/article/10.1007/s10462-026-11506-9)</sup> 增强方式会引入偏差：学到的颜色不变性会使模型在颜色至关重要的任务（如鸟类分类）上注定表现不佳。<sup>[26](https://openaccess.thecvf.com/content/CVPR2022/papers/Gwilliam_Beyond_Supervised_vs._Unsupervised_Representative_Benchmarking_and_Analysis_of_Image_CVPR_2022_paper.pdf)</sup> 更广泛地说，捷径学习产生的决策规则在标准基准上表现良好，但无法迁移到现实世界条件。<sup>[27](https://www.nature.com/articles/s42256-020-00257-z)</sup> SimCLR 需要大批次来采样困难负样本，<sup>[28](https://arxiv.org/pdf/2402.14957)</sup> DINO 需要大量计算和数据，使个体研究者难以进行自训练。<sup>[3](https://link.springer.com/article/10.1007/s10994-024-06708-7)</sup> 相对于有监督端到端训练，自监督预训练在低标签和固定特征情形下胜出，但差距在完整微调后缩小。<sup>[11](https://arxiv.org/pdf/2103.13517v3.pdf)</sup>

## References

1. [Self-Supervised Representation Learning: Introduction, Advances and Challenges (Hu et al., 2021)](https://ar5iv.labs.arxiv.org/html/2110.09327)
2. [Reverse Engineering Self-Supervised Learning (NeurIPS 2023)](https://proceedings.neurips.cc/paper_files/paper/2023/file/b63ad8c24354b0e5bcb7aea16490beab-Paper-Conference.pdf)
3. [A survey on self-supervised methods for visual representation learning (Machine Learning journal, 2024)](https://link.springer.com/article/10.1007/s10994-024-06708-7)
4. [A Simple Framework for Contrastive Learning of Visual Representations (SimCLR)](https://proceedings.mlr.press/v119/chen20j.html)
5. [Contrastive Representation Learning: A Survey (Le-Khac et al., 2020)](https://arxiv.org/pdf/2010.05113)
6. [Bootstrap Your Own Latent: A New Approach to Self-Supervised Learning (BYOL)](https://proceedings.neurips.cc/paper_files/paper/2020/file/f3ada80d5c4ee70142b17b8192b2958e-Paper.pdf)
7. [Oquab, Maxime and colleagues (2023). DINOv2: Learning Robust Visual Features without Supervision. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2304.07193)
8. [A Survey on Self-Supervised Representation Learning](https://mabehrendt.github.io/files/2023representationsurvey.pdf)
9. [What Makes for Good Views for Contrastive Learning? (InfoMin)](https://proceedings.neurips.cc/paper/2020/file/4c2e5eaae9152079b9e95845750bb9ab-Paper.pdf)
10. [Advancing Self-Supervised and Semi-Supervised Learning with SimCLR (Google AI Blog, April 8, 2020)](https://research.google/blog/advancing-self-supervised-and-semi-supervised-learning-with-simclr/)
11. [A Broad Study on the Transferability of Visual Representations with Contrastive Learning](https://arxiv.org/pdf/2103.13517v3.pdf)
12. [Chen, Ting and colleagues (2020). A Simple Framework for Contrastive Learning of Visual Representations. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2002.05709)
13. [He, Kaiming and colleagues (2019). Momentum Contrast for Unsupervised Visual Representation Learning. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.1911.05722)
14. [Grill, Jean-Bastien and colleagues (2020). Bootstrap your own latent: A new approach to self-supervised Learning. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2006.07733)
15. [Zbontar, Jure and colleagues (2021). Barlow Twins: Self-Supervised Learning via Redundancy Reduction. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2103.03230)
16. [Bardes, Adrien, Ponce, Jean, LeCun, Yann (2021). VICReg: Variance-Invariance-Covariance Regularization for Self-Supervised Learning. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2105.04906)
17. [He, Kaiming and colleagues (2021). Masked Autoencoders Are Scalable Vision Learners. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2111.06377)
18. [Xie, Zhenda and colleagues (2021). SimMIM: A Simple Framework for Masked Image Modeling. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2111.09886)
19. [Zhou, Jinghao and colleagues (2021). iBOT: Image BERT Pre-Training with Online Tokenizer. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2111.07832)
20. [Jing, Li and colleagues (2021). Understanding Dimensional Collapse in Contrastive Self-supervised Learning. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2110.09348)
21. [Baevski, Alexei and colleagues (2022). data2vec: A General Framework for Self-supervised Learning in Speech, Vision and Language. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2202.03555)
22. [A Cookbook of Self-Supervised Learning](https://arxiv.org/abs/2304.12210)
23. [Survey on Self-Supervised Learning: Auxiliary Pretext Tasks and Contrastive Learning Methods in Imaging (PMC)](https://pmc.ncbi.nlm.nih.gov/articles/PMC9029566/)
24. [Gemini Embedding 2: A Native Multimodal Embedding Model from Gemini](https://arxiv.org/abs/2605.27295)
25. [A survey on design choices for self-supervised learning in computer vision (Artificial Intelligence Review, Springer)](https://link.springer.com/article/10.1007/s10462-026-11506-9)
26. [Beyond Supervised vs. Unsupervised: Representative Benchmarking and Analysis of Image Representation Learning](https://openaccess.thecvf.com/content/CVPR2022/papers/Gwilliam_Beyond_Supervised_vs._Unsupervised_Representative_Benchmarking_and_Analysis_of_Image_CVPR_2022_paper.pdf)
27. [Shortcut learning in deep neural networks (Nature Machine Intelligence)](https://www.nature.com/articles/s42256-020-00257-z)
28. [A unifying framework for collapse avoidance in self-supervised learning (center vector analysis)](https://arxiv.org/pdf/2402.14957)

---
*Initially written Sep 29, 2026 · Edited: Oct 15, 2026; Oct 21, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 人工智能与数据 › Machine learning and neural computation › Neural networks and deep learning › Titles A to H

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/deep-representation-learning

English original: https://www.edgepedia.org/deep-representation-learning
