Contrastive Representation Learning
Contrastive representation learning trains a neural encoder without labels. Each row is shown to the network twice, each time with a random part of its features replaced by values taken from other rows, and the encoder is rewarded when the two views of the same row land close together and far from the views of other rows in the batch. The learned representation can then feed simpler models, clustering or visualisation.
대조 표현 학습은 라벨 없이 신경망 인코더를 학습합니다. 각 행을 두 번 보여 주되 매번 특성의 일부를 다른 행의 값으로 바꾸고, 같은 행에서 나온 두 모습은 가깝게, 배치 안의 다른 행과는 멀게 놓이도록 학습합니다. 이렇게 얻은 표현은 이후의 간단한 모형, 군집 분석, 시각화에 쓸 수 있습니다.
Can I learn a compact numeric representation of my rows without labels, and does it carry more usable information than the raw features?
라벨 없이 행의 간결한 수치 표현을 학습할 수 있고, 그 표현이 원래 특성보다 쓸모 있는 정보를 더 담고 있습니까?
The method reports the contrastive loss before and after training with the implied lower bound on the information shared by two views, the alignment and uniformity of the learned space, a summary of each representation dimension and, if an outcome is supplied, a cross-validated linear-probe score on the representation against the raw features.
When to use Contrastive Representation Learning
- Many rows but few or no labels, and you want features for later supervised or unsupervised analysis.
- Features are noisy or redundant and a learned representation may separate structure from noise.
When to use something else
- You need interpretable components with a closed-form solution: use Principal Component Analysis (PCA)
- You want a representation that reconstructs the inputs: use Autoencoder and Variational Autoencoder
Assumptions and requirements
- Numeric or dummy-coded features (standardised first)
- The feature-corruption augmentation keeps the meaning of a row
- Enough rows for stochastic training (hundreds or more)
What the analysis reports
- NT-Xent loss before and after training and the InfoNCE information bound
- Alignment and uniformity of the projected space
- Per-dimension summary of the representation
- Optional cross-validated linear probe against raw features
How to report it
A contrastive encoder (16 dimensions, temperature 0.5, 30% feature corruption) was trained for 30 epochs; the NT-Xent loss fell from [value] to [value], and a 5-fold linear probe reached accuracy [value] against [value] on the raw features.
Related methods
- Principal Component Analysis (PCA)
- Autoencoder and Variational Autoencoder
- Siamese Network Similarity Learning
- Triplet-Loss Metric Learning
How this method is validated
이 방법의 검증 근거
- Independent computation. 2 reference tests compare the results with NumPy and direct computations (formulas, enumeration or simulation).
독립 계산. NumPy·직접 계산(식·열거·모의실험) 대조 참조 시험 2건 통과.
Tolerances are relative differences (absolute differences for values near zero). R comparisons and reference tests are re-run before each release of the analysis engine.
허용오차는 상대 차이입니다(0 근처 값은 절대 차이). R 대조와 참조 시험은 분석 엔진을 배포할 때마다 다시 돌립니다.
Run Contrastive Representation Learning on Quorant
- Data you need
- a table (CSV or Excel) with predictor (feature) columns
- Price
- 900 credits for one analysis up to 10,000 rows (complexity level 5); larger or wider data costs more. Optional methodologist review: 3600 credits.
- Checking
- Compared with independent computations
- Before you pay
- A free pre-analysis diagnosis checks your data and gives an exact quote; nothing is deducted until you approve it.