Chapter 46

সেলফ-সুপারভাইজড লার্নিং

Self-Supervised Learning
🧩 Label ছাড়াই শেখা
Self-Supervised Learning (SSL) — data থেকেই pretext task বানিয়ে label ছাড়া representation শেখে। BERT, GPT, SimCLR, MAE — সব SSL-এর উদাহরণ।

Pretext Tasks

  • Masked Modeling: token/patch mask → predict (BERT, MAE)।
  • Next-token: autoregressive (GPT)।
  • Contrastive: একই image-এর দুই augmentation কাছে, অন্যগুলো দূরে (SimCLR, MoCo)।
  • Distillation: teacher-student (DINO, BYOL)।

SimCLR — Contrastive

# Pseudo-code
for img in batch:
    a, b = augment(img), augment(img)   # দুই view
    za, zb = encoder(a), encoder(b)
    loss = NT_Xent(za, zb)              # positive কাছে, negative দূরে

MAE (Masked Autoencoder)

ছবির ৭৫% patch mask করে বাকিটা থেকে reconstruct — ViT pretraining-এ অসাধারণ।

DINO / DINOv2

Self-distillation — কোনো label নেই, তবু segmentation-grade features পাওয়া যায়।

কেন SSL?

  • Labeled data costly, unlabeled প্রায় free।
  • Pretrained features → downstream task-এ অল্প label-এই কাজ।
  • Foundation models-এর মূল ভিত্তি।
💡 Practical
নতুন domain (medical, satellite) হলে — প্রথমে SSL pretraining, তারপর ছোট labeled set দিয়ে fine-tune করলে বড় boost পাওয়া যায়।

সারসংক্ষেপ

✨ এই অধ্যায়ে যা শিখলাম
  • SSL = label-free representation learning।
  • Contrastive, masked, distillation — তিন প্রধান paradigm।
  • Foundation model-এর মূল engine।