                                             Efficient Long Context Language Model Retrieval with Compression


                                                        Minju Seo1 Jinheon Baek1 Seongyun Lee1 Sung Ju Hwang1,2
                                                                           KAIST1 , DeepAuto2
                                                     {minjuseo, jinheon.baek, seongyun, sungju.hwang}@kaist.ac.kr




                                                                Abstract                               such as summarization or question answering over
                                                                                                       long articles (Xu et al., 2024b; Kim et al., 2024). In
                                             Long Context Language Models (LCLMs) have
                                             emerged as a new paradigm to perform Infor-
                                                                                                       addition to this, LCLMs go beyond these relatively
arXiv:2412.18232v2 [cs.IR] 28 May 2025




                                             mation Retrieval (IR), which enables the direct           simple tasks to handle more complex tasks, such as
                                             ingestion and retrieval of information by pro-            Information Retrieval (IR) or Text-to-SQL, which
                                             cessing an entire corpus in their single context,         not only demand long-range context understanding
                                             showcasing the potential to surpass traditional           but also involve reasoning across multiple docu-
                                             sparse and dense retrieval methods. However,              ments or structured queries (Lee et al., 2024; An
                                             processing a large number of passages within              et al., 2024; Liu et al., 2024b; Xu et al., 2024b).
                                             in-context for retrieval is computationally ex-
                                                                                                       Furthermore, due to their impressive performance,
                                             pensive, and handling their representations dur-
                                             ing inference further exacerbates the process-            they have established a new paradigm in LM uti-
                                             ing time. To address this challenge, we aim to            lization and task solving. For example, in IR tasks
                                             make LCLM retrieval more efficient and poten-             that we focus on, LCLMs are capable of processing
                                             tially more effective with passage compression.           an entire corpus with a large number of documents
                                             Specifically, we propose a new compression                along with a user query in their single context, lead-
                                             approach tailored for LCLM retrieval, which is            ing to more precise identification of relevant infor-
                                             trained to maximize the retrieval performance
                                                                                                       mation and further surpassing traditional sparse
                                             while minimizing the length of the compressed
                                             passages. To accomplish this, we generate the
                                                                                                       or dense retrieval approaches in many cases (Lee
                                             synthetic data, where compressed passages are             et al., 2024). Yet, LCLMs face the limitation that
                                             automatically created and labeled as chosen or            the required computational resources scale with
                                             rejected according to their retrieval success for         the input length, which has been overlooked by
                                             a given query, and we then train the proposed             existing work.
                                             Compression model for Long context Retrieval                 To tackle this challenge, we propose a more
                                             (CoLoR) with this data via preference optimiza-           efficient (and potentially more effective) method
                                             tion while adding the length regularization loss
                                                                                                       for LCLM retrieval. Specifically, instead of rely-
                                             on top of it to enforce brevity. We perform ex-
                                             tensive experiments on nine datasets, and show-           ing on the original passages, our approach uses
                                             case that CoLoR improves the retrieval perfor-            compressed passages that retain the core informa-
                                             mance by 6% while compressing the in-context              tion while filtering our irrelevant details, leading
                                             size by a factor of 1.91. Our code is available at:       to a substantial reduction in input size. It is worth
                                             https://github.com/going-doer/CoLoR.                      noting that, while there are existing compression
                                                                                                       methods (Jiang et al., 2023b; Xu et al., 2024a) par-
                                         1   Introduction
                                                                                                       ticularly designed for text generation or retrieval-
                                         The context size of Language Models (LMs) refers              augmented generation, they are largely suboptimal
                                         to the maximum number of tokens that the model                for retrieval since they are not trained to prioritize
                                         can process in a single input, which has rapidly              key elements crucial for precise retrieval, such as
                                         expanded, growing from a few hundred to 128K,                 relevance to the query or fine-grained document
                                         and recently reaching 1M tokens in Long Context               distinctions. In contrast, our compression model
                                         Language Models (LCLMs) (OpenAI, 2024; Team,                  is trained to optimize the LCLM retrieval perfor-
                                         2024; Anthropic, 2024). Notably, this expansion               mance, while minimizing the passage length with
                                         has unlocked new capabilities, enabling models to             the regularization term added on top of the opti-
                                         handle tasks that require extensive context lengths,          mization objective.

                                                                                                   1
             (A) Dense Retrieval                                                        (B) LCLM Retrieval                                       (C) LCLM Retrieval w/ CoLoR (Ours)                     (D) Performance
                                                                                                      Input
  Raw Passage                                      Top-1      Raw Passage                                                              Raw Passage
                                                                                          Raw Passage
  ID 0: Major style                      ID 0        47.09    ID 0: Major style                                                        ID 0: Major style
                                                                                          ID 0: Major style guides
  guides advise                                               guides advise
                                                                                          advise consulting a dictionary
                                                                                                                                       guides advise                   CoLoR (Ours)
  consulting a dictionary                                     consulting a dictionary                                                  consulting a dictionary
                                                                                          to determine whether a
  to determine whether ..                ID 1        46.02    to determine whether ..                                                  to determine whether ..
                                                                                          compound modifier ..


                            Doc Enc.
  ID 1: The music was                                         ID 1: The music was         ID 1: The music was                          ID 1: The music was                 Input
  composed by Howard                     ID 2       43.96     composed by Howard          composed by Howard Shore,
                                                                                                                               LCLM    composed by Howard                                       LCLM
                                                                                                                                                                 Compressed Passage
  Shore, who previously                                       Shore, who previously       who previously composed the                  Shore, who previously
  composed the first t…                                       composed the first t…       first two parts of the trilogy…              composed the first t…     ID 0: Style guides reco…
                                             Dot Product
  ID 2: On March 5, 2014,                                     ID 2: On March 5, 2014,     ID 2: On March 5, 2014, the                  ID 2: On March 5, 2014,   ID 1: Howard Shore co ..
  the College Board
                                                  for         the College Board           College Board announced its                  the College Board
  announced its plan to                    Similarity score   announced its plan to       plan to redesign the SAT in                  announced its plan to
                                                                                                                              Output                                                           Output
                                                                                                                                                                 ID 2: The College Board..
                            Query Enc.




  redesign the SAT in ..                                      redesign the SAT in ..      order to link the exam..                     redesign the SAT in ..
                                                                                                                               ID 1                                                             ID 2
   Query: When did the                                         Query: When did the            Query: When did the                       Query: When did the        Query: When did the
                                                                                            sat become out of 1600?          Wrong                               sat become out of 1600?     Correct
  sat become out of 1600?                                     sat become out of 1600?                                                  sat become out of 1600?



Figure 1: Comparison of different IR approaches. (A) Dense Retrieval. To identify relevant documents to the given query, it first
embeds them into the vector space and then calculates their semantic similarity. (B) LCLM Retrieval. The LCLM takes and
processes the raw passages from the corpus along with the query in the input context, and identifies the relevant passages. (C)
CoLoR. We compress the raw passages, and use the compressed passages alongside the query as the LCLM input for retrieval.

   Specifically, to train our compression model, we                                                               5 single-document and 4 multi-document retrieval
leverage the strategy of Odds Ratio Preference Op-                                                                scenarios. On a battery of tests conducted, we then
timization (ORPO) (Hong et al., 2024), a method                                                                   demonstrate that our approach not only improves
well-suited for maximizing the preference by com-                                                                 the retrieval performance by 6% but also reduces
paring pairs of samples and learning to prefer one                                                                the context length for retrieval by a factor of 1.91
over the other based on the specific objective. We                                                                over the baseline that uses the original passages,
note that this is particularly useful for our scenario                                                            and it is further superior to the existing text com-
since it allows us to rank compressed passages ac-                                                                pression (or summarization) methods. Further, we
cording to their retrieval performance, helping the                                                               show that our compression method can be general-
model distinguish between more and less effective                                                                 izable to datasets not seen during its training.
compressions, without the need for generating the
ground-truth compression outputs manually. In                                                                     2         Related Work
other words, to generate the training data for it, we                                                             Information Retrieval The goal of Informa-
automatically create multiple compressed versions                                                                 tion Retrieval (IR) is to fetch documents rele-
of each raw passage in the corpus and evaluate their                                                              vant to a query, which has evolved significantly
retrieval success with the LCLM retrieval outcome.                                                                with their application to various tasks, such as
Subsequently, compressed samples are labeled as                                                                   web search and question answering. Early ap-
either chosen or rejected based on this evaluation,                                                               proaches used sparse retrieval methods, such as
which can ultimately guide the model toward gen-                                                                  BM25 (Robertson and Zaragoza, 2009), which
erating the effective compression for passages for                                                                are based on lexical matching between queries
retrieval during preference optimization. However,                                                                and documents. As the field progressed, dense
using ORPO alone might not sufficiently reduce the                                                                retrieval techniques have developed, leveraging
output length of the compressed passages. Thus,                                                                   text embedding models to capture richer seman-
to overcome this, we further introduce a dynamic                                                                  tic relationships between queries and documents.
regularization term that adjusts the odds ratio loss                                                              Notable examples of dense retrievers include Sen-
in the training objective based on the length differ-                                                             tenceBERT (Reimers and Gurevych, 2019a), Dense
ence between chosen and rejected samples (where                                                                   Passage Retrieval (DPR) (Karpukhin et al., 2020),
we additionally consider the compressed passages                                                                  and SentenceT5 (Reimers and Gurevych, 2019b).
with the correct retrieval as rejected if there exist                                                             More recently, researchers have begun transform-
more shorter ones with the correct retrieval), which                                                              ing Large Language Models (LLMs) into retrieval
can encourage the model to prioritize brevity while                                                               systems (BehnamGhader et al., 2024), which aim
at the same time optimizing the retrieval accuracy.                                                               to utilize the vast contextual understanding capabil-
We refer to our approach as Compression for Long                                                                  ity of LLMs in representing documents and queries.
Context Language Model Retrieval (CoLoR), il-                                                                     Following this line of approaches, our work extends
lustrated in Figure 1 with previous IR methods.                                                                   by utilizing LCLMs as the retrieval mechanism.
  We experimentally validate the effectiveness of                                                                 Long Context Language Models The recent ex-
CoLoR on 9 datasets for LCLM retrieval, including                                                                 pansion in context length of LLMs, which is called

                                                                                                              2
Long Context Language Models (LCLMs), has em-                 vancements, previous work focusing on context
powered them to process and comprehend much                   compression in RAG or instruction-following tasks
larger amounts of information. Specifically, models           is not well-optimized for retrieval tasks, as it does
like YaRN (Peng et al., 2024), Longformer (Beltagy            not cater specifically to the needs of retrieval. To
et al., 2020), Gemini (Team, 2024), GPT-4 (Ope-               address this gap, we propose an abstractive com-
nAI, 2024), and Claude (Anthropic, 2024) exem-                pression model designed to improve the efficacy of
plify this advancement. In tandem with these devel-           LCLM retrieval.
opments, new benchmarks have been introduced
to assess the capabilities of LCLMs across various            Preference Optimization Aligning the language
tasks. For example, many studies (Bai et al., 2024;           models with human preferences has become a key
Li et al., 2024a; Liu et al., 2024b; Yuan et al., 2024;       focus in improving response generation (Ouyang
Wang et al., 2024) evaluated their performance                et al., 2022; Zhao et al., 2023; Rafailov et al.,
in long-context understanding, and there are also             2023; Hong et al., 2024). A prominent approach
other studies that focused on more specialized ar-            is Reinforcement Learning from Human Feedback
eas such as code comprehension (Liu et al., 2024a)            (RLHF) (Ouyang et al., 2022; Stiennon et al., 2020),
and training-free in-context learning (Bertsch et al.,        which leverages a reinforcement learning frame-
2025; Li et al., 2024b). Moreover, Lee et al. (2024)          work where a policy model learns to evaluate and
demonstrated that LCLMs outperform traditional                choose actions based on the state of an environment,
fine-tuned specialized models in several areas (such          with human feedback acting as a reward signal.
as IR). However, despite these promising results,             Notably, what sets these approaches apart is their
Liu et al. (2024b) highlighted the persistent chal-           ability to train models using only preference selec-
lenges LCLMs face in fully grasping complex long              tions on outputs, without needing explicit ground
contexts with high computational costs. In contrast           truth answers. Additionally, Odds Ratio Preference
to existing work that has mainly explored the po-             Optimization (ORPO) (Hong et al., 2024) further
tential and diverse applications of LCLMs, we take            simplifies this by removing the requirement for a
a different direction on improving the efficiency of          reference model during training, allowing single-
LCLMs in the context of IR by reducing the context            step learning via preference selection of outputs. In
size while maintaining or enhancing performance.              our approach, we apply this framework to train the
                                                              compression model without needing ground truth
Prompt Compression As LCLMs handle in-                        labels, enabling the model to learn based on a pair
creasingly longer contexts, the corresponding rise            of compression outputs and their retrieval results.
in computational costs has sparked research into
methods for prompt compression. Extractive com-
                                                              3     Methodology
pression is one common approach, where only the               3.1    Problem Statement
relevant tokens are retained. This often involves
techniques such as token pruning, which require as-           We begin with formally explaining IR and LCLMs.
sessing the importance of individual tokens based             Information Retrieval In a typical IR task, given
on specific metrics, for example, utilizing the self-         a query q, its objective is to retrieve a ranked list
information or perplexity of the model (Jiang et al.,         k relevant entries from a corpus C, formulated as
2023b; Li et al., 2023). However, these methods               follows: {di }ki=1 = Retriever(q, C), where di is
typically require access to the model’s internal pro-         a document from C. The query q is typically tex-
cesses, making them feasible only for white-box               tual, and C is a collection of documents. Tradition-
models. In contrast, abstractive compression meth-            ally, Retriever is operationalized with the sparse
ods generate the condensed prompts without need-              retrieval based on lexical term matching (Robert-
ing to preserve the original token order or structure,        son and Zaragoza, 2009) or the neural embedding-
and can be applied to both black-box and white-               based dense methods (Karpukhin et al., 2020).
box models as they do not rely on internal model
access. For example, Xu et al. (2024a) generate               Long Context Language Model Retrieval Re-
compressed content from multiple documents in                 cently, Long Context Language Models (LCLMs)
Retrieval Augmented Generation (RAG) settings,                have emerged with the ability to process extended
and Wang et al. (2023) use a similar approach to              contexts, enabling them to handle inputs spanning
generate distilled documents. Despite these ad-               dozens of documents. This capability has given rise

                                                          3
   1. Compressed Passage Generation                                         2. Preference Data Labeling                                             3. Training
   Raw Passage
                                                                                           Input
                                                   Compressed Passage 1
   ID 0: Most episodes feature a                                              ID 0: The show features episo..
   storyline taking place in the                   ID 0: The show feat..                                                      Output
   present (2016 20132018,                                                    ID 1: The late 1870s saw the in..
                                                                                                                               ID 0
   contemporaneous with airing)                    ID 1: The late 1870s..     ID 2: The Preamble of the U.S. ..
   and a storyline taking place a..         LM 1                                                                                                                           Output
                                                   ID 2: The Preamble ..       Query: Why is kyoto removed
                                                                                     from target list?                                 Preference      CoLoR      LCLM      ID 2
   ID 1: The development of color
   lithography in the late 1870s                                                                                      LCLM                Data         (Ours)
   allowed the companies to create
   attractive images to better                     Compressed Passage 2                     Input                                                                        Preferen
   present their produc..                          ID 0: The TV series ..     ID 0: The TV series "This Is Us..                                                             Data
                                                                                                                              Output
                                            LM 2                              ID 1: In the late 1870s, the …
   ID 2: On May 30, Stimson asked                  ID 1: In the late 18..                                                      ID 2
   Groves to remove Kyoto from                                                ID 2: On May 30, Stimson ..
   the target list due to its historical,          ID 2: On May 30, ..         Query: Why is kyoto removed
   religious and cultural significance,
                                                                                     from target list?
   but Groves ..                                                                                                             Chosen      Rejected


Figure 2: Overview of Training Processes for CoLoR. 1. We first create the training data for CoLoR by generating multiple
compressed passages from their original passages with multiple LMs. 2. The compressed passages and their associated query
are used as input to the LCLM, and their retrieval performance is measured to label them as either chosen or rejected based on
retrieval results. 3. CoLoR is trained using the pairs of chosen and rejected compressed passages obtained from previous steps.


to a new paradigm called LCLM Retrieval, which                                                         To address these limitations, we propose CoLoR
utilizes LCLMs to solve IR tasks (Lee et al., 2024).                                                (Compression for Long Context Retrieval), which
To be formal, similar to the typical IR approaches,                                                 is a novel compression model designed for LCLM
LCLM retrieval aims to retrieve relevant documents                                                  retrieval. CoLoR generates compressed passages
from the corpus C for the query q, which can be                                                     by learning to balance two objectives: maintain-
represented as follows: {di }ki=1 = LCLM(T (q, C)),                                                 ing high retrieval accuracy and reducing passage
where T is the prompt template which serves as                                                      length. To achieve this, we leverage preference op-
the structured format that outlines the context for                                                 timization using synthetic preference data, where
LCLMs (including task descriptions) to direct them                                                  compressed passages are automatically generated,
in performing retrieval. It is worth noting that, un-                                               and labeled based on their retrieval success as well
like traditional retrieval methods (sparse or dense),                                               as their resulting lengths. This allows the model to
which involve pairing each document with a query                                                    distinguish between more and less effective com-
and calculating similarity scores to rank documents,                                                pressions without manually collecting labels.
LCLM retrieval takes both the entire corpus and                                                        Formally, let di ∈ C represent a raw document
the query as the single input and directly identifies                                               (or passage) from the corpus. Our goal is to apply
relevant documents within it. However, a signifi-                                                   the CoLoR model to compress each document di
cant challenge with LCLM retrieval lies in the use                                                  into a more concise representation ci = CoLoR(di ),
of raw documents (or passages) as input, as they of-                                                where ci is the compressed version of the raw doc-
ten contain unnecessary, redundant, and irrelevant                                                  ument. Ideally, the compressed passage ci retains
context, leading to increased computational costs.                                                  the most relevant information while filtering out
                                                                                                    unnecessary details, therefore, reducing the length
3.2     CoLoR: Compression for
                                                                                                    of the input to the LCLM. After compressing every
        Long Context Language Model Retrieval
                                                                                                    document in the corpus, during the retrieval pro-
To tackle the inefficiency of using raw passages in                                                 cess, instead of directly using the original corpus
LCLM retrieval, we propose using compressed pas-                                                    C, the LCLM ingests the compressed corpus C ∗ =
sages to reduce the computational overhead with-                                                         |C|
                                                                                                    {ci }i=1 , where each element in C is transformed by
out compromising retrieval effectiveness. There                                                     CoLoR. In other words, the retrieval process can be
are two common approaches to compressing pas-                                                       redefined as follows: {di }ki=1 = LCLM(T (q, C ∗ ))
sages: using prompt-based methods with LLMs or                                                      with |T (q, C ∗ )| ≪ |T (q, C)| where | · | measures
leveraging off-the-shelf compression models. How-                                                   the number of tokens in the resulting prompt.
ever, prompt-based methods often fail to achieve
optimal compression ratios and are not tailored to
                                                                                                    3.2.1         Training Recipe for CoLoR
enhance IR performance. Likewise, existing com-
pression models, which are typically designed for                                                   We now turn to explaining the details of how we
tasks other than IR (such as RAG or instruction                                                     train our CoLoR to optimize efficiency while im-
following), are not well-suited for LCLM retrieval.                                                 proving retrieval accuracy, illustrated in Figure 2.

                                                                                             4
Data Collection To train CoLoR for LCLM re-                  ization term that adjusts the odds ratio loss based
trieval, we need to create a new dataset as no such          on the length difference between rejected and cho-
datasets are available. Our data creation process            sen samples. Specifically, we redefine the ORPO
begins with leveraging multiple LLMs to generate             loss by multiplying it with a specific factor deter-
multiple compressed versions of raw documents (or            mined as the length difference between yl and yw
passages), by prompting them with the prompt tem-            (where yl is always longer than yw based on the
plate: T = Summarize the following content:                  criteria in our data collection process), as follows:
{passage}, formalized as follows: c = LLM(T (d))
where c is the compressed passage and d is its orig-         LCoLoR = E(q,yw ,yl ) [LSFT + λ · LOR · (|yl | − |yw |)] ,
inal version. After that, the compressed passages
                                                             where | · | measures the length of the compressed
are used as inputs for the LCLM retrieval, which
                                                             passage. This extra regularization term directly
are then labeled as either chosen or rejected based
                                                             allows the model to make larger updates in cases
on two criteria: 1) whether the compressed passage
                                                             where the chosen sample is significantly shorter
is correctly retrieved in response to its associated
                                                             than the rejected one, making it to favor concise
query and 2) whether its length is shorter than any
                                                             outputs without sacrificing retrieval accuracy.
of the other successfully retrieved compressed pas-
sages. For instance, if several compressed versions          4     Experiment Setup
of a passage are retrieved correctly, the shortest
of these is labeled as chosen, while the others are          4.1    Datasets
labeled as rejected. Also, if the retrieval with the         We evaluate the performance of CoLoR on 9 widely
compressed passage fails, it is labeled as rejected.         used LCLM retrieval benchmark datasets, follow-
This allows us to create the dataset with pairs of           ing the setup from Lee et al. (2024), including 5
chosen and reject compression results for training           single-document retrieval datasets: FEVER, FIQA,
CoLoR with preference optimization, which can                MS MARCO, NQ, and SciFact (Thorne et al.,
ultimately prioritize compressions that improve re-          2018; Maia et al., 2018; Nguyen et al., 2016;
trieval accuracy while minimizing passage length.            Kwiatkowski et al., 2019; Wadden et al., 2020) and
                                                             4 multi-document retrieval datasets: HotpotQA,
CoLoR Optimization To optimize our compres-
                                                             MuSiQue, QAMPARI, and QUEST (Yang et al.,
sion model, we leverage the Odds Ratio Preference
                                                             2018; Trivedi et al., 2022; Amouyal et al., 2023;
Optimization (ORPO) (Hong et al., 2024), an ap-
                                                             Malaviya et al., 2023). Note that single-document
proach designed for training models by comparing
                                                             retrieval tasks involve retrieving a single document
pairs of chosen and rejected samples without the
                                                             relevant to a query, whereas multi-document re-
need for a reference model. ORPO is particularly
                                                             trieval tasks require retrieving two or more docu-
suited for our task, as it allows us to directly opti-
                                                             ments. We provide the detailed statistics in Table 9.
mize the model to prefer compressed passages that
yield better retrieval performance with the shortest         4.2    Baselines and Our Model
length. Formally, the standard ORPO loss function
                                                             We evaluate CoLoR against baselines, as follows:
measures the odds ratio between the likelihood of
                                                             1. Raw Passage is a standard approach for LCLM
generating the chosen response yw and the rejected
                                                             retrieval that directly uses raw passages; 2. Docu-
response yl , represented as follows:
                                                             ment Title uses only the titles of the passages with-
      LORPO = E(q,yw ,yl ) [LSFT + λ · LOR ] ,               out the full content; 3. Zero-Shot Compression
                                                             uses LLMs to compress passages via prompting,
where LSFT is the supervised fine-tuning loss for            for example, T = Summarize the following
the chosen response based on the causal language             content: {passage}, with GPT-4o-mini (Ope-
modeling negative log-likelihood, and LOR is the             nAI, 2024) and Phi3 (Abdin et al., 2024); 4. Selec-
loss for the odds ratio of the chosen response over          tive Context is an extractive compression method
the rejected one (See Hong et al. (2024) for details).       that selects tokens based on the self-information of
   However, while ORPO enables effective prefer-             the model (Li et al., 2023), where we use two com-
ence learning for making the compression model,              pression rates: 0.3 and 0.6; 5. LLMLingua is an
it does not inherently reduce the length of the com-         extractive compression method that selects tokens
pressed passages as much as desired. To overcome             based on the perplexity scores (Jiang et al., 2023b);
this, we further propose to use a dynamic regular-           6. RECOMP is an abstractive compression method

                                                         5
Table 1: Results on LCLM retrieval. Type refers to a compression type: ✗ denotes no compression, Ex. denotes extractive
compression, and Ab. denotes abstractive compression. † denotes multi-document retrieval. Comp. is the compression rate.

                                       FEVER               FIQA          MS MARCO               NQ               SciFact
   Methods                   Type   R@1    Comp.    R@1      Comp.      R@1     Comp.    R@1     Comp.       R@1     Comp.

   Raw Passage                ✗     0.95    1.00x   0.63      1.00x      0.90   1.00x    0.97     1.00x      0.57     1.00x
   Document Title             ✗     0.97   31.65x   N/A        N/A       N/A     N/A     0.86    22.56x      0.68    13.98x
   BM25                       ✗     0.93   1.00x    0.41      1.00x      0.78   1.00x    0.79        1.00x   0.75    1.00x
   DPR                        ✗     0.89   1.00x    0.31      1.00x      0.85   1.00x    0.94        1.00x   0.35    1.00x
   Selective Context (0.6)   Ex.    0.96   1.83x    0.35      1.83x      0.52   1.92x    0.95        1.88x   0.71    1.89x
   Selective Context (0.3)   Ex.    0.95   4.58x    0.15      4.24x      0.19   4.69x    0.90        4.91x   0.63    5.33x
   LLMLingua                 Ex.    0.96   1.70x    0.46      1.6x       0.83   1.12x    0.97        1.24x   0.74    1.92x
   Comp. w/ GPT              Ab.    0.96   1.74x    0.68      2.09x      0.92   1.39x    0.99        1.37x   0.73    1.71x
   Comp. w/ Phi              Ab.    0.95   1.83x    0.68      2.31x      0.92   1.41x    0.99        1.39x   0.71    1.78x
   RECOMP                    Ab.    0.96   3.02x    0.36      2.00x      0.75   1.77x    0.98        1.97x   0.70    2.31x
   COMPACT                   Ab.    0.96   2.21x    0.48      2.56x      0.88   1.17x    0.98        1.32x   0.77    2.95x
   CoLoR (Ours)              Ab.    0.94   2.15x    0.73      2.82x      0.95   1.63x    0.98        1.62x   0.75     2.12x

                                     HotPotQA†       MuSiQue†             QAMPARI†         QUEST†               Average
   Methods                   Type   F1@2   Comp.    F1@5     Comp.      F1@5    Comp.    F1@3    Comp.       Perf.   Comp.

   Raw Passage                ✗     0.87    1.00x   0.35      1.00x      0.56    1.00x   0.33     1.00x      0.68    1.00x
   Document Title             ✗     0.65   12.52x   0.38     23.43x      0.25   22.48x   0.11    55.65x      0.60    26.04x
   BM25                       ✗     0.82   1.00x    0.39      1.00x      0.76   1.00x    0.37        1.00x   0.64     1.00x
   DPR                        ✗     0.79   1.00x    0.46      1.00x      0.55   1.00x    0.31        1.00x   0.61     1.00x
   Selective Context (0.6)   Ex.    0.79   2.06x    0.37      1.93x      0.42   1.95x    0.19        2.01x   0.58     1.92x
   Selective Context (0.3)   Ex.    0.68   5.49x    0.37      5.10x      0.30   5.30x    0.11        5.41x   0.48     5.01x
   LLMLingua                 Ex.    0.81   1.13x    0.36      1.23x      0.54   1.05x    0.21        1.75x   0.65     1.42x
   Comp. w/ GPT              Ab.    0.87   1.20x    0.40      1.32x      0.54   1.28x    0.32        1.95x   0.71     1.56x
   Comp. w/ Phi              Ab.    0.85   1.21x    0.41      1.39x      0.55   1.33x    0.31        2.03x   0.71     1.63x
   RECOMP                    Ab.    N/A    0.76x    0.38      1.00x      0.53   0.97x    0.21        1.50x   0.54     1.70x
   COMPACT                   Ab.    0.87   1.14x    0.37      1.47x      0.52   1.51x    0.30        3.47x   0.68     1.98x
      CoLoR (Ours)           Ab.    0.86   1.37x    0.42      1.55x      0.55   1.50x    0.33        2.39x   0.72     1.91x


that compresses multiple documents designed for                   in the top k results) and Recall@k (the proportion
RAG scenarios (Xu et al., 2024a); 7. COMPACT is                   of relevant documents retrieved from up to k to-
an abstractive compression method that compresses                 tal). For compression efficiency, we compute the
and refines passages iteratively for question answer-             compression rate (Comp.), defined as the average
ing (Yoon et al., 2024); 8. CoLoR (Ours) is our ab-               number of tokens in raw passages divided by the
stractive compression method, trained to maximize                 average number of tokens in compressed passages.
the retrieval accuracy and minimize the compressed
passage length, with the preference optimization.                 4.4    Implementation Details
Additionally, we also include BM25 (Robertson                     To ensure a fair comparison across all experiments,
and Zaragoza, 2009) (a sparse retriever that scores               we use GPT-4o-mini as the underlying LCLM. We
documents based on term frequency and inverse                     use the Phi-3-mini-4k-instruct model as the base
document frequency) and DPR (Karpukhin et al.,                    model for our compression method, CoLoR. For
2020) (a dense retriever that uses embeddings to                  the prompt, we structure it as a sequence of the
match queries and relevant passages) as the refer-                corpus, 5-shot examples, and query, following Lee
ence to the performance of conventional retrievers,               et al. (2024). Additional details are in Appendix A.
which are neither comparable nor our competitors.
                                                                  5     Experiment Results
4.3     Evaluation Metrics
                                                                  Main Results We report main results in Table 1,
For single-document retrieval, we evaluate perfor-                demonstrating that the proposed CoLoR approach
mance with Recall@1 (R@1), which measures                         consistently outperforms all baseline methods on
the proportion of queries for which the top-ranked                both the single-document and multi-document re-
document is relevant. For multi-document, we use                  trieval tasks while at the same time substantially
F1@k, a metric combining Precision@k (the pro-                    compressing the input context size of LCLMs for
portion of correctly retrieved relevant documents                 retrieval. Specifically, CoLoR achieves a compres-

                                                              6
Table 2: Results on out-of-domain datasets, where the target          Table 3: Results on more challenging out-of-domain set-
retrieval category is excluded from the training of CoLoR*.           tings, where models are trained on the datasets from the single
                                                                      domain and then evaluated on the datasets from other domains.
                  Raw Passage     Comp w/ Phi        CoLoR*
                                                                                                                            Raw Passage     Comp w/ Phi            CoLoR*
                  Perf.   Comp.   Perf.   Comp.   Perf.   Comp.
                                                                        Training                       Evaluation           Perf.   Comp.   Perf.   Comp.      Perf.   Comp.
  Fact-checking                                                         Fact-                          Multi-document
  FEVER           0.95    1.00x   0.95    1.83x   0.95    2.14x         checking                       HotPotQA             0.85    1.00x   0.85    1.21x      0.87    1.36x
  SciFact         0.71    1.00x   0.71    1.78x   0.73    2.13x                                        MuSiQue              0.35    1.00x   0.41    1.39x      0.40    1.54x
                                                                                                       QAMPARI              0.56    1.00x   0.55    1.33x      0.56    1.48x
  Average         0.83    1.00x   0.83    1.81x   0.84    2.14x                                        QUEST                0.33    1.00x   0.31    2.03x      0.32    2.33x
  Multi-document                                                                                       Argument
  HotpotQA       0.85     1.00x   0.85    1.21x   0.87    1.36x                                        ArguAna              0.28    1.00x   0.27    2.26x      0.33    2.72x
                                                                                                       Touché-2020          0.76    1.00x   0.79    3.79x      0.82    4.56x
  MuSiQue        0.35     1.00x   0.41    1.39x   0.40    1.54x
                                                                                                       Average              0.52    1.00x   0.53    2.00x      0.55    2.33x
  QAMPARI        0.56     1.00x   0.55    1.33x   0.56    1.48x
  QUEST          0.33     1.00x   0.31    2.03x   0.32    2.33x         Multi-                         Fact-checking
                                                                        document                       FEVER                0.95    1.00x   0.95    1.83       0.95     2.14
  Average         0.52    1.00x   0.53    1.49x   0.54    1.68x                                        SciFact              0.71    1.00x   0.71    1.78x      0.73    2.13x
  Argument                                                                                             Argument
                                                                                                       ArguAna              0.28    1.00x   0.27    2.26x      0.33    2.73x
  ArguAna         0.28    1.00x   0.27    2.26x   0.34    2.73x                                        Touché-2020          0.76    1.00x   0.79    3.79x      0.82    4.65x
  Touché-2020     0.76    1.00x   0.79    3.79x   0.79    4.66x
                                                                                                       Average              0.61    1.00x   0.61    2.34x      0.63    2.81x
  Average         0.52    1.00x   0.53    3.03x   0.57    3.70x
                                                                                                    0.75
                                                                                                               GPT     CoLoR (Ours)
                                                                                                    0.70       Raw
sion rate that reduces the input size by a factor of                                                           Passage COMPACT



                                                                            Retrieval Performance
                                                                                                    0.65           LLMLingua
1.91, while also improving retrieval performance
by 6%, compared to the standard approach with                                                       0.60
                                                                                                                        Selective Context (0.6)
raw passages. Also, our CoLoR provides the su-                                                      0.55               RECOMP
perior quality compressed passages for retrieval,                                                   0.50
                                                                                                                                     Selective Context (0.3)
compared to extractive and abstractive compression
                                                                                                    0.45
models. For instance, when compared with extrac-                                                           1            2           3           4              5
                                                                                                                               Compression Rate
tive methods (Selective Context and LLMLingua),
                                                                      Figure 3: The trade-off of different methods, showing their
CoLoR consistently demonstrates better retrieval                      compression rate (x-axis) and retrieval performance (y-axis).
performance. In addition to this, even against the
strong proprietary and open-source models (such
                                                                      trieval category) and evaluating its performance on
as GPT and Phi3), CoLoR excels, particularly in
                                                                      datasets from other domains (other retrieval cate-
terms of the compression rate, highlighting the limi-
                                                                      gories). As shown in Table 3, the results demon-
tations of relying on prompting techniques to gener-
                                                                      strate that our model generalizes (even in this chal-
ate compressed passages for retrieval. Lastly, when
                                                                      lenging setting of) across different domains.
compared with multi-document compression meth-
ods such as RECOMP and COMPACT, our CoLoR                             Trade Off Between Compression Rate and Re-
significantly outperforms them in the retrieval per-                  trieval Performance To examine the trade-off
formance with the similar compression rate, which                     between the compression rate and retrieval perfor-
further confirms the necessity of task-specific train-                mance, we visualize and analyze them in Figure 3.
ing for passage compression for LCLM retrieval.                       First of all, we observe that, while extremely high
                                                                      compression rates (such as those achieved by using
Results on Out-of-Domain Datasets To assess                           the compression ratio of 0.3 with the Selective Con-
the generalizability of our compression approach                      text baseline) drastically reduce the input size, they
(CoLoR) on datasets not seen for training, we eval-                   also lead to significant information loss (potentially
uate its performance in out-of-domain settings by                     due to the removal of crucial information for re-
excluding a set of datasets from each retrieval cate-                 trieval), resulting in the retrieval performance drop
gory (such as fact-checking, multi-document, and                      of 20 on average compared to using the raw pas-
argument) from the training process and testing on                    sages. This observation highlights the critical trade-
them. As shown in Table 2, we observe that CoLoR                      off between compression and performance: simply
consistently enhances retrieval performance while                     maximizing compression for efficiency compro-
significantly reducing the input context size, which                  mises accuracy. In contrast, the proposed CoLoR
demonstrates the ability of our CoLoR to general-                     effectively balances this trade-off, ensuring that the
ize across diverse retrieval tasks and datasets. We                   reduction in context size does not sacrifice criti-
further conduct experiments by training CoLoR on                      cal information, thanks to our training strategy that
a single domain (i.e., datasets from the same re-                     guides the model to prefer the compressed passages

                                                                  7
Table 4: Analysis on computational costs of compression                                              Table 5: Results with varying the base LMs for CoLoR,
strategies across different methods on the FIQA dataset.                                             namely Phi3, Mistral, and Llama. Note that Average indicates
                                                                                                     the average performance across all 9 datasets. Please refer to
                                                          # of          Time                         Table 12 for results on other datasets.
  Methods                                Base Models                            R@1      Comp.
                                                        Params.        (Secs)
  Comp. w/ Phi                           Phi3 mini        3.8B       1485.63    0.68     2.31x                            FIQA              SciFact          MuSiQue           Average
  COMPACT                                Mistral 7B       7.3B       3473.95    0.48     2.56x
                                                                                                                   R@1 Comp. R@1 Comp. F1@5 Comp. Perf. Comp.
  CoLoR (Ours)                           Phi3 mini        3.8B       1290.82    0.73     2.82x
                                                                                                       Phi3 mini       0.68     2.31x     0.71    1.78x     0.41    1.39x 0.68 1.63x
                                                                                                       + CoLoR         0.67     2.82x     0.75    2.12x     0.42    1.55x 0.72 1.91x
                             0.85                            Compressed Passage (Ours)                 Mistral 7B 0.60          1.55x     0.73    1.46x     0.39    1.09x 0.69 1.21x
                             0.80                            Raw Passage                               + CoLoR 0.63             3.07x     0.80    3.03x     0.40    1.71x 0.71 2.25x
                                                             Document Title
     Retrieval Performance




                                                                                                       Llama 3.2       0.58     2.19x     0.70    2.17x     0.39    1.63x 0.69 1.84x
                             0.75                                                                      + CoLoR         0.61     2.83x     0.72    3.03x     0.39    1.71x 0.69 2.15x

                             0.70
                                                                                                     Table 6: Results of an ablation study, where SFT refers to
                             0.65                                                                    supervised fine-tuning, and ORPO w/ Reg refers to our full
                             0.60                                                                    CoLoR model with the dynamic regularization term. Average
                                                                                                     indicates the average performance across all 9 datasets.
                                    0%       20%       40%       60%      80% 100%
                                               Normalized Position in Corpus                                             MS MARCO            MuSiQue           QUEST            Average
                                                                                                                        R@1      Comp.     F1@5    Comp.    F1@3    Comp.    Perf.   Comp.
Figure 4: Results with varying the position of (compressed)
passages associated with the query within the corpus, where                                           Base Model         0.92     1.41x    0.41     1.39x    0.31    2.03x   0.71    1.63x
                                                                                                      + SFT              0.88     1.42x    0.39     1.39x    0.32    2.18x   0.72    1.65x
0% (on the x-axis) represents beginning.                                                              + ORPO             0.94     1.59x    0.40     1.53x    0.31    2.31x   0.71    1.86x
                                                                                                      + ORPO w/ Reg.     0.95     1.41x    0.42     1.55x    0.33    2.39x   0.72    1.91x


of successful retrieval over the ones with unsuccess-
ful retrieval (while enforcing brevity as well).                                                     ods. Yet, interestingly, our proposed compression
                                                                                                     method (CoLoR) mitigates the lost-in-the-middle
Analysis on Compression Process In Table 4,                                                          issue, since it not only filters out irrelevant informa-
on the same hardware constraint, we find that our                                                    tion within passages during compression but also
CoLoR is faster in compressing the full corpus of                                                    allows for a more compact use of the input context.
the FIQA dataset (which takes around 20 minutes)
than other compression approaches, but also, with                                                    CoLoR with Different LMs To see whether the
the compressed passages from CoLoR, we achieve                                                       proposed CoLoR is versatile across different under-
the superior retrieval performance and compression                                                   lying LMs in generating compressed passages, we
ratio. Specifically, COMPACT has a longer com-                                                       vary them with three different LMs: Phi-3-mini-4k-
pression time, as it adopts an iterative approach to                                                 instruct, Mistral-7B-Instruct-v0.3, and Llama-3.2-
compress the text. In contrast, the compression pro-                                                 3B-Instruct. Then, as shown in Table 5, we observe
cess with CoLoR requires minimal computational                                                       the consistent improvements of our CoLoR in both
burdens. We also note that the passage compres-                                                      compression rate and retrieval performance across
sion is a highly efficient process in terms of LCLM                                                  all models. This demonstrates that CoLoR and its
retrieval, as it can be performed only once, and its                                                 training methodology is not limited to a specific
outputs are reused (and cached) in inference.                                                        model but can be effectively generalized to others.
                                                                                                     We provide results with all datasets in Table 12.
Analysis on Passage Position In Figure 4, we
analyze the position of passages within the input                                                    Ablation Study To see the effectiveness of each
context (associated with the query in the same con-                                                  component of our CoLoR, we perform an ablation
text), to see the potential lost-in-the-middle prob-                                                 study and present the results in Table 6. First of
lem (Liu et al., 2024b) in the context of LCLM re-                                                   all, we observe that, while Supervised Fine-Tuning
trieval: the retrieval performance can be decreased                                                  (SFT) yields strong retrieval performance, the com-
if the relevant passages to the query are placed                                                     pression rate remains comparable to the untrained
in the middle of the input sequence. To measure                                                      method. On the other hand, by utilizing preference
this, we place documents at intervals of 0%, 20%,                                                    optimization with Odds Ratio Preference Optimiza-
40%, 60%, 80%, and 100% across the input cor-                                                        tion (ORPO), we observe an improved compression
pus, and compare three different approaches: Raw                                                     rate, though this comes with a slight performance
Passage, Document Title, and our CoLoR. Then,                                                        degradation. However, the proposed dynamic reg-
similar to the finding in Liu et al. (2024b), placing                                                ularization term (for compressed passage length)
documents towards the middle leads to a certain                                                      mitigates this trade-off, further improving both the
level of performance degradation across all meth-                                                    compression ratio and retrieval performance, reaf-

                                                                                                 8
Table 7: Results of different retrieval approaches with raw and compressed passages. In the first couple of columns, Types
refers to retrieval types, and Formats refers to corpus formats. Average indicates the performance over all 9 datasets.

                                           FEVER                  MS MARCO             HotpotQA             Average
     Types        Formats              R@1         Comp.      R@1         Comp.     F1@2     Comp.      Perf.   Comp.

     BM25         Raw Passage          0.93        1.00x      0.78        1.00x      0.82     1.00x     0.67     1.00x
                  Comp. w/ GPT         0.91        1.74x      0.78        1.39x      0.80     1.20x     0.64     1.56x
                  CoLoR (Ours)         0.91        2.15x      0.70        1.63x      0.77     1.37x     0.62     1.91x
     DPR          Raw Passage          0.89        1.00x      0.85        1.00x      0.79     1.00x     0.61     1.00x
                  Comp. w/ GPT         0.89        1.74x      0.85        1.39x      0.77     1.20x     0.62     1.56x
                  CoLoR (Ours)         0.91        2.15x      0.88        1.63x      0.81     1.37x     0.63     1.91x
     LCLM         CoLoR (Ours)         0.94        2.15x      0.95        1.63x      0.86     1.37x     0.72     1.91x


Table 8: Manual evaluation results on three sampled pas-              to ones in the raw passages, with randomly sam-
sages per dataset. We report the average number of total facts
(Facts), query-supportive facts (Sup. Facts), the proportion of       pled three examples from each of all datasets with
supportive facts to total facts (Ratio), and the token count.         two individual annotators. As shown in Table 8,
                                                                      while the total number of facts in the compressed
   Methods           Facts   Sup. Facts    Ratio     Tokens
                                                                      passages decreases, the number of query-relevant
   Raw Passages     14.13       1.91       13.52     210.93
   CoLoR (Ours)      9.26       1.74       18.80     93.41
                                                                      facts is only slightly reduced (from 1.91 to 1.74
                                                                      per passage on average). Also, when we look at
                                                                      the proportion of relevant facts to total facts (Ra-
firming the overall efficacy of our proposed CoLoR                    tio), this proportion increases, indicating that the
approach in both the efficiency and effectiveness.                    compressed passages contain a higher density of
More detailed results are in Table 13 of Appendix.                    query-related atomic facts (while the proportion
                                                                      of noisy, query-irrelevant information is reduced),
Adaptation of CoLoR to Conventional Retrieval                         which may support the performance improvement
In Table 7, we investigate how using compressed                       of our CoLoR. Additionally, we provide the case
passages impacts the performance of conventional                      study on the compressed passages in Figure 14.
sparse and dense retrievers, as they can bring an
additional benefit of faster indexing thanks to the re-               6   Conclusion
duced passage length. First, for the sparse retriever
(BM25), performance tends to decrease when us-                        In this work, we introduced Compression for Long
ing compressed passages, likely due to the loss of                    Context Langauge Model Retrieval (CoLoR), a
lexical information that BM25 relies on to match                      method specifically designed to improve efficiency
documents based on exact lexical similarities. In                     and effectiveness of LCLM retrieval by transition-
contrast, the dense retriever (DPR) shows perfor-                     ing from raw to compressed passages. Specifically,
mance improvements with compressed passages.                          the proposed CoLoR, trained with the synthesized
We conjecture that this might be because the un-                      preference data (based on retrieval outcomes of the
derlying LM for dense retrieval already contains                      compressed passages) and regularization loss for
much of the passage’s information within its pa-                      their lengths, optimizes both brevity and retrieval
rameters, and, as a result, compressing the passage                   performance. Through our extensive experiments
still retains essential details in making valuable rep-               conducted across 9 datasets spanning single- and
resentations for it while additionally filtering out                  multi-document retrieval tasks, we demonstrated
irrelevant content (that might lead to noise in em-                   that CoLoR not only achieves a 6% improvement
bedding). However, despite these gains in dense re-                   in retrieval performance but also reduces context
trieval with the proposed CoLoR, the performance                      size by a factor of 1.91 over the standard LCLM
of LCLM retrieval coupled with CoLoR is substan-                      retrieval, which further surpasses existing text com-
tially better than conventional retrieval methods.                    pression methods. These highlight the significant
                                                                      advantage of compressed passages to enhance ef-
Qualitative Analysis with Manual Evaluation                           ficiency for LCLM retrieval by reducing the com-
To see whether query-relevant information is pre-                     putational load and its associated costs, all while
served after passage compression, we manually                         even improving retrieval accuracy, making it more
compare atomic facts in the compressed passages                       scalable and practical for real-world applications.

                                                                  9
Limitations                                                    No. RS-2022-II220713, Meta-learning Applicable
                                                               to Real-world Problems).
While our proposed CoLoR approach demonstrates
significant advantages in LCLM retrieval, there are
still areas that future work may explore. First, fol-          References
lowing the LCLM retrieval benchmark setup (Lee                 Marah Abdin, Jyoti Aneja, Hany Awadalla, Ahmed
et al., 2024), our experiments are conducted with               Awadallah, Ammar Ahmad Awan, Nguyen Bach,
a maximum context length of 128K tokens, and,                   Amit Bahree, Arash Bakhtiari, Jianmin Bao, Harkirat
while this context length is indeed very large and              Behl, Alon Benhaim, Misha Bilenko, Johan Bjorck,
                                                                Sébastien Bubeck, Martin Cai, Qin Cai, Vishrav
it has been increasingly extended further, in real-
                                                                Chaudhary, Dong Chen, Dongdong Chen, Weizhu
world applications, the size of the corpus can be               Chen, Yen-Chun Chen, Yi-Ling Chen, Hao Cheng,
much larger (even after utilizing our compression               Parul Chopra, Xiyang Dai, Matthew Dixon, Ro-
method), which may necessitate further modifica-                nen Eldan, Victor Fragoso, Jianfeng Gao, Mei Gao,
tions of the overall LCLM retrieval framework. Yet,             Min Gao, Amit Garg, Allie Del Giorno, Abhishek
                                                                Goswami, Suriya Gunasekar, Emman Haider, Jun-
developing the new process for LCLM retrieval is                heng Hao, Russell J. Hewett, Wenxiang Hu, Jamie
beyond the scope of our work and we leave it as                 Huynh, Dan Iter, Sam Ade Jacobs, Mojan Javaheripi,
future work. Another consideration is the compres-              Xin Jin, Nikos Karampatziakis, Piero Kauffmann,
sion process: it introduces an additional step before           Mahoud Khademi, Dongwoo Kim, Young Jin Kim,
                                                                Lev Kurilenko, James R. Lee, Yin Tat Lee, Yuanzhi
retrieval; however, this is not a big deal as it only           Li, Yunsheng Li, Chen Liang, Lars Liden, Xihui
needs to be performed once as like the indexing                 Lin, Zeqi Lin, Ce Liu, Liyuan Liu, Mengchen Liu,
process of sparse and dense retrieval approaches.               Weishung Liu, Xiaodong Liu, Chong Luo, Piyush
                                                                Madan, Ali Mahmoudzadeh, David Majercak, Matt
                                                                Mazzola, Caio César Teodoro Mendes, Arindam Mi-
Ethics Statement                                                tra, Hardik Modi, Anh Nguyen, Brandon Norick,
                                                                Barun Patra, Daniel Perez-Becker, Thomas Portet,
It is worth noting that, similar to any other retrieval         Reid Pryzant, Heyang Qin, Marko Radmilac, Liliang
approaches, the retrieval corpus may contain harm-              Ren, Gustavo de Rosa, Corby Rosset, Sambudha Roy,
ful or offensive content, and the compressed pas-               Olatunji Ruwase, Olli Saarikivi, Amin Saied, Adil
sages could potentially reflect these biases. Also,             Salim, Michael Santacroce, Shital Shah, Ning Shang,
                                                                Hiteshi Sharma, Yelong Shen, Swadheen Shukla, Xia
additional biases may be induced during the train-              Song, Masahiro Tanaka, Andrea Tupini, Praneetha
ing process of LCLMs. Although addressing these                 Vaddamanu, Chunyu Wang, Guanhua Wang, Lijuan
concerns are obviously beyond the scope of our                  Wang, Shuohang Wang, Xin Wang, Yu Wang, Rachel
work, we acknowledge the importance of imple-                   Ward, Wen Wen, Philipp Witte, Haiping Wu, Xiaoxia
                                                                Wu, Michael Wyatt, Bin Xiao, Can Xu, Jiahang Xu,
menting the safeguards in future research to ensure
                                                                Weijian Xu, Jilong Xue, Sonali Yadav, Fan Yang,
that the retrieval process remains safe and fair.               Jianwei Yang, Yifan Yang, Ziyi Yang, Donghan Yu,
                                                                Lu Yuan, Chenruidong Zhang, Cyril Zhang, Jianwen
Acknowledgements                                                Zhang, Li Lyna Zhang, Yi Zhang, Yue Zhang, Yunan
                                                                Zhang, and Xiren Zhou. 2024. Phi-3 technical report:
This work was supported by the National Research                A highly capable language model locally on your
                                                                phone. Preprint, arXiv:2404.14219.
Foundation of Korea (NRF) grant funded by the Ko-
rea government (MSIT) (No. RS-2023-00256259),                  Samuel Amouyal, Tomer Wolfson, Ohad Rubin, Ori
the grant of the Korea Machine Learning Ledger                   Yoran, Jonathan Herzig, and Jonathan Berant. 2023.
Orchestration for Drug Discovery Project (KMEL-                  QAMPARI: A benchmark for open-domain questions
                                                                 with many answers. In Proceedings of the Third
LODDY) funded by the Ministry of Health & Wel-                   Workshop on Natural Language Generation, Evalua-
fare and Ministry of Science and ICT, Republic                   tion, and Metrics (GEM), pages 97–110, Singapore.
of Korea (grant number: RS-2024-12345678), the                   Association for Computational Linguistics.
Artificial intelligence industrial convergence clus-
                                                               Chenxin An, Shansan Gong, Ming Zhong, Xingjian
ter development project funded by the Ministry                   Zhao, Mukai Li, Jun Zhang, Lingpeng Kong, and
of Science and ICT (MSIT, Korea) & Gwangju                       Xipeng Qiu. 2024. L-eval: Instituting standardized
Metropolitan City, and the Institute for Informa-                evaluation for long context language models. In Pro-
tion & communications Technology Planning &                      ceedings of the 62nd Annual Meeting of the Associa-
                                                                 tion for Computational Linguistics (Volume 1: Long
Evaluation (IITP) grant funded by the Korea gov-                 Papers), ACL 2024, Bangkok, Thailand, August 11-
ernment (MSIT) (RS-2019-II190075, Artificial In-                 16, 2024, pages 14388–14411. Association for Com-
telligence Graduate School Program (KAIST), and                  putational Linguistics.


                                                          10
Anthropic. 2024. The claude 3 model family: Opus,                2020 Conference on Empirical Methods in Natural
  sonnet, haiku.                                                 Language Processing, EMNLP 2020, Online, Novem-
                                                                 ber 16-20, 2020, pages 6769–6781. Association for
Yushi Bai, Xin Lv, Jiajie Zhang, Hongchang Lyu,                  Computational Linguistics.
  Jiankai Tang, Zhidian Huang, Zhengxiao Du, Xiao
  Liu, Aohan Zeng, Lei Hou, Yuxiao Dong, Jie Tang,             Yekyung Kim, Yapei Chang, Marzena Karpinska,
  and Juanzi Li. 2024. Longbench: A bilingual, multi-            Aparna Garimella, Varun Manjunatha, Kyle Lo,
  task benchmark for long context understanding. In              Tanya Goyal, and Mohit Iyyer. 2024. Fables: Evaluat-
  Proceedings of the 62nd Annual Meeting of the As-              ing faithfulness and content selection in book-length
  sociation for Computational Linguistics (Volume 1:             summarization. Preprint, arXiv:2404.01261.
  Long Papers), ACL 2024, Bangkok, Thailand, Au-
  gust 11-16, 2024, pages 3119–3137. Association for           Tom Kwiatkowski, Jennimaria Palomaki, Olivia Red-
  Computational Linguistics.                                     field, Michael Collins, Ankur P. Parikh, Chris Alberti,
                                                                 Danielle Epstein, Illia Polosukhin, Jacob Devlin, Ken-
Parishad BehnamGhader, Vaibhav Adlakha, Marius                   ton Lee, Kristina Toutanova, Llion Jones, Matthew
  Mosbach, Dzmitry Bahdanau, Nicolas Chapados, and               Kelcey, Ming-Wei Chang, Andrew M. Dai, Jakob
  Siva Reddy. 2024. Llm2vec: Large language mod-                 Uszkoreit, Quoc Le, and Slav Petrov. 2019. Natu-
  els are secretly powerful text encoders. Preprint,             ral questions: a benchmark for question answering
  arXiv:2404.05961.                                              research. Trans. Assoc. Comput. Linguistics, 7:452–
                                                                 466.
Iz Beltagy, Matthew E. Peters, and Arman Cohan.
   2020. Longformer: The long-document transformer.            Jinhyuk Lee, Anthony Chen, Zhuyun Dai, Dheeru
   Preprint, arXiv:2004.05150.                                    Dua, Devendra Singh Sachan, Michael Boratko,
                                                                  Yi Luan, Sébastien M. R. Arnold, Vincent Perot, Sid-
Amanda Bertsch, Maor Ivgi, Emily Xiao, Uri Alon,
                                                                  dharth Dalmia, Hexiang Hu, Xudong Lin, Panupong
 Jonathan Berant, Matthew R. Gormley, and Graham
                                                                  Pasupat, Aida Amini, Jeremy R. Cole, Sebastian
 Neubig. 2025. In-context learning with long-context
                                                                  Riedel, Iftekhar Naim, Ming-Wei Chang, and Kelvin
 models: An in-depth exploration. In Proceedings
                                                                  Guu. 2024. Can long-context language models
 of the 2025 Conference of the Nations of the Amer-
                                                                  subsume retrieval, rag, sql, and more? Preprint,
 icas Chapter of the Association for Computational
                                                                  arXiv:2406.13121.
 Linguistics: Human Language Technologies, NAACL
 2025 - Volume 1: Long Papers, Albuquerque, New
                                                               Jiaqi Li, Mengmeng Wang, Zilong Zheng, and Muhan
 Mexico, USA, April 29 - May 4, 2025, pages 12119–
                                                                  Zhang. 2024a. Loogle: Can long-context language
 12149. Association for Computational Linguistics.
                                                                  models understand long contexts? In Proceedings
Jiwoo Hong, Noah Lee, and James Thorne. 2024.                     of the 62nd Annual Meeting of the Association for
   ORPO: monolithic preference optimization without               Computational Linguistics (Volume 1: Long Papers),
   reference model. In Proceedings of the 2024 Con-               ACL 2024, Bangkok, Thailand, August 11-16, 2024,
   ference on Empirical Methods in Natural Language               pages 16304–16333. Association for Computational
   Processing, EMNLP 2024, Miami, FL, USA, Novem-                 Linguistics.
   ber 12-16, 2024, pages 11170–11189. Association
   for Computational Linguistics.                              Tianle Li, Ge Zhang, Quy Duc Do, Xiang Yue,
                                                                 and Wenhu Chen. 2024b.         Long-context llms
Albert Q. Jiang, Alexandre Sablayrolles, Arthur Men-             struggle with long in-context learning. Preprint,
  sch, Chris Bamford, Devendra Singh Chaplot, Diego              arXiv:2404.02060.
  de las Casas, Florian Bressand, Gianna Lengyel, Guil-
  laume Lample, Lucile Saulnier, Lélio Renard Lavaud,          Yucheng Li, Bo Dong, Frank Guerin, and Chenghua Lin.
  Marie-Anne Lachaux, Pierre Stock, Teven Le Scao,               2023. Compressing context to enhance inference ef-
  Thibaut Lavril, Thomas Wang, Timothée Lacroix,                 ficiency of large language models. In Proceedings of
  and William El Sayed. 2023a. Mistral 7b. Preprint,             the 2023 Conference on Empirical Methods in Natu-
  arXiv:2310.06825.                                              ral Language Processing, EMNLP 2023, Singapore,
                                                                 December 6-10, 2023, pages 6342–6353. Association
Huiqiang Jiang, Qianhui Wu, Chin-Yew Lin, Yuqing                 for Computational Linguistics.
  Yang, and Lili Qiu. 2023b. Llmlingua: Compressing
  prompts for accelerated inference of large language          Jiawei Liu, Jia Le Tian, Vijay Daita, Yuxiang Wei,
  models. In Proceedings of the 2023 Conference on                Yifeng Ding, Yuhan Katherine Wang, Jun Yang,
  Empirical Methods in Natural Language Process-                  and Lingming Zhang. 2024a. Repoqa: Evaluat-
  ing, EMNLP 2023, Singapore, December 6-10, 2023,                ing long context code understanding. Preprint,
  pages 13358–13376. Association for Computational                arXiv:2406.06025.
  Linguistics.
                                                               Nelson F. Liu, Kevin Lin, John Hewitt, Ashwin Paran-
Vladimir Karpukhin, Barlas Oguz, Sewon Min, Patrick              jape, Michele Bevilacqua, Fabio Petroni, and Percy
  Lewis, Ledell Wu, Sergey Edunov, Danqi Chen, and               Liang. 2024b. Lost in the middle: How language
  Wen-tau Yih. 2020. Dense passage retrieval for open-           models use long contexts. Trans. Assoc. Comput.
  domain question answering. In Proceedings of the               Linguistics, 12:157–173.


                                                          11
AI @ Meta Llama Team. 2024. The llama 3 herd of                   International Conference on Learning Representa-
  models. Preprint, arXiv:2407.21783.                             tions, ICLR 2024, Vienna, Austria, May 7-11, 2024.
                                                                  OpenReview.net.
Macedo Maia, Siegfried Handschuh, André Freitas,
 Brian Davis, Ross McDermott, Manel Zarrouk, and                Rafael Rafailov, Archit Sharma, Eric Mitchell, Christo-
 Alexandra Balahur. 2018. Www’18 open challenge:                  pher D. Manning, Stefano Ermon, and Chelsea Finn.
 Financial opinion mining and question answering. In              2023. Direct preference optimization: Your language
 Companion of the The Web Conference 2018 on The                  model is secretly a reward model. In Advances in
 Web Conference 2018, WWW 2018, Lyon , France,                    Neural Information Processing Systems 36: Annual
 April 23-27, 2018, pages 1941–1942. ACM.                         Conference on Neural Information Processing Sys-
                                                                  tems 2023, NeurIPS 2023, New Orleans, LA, USA,
Chaitanya Malaviya, Peter Shaw, Ming-Wei Chang,                   December 10 - 16, 2023.
  Kenton Lee, and Kristina Toutanova. 2023. QUEST:
  A retrieval dataset of entity-seeking queries with im-        Nils Reimers and Iryna Gurevych. 2019a. Sentence-
  plicit set operations. In Proceedings of the 61st An-           bert: Sentence embeddings using siamese bert-
  nual Meeting of the Association for Computational               networks. In Proceedings of the 2019 Conference on
  Linguistics (Volume 1: Long Papers), pages 14032–               Empirical Methods in Natural Language Processing
  14047, Toronto, Canada. Association for Computa-                and the 9th International Joint Conference on Nat-
  tional Linguistics.                                             ural Language Processing, EMNLP-IJCNLP 2019,
                                                                  Hong Kong, China, November 3-7, 2019, pages 3980–
Tri Nguyen, Mir Rosenberg, Xia Song, Jianfeng Gao,                3990. Association for Computational Linguistics.
   Saurabh Tiwary, Rangan Majumder, and Li Deng.
   2016. MS MARCO: A human generated machine                    Nils Reimers and Iryna Gurevych. 2019b. Sentence-
   reading comprehension dataset. In Proceedings of               bert: Sentence embeddings using siamese bert-
   the Workshop on Cognitive Computation: Integrat-               networks. In Proceedings of the 2019 Conference on
   ing neural and symbolic approaches 2016 co-located             Empirical Methods in Natural Language Processing
   with the 30th Annual Conference on Neural Infor-               and the 9th International Joint Conference on Nat-
   mation Processing Systems (NIPS 2016), Barcelona,              ural Language Processing, EMNLP-IJCNLP 2019,
   Spain, December 9, 2016, volume 1773 of CEUR                   Hong Kong, China, November 3-7, 2019, pages 3980–
  Workshop Proceedings. CEUR-WS.org.                              3990. Association for Computational Linguistics.
OpenAI. 2024. Gpt-4 technical report.         Preprint,
                                                                Stephen E. Robertson and Hugo Zaragoza. 2009. The
  arXiv:2303.08774.
                                                                   probabilistic relevance framework: BM25 and be-
                                                                  yond. Found. Trends Inf. Retr., 3(4):333–389.
Long Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida,
  Carroll L. Wainwright, Pamela Mishkin, Chong
  Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray,            Nisan Stiennon, Long Ouyang, Jeffrey Wu, Daniel
  John Schulman, Jacob Hilton, Fraser Kelton, Luke                Ziegler, Ryan Lowe, Chelsea Voss, Alec Radford,
  Miller, Maddie Simens, Amanda Askell, Peter Welin-              Dario Amodei, and Paul F Christiano. 2020. Learn-
  der, Paul F. Christiano, Jan Leike, and Ryan Lowe.              ing to summarize with human feedback. In Ad-
  2022. Training language models to follow instruc-               vances in Neural Information Processing Systems,
  tions with human feedback. In Advances in Neural                volume 33, pages 3008–3021. Curran Associates,
  Information Processing Systems 35: Annual Confer-               Inc.
  ence on Neural Information Processing Systems 2022,
  NeurIPS 2022, New Orleans, LA, USA, November 28               Gemini Team. 2024. Gemini 1.5: Unlocking multi-
  - December 9, 2022.                                             modal understanding across millions of tokens of
                                                                  context. Preprint, arXiv:2403.05530.
Adam Paszke, Sam Gross, Francisco Massa, Adam
  Lerer, James Bradbury, Gregory Chanan, Trevor                 Nandan Thakur, Nils Reimers, Andreas Rücklé, Ab-
  Killeen, Zeming Lin, Natalia Gimelshein, Luca                   hishek Srivastava, and Iryna Gurevych. 2021. BEIR:
  Antiga, Alban Desmaison, Andreas Köpf, Edward Z.                A heterogenous benchmark for zero-shot evalua-
  Yang, Zachary DeVito, Martin Raison, Alykhan Te-                tion of information retrieval models. arXiv preprint
  jani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang,             arXiv:2104.08663, abs/2104.08663.
  Junjie Bai, and Soumith Chintala. 2019. Pytorch: An
  imperative style, high-performance deep learning li-          James Thorne,       Andreas Vlachos,        Christos
  brary. In Advances in Neural Information Processing             Christodoulopoulos, and Arpit Mittal. 2018.
  Systems 32: Annual Conference on Neural Informa-                FEVER: a large-scale dataset for fact extraction
  tion Processing Systems 2019, NeurIPS 2019, De-                 and verification. In Proceedings of the 2018
  cember 8-14, 2019, Vancouver, BC, Canada, pages                 Conference of the North American Chapter of the
  8024–8035.                                                      Association for Computational Linguistics: Human
                                                                  Language Technologies, NAACL-HLT 2018, New
Bowen Peng, Jeffrey Quesnelle, Honglu Fan, and En-                Orleans, Louisiana, USA, June 1-6, 2018, Volume
  rico Shippole. 2024. Yarn: Efficient context window             1 (Long Papers), pages 809–819. Association for
  extension of large language models. In The Twelfth              Computational Linguistics.


                                                           12
Harsh Trivedi, Niranjan Balasubramanian, Tushar Khot,            Brussels, Belgium, October 31 - November 4, 2018,
  and Ashish Sabharwal. 2022. MuSiQue: Multi-                    pages 2369–2380. Association for Computational
  hop questions via single-hop question composition.             Linguistics.
  Transactions of the Association for Computational
  Linguistics, 10:539–554.                                     Chanwoong Yoon, Taewhoo Lee, Hyeon Hwang, Min-
                                                                 byul Jeong, and Jaewoo Kang. 2024. CompAct:
David Wadden, Shanchuan Lin, Kyle Lo, Lucy Lu                    Compressing retrieved documents actively for ques-
  Wang, Madeleine van Zuylen, Arman Cohan, and                   tion answering. In Proceedings of the 2024 Confer-
  Hannaneh Hajishirzi. 2020. Fact or fiction: Verifying          ence on Empirical Methods in Natural Language Pro-
  scientific claims. In Proceedings of the 2020 Con-             cessing, pages 21424–21439, Miami, Florida, USA.
  ference on Empirical Methods in Natural Language               Association for Computational Linguistics.
  Processing, EMNLP 2020, Online, November 16-20,
  2020, pages 7534–7550. Association for Computa-              Tao Yuan, Xuefei Ning, Dong Zhou, Zhijie Yang,
  tional Linguistics.                                            Shiyao Li, Minghui Zhuang, Zheyue Tan, Zhuyu
                                                                 Yao, Dahua Lin, Boxun Li, Guohao Dai, Shengen
Chonghua Wang, Haodong Duan, Songyang Zhang,                     Yan, and Yu Wang. 2024. Lv-eval: A balanced long-
  Dahua Lin, and Kai Chen. 2024. Ada-leval: Evalu-               context benchmark with 5 length levels up to 256k.
  ating long-context llms with length-adaptable bench-           Preprint, arXiv:2402.05136.
  marks. In Proceedings of the 2024 Conference of
  the North American Chapter of the Association for            Yao Zhao, Rishabh Joshi, Tianqi Liu, Misha Khalman,
  Computational Linguistics: Human Language Tech-                Mohammad Saleh, and Peter J. Liu. 2023. Slic-hf:
  nologies (Volume 1: Long Papers), NAACL 2024,                  Sequence likelihood calibration with human feed-
  Mexico City, Mexico, June 16-21, 2024, pages 3712–             back. Preprint, arXiv:2305.10425.
  3724. Association for Computational Linguistics.
                                                               Dawei Zhu, Liang Wang, Nan Yang, Yifan Song, Wen-
Zhiruo Wang, Jun Araki, Zhengbao Jiang, Md Rizwan                hao Wu, Furu Wei, and Sujian Li. 2024. Longembed:
  Parvez, and Graham Neubig. 2023. Learning to filter            Extending embedding models for long context re-
  context for retrieval-augmented generation. Preprint,          trieval. In Proceedings of the 2024 Conference on
  arXiv:2311.08377.                                              Empirical Methods in Natural Language Processing,
                                                                 EMNLP 2024, Miami, FL, USA, November 12-16,
Thomas Wolf, Lysandre Debut, Victor Sanh, Julien                 2024, pages 802–816. Association for Computational
  Chaumond, Clement Delangue, Anthony Moi, Pier-                 Linguistics.
  ric Cistac, Tim Rault, Rémi Louf, Morgan Funtowicz,
  Joe Davison, Sam Shleifer, Patrick von Platen, Clara
  Ma, Yacine Jernite, Julien Plu, Canwen Xu, Teven Le
  Scao, Sylvain Gugger, Mariama Drame, Quentin
  Lhoest, and Alexander M. Rush. 2020. Transformers:
  State-of-the-art natural language processing. In Pro-
  ceedings of the 2020 Conference on Empirical Meth-
  ods in Natural Language Processing: System Demon-
  strations, EMNLP 2020 - Demos, Online, November
  16-20, 2020, pages 38–45. Association for Computa-
  tional Linguistics.

Fangyuan Xu, Weijia Shi, and Eunsol Choi. 2024a. RE-
  COMP: improving retrieval-augmented lms with con-
  text compression and selective augmentation. In The
  Twelfth International Conference on Learning Rep-
  resentations, ICLR 2024, Vienna, Austria, May 7-11,
  2024. OpenReview.net.

Peng Xu, Wei Ping, Xianchao Wu, Lawrence McAfee,
  Chen Zhu, Zihan Liu, Sandeep Subramanian, Evelina
  Bakhturina, Mohammad Shoeybi, and Bryan Catan-
  zaro. 2024b. Retrieval meets long context large lan-
  guage models. In The Twelfth International Con-
  ference on Learning Representations, ICLR 2024,
  Vienna, Austria, May 7-11, 2024. OpenReview.net.

Zhilin Yang, Peng Qi, Saizheng Zhang, Yoshua Ben-
  gio, William W. Cohen, Ruslan Salakhutdinov, and
  Christopher D. Manning. 2018. Hotpotqa: A dataset
  for diverse, explainable multi-hop question answer-
  ing. In Proceedings of the 2018 Conference on Em-
  pirical Methods in Natural Language Processing,


                                                          13
Table 9: Statistics of the data samples generated for preference                        Table 11: Results on the long context retrieval benchmark.
optimization for training CoLoR, which includes the number                                                       NQ       2WikimQA    NarrativeQA    Average
of samples per dataset, and the average length of reject and                                                 R@1 Comp. R@1 Comp. R@1 Comp. R@1 Comp.
chosen tokens. † denotes multi-document retrieval datasets.
                                                                                           Raw Passage        0.92 1.00x 0.42 1.00x 0.22 1.00x 0.52 1.00x
    Dataset        # of Samples    Avg. Rejected Token        Avg. Chosen Token            Compressed Passage 0.95 63.02x 0.72 29.64x 0.56 555.93x 0.74 216.2x

    FEVER              483                  236.19                 152.63
    FIQA               455                  148.15                 88.22
    MS MARCO          1061                   76.06                  51.3
    NQ                 635                  158.16                 111.67
                                                                                       Torch (Paszke et al., 2019), Transformers (Wolf
    SciFact            198                  229.84                 156.26              et al., 2020), SentenceTransformers (Reimers and
    HotPotQA†          544                   93.52                  71.11
    MuSiQue†            12                  107.58                   80.5              Gurevych, 2019a), and BEIR (Thakur et al., 2021).
    QAMPARI†            30                  107.23                  82.77
                                                                                       Also, BM25 is implemented using a python library
    Total             3418                  135.61                  91.36
                                                                                       rank_bm252 , while, for DPR, we use a BEIR frame-
Table 10: Statistics of the benchmark retrieval datasets for                           work3 . Other baselines are sourced from publicly
experiments. † denotes multi-document retrieval datasets.                              available checkpoints on their repositories45 .
                                    Avg.          Avg. Comp.
  Dataset        # of Passage                                     Comp. Ratio
                                Passage Token    Passage Token
                                                                                       Datasets Details In Table 9, we provide the statis-
  FEVER              588            169               78.60          2.15
  FIQA               531            190               67.43          2.82              tics of the data samples that we create for training
  MS MARCO          1,174            76               46.76          1.63
  NQ                 883            104               64.07          1.62              our compression model (CoLoR). Note that, among
  SciFact            357            291              137.03          2.12
  HotPotQA†         1,222            69               50.43          1.37              all samples, we randomly use 3,077 samples for
  MuSiQue†           824            112               72.22          1.55
  QAMPARI†           755            125               83.26          1.50
                                                                                       training and 341 samples for validation. Also, Ta-
  QUEST†             328            325              135.77          2.39
                                                                                       ble 10 summarizes the retrieval datasets. We fol-
  Average          740.22          162.33            81.73           1.91
                                                                                       low the experimental setup from the LOFT bench-
                                                                                       mark (Lee et al., 2024), ensuring that the number
A         Additional Experimental Setups                                               of passages included in the LCLM context matches
Data Collection Details We collect compressed                                          those in Lee et al. (2024). For all experiments, we
versions of passages to train CoLoR. The diversity                                     use GPT-4o-mini as the underlying LCLM, which
of the compressed passages (including good and                                         supports a context length of 128K tokens.
bad ones) is crucial to construct data for preference
optimization, and to ensure this, we prompt differ-                                    B        Additional Experimental Results
ent LLMs, such as Phi-3-mini-4k-instruct (Abdin                                        Results on Long Context Retrieval Benchmark
et al., 2024), Mistral-7B-Instruct-v0.3 (Jiang et al.,                                 We further evaluate our CoLoR on the long con-
2023a), and Llama-3.2-3B-Instruct (Llama Team,                                         text retrieval scenario, including two long context
2024), and GPT-4o-mini (OpenAI, 2024), with                                            question-answering datasets from the LongEmbed
the same prompt: Summarize the following                                               benchmark (Zhu et al., 2024) as well as the origi-
content: {passage}.                                                                    nal corpus for the Natural Questions (NQ) dataset6 .
Fine-tuning Details For Supervised Fine-Tuning                                         To enable comparisons between different methods,
(SFT), we use a learning rate of 5e-6. Similarly,                                      the raw passages are truncated (as the context size
for ORPO with Phi and Llama, we use λ of 2.5                                           with original raw passages exceeds its limit) and
and a learning rate of 1e-6, while, for Mistral, we                                    the compressed passages are generated using GPT-
change the learning rate to 5e-6. Also, all models                                     4o-mini (prompted to create summaries under 200
are trained for 10 epochs with a batch size of 8, and                                  words)7 . Then, as shown in Table 11, the compres-
the best epoch is selected based on the validation                                     sion model reduces passage size by 216.2×, while
set. Lastly, we use the TRL library1 for training.                                     increasing Recall@1 by 42%, compared to using
                                                                                       (truncated) raw passages, which further strengths
Computational Resources We perform training                                            the effectiveness of our compression paradigm, par-
and inference on all baselines and our model by                                        ticularly in handling lengthy passages.
using one of the NVIDIA RTX A6000 and NVIDIA                                                2
RTX A5000 GPUs, depending on their availability.                                             https://github.com/dorianbrown/rank_bm25
                                                                                            3
                                                                                             https://github.com/beir-cellar/beir
With those GPUs, the time required to train our                                            4
                                                                                             https://huggingface.co/cwyoon99/CompAct-7b
model over 10 epochs ranges from 3 to 5 hours.                                             5
                                                                                             https://github.com/liyucheng09/Selective_Context
                                                                                           6
                                                                                             https://github.com/google-research-datasets/natural-
Deep Learning Libraries In our experiments,                                            questions
                                                                                           7
we utilize the following deep learning libraries: Py-                                        Due to the excessive length of passages for these datasets,
                                                                                       training CoLoR on them is not feasible within our computa-
     1
         https://github.com/huggingface/trl                                            tional resources, and we leave this as a future work.


                                                                                  14
Table 12: Full results with all datasets by varying the base LM for CoLoR. † indicates multi-document retrieval datasets, and
* denotes out-of-domain datasets (that are not used for training CoLoR).
                            FEVER                    FIQA             MS MARCO                    NQ               SciFact
          Methods       R@1        Comp.          R@1       Comp.     R@1        Comp.     R@1      Comp.       R@1     Comp.

          Phi3 mini      0.95          1.83x      0.68      2.31x     0.92       1.41x     0.99        1.39x    0.71    1.78x
          + CoLoR        0.94          2.15x      0.73      2.82x     0.95       1.63x     0.98        1.62x    0.75    2.12x
          Mistral 7B     0.96          1.36x      0.58      1.55x     0.90       0.98x     0.98        1.01x    0.70    1.46x
          + CoLoR        0.96          2.51x      0.63      3.07x     0.91       1.66x     0.98        1.78x    0.80    3.03x
          Llama 3.2      0.96          2.03x      0.35      2.19x     0.52       1.47x     0.95        1.68x    0.71    2.17x
          + CoLoR        0.95          2.30x      0.61      2.83x     0.86       2.76x     0.99        1.91x    0.72    2.64x

                          HotPotQA†                MuSiQue†              QAMPARI†            QUEST†*               Average
          Methods       F1@2       Comp.          F1@5      Comp.     F1@5       Comp.     F1@3     Comp.       Perf.   Comp.

          Phi3 mini      0.85          1.21x      0.41      1.39x     0.55       1.33x     0.31        2.03x    0.68    1.63x
          + CoLoR        0.86          1.37x      0.42      1.55x     0.55       1.50x     0.33        2.39x    0.72    1.91x
          Mistral 7B     0.83          0.92x      0.39      1.09x     0.55       1.07x     0.32        1.46x    0.69    1.21x
          + CoLoR        0.85          1.43x      0.40      1.71x     0.56       1.68x     0.33        3.35x    0.71    2.25x
          Llama 3.2      0.84          1.42x      0.39      1.63x     0.52       1.64x     0.31        2.33x    0.69    1.84x
          + CoLoR        0.85          1.55x      0.40      1.84x     0.54       1.83x     0.30        2.68x    0.69    2.15x

Table 13: Full results of the ablation study with all datasets. † denotes multi-document retrieval datasets, and * indicates
out-of-domain datasets (not used for training CoLoR). SFT refers to supervised fine-tuning, and ORPO w/ Reg denotes CoLoR.
                                  FEVER                   FIQA            MS MARCO                 NQ               SciFact
          Methods            R@1          Comp.     R@1       Comp.      R@1      Comp.     R@1        Comp.    R@1     Comp.

          Base Model            0.95      1.83x      0.68     2.31x       0.92     1.41x    0.99        1.39x    0.71   1.78x
          + SFT                 0.95      1.82x      0.67     2.28x       0.88     1.42x    0.99        1.42x    0.80   1.83x
          + ORPO                0.94      2.11x      0.64     2.75x       0.94     1.59x    0.99        1.59x    0.74   2.05x
          + ORPO w/ Reg         0.94      2.15x      0.73     2.82x       0.95     1.63x    0.98        1.62x    0.75   2.12x

                                 HotPotQA†               MuSiQue†         QAMPARI†            QUEST†*               Average
          Methods           F1@2          Comp.     F1@5      Comp.      F1@5     Comp.     F1@3       Comp.    Perf.   Comp.

          Base Model            0.85      1.21x      0.41     1.39x       0.55     1.33x    0.23        2.03x    0.71   1.63x
          + SFT                 0.88      1.22x      0.39     1.39x       0.57     1.33x    0.32        2.18x    0.72   1.65x
          + ORPO                0.85      1.35x      0.40     1.53x       0.54     1.48x    0.31        2.31x    0.71   1.86x
          + ORPO w/ Reg         0.86      1.37x      0.42     1.55x       0.55     1.50x    0.33        2.39x    0.72   1.91x


Full Results on Analyses In Table 12 and Ta-
ble 13, we provide the full results of varying the
base LM and the ablation study with all datasets, re-
spectively. Also, we provide the results of analysis
on passage position with all datasets in Figure 5.
Case Study We provide the case study on the
compressed passages generated by different ap-
proaches in Table 14, which shows that the com-
pressed passages from our CoLoR tend to leading
to the retrieval success and tend to be shorter.
Prompt Details For the prompt construction, we
follow the Corpus-in-Context prompting approach
from prior work (Lee et al., 2024). An example
prompt for the NQ dataset is provided in Table 15,
and, for more examples and details on the prompt,
please refer to Lee et al. (2024).

                                                                    15
                       Table 14: Case study on the retrieval sample from the FIQA dataset.
Methods
                                                                Passage                                                       Prediction
(# of Tokens)
Query           If an index goes up because an underlying company issues more shares, what happens to the ETF
                If a stock that makes up a big part of the Dow Jones Industrial Average decided to issue a huge
                number of additional shares, that will make the index go up. At least this is what should happen,
                since an index is basically a sum of the market cap of the contributing companies. No, indices
                can have various weightings. The DJIA is a price-weighted index not market-cap weighted. An
                alternative weighting besides market-cap and price is equal weighting. From Dow Jones: Dow Jones
                Industrial Average2̆122. Introduced in May 1896, the index, also referred to as The Dow0̆0ae, is a
                price-weighted measure of 30 U.S. blue-chip companies. Thus, I can wonder what in the new shares
Raw Passage
                makes the index go up? If a stock is split, the Dow divisor is adjusted as one could easily see how           325818 ✗
(315)
                the current Dow value isn’t equal to the sum or the share prices of the members of the index. In
                other cases, there may be a dilution of earnings but that doesn’t necessarily affect the stock price
                directly as there may be options exercised or secondary offerings made. SO if the index, goes up,
                will the ETF DIA also go up automatically although no additional buying has happened in the ETF
                itself? If the index rises and the ETF doesn’t proportionally, then there is an arbitrage opportunity
                for someone to buy the DIA shares that can be redeemed for the underlying stocks that are worth
                more in this case. Look at the Creation and Redemption Unit process that exists for ETFs.
                The Dow Jones Industrial Average (DJIA) is a price-weighted index of 30 U.S. blue-chip companies,
                meaning its value is based on the share prices of its components rather than their market capitaliza-
                tions. If a major stock in the DJIA issues a large number of new shares, the index should theoretically
                rise, but adjustments like the Dow divisor may affect this relationship. When a stock splits, for
Comp. w/ GPT    example, the divisor is adjusted to maintain the index’s integrity. If the index increases, it raises the
                                                                                                                              325818 ✗
(185)           question of whether the corresponding ETF (DIA) will also rise automatically, despite no new buying
                in the ETF. If the ETF’s price doesn’t align proportionally with the index’s increase, it may create an
                arbitrage opportunity, allowing traders to profit by redeeming DIA shares for the underlying, more
                valuable stocks. Understanding the creation and redemption unit process is essential for grasping
                this dynamic.
                The content discusses how the Dow Jones Industrial Average (DJIA) index, a price-weighted measure
                of 30 U.S. blue-chip companies, can be affected by the issuance of additional shares by a major
                company. It explains that the index value may not directly reflect the sum of the share prices due to
Comp. w/ Phi
                adjustments in the Dow divisor. The content also addresses the relationship between the DJIA index            325818 ✗
(138)
                and the ETF DIA, stating that if the index rises but the ETF doesn’t proportionally, there may be an
                arbitrage opportunity for someone to buy DIA shares and redeem them for the underlying stocks that
                are worth more. The creation and redemption process of ETFs is briefly mentioned."
                a stock that the IndustrialAverage to a of that will . least what, since is a market the., can have various
                The index. Aning. From: Average™. in index also as Dowed ., can what the new shares is the Dow
                is adjusted as one could see the value’t sum the the members of the index. In other cases, there may
                be a dilution of earnings but that doesn’t necessarily affect the stock price directly as there may be
LLMLingua
                options exercised or secondary offerings made. SO if the index, goes up, will the ETF DIA also go             325818 ✗
(189)
                up automatically although no additional buying has happened in the ETF itself? If the index rises
                and the ETF doesn’t proportionally, then there is an arbitrage opportunity for someone to buy the
                DIA shares that can be redeemed for the underlying stocks that are worth more in this case. Look at
                the Creation and Redemption Unit process that exists for ETFs.
Selective       of the Dow Jones Industrial Average to of, up. is what happen of of....: Dow Jones Industrial Average
Context (0.3)   in, the to as is of., what up is, isn’t to of of., be ofn’t necessarily the stock price may be. up, up?n’t    482415 ✗
(69)            then is for to buy be for are more. at.
                up a big part of the Dow Jones Industrial Average to a huge number of additional shares, that make
                the index go up. is what happen, is a sum of the market cap of., can. is a price-weighted index
                weighted. and is equal weighting.: Dow Jones Industrial Average in May, the also referred to as
Selective
                is a price-weighted measure of 30 U.S. blue-chip companies., I can what go up? is, is as see the
Context (0.6)                                                                                                                 418150 ✓
                current Dow valuen’t equal to the sum the share prices of the members of the index., there may be a
(175)
                dilution of that doesn’t necessarily affect the stock price as there may be or made. up, will go up has
                happened in the ETF itself? andn’t then there is an arbitrage opportunity for to buy be redeemed for
                the underlying stocks that are more in this case. at for
                The Dow Jones Industrial Average (DJIA) or "Dow 30" is a price-weighted average of 30 significant
                stocks traded on the New York Stock Exchange (NYSE) and the Nasdaq. The DJIA is one of the
COMPACT         most widely followed equity indices. The DJIA is calculated by summing the individual prices of
                                                                                                                              325818 ✗
(116)           the 30 stocks in the index, then dividing that total by a divisor. If a stock that makes up a big part
                of the Dow Jones Industrial Average decided to issue a huge number of additional shares, that will
                make the index go up.
                A stock issuing additional shares can cause the Dow Jones Industrial Average (DJIA) to rise due to
                its price-weighted nature. However, the DJIA’s value isn’t directly equal to the sum of its member
CoLoR (Ours)
                stocks’ prices. In cases of stock splits or dilution of earnings, the Dow divisor is adjusted. If the         418150 ✓
(103)
                DJIA rises and the ETF DIA doesn’t proportionally increase, there’s an arbitrage opportunity for
                someone to buy DIA shares and redeem them for the underlying stocks worth more.



                                                               16
                                                              Compressed Passage (Ours)
                                         1.0

                                         0.8

                 Retrieval Performance   0.6

                                         0.4

                                         0.2

                                         0.0
                                                 0%   20%         40%               60%              80%   100%
                                                               Normalized Position in Corpus
                                                            SciFact        HotpotQA             QUEST
                                                            NQ             MuSiQue              Average
                                                            FEVER          QAMPARI

                                                                      Raw Passage
                                         1.0

                                         0.8
                 Retrieval Performance




                                         0.6

                                         0.4

                                         0.2

                                         0.0
                                                 0%   20%         40%               60%              80%   100%
                                                               Normalized Position in Corpus
                                                            SciFact        HotpotQA             QUEST
                                                            NQ             MuSiQue              Average
                                                            FEVER          QAMPARI

                                                                      Document Title
                                           1.0

                                           0.8
                   Retrieval Performance




                                           0.6

                                           0.4

                                           0.2

                                           0.0
                                                 0%   20%          40%               60%             80%   100%
                                                                Normalized Position in Corpus
                                                            SciFact         HotpotQA            QUEST
                                                            NQ              MuSiQue             Average
                                                            FEVER           QAMPARI

Figure 5: Results with varying the position of (compressed) passages for all datasets. Specifically, we arbitrarily adjust the
positions of the gold and few-shot passages within the corpus relative to the query (0% represents the beginning). The figures at
the top, middle, and bottom represent the results with CoLoR, raw passage, and document title, respectively.



                                                                         17
Table 15: Example of corpus-in-context prompting for the NQ dataset, following Lee et al. (2024). The input is categorized by
type, with all types being provided as input to the LCLM for retrieval.

  Types

                       You will be given a list of documents. You need to read carefully and understand all of them. Then you will be
                       given a query, and your goal is to find all documents from the list that can help answer the query. Print out the
                       ID and TITLE of each document.

                       Your final answer should be a list of IDs, in the following format:
  Instruction
                       Final Answer: [id1, id2, ...]
                       If there is only one ID, it should be in the format:
                       Final Answer: [id1]

                       If there is no perfect answer output the closest one. Do not give an empty final answer.
                       ID: 0 | TITLE: English compound | CONTENT: Major style guides advise consulting a dictionary to determine
                       whether . . . | END ID: 0
                       ID: 1 | TITLE: The Lord of the Rings: The Return of the King | CONTENT: The music was composed by
  Corpus               Howard Shore . . . | END ID: 1
  Formatting           ...
                       ID: 881 | TITLE: Dexter (season 3) | CONTENT: While stalking a murderous drug dealer . . . | END ID: 881
                       ID: 882 | TITLE: Interstellar medium | CONTENT: In the series of investigations . . . | END ID: 882
                       ====== Example 1 ======
                       Which document is most relevant to answer the query? Print out the TITLE and ID of the document. Then
                       format the IDs into a list.
                       If there is no perfect answer output the closest one. Do not give an empty final answer.
  Few-shot             query: where did the dewey decimal system come from
  Examples             The following documents can help answer the query:
                       TITLE: Dewey Decimal Classification | ID: 199
                       Final Answer: [’199’]
                       ...
                       ====== Now let’s start! ======
                       Which document is most relevant to answer the query? Print out the TITLE and ID of the document. Then
                       format the IDs into a list.
  Query Formatting
                       If there is no perfect answer output the closest one. Do not give an empty final answer.
                       query: when does monday night raw come on hulu
                       The following documents can help answer the query:




                                                                  18
