Scaling Deep Contrastive Learning Batch Size under Memory Limited Setup
Abstract
Domain fit: Niche / domain-specific · No strong AI-core implementation/artifact signals were detected from current providers.
Contrastive learning has been applied successfully to learn vector representations of text. Previous research demonstrated that learning high-quality representations benefits from batch-wise contrastive loss with a large number of negatives. In practice, the technique of in-batch negative is used, where for each example in a batch, other batch examples' positives will be taken as its negatives, avoiding encoding extra negatives. This, however, still conditions each example's loss on all batch examples and requires fitting the entire large batch into GPU memory. This paper introduces a gradient caching technique that decouples backpropagation between contrastive loss and the encoder, removing encoder backward pass data dependency along the batch dimension. As a result, gradients can be computed for one subset of the batch at a time, leading to almost constant memory usage. 1
Results and benchmarks
Contrastive learning has been applied successfully to learn vector representations of text.
Benchmark evidence is limited
Evidence graph: 2 refs, 1 links.
Utility signals: depth 65/100, grounding 58/100, status medium.
Implementation
No direct implementation yet
Maintained implementation evidence is not confirmed for this paper yet.
Use the implementation status and reproduction sections for the current action plan.
No verified maintained repo yet
There is no verified maintained implementation yet. Use this baseline plan to decide whether to prototype now or defer.
- No direct maintained implementation was found. Use the paper PDF and citation graph to design a baseline reproduction.
- Start from related paper: Spanish Dependency Act: Characterizing Dependency Levels and Need for Services.
- Track assumptions and missing details in an experiment log before coding.
Time to first repro: a few days
Recommendation evidence is currently too limited for a maintained-repo choice. Use Implementation Status and Reproduction Path for a practical baseline plan.
- Estimate is based on paper-only reproduction flow
Reproduction readiness
No repo
No verified implementation available
- No maintained repository has been identified for this paper. Check adjacent implementations or HF artifacts below.
Hardware requirements
- Expect multi-day setup/compute for meaningful reproduction based on current guidance.
Validation caveat
Hugging Face artifacts
No trustworthy direct or curated related Hugging Face artifacts were found yet. Use targeted searches to quickly locate candidate models, datasets, and demos.
Tip: start with models, then check datasets and spaces if you need evaluation data or demos.
Research context
63
Citations
23
References
Tasks
Computer science, Encoder, Encoding (memory), Dependency (UML), Batch processing, Dimension (graph theory), Pattern recognition (psychology)
Methods
Algorithm
Domains
Artificial intelligence
Related papers
- Spanish Dependency Act: Characterizing Dependency Levels and Need for ServicesSearch on Paper2Code
2008 · Semantic similarity
- ASearch on Paper2Code
2023 · Semantic similarity
- SCOPE OF UNHEALTHY DEPENDENCYSearch on Paper2Code
2014 · Semantic similarity
- Which Dependency was Updated? Exploring Who Changes Dependencies in npm packagesSearch on Paper2Code
2021 · Semantic similarity
- Iterative Machine-Learning-Based Method of Selecting Encoder Parameters for Speed-Bitrate TradeoffSearch on Paper2Code
2022 · Semantic similarity
Open this paper in HFEPX to review benchmark signals, evaluation modes, and human-feedback protocol context.
Open in HFEPXJump to Paper2Code search queries derived from this paper's research context.