Contrastive learning trains a neural network to place embeddings of similar items close together and embeddings of dissimilar items farther apart. For images, altered views such as crops or rotations represent the same object; tabular data lacks equally reliable transformations, making suitable pretext tasks harder to design. section 16.5.4
For tabular outlier detection, internal contrastive learning creates feature subsets from each row. Subsets from one row should receive similar embeddings, while embeddings from different rows should remain distinct; unusual records can therefore be identified through the learned representation and resulting scores. section 16.5.5
Applying ICL with DeepOD
DeepOD provides an ICL estimator with a compact workflow: instantiate ICL, fit it to X, and obtain outlier scores with decision_function(X).

