LogoLogo
Continuum WebsiteContinuum ApplicationsContinuum KnowledgeAxolotl Platform
Continuum Knowledge
Continuum Knowledge
  • Continuum
  • Data
    • Datasets
      • Pre Training Data
      • Types of Fine Tuning
      • Self Instruct Paper
      • Self-Alignment with Instruction Backtranslation
      • Systematic Evaluation of Instruction-Tuned Large Language Models on Open Datasets
      • Instruction Tuning
      • Instruction Fine Tuning - Alpagasus
      • Less is More For Alignment
      • Enhanced Supervised Fine Tuning
      • Visualising Data using t-SNE
      • UMAP: Uniform Manifold Approximation and Projection for Dimension Reduction
      • Training and Evaluation Datasets
      • What is perplexity?
  • MODELS
    • Foundation Models
      • The leaderboard
      • Foundation Models
      • LLama 2 - Analysis
      • Analysis of Llama 3
      • Llama 3.1 series
      • Google Gemini 1.5
      • Platypus: Quick, Cheap, and Powerful Refinement of LLMs
      • Mixtral of Experts
      • Mixture-of-Agents (MoA)
      • Phi 1.5
        • Refining the Art of AI Training: A Deep Dive into Phi 1.5's Innovative Approach
      • Phi 2.0
      • Phi-3 Technical Report
  • Training
    • The Fine Tuning Process
      • Why fine tune?
        • Does Fine-Tuning LLMs on New Knowledge Encourage Hallucinations?
        • Explanations in Fine Tuning
      • Tokenization
        • Tokenization Is More Than Compression
        • Tokenization - SentencePiece
        • Tokenization explore
        • Tokenizer Choice For LLM Training: Negligible or Crucial?
        • Getting the most out of your tokenizer for pre-training and domain adaptation
        • TokenMonster
      • Parameter Efficient Fine Tuning
        • P-Tuning
          • The Power of Scale for Parameter-Efficient Prompt Tuning
        • Prefix-Tuning: Optimizing Continuous Prompts for Generation
        • Harnessing the Power of PEFT: A Smarter Approach to Fine-tuning Pre-trained Models
        • What is Low-Rank Adaptation (LoRA) - explained by the inventor
        • Low Rank Adaptation (Lora)
        • Practical Tips for Fine-tuning LMs Using LoRA (Low-Rank Adaptation)
        • QLORA: Efficient Finetuning of Quantized LLMs
        • Bits and Bytes
        • The Magic behind Qlora
        • Practical Guide to LoRA: Tips and Tricks for Effective Model Adaptation
        • The quantization constant
        • QLORA: Efficient Finetuning of Quantized Language Models
        • QLORA and Fine-Tuning of Quantized Language Models (LMs)
        • ReLoRA: High-Rank Training Through Low-Rank Updates
        • SLoRA: Federated Parameter Efficient Fine-Tuning of Language Models
        • GaLora: Memory-Efficient LLM Training by Gradient Low-Rank Projection
      • Hyperparameters
        • Batch Size
        • Padding Tokens
        • Mixed precision training
        • FP8 Formats for Deep Learning
        • Floating Point Numbers
        • Batch Size and Model loss
        • Batch Normalisation
        • Rethinking Learning Rate Tuning in the Era of Language Models
        • Sample Packing
        • Gradient accumulation
        • A process for choosing the learning rate
        • Learning Rate Scheduler
        • Checkpoints
        • A Survey on Efficient Training of Transformers
        • Sequence Length Warmup
        • Understanding Training vs. Evaluation Data Splits
        • Cross-entropy loss
        • Weight Decay
        • Optimiser
        • Caching
      • Training Processes
        • Extending the context window
        • PyTorch Fully Sharded Data Parallel (FSDP)
        • Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolation
        • YaRN: Efficient Context Window Extension of Large Language Models
        • Sliding Window Attention
        • LongRoPE
        • Reinforcement Learning
        • An introduction to reinforcement learning
        • Reinforcement Learning from Human Feedback (RLHF)
        • Direct Preference Optimization: Your Language Model is Secretly a Reward Model
  • INFERENCE
    • Why is inference important?
      • Grouped Query Attention
      • Key Value Cache
      • Flash Attention
      • Flash Attention 2
      • StreamingLLM
      • Paged Attention and vLLM
      • TensorRT-LLM
      • Torchscript
      • NVIDIA L40S GPU
      • Triton Inference Server - Introduction
      • Triton Inference Server
      • FiDO: Fusion-in-Decoder optimised for stronger performance and faster inference
      • Is PUE a useful measure of data centre performance?
      • SLORA
  • KNOWLEDGE
    • Vector Databases
      • A Comprehensive Survey on Vector Databases
      • Vector database management systems: Fundamental concepts, use-cases, and current challenges
      • Using the Output Embedding to Improve Language Models
      • Decoding Sentence-BERT
      • ColBERT: Efficient and Effective Passage Search via Contextualized Late Interaction over BERT
      • SimCSE: Simple Contrastive Learning of Sentence Embeddings
      • Questions Are All You Need to Train a Dense Passage Retriever
      • Improving Text Embeddings with Large Language Models
      • Massive Text Embedding Benchmark
      • RocketQAv2: A Joint Training Method for Dense Passage Retrieval and Passage Re-ranking
      • LLM2Vec: Large Language Models Are Secretly Powerful Text Encoders
      • Embedding and Fine-Tuning in Neural Language Models
      • Embedding Model Construction
      • Demystifying Embedding Spaces using Large Language Models
      • Fine-Tuning Llama for Multi-Stage Text Retrieval
      • Large Language Model Based Text Augmentation Enhanced Personality Detection Model
      • One Embedder, Any Task: Instruction-Finetuned Text Embeddings
      • Vector Databases are not the only solution
      • Knowledge Graphs
        • Harnessing Knowledge Graphs to Elevate AI: A Technical Exploration
        • Unifying Large Language Models and Knowledge Graphs: A Roadmap
      • Approximate Nearest Neighbor (ANN)
      • High Dimensional Data
      • Principal Component Analysis (PCA)
      • Vector Similarity Search - HNSW
      • FAISS (Facebook AI Similarity Search)
      • Unsupervised Dense Retrievers
    • Retrieval Augmented Generation
      • Retrieval-Augmented Generation for Large Language Models: A Survey
      • Fine-Tuning or Retrieval?
      • Revolutionising Information Retrieval: The Power of RAG in Language Models
      • A Survey on Retrieval-Augmented Text Generation
      • REALM: Retrieval-Augmented Language Model Pre-Training
      • Retrieve Anything To Augment Large Language Models
      • Generate Rather Than Retrieve: Large Language Models Are Strong Context Generators
      • Active Retrieval Augmented Generation
      • DSPy: LM Assertions: Enhancing Language Model Pipelines with Computational Constraints
      • DSPy: Compiling Declarative Language Model Calls
      • DSPy: In-Context Learning for Extreme Multi-Label Classification
      • Optimizing Instructions and Demonstrations for Multi-Stage Language Model Programs
      • HYDE: Revolutionising Search with Hypothetical Document Embeddings
      • Enhancing Recommender Systems with Large Language Model Reasoning Graphs
      • Retrieval Augmented Generation (RAG) versus fine tuning
      • RAFT: Adapting Language Model to Domain Specific RAG
      • Summarisation Methods and RAG
      • Lessons Learned on LLM RAG Solutions
      • Stanford: Retrieval Augmented Language Models
      • Overview of RAG Approaches with Vector Databases
      • Mastering Chunking in Retrieval-Augmented Generation (RAG) Systems
    • Semantic Routing
    • Resource Description Framework (RDF)
  • AGENTS
    • What is agency?
      • Rephrase and Respond: Let Large Language Models Ask Better Questions for Themselves
      • Types of Agents
      • The risk of AI agency
      • Understanding Personality in Large Language Models: A New Frontier in AI Psychology
      • AI Agents - Reasoning, Planning, and Tool Calling
      • Personality and Brand
      • Agent Interaction via APIs
      • Bridging Minds and Machines: The Legacy of Newell, Shaw, and Simon
      • A Survey on Language Model based Autonomous Agents
      • Large Language Models as Agents
      • AI Reasoning: A Deep Dive into Chain-of-Thought Prompting
      • Enhancing AI Reasoning with Self-Taught Reasoner (STaR)
      • Exploring the Frontier of AI: The "Tree of Thoughts" Framework
      • Toolformer: Revolutionising Language Models with API Integration - An Analysis
      • TaskMatrix.AI: Bridging Foundational AI Models with Specialised Systems for Enhanced Task Completion
      • Unleashing the Power of LLMs in API Integration: The Rise of Gorilla
      • Andrew Ng's presentation on AI agents
      • Making AI accessible with Andrej Karpathy and Stephanie Zhan
  • Regulation and Ethics
    • Regulation and Ethics
      • Privacy
      • Detecting AI Generated content
      • Navigating the IP Maze in AI: The Convergence of Blockchain, Web 3.0, and LLMs
      • Adverse Reactions to generative AI
      • Navigating the Ethical Minefield: The Challenge of Security in Large Language Models
      • Navigating the Uncharted Waters: The Risks of Autonomous AI in Military Decision-Making
  • DISRUPTION
    • Data Architecture
      • What is a data pipeline?
      • What is Reverse ETL?
      • Unstructured Data and Generatve AI
      • Resource Description Framework (RDF)
      • Integrating generative AI with the Semantic Web
    • Search
      • BM25 - Search Engine Ranking Function
      • BERT as a reranking engine
      • BERT and Google
      • Generative Engine Optimisation (GEO)
      • Billion-scale similarity search with GPUs
      • FOLLOWIR: Evaluating and Teaching Information Retrieval Models to Follow Instructions
      • Neural Collaborative Filtering
      • Federated Neural Collaborative Filtering
      • Latent Space versus Embedding Space
      • Improving Text Embeddings with Large Language Models
    • Recommendation Engines
      • On Interpretation and Measurement of Soft Attributes for Recommendation
      • A Survey on Large Language Models for Recommendation
      • Model driven recommendation systems
      • Recommender AI Agent: Integrating Large Language Models for Interactive Recommendations
      • Foundation Models for Recommender Systems
      • Exploring the Impact of Large Language Models on Recommender Systems: An Extensive Review
      • AI driven recommendations - harming autonomy?
    • Logging
      • A Taxonomy of Anomalies in Log Data
      • Deeplog
      • LogBERT: Log Anomaly Detection via BERT
      • Experience Report: Deep Learning-based System Log Analysis for Anomaly Detection
      • Log-based Anomaly Detection with Deep Learning: How Far Are We?
      • Deep Learning for Anomaly Detection in Log Data: A Survey
      • LogGPT
      • Adaptive Semantic Gate Networks (ASGNet) for log-based anomaly diagnosis
  • Infrastructure
    • The modern data centre
      • Enhancing Data Centre Efficiency: Strategies to Improve PUE
      • TCO of NVIDIA GPUs and falling barriers to entry
      • Maximising GPU Utilisation with Kubernetes and NVIDIA GPU Operator
      • Data Centres
      • Liquid Cooling
    • Servers and Chips
      • The NVIDIA H100 GPU
      • NVIDIA H100 NVL
      • Lambda Hyperplane 8-H100
      • NVIDIA DGX Servers
      • NVIDIA DGX-2
      • NVIDIA DGX H-100 System
      • NVLink Switch
      • Tensor Cores
      • NVIDIA Grace Hopper Superchip
      • NVIDIA Grace CPU Superchip
      • NVIDIA GB200 NVL72
      • Hopper versus Blackwell
      • HGX: High-Performance GPU Platforms
      • ARM Chips
      • ARM versus x86
      • RISC versus CISC
      • Introduction to RISC-V
    • Networking and Connectivity
      • Infiniband versus Ethernet
      • NVIDIA Quantum InfiniBand
      • PCIe (Peripheral Component Interconnect Express)
      • NVIDIA ConnectX InfiniBand adapters
      • NVMe (Non-Volatile Memory Express)
      • NVMe over Fabrics (NVMe-oF)
      • NVIDIA Spectrum-X
      • NVIDIA GPUDirect
      • Evaluating Modern GPU Interconnect
      • Scalable Hierarchical Aggregation and Reduction Protocol (SHARP)
      • Next-generation networking in AI environments
      • NVIDIA Collective Communications Library (NCCL)
    • Data and Memory
      • NVIDIA BlueField Data Processing Units (DPUs)
      • Remote Direct Memory Access (RDMA)
      • High Bandwidth Memory (HBM3)
      • Flash Memory
      • Model Requirements
      • Calculating GPU memory for serving LLMs
      • Transformer training costs
      • GPU Performance Optimisation
    • Libraries and Complements
      • NVIDIA Base Command
      • NVIDIA AI Enterprise
      • CUDA - NVIDIA GTC 2024 presentation
      • RAPIDs
      • RAFT
    • Vast Data Platform
      • Vast Datastore
      • Vast Database
      • Vast Data Engine
      • DASE (Disaggregated and Shared Everything)
      • Dremio and VAST Data
    • Storage
      • WEKA: A High-Performance Storage Solution for AI Workloads
      • Introduction to NVIDIA GPUDirect Storage (GDS)
        • GDS cuFile API
      • NVIDIA Magnum IO GPUDirect Storage (GDS)
      • Vectors in Memory
Powered by GitBook
LogoLogo

Continuum - Accelerated Artificial Intelligence

  • Continuum Website
  • Axolotl Platform

Copyright Continuum Labs - 2023

On this page
  • The approach includes two key components
  • Detailed Analysis of Methodology
  • Training Procedure
  • Results
  • Conclusion

Was this helpful?

  1. KNOWLEDGE
  2. Vector Databases

RocketQAv2: A Joint Training Method for Dense Passage Retrieval and Passage Re-ranking

PreviousMassive Text Embedding BenchmarkNextLLM2Vec: Large Language Models Are Secretly Powerful Text Encoders

Last updated 11 months ago

Was this helpful?

This August 2021 paper presents a process of optimising dense passage retrieval and passage re-ranking in natural language processing tasks.

Passage retrieval and re-ranking are essential components in various information retrieval tasks, such as question answering and document search.

The retriever aims to efficiently identify a subset of relevant passages from a large corpus, while the re-ranker refines the retrieved results to improve the relevance of top-ranked passages.

The paper recognises that both procedures contribute to the final performance, and thus, it is essential to optimise them together to achieve mutual improvement.

The approach includes two key components

Dynamic listwise distillation

The authors propose a unified listwise training approach for both the retriever and the re-ranker.

Listwise training is an approach where the model considers the entire list of candidate passages as a whole, rather than treating each passage independently.

In listwise training, the model learns to optimise the ranking of the entire list of passages based on their relevance scores.

During the dynamic distillation process, the retriever and the re-ranker can adaptively learn from each other's relevance information, which is crucial for mutual improvement in joint training. This is a significant advancement over previous distillation methods that typically froze one module while training the other.

Hybrid data augmentation

To support the listwise training approach, the authors design a hybrid data augmentation strategy that generates diverse training instances.

This is important because the listwise training approach requires diverse and high-quality training instances that can better represent the distribution of all the passages in the entire collection.

The paper's approach is interesting for several reasons:

Joint optimisation: By jointly training the retriever and the re-ranker, the approach enables the two modules to learn from each other and improve together.

Listwise training: The unified listwise training approach for both modules allows for a more consistent and effective learning process. It also enables the transfer of relevance information between the two modules during the dynamic distillation process.

Data augmentation: The hybrid data augmentation strategy addresses the need for diverse and representative training instances in the listwise training approach. This is crucial for the model to learn effectively and generalize well to unseen data.

Experimental results: The authors conduct extensive experiments on two benchmark datasets, MSMARCO and Natural Questions, demonstrating the effectiveness of their approach.

Note: Dense Passage Retrieval vs. Sparse Retrieval

Dense passage retrieval has been shown to outperform older sparse retrieval techniques.

Sparse methods rely on term frequency and document frequency to rank documents, which can miss nuanced contextual relationships between words.

Dense retrieval methods, by contrast, use deep learning to understand and utilise these subtleties, allowing them to retrieve passages that are more contextually relevant to the query.

Detailed Analysis of Methodology

The methodology of RocketQAv2 focuses on jointly training the dense passage retriever and the re-ranker to achieve mutual improvement.

The key components of the methodology are as follows:

Dynamic Listwise Distillation

  • RocketQAv2 introduces a unified listwise training approach for both the retriever and the re-ranker.

  • Given a query and a list of candidate passages, the retriever and re-ranker generate relevance scores for each passage.

  • The relevance scores are normalised in a listwise manner to obtain relevance distributions over the candidate passages.

What does listwise manner mean?

In the context of RocketQAv2, the relevance scores generated by the retriever and re-ranker are normalised in a listwise manner. This means that the relevance scores are transformed into probability distributions over the list of candidate passages, considering the scores of all passages in the list.

  • The KL-divergence between the relevance distributions from the retriever and the re-ranker is minimised to adaptively reduce the difference between them.

What is KL-divergence?

KL-divergence (Kullback-Leibler divergence) is a measure of the difference between two probability distributions. In RocketQAv2, the KL-divergence is used to quantify the difference between the relevance distributions generated by the retriever and the re-ranker. By minimising the KL-divergence, the model aims to make the relevance distributions from the retriever and re-ranker more similar, promoting consistency between them.

  • The re-ranker is also optimised using a cross-entropy loss based on the ground-truth labels of the passages.

Optimising with cross-entropy loss

  • Cross-entropy loss is a commonly used loss function for classification or ranking tasks. In RocketQAv2, the re-ranker is optimised using a cross-entropy loss based on the ground-truth labels of the passages.

  • The cross-entropy loss encourages the re-ranker to assign higher relevance scores to the positive (relevant) passages and lower scores to the negative (irrelevant) passages. The final loss function combines the KL-divergence loss and the supervised cross-entropy loss.

  • During distillation, both the retriever and the re-ranker are dynamically updated to adaptively synchronise and improve each other.

Hybrid Data Augmentation

  • To generate diverse and high-quality training instances for listwise training, RocketQAv2 employs a hybrid data augmentation strategy.

  • The RocketQA retriever is used to retrieve top-n passages from the corpus.

  • For undenoised instances, hard negatives are randomly sampled from the retrieved passages, and ground-truth positives are included.

  • For denoised instances, the RocketQA re-ranker is used to remove predicted negatives with low confidence scores and include denoised positives with high confidence scores.

  • The hybrid approach incorporates both undenoised and denoised instances to improve the diversity of the candidate passage list.

Undenoised and denoised instances

  • Undenoised instances refer to the training instances that are directly obtained from the retrieval results without any further processing.

  • Denoised instances, on the other hand, are obtained by applying a denoising step using the RocketQA re-ranker.

  • In the denoising step, the re-ranker is used to remove predicted negative passages with low confidence scores and include predicted positive passages with high confidence scores.

  • The inclusion of both undenoised and denoised instances in the training data helps improve the diversity and quality of the candidate passage list.

Training Procedure

  • The retriever and re-ranker are initialised with the learned dual-encoder and cross-encoder of RocketQA.

Initializing retriever and re-ranker with learned dual-encoder and cross-encoder

  • In RocketQAv2, the retriever and re-ranker are initialised using the pre-trained models from RocketQA.

  • The retriever is initialised with the learned dual-encoder model of RocketQA, which consists of two separate encoders for queries and passages.

  • The re-ranker is initialised with the learned cross-encoder model of RocketQA, which takes the concatenation of the query and passage as input.

  • By initialising the retriever and re-ranker with pre-trained models, RocketQAv2 leverages the knowledge and representations learned from RocketQA as a starting point for further training and optimisation.

  • The RocketQA retriever and re-ranker are used to generate training data via hybrid data augmentation.

  • Dynamic listwise distillation is performed to jointly optimise the retriever and re-ranker based on the final retrieval performance.

  • After training, the retriever and re-ranker can be applied for inference in a pipeline.

Key points and advantages of RocketQAv2

  • Joint training of the retriever and re-ranker using a unified listwise approach enables mutual improvement and adaptation.

  • Dynamic listwise distillation utilises soft relevance labels instead of hard pseudo-labels, allowing for more effective knowledge transfer between the modules.

  • Hybrid data augmentation incorporates both undenoised and denoised instances, improving the diversity and quality of training data.

  • The use of the KL-divergence loss and the supervised cross-entropy loss provides a balanced optimization objective for the joint training.

  • The methodology simplifies the training process and opens up the possibility for end-to-end training of the entire dense retrieval architecture.

RocketQAv2 builds upon the architecture and training techniques of RocketQA but introduces significant improvements through joint training, dynamic listwise distillation, and hybrid data augmentation. These advancements aim to enhance the retrieval performance and enable more effective collaboration between the retriever and the re-ranker.

Results

Passage Retrieval Results

RocketQAv2 and PAIR are two methods that perform significantly better than other methods in finding relevant passages from a large collection of text data.

RocketQAv2 is particularly good at ranking the most relevant passages at the top of the search results, likely due to its ability to learn from and mimic the behavior of a more advanced component called the re-ranker.

The choice of the underlying language model, which is a pre-trained component used to understand and process text, is not the only factor contributing to RocketQAv2's superior performance. Even when using the same language model as another method (DPR-E), RocketQAv2 still performs significantly better.

Passage Re-ranking Results

RocketQAv2's re-ranker, which is a component that refines the ranking of retrieved passages, significantly outperforms all other methods tested on the MSMARCO dataset.

The re-ranker's superior performance can be attributed to the joint learning process, where it is trained to closely match the relevance distribution of the retriever component using a technique called dynamic listwise distillation.

When the RocketQA re-ranker is replaced with the RocketQAv2 re-ranker, there is a notable improvement in the retrieval results, highlighting the effectiveness of the RocketQAv2 re-ranker.

Conclusion

RocketQAv2 is an approach to enhance the performance of passage retrieval and re-ranking systems through joint training and dynamic distillation.

By introducing a unified listwise training approach and a hybrid data augmentation strategy, RocketQAv2 enables the retriever and re-ranker to learn from each other and adapt their performance dynamically.

Extensive experiments on benchmark datasets demonstrate the effectiveness of the approach, outperforming state-of-the-art methods in both passage retrieval and re-ranking tasks.

The proposed techniques in RocketQAv2 have the potential to benefit a wide range of information retrieval applications, such as question answering, document search, and recommendation systems.

Future work may explore the application of our approach to other domains and investigate the integration of additional techniques, such as adversarial training and multi-task learning, to further improve the performance of retrieval and re-ranking systems.

LogoRocketQAv2: A Joint Training Method for Dense Passage Retrieval...arXiv.org
RocketQAv2: A Joint Training Method for Dense Passage Retrieval and Passage Re-ranking
The illustration of dynamic listwise distillation
The illustration of hybrid data augmentation
The overall joint training architecture of RocketQAv2
Page cover image