Deep InfoMax (Hjelm et al., 2019) maximizes mutual information between an input's local features and its global summary, by training a discriminator to tell matched pairs from mismatched ones. The Jensen-Shannon form is a stable estimate built from softplus terms.
Implement jsd_estimate(pos, neg), the difference of the mean softplus terms over positive and negative pairs.
logaddexp(0, x) for softplus.Positive pairs contribute -softplus(-s), negative pairs contribute -softplus(s).
No results yet
Run your code to check it against the examples, or submit to run every test.