Skip to content

v3.0.3

Choose a tag to compare

@github-actions github-actions released this 13 Nov 20:06
· 55 commits to master since this release
b95a423

Version 3.0.3

Version 3.0.3 fixes numerical precision and retrieval edge cases, and speeds up
fixed pair and triplet construction. Public signatures and minimum supported
Python, PyTorch, and NumPy versions are unchanged.

Numerical fixes

  • MultiSupConLoss preserves label intersections under autocast. Jaccard
    weights and thresholded positive pairs remain accurate for large label sets,
    including label-set CrossBatchMemory training
    (#780).
  • ManifoldLoss preserves float64 in its graph inverse, correcting values and
    gradients and avoiding false singularities for propagation weights close to
    one. Float16 and bfloat16 inputs continue to use a float32 inverse
    (#781).
  • GE2ELoss uses stable cross entropy and cancels the common bias before
    computing softmax logits. Large biases and common scores no longer erase
    class differences or corrupt gradients. The contrast variant keeps its bias
    dependence (#782).
  • PerAnchorReducer retains float32 aggregates through its inner reducer for
    float16 and bfloat16 losses. This prevents overflow, lost positive gradients,
    and rounded threshold decisions. The default scalar for a nonempty
    low-precision term is now float32; empty terms retain their existing dtype
    (#783).
  • UniformHistogramMiner preserves tiny distance ranges and computes
    low-precision bin positions in float32, retaining the intended occupied bins
    (#784).
  • VICRegLoss computes low-precision statistics and returns its scalar in
    float32, with autocast disabled inside the computation. Float64 views keep
    their precision, including mixed-dtype view pairs. Gradients still reach
    both inputs (#785).

Sampling performance

FixedSetOfPairs and FixedSetOfTriplets select distinct classes without
permuting every class for each tuple. Their class-uniform distribution, tuple
relationships, and seeded reproducibility are preserved. Exact tuples for an
existing seed change
with the new algorithm. The
construction measurements
cover datasets with many classes; they do not measure training throughput
(#786).

Retrieval fixes

  • FaissKNN.train and FaissKNN.add accept non-contiguous tensor views when
    building or extending persistent indices, without changing caller tensors
    (#787).
  • Empty queries return (0, k) results from CustomKNN and FaissKNN, including
    self-match exclusion. Batched CustomKNN preserves the distance's output dtype
    and validates the neighbor count even when no query blocks are produced
    (#788).

Contributors

Thanks to @Afloat16 for all nine contributions.
The original contribution commits are preserved in this release.