# Learning Representations with Contrastive Self-Supervised Learning for Histopathology Applications

조직병리학 응용을 위한 대조 자기지도 학습 기반 표현 학습

Karin Stacke, Jonas Unger, Claes Lundström, Gabriel Eilertsen · arXiv · 2021년 12월 10일

- **연구 문제** ImageNet에서 성공한 대조 학습 기반 자기지도 학습이 객체 중심이 아닌 조직병리 데이터에서도 같은 방식으로 작동하는지, 라벨이 적을 때 pre-training이 도움이 되는지를 검토합니다.
- **연구 방법** SimCLR과 ResNet50을 사용해 H&E 조직 패치에서 뷰 생성, pre-training 데이터, 배치 크기, 온도, 학습 시간의 영향을 선형 평가와 fine-tuning으로 비교합니다.
- **주요 결과** 도메인 내 SimCLR pre-training은 작은 지도 학습 데이터에서 유익했지만, 최적 증강은 데이터셋과 과제에 따라 달랐고 Multidata pre-training은 유방 데이터에서 낮은 성능을 보였습니다.

## 자연 이미지 중심 자기지도 학습을 조직병리에 옮길 때의 문제

이 논문은 ImageNet에서 성공한 대조 학습 기반 자기지도 학습(SimCLR)을 H&E 염색 조직병리 이미지에 그대로 적용할 수 있는지 검토합니다. 원문은 ImageNet이 객체 중심 데이터이므로 조직병리 데이터와 과제에서 방법의 성능이 그대로 보장되지 않는다고 짚습니다. 조직병리에서는 라벨된 데이터를 만드는 비용이 크기 때문에 라벨이 적은 상황에서 pre-training이 도움이 되는지가 실질적인 질문이 됩니다. 이 논문은 조직 분류 과제에서 뷰 생성, pre-training 데이터, 배치 크기, 온도, 학습 시간이 결과에 어떤 영향을 주는지 실험으로 확인합니다.

## SimCLR의 뷰 생성과 NT-Xent 목적 함수

SimCLR은 같은 데이터 샘플에 무작위 변환을 적용해 두 개의 양성 뷰를 만들고, 나머지 샘플의 뷰를 음성으로 사용합니다. 인코더는 두 뷰의 표현을 가깝게 하고 음성과는 멀어지도록 학습합니다. 이 논문에서 사용한 손실은 NT-Xent 손실이며, 코사인 유사도를 온도 τ로 나눈 값을 사용하고 분모는 k가 i와 다른 2N개 샘플에 대한 합입니다. 모든 실험은 ResNet50을 사용했고 온도 τ는 별도로 명시하지 않는 한 0.5로 설정했습니다. 뷰 생성은 무엇을 공유하고 무엇을 버릴지 결정하므로, 과제와 무관한 특징이 공유되면 모델이 지름길 특징을 학습할 위험이 있다고 설명합니다.

![Figure 2: View generation results in shared features between anchor, positive and negative views. Due to the contrastive objective, only a subset of all availa…](https://refivu.com/papers/34056d75-d0d7-4a13-a797-cabf81501cec/figures/figure-dce645f517be7e712a7c93c512e540f0.png?thumb=512)

**Figure 2** : View generation results in shared features between anchor, positive and negative views. Due to the contrastive objective, only a subset of all available features are learned by the model. These features are either attracting features or repelling features, where view generation is the only means of controlling to what extent these features are task-relevant.

[원문](https://arxiv.org/abs/2112.05760v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Karin Stacke, Jonas Unger, Claes Lundström, Gabriel Eilertsen · Learning Representations with Contrastive Self-Supervised Learning for Histopathology Applications · 원문 그림 인용 · 원본 PDF 8쪽에서 그림 영역을 추출했습니다.

![Figure 7: Linear performance (patch-level accuracy over ﬁve trainings) for SimCLR trained with best augmentations (from Table 1) for each datasets respectively…](https://refivu.com/papers/34056d75-d0d7-4a13-a797-cabf81501cec/figures/figure-3f717f2953d076eece3959a7b0b13362.png?thumb=512)

**Figure 7** : Linear performance (patch-level accuracy over ﬁve trainings) for SimCLR trained with best augmentations (from Table 1) for each datasets respectively, with varying tem- perature parameter. Note the diﬀerent y-axes.

[원문](https://arxiv.org/abs/2112.05760v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Karin Stacke, Jonas Unger, Claes Lundström, Gabriel Eilertsen · Learning Representations with Contrastive Self-Supervised Learning for Histopathology Applications · 원문 그림 인용 · 원본 PDF 16쪽에서 그림 영역을 추출했습니다.

![Table 5: List of applied augmentations, with corresponding parameters and probability of application](https://refivu.com/papers/34056d75-d0d7-4a13-a797-cabf81501cec/figures/figure-67ed74030bffa1657c88e27880c399d7.png?thumb=512)

**Table 5** : List of applied augmentations, with corresponding parameters and probability of application.

[원문](https://arxiv.org/abs/2112.05760v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Karin Stacke, Jonas Unger, Claes Lundström, Gabriel Eilertsen · Learning Representations with Contrastive Self-Supervised Learning for Histopathology Applications · 원문 그림 인용 · 원본 PDF 29쪽에서 그림 영역을 추출했습니다.

![Figure 8: Examples of augmentations](https://refivu.com/papers/34056d75-d0d7-4a13-a797-cabf81501cec/figures/figure-129db82318f2219ead61d6eeccff8e1a.png?thumb=512)

**Figure 8** : Examples of augmentations

[원문](https://arxiv.org/abs/2112.05760v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Karin Stacke, Jonas Unger, Claes Lundström, Gabriel Eilertsen · Learning Representations with Contrastive Self-Supervised Learning for Histopathology Applications · 원문 그림 인용 · 원본 PDF 29쪽에서 그림 영역을 추출했습니다.

## 데이터셋과 평가 설정

Camelyon16 기반 데이터는 유방 센티넬 림프절 WSI에서 0.5 mpp, 256x256 패치를 추출해 비지도 pre-training과 PatchCamelyon20x 종양 분류 과제에 사용했습니다. AIDA-LNSK는 피부 조직에서 다섯 개 클래스의 분류 과제를 구성했습니다. Multidata는 60개 공개 데이터셋에서 나온 40k 패치 부분집합으로 비지도 학습에만 쓰였습니다. 주 평가는 동결된 가중치 위의 선형 평가와 가중치를 포함한 fine-tuning으로 나뉘며, 결과는 패치 단위 정확도로 보고됩니다. 지도 학습 서브셋은 슬라이드 수 기준으로 나뉘고 여러 번 반복되었습니다.

![Table 4: Number of whole-slide images (WSIs) and patches for breast and skin data](https://refivu.com/papers/34056d75-d0d7-4a13-a797-cabf81501cec/figures/figure-138dbb0591ca264477437c1c6e84a3aa.png?thumb=512)

**Table 4** : Number of whole-slide images (WSIs) and patches for breast and skin data.

[원문](https://arxiv.org/abs/2112.05760v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Karin Stacke, Jonas Unger, Claes Lundström, Gabriel Eilertsen · Learning Representations with Contrastive Self-Supervised Learning for Histopathology Applications · 원문 그림 인용 · 원본 PDF 28쪽에서 그림 영역을 추출했습니다.

## 증강 조합과 pre-training 효과

뷰 생성 실험에서 Base 증강 대비 최적 증강 조합은 데이터셋마다 달랐습니다. 유방 데이터에서는 Base와 Scale의 조합이, 피부 데이터에서는 Base와 Grid Distort, Shuffle의 조합이 가장 높았습니다. 원래 ImageNet에서 좋았던 SimCLR 원본 증강은 조직병리 데이터에서 최적이 아니었습니다. 지도 학습 데이터가 적은 구간에서는 도메인 내 SimCLR pre-training이 ImageNet pre-training보다 높은 선형 평가 성능을 보였고, 지도 데이터가 100 슬라이드 이상으로 늘면 pre-training의 이득은 줄었습니다. 이 결과는 실험 설정에 묶인 관찰이며, 모든 조직병리 과제에 일반화된 결론으로 읽어서는 안 됩니다.

![Table 1: Relative improvement (percentage points) over using base augmentations only (ro- tate, ﬂip, color jitter). SimCLR model trained for 50 epochs, linear…](https://refivu.com/papers/34056d75-d0d7-4a13-a797-cabf81501cec/figures/figure-c68a5c7b966238b7ca6b984065baa81e.png?thumb=512)

**Table 1** : Relative improvement (percentage points) over using base augmentations only (ro- tate, ﬂip, color jitter). SimCLR model trained for 50 epochs, linear evaluation on supervised training set from 50 slides.

[원문](https://arxiv.org/abs/2112.05760v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Karin Stacke, Jonas Unger, Claes Lundström, Gabriel Eilertsen · Learning Representations with Contrastive Self-Supervised Learning for Histopathology Applications · 원문 그림 인용 · 원본 PDF 12쪽에서 그림 영역을 추출했습니다.

![Figure 4: Patch-level performance of linear trainings of diﬀerent pre-training strategies, at varying supervised training size (number of slides). The linear m…](https://refivu.com/papers/34056d75-d0d7-4a13-a797-cabf81501cec/figures/figure-25bc14868ee4a15cc97dade1ee693800.png?thumb=512)

**Figure 4** : Patch-level performance of linear trainings of diﬀerent pre-training strategies, at varying supervised training size (number of slides). The linear models are trained on representations learned by: ImageNet supervised pre-training (gray, solid), or using SimCLR pre-training with diﬀerent augmentations (dashed/dotted), and on diﬀerent datasets (in- domain pathology data: red, out-of-domain pathology data: blue). The reference (black, solid) is the full ResNet50 model trained in a supervised way on the (subset) training data. Left: breast data, right: skin data. Note diﬀerent x-axes between subplots.

[원문](https://arxiv.org/abs/2112.05760v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Karin Stacke, Jonas Unger, Claes Lundström, Gabriel Eilertsen · Learning Representations with Contrastive Self-Supervised Learning for Histopathology Applications · 원문 그림 인용 · 원본 PDF 13쪽에서 그림 영역을 추출했습니다.

![Table 2: Fine-tuning performance (patch-level accuracy, %) using no pre-training (random initialized weights), ImageNet pre-training or SimCLR in-domain traini…](https://refivu.com/papers/34056d75-d0d7-4a13-a797-cabf81501cec/figures/figure-675ac87c0f0a321255226c55f874c6d7.png?thumb=512)

**Table 2** : Fine-tuning performance (patch-level accuracy, %) using no pre-training (random initialized weights), ImageNet pre-training or SimCLR in-domain training.

[원문](https://arxiv.org/abs/2112.05760v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Karin Stacke, Jonas Unger, Claes Lundström, Gabriel Eilertsen · Learning Representations with Contrastive Self-Supervised Learning for Histopathology Applications · 원문 그림 인용 · 원본 PDF 14쪽에서 그림 영역을 추출했습니다.

## 다양한 pre-training 데이터와 false negative 위험

Multidata는 다양한 조직 데이터를 포함하지만, 유방 데이터에서는 SimCLR 원본 증강으로 학습한 경우 가장 낮은 성능을 보였습니다. 반면 피부 데이터에서는 같은 설정이 최고 in-domain 모델과 큰 차이가 없었습니다. 저자들은 이 결과를 데이터의 다양성만으로는 충분하지 않고 뷰 생성이 과제 관련 특징을 분리해야 한다는 해석으로 제시합니다. 또한 유방 데이터의 같은 배치 안에서 코사인 유사도가 0.9를 넘는 음성 쌍이 2%였고 ImageNet에서는 0.0003%였다고 보고합니다. 이러한 false negative 위험은 클래스 수가 적고 균형이 나쁜 데이터에서 커진다고 설명합니다.

![Table 3: Dataset characteristics and the consequences they have for learning with con- trastive self-supervised methods](https://refivu.com/papers/34056d75-d0d7-4a13-a797-cabf81501cec/figures/figure-7d7c77c92184c65582126263eaafae45.png?thumb=512)

**Table 3** : Dataset characteristics and the consequences they have for learning with con- trastive self-supervised methods.

[원문](https://arxiv.org/abs/2112.05760v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Karin Stacke, Jonas Unger, Claes Lundström, Gabriel Eilertsen · Learning Representations with Contrastive Self-Supervised Learning for Histopathology Applications · 원문 그림 인용 · 원본 PDF 17쪽에서 그림 영역을 추출했습니다.

## 범위의 한계와 BYOL 비교

이 연구는 세 개의 데이터셋과 두 개의 분류 과제로 범위가 제한되었고, SimCLR을 대표 방법으로 사용했습니다. 다른 대조 학습 방법에 대해 결론을 일반화하려면 추가 실험이 필요합니다. 부록의 BYOL 실험에서는 두 데이터셋 모두에서 BYOL이 SimCLR보다 높은 성능을 보이지 않았습니다. 이 비교는 SimCLR이 200 epochs, 배치 크기 1024로 학습된 조건에서 보고되었고, BYOL은 학습률 0.2가 필요했습니다. 따라서 음성 샘플 제거가 조직병리에서 항상 불리하다는 결론으로 확대할 수는 없으며, 본 논문의 결과는 이 실험 조건 안에서 읽어야 합니다.

![Table 9: Comparison between SimCLR method and BYOL, trained for 200 epochs, evalu- ated on linear patch-level accuracy of the supervised subset of 50 slides](https://refivu.com/papers/34056d75-d0d7-4a13-a797-cabf81501cec/figures/figure-e7eafc2b94a4b4b8650016cd486e6947.png?thumb=512)

**Table 9** : Comparison between SimCLR method and BYOL, trained for 200 epochs, evalu- ated on linear patch-level accuracy of the supervised subset of 50 slides.

[원문](https://arxiv.org/abs/2112.05760v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Karin Stacke, Jonas Unger, Claes Lundström, Gabriel Eilertsen · Learning Representations with Contrastive Self-Supervised Learning for Histopathology Applications · 원문 그림 인용 · 원본 PDF 31쪽에서 그림 영역을 추출했습니다.

## 논문 정보

- **저자**: Karin Stacke, Jonas Unger, Claes Lundström, Gabriel Eilertsen
- **학회·저널**: arXiv · 프리프린트
- **최초 공개일**: 2021년 12월 10일
- **등록일**: 2026년 11월 6일
- **수정일**: 2022년 8월 16일
- **버전**: v2
- **arXiv**: 2112.05760
- **분류**: eess.IV · cs.CV · cs.LG · q-bio.QM
- **원문 이용 조건**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **제공 범위**: 논문 정보, 해설, 허용된 원문 그림

[논문 원문 ↗](https://arxiv.org/abs/2112.05760v2) · [원문 PDF ↗](https://arxiv.org/pdf/2112.05760v2)

AI 해설은 논문 원문과 별개의 설명이며 오류가 있을 수 있습니다. 원문과 그림은 각 출처의 이용 조건과 따로 표시된 권리를 따릅니다.

## 초록

Unsupervised learning has made substantial progress over the last few years, especially by means of contrastive self-supervised learning. The dominating dataset for benchmarking self-supervised learning has been ImageNet, for which recent methods are approaching the performance achieved by fully supervised training. The ImageNet dataset is however largely object-centric, and it is not clear yet what potential those methods have on widely different datasets and tasks that are not object-centric, such as in digital pathology. While self-supervised learning has started to be explored within this area with encouraging results, there is reason to look closer at how this setting differs from natural images and ImageNet. In this paper we make an in-depth analysis of contrastive learning for histopathology, pin-pointing how the contrastive objective will behave differently due to the characteristics of histopathology data. We bring forward a number of considerations, such as view generation for the contrastive objective and hyper-parameter tuning. In a large battery of experiments, we analyze how the downstream performance in tissue classification will be affected by these considerations. The results point to how contrastive learning can reduce the annotation effort within digital pathology, but that the specific dataset characteristics need to be considered. To take full advantage of the contrastive learning objective, different calibrations of view generation and hyper-parameters are required. Our results pave the way for realizing the full potential of self-supervised learning for histopathology applications.

## 원문 인용

Karin Stacke, Jonas Unger, Claes Lundström, Gabriel Eilertsen (2021). Learning Representations with Contrastive Self-Supervised Learning for Histopathology Applications. arXiv:2112.05760v2. https://arxiv.org/abs/2112.05760v2

**BibTeX**

```
@misc{stacke2021learning,
  title = {{Learning Representations with Contrastive Self-Supervised Learning for Histopathology Applications}},
  author = {Karin Stacke and Jonas Unger and Claes Lundström and Gabriel Eilertsen},
  year = {2021},
  eprint = {2112.05760},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2112.05760v2}
}
```

## 이 논문의 용어

- [Imagenet](https://refivu.com/terms/5eadad128667-imagenet)
- [미세조정](https://refivu.com/terms/0ac87f78df46-fine-tuning)
- [ResNet50](https://refivu.com/terms/b9ab4b71c5b5-resnet50)
- [InfoNCE loss](https://refivu.com/terms/eab7554fe65f-infonce-loss)
- [SimCLR](https://refivu.com/terms/d735de709ac1-simclr)
- [hard negatives](https://refivu.com/terms/17c156ae3902-hard-negatives)
- [BYOL](https://refivu.com/terms/81180b7503df-byol)
- [CAMELYON16](https://refivu.com/terms/590446a51f6a-camelyon16)
- [false negatives](https://refivu.com/terms/a3671ce6c5a2-false-negatives)
- [LARS](https://refivu.com/terms/41ed248f00d5-lars)
- [linear evaluation](https://refivu.com/terms/b571cd6c4936-linear-evaluation)
- [NT-Xent loss](https://refivu.com/terms/30d70809d3e2-nt-xent-loss)

## 다른 논문 해설

- [Cross-Modal Contrastive Learning of Representations for Navigation using Lightweight, Low-Cost Millimeter Wave Radar for Adverse Environmental Conditions](https://refivu.com/papers/5c56fa5a-3227-4a44-a609-9b42bb1290c2-cross-modal-contrastive-learning-of-representations-for.md)
- [Accurate Clinical Toxicity Prediction using Multi-task Deep Neural Nets and Contrastive Molecular Explanations](https://refivu.com/papers/cd601127-20d4-4092-be9b-9fbf722b973c-accurate-clinical-toxicity-prediction-using-multi-task-deep.md)
- [Self-supervised Learning for Human Activity Recognition Using 700,000 Person-days of Wearable Data](https://refivu.com/papers/7d06c47d-a111-423f-a4f8-68d244e1093c-self-supervised-learning-for-human-activity-recognition.md)
- [Context Vectors are Reflections of Word Vectors in Half the Dimensions](https://refivu.com/papers/b7b81b8b-5025-4fbd-a52e-a2e1e26668da-context-vectors-are-reflections-of-word-vectors-in.md)
- [Contrastive Representation Learning: A Framework and Review](https://refivu.com/papers/8d475c35-65aa-4272-b3a4-00f7350d277d-contrastive-representation-learning-a-framework-and-review.md)
- [Language Knowledge-Assisted Representation Learning for Skeleton-Based Action Recognition](https://refivu.com/papers/606f8e68-1af8-4a10-856d-bd1487d12ab3-language-knowledge-assisted-representation-learning-for.md)
- [Causality extraction from medical text using Large Language Models (LLMs)](https://refivu.com/papers/49a66e7e-ff6f-418a-83de-3690640fcbf4-causality-extraction-from-medical-text-using-large-language.md)
- [Variational Autoencoder with CCA for Audio-Visual Cross-Modal Retrieval](https://refivu.com/papers/77a078df-3861-4b3b-beec-60ef07a389f2-variational-autoencoder-with-cca-for-audio-visual-cross.md)
- [Automated Novelty Evaluation of Academic Paper: A Collaborative Approach Integrating Human and Large Language Model Knowledge](https://refivu.com/papers/5f1e1cd9-3549-45f8-b6cc-faeabed1488a-automated-novelty-evaluation-of-academic-paper-a.md)
- [Visuomotor Robotic Pruning in Planar Orchards Using Hybrid Reinforcement Learning](https://refivu.com/papers/9ceeac30-cb06-4902-bb2c-03dcd623f027-visuomotor-robotic-pruning-in-planar-orchards-using-hybrid.md)
- [Reinforcement Learning Based Quantum Circuit Optimization via ZX-Calculus](https://refivu.com/papers/9c8e6aa3-4291-4395-9813-828baebb2513-reinforcement-learning-based-quantum-circuit-optimization.md)
- [Sub-Character Tokenization for Chinese Pretrained Language Models](https://refivu.com/papers/a75de90a-ad7d-45cd-bc9d-49a90497b87d-sub-character-tokenization-for-chinese-pretrained-language.md)

---

AI 해설에는 오류가 있을 수 있습니다. [Refivu](https://refivu.com/papers/34056d75-d0d7-4a13-a797-cabf81501cec-learning-representations-with-contrastive-self-supervised)
