대조학습

서유리·2023년 5월 11일

AI_Study

목록 보기
29/33
post-thumbnail

🔴 Contrastive Loss (대조 손실)

  • 서로 같은 클래스인 경우에는 임배딩간 거리가 0이 되도록 서로 다른 클래스일 경우 거리가 α(margin) 이상이 되도록 학습한다는 의미 (https://wikidocs.net/184731)
  • contrastive loss는 positive pair와 negative pair 간의 유사도를 Euclidean distance 또는 cosine similairty를 이용해 측정하여, positive pair 끼리는 가깝게, negative pair 끼리는 멀게 하도록 하는 deep metric learning (or learned metric) 이라고 정리할 수 있음 (https://89douner.tistory.com/334)

🟠 Contrastive Loss (대조 손실)

🟡 대조학습 관련해서 정리해놓은 사이트

🟢 논문

  • "Cross-modal distillation with audio–text fusion for fine-grained emotion
    classification using BERT and Wav2vec 2.0" 논문에서 contrastive loss 공식은 다음과 같다
  • contrastive loss에 대한 이해가 필요한 상황..

🔵 Contrastive loss

https://towardsdatascience.com/contrastive-loss-explaned-159f2d4a87ec

🟣 Contrastive Learning for Sentence Embedding 관련 유튜브 영상
🔸 Contrastive Learning 이란?

  • Metric Learning 방법론 중 하나로 특정한 기준을 바탕으로 데이터 간의 거리 함수를 학습하는 방법론
  • Anchor를 기준으로 Positive samples 가깝게, Negative samples는 멀어지도록 학습
    🔸 Contrastive Learning 비전분야
  • Self-supervised learning 방법론으로 사용
  • 레이블이 없는 상황에서도, 보다 좋은 representation을 학습하기 위한 방법론으로 발전
  • Anchor에 증강기법을 적용하여 얻은 이미지를 Positive sample로 사용
  • Anchor와 Positive sample을 제외한 다른 이미지들을 모두 Negative samples로 사용
  • Positive sample에 적용되는 data augmentation 기법에 따라 모델의 성능이 크게 변함
  • Augmentation 방법이 다양하고, augmentation을 진행해도 Anchor가 가진 레이블 정보가 유지됨
    🔸 Contrastive Learning NLP 분야
  • 이미지와는 달리, augmentation 방법론이 비교적 제한적임
  • Augmentation 잘못 적용시, Anchor가 가진 레이블 정보를 크게 해침
  • 따라서, Contrastive Learning 적용하기에 조심스러움
  • 최근 자연어처리 연구 분야 중 sentence embeddig 쪽에서 Contrastive Learning 적용해 성능을 개선시킴
  • 자연어 분야에서는 언어모델의 성능을 높이기 위해 sentence embedding을 활용
  • 보다 좋은 sentence embeddig을 학습하기 위해, contrastive learning을 적용하고자 함
  • 하지만 이지미 데이터와는 다르게, 자연어에 data augmentation을 적용하면 Anchor의 의미가 크게 손상됨
  • 따라서, Anchor-Positive data를 잘 구축해 효과적으로, Contrastive Learning을 자연어 분야에 적용하는 다양한 방법이 연구되었음

🔘 Contrastive Learning for Sentence Embedding 관련 연구는 다음과 같다

  • [논문제목] DeCLUTR: Deep Contrastive Learning for Unsupervised Textual Representations
  • [논문제목] SimCSE: Simple Contrastive Learning of Sentence Embeddings
  • [논문제목] DiffCSE: Difference-based Contrastive Learning for Sentence Embeddings
    ® https://www.youtube.com/watch?v=mt7MmBJKUlk
profile
best of best

0개의 댓글