Implement NT-Xent loss (implicit negative samples)
Implement InfoNCE-style (e.g. NT-Xent from SimCLR) training objective for contrastive learning. This changes sampling strategy so it probably should be done with #123.
@ziw-liu as discussed, first implement NT-Xent loss for the "time and cell identity agnostic" sampling, which can be done with the current dataloader.
Based on the results, we can figure out our strategy for time and cell identity-aware sampling, and how to implement it properly.
Previous implementation.
Just to log our thoughts, a 'proper' implementation would be to treat each track as a sample instead of each node as a sample in the dataset, so that each track contributes one positive pair per epoch, and no batch will contain more than 2 patches from the same track.
@edyoshikun See also official tensorflow implementation and a pytorch reproduction.