diff --git a/radarenhancingradiologyreportgenerationwithsupplementaryknowledgeinjection/8b840976-be89-429b-a54d-844857c7238e_content_list.json b/radarenhancingradiologyreportgenerationwithsupplementaryknowledgeinjection/8b840976-be89-429b-a54d-844857c7238e_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..beec8ec2bdc2c09dbaea727290defdd59b9cdd7c --- /dev/null +++ b/radarenhancingradiologyreportgenerationwithsupplementaryknowledgeinjection/8b840976-be89-429b-a54d-844857c7238e_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fd941ac1bc6926525bbc66a560ca7c01a6ff614879d2e998eb66dec17086f61b +size 106101 diff --git a/radarenhancingradiologyreportgenerationwithsupplementaryknowledgeinjection/8b840976-be89-429b-a54d-844857c7238e_model.json b/radarenhancingradiologyreportgenerationwithsupplementaryknowledgeinjection/8b840976-be89-429b-a54d-844857c7238e_model.json new file mode 100644 index 0000000000000000000000000000000000000000..01f86b1bc9bf88b0afdf57915cef9e7e9978edbb --- /dev/null +++ b/radarenhancingradiologyreportgenerationwithsupplementaryknowledgeinjection/8b840976-be89-429b-a54d-844857c7238e_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f1c98ee926ea5cad02166e5c8db1e59b98628bf5056598e17081d6f0afbcd98d +size 129114 diff --git a/radarenhancingradiologyreportgenerationwithsupplementaryknowledgeinjection/8b840976-be89-429b-a54d-844857c7238e_origin.pdf b/radarenhancingradiologyreportgenerationwithsupplementaryknowledgeinjection/8b840976-be89-429b-a54d-844857c7238e_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5de74baaf0438538aa5ef27abe1b853ab8234d96 --- /dev/null +++ b/radarenhancingradiologyreportgenerationwithsupplementaryknowledgeinjection/8b840976-be89-429b-a54d-844857c7238e_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:07e9f3617dd90b813a763aa7d49182c1f14c8106153d4764db143ade1a4a4975 +size 2168671 diff --git a/radarenhancingradiologyreportgenerationwithsupplementaryknowledgeinjection/full.md b/radarenhancingradiologyreportgenerationwithsupplementaryknowledgeinjection/full.md new file mode 100644 index 0000000000000000000000000000000000000000..4bd9e6195cf5506a48d8512d2fcec42f7f1b8b3a --- /dev/null +++ b/radarenhancingradiologyreportgenerationwithsupplementaryknowledgeinjection/full.md @@ -0,0 +1,394 @@ +# RADAR: Enhancing Radiology Report Generation with Supplementary Knowledge Injection + +Wenjun Hou $^{1,2}$ , Yi Cheng $^{1*}$ , Kaishuai Xu $^{1*}$ , Heng Li $^{2}$ , Yan Hu $^{2\dagger}$ , Wenjie Li $^{1}$ , Jiang Liu $^{2,3\dagger}$ + +$^{1}$ Department of Computing, The Hong Kong Polytechnic University + +$^{2}$ Research Institute of Trustworthy Autonomous Systems and Department of Computer Science and Engineering, + +Southern University of Science and Technology + +$^{3}$ School of Computer Science, University of Nottingham Ningbo China + +houwenjun060@gmail.com + +# Abstract + +Large language models (LLMs) have demonstrated remarkable capabilities in various domains, including radiology report generation. Previous approaches have attempted to utilize multimodal LLMs for this task, enhancing their performance through the integration of domain-specific knowledge retrieval. However, these approaches often overlook the knowledge already embedded within the LLMs, leading to redundant information integration. To address this limitation, we propose RADAR, a framework for enhancing radiology report generation with supplementary knowledge injection. RADAR improves report generation by systematically leveraging both the internal knowledge of an LLM and externally retrieved information. Specifically, it first extracts the model's acquired knowledge that aligns with expert image-based classification outputs. It then retrieves relevant supplementary knowledge to further enrich this information. Finally, by aggregating both sources, RADAR generates more accurate and informative radiology reports. Extensive experiments on MIMIC-CXR, CHEXPERT-PLUS, and IU X-RAY demonstrate that our model outperforms state-of-the-art LLMs in both language quality and clinical accuracy $^1$ . + +# 1 Introduction + +Radiology report generation (Chen et al., 2020, 2021) plays a crucial role in chest X-ray interpretation, requiring highly specialized domain knowledge (Jain et al., 2021; Irvin et al., 2019). Recent advances in foundation models (Pellegrini et al., 2023; Chen et al., 2024; Hyland et al., 2024), which leverage large language models (LLMs) for enhanced medical image analysis, have demonstrated + +![](images/1e03665be410c1bd28210f651b3b82a0ce8cf67b82a48c978341661866e2a185.jpg) +Figure 1: A motivating example. The report directly generated by the multimodal LLM showcases its knowledge regarding several findings $(O_R)$ but can contain hallucinations and overlook some other findings. To address this, we regard the part that aligns with another expert model $(O_R \cap O_I)$ as trustworthy and we incorporate supplementary knowledge for the remaining part $(\mathcal{O} - O_R \cap O_I)$ to enhance the report generation. + +remarkable potential in generating fluent and cohesive clinical text, aiding radiologists in their diagnostic workflow. + +Despite their ability to generate highly readable and clinically plausible report content, LLMs still face persistent challenges in ensuring clinical accuracy. One major challenge lies in the knowledge gap between the medical and general domains. Many studies have attempted to bridge this disparity by augmenting models with retrieved domain-specific knowledge (Yang et al., 2021; Liu et al., + +2021; Li et al., 2023c; Ranjit et al., 2023; Sun et al., 2025). However, these approaches often overlook the knowledge LLMs have already acquired. That is, much of the retrieved information is often duplicate knowledge already encoded within the model's parameters, leading to redundant information retrieval. Moreover, the knowledge learned by LLMs (Liu et al., 2024) is not always trustworthy, as hallucinations frequently occur (Huang et al., 2025). For instance, in Figure 1, the LLM correctly identifies Cardiomegaly, making the retrieval of additional knowledge about this observation unnecessary. Additionally, the generated Pleural Effusion is highly credible, as it aligns with the expert model, whereas Edema remains uncertain. Thus, balancing learned and retrieved knowledge in radiology report generation is crucial to address these challenges. + +In this paper, we propose RADAR, a framework for RADlology report generation that integrates both the internal knowledge of LLMs and external supplement ARy knowledge. Our framework primarily consists of two stages: preliminary findings generation and supplementary findings augmentation. In the first stage, RADAR generates an initial report from the input images. Subsequently, an expert model processes the images for observation classification. The overlapping information between the generated report and the classified observations is identified as high-confidence internal knowledge. In the second stage, RADAR additionally retrieves new knowledge to supplement the internal knowledge. Finally, both internal and supplementary knowledge sources are aggregated to enhance the report generation process. Our main contributions can be summarized as follows: + +- We propose RADAR, a novel framework that enhances the clinical accuracy of radiology report generation by effectively integrating both the internal knowledge of LLMs and externally retrieved domain-specific knowledge. +- To optimize knowledge utilization, we introduce a knowledge extraction method that identifies and retains non-overlapping information from the model's learned knowledge, reducing redundancy and bridging the knowledge gap. +- We conduct extensive experiments on three benchmark datasets: MIMIC-CXR, CHEXPERT-PLUS, and IU X-RAY, demonstrating the effectiveness of RADAR. + +# 2 Preliminary + +# 2.1 Problem Formulation + +A multimodal LLM (MLLM) generally consists of a vision encoder, a vision connector that transforms visual signals into the language space (e.g., MLP (Liu et al., 2023), Q-Former (Li et al., 2023b), or Perceiver Resampler (Xue et al., 2024)), and an LLM, as illustrated in the left part of Figure 2. For radiology report generation $^2$ , the MLLM takes a radiograph $X$ , its prior $X_{p}$ (if available), and the clinical context $C$ (e.g., Indication or Prior Findings) as input and generates the report $Y = \{y_{1}, \dots, y_{T}\}$ . The probability of the $t$ -th token is computed as follows: + +$$ +p (y _ {t}) = \operatorname {M L L M} (X, X _ {p}, C, y _ {< t}), +$$ + +where the MLLM is optimized using the negative log-likelihood loss: + +$$ +\mathcal {L} = - \sum_ {t = 1} ^ {T} \log p (y _ {t}). +$$ + +# 2.2 Semi-Structured Report as Knowledge + +In this paper, the training set of MIMIC-CXR serves as the knowledge source for radiology report generation. To effectively leverage the knowledge encoded in each report, we convert it into semi-structured data. Specifically, given a report consisting of $N$ sentences, $Y = \{S_{1},\dots ,S_{N}\}$ , we annotate each sentence using the 14-category CheXpert observations (Irvin et al., 2019) with the CheXbert model (Smit et al., 2020). Each observation falls into one of four classes: Positive, Negative, Uncertain, or Blank. To ensure conciseness, we retain only sentences annotated with Positive observations. These selected sentences collectively represent the knowledge extracted from the report, as illustrated in the top-right part of Figure 2. Note that we annotate and process Preliminary Findings ( $\S 3.1$ ) and Supplementary Findings ( $\S 3.2$ ) in the same manner. + +# 3 The RADAR Framework + +# 3.1 Stage I: Preliminary Findings Generation + +We illustrate the Stage I process in the left part of Figure 2. To assess the learned knowledge of an + +![](images/c91634318f55cef70831c90ed0cc87e4ac1c7cd97fc9f3368b35f7c5b000482a.jpg) +Stage I: Preliminary Findings Generation +Stage II: Supplement Findings Augmentation +Figure 2: Overview of the RADAR. In Preliminary Findings, only sentences that reach agreement are retained, whereas in Supplementary Findings, only sentences that supplement the Preliminary Findings are preserved. + +LLM, we first feed the input $(X,X_{p},$ and $C)$ into RADAR to generate a report $\hat{Y}$ .. + +$$ +\hat {Y} = \underset {\hat {Y} \in \mathcal {Y}} {\operatorname {a r g m a x}} \prod_ {t = 1} ^ {T} \mathrm {M L L M} (X, X _ {p}, C, \hat {y} _ {< t}), +$$ + +where $\mathcal{V}$ represents the set of possible reports. Note that exact maximization is intractable and we employ an approximate decoding algorithm for generation. Next, we convert the findings into semistructured knowledge, as described in §2.2, and denote the observations of $\hat{Y}$ as $O_{R}$ . + +To extract credible knowledge from $\hat{Y}$ while filtering out untrustworthy information, we train an expert model that predicts observations for the image. Unlike previous works (Hou et al., 2023b; Pellegrini et al., 2023), which consider only the image as input, we incorporate the clinical context to enhance performance. Specifically, the expert model $f(X)$ encodes $X$ and $C$ using an image encoder $\mathrm{Encoder}_v$ and a text encoder $\mathrm{Encoder}_t$ , respectively, and then processes their outputs through an MLP for observation classification: + +$$ +\mathbf {h} _ {v} = \operatorname {E n c o d e r} _ {v} (X), \quad \mathbf {h} _ {t} = \operatorname {E n c o d e r} _ {t} (C), +$$ + +$$ +p (O _ {i}) = \sigma (\mathrm {M L P} ([ \mathbf {h} _ {v}; \mathbf {h} _ {t} ])), +$$ + +where $[;]$ is the concatenation function, $\mathbf{h}_v$ and $\mathbf{h}_t$ are the pooled outputs of the image and text encoders, respectively, and $p(O_i)$ represents the probability of the $i$ -th observation. We denote the observations derived from $f(X)$ as $O_I$ , and the credible and high-confidence observations, $O_{\checkmark}$ , are then obtained by intersecting $O_I$ and $O_R$ , as follows: + +$$ +O _ {\checkmark} = O _ {I} \cap O _ {R}. +$$ + +Finally, we refine $\hat{Y}$ by removing sentences that do not correspond to $O_{\checkmark}$ , yielding the Preliminary Findings (PF). + +To train the expert model, we collect observations from each report as image annotations and optimize the expert model using binary cross-entropy loss. Following Pellegrini et al. (2023), we address data imbalance by re-weighting the positive observations with a log-scale weight, defined as $\alpha_{i} = \log \left(1 + \frac{|\mathcal{D}_{\mathrm{train}}|}{w_{i}}\right)$ , where $|\mathcal{D}_{\mathrm{train}}|$ is the total number of training samples and $w_{i}$ denotes the frequency of observation $O_{i}$ . + +# 3.2 Stage II: Supplementary Findings Augmentation + +Supplementary Knowledge Retrieval. We follow the retrieval process of Yang et al. (2021) to search + +for domain knowledge. Specifically, the expert model described in §3.1 produces probabilities for 14 observations, and we compute the similarity between different samples using KL-divergence: + +$$ +\hat {z} = \mathrm {N o r m a l i z e} (f (X)), +$$ + +$$ +\operatorname {S i m} (X, X _ {i}) = - \sum_ {j = 1} ^ {| \mathcal {O} |} \hat {z} _ {j} \log \frac {\hat {z} _ {j}}{\hat {z} _ {i , j}}, +$$ + +where $\mathrm{Normalize}(\cdot)$ normalizes $f(X)$ to 1, $\hat{z}$ represents the normalized scores for $(X)$ , and $\hat{z}_{i,j}$ denotes the score of the $j$ -th observation in the $i$ -th sample from the database (i.e., the training set of the MIMIC-CXR dataset). We then rank the samples based on their similarity scores, $\mathrm{Sim}(X,X_i)$ , and retrieve the top- $K$ reports, denoted as $\mathcal{Y}^S = \{Y_1^S,\dots ,Y_K^S\}$ . + +Supplementary Knowledge Extraction. Since the retrieved information may overlap with the knowledge learned by LLMs, we extract only supplementary knowledge based on two principles: (1) it should be concise and relevant, and (2) it should complement, rather than duplicate, the preliminary findings. Thus, for each supplementary report $Y_{i}^{S}$ with its corresponding observations $O^{S}$ , we retain only the following observations: + +$$ +O _ {\delta} = \mathcal {O} - O _ {\checkmark}. +$$ + +Next, we convert $Y_{i}^{S}$ into semi-structured knowledge and remove sentences that do not correspond to $O_{\delta}$ , referring to these findings as Supplementary Findings (SF). Notably, all sentences corresponding to negative observations are removed, ensuring that SF remains concise and clinically relevant. + +# 3.3 Enhanced Radiology Report Generation + +We integrate both PF and SF into the clinical context $C$ to form the augmented context $C^A$ , from which the final report $Y$ is generated as: + +$$ +Y = \operatorname *{argmax}_{Y\in \mathcal{Y}}\prod_{t = 1}^{T}\mathrm{MLM}(X,X_{p},C^{A},y_{< t}). +$$ + +Since PF and SF contain information from various studies, summarizing high-level information before generating the report is necessary. Thus, we include the observations of $Y$ as part of the training targets. Specifically, during training, $Y$ is converted into a structured format: + +$$ +Y ^ {O} = \left\{O _ {1}, \dots , O _ {N}, y _ {1}, \dots , y _ {L} \right\}, +$$ + +where $\{O_1,\ldots ,O_N\}$ represents the observations in $Y$ , and $\{y_{1},\dots ,y_{L}\}$ corresponds to the tokens of the report. We refer to this process as Observation Identification (OI). During inference, we extract the final report from the generated output for evaluation. + +# 4 Experiments + +# 4.1 Datasets + +We evaluate our model using three publicly available radiology report generation datasets: MIMIC-CXR $^3$ (Johnson et al., 2019), CHEXPERT PLUS $^4$ (Chambon et al., 2024), and IU X-RAY $^5$ (Demner-Fushman et al., 2016): + +- MIMIC-CXR contains 377,110 chest radiographs and 227,827 reports. We use this dataset for fine-tuning, and we include only frontal images in our experiments. The number of samples in the train, validation, and test sets is 162,955, 1,286, and 2,461, respectively. +- CHEXPERT PLUS comprises 223,462 unique radiology reports and chest X-ray pairs from 187,711 studies. We evaluate our model using only frontal images from the validation set, which includes 62 samples. +- IU X-RAY is a dataset collected by Indiana University. Following Bannur et al. (2024), we use all frontal images for evaluation, totaling 3,199 studies. + +# 4.2 Evaluation Metrics + +Lexical Metrics. Following previous research (Chen et al., 2020; Li et al., 2023c), BLEU-1/4 (Papineni et al., 2002), ROUGE-L (Lin, 2004), and METEOR (Banerjee and Lavie, 2005) are adopted for evaluating the languages of generated outputs. + +Clinical Metrics. We evaluate the factual accuracy using several metrics. Specifically, $\mathrm{RG - F_1}$ and $\mathrm{RG}_{\overline{\mathrm{ER}} (\mathrm{ER})}$ (Jain et al., 2021) evaluate the entity-level factuality and RadCliQ0 (Yu et al., 2022), denoted as $\mathrm{CliQ_0}$ , aligns with the preference of radiologists. For observation evaluation, $^{14}\mathrm{MacroF_1}$ $(^{14}\mathrm{Ma - F_1})$ and $^{14}\mathrm{Micro - F_1}$ $(^{14}\mathrm{Mi - F_1})$ evaluate the macro and micro $\mathbf{F}_1$ of 14 observations (refers to Table 7), respectively. In addition, $^{5}\mathrm{Macro - F_1}$ + +Dataset: MIMIC-CXR (Training and Evaluation) + +
ModelLexical MetricsClinical Metrics (CheXpert: Uncertain as Negative / Positive)
B-1B-4MTRR-LRG-F1RGERClicQ0(↓)14Ma-F15Ma-F114Mi-F15Mi-F1
RadFM-0.128-0.182-------
XrayGPT0.1280.0040.0790.111-------
R2GenGPT0.4110.1340.1600.297---0.389---
R2-LLM0.4020.1280.1750.291-------
RaDialog0.3460.0950.1400.271---0.394---
LLaVA-Med0.3540.1490.3530.2760.1910.2383.300.2690.3630.4270.439
CheXagent0.1690.047-0.215-0.205-0.2470.3450.3930.412
GPT-4V0.1640.178-0.132-0.132-0.2040.1960.3550.258
Med-PaLM0.3230.115-0.2750.267--0.3980.5160.5360.579
LLaVA-Rad0.3810.154-0.306-0.294-0.3950.4770.5730.574
MAIRA-10.3920.1420.3330.2890.2430.2963.100.3860.4770.5570.560
0.4230.5170.5530.588
MAIRA-20.4650.2340.4200.3840.3460.3962.640.4160.5040.5810.591
MedVerse-0.178--0.280-2.71----
M4CXR0.3390.103--0.2180.285-0.4000.4950.6060.618
Libra0.5130.2450.4890.3670.3290.3762.700.4040.5380.5590.601
RADAR (Ours)0.5090.2620.4500.3970.3460.3932.610.4600.5670.6270.653
0.4970.6020.6270.674
+ +Table 1: Evaluation results of our model and baseline methods on the MIMIC-CXR dataset. Baseline results are cited from their respective literature. The best results are shown in bold, while underlined values indicate the second-best results. $\downarrow$ denotes that lower values are better. Results of CheXpert treat Uncertain labels as Positive when compared with MAIRA-1. Comparisons with SOTA specialists are provided in Table 8. + +
Dataset: IU X-RAY (Evaluation Only)
ModelLexicalClinical
B-4R-LRG-F1ClicQ0(↓)14Ma-F114Mi-F1
LLaVA-Rad-0.253---0.535
MAIRA-20.1170.2740.2712.680.3190.525
RADAR (Ours)0.1160.2760.2372.780.3250.546
BACKBONE0.1120.2750.2362.790.2690.514
+ +$(^{5}\mathrm{Ma - F_{1}})$ and ${}^{5}\mathrm{Micro - F_{1}}$ $(^{5}\mathrm{Mi - F_{1}})$ measure the performance of 5 common observations (Atelectasis, Cardiomegaly, Consolidation, Edema, and Pleural Effusion). Two lines of CheXpert results are reported, i.e., Uncertain as Negative and Uncertain as Positive. + +# 4.3 Baselines + +On the MIMIC-CXR dataset, we compare our models with the state-of-the-art (SOTA) MLLMs, including RadFM (Wu et al., 2023), XrayGPT (Thawakar et al., 2024), LLaVA-Med (Li et al., 2023a), R2GenGPT (Wang et al., 2023b), R2-LLM (Liu et al., 2024), RaDialog (Pellegrini et al., 2023), CheXagent (Chen et al., 2024), GPT-4V (OpenAI, 2023), LLaVA-Rad (Chaves et al., 2024), MedPaLM (Singhal et al., 2022), MAIRA-1 (Hyland + +Table 2: Evaluation on the IU X-RAY dataset. Results of LLaVA-Rad and MAIRA-2 are cited from Bannur et al. (2024). + +
Dataset: CHEXPERT PLUS (Evaluation Only)
ModelTrainLexicalRGER(ER)Clinical14(5)Ma-F114(5)Mi-F1
B-4R-L
SWINv2-BERTM*0.0340.1910.136 (0.198)0.268 (0.383)0.410 (0.423)
C0.0570.2280.183 (0.250)0.331 (0.401)0.508 (0.432)
M&C0.0560.2340.201 (0.277)0.366 (0.495)0.560 (0.532)
RADAR (Ours)M0.0760.2030.143 (0.216)0.362 (0.417)0.541 (0.524)
0.401 (0.540)0.554 (0.608)
BACKBONEM0.0730.2030.143 (0.206)0.282 (0.437)0.477 (0.466)
0.317 (0.502)0.492 (0.552)
+ +Table 3: Evaluation on the CHEXPERT PLUS dataset. The results for $\mathrm{SWIN}_{\mathrm{V2}}$ -BERT are cited from Chambon et al. (2024), and we primarily compare RADAR with its $\star$ variant. The "Train" column indicates the training datasets, where M and C denote the MIMIC-CXR and CHEXPERT PLUS datasets, respectively. + +et al., 2024), MAIRA-2 (Bannur et al., 2024), MedVerse (Zhou et al., 2024), M4CXR (Park et al., 2024), and Libra (Zhang et al., 2024). Other SOTA specialists are in the Appendix A.1. We also compare RADAR with LLaVA-Rad and MAIRA-2 on the IU X-RAY dataset. On the CHEXPERT-PLUS dataset, we compare RADAR with the baseline $\mathrm{SWIN}_{\mathrm{V2}}$ -BERT (Chambon et al., 2024) consisting of a Swin Transformer V2 (Liu et al., 2022) and a BERT decoder (Devlin et al., 2019). The $\mathrm{SWIN}_{\mathrm{V2}}$ -BERT model has three variants, each trained on a different dataset: the MIMIC-CXR dataset, the CHEXPERT PLUS dataset, and a combined version + +
ModelModulesLexical MetricsClinical Metrics (CheXpert: Uncertain as Negative)
PFSFOIB-1B-4MTRR-LRG-F1\(RG_{ER}\)\(C_iQ_0\)(↓)\(^{14}Ma-F_1\)\(^{5}Ma-F_1\)\(^{14}Mi-F_1\)\(^{5}Mi-F_1\)
RADAR✓✓✓0.5090.2620.4500.3970.3460.3932.610.4600.5670.6270.653
BACKBONE×××0.4970.2590.4440.3960.3430.3872.670.4020.4950.5650.581
\(RADAR_{w/o F}\)××✓0.5060.2600.4480.3960.3430.3912.630.4420.5450.6240.651
\(RADAR_{w/o SF}\)✓×✓0.5080.2620.4510.3980.3460.3942.620.4470.5430.6260.650
\(RADAR_{w/o PF}\)×✓✓0.5080.2610.4500.3960.3440.3892.630.4560.5590.6230.652
+ +Table 4: Ablation results of RADAR with different modules. Per-observation results of BACKBONE, RADARw/o F, RADARw/o SF, RADARw/o PF, and RADAR are provided in Appendix, Table 7. + +
ModelVisionModules ResamplerLLMLexical MetricsClinical Metrics (CheXpert: Uncertain as Negative)
B-1B-4MTRR-LRG-F1RGERClioQ0(↓)14Ma-F15Ma-F114Mi-F1
BACKBONE✓✓✓0.4970.2590.4440.3960.3430.3872.670.4020.4950.565
BACKBONE-V1X✓X0.4300.1830.3590.3180.2450.2963.150.2840.4150.476
BACKBONE-V2X✓✓0.4830.2460.4280.3810.3210.3682.780.3610.4650.532
+ +Table 5: Ablation results of fine-tuning different modules of BACKBONE. + +
HyperparametersStage IStage II
Trainable ModuleVision Encoder (LoRA) +Perceiver Resampler (Full) +LLM (LoRA)LLM (LoRA)
Training Epoch32
Learning Rate1e-4
OptimizerAdamW
LR SchedulerCosine
Warmup Ratio0.03
LoRA Configr=64,α=128
Batch Size32
+ +Table 6: Detailed hyperparameters for training RADAR. LoRA is used to fine-tune both the vision encoder and the LLM, while the Perceiver Resampler is fully finetuned. + +of both. + +# 4.4 Implementation Details + +Training and Inference. We implement RADAR using BLIP- $3^{6}$ (Xue et al., 2024) as the backbone, which comprises a SigLIP (Zhai et al., 2023) vision encoder, a Perceiver Resampler, and a Phi3-mini $_{3.8\mathrm{B}}$ (Abdin et al., 2024) language model. Our implementation is based on Hugging Face's Transformers library (Wolf et al., 2020). The expert model consists of a Swin Transformer V $^{7}$ (Liu et al., 2022) and a BioClinicalBERT $^{8}$ (Alsentzer et al., 2019). Top-2 reports are selected as knowledge. The hyperparameters used for training RADAR are provided in Table 6. During inference, we employ beam search with a beam width + +of 5 for report generation and set the length penalty to 2.0. As proposed by Xue et al. (2024), BLIP-3 samples vision tokens using a Perceiver Resampler with learned queries and supports images of any resolution, resulting in significant performance gains across multiple tasks. In this paper, we use only the base resolution $(384 \times 384)$ with 128 learned query tokens to ensure a fair comparison with other baselines. For training, in Stage I, we fine-tune all three components (i.e., the vision encoder, the Perceiver Resampler, and the LLM) in BLIP-3 since the model is not specifically designed for medical tasks. In Stage II, we further fine-tune only the LoRA of the LLM to enhance performance. + +Data Preprocessing. Following previous research (Hyland et al., 2024; Bannur et al., 2024; Zhang et al., 2024), we incorporate Indication, History, Comparison, Technique, and Prior Findings as clinical context for the MIMIC-CXR and CHEXPERT PLUS datasets, when available. Since the IU XRAY dataset does not include follow-up studies, we extract only Indication, Comparison, and Technique as clinical context. For a better illustration, we provide the prompt template in Table 9. + +# 5 Results and Analyses + +# 5.1 Quantitative Analysis + +Comparison with MLLMs. As shown in Table 1, RADAR achieves SOTA performance compared to other MLLM baselines. In terms of lexical metrics, RADAR outperforms the best baselines (i.e., Libra and MAIRA-2) with absolute improvements of $1.7\%$ in BLEU-4 and $1.3\%$ in ROUGE-L, while maintaining competitive performance of 0.509 in BLEU-1 and 0.450 in METEOR. Regarding entity + +level clinical metrics, our model achieves the best performance on $\mathrm{RG - F_1}$ and RadCliQ0, attaining scores of 0.346 and 2.61, respectively. Additionally, RADAR surpasses the top baselines, achieving improvements across multiple observation-level clinical metrics, with $^{14}\mathrm{Macro - F_1}$ increasing to 0.460, $^{5}\mathrm{Macro - F_1}$ to 0.567, $^{14}\mathrm{Micro - F_1}$ to 0.627, and $^{5}\mathrm{Micro - F_1}$ to 0.653, respectively. Notably, the smallest gain over the second-best model is $2.1\%$ , underscoring RADAR's effectiveness. Furthermore, we provide an additional set of CheXpert results using the Uncertain as Positive policy and compare RADAR with MAIRA-1. We observe that the improvements under this setting follow a similar trend to those obtained with the Uncertain as Negative policy. These results collectively demonstrate the effectiveness of RADAR in generating coherent and clinically accurate radiology reports. + +Comparison with SOTA Specialists. The results of other specialists are shown in Table 8. We find that models incorporating clinical context (e.g., Indication) as input generally achieve better performance than others. For example, the Controllable model significantly outperforms other baselines across both lexical and clinical metrics. This trend also holds for MLLMs, as shown in Table 1. Moreover, benefiting from the strong contextual comprehension and language generation capabilities of LLMs, RADAR further improves linguistic quality, which requires models to integrate diverse information sources. However, we observe that the $^{14}\mathrm{Macro - F_1}$ score of our model still lags behind that of the Controllable baseline (0.497 vs. 0.553). This discrepancy may stem from differences in learning objectives, as this baseline treats Uncertain cases as Positive. + +Model Generalization. Following prior research (Bannur et al., 2024), we further evaluate RADAR on the CHEXPERT PLUS and IU X-RAY datasets to assess its generalization capability. The results are presented in Table 2 and Table 3. On the IU X-RAY dataset, RADAR outperforms MAIRA-2 in terms of CheXpert metrics, achieving a $^{14}$ Macro- $\mathrm{F_1}$ of 0.325 and a $^{14}$ Micro- $\mathrm{F_1}$ of 0.546. However, a performance gap remains in RG- $\mathrm{F_1}$ and RadCliQ0, which may be attributed to differences in training data, as MAIRA-2 is trained with the additional USMix dataset. Meanwhile, RADAR demonstrates comparable performance to the baselines in terms of lexical metrics. On the CHEXPERT PLUS dataset, our model significantly outperforms $\mathrm{SWIN_{V2}}$ -BERT trained on the MIMIC + +![](images/930cc964c5c8f14b2ef5b5eef089a4af82fe11fe6051dde26eaa2155b9ede6ee.jpg) +Figure 3: Comparisons among BACKBONE+RAG, BACKBONE+FP+SF, and RADAR on six clinical metrics. + +CXR dataset, across both lexical and clinical metrics. Furthermore, RADAR surpasses the baseline that is trained on CHEXPERT PLUS alone as well as the one trained on a combination of both datasets. These results demonstrate the strong generalization ability of RADAR across different datasets. Additionally, RADAR significantly outperforms the BACKBONE, underscoring the effectiveness of the integrated knowledge. + +Analysis of PF, SF, and OI. We analyze the impact of PF, SF, and OI on the performance of RADAR, with results summarized in Table 4. $\mathrm{RADAR}_{\mathrm{w/oF}}$ which first identifies observations before report generation without incorporating knowledge, significantly improves the CheXpert metrics, particularly $^{14}\mathrm{Macro - F_1}$ and $^{5}\mathrm{Macro - F_1}$ , as observation information captures high-level abstractions of reports and aligns closely with the objectives of these metrics. This highlights the crucial role of OI in enhancing clinical accuracy, independent of other components. When PF and SF are introduced individually with OI, introducing PF alone helps preserve the knowledge embedded in the LLM, resulting in comparable performance across both lexical and clinical metrics. In contrast, introducing SF alone substantially improves $^{14/5}\mathrm{Macro - F_1}$ , but negatively impacts $\mathrm{RG_{ER}}$ and $\mathrm{RadCliQ_0}$ . Moreover, combining both PF and SF leverages the strengths of each, leading to further improvements in the clinical metrics while maintaining comparable performance across the other metrics. We notice that BACKBONE tends to retain easily acquired knowledge (i.e., PF) and that selectively supplementing it with external information (i.e., SF) is crucial for bridging the remaining knowledge gaps. + +![](images/e90f341160186615965f72e2f0f07c55c447fa49d1d8f27c9fb55f8452a3e432.jpg) +Preliminary Findings: $O_{R}$ [Atelectasis] Heart size is normal....[Atelectasis] Mild atelectasis is noted in the left lung base. No focal consolidation, pleural effusion or pneumothorax is present..... Expert Observations: $O_{I} = \emptyset$ Agreement: $O_{\vee} = \emptyset$ Overall Findings: $O = \emptyset$ The cardiac, mediastinal and hilar contours are normal. Lungs are clear.... Reference: $O = \emptyset$ Cardiac, mediastinal and hilar contours are normal.... + +# Preliminary Findings: $O_{R}$ [Edema, Cardiomegaly] + +[Edema] .... there is still evidence of mild-to-moderate pulmonary edema. [Cardiomegaly] Moderate cardiomegaly persists. + +# Supplementary Findings: + +[Atelectasis] There are areas of left mid-to-lower lung linear atelectasis/scarring. [Atelectasis] Mild areas of atelectasis at the left lung bases. + +Expert Observations: $O_I$ [Cardiomegaly, Atelectasis, Edema] Agreement: $O_{\checkmark}$ [Edema, Cardiomegaly] Overall Findings: $O$ + +[Edema] Moderate pulmonary edema with [Cardiomegaly] moderate cardiomegaly and [Atelectasis] bilateral areas of atelectasis. + +# Reference: + +[Edema] There are still signs indicative of mild pulmonary edema. [Atelectasis] In addition, there is a small right medial basal atelectasis. [Cardiomegaly] Moderate cardiomegaly. .... + +![](images/ad00f7031a948baf988ec75d730f575c44af8b338742f6a07b7d32e24ba5d214.jpg) +Case B + +![](images/2c270e39d2f72554e93fac32f0bae089a9148d7cb90b3e83e446cd4b8e93cb86.jpg) +Figure 4: Two cases generated by RADAR, where false positive observation appears in the PF of case A and false negative observation shows in the PF of case B. + +Analysis of RADAR versus RAG. To evaluate the effectiveness of knowledge integration in RADAR, we conduct experiments comparing our model against three baselines: (1) BACKBONE PLUS, (2) BACKBONE+RAG, and (3) BACKBONE+PF+SF. The results are presented in Figure 3. Note that these baselines do not include the OI. Since RADAR undergoes two-stage training (i.e., two additional epochs), we apply the same extended training to BACKBONE, referring to this variant as BACKBONE PLUS. In addition, we introduce a standard RAG baseline (BACKBONE+RAG), which utilizes the same retrieved findings as RADAR. Building upon this baseline, BACKBONE+PF+SF further includes PF as context. Our findings reveal that while all four models achieve comparable performance on lexical metrics (e.g., $50\% / 26\%$ B-1/4), they differ in clinical metrics. Specifically, BACKBONE+RAG and BACKBONE PLUS show similar performance, and BACKBONE+FP+SF outperforms these two baselines on CheXpert metrics and exhibits similar performance on RadGraph metrics. This demonstrates that incorporating credible knowledge can effectively enhance report generation even without OI. Moreover, RADAR demonstrates a relative improvement of over $6\%$ across four key CheXpert metrics. This suggests that structured integration of internal and external knowledge contributes to its enhanced clinical accuracy. + +Analysis of Fine-tuning Different Modules in BACKBONE. To assess the contributions of different components in the base model (i.e., BLIP-3), we conduct an ablation study on the impact of fine-tuning the vision encoder, the Resampler, and the LLM. The results are summarized in Table 5. By comparing BACKBONE and BACKBONE-V2, we find that fine-tuning the vision encoder to incor + +porate domain-specific knowledge is crucial for achieving high clinical accuracy, even though both configurations exhibit strong language coverage in lexical metrics. Furthermore, fine-tuning the LLM (i.e., Phi-3) results in substantial improvements in both lexical and clinical metrics, as evidenced by the comparison between V1 and V2. This highlights the importance of adapting the LLM to the clinical domain for optimal performance. Notably, RADAR utilizes a 3.8B LLM as the decoder and outperforms many larger models (e.g., LLaVA-Med and MAIRA-1). + +# 5.2 Qualitative Analysis + +Case Study. We conduct a case study to illustrate the advantages of incorporating both internal knowledge and retrieved information, as shown in Figure 4. In Case A, RADAR initially generates a report that includes the finding Atelectasis. However, expert assessment indicates the image shows no positive findings. As a result, their intersection is $\emptyset$ , and by removing this incorrect observation, RADAR ultimately produces an accurate report. This example highlights the model's ability to refine its predictions when guided by expert constraints, effectively eliminating unnecessary or incorrect findings. Another more complex case is presented on the right side of this Figure. Specifically, RADAR initially identifies findings related to Edema and Cardiomegaly, which the expert model also notes. However, the observation of Atelectasis is omitted from the preliminary findings. By incorporating retrieved evidence such as "... linear atelectasis ..." and "Mild areas of atelectasis ..., RADAR successfully corrects the omission and generates a complete and accurate report. This case demonstrates the model's capability to lever + +Indication: History of chest pain x20 minutes, please evaluate for pneumonia or other acute process. + +![](images/724da2b10707f9346054e146f7a594f04a1a7d6c2a73506e65479f6d8094851d.jpg) +Prrr + +![](images/5e9aceed92eb7da758273ff537c48601393f925bc3e690344b0a5c6475b85156.jpg) +Curren + +![](images/cb741168ac45eb82599d88baf3e399ce9414ba9e25c83d544e18bbdd275895f2.jpg) +Figure 5: Error case generated by RADAR, where spans and spans indicate incorrect and correct observations. + +age external knowledge to recover missing findings, thereby improving factual completeness. + +Error Analysis. We conduct an error analysis to gain deeper insights, as shown in Figure 5. RADAR initially generates a report containing the observation Cardiomegaly, which is also present in the expert model's output. In this case, the observation reflects credible knowledge possessed by the LLM and should be preserved. Subsequently, RADAR produces a false positive finding, Edema, which aligns with the retrieved supplementary findings. This error may result from the model's overreliance on external knowledge. Moreover, since Edema is clinically associated with Cardiomegaly, it is possible that RADAR has learned only superficial correlations between them. To address these issues, potential solutions include refining the expert model and expanding the training dataset. + +# 6 Related Works + +Radiology report generation (Jing et al., 2018; Li et al., 2018) is a valuable yet challenging task. Numerous research efforts have been dedicated to improving clinical accuracy, employing diverse approaches such as memory-based neural models (Chen et al., 2020, 2021), planning-based methods (Nishino et al., 2022; Hou et al., 2023b), and reinforcement learning-optimized techniques (Lovelace and Mortazavi, 2020; Miura et al., 2021; Qin and Song, 2022). Additionally, several studies (Ramesh et al., 2022; Bannur et al., 2023; Hou + +et al., 2023a; Dalla Serra et al., 2023; Hou et al., 2024) have addressed the issue of hallucination, particularly in the absence of prior studies. Given the critical role of domain knowledge in this field, researchers have leveraged knowledge graphs to enhance report generation (Yang et al., 2021; Li et al., 2023c; Huang et al., 2023; Yan et al., 2023). + +With the emergence of MLLMs (Li et al., 2023b; Liu et al., 2023), which demonstrate exceptional capabilities in image understanding and captioning, many studies (Singhal et al., 2022; Wu et al., 2023; Thawakar et al., 2024; Li et al., 2023a) have explored their application in the medical domain. Chen et al. (2024) introduced a foundation model for chest X-ray interpretation, while Chaves et al. (2024) developed a lightweight MLLM tailored for radiology. Park et al. (2024) investigated the multitask potential of LLMs, and Zhang et al. (2024) incorporated temporal information to enhance chest X-ray analysis. + +# 7 Conclusion + +In this paper, we introduce RADAR, a novel approach designed to enhance radiology report generation by leveraging both the internal knowledge of an LLM and externally retrieved information. Our model first generates a report and subsequently classifies the image based on observations, with their shared components regarded as internal knowledge. It then retrieves supplementary information to further refine and complement this knowledge. Extensive experiments on three public datasets demonstrate that RADAR achieves SOTA performance in both language quality and clinical accuracy, highlighting the effectiveness of integrating internal and external knowledge for more accurate and coherent radiology report generation. + +# Limitations + +Our experiments are conducted using a single backbone architecture. While this choice provides a controlled evaluation, the performance of alternative architectures remains unexplored. Future work should investigate whether different model architectures can achieve comparable or better results. In addition, our study focuses exclusively on a single imaging modality (e.g., Chest X-ray). The model's effectiveness in other imaging modalities, such as CT scans or MRI, has not been evaluated. Extending our approach to multiple imaging modalities would be an important direction for future research + +to enhance its clinical utility and generalizability. + +# Ethical Considerations + +This study utilizes the MIMIC-CXR (Johnson et al., 2019), IU X-RAY (Demner-Fushman et al., 2016), and CHEXPERT PLUS (Chambon et al., 2024) datasets, all of which are publicly available and have been automatically de-identified to mitigate privacy risks. Our primary objective is to improve the clinical accuracy of reports generated by LLMs in medical imaging. However, despite our efforts, the generated reports may contain inaccuracies or omissions. Therefore, these outputs should not be used as a substitute for expert medical judgment. We strongly advocate for thorough validation by qualified radiologists or healthcare professionals before any clinical or diagnostic application. + +# Acknowledgments + +This work was supported in part by the National Key R&D Program of China (2024YFE0198100, 2024YFC2510800), the Natural Science Foundation of China (82272086), and the Research Grants Council of Hong Kong (15207920, 15207821, 15207122). + +# References + +Marah Abdin, Jyoti Aneja, Hany Awadalla, Ahmed Awadallah, Ammar Ahmad Awan, Nguyen Bach, Amit Bahree, Arash Bakhtiari, Jianmin Bao, Harkirat Behl, Alon Benhaim, Misha Bilenko, Johan Bjorck, Sebastien Bubeck, Martin Cai, Qin Cai, Vishrav Chaudhary, Dong Chen, Dongdong Chen, Weizhu Chen, Yen-Chun Chen, Yi-Ling Chen, Hao Cheng, Parul Chopra, Xiyang Dai, Matthew Dixon, Ronen Eldan, Victor Fragoso, Jianfeng Gao, Mei Gao, Min Gao, Amit Garg, Allie Del Giorno, Abhishek Goswami, Suriya Gunasekar, Emman Haider, Junheng Hao, Russell J. Hewett, Wenxiang Hu, Jamie Huynh, Dan Iter, Sam Ade Jacobs, Mojan Javaheripi, Xin Jin, Nikos Karampatziakis, Piero Kauffmann, Mahoud Khademi, Dongwoo Kim, Young Jin Kim, Lev Kurilenko, James R. Lee, Yin Tat Lee, Yuanzhi Li, Yunsheng Li, Chen Liang, Lars Liden, Xihui Lin, Zeqi Lin, Ce Liu, Liyuan Liu, Mengchen Liu, Weishung Liu, Xiaodong Liu, Chong Luo, Piyush Madan, Ali Mahmoudzadeh, David Majercak, Matt Mazzola, Caio Cesar Teodoro Mendes, Arindam Mitra, Hardik Modi, Anh Nguyen, Brandon Norick, Barun Patra, Daniel Perez-Becker, Thomas Portet, Reid Pryzant, Heyang Qin, Marko Radmilac, Liliang Ren, Gustavo de Rosa, Corby Rosset, Sambudha Roy Olatunji Ruwase, Olli Saarikivi, Amin Saied, Adil Salim, Michael Santacroce, Shital Shah, Ning Shang Hiteshi Sharma, Yelong Shen, Swadheen Shukla, Xia + +Song, Masahiro Tanaka, Andrea Tupini, Praneetha Vaddamanu, Chunyu Wang, Guanhua Wang, Lijuan Wang, Shuohang Wang, Xin Wang, Yu Wang, Rachel Ward, Wen Wen, Philipp Witte, Haiping Wu, Xiaoxia Wu, Michael Wyatt, Bin Xiao, Can Xu, Jiahang Xu, Weijian Xu, Jilong Xue, Sonali Yadav, Fan Yang, Jianwei Yang, Yifan Yang, Ziyi Yang, Donghan Yu, Lu Yuan, Chenruidong Zhang, Cyril Zhang, Jianwen Zhang, Li Lyna Zhang, Yi Zhang, Yue Zhang, Yunan Zhang, and Xiren Zhou. 2024. Phi-3 technical report: A highly capable language model locally on your phone. Preprint, arXiv:2404.14219. + +Emily Alsentzer, John R. Murphy, Willie Boag, WeiHung Weng, Di Jin, Tristan Naumann, and Matthew B. A. McDermott. 2019. Publicly available clinical bert embeddings. Preprint, arXiv:1904.03323. + +Satanjeev Banerjee and Alon Lavie. 2005. ME-TEOR: An automatic metric for MT evaluation with improved correlation with human judgments. In Proceedings of the ACL Workshop on Intrinsic and Extrinsic Evaluation Measures for Machine Translation and/or Summarization, pages 65-72, Ann Arbor, Michigan. Association for Computational Linguistics. + +Shruthi Bannur, Kenya Bouzid, Daniel C. Castro, Anton Schwaighofer, Anja Thieme, Sam Bond-Taylor, Maximilian Ilse, Fernando Pérez-García, Valentina Salvatelli, Harshita Sharma, Felix Meissen, Mercy Ranjit, Shaury Srivastav, Julia Gong, Noel C. F. Codella, Fabian Falck, Ozan Oktay, Matthew P. Lungren, Maria Teodora Wetscherek, Javier Alvarez-Valle, and Stephanie L. Hyland. 2024. Maira-2: Grounded radiology report generation. Preprint, arXiv:2406.04449. + +Shruthi Bannur, Stephanie Hyland, Qianchu Liu, Fernando Pérez-García, Maximilian Ilse, Daniel C. Castro, Benedikt Boecking, Harshita Sharma, Kenya Bouzid, Anja Thieme, Anton Schwaighofer, Maria Wetscherek, Matthew P. Lungren, Aditya Nori, Javier Alvarez-Valle, and Ozan Oktay. 2023. Learning to exploit temporal structure for biomedical vision-language processing. Preprint, arXiv:2301.04558. + +Pierre Chambon, Jean-Benoit Delbrouck, Thomas Sounack, Shih-Cheng Huang, Zhihong Chen, Maya Varma, Steven QH Truong, Chu The Chuong, and Curtis P. Langlotz. 2024. Chexpert plus: Augmenting a large chest x-ray dataset with text radiology reports, patient demographics and additional image formats. Preprint, arXiv:2405.19538. + +Juan Manuel Zambrano Chaves, Shih-Cheng Huang, Yanbo Xu, Hanwen Xu, Naoto Usuyama, Sheng Zhang, Fei Wang, Yujia Xie, Mahmoud Khademi, Ziyi Yang, Hany Awadalla, Julia Gong, Houdong Hu, Jianwei Yang, Chunyuan Li, Jianfeng Gao, Yu Gu, Cliff Wong, Mu Wei, Tristan Naumann, Muhao Chen, Matthew P. Lungren, Akshay Chaudhari, Serena Yeung-Levy, Curtis P. Langlotz, Sheng Wang, and Hoifung Poon. 2024. Towards a clinically accessible radiology foundation model: open-access and lightweight, with automated evaluation. Preprint, arXiv:2403.08002. + +Zhihong Chen, Yaling Shen, Yan Song, and Xiang Wan. 2021. Cross-modal memory networks for radiology report generation. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing, ACL/IJCNLP 2021, (Volume 1: Long Papers), Virtual Event, August 1-6, 2021, pages 5904-5914. Association for Computational Linguistics. +Zhihong Chen, Yan Song, Tsung-Hui Chang, and Xi-ang Wan. 2020. Generating radiology reports via memory-driven transformer. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 1439-1449, Online. Association for Computational Linguistics. +Zhihong Chen, Maya Varma, Jean-Benoit Delbrouck, Magdalini Paschali, Louis Blankemeier, Dave Van Veen, Jeya Maria Jose Valanarasu, Alaa Youssef, Joseph Paul Cohen, Eduardo Pontes Reis, Emily B. Tsai, Andrew Johnston, Cameron Olsen, Tanishq Mathew Abraham, Sergios Gatidis, Akshay S. Chaudhari, and Curtis Langlotz. 2024. Chexagent: Towards a foundation model for chest x-ray interpretation. Preprint, arXiv:2401.12208. +Francesco Dalla Serra, Chaoyang Wang, Fani Deligianni, Jeff Dalton, and Alison O'Neil. 2023. Controllable chest X-ray report generation from longitudinal representations. In Findings of the Association for Computational Linguistics: EMNLP 2023, pages 4891-4904, Singapore. Association for Computational Linguistics. +Dina Demner-Fushman, Marc D Kohli, Marc B Rosenman, Sonya E Shooshan, Laritza Rodriguez, Sameer Antani, George R Thoma, and Clement J McDonald. 2016. Preparing a collection of radiology examinations for distribution and retrieval. Journal of the American Medical Informatics Association, 23(2):304-310. +Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 4171-4186, Minneapolis, Minnesota. Association for Computational Linguistics. +Wenjun Hou, Yi Cheng, Kaishuai Xu, Yan Hu, Wenjie Li, and Jiang Liu. 2024. ICON: Improving interreport consistency in radiology report generation via lesion-aware mixup augmentation. In Findings of the Association for Computational Linguistics: EMNLP 2024, pages 9043-9056, Miami, Florida, USA. Association for Computational Linguistics. +Wenjun Hou, Yi Cheng, Kaishuai Xu, Wenjie Li, and Jiang Liu. 2023a. RECAP: Towards precise radiology report generation via dynamic disease progression reasoning. In Findings of the Association + +for Computational Linguistics: EMNLP 2023, pages 2134-2147, Singapore. Association for Computational Linguistics. +Wenjun Hou, Kaishuai Xu, Yi Cheng, Wenjie Li, and Jiang Liu. 2023b. ORGAN: Observation-guided radiology report generation via tree reasoning. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 8108-8122, Toronto, Canada. Association for Computational Linguistics. +Lei Huang, Weijiang Yu, Weitao Ma, Weihong Zhong, Zhangyin Feng, Haotian Wang, Qianglong Chen, Weihua Peng, Xiaocheng Feng, Bing Qin, and Ting Liu. 2025. A survey on hallucination in large language models: Principles, taxonomy, challenges, and open questions. ACM Transactions on Information Systems, 43(2):1-55. +Zhongzhen Huang, Xiaofan Zhang, and Shaoting Zhang. 2023. Kiut: Knowledge-injected u-transformer for radiology report generation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 19809-19818. +Stephanie L. Hyland, Shruthi Bannur, Kenya Bouzid, Daniel C. Castro, Mercy Ranjit, Anton Schwaighofer, Fernando Pérez-García, Valentina Salvatelli, Shaury Srivastav, Anja Thieme, Noel Codella, Matthew P. Lungren, Maria Teodora Wetscherek, Ozan Oktay, and Javier Alvarez-Valle. 2024. Maira-1: A specialised large multimodal model for radiology report generation. Preprint, arXiv:2311.13668. +Jeremy Irvin, Pranav Rajpurkar, Michael Ko, Yifan Yu, Silviana Ciurea-Ilcus, Chris Chute, Henrik Marklund, Behzad Haghgoo, Robyn L. Ball, Katie S. Shpanskaya, Jayne Seekins, David A. Mong, Safwan S. Halabi, Jesse K. Sandberg, Ricky Jones, David B. Larson, Curtis P. Langlotz, Bhavik N. Patel, Matthew P. Lungren, and Andrew Y. Ng. 2019. Chexpert: A large chest radiograph dataset with uncertainty labels and expert comparison. In The Thirty-Third AAAI Conference on Artificial Intelligence, pages 590-597. +Saahil Jain, Ashwin Agrawal, Adriel Saporta, Steven Q. H. Truong, Du Nguyen Duong, Tan Bui, Pierre Chambon, Yuhao Zhang, Matthew P. Lungren, Andrew Y. Ng, Curtis P. Langlotz, and Pranav Rajpurkar. 2021. Radgraph: Extracting clinical entities and relations from radiology reports. CoRR, abs/2106.14463. +Haibo Jin, Haoxuan Che, Yi Lin, and Hao Chen. 2024. Promptmrg: Diagnosis-driven prompts for medical report generation. Preprint, arXiv:2308.12604. +Baoyu Jing, Pengtao Xie, and Eric P. Xing. 2018. On the automatic generation of medical imaging reports. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics, ACL 2018, Melbourne, Australia, July 15-20, 2018, Volume 1: Long Papers, pages 2577-2586. Association for Computational Linguistics. + +Alistair EW Johnson, Tom J Pollard, Nathaniel R Greenbaum, Matthew P Lungren, Chih-ying Deng, Yifan Peng, Zhiyong Lu, Roger G Mark, Seth J Berkowitz, and Steven Horng. 2019. Mimic-cxr-jpg, a large publicly available database of labeled chest radiographs. arXiv preprint arXiv:1901.07042. +Chunyuan Li, Cliff Wong, Sheng Zhang, Naoto Usuyama, Haotian Liu, Jianwei Yang, Tristan Naumann, Hoifung Poon, and Jianfeng Gao. 2023a. Llava-med: Training a large language-and-vision assistant for biomedicine in one day. Preprint, arXiv:2306.00890. +Junnan Li, Dongxu Li, Silvio Savarese, and Steven Hoi. 2023b. Blip-2: Bootstrapping language-image pretraining with frozen image encoders and large language models. Preprint, arXiv:2301.12597. +Mingjie Li, Bingqian Lin, Zicong Chen, Haokun Lin, Xiaodan Liang, and Xiaojun Chang. 2023c. Dynamic graph enhanced contrastive learning for chest x-ray report generation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 3334-3343. +Yuan Li, Xiaodan Liang, Zhiting Hu, and Eric P. Xing. 2018. Hybrid retrieval-generation reinforced agent for medical image report generation. In Advances in Neural Information Processing Systems 31: Annual Conference on Neural Information Processing Systems 2018, NeurIPS 2018, December 3-8, 2018, Montréal, Canada, pages 1537-1547. +Chin-Yew Lin. 2004. ROUGE: A package for automatic evaluation of summaries. In Text Summarization Branches Out, pages 74-81, Barcelona, Spain. Association for Computational Linguistics. +Chang Liu, Yuanhe Tian, Weidong Chen, Yan Song, and Yongdong Zhang. 2024. Bootstrapping large language models for radiology report generation. In AAAI, pages 18635-18643. +Fenglin Liu, Xian Wu, Shen Ge, Wei Fan, and Yuexian Zou. 2021. Exploring and distilling posterior and prior knowledge for radiology report generation. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2021, virtual, June 19-25, 2021, pages 13753-13762. Computer Vision Foundation / IEEE. +Haotian Liu, Chunyuan Li, Qingyang Wu, and Yong Jae Lee. 2023. Visual instruction tuning. Preprint, arXiv:2304.08485. +Ze Liu, Han Hu, Yutong Lin, Zhuliang Yao, Zhenda Xie, Yixuan Wei, Jia Ning, Yue Cao, Zheng Zhang, Li Dong, Furu Wei, and Baining Guo. 2022. Swin transformer v2: Scaling up capacity and resolution. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 12009-12019. +Justin Lovelace and Bobak Mortazavi. 2020. Learning to generate clinically coherent chest X-ray reports. + +In Findings of the Association for Computational Linguistics: EMNLP 2020, pages 1235-1243, Online. Association for Computational Linguistics. +Yasuhide Miura, Yuhao Zhang, Emily Tsai, Curtis Langlotz, and Dan Jurafsky. 2021. Improving factual completeness and consistency of image-to-text radiology report generation. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 5288-5304, Online. Association for Computational Linguistics. +Toru Nishino, Yasuhide Miura, Tomoki Taniguchi, Tomoko Ohkuma, Yuki Suzuki, Shoji Kido, and Noriyuki Tomiyama. 2022. Factual accuracy is not enough: Planning consistent description order for radiology report generation. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, Online. Association for Computational Linguistics. +Farhad Nooralahzadeh, Nicolas Perez Gonzalez, Thomas Frauenfelder, Koji Fujimoto, and Michael Krauthammer. 2021. Progressive transformer-based generation of radiology reports. In Findings of the Association for Computational Linguistics: EMNLP 2021, pages 2824-2832, Punta Cana, Dominican Republic. Association for Computational Linguistics. +OpenAI. 2023. Gpt-4v(ision) system card. +Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. 2002. Bleu: a method for automatic evaluation of machine translation. In Proceedings of the 40th Annual Meeting of the Association for Computational Linguistics, pages 311-318, Philadelphia, Pennsylvania, USA. Association for Computational Linguistics. +Jonggwon Park, Soobum Kim, Byungmu Yoon, Jihun Hyun, and Kyoyun Choi. 2024. M4cxxr: Exploring multi-task potentials of multi-modal large language models for chest x-ray interpretation. Preprint, arXiv:2408.16213. +Chantal Pellegrini, Ege Özsoy, Benjamin Busam, Nassir Navab, and Matthias Keicher. 2023. Radialog: A large vision-language model for radiology report generation and conversational assistance. Preprint, arXiv:2311.18681. +Han Qin and Yan Song. 2022. Reinforced cross-modal alignment for radiology report generation. In Findings of the Association for Computational Linguistics: ACL 2022, Dublin, Ireland, May 22-27, 2022, pages 448-458. Association for Computational Linguistics. +Vignav Ramesh, Nathan Andrew Chi, and Pranav Rajpurkar. 2022. Improving radiology report generation systems by removing hallucinated references to nonexistent priors. Preprint, arXiv:2210.06340. +Mercy Ranjit, Gopinath Ganapathy, Ranjit Manuel, and Tanuja Ganu. 2023. Retrieval augmented chest x-ray + +report generation using openai gpt models. Preprint, arXiv:2305.03660. +Karan Singhal, Shekoofeh Azizi, Tao Tu, S. Sara Mahdavi, Jason Wei, Hyung Won Chung, Nathan Scales, Ajay Tanwani, Heather Cole-Lewis, Stephen Pfohl, Perry Payne, Martin Seneviratne, Paul Gamble, Chris Kelly, Nathaneal Scharli, Aakanksha Chowdhery, Philip Mansfield, Blaise Aguera y Arcas, Dale Webster, Greg S. Corrado, Yossi Matias, Katherine Chou, Juraj Gottweis, Nenad Tomasev, Yun Liu, Alvin Rajkomar, Joelle Barral, Christopher Semturs, Alan Karthikesalingam, and Vivek Natarajan. 2022. Large language models encode clinical knowledge. Preprint, arXiv:2212.13138. +Akshay Smit, Saahil Jain, Pranav Rajpurkar, Anuj Parek, Andrew Ng, and Matthew Lungren. 2020. Combining automatic labelers and expert annotations for accurate radiology report labeling using BERT. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 1500-1519, Online. Association for Computational Linguistics. +Xiao Song, Xiaodan Zhang, Junzhong Ji, Ying Liu, and Pengxu Wei. 2022. Cross-modal contrastive attention model for medical report generation. In Proceedings of the 29th International Conference on Computational Linguistics, pages 2388-2397, Gyeongju, Republic of Korea. International Committee on Computational Linguistics. +Liwen Sun, James Jialun Zhao, Wenjing Han, and Chenyan Xiong. 2025. Fact-aware multimodal retrieval augmentation for accurate medical radiology report generation. In Proceedings of the 2025 Conference of the Nations of the Americas Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), pages 643-655, Albuquerque, New Mexico. Association for Computational Linguistics. +Tim Tanida, Philip Müller, Georgios Kaissis, and Daniel Rueckert. 2023. Interactive and explainable region-guided radiology report generation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 7433-7442. +Omkar Chakradhar Thawakar, Abdelrahman M. Shaker, Sahal Shaji Mullappilly, Hisham Cholakkal, Rao Muhammad Anwer, Salman Khan, Jorma Laaksonen, and Fahad Khan. 2024. XrayGPT: Chest radiographs summarization using large medical vision-language models. In Proceedings of the 23rd Workshop on Biomedical Natural Language Processing, pages 440-448, Bangkok, Thailand. Association for Computational Linguistics. +Zhanyu Wang, Lingqiao Liu, Lei Wang, and Luping Zhou. 2023a. Metransformer: Radiology report generation by transformer with multiple learnable expert tokens. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 11558-11567. + +Zhanyu Wang, Lingqiao Liu, Lei Wang, and Luping Zhou. 2023b. R2gengpt: Radiology report generation with frozen llms. Preprint, arXiv:2309.09812. +Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumont, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Remi 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 Rush. 2020. Transformers: State-of-the-art natural language processing. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pages 38-45, Online. Association for Computational Linguistics. +Chaoyi Wu, Xiaoman Zhang, Ya Zhang, Yanfeng Wang, and Weidi Xie. 2023. Towards generalist foundation model for radiology by leveraging web-scale 2d&3d medical data. Preprint, arXiv:2308.02463. +Le Xue, Manli Shu, Anas Awadalla, Jun Wang, An Yan, Senthil Purushwalkam, Honglu Zhou, Viraj Prabhu, Yutong Dai, Michael S Ryoo, Shrikant Kendre, Jieyu Zhang, Can Qin, Shu Zhang, Chia-Chih Chen, Ning Yu, Juntao Tan, Tulika Manoj Awalgaonkar, Shelby Heinecke, Huan Wang, Yejin Choi, Ludwig Schmidt, Zeyuan Chen, Silvio Savarese, Juan Carlos Niebles, Caiming Xiong, and Ran Xu. 2024. xgen-mm (blip-3): A family of open large multimodal models. Preprint, arXiv:2408.08872. +Benjamin Yan, Ruochen Liu, David Kuo, Subathra Adithan, Eduardo Reis, Stephen Kwak, Vasantha Venugopal, Chloe O'Connell, Agustina Saenz, Pranav Rajpurkar, and Michael Moor. 2023. Style-aware radiology report generation with RadGraph and few-shot prompting. In Findings of the Association for Computational Linguistics: EMNLP 2023, pages 14676-14688, Singapore. Association for Computational Linguistics. +Shuxin Yang, Xian Wu, Shen Ge, Shaohua Kevin Zhou, and Li Xiao. 2021. Knowledge matters: Radiology report generation with general and specific knowledge. CoRR, abs/2112.15009. +Feiyang Yu, Mark Endo, Rayan Krishnan, Ian Pan, Andy Tsai, Eduardo Pontes Reis, Eduardo Kaiser Ururahy Nunes Fonseca, Henrique Min Ho Lee, Zahra Shakeri Hossein Abad, Andrew Y. Ng, Curtis P. Langlotz, Vasantha Kumar Venugopal, and Pranav Rajpurkar. 2022. Evaluating progress in automatic chest x-ray radiology report generation. medRxiv. +Xiaohua Zhai, Basil Mustafa, Alexander Kolesnikov, and Lucas Beyer. 2023. Sigmoid loss for language image pre-training. Preprint, arXiv:2303.15343. +Xi Zhang, Zaiqiao Meng, Jake Lever, and Edmond S. L. Ho. 2024. Libra: Leveraging temporal images for biomedical radiology analysis. Preprint, arXiv:2411.19378. + +Hong-Yu Zhou, Subathra Adithan, Julián Nicolas Acosta, Eric J. Topol, and Pranav Rajpurkar. 2024. A generalist learner for multifaceted medical image interpretation. Preprint, arXiv:2405.07988. + +# A Appendix + +# A.1 Full List of Specialists + +In addition to specialist baselines in Table 1, the following baselines are included: R2GEN (Chen et al., 2020), R2GENCMN (Chen et al., 2021), $\mathcal{M}^2\mathrm{TR}$ (Nooralahzadeh et al., 2021), KNOWMAT (Yang et al., 2021), CMM-RL (Qin and Song, 2022), CMCA (Song et al., 2022), KiUT (Huang et al., 2023), DCL (Li et al., 2023c), METrans (Wang et al., 2023a), RGRG (Tanida et al., 2023), RECAP (Hou et al., 2023a), Controllable (Dalla Serra et al., 2023), PromptMRG (Jin et al., 2024), and ICON (Hou et al., 2024). + +
ObservationPRF1
Atelectasis0.5180.6450.574
Cardiomegaly0.6560.7830.713
Consolidation0.3700.1740.237
Edema0.5180.6100.560
Pleural Effusion0.6950.8000.744
5Macro Average0.5510.6020.567
5Micro Average0.6070.7070.653
Enlarged Card.0.2770.2040.235
Lung Opacity0.6440.4960.561
Lung Lesion0.4920.2070.291
Pneumonia0.2830.2320.255
Pneumothorax0.4070.6360.496
Pleural Other0.3330.1730.228
Fracture0.4210.2440.309
Support Devices0.8230.8660.844
No Finding0.3020.5690.395
14Macro Average0.4810.4740.460
14Micro Average0.6140.6400.627
+ +Table 7: Experimental results of RADAR for each observation on the MIMIC-CXR dataset. + +Dataset: MIMIC-CXR (Compared with SOTA Specialists) + +
ModelLexical MetricsCE (14Macro) Metrics
B-1B-2B-3B-4MTRR-LPRF1
R2GEN0.3530.2180.1450.1030.1420.2700.3330.2730.276
R2GENCMN0.3530.2180.1480.1060.1420.2780.3440.2750.278
M2TR0.3780.2320.1540.1070.1450.2720.2400.4280.308
KNOWMAT0.3630.2280.1560.115-0.2840.4580.3480.371
CMM-RL0.3810.2320.1550.1090.1510.2870.3420.2940.292
CMCA0.3600.2270.1560.1170.1480.2870.4440.2970.356
KiUT0.3930.2430.1590.1130.1600.2850.3710.3180.321
DCL---0.1090.1500.2840.4710.3520.373
METrans0.3860.2500.1690.1240.1520.2910.3640.3090.311
RGRG0.3730.2490.1750.1260.1680.2640.3800.3190.305
ORGAN0.4070.2560.1720.1230.1620.2930.4160.4180.385
RECAP0.4290.2670.1770.1250.1680.2880.3890.4430.393
Controllable0.4860.3660.2950.2460.2160.4230.5970.5160.553
PromptMRG0.398--0.1120.1570.2680.3960.3930.381
ICON0.4290.2660.1780.1260.1700.2870.4450.5050.464
RADAR (Ours)0.5090.3900.3150.2620.4500.3970.4810.4740.460
0.5230.5000.497
+ +Table 8: Experimental results of our model and SoTA specialists on the MIMIC-CXR dataset. Results denotes Uncertain as Positive. + +
RolePrompt
SYSTEM<|system|>You are an assistant in radiology, responsible for analyzing medical imaging studies and generating detailed, structured, and accurate radiology reports.<|end|>
USER<|user|><prior image>(If prior available)<current image>Indication: ....History: ....Comparison: ....Technique: ....Prior Findings: ....(If prior available)Preliminary Findings: ....(If available)Supplementary Findings: ....(If available)Generate a comprehensive and detailed description of findings based on this chest X-ray image. Include a thorough comparison with a prior chest X-ray, emphasizing any significant changes, progression, or improvement. (If prior available) Before this, systematically identify all observations.<|end|>
ASSISTANT<|assisitant|>Identified Observations:......Overall Findings: (e.g., the target)......<|end|>
+ +Table 9: The prompt template for RADAR and its variants, consisting of three roles: System, User, and Assistant. \ No newline at end of file diff --git a/radarenhancingradiologyreportgenerationwithsupplementaryknowledgeinjection/images.zip b/radarenhancingradiologyreportgenerationwithsupplementaryknowledgeinjection/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..fa753cb2aeaa40a884c362cb0a57794452a644a7 --- /dev/null +++ b/radarenhancingradiologyreportgenerationwithsupplementaryknowledgeinjection/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:71c8c856b90c9ef07c7e1dd1b71b3f2cb3f926a03df0bf68fce62aa4f87d8079 +size 951586 diff --git a/radarenhancingradiologyreportgenerationwithsupplementaryknowledgeinjection/layout.json b/radarenhancingradiologyreportgenerationwithsupplementaryknowledgeinjection/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..572421959df0c9bcca7479324fd14b0923b18a63 --- /dev/null +++ b/radarenhancingradiologyreportgenerationwithsupplementaryknowledgeinjection/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:97ab6ce0a0813dd257e114ccd25cdae5b16ed7127fac64201750ece042819b80 +size 502989 diff --git a/raemollmretrievalaugmentedllmsforcrossdomainmisinformationdetectionusingincontextlearningbasedonemotionalinformation/3e2a23cb-d0ef-471f-b18b-26c80a6d621e_content_list.json b/raemollmretrievalaugmentedllmsforcrossdomainmisinformationdetectionusingincontextlearningbasedonemotionalinformation/3e2a23cb-d0ef-471f-b18b-26c80a6d621e_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..8220e81164049e945c0899ace00fa261d5726dcc --- /dev/null +++ b/raemollmretrievalaugmentedllmsforcrossdomainmisinformationdetectionusingincontextlearningbasedonemotionalinformation/3e2a23cb-d0ef-471f-b18b-26c80a6d621e_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b5067ba681d75d61cdd2ea2e797a2491c31fbab0f40e7b46ee5b97f0bcf77c4 +size 124143 diff --git a/raemollmretrievalaugmentedllmsforcrossdomainmisinformationdetectionusingincontextlearningbasedonemotionalinformation/3e2a23cb-d0ef-471f-b18b-26c80a6d621e_model.json b/raemollmretrievalaugmentedllmsforcrossdomainmisinformationdetectionusingincontextlearningbasedonemotionalinformation/3e2a23cb-d0ef-471f-b18b-26c80a6d621e_model.json new file mode 100644 index 0000000000000000000000000000000000000000..2fa21f1b083d183b7941f20c01e1992f874bb179 --- /dev/null +++ b/raemollmretrievalaugmentedllmsforcrossdomainmisinformationdetectionusingincontextlearningbasedonemotionalinformation/3e2a23cb-d0ef-471f-b18b-26c80a6d621e_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:63acfd6945df36199576a6e309e2b261b742d940e2fd231aa38be80ef52c6827 +size 145651 diff --git a/raemollmretrievalaugmentedllmsforcrossdomainmisinformationdetectionusingincontextlearningbasedonemotionalinformation/3e2a23cb-d0ef-471f-b18b-26c80a6d621e_origin.pdf b/raemollmretrievalaugmentedllmsforcrossdomainmisinformationdetectionusingincontextlearningbasedonemotionalinformation/3e2a23cb-d0ef-471f-b18b-26c80a6d621e_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..dc25315d8ecafa31702a54f7a0db158e0f4765c1 --- /dev/null +++ b/raemollmretrievalaugmentedllmsforcrossdomainmisinformationdetectionusingincontextlearningbasedonemotionalinformation/3e2a23cb-d0ef-471f-b18b-26c80a6d621e_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0e3d834392540d9fee8d1d267958e1b5c19c13f9752a70b450bb9313d300b24c +size 5659088 diff --git a/raemollmretrievalaugmentedllmsforcrossdomainmisinformationdetectionusingincontextlearningbasedonemotionalinformation/full.md b/raemollmretrievalaugmentedllmsforcrossdomainmisinformationdetectionusingincontextlearningbasedonemotionalinformation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..f705239ae6ce3ae97843426585f5970a32b01e05 --- /dev/null +++ b/raemollmretrievalaugmentedllmsforcrossdomainmisinformationdetectionusingincontextlearningbasedonemotionalinformation/full.md @@ -0,0 +1,413 @@ +# RAEmoLLM: Retrieval Augmented LLMs for Cross-Domain Misinformation Detection Using In-Context Learning Based on Emotional Information + +Zhiwei Liu $^{1}$ Kailai Yang $^{1}$ Qianqian Xie $^{2}$ Christine de Kock $^{3}$ Sophia Ananiadou $^{1*}$ Eduard Hovy $^{3,4}$ + +1 The University of Manchester 2 School of Artificial Intelligence, Wuhan University 3 The University of Melbourne 4 Carnegie Mellon University {zhiwei.liu,kailai.yang,sophia.ananiadou}@manchester.ac.uk xqq.sincere@gmail.com, {christine.dekock,eduard.hovy}@unimelb.edu.au + +# Abstract + +Misinformation is prevalent in various fields such as education, politics, health, etc., causing significant harm to society. However, current methods for cross-domain misinformation detection rely on effort- and resource-intensive fine-tuning and complex model structures. With the outstanding performance of LLMs, many studies have employed them for misinformation detection. Unfortunately, they focus on in-domain tasks and do not incorporate significant sentiment and emotion features (which we jointly call affect). In this paper, we propose RAEmoLLM, the first retrieval augmented (RAG) LLMs framework to address cross-domain misinformation detection using in-context learning based on affective information. RAEmoLLM includes three modules. (1) In the index construction module, we apply an emotional LLM to obtain affective embeddings from all domains to construct a retrieval database. (2) The retrieval module uses the database to recommend top K examples (text-label pairs) from source domain data for target domain contents. (3) These examples are adopted as few-shot demonstrations for the inference module to process the target domain content. The RAEmoLLM can effectively enhance the general performance of LLMs in cross-domain misinformation detection tasks through affect-based retrieval, without fine-tuning. We evaluate our framework on three misinformation benchmarks. Results show that RAEmoLLM achieves significant improvements compared to the other few-shot methods on three datasets, with the highest increases of $15.64\%$ , $31.18\%$ , and $15.73\%$ respectively. This project is available at https://github.com/lzw108/RAEmoLLM. + +# 1 Introduction + +The internet is flooded with misinformation (Scheuftele and Krause, 2019), which has a sig- + +nificant impact on people's lives and societal stability (Della Giustina, 2023). Misinformation is pervasive across various domains such as education, health, technology, and especially on the internet, which requires people to invest significant time and effort in discerning the truth (Pérez-Rosas et al., 2018). However, models trained in specific known domains are often fragile and prone to making incorrect predictions when presented with samples from new domains (Saikh et al., 2020). As a result, detecting cross-domain misinformation has become an urgent global issue and poses greater challenges and difficulties. + +Although some studies address cross-domain misinformation detection (Comito et al., 2023; Tang et al., 2023; Shi et al., 2023), they require effort-intensive fine-tuning, and apply only traditional machine learning methods or complex deep learning methods. Recently, LLMs have achieved impressive results in various tasks through zero-shot, few-shot (Li, 2023), or instruction tuning (Zhang et al., 2023a). Many researchers have applied LLMs to identify misinformation (Li et al., 2023; Hu et al., 2024; Cheung and Lam, 2023). However, these methods perform only in-domain misinformation detection. Moreover, emotions and sentiments (which we jointly call affect) are important characteristics of human expression and communication (Hakak et al., 2017). When authors publish misinformation, they often consciously choose specific emotions to capture the attention and resonance of readers to encourage rapid spread (Keen, 2006; Liu et al., 2024d). Unfortunately, there are few LLMs that utilize affective information to detect misinformation, and the only ConspEmoLLM (Liu et al., 2024b) are developed based on an emotional LLM, which does not make full use of affective information, has no cross-domain ability, and also needs time-consuming fine-tuning. + +In-context learning (ICL) needs only task instructions and few-shot examples (input-label pairs), + +eliminating fine-tuning on specific task labels (Dong et al., 2022b). A few studies have used ICL to address cross-domain problems (Long et al., 2023; Wu et al., 2024). To the best of our knowledge, there is currently no application of ICL for cross-domain misinformation detection based on affective information retrieval. + +To address these issues, we propose the first retrieval augmented (RAG) LLMs framework based on emotional information (RAEmoLLM), to address cross-domain misinformation detection using in-context learning based on affective information. RAEmoLLM contains three modules: (1) In the index construction module, we apply EmoLLaMAchat-7B (Liu et al., 2024c) to encode all domain corpora, obtaining implicit affective embeddings to construct the retrieval database as well as explicit affective labels. We also conduct a comprehensive affective analysis to demonstrate the effectiveness of affective information for discriminating between true and misinformation. (2) The retrieval module recommends the top K affect-related examples (text-label pairs) from the source domain corpus according to the target domain content, obtained from the retrieval database. (3) These examples are utilized as the few-shot demonstrations in the inference module, which is driven by a prompt template to guide the LLM to verify the target content for misinformation. The template helps combine implicit and explicit affective information. This framework effectively enhances the capabilities of LLMs in multiple cross-domain misinformation detection tasks through leveraging affective information, without the need for fine-tuning. In this work, we make three main contributions: + +- We conduct affective analysis on different kinds of misinformation datasets and construct the retrieval database according to the implicit affective information for misinformation datasets. +- We propose RAEmoLLM, the first framework for cross-domain misinformation detection using ICL based on affective information, which does not require fine-tuning. Experimental results show that RAEmoLLM outperforms the zero-shot method and other few-shot methods. +- We evaluate RAEmoLLM on a variety of misinformation benchmarks, including fake news, rumours, and conspiracy theory datasets. Results show that RAEmoLLM achieves signifi + +cant improvements compared to the other few-shot methods on three datasets, with the highest increases of $15.64\%$ , $31.18\%$ , and $15.73\%$ respectively, which illustrate the effectiveness of RAEmoLLM framework. + +# 2 Methodology + +This section introduces our method of cross-domain misinformation detection, using the index construction module, retrieval module and inference module. The overall architecture of RAEMoLLM is shown in Figure 1. In the index construction module (Sec. 2.1), we collect domain datasets, and employ an emotional LLM to obtain affective embeddings as well as affective labels to conduct a comprehensive affective analysis on them to detect the affective differences between real and false information. The implicit embeddings are adopted to construct the retrieval database, which will be used by the retrieval module (Sec. 2.2) to obtain source-domain examples. These results are used as the few-shot examples for inference module's (Sec. 2.3) in-context learning to detect target domain misinformation. + +# 2.1 Index Construction Module + +In this section, we first introduce the original datasets and the processing procedure at Sec. 2.1.1. We subsequently conduct affective analysis on these datasets and present how and why to obtain implicit and explicit affective information at Sec. 2.1.2. Finally, we apply the implicit affective information to construct the retrieval database (Sec. 2.1.3). + +# 2.1.1 Datasets + +We collect FakeNewsAMT (Pérez-Rosas et al., 2018), Celebrity (Pérez-Rosas et al., 2018), PHEME (Kochkina et al., 2018), and COCO (Langguth et al., 2023) datasets. The statistics of these datasets are presented in Table 1. FakeNewsAMT is a cross-domain dataset, including six domains. The legitimate news in FakeNewsAMT was obtained from various mainstream news websites. The authors adopted crowdsourcing via Amazon Mechanical Turk (AMT) to generate fake versions of legitimate news items. The Celebrity dataset was derived from online magazines. We combine FakeNewsAMT and Celebrity as AMTCele. PHEME contains a collection of Twitter rumours and non-rumours posted during nine breaking news events. COCO dataset consists + +![](images/021c28d9ef99563d5c79a3b328b66555b9637c2952062a8a3d5bfdc7f6c7c7fa.jpg) +Figure 1: The architecture of RAEmoLLM. D: Domain. T: Target domain. S: Source domain. C: Corpus. L: Label. Aff: Affective information. M: Number of source domain data. Index Construction Module: Apply an emotional LLM to obtain affective embeddings to construct a retrieval database. Retrieval Module: Recommend top K examples (text-label pairs) from source domain data. Inference Module: Adopt the recommended examples as demonstrations for inference. + +
AMTCelePHEMECOCO
DomainLegitFakeEventsRumoursNon-rumoursTopicsRelatedConspiracy
Technology4040Charlie Hebdo4581621Fake Virus
Education4040Sydney siege522699Harmful Radiation248612
Business4040Ferguson284859Depopulation
Sports4040Ottawa shooting470420Other 9 domains5401181
Politics4040Germanwings-crash238231Total7881793
Entertainment4040Putin missing126112
Celebrities250250Prince Toronto2294
Total490490Gurlitt6177
Ebola Essien140
Total24024023
+ +Table 1: Statistics of datasets. AMTCele includes 7 domains. PHEME contains 9 domains (events). COCO has 12 domains (topics). For AMTCele and PHEME, we apply leave-one-domain-out strategy for evaluation. For COCO, we select 3 domains as test set. + +
DatasetsAffectivesub-emotionlegit/non-rumours/relatedfake/rumours/conspiracyt-test
meanvarmeanvartp
AMTCeleEIregAnger0.35840.00640.40550.0060-9.32946.91E-20
Fear0.35870.01370.40470.0124-6.28614.90E-10
Joy0.33920.01800.28970.01426.10541.48E-09
Sadness0.33410.01090.36970.0106-5.37269.70E-08
PHEME COCOVreg-0.54710.02040.49400.01706.06561.88E-09
ElregSadness0.52150.01520.51770.01821.14420.2526
Vreg-0.39610.00950.39730.0066-0.33250.7395
+ +Table 2: Statistics values of EReg and Vreg on different datasets. The t-test is conducted between legit/non-rumours/related and fake/rumours/conspiracy. The complete statistics on PHEME and COCO can be found in Table 13 in the Appendix G. + +of 12 conspiracy theory categories1. Each tweet in COCO is assigned an overall intention label, as follows: **Conspiracy** is assigned to tweets for which the tweet is related to at least one of the 12 categories and is actively spreading conspiracy theories. Otherwise, if the tweet is related to the specific category, but it does not propagate misinformation or conspiracy theories, then the overall label of Re + +lated is used. The overall label of Unrelated is only used for tweets that are unrelated to all 12 conspiracy categories. We remove the Unrelated text since the aim of the cross-domain test. + +For AMTCele and PHEME, we apply leave-one-domain-out strategy² to evaluate the model. For COCO dataset, due to one text data may involve + +one or multiple topics, we select all data points involving the Fake Virus, Harmful Radiation, and Depopulation topics as the test set, and the other topics as the retrieval dataset. + +# 2.1.2 Affective Analysis + +We firstly conduct a comprehensive affective analysis after collecting datasets. EmoLLaMA-chat-7B, which has the best overall performance among the EmoLLMs (Liu et al., 2024c), is used for affective analysis. EmoLLaMA-chat-7B can be used to extract five kinds of affective dimensions (which we jointly call affect), including Emotion intensity (EIreg), Emotion intensity classification (Eloc), Sentiment (valence) strength (Vreg), Sentiment (valence) classification (Voc) and Emotion detection (Ec). The detailed introduction can be found in Appendix G.1. + +Obtain implicit and explicit affective information: Following the guidelines of EmoLLMs (Liu et al., 2024c), we add prompts provided by EmoLLMs for each data point in order to obtain vectors from the last hidden layer (i.e., 4096d) for each affective dimension, as well as final labels using EmoLLaMA-chat-7B. We subsequently determine the distribution of affective information in different categories in each dataset. + +Explicit affective analysis: Table 2 and Table 13 show regression information (i.e., EReg and Vreg) of final labels. We use the t-test3 to measure the difference in emotional intensity between two sets of data. The t-value and p-value calculated between legit/non-rumours/related and fake/rumours/conspiracy demonstrate that there are statistically significant affective differences between the different categories. Figure 3 to Figure 8 and the chi-squared test in Appendix G.2 confirm that other classifications using affective information are also related to misinformation. However, Table 2 also presents some special cases that cannot effectively distinguish real and false information (e.g. EReg-sadness in PHEME, Vreg in COCO). Liu et al. (2024b) also conducted some experiments that demonstrated that simply utilizing explicit affective information does not enhance the model's capability. Therefore, we introduce implicit affective information. + +Implicit affective analysis: Table 14 shows statistics of different affective embeddings (i.e. last hidden layer of EmoLLaMA-chat-7B). We perform t-tests on the top- $K$ cosine similarity within categories and across categories. The results indicate that the similarity within categories is significantly higher than across categories, confirming that similar top- $K$ data points are likely to belong to the same category (further analysis can be found in Appendix G.2). We also visualize the data distribution reduced to 3 dimensions using PCA in Figures 9 and 10 in Appendix. It can be observed that different categories are clearly separated in the latent space. All the above demonstrate the close relationship between affective information and misinformation. + +# 2.1.3 Retrieval Database Construction + +After obtaining the implicit affective embeddings in the previous step, we proceed to construct a comprehensive retrieval database. This database consists of vectors that encapsulate rich affective information, enabling efficient retrieval and analysis. + +# 2.2 Retrieval Module + +Algorithm 1 Retrieval process +Require: Target domain corpus $D_{T}$ , source domain corpus $D_{S}$ , retrieval database $R$ . +Ensure: Target domain corpus with top K retrieval examples $D_{retri}$ . +1: $E_{T} \gets R(D_{T})$ +2: $E_{S} \gets R(D_{S})$ +3: for $e_t$ in $E_{T}$ do +4: for $e_s$ in $E_{S}$ do +5: score = cosine $(e_t, e_s)$ +6: Sco ← score +7: end for +8: $D_{retri} \gets$ select top k examples in $R(D_{S})$ according to Sco +9: end for + +The retrieval database constructed in Sec 2.1 is represented as R. Algorithm 1 shows the retrieval process. In this module, we first process the multi-domain datasets into text-label pairs to obtain the target domain data $D_{T} = \{[c_{t1},l_{t1}],\{c_{t2},l_{t2}\},\dots,\{c_{tN},l_{tN}\} \}$ and source domain data $D_{S} = \{[c_{s1},l_{s1}],\{c_{s2},l_{s2}\},\dots,\{c_{sM},l_{sM}\} \}$ (c denotes corpus text, and $l$ is the label. $N$ and $M$ are the numbers of target domain data and source domain data respectively). Following that, we obtain the target domain affective embedding $E_{T} = [e_{t1},e_{t2},\dots,e_{tN}]$ and source domain + +affective embedding $E_S = [e_{s1}, e_{s2}, \dots, e_{sM}]$ through the embedding retrieval database R based on the corpus texts in $D_T$ and $D_S$ . Subsequently, we traverse the target domain embedding $(e_t)$ in $E_T$ and calculate the similarity values with each source domain embedding $e_s$ from $E_S$ using the cosine method. Finally, we select the top k examples from source domain for each target domain data based on Sco to $D_{retri}$ , which will be the few-shot examples for LLM inference. + +# 2.3 Inference Module + +We apply template 1 to construct the instruction datasets for inference once we get the top examples for each target domain data. [task prompt] denotes the instruction for the task (The different [task prompts] for each datasets can be found in Appendix B). [input text] is a data item from the target domain data. [examples] are the retrieval examples from source domain data (i.e. $D_{\text{retri}}$ ) and the [output] is the output from LLM. + +# Template 1 + +Task: [task prompt] + +Target text: [input text] + +Here are a few examples: [examples] + +According to the above information, the label of target + +text: [output] + +We also apply template 2 to add explicit affective information. [affective information] contains five dimensions described in Section 2.1.2. The format of [examples] is "Text: [text]. [Affective info]: [value]. The label of text: [label)". Table 6 shows one complete example. + +# Template 2 + +Task: [task prompt] + +Target text: [input text] + [affective info] + +Here are a few examples retrieved by [affective info]: [examples] + +According to the above information, the label of target text: [output] + +# 3 Experiments + +# 3.1 Base Models + +- LLMs: We apply ChatGPT (gpt-3.5-turbo-0125), GPT-4o $^4$ , Llama3-8b-Instruct, Llama3.2-(1b,3b)-Instruct $^5$ , Gemma-instruct-(2b, 7b) (Team et al., 2024), Mistral-7b-Instruct (Jiang et al., 2023) and Vicuna-(7b, 13b, 33b) (Chiang et al., 2023) as base models to test our methods. +- PLMs: We select BERT (Devlin et al., 2018) and RoBERTa (Liu et al., 2019) as fine-tuning baselines. Specifically, one domain is selected as the target domain, other domains are used as the training dataset to fine-tune. + +4https://openai.com/ +5https://llama.meta.com/llama3/ + +- Domain generalization methods (DGMs): MOSE (Qin et al., 2020) is a multi-domain mixture-of-experts (MoE) model, and each domain has its specific head. EDDFN (Silva et al., 2021) preserves domain-specific and domain-shared knowledge. MDFEND (Nan et al., 2021) utilizes a Domain Gate to select useful experts of MoE. CANMD (Yue et al., 2022) performs label shift correction and contrastive learning. MetaAdapt (Yue et al., 2023) adopts a meta-learning approach for domain-adaptive few-shot misinformation detection. +- Retrieval method according to other types of embeddings: We use the last Hidden state of RoBERTa and another popular sentiment model (i.e. Sentibert (Yin et al., 2020)) as semantic and another kind of sentiment representation of each sentence respectively, then apply the same process of RAEmoLLM to deploy the ablation experiment. +- Zero-shot and few-shot methods: We also develop experiments of zero-shot method (LLMs-zs), randomly sample examples without using affective information (LLMs-random), and randomly sample examples with explicit Vreg information (LLMs-random-addexpl) for baselines. + +# 3.2 Evaluation Metric + +Misinformation detection is typically regarded as a classification task, therefore we employ a variety of metrics—Accuracy, Precision, Recall, and F1 for evaluation (Su et al., 2020) (All metrics use the weighted variant). + +# 3.3 Results + +We evaluate RAEmoLLM framework on one Nvidia Tesla A100 GPU with 80GB of memory. The max length of new tokens is 256 and do_sample is False. Others all use the default setting in the "model_generate" package. We firstly select the instruction data based on Vreg to test the effectiveness of the RAEmoLLM framework on different LLMs. The result is the overall performance, which means that in AMTCele and PHEME, every domain is considered as the target domain test set, and the overall result is the performance of the combination of each domain test set. For Gemma series, Llama series and Vicuna series, we only show the best overall performing one in the table. In this section, we will be discussing results exclusively based on the F1 score. We firstly compare the RAEmoLLM framework with various baseline methods (e.g. PLMs, domain generalization methods, zero-shot, and few-shot methods) at Sec. 3.3.1. The ablation study of each module is conducted at Sec. 3.3.2. We subsequently compare the results on the data retrieved based on different affective information at Sec. 3.3.3. + +
ModelAMTCelePHEMECOCO
AccPreRecF1AccPreRecF1AccPreRecF1
BERT0.54140.54530.54140.53220.72140.72030.72140.72080.72880.75100.72880.6356
RoBERTa0.56780.72280.56780.47300.71990.72130.71990.72040.73280.78510.73280.6388
MDFEND0.58780.59340.58780.58150.57960.64250.57960.58290.79880.79390.79880.7793
EDDFN0.70410.73130.70410.69510.70040.69250.70040.68160.71160.50640.71160.5917
MOSE0.50310.50510.50310.44820.71350.71300.71350.68900.71980.73350.71980.6162
CANMD0.62960.66500.62960.60860.73820.73380.73820.73460.72910.73240.72910.6441
MetaAdapt0.64290.65640.64290.63500.61930.68040.61930.62300.51860.72670.51860.5222
Mistral-7b-zs0.70200.73460.70200.69260.58970.64910.58970.59360.36860.70500.36860.4673
Mistral-7b-random0.70820.77680.70820.68890.61770.63340.61770.62270.71280.74550.71280.7287
Mistral-7b-random-addexpl0.63370.70500.63370.59880.58040.61770.58040.58700.68020.72450.68020.7010
Mistral-7b-Vreg0.74690.77480.74690.74040.67600.68370.67600.67880.77790.80310.77790.7898
Mistral-7b-Vreg-addexpl0.77350.78220.77350.77170.69210.69190.69210.69200.78140.80530.78140.7931
Gemma-2b-zs0.41530.45680.41530.38150.36060.51130.36060.23030.33020.45720.33020.3835
Gemma-2b-random0.49800.49970.49800.46490.42690.57990.42690.35750.44770.63360.44770.4816
Gemma-2b-random-addexpl0.49290.49280.49290.49270.59140.57770.59140.58200.62210.61640.62210.5587
Gemma-2b-Vreg0.62350.62980.62350.62130.43610.59530.43610.37080.53020.73260.53020.5814
Gemma-2b-Vreg-addexpl0.58470.61900.58470.55250.58750.58460.58750.58590.67670.69320.67670.5990
Llama3.2-1b-zs0.47960.48410.47960.48010.55490.44800.55490.47120.58260.59970.58260.5385
Llama3.2-1b-random0.53980.54830.53980.52220.39490.48310.39490.34170.71160.50640.71160.5917
Llama3.2-1b-random-addexpl0.48670.48680.48670.47820.41180.48210.41180.39960.71160.50640.71160.5917
Llama3.2-1b-Vreg0.61730.63600.61730.60650.62540.64320.62540.63070.72330.76400.72330.6242
Llama3.2-1b-Vreg-addexpl0.64290.64600.64290.64380.64730.68310.64730.65350.73720.77180.73720.6545
ChatGPT-zs0.72650.74200.72650.72210.52360.65510.52360.50320.78600.79200.78600.7551
ChatGPT-random0.69900.74750.69900.68350.61730.65390.61730.62340.76160.77820.76160.7079
ChatGPT-random-addexpl0.69590.71930.69590.68760.60920.65840.60920.61440.76510.78240.76510.7174
ChatGPT-Vreg0.67450.73660.67450.65160.63700.66810.63700.64290.81510.82490.81510.7925
ChatGPT-Vreg-addexpl0.71630.76280.71630.70320.63180.67620.63180.63720.80120.80680.80120.7772
GPT4o-zs0.88160.88560.88160.88130.61700.63980.61700.62280.78370.81500.78370.7396
GPT4o-random0.87760.88500.87760.87700.67390.68300.67390.67710.82910.85260.82910.8090
GPT4o-random-addexpl0.87240.88240.87240.87160.65590.66930.65590.66010.83370.85270.83370.8158
GPT4o-Vreg0.88880.89340.88880.88840.70040.69830.70040.69920.84770.86270.84770.8326
GPT4o-Vreg-addexpl0.88470.89120.88470.88420.71550.71700.71550.71620.84190.86050.84190.8242
Vicuna-7b-zs0.54900.55450.54900.53840.43780.65020.43780.35420.29420.70540.29420.1592
Vicuna-7b-random0.58370.58720.58370.58060.40730.61160.40730.30170.70700.60370.70700.5928
Vicuna-7b-random-addexpl0.56220.60400.56220.52060.53340.58490.53340.54230.70230.50630.70230.5884
Vicuna-7b-Vreg0.60000.60690.60000.60230.45120.65490.45120.38210.78370.79990.78370.7471
Vicuna-7b-Vreg-addexpl0.63160.66800.63160.62480.60650.61450.60650.61050.77560.79560.77560.7501
+ +Table 3: Overall results on three datasets. "zs" denotes the zero-shot method. "random" denotes randomly sample four examples without using affective information. "random-addexpl" denotes adding explicit Vreg information for the random sample examples. "Vreg" denotes retrieving four examples based on Vreg information using Template 1. "Vreg-addexpl" denotes adding explicit Vreg information using Template 2. + +# 3.3.1 Comparison with baselines + +(1) Comparison with PLMs and other domain generalization methods: We can observe that most LLMs with RAEmoLLM framework outperform fine-tuned RoBERTa, BERT, and DGMs on AMTCele and COCO datasets, but they slightly underperform fine-tuned models and some DGMs in the PHEME dataset. One possible reason is that in cross-domain misinformation detection tasks, the fine-tuning method may perform better for simple short-text discrimination problems in the largescale dataset (e.g. PHEME). However, they may not be suitable for long texts (e.g. AMTCele) or complex tasks (e.g. intent recognition in COCO), especially in small datasets. We can see that the current DGMs do not have stable performance on different datasets, although they have complex structures. And their results are lower than the + +best performance of LLMs with the RAEmoLLM framework in most cases. + +(2) Comparison with zero-shot method (LLMs-zs), random few-shot methods (LLMs-random, LLMs-random-addexpl): From Table 3, we can observe that the RAEmoLLM framework largely increases the LLMs with zero-shot method in most cases and performs better than the random few-shot methods (For random few-shot, the largest increase in AMTCele is Gemma-2b (+15.64%), in PHEME is Llama3.2-1b (+31.18%), and in COCO is Vicuna-7b (+15.73%)). The results of LLMs-random-addexpl show that simply applying explicit information has little effect in most cases7. A special case is that in the AMTCele dataset, GPT-4o and ChatGPT perform well in zero + +shot settings, with ChatGPT even surpassing other few-shot methods. One possible reason is that the AMTCele dataset is collected from fact-checking websites, and ChatGPT's and GPT-4o's training set includes the data and can effectively utilize this information. One example is shown in Table 10. + +Table 7 and Table 8 in Appendix C present the performance of Mistral-7b on each domain on AMTCele and PHEME separately. It can be observed that Mistral-7b with RAEmoLLM framework overtakes Mistral with zero-shot and few-shot methods in most domains except for the prince domain in PHEME, which has significantly imbalanced data. Additionally, we also conduct some special cases analysis in Appendix D. + +# 3.3.2 Ablation analysis of each module + +(1) Index Construction Module (retrieval based on different information): From Table 3, we can observe retrieval based on affective information (LLMs-Vreg, LLMs-Vreg-addexpl) overtake non-retrieval methods (i.e. random few-shot methods (LLMs-random, LLMs-random-addexpl)). From Table 4, we can observe that the RAEmoLLM framework achieves the best results compared to other types of embeddings, which indicates the effectiveness of Vreg embedding. + +
AMTPHEMECOCO
Mistral-7b-Vreg0.74040.67880.7898
Mistral-7b-Vreg-addexpl0.77170.69200.7931
Mistral-7b-semantic0.69040.67180.7771
Mistral-7b-sentibert0.69840.66630.7687
+ +(2) Retrieval Module (different numbers of retrieval examples): Table 5 presents the F1 score of retrieval of different numbers of examples based on Vreg (we only tested 16 examples in the AMTCele dataset due to its long text). From the table, it can be observed that increasing the retrieval examples does not consistently improve the model's performance, and it may even lead to a decline in its performance (e.g. Vreg-addexpl in COCO). One possible reason is that when the model has multiple examples as references, it needs to consider a large amount of information comprehensively, which depends on the model's capability. Another reason we can infer from Table 14. For the three datasets, the p-values in retrieval top 4 examples are all zero. However, as the number of retrieval examples in + +Table 4: F1 score of retrieval using different kinds of embeddings. "semantic" denotes retrieval based on RoBERTa. + +
Datasetsmethods48163264
AMTCeleRandom0.68890.70060.6287--
Vreg0.74040.73950.7271--
Vreg-addexpl0.77170.76110.7710--
PHEMERandom0.62270.62530.62680.64000.6353
Vreg0.67880.68560.68300.69100.7031
Vreg-addexpl0.69200.69490.69790.69790.6990
COCORandom0.72870.75340.74420.76280.7541
Vreg0.78980.78420.78540.81720.7993
Vreg-addexpl0.79310.72080.74990.76000.7475
+ +Table 5: F1 score of Mistral-7b with retrieval of different numbers of examples based on Vreg. + +creases, the second p-values in AMTCele and the first p-value in COCO dataset also gradually increase. This indicates that the retrieved content may come from another category or unrelated examples, thereby affecting the model's judgment ability. Therefore, when employing retrieval augmentation techniques, it is not just about blindly increasing the number of examples, but rather selectively choosing the most useful examples. + +(3) Inference Module (different templates and different base LLMs): We can see LLMs with explicit affective information based on Template 2 (i.e. LLMs-Vreg-expl) exceed LLM without explicit affective information based on Template 1 (i.e. LLMs-Vreg) in most cases. For LLMs-zs and LLMs-random, different base models show significant performance differences. GPT-4o performs the best, followed by ChatGPT and Mistral-7b, while the Gemma-2b model has the lowest score. After using RAEmoLLM framework, the difference between different modules becomes narrowing (e.g. Mistral-7b has achieved or even surpassed the performance of ChatGPT.) + +Based on the analysis above, we can conclude that retrieval based on implicit affective information and adding explicit affective information through Template 2 is the most effective way to enhance the LLMs' performance in using Vreg affective cases. The number of retrieval examples seems to have little impact. The LLMs focus on the most relevant examples. + +Table 3 shows that Mistral-7b has the best performance among open-sourced LLMs. We choose Mistral-7b to conduct the following experiments. + +# 3.3.3 Results on the data retrieved based on different affective information + +Figure 2 presents the results of retrieval with different affective embeddings. For retrieval using affective regression information (i.e. Vreg, EReg), it is evident that adding explicit affective information (affect-addexpl) method can improve the per + +![](images/c69bb4756b3055acd0f2d57b58f125d781e932619dcaa123967dc20778e90d16.jpg) +Figure 2: Results of Mistral-7b based on different affective information on three datasets. "affect" denotes retrieving four examples based on one affective information using Template 1. "affect-addexpl" denotes adding explicit affective information using Template 2. + +![](images/b32620ee7c56c86c5c0fac721f27bd6a870b2b55b91646be40f9baedc038d21c.jpg) + +![](images/022f790d62deb0fb9fc99302283ec3fe1777be9c8eb24ca7150a867c61a880ca.jpg) + +formance compared to solely relying on implicit affective information retrieval (affect). However, when using affective classification information (e.g. ELoc in AMTCele and PHEME), adding explicit affective information may confuse the model. In the COCO dataset, all the affect-addexpl method outperforms affect except for EReg-fear. Regarding the affect-addexpl method, in AMTcele, we can see the results retrieval based on Vreg are best, followed by EReg-sadness and EReg-joy. And the final three rankings are retrieved based on ELocanger, fear, and sadness. It seems that affective intensity and strength are more suitable for cross-domain fake news detection tasks. In PHEME, retrieval based on Ec exhibits the highest performance, with the Vreg and EReg series closely trailing behind. While the last few are the ELoc series, which may suggest that a coarse-grained emotional intensity classification is not suitable for rumour detection. However, it is the opposite in the conspiracy theory dataset. In COCO, the performance of retrieval based on the ELoc series is better than that based on the EReg series. This could be attributed to the dataset's focus on COVID-19 topic, which may elicit more consistent emotional expressions among individuals. + +# 4 Conclusion and Future Work + +In this paper, we propose RAEmoLLM, the first RAG framework to address cross-domain misinformation detection using in-context learning based on affective information. We introduce the three modules of RAEmoLLM. We also conduct a comprehensive affective analysis for three public misinformation datasets. We evaluate the performance of RAEmoLLM on the three misinformation bench + +marks based on various LLMs. The results show that RAEmoLLM can significantly improve LLMs compared to the zero-shot method and other few-shot methods, which illustrates the effectiveness of RAEmoLLM. We also conduct an ablation analysis of each module and analyze the performance of retrieval based on different affective information, which provide a foundation for further improvements in the future. + +In the future, we will explore the application of multimodal affective information in the task of detecting misinformation. We will also evaluate the application of the RAEmoLLM framework in other fields (e.g. mental health and finance). In addition to affective information, there are many other influencing factors in misinformation, such as stance and topic. We will combine sentiments and emotions with other features to construct a more robust retrieval database. Furthermore, the retrieval process can be slowed down by a large amount of data. In the future, we will also explore more efficient retrieval methods. + +# 5 Limitations + +Due to restricted computational resources, we only carried out inference of 1B, 2B, 7B, 8B, 13B, and 33B open-sourced LLMs. As such, we have not considered how the use of larger or different model architectures may potentially impact upon performance in cross-domain misinformation detection tasks. + +Though achieving outstanding performance, RAEmoLLM still bears limitations. Firstly, for domain data with imbalanced distribution, RAEmoLLM performs worse compared to zero-shot methods (e.g. prince domain in PHEME). The + +special cases analysis in Appendix D also illustrates that in the imbalanced datasets, the retrieval in RAEmoLLM will be influenced for some special cases. Therefore, further exploration is needed to address such issues. Secondly, in the PHEME dataset, RAEmoLLM performs worse than finetuning methods without emotional information. This indicates that for simple tasks with shorter texts, the model still struggles to effectively balance textual features and emotional information. + +# Acknowledgments + +This work is supported by the Turing Scheme Fund, the Manchester-Melbourne-Toronto Research Fund, the Centre for Digital Trust and Society at the University of Manchester, and the New Energy and Industrial Technology Development Organization. This work is also supported by the scholar award from the Department of Computer Science at the University of Manchester. + +# References + +Tsun-Hin Cheung and Kin-Man Lam. 2023. Factllama: Optimizing instruction-following language models with external knowledge for automated fact-checking. In 2023 Asia Pacific Signal and Information Processing Association Annual Summit and Conference (APSIPA ASC), pages 846-853. IEEE. +Wei-Lin Chiang, Zhuohan Li, Zi Lin, Ying Sheng, Zhanghao Wu, Hao Zhang, Lianmin Zheng, Siyuan Zhuang, Yonghao Zhuang, Joseph E Gonzalez, et al. 2023. Vicuna: An open-source chatbot impressing gpt-4 with $90\%$ chatgpt quality. See https://vicuna.lmsys.org (accessed 14 April 2023), 2(3):6. +Arjun Choudhry, Inder Khatri, Arkajyoti Chakraborty, Dinesh Vishwakarma, and Mukesh Prasad. 2022. Emotion-guided cross-domain fake news detection using adversarial domain adaptation. In Proceedings of the 19th International Conference on Natural Language Processing (ICON), pages 75-79. +Carmela Comito, Francesco Sergio Pisani, Erica Coppolillo, Angelica Liguori, Massimo Guarascio, and Giuseppe Manco. 2023. Towards self-supervised cross-domain fake news detection. +Nicholas Della Giustina. 2023. Misinformation and its effects on individuals and society from 2015-2023: A mixed methods review study. +Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2018. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805. + +Diwen Dong, Fuqiang Lin, Guowei Li, and Bo Liu. 2022a. Sentiment-aware fake news detection on social media with hypergraph attention networks. In 2022 IEEE International Conference on Systems, Man, and Cybernetics (SMC), pages 2174-2180. IEEE. +Qingxiu Dong, Lei Li, Damai Dai, Ce Zheng, Zhiyong Wu, Baobao Chang, Xu Sun, Jingjing Xu, and Zhifang Sui. 2022b. A survey on in-context learning. arXiv preprint arXiv:2301.00234. +Nida Manzoor Hakak, Mohsin Mohd, Mahira Kirmani, and Mudasir Mohd. 2017. Emotion analysis: A survey. In 2017 international conference on computer, communications and electronics (COMPTELIX), pages 397-402. IEEE. +Beizhe Hu, Qiang Sheng, Juan Cao, Yuhui Shi, Yang Li, Danding Wang, and Peng Qi. 2024. Bad actor, good advisor: Exploring the role of large language models in fake news detection. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 38, pages 22105-22113. +Albert Q Jiang, Alexandre Sablayrolles, Arthur Mensch, Chris Bamford, Devendra Singh Chaplot, Diego de las Casas, Florian Bressand, Gianna Lengyel, Guillaume Lample, Lucile Saulnier, et al. 2023. Mistral 7b. arXiv preprint arXiv:2310.06825. +Suzanne Keen. 2006. A theory of narrative empathy. Narrative, 14(3):207-236. +Elena Kochkina, Maria Liakata, and Arkaitz Zubiaga. 2018. All-in-one: Multi-task learning for rumour verification. In Proceedings of the 27th International Conference on Computational Linguistics, pages 3402-3413. +Johannes Langguth, Daniel Thilo Schroeder, Petra Filkukova, Stefan Brenner, Jesper Phillips, and Konstantin Pogorelov. 2023. Coco: an annotated twitter dataset of Covid-19 conspiracy theories. Journal of Computational Social Science, pages 1-42. +Guanghua Li, Wensheng Lu, Wei Zhang, Defu Lian, Kezhong Lu, Rui Mao, Kai Shu, and Hao Liao. 2024. Re-search for the truth: Multi-round retrieval-augmented large language models are strong fake news detectors. arXiv preprint arXiv:2403.09747. +Miaoran Li, Baolin Peng, and Zhu Zhang. 2023. Self-checker: Plug-and-play modules for fact-checking with large language models. arXiv preprint arXiv:2305.14623. +Yinheng Li. 2023. A practical survey on zero-shot prompt design for in-context learning. arXiv preprint arXiv:2309.13205. +Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2019. Roberta: A robustly optimized bert pretraining approach. arXiv preprint arXiv:1907.11692. + +Yinpeng Liu, Jiawei Liu, Xiang Shi, Qikai Cheng, and Wei Lu. 2024a. Let's learn step by step: Enhancing in-context learning ability with curriculum learning. arXiv preprint arXiv:2402.10738. +Zhiwei Liu, Boyang Liu, Paul Thompson, Kailai Yang, and Sophia Ananiadou. 2024b. Conspemollm: Conspiracy theory detection using an emotion-based large language model. In ECAI 2024, pages 4649-4656. IOS Press. +Zhiwei Liu, Kailai Yang, Tianlin Zhang, Qianqian Xie, Zeping Yu, and Sophia Ananiadou. 2024c. Emollms: A series of emotional large language models and annotation tools for comprehensive affective analysis. arXiv preprint arXiv:2401.08508. +Zhiwei Liu, Tianlin Zhang, Kailai Yang, Paul Thompson, Zeping Yu, and Sophia Ananiadou. 2024d. Emotion detection for misinformation: A review. Information Fusion, page 102300. +Quanyu Long, Wenya Wang, and Sinno Jialin Pan. 2023. Adapt in contexts: Retrieval-augmented domain adaptation via in-context learning. arXiv preprint arXiv:2311.11551. +Qiong Nan, Juan Cao, Yongchun Zhu, Yanyan Wang, and Jintao Li. 2021. Mdfend: Multi-domain fake news detection. In Proceedings of the 30th ACM International Conference on Information & Knowledge Management, pages 3343-3347. +Verónica Pérez-Rosas, Bennett Kleinberg, Alexandra Lefevre, and Rada Mihalcea. 2018. Automatic detection of fake news. In Proceedings of the 27th International Conference on Computational Linguistics, pages 3391-3401. +Zhen Qin, Yicheng Cheng, Zhe Zhao, Zhe Chen, Donald Metzler, and Jingzheng Qin. 2020. Multitask mixture of sequential experts for user activity streams. In Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pages 3083-3091. +Tanik Saikh, Arkadipta De, Asif Ekbal, and Pushpak Bhattacharyya. 2020. A deep learning approach for automatic detection of fake news. arXiv preprint arXiv:2005.04938. +Dietram A Scheufele and Nicole M Krause. 2019. Science audiences, misinformation, and fake news. Proceedings of the National Academy of Sciences, 116(16):7662-7669. +Jiao Shi, Xin Zhao, Nan Zhang, Yu Lei, and Lingtong Min. 2023. Rough-fuzzy graph learning domain adaptation for fake news detection. IEEE Transactions on Computational Social Systems. +Amila Silva, Ling Luo, Shanika Karunasekera, and Christopher Leckie. 2021. Embracing domain differences in fake news: Cross-domain fake news detection using multi-modal data. In Proceedings of the AAAI conference on artificial intelligence, volume 35, pages 557-565. + +Qi Su, Mingyu Wan, Xiaoqian Liu, and Chu-Ren Huang. 2020. Motivations, methods and metrics of misinformation detection: an nlp perspective. Natural Language Processing Research, 1(1-2):1-13. +Wei Tang, Zuyao Ma, Haifeng Sun, and Jingyu Wang. 2023. Learning sparse alignments via optimal transport for cross-domain fake news detection. In ICASSP 2023-2023 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 1-5. IEEE. +Gemma Team, Thomas Mesnard, Cassidy Hardin, Robert Dadashi, Surya Bhupatiraju, Shreya Pathak, Laurent Sifre, Morgane Riviere, Mihir Sanjay Kale, Juliette Love, et al. 2024. Gemma: Open models based on gemini research and technology. arXiv preprint arXiv:2403.08295. +Yu Tong, Weihai Lu, Zhe Zhao, Song Lai, and Tong Shi. 2024. Mmdfnd: Multi-modal multi-domain fake news detection. In ACM Multimedia 2024. +Liang Wang, Nan Yang, and Furu Wei. 2023. Learning to retrieve in-context examples for large language models. arXiv preprint arXiv:2307.07164. +Xinyi Wang, Wanrong Zhu, Michael Saxon, Mark Steyvers, and William Yang Wang. 2024. Large language models are latent variable models: Explaining and finding good demonstrations for in-context learning. Advances in Neural Information Processing Systems, 36. +Yi Wu, Ziqiang Li, Chaoyue Wang, Heliang Zheng, Shanshan Zhao, Bin Li, and Dacheng Tao. 2024. Domain re-modulation for few-shot generative domain adaptation. Advances in Neural Information Processing Systems, 36. +Shangqing Xu and Chao Zhang. 2024. Misconfidence-based demonstration selection for llm in-context learning. arXiv preprint arXiv:2401.06301. +Xin Xu, Yue Liu, Panupong Pasupat, Mehran Kazemi, et al. 2024. In-context learning with retrieved demonstrations for language models: A survey. arXiv preprint arXiv:2401.11624. +Keyang Xuan, Li Yi, Fan Yang, Ruochen Wu, Yi R Fung, and Heng Ji. 2024. Lemma: Towards lvm-enhanced multimodal misinformation detection with external knowledge augmentation. arXiv preprint arXiv:2402.11943. +Da Yin, Tao Meng, and Kai-Wei Chang. 2020. Sentibert: A transferable transformer-based architecture for compositional sentiment semantics. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 3695–3706. +Zhenrui Yue, Huimin Zeng, Ziyi Kou, Lanyu Shang, and Dong Wang. 2022. Contrastive domain adaptation for early misinformation detection: A case study on COVID-19. In Proceedings of the 31st ACM International Conference on Information & Knowledge Management, pages 2423-2433. + +Zhenrui Yue, Huimin Zeng, Yimeng Lu, Lanyu Shang, Yang Zhang, and Dong Wang. 2024. Evidence-driven retrieval augmented response generation for online misinformation. In Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), pages 5628-5643. + +Zhenrui Yue, Huimin Zeng, Yang Zhang, Lanyu Shang, and Dong Wang. 2023. Metaadapt: Domain adaptive few-shot misinformation detection via meta learning. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 5223-5239. + +Shengyu Zhang, Linfeng Dong, Xiaoya Li, Sen Zhang, Xiaofei Sun, Shuhe Wang, Jiwei Li, Runyi Hu, Tianwei Zhang, Fei Wu, et al. 2023a. Instruction tuning for large language models: A survey. arXiv preprint arXiv:2308.10792. + +Xuewen Zhang, Yaxiong Pan, Xiao Gu, and Gang Liang. 2023b. Sentiment analysis-based social network rumor detection model with bi-directional graph convolutional networks. In International Conference on Computer Application and Information Security (ICCAIS 2022), volume 12609, pages 463-469. SPIE. + +# A Related Work + +# A.1 Minformation detection + +Cross-domain misinformation detection: Cross-domain misinformation detection refers to identifying and detecting misleading or false information across different domains or sources. Comito et al. (2023) propose a deep learning-based architecture to mitigate this problem by yielding high-level cross-domain features. Tang et al. (2023) design one framework to learn transferable features across domains by aligning the source and target news using Optimal Transport techniques. Shi et al. (2023) develop a rough-fuzzy graph learning framework that uses representations of cross-domain sample uncertainty structural information, and captures shared general features across domains. Tong et al. (2024) integrate domain embeddings and attention mechanisms for domain-specific knowledge extraction and combine techniques to obtain multi-domain and multi-modal information. Nan et al. (2021) adopt domain gates to aggregate multiple representations extracted by a mixture of experts (MoE) for fake news detection. Silva et al. (2021) jointly leverage domain-specific and cross-domain knowledge and introduces an unsupervised technique to train a multi-domain fake news detection model. Yue et al. (2022) propose a contrastive adaptation network, which leverages pseudo-labeling to + +generate target examples and design a label correction component to solve label shift problems. Yue et al. (2023) develop a domain-adaptive few-shot method based on meta-learning, which adopts limited target examples to provide feedback and guide knowledge transfer from the source domain to the target domain. However, these methods require complex structures and fine-tuning strategies. + +Retrieval augmented misinformation detection: Retrieval augmented generation (RAG) combines LLMs with retrieval systems to utilize external knowledge, enabling models to generate more accurate content. Xuan et al. (2024) leverage LVLM intuition and reasoning capabilities to enhance the accuracy of multimodal misinformation by retrieving external knowledge. Yue et al. (2024) collect supporting evidence from scientific sources and generate responses for combating misinformation online based on this evidence. Cheung and Lam (2023) adopt external, most up-to-date information available on the Internet to bridge the knowledge gap in an LLM to enhance fake news detection performance. Li et al. (2024) employ a multi-round retrieval strategy, which can extract key evidence from web sources for claim verification. These findings demonstrate the effectiveness of RAG technology in detecting misinformation. + +Affect-based misinformation detection: Emotion and sentiment are important features for misinformation detection (Liu et al., 2024d). Zhang et al. (2023b) combine the use of semantic and sentiment information, along with propagation information for rumour detection. Dong et al. (2022a) design a sentiment-aware hyper-graph attention network for fake news detection. Liu et al. (2024b) develop a conspiracy theory detection LLM by finetuning EmoLLaMA (Liu et al., 2024c). Choudhry et al. (2022) utilize emotional information for fake news detection based on an adversarial learning structure. Unfortunately, these works either have complex structural designs or fine-tuned models, which require significant time and computational resources. RAEmoLLM in this paper applies the ICL method based on retrieving demonstration examples through affective information, which has a simple structure and does not involve fine-tuning. + +# A.2 In-context learning + +In-context learning (ICL) is a specific prompting engineering method, in which the task demonstrations are included in prompts for LLMs learning (Xu et al., 2024). Wang et al. (2023) develop a + +framework to provide high-quality context examples for LLMs, which firstly evaluate the quality of candidate examples through a reward model, and then conduct knowledge distillation to train a dense retriever. Wang et al. (2024) introduce an algorithm that utilizes a small LM to select the best demonstrations from a set of annotated data, and subsequently expand these demonstrations to larger LMs. Liu et al. (2024a) develop in-context curriculum learning, a simple but helpful demonstration ordering method for ICL that gradually increases the complexity of prompt demonstrations. Xu and Zhang (2024) propose in-context reflection to strategically select demonstrations that reduce the discrepancy between the LLM's outputs and the actual input-output mappings. Long et al. (2023) propose a retrieval-enhanced language model to address cross-domain problems, in which they train language models by learning both target domain distribution and the discriminative task signal simultaneously with the augmented cross-domain in-context examples. Inspired by these works, we propose the RAEmoLLM. + +# B Task Prompt and Instruction Example + +For AMTCele, we utilize "Determine whether the target text is 0. Fake or 1. Legit." For PHEME, we employ "Determine if the target text is 0. non-rumours or 1. rumours." For COCO, we apply "Classify the text regarding COVID-19 conspiracy theories or misinformation into one of the following three classes: 0. Unrelated. 1. Related (but not supporting). 2. Conspiracy (related and supporting)." Here we keep the 0. Unrelated category to test the robustness of the LLM by increasing the complexity of the task. + +Table 6 presents a specific instruction example. + +# C The results from different domains in the AMTCele and PHEME datasets. (Table 7 and 8) + +# D Special cases analysis + +Misinformation and true information often convey different affective information (as shown in Table 2 and Table 13). For example, fake news and conspiracy theories tend to evoke more negative sentiments and emotions (e.g. anger or fear) and less joy. However, these results are based on statistics derived from the entire dataset. The special cases need to be analyzed. We investigate some special + +Task: Determine if the target text is 0. non-rumours or 1. rumours. +Target text: UPDATE: Reports of 1 more shooter being SHOT. This is in addition to one shot and killed earlier in Parliament Hill #OttawaShooting. Sentiment intensity: 0.234. +Here are a few examples retrieved through sentiment intensity: +Text: UPDATE: Reports gunman says four devices are located around Sydney. Security response underway. Police calling for calm. #9News. Sentiment intensity: 0.429. The label of this text: 1. rumours. +Text: JUST IN: Police confirm to ABC there is a second hostage situation underway in eastern Paris. Sentiment intensity: 0.328. The label of this text: 1. rumours. +Text: UPDATE: There are reports police have discovered the identity of the lone gunman, with the #SydneySiege in its sixth hour. #9News Sentiment intensity: 0.435. The label of this text: 1. rumours. +Text: JUST IN: A separate shooting and hostage situation at a supermarket in eastern Paris has been reported ... developing. Sentiment intensity: 0.236. The label of this text: 1. rumours. +According to the above information, the label of target text: + +Table 6: An example in the PHEME instruction dataset. + +cases retrieved based on ELoc. The results are listed in Table 9. + +For AMTCele, we investigate cases where fake news lacks anger or exhibits higher levels of joy, as well as cases where legit news displays higher levels of anger or lacks joy. We can see that the examples retrieved are mostly of the same category as the target, and their results have not been greatly influenced. For PHEME and COCO, we calculate statistics on cases of rumour and conspiracy without fear or exhibiting higher levels of joy (we do not report conspiracy with higher joy due to its low occurrence), as well as cases where non-rumour and related display higher levels of fear or without joy. We can see that the results for rumours in PHEME and related in COCO are poor. The most likely reason is due to the imbalance of categories in the original data, and these special cases are in the minority. This has resulted in the retrieval of more data from the larger category in original datasets, causing the model to learn less useful information and ultimately affecting the final results. + +# E Data leakage example in AMTCele (Table 10) + +# F Comparison of time consumption between RAEmoLLM and fine-tuning methods (Table 11) + +We take the PHEME dataset (6425 items) as an example to compare the time consumption between RAEmoLLM (applying ChatGPT as the base + +
Modelbizeduentmtpolitsportstechcelebrity
AccF1AccF1AccF1AccF1AccF1AccF1AccF1
BERT0.59750.59300.57250.54360.58000.56100.54500.51800.55250.52930.56500.54090.51520.5039
Mistral-7b-zs0.72500.71350.80000.79540.76250.75950.57500.51570.77500.77140.60000.54420.69800.6925
Mistral-7b-random0.73750.72180.66250.61910.73750.72510.55000.43570.68750.67610.56250.45890.75800.7489
Mistral-7b-Vreg0.77500.76560.82500.82220.82500.82220.61250.57060.81250.80890.72500.70670.73200.7275
Mistral-7b-Vreg-addexpl0.80000.79680.86250.86200.85000.84960.66250.64230.83750.83730.86250.86070.73600.7346
+ +Table 7: The results from different domains in the AMTCele dataset + +
Modelsydneyseigeottawashootingcharliehebdofergusongermanwingsprinceputinmissinggurlittebola
AccF1AccF1AccF1AccF1AccF1AccF1AccF1AccF1AccF1
BERT0.74630.74180.74970.74900.79710.81130.70530.71470.72750.72600.12960.19850.58660.52970.53910.49490.57140.7220
Mistral-7b-zs0.65360.65520.65060.65040.60750.64070.40510.41460.67160.66380.73820.83440.55460.48070.44200.43890.42860.6000
Mistral-7b-random0.68220.68380.57190.52320.69460.71530.45060.46530.66520.66460.63950.76360.53780.45690.53620.42250.35710.5263
Mistral-7b-Vreg0.72150.71950.66520.65960.73350.75210.58180.61020.71430.71390.54510.68810.60080.57160.49280.45140.50000.6667
Mistral-7b-Vreg-addexpl0.74370.74030.67530.66830.74310.76130.65270.66550.70360.70330.45920.61280.60500.60230.43480.43080.42860.6000
+ +Table 8: The results from different domains in the PHEME dataset + +
DatasetsElocnumF1mean num of retrieval
legit/non-rum/relatedfake/rumour/consp
AMTfake anger=02180.81521.07802.9220
legit anger=2/3290.96432.24141.7586
fake joy=2/3140.66671.50002.5000
legit joy=03040.85712.12171.8783
PHEMEnon-rum fear=2/34460.69782.47761.5224
rumour fear=010390.38042.46581.5342
non-rum joy=037950.89492.90571.0943
rumour joy=2/3250.27593.76000.2400
COCOrelated fear=2/3470.55382.04261.9574
consp fear=01710.90730.97083.0292
realted joy==02460.76072.29271.7073
+ +Table 9: Special cases retrieval based on EIoc. "num" denotes number. "non-rum" denotes non-rumours. "const" denotes conspiracy. The "0", "2", and "3" in the EIoc column represent "no", "moderate", and "high" emotional intensity. + +
PromptNews content: Alex Jones Apologizes for Promoting 'Pizzagate' Hoax Alex Jones a prominent conspiracy theorist and the host of a popular right-wing radio show ... Where does this news come from?
GPT-3.5-truboThis news comes from a New York Times article
GPT-4oThe news about Alex Jones apologizing for promoting the Pizzagate conspiracy theory likely comes from a reputable news source such as The New York Times, The Washington Post, or another major media outlet that covers significant events and developments involving public figures and misinformation. The details provided in your question, such as the mention of "The Alex Jones Show" and the Pizzagate conspiracy, align with coverage typically found in mainstream news articles addressing misinformation and its impact.
+ +Table 10: Data leakage example in AMTCele + +model) and the fine-tuning method (BERT). From Table 11, it can be observed that RAEmoLLM will consume about 122s to construct the retrieval database (Obtain embeddings: 72s, Retrieval examples: 50s) and 208s to obtain the affective labels. For fine-tuning methods, we take BERT as an example. The current time consumed (Training each epoch: 3906s) by BERT was measured based on a single set of hyperparameters (e.g., batch size and learning rate). In practice, fine-tuning methods may require more time and effort to optimize hyperparameters. Overall, the RAEmoLLM process is simpler and more efficient. + +# G Affective analysis + +# G.1 Five types of affective information + +(1) Emotion intensity (EIreg): For each of four different emotions (anger, fear, joy and sadness), assign a score between 0 and 1 to represent the intensity of emotion of the text; +(2) Emotion intensity classification (Eloc): The text can be classified into one of four classes of the intensity of emotion (anger, fear, joy, sadness), i.e. no/low/moderate/high emotional intensity; +(3) Sentiment (valence) strength (Vreg): Assign a real-valued score between 0 (most negative) and 1 (most positive) to represent the sentiment intensity of the text. +(4) Sentiment (valence) classification (Voc): The text can be categorized into one of seven ordinal classes (i.e. {very, moderately, slightly} negative, neutral, {slightly, moderately, very} positive); +(5) Emotion detection (Ec): The text can be classified as 'neutral or no emotion' or as one, or more, of eleven given emotions (anger, anticipation, disgust, fear, joy, love, optimism, pessimism, sadness, surprise, trust). + +
RAEmoLLMObtain embeddings 71.68sObtain labels 208sRetrieval Examples 50sInference (time/item) 0.48s
BertTrain (time/epoch) 3906.31sInference (time/item) 0.093s
+ +Table 11: Time consumption of RAEmoLLM (take ChatGPT as base model) and fine-tuning methods (task BERT as the example) based on the PHEME dataset. + +# G.2 Further Affective Analysis + +We show the statistics values and distribution of labels and embeddings in this Section. In Figures 3 to Figure 8, the y-axis represents the distribution of labels within the intention class indicated on the x-axis. The affective analysis on COCO has been done by ConspEmoLLM (Liu et al., 2024b). The figures show that most fake information convey more negative sentiments/emotions and less positive emotions compared to real categories8. Figure 9 and Figure 10 present the 3D visualization of affective embeddings on AMTCele and PHEME respectively. Table 13 shows the statistics values of EReg and Vreg on PHEME and COCO. + +To explore the relationship between affective classification information and misinformation, we conduct a chi-squared significance test and create two categorical variables. One is the misinformation label (real and fake), and the other variable is affective information. For Eloc, we count the values for 0 (absence) and others (presence) of a certain emotion. For Voc, we count the values of 7 classes. For Ec, we count the number of instances that contain each of the 11 emotions individually. Assuming the null hypothesis that affective signals are independent of text truthfulness, the chi-squared test results in Table 12 show p-values close to 0, allowing us to reject the null hypothesis. Overall, affective classification signals are also statistically linked to the veracity of the news. + +Table 14 shows statistics of different affective embeddings (i.e. last hidden layer of EmoLLaMA-chat-7B). We perform t-tests on the top- $K$ cosine similarity within categories and the cosine similarity between categories. For example, "fake-legit" denotes computing the cosine similarity between each data point in the "fake" category and each data point in the "legit" category. We then selected the top- $K$ similarity values and performed t-test on them. The t-value and p-value of the top-4 similarity values between "fake-legit" and "fake-fake" + +are -22.516 and 0, which demonstrates that the top 4 similar data retrieved based on cosine similarity within the "fake" category are highly likely to belong to the same "fake" category. We can see from the results in Table 14 that all affective information leads to the same conclusion in the top-4 scenarios9. We also visualize the data distribution reduced to 3 dimensions using PCA in Figures 9 and 10 in Appendix. It can be observed that different categories are clearly separated in the latent space. All the above demonstrate the close relationship between affective information and misinformation. + +![](images/ad9a089cda50cbf67b26a15639560ce2c256da48df02e0f19920db79612242c7.jpg) + +![](images/9b56b89a3d1f25ab8118273814b00bb3764369d22a9a1f9a4654397600f20e85.jpg) +Figure 3: Emotion intensity classification on AMTCele + +![](images/6e522ade5cf6f23fbc5668745f6e244c287c9f0d4d46c1f0038f8e2615aa5ef8.jpg) + +![](images/1486d1fbc5b33b7dd6ba26ad636176fb347beb4fe09edb63ec2c1c8576c489f1.jpg) + +![](images/a16aaac233ffac43812d7a0474b1f6dee63b8d2aa126356e2a5cb78eea4189ee.jpg) +Figure 4: Sentiment classification on AMTCele + +
AMTPHEMECOCO
ElocVocEcElocVocEcElocVocEc
chi-squared statistic131.1646.0769.40197.98146.14499.4876.3125.0961.50
p-value3.60E-252.86E-085.78E-113.08E-395.07E-295.69E-1017.76E-143.28E-041.88E-09
+ +Table 12: Chi-squared statistics values of EIoc, Voc, Ec on different datasets. + +
DatasetsAffectivesub-emotionnon-rumours/relatedrumours/conspiracyt-test
meanvarmeanvartp
PHEMEERegAnger0.45470.01020.42330.007512.70931.44E-36
Fear0.53370.01700.56320.0198-8.50272.28E-17
Joy0.21340.01210.18170.013311.01775.58E-28
Sadness0.52150.01520.51770.01821.14420.2526
Vreg0.43310.01430.38420.013915.97862.18E-56
COCOERegAnger0.54750.00880.56410.0068-4.52116.43E-06
Fear0.56230.00970.60340.0077-10.55681.56E-25
Joy0.18000.01110.15140.00757.22306.66E-13
Sadness0.47010.00980.47730.0073-1.88080.0601
Vreg0.39610.00950.39730.0066-0.33250.7395
+ +Table 13: T-test statistics values of EReg and Vreg on different datasets. The t-test is conducted between non-rumours/related and rumours/conspiracy. + +![](images/93fe685e3708766fb3ad8c64b6286c98af913f7f25c734858d8f56e15a31094a.jpg) +Figure 5: Emotion classification on AMTCele + +![](images/98746818db3126e5a6551d17b224c08feff7813f03c4f8aa4f0b06662b1a6006.jpg) +Figure 7: Sentiment classification on PHEME + +![](images/b9e74d91bc46b4af39463e07360dbea2b07d14582356307d72794c8175bd4be6.jpg) +Figure 6: Emotion intensity classification on PHEME + +![](images/20c672fe1e684b1a98a2178b2efcf86384c8a9ba71f1833f62a905496aeaa21a.jpg) +Figure 8: Emotion classification on PHEME + +
DatasetsValuestop 4top 8Vreg top 16top 32top 64VocEcEIregEIoc
angerfearjoysadnessangerfearjoysadness
AMTCelefake-legit0.7910.7710.7530.7360.7180.8520.8120.8010.8010.8010.8010.8400.8400.8400.840
fake-fake0.8480.8100.7830.7610.7410.8940.8620.8550.8550.8550.8550.8850.8850.8850.885
t-22.516-14.875-10.951-8.976-8.037-20.550-22.617-22.434-22.433-22.462-22.461-22.260-22.246-22.267-22.244
p0.0000.0000.0000.0000.0000.0000.0000.0000.0000.0000.0000.0000.0000.0000.000
legit-fake0.7870.7650.7470.7290.7110.8480.8070.7970.7970.7970.7970.8360.8360.8360.836
legit-legit0.8410.7980.7680.7430.7210.8860.8560.8480.8480.8480.8480.8770.8770.8770.877
t-21.568-12.845-8.052-5.263-3.452-17.138-21.024-21.399-21.387-21.407-21.396-19.364-19.328-19.335-19.315
p0.0000.0000.0010.0080.0630.0000.0000.0000.0000.0000.0000.0000.0000.0000.000
PHEMEnonr-rum0.9300.9270.9240.9210.9170.9820.9520.9400.9400.9400.9390.9720.9720.9720.972
nonr-nonr0.9570.9460.9380.9320.9270.9890.9710.9630.9630.9630.9630.9830.9830.9830.983
t-75.127-49.017-35.035-27.844-24.327-69.237-78.344-77.082-77.231-76.869-78.103-71.392-71.732-71.005-72.538
p0.0000.0000.0000.0000.0000.0000.0000.0000.0000.0000.0000.0000.0000.0000.000
rum-nonr0.9350.9320.9290.9250.9210.9840.9570.9450.9440.9450.9440.9740.9740.9740.974
rum-rum0.9610.9500.9420.9350.9280.9900.9740.9660.9660.9670.9660.9840.9840.9840.984
t-58.813-38.823-27.206-19.693-14.156-54.654-58.600-59.494-59.637-59.377-60.266-55.874-56.306-56.033-56.759
p0.0000.0000.0000.0000.0000.0000.0000.0000.0000.0000.0000.0000.0000.0000.000
COCOrela-consp0.8730.8700.8660.8610.8560.9550.9050.8850.8850.8860.8850.9360.9360.9370.936
rela-rela0.9070.8870.8750.8650.8570.9670.9310.9160.9160.9160.9160.9530.9530.9540.954
t-44.603-23.007-11.581-5.437-2.012-37.288-43.522-44.744-44.772-44.253-44.800-38.201-38.337-37.684-38.281
p0.0000.0930.4280.4570.3120.0040.0000.0000.0000.0010.0000.0010.0010.0020.002
consp-rela0.8630.8580.8520.8460.8380.9500.8970.8760.8760.8770.8760.9290.9290.9300.929
consp-consp0.9110.8910.8780.8680.8590.9680.9330.9190.9190.9200.9200.9540.9540.9550.954
t-74.176-47.239-33.132-25.606-21.079-54.114-69.563-73.828-73.876-73.190-73.709-60.255-60.393-59.577-60.204
p0.0000.0000.0000.0000.0000.0000.0000.0000.0000.0000.0000.0000.0000.0000.000
+ +Table 14: Statistics values of cosine similarity between embeddings of different affective information on three datasets. Top K denotes retrieval top K examples. In addition to Vreg, the results of other affective information are all based on top 4. "A-B" represents the calculation of cosine similarity between each data point in A and each data point in B. Each element (i, j) in the resulting calculation represents the cosine similarity between the i-th vector in the A group embeddings and the j-th vector in the B group embeddings. The top 4 refers to selecting the four highest values from each row. The t-value and p-value represent the t-test results for the "A-B" results of the two lines above. + +![](images/89ab6742f7939391b316d5629c49984b83bc0ef0ab1787c18bac8a3217f4f0ce.jpg) +Figure 9: 3D visualization of affective embeddings on AMTCele. 0: Fake. 1: Legit + +![](images/e47f1b3ed2bb289540490aef1fbb8f3d160e47a91ca334053906b914e4d3d414.jpg) + +![](images/9bd4eacbda05fdff6f77acb6d6ecc198287b96002cdfc8a4db1d3a009ff4818b.jpg) + +![](images/23e78646e30aae0a3c6712dbf9c5549eb3aed57986d58b741a6790ddc7cd22dc.jpg) +Figure 10: 3D visualization of affective embeddings on PHEME. 0: Non-rumours. 1: Rumours + +![](images/d097138bb2c2679a3fe3acbcb8e258e01dc58cc5bb30508b0710717f6737a201.jpg) + +![](images/5e1b8cf2397ab41a0178778734731498117fc5370a0db380a0b6bf984de059ef.jpg) \ No newline at end of file diff --git a/raemollmretrievalaugmentedllmsforcrossdomainmisinformationdetectionusingincontextlearningbasedonemotionalinformation/images.zip b/raemollmretrievalaugmentedllmsforcrossdomainmisinformationdetectionusingincontextlearningbasedonemotionalinformation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..badee7de503b54c8fa1bcc434256e18986e3d80f --- /dev/null +++ b/raemollmretrievalaugmentedllmsforcrossdomainmisinformationdetectionusingincontextlearningbasedonemotionalinformation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c994ada71ec43c6a4697b8fddea02506a1b682fb4d90e61c2f904efdf2bfbc3a +size 1352208 diff --git a/raemollmretrievalaugmentedllmsforcrossdomainmisinformationdetectionusingincontextlearningbasedonemotionalinformation/layout.json b/raemollmretrievalaugmentedllmsforcrossdomainmisinformationdetectionusingincontextlearningbasedonemotionalinformation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..ede7388b227e4fb270ff4459a880ee6df9fb65fe --- /dev/null +++ b/raemollmretrievalaugmentedllmsforcrossdomainmisinformationdetectionusingincontextlearningbasedonemotionalinformation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c2868980b16902f0b7839da6bd5d9735c7c525953f591fb8002fd4b70187b252 +size 476020 diff --git a/ragcriticleveragingautomatedcriticguidedagenticworkflowforretrievalaugmentedgeneration/107e3e3f-a4f8-46d2-9879-d6c5196285ad_content_list.json b/ragcriticleveragingautomatedcriticguidedagenticworkflowforretrievalaugmentedgeneration/107e3e3f-a4f8-46d2-9879-d6c5196285ad_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..5af61568b9d45975c2d5394cd145e9581940a6d2 --- /dev/null +++ b/ragcriticleveragingautomatedcriticguidedagenticworkflowforretrievalaugmentedgeneration/107e3e3f-a4f8-46d2-9879-d6c5196285ad_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:82d51695e7d9bf9c2f30502a8ab613eae924efa6f4f79521e079a3e5843dfa5a +size 179134 diff --git a/ragcriticleveragingautomatedcriticguidedagenticworkflowforretrievalaugmentedgeneration/107e3e3f-a4f8-46d2-9879-d6c5196285ad_model.json b/ragcriticleveragingautomatedcriticguidedagenticworkflowforretrievalaugmentedgeneration/107e3e3f-a4f8-46d2-9879-d6c5196285ad_model.json new file mode 100644 index 0000000000000000000000000000000000000000..3159ac6a3ce76472cb55720ab302122ed75cbb59 --- /dev/null +++ b/ragcriticleveragingautomatedcriticguidedagenticworkflowforretrievalaugmentedgeneration/107e3e3f-a4f8-46d2-9879-d6c5196285ad_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:12df3572863417832c524e90245fdb0b584e1749489c1d3b0664d82e1b4c5f7a +size 220239 diff --git a/ragcriticleveragingautomatedcriticguidedagenticworkflowforretrievalaugmentedgeneration/107e3e3f-a4f8-46d2-9879-d6c5196285ad_origin.pdf b/ragcriticleveragingautomatedcriticguidedagenticworkflowforretrievalaugmentedgeneration/107e3e3f-a4f8-46d2-9879-d6c5196285ad_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..28cae6f61eb2c8d9188164236976604af67282f5 --- /dev/null +++ b/ragcriticleveragingautomatedcriticguidedagenticworkflowforretrievalaugmentedgeneration/107e3e3f-a4f8-46d2-9879-d6c5196285ad_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e1d2194ba481a8cc010826be31bd082c5fe3b05ee905df0c99cb4c3802ac76f8 +size 2751218 diff --git a/ragcriticleveragingautomatedcriticguidedagenticworkflowforretrievalaugmentedgeneration/full.md b/ragcriticleveragingautomatedcriticguidedagenticworkflowforretrievalaugmentedgeneration/full.md new file mode 100644 index 0000000000000000000000000000000000000000..ca09928b872250ba1473b7df2421c01811a5b9ec --- /dev/null +++ b/ragcriticleveragingautomatedcriticguidedagenticworkflowforretrievalaugmentedgeneration/full.md @@ -0,0 +1,858 @@ +# RAG-Critic: Leveraging Automated Critic-Guided Agenic Workflow for Retrieval Augmented Generation + +Guanting Dong, Jiajie Jin, Xiaoxi Li, Yutao Zhu Zhicheng Dou*, Ji-Rong Wen + +Gaoling School of Artificial Intelligence, Renmin University of China + +Beijing Key Laboratory of Research on Large Models and Intelligent Governance + +{dongguanting, dou}@ruc.edu.cn + +# Abstract + +Retrieval-augmented generation (RAG) has emerged as a pivotal technology in natural language processing, owing to its efficacy in generating factual content. However, its informative inputs and complex paradigms often lead to a greater variety of errors. Consequently, achieving automated on-policy assessment and error-oriented correction remains an unresolved issue. In this paper, we propose RAG-Critic, a novel framework that leverages a critic-guided agentic workflow to improve RAG capabilities autonomously. Specifically, we initially design a data-driven error mining pipeline to establish a hierarchical RAG error system. Based on this system, we progressively align an error-critic model using a coarse-to-fine training objective, which automatically provides fine-grained error feedback. Finally, we design a critic-guided agentic RAG workflow that customizes executor-based solution flows based on the error-critic model's feedback, facilitating an error-driven self-correction process. Experimental results across seven RAG-related datasets confirm the effectiveness of RAG-Critic, while qualitative analysis offers practical insights for achieving reliable RAG systems. Our dataset and code are available at https://github.com/RUC-NLPIR/RAG-Critic. + +# 1 Introduction + +Recent advancements in large language models (LLMs) have demonstrated remarkable performance across a wide range of downstream tasks (OpenAI, 2023; Dubey et al., 2024; Chen et al., 2021; Wei et al., 2022; Dong et al., 2024d; Zhu et al., 2023, 2024). However, LLMs remain prone to hallucinations and factual inconsistencies (Zhang et al., 2023b), which undermine the reliability of generated responses. Retrievalaugmented generation (RAG) has emerged as a promising approach (Lewis et al., 2020; Shuster + +![](images/ae4f25f57632365cc37cb7f3c3fb8c05986fd5efcbd1ec2614f0a7282275c8c6.jpg) + +![](images/77955e74b195594aed25ae888992a54893f08567cca101407dcbd11b1cbed43a.jpg) +Figure 1: The comparison between RAG-Critic and other methods (Upper part). The overview of our Critic-Guided Agentic RAG framework (bottom part). + +et al., 2021), enhancing LLM outputs by incorporating information from retrieved documents to produce more contextually grounded responses. + +In practical RAG applications, the absence of golden responses necessitates automated evaluation strategies. Foundational studies leverage LLMs as judgment tools (Zheng et al., 2023; Li et al., 2024a), automating the evaluation of model outputs and generating critical feedback. However, due to the complexity of RAG tasks and their knowledge-intensive nature, errors in retrieved and generated content tend to be more fine-grained compared to other tasks (e.g., factual inaccuracies in specific details). Therefore, relying solely on a single LLM for evaluation often fails to provide precise and reliable judgments. + +To address this challenge, recent studies (Ru et al., 2024; Jin et al., 2024b) have explored comprehensive error evaluation in RAG. Beyond error evaluation, critic-based RAG approaches (Zhou et al., 2024; Asai et al., 2024) attempt to refine model out + +puts by empirically defining error categories and corresponding corrective strategies. While these approaches have demonstrated some effectiveness, several limitations remain: + +- Insufficient Generalization: Predefined error categories and correction strategies often fail to adapt to the diverse nature of RAG tasks and the wide range of possible error patterns. +- Lacks Granularity & High Cost: Manually designed error taxonomies struggle to capture fine-grained errors in RAG outputs, while their implementation demands substantial computational and human annotation costs. + +Consequently, automating the construction of a well-structured, comprehensive error categorization system remains a fundamental challenge for the practical deployment of RAG systems. Notably, the development of such a system relies on diverse erroneous responses across different domains and styles. However, the field currently lacks high-quality, error-annotated datasets, hindering the creation of a universal error-aware model capable of both identifying and mitigating errors in RAG. + +In this paper, we propose RAG-Critic, a framework aimed at systematically establishing a hierarchical error categorization system based on practical RAG error responses, enabling LLMs to autonomously customize solutions based on identified errors. Specifically, RAG-Critic comprises three key components: (1) Hierarchical Error System Construction: we carefully select 9 RAG-related datasets and 15 LLMs of varying parameter sizes to sample error responses, which ensures comprehensive coverage of RAG task types and response styles. Moreover, we employ LLMs and clustering algorithms for data-driven annotation as the foundation, while manual summaries at the top address the limitations of mechanized labeling. This process ultimately establishes the first hierarchical RAG error system, encompassing 3 error tiers and over 4,000 unique error types. (2) Alignment of RAG Error-Critic: Leveraging our high-quality error system, we progressively align a RAG error-critic model using a coarse-to-fine training objective to facilitate automated error feedback. (3) Critic-Guided Agentic RAG: To improve the RAG performance from identified errors, as shown in Fig. 1, we design a critic-guided agentic RAG workflow to customize and execute solution flows based on the error-critic model's feedback. We first define a series of action + +function codes covering over 15 specific functionalities. Unlike previous rule-based planning, we further introduce a planning model that autonomously selects and arranges action functions, generating corresponding inputs to create executable solution programs. Subsequently, a Python executor executes these programs to implement an automated error-driven self-correction process. + +In summary, our contributions are as follows: + +- We propose a universal RAG error mining pipeline that leverages an LLM pool to sample errors from extensive RAG datasets, combining data-driven annotations with manual summaries to achieve systematic RAG error categorization. +- We establish the first hierarchical RAG error system, encompassing 3 error tiers with over 4,000 fine-grained labels. Guided by this system, we progressively align an error critique model using a coarse-to-fine training objective, automatically providing fine-grained error feedback. +- We design a critic-guided agentic RAG framework, enabling the planning agent to customize executor-based solution programs based on the error-critic model's feedback, facilitating an automated error-driven self-correction process. +- Experimental results across 7 RAG-related datasets confirm the effectiveness of RAG-Critic. Furthermore, we synthesize an RAG error benchmark based on our error system, verifying the advantages of the RAG-Critic due to its remarkable fine-grained error-critic capabilities. + +# 2 Related work + +# 2.1 LLM-as-Judges + +LLM-as-judges utilize large language models to assess outputs based on predefined criteria (Zheng et al., 2023; Li et al., 2024b). These methods include: (1) Instruction-based Methods guide LLMs through In-Context Learning (Renze and Guven, 2024; Gou et al., 2024; Lin and Chen, 2023) and Step-by-step Chain-of-Thought (CoT) reasoning (Liu et al., 2023; Yi et al., 2024). (2) Training-based Methods fine-tune LLMs using specialized datasets to enhance evaluation adaptability. Score-based Tuning adjusts models based on human-annotated scores (Yue et al., 2023; Jiang et al., 2024), and Preference-based Learning trains models using human preferences (Wu et al., 2024; + +![](images/76b57a2c1bc717c007371ece85908611964222f5888423ee87c108e95211e7c6.jpg) +Figure 2: The overview of our hierarchical RAG-Error system. The upper part illustrates the 3-step pipeline for error response sampling and annotation. The bottom part displays the three tiers of labels in our error system. + +Ke et al., 2024). (3) Multi-agent Methods enhance evaluation reliability by leveraging the collaboration (Zhang et al., 2023a) or competition (Zhao et al., 2024; Chan et al., 2024) between multiple LLMs. Due to the complexity of the RAG domain, applying LLM as judges is still challenging. + +# 2.2 Critical Alignment for RAG + +Retrieval-augmented generation (RAG) has emerged as a promising approach (Lewis et al., 2020; Shuster et al., 2021; Dong et al., 2023a; Zhu et al., 2025; Lei et al., 2023; Li et al., 2025a,b; Dong et al., 2024f; Tan et al., 2025; Dong et al., 2023b; Luo et al., 2024), enhancing LLM outputs by incorporating information from retrieved documents to produce more contextually grounded responses. Moreover, critical alignment for RAG involves methods that ensure accurate responses through assessment and reflection mechanisms. Self-RAG (Asai et al., 2024) and MetaRAG (Zhou et al., 2024) introduce dynamic self-evaluation, enabling RAG systems to continuously monitor and optimize retrieval and generation processes. The Corrective RAG framework (Yan et al., 2024) enhances system robustness by evaluating and refining retrieved content. For detailed diagnostics, RAGChecker (Ru et al., 2024) offers granular assessments at the claim level, focusing on retrieval and generation quality. Recently, RAG-RewardBench (Jin et al., 2024b) has established a comprehensive benchmark for + +reward models, assessing multi-hop reasoning and citation accuracy. The lack of a fine-grained error system makes it difficult for such methods to generalize across a wide range of RAG tasks. + +# 3 Methodology + +Overview. In this section, we propose the RAG-Critic framework to enhance the universal RAG capabilities of LLMs through critical feedback. As shown in Fig. 2 & Fig. 3, we approach our RAG-Critic from three aspects: 1) We devise a three-step pipeline for error response mining and annotation (§3.1), establishing a hierarchical RAG error categorization system. 2) Leveraging the high-quality error system, we further align an RAG error-critic model (§3.2) through a Coarse-to-Fine training objective. 3) We introduce the critic-guided agentic framework, which facilitates an error-driven correction procedure by autonomously customizing and designing executor-based solution flows based on error feedback (§3.3). Below, we will delve into the specifics of our approach. + +# 3.1 Hierarchical Error System Construction + +In this section, we introduce our three-step pipeline for establishing a hierarchical RAG error system: + +# 3.1.1 Step-1: Error Responses Sampling. + +To achieve general RAG error recognition, we first need to construct a comprehensive and diverse set of erroneous responses. Therefore, we consider + +![](images/cded1d2f9aa7b01288516130351338a896564f41d79f0c3d396a7f02dadbdcef.jpg) +Figure 3: The overview of the automatic critical-guided agentic RAG workflow. + +both data sources and model sampling aspects: + +Data Source. To balance data scale and diversity while maintaining accessibility, we source a mixed dataset $D_{\mathrm{raw}}$ from train sets of 9 knowledge-intensive open-source datasets, which encompasses 6 task paradigms (Tab. 1). Afterward, we retrieve relevant external knowledge for the dataset $D_{\mathrm{raw}}$ . Given the task query $q$ , we use a dense retriever to recall the Top- $K$ relevant passages $D_{q}$ from the Wikipedia corpus, which comprises $N$ documents. The process can be formulated as follows: + +$$ +D _ {q} = \operatorname {a r g t o p} - k \left[ E _ {\mathrm {d}} \left(d _ {i}\right) ^ {\top} \cdot E _ {\mathrm {q}} (q) \mid i = \{1 \dots N \} \right]. +$$ + +Therefore, we form our mixed RAG dataset $D_{\mathrm{RAG}}$ + +Model Sampling. To mitigate inherent biases in responses from the same LLM, we select a diverse pool $M$ of 15 open-source models from 9 series, with parameter sizes ranging from 3B to $70\mathrm{B}^1$ . As shown in Fig. 2, we employ the same sampling hyperparameters, allowing each model in $M$ to sample responses from $D_{\mathrm{RAG}}$ . + +Considering that rule-based metrics cannot evaluate the correctness of responses at the high-level semantics, inspired by CriticBench (Lin et al., 2024), we utilize the strong supervision model Qwen2.5-72B as a critique, filtering out erroneous samples and providing detailed error rationales. Then we obtain a comprehensive and diverse error response set $D_{\text{error}} = \{(q, D_q, y, p, e)_i\}_{i=1}^k$ , where $y, p$ represents the golden answer and model prediction. $e$ denotes the detailed error analysis rationale. This error pool $D_{\text{error}}$ establishes a solid foundation for the subsequent error alignment of RAG. + +# 3.1.2 Step-2: Critical Annotation & Tagging. + +In real-world RAG scenarios, response errors often exhibit multi-faceted and fine-grained characteristics + +
DatasetTask# Train
NQSingle-hop QA79.1k
TriviaQASingle-hop QA78.7k
HotpotQAMulti-hop QA90.4k
2WikiMulti-hop QA15.0k
ASQALong-form QA4.3k
ELI5Long-form QA272k
WoWDialogue Generation63.7k
FEVERFact Verification104.9k
WikiASPOpen-domain Summarization30k
+ +Table 1: The statistics of RAG related data source. + +tics. Therefore, accurately distinguishing subtle differences among erroneous responses requires the error annotations process that captures atomic intentions. Inspired by the data selection effort (Lu et al., 2023), we utilize open-set annotations and normalization techniques to tackle this challenge. + +Open-set Annotation. Our goal is to generate diverse and meaningful labels for the identified errors. Unlike previous critic-based RAG works (Zhou et al., 2024), we do not provide predefined labels during the labeling process; instead, we adopt an open-set annotation. This choice allows for greater flexibility in covering the diverse errors present in open-domain RAG tasks. Specifically, we design a critical prompt to guide Qwen2.5-72B in analyzing the error rationales of $D_{\text{error}}$ , generating a set of parsable JSON format labels. Notably, each question is assigned multiple open labels, ultimately resulting in over 20,000 atomic error labels. + +Label Normalization. Importantly, we observe significant noise in the original atom tags, primarily due to long-tail effects and instruction compliance issues. To ensure their high quality and relevance, we implement two normalization strategies: 1) Removing long-tail labels with a frequency below a specified threshold $\alpha$ , as well as deleting atomic labels that exceed 25 tokens in length; 2) Filtering + +out empty responses not adhering to JSON format. After this denoising process, we successfully obtain 4,000 atomic labels, which contribute to a bottom-tier error taxonomy for our RAG error system. + +# 3.1.3 Step-3: Error Label Summarization. + +To hierarchically categorize the atomic error label set, we adopt a data-driven automated annotation mechanism as the foundation, complemented by manual summarization at the top level, thereby achieving an efficient labeling process while minimizing human intervention. + +Clustering and LLM Categorization. Given the atomic error label set, we apply hierarchical clustering (Ward Jr, 1963), resulting in 20 class centers. Then we trace back the sample sets covered by each cluster and randomly select 50 labels. With GPT-4o as a supervised model, we summarize the central error type for each cluster, ultimately resulting in 20 second-tier error types. + +Manual Summarization. Relying solely on automated summarization from LLMs may lead to mechanical text and biases. To mitigate this, we employ three well-educated annotators, each tasked with categorizing the 20 second-tier labels and summarizing the top-tier error types. Subsequently, the annotators engage in cross-validation and discussion, culminating in a comprehensive hierarchical error system that comprises 7 top-tier labels, 19 second-tier labels, and over 4,000 tertiary labels, thus enhancing the granularity of error categorization. As shown in Fig. 2, it is noteworthy that there is a mapping relationship between the high and low-tier labels in our hierarchical error system. + +Ultimately, we reverse-map the three-tier labels according to our error system to annotate $D_{\text{error}}$ , synthesizing the first fine-grained error identification QA dataset for the RAG domain: + +$$ +D _ {\text {E r r o r}} ^ {\mathrm {Q A}} = \left\{\left(x, y\right) _ {i} \mid x \in \left(q, D _ {q}, p\right), y \in \left(\left\{T _ {j} \right\} _ {j = 1} ^ {3}, e\right) \right\} _ {i = 1} ^ {k}, \tag {1} +$$ + +where each $x$ contains RAG input $(q, D_q)$ and model prediction $p$ . $y$ denotes the critical feedback, including 3-tier error labels $\{T_j\}_{j=1}^3$ and a binary error judgment label $e$ . + +# 3.2 RAG Error-Critic Alignment + +After thoroughly analyzing the RAG error system, our immediate goal is to distill its knowledge into a critic model for automated error labeling. Notably, our error-critic process in stage 2 naturally generates numerous positive and negative response + +Table 2: The definitions of 5 action functions. + +
FunctionDefinitions
Retrieval(·)Retrieve relevant documents.
Rewrite(·)Clarify or expand the given query.
Decompose(·)Break query into smaller sub-queries.
Refine(·)Explain or summarize the document.
Generate(·)Generate final answer.
+ +samples, allowing us to design two training objectives for progressive alignment: + +Supervised Fine-tuning (SFT). To maintain a balance between error and correct responses, we first randomly select several correct samples equal to that in $D_{\mathrm{Error}}^{\mathrm{QA}}$ to construct the SFT dataset $D_{\mathrm{Error}}^{\mathrm{SFT}}$ . Given $(x_i, y_i) \in D_{\mathrm{Error}}^{\mathrm{SFT}}$ , we apply the standard Supervised Fine-tuning objective on the base model $P$ with parameters $\theta$ : $\mathcal{L}(\theta) = \sum_{(x_i, y_i) \in \mathcal{D}_{\mathrm{train}}} \log \mathbb{P}_{\theta}(y_i \mid x_i)$ , where $x_i$ denotes the $i$ -th input. To simulate the real-world RAG scenario, $x_i$ does not contain the golden answer. Ultimately, the final output $y$ of our error-critic model will follow a JSON format, including a binary error judgment $e$ and 3-tier error tags $\{T_j\}_{j=1}^3$ . + +Coarse-to-Fine DPO Alignment. To achieve excellent error alignment, an ideal RAG error-critic model should feature two key capabilities: 1) the ability to coarse-grain distinguish between correct and incorrect responses, and 2) the ability to finely label three-tier error labels from the error system. + +To unleash the LLM's potential, we randomly sample $k$ response samples as negative examples $y_{i}^{-}$ from both the correct and error pools for each sample $x$ respectively. The first set helps the LLM learn coarse distinctions between correct and error responses, while the second captures fine differences among various error responses. Ultimately, we merge the two negative samples to formulate the pairwise preference set $D^{\mathrm{pref}} = (y_i^+, y_i^-)_{i=1}^k$ , following Direct Preference Optimization (DPO) (Rafailov et al., 2023) to achieve coarse-to-fine alignment: + +$$ +\begin{array}{l} \mathcal {L} _ {\mathrm {S D P O}} \left(\pi_ {\theta}; \pi_ {\text {r e f}}\right) = - \mathbb {E} _ {\left(x, y ^ {+}, y ^ {-}\right) \sim \mathcal {D} ^ {\text {p r e f}}} [ \log \sigma (\beta \log \\ \frac {\pi_ {\theta} (y ^ {+} \mid x)}{\pi_ {\theta} (y ^ {+} \mid x)} - \beta \log \frac {\pi_ {\mathrm {r e f}} (y ^ {-} \mid x)}{\pi_ {\mathrm {r e f}} (y ^ {-} \mid x)} ], \\ \end{array} +$$ + +where the reference model $\pi_{\mathrm{ref}}$ is initially set to $\pi_{\theta}^{\mathrm{SFT}}$ and remains fixed. The hyperparameter $\beta$ and the sigmoid function $\sigma$ are used. The objective $\mathcal{L}_{\mathrm{DPO}}$ aims to maximize the log probability of the preferred $y^{+}$ over the dispreferred $y^{-}$ . + +![](images/4bda74cefb0b7e52b8d50f8a5d917ffb538e15351fa8acabe1850686f161a481.jpg) +The Construction of RAG-Error Benchmark + +![](images/fb2466422c1812762e86b5a8cf29dcab4b4fde00475bcafa8c429ff2093ba110.jpg) + +![](images/759dc4e16019c8845b6f72e354db4c8af746642e8975dfc31a41dc430cddd872.jpg) + +![](images/4e3c7c4312aa2415859ec94d68a7636ecfc15f82eadff48587ac57d63110ff14.jpg) +The Statistics of RAG-Error Benchmark +Figure 4: The overview of RAG-Error Benchmark. + +# 3.3 Critic-guided Agentic RAG Framework + +Our ultimate goal is to improve the LLM's RAG performance by leveraging critic feedback from the error-critic model. To achieve this, we propose the "Error-Action Mapping" and the "Critic-Guided Agentic Workflow", integrating both offline and online strategies for error-driven corrections. + +# 3.3.1 Error-Action Mapping. + +Based on the error system, it is crucial to formulate corresponding solutions for each error type. We employ GPT-4o to summarize offline solutions for first- and second-tier errors, followed by manual optimization to create the Error-Action mapping table $T$ . This table serves as a guide for on-policy planning, which is listed in Appx. §A.6. + +# 3.3.2 Critic-Guided Agentic Workflow + +In this section, we design the "Generate-Critic-Planning-Execution" workflow to facilitate automated problem solving. + +Action Design. Guided by the critic feedback and the Error-Action mapping, we aim to automate solution planning and execution. Drawing inspiration from code execution efforts (Le et al., 2022; Qiao et al., 2024b; Dong et al., 2024a,b), we break down each solution path into several sub-actions, each corresponding to a fine-grained problem-solving strategy (e.g., re-retrieval, specific document deletion). We further define an action function set $F$ containing 5 different functions (Tab. 2), implementing over 15 fine-grained sub-actions based on varying inputs (Tab. 12). + +Critic-Guided Planning. In real-world scenarios, merely adhering to predefined offline solutions of + +ten fails to flexibly address the diverse challenges of RAG tasks. To overcome this, we further introduce the planning agent $\pi_{\beta}$ for automated solution planning in inference. In detail, given the $(q,D_q)\in D_{\mathrm{test}}$ , we first utilize the RAG generator $\pi_{\alpha}$ to generate the prediction $p\sim \pi_{\alpha}(x)$ Furthermore, we employ the aligned RAG errorcritic model $\pi_{\theta}$ to generate the critical feedback $y\sim \pi_{\theta}(y\mid q,D_q,p)$ . Using the same input $(q,D_q,p)$ , the critic feedback $y$ , the predefined mapping table $T$ , and action functions $F$ , the planning model $\pi_{\beta}$ autonomously selects and sequences the necessary solution actions under the guidance of the critic signal, generating the planning programs $p$ for each function. The process can be formulated as: + +$$ +\hat {p} = \arg \max \pi_ {\beta} (q, D _ {q}, p, y, F, T), \tag {2} +$$ + +Notably, if the judgment of the critic signal $y$ is correct, we will skip this process. + +Execution-based Correction. Once the planning programs $\hat{p}$ for correction is generated, we utilize a Python execution environment to sequentially execute these action functions, generating the correction answer $\hat{y}$ . Notably, the model optimization and inference processes required by the programs will utilize the original RAG model $\pi_{\alpha}$ to enable automated self-correction. The detailed algorithm workflow is illustrated in algorithm 1. + +# 3.4 RAG-Error Benchmark + +To enhance error judgment and fine-grained recognition in RAG, we introduce the RAG-Error benchmark, detailing the following two aspects: + +Algorithm 1: Critical-guided Agentic RAG +Input :RAG inputs $x\in D_{test}$ , RAG model $\pi_{\alpha}$ Aligned critic model $\pi_{\theta}$ , Planning model $\pi_{\beta},D_{test}$ Size $N$ +Output:Correction output set $Y$ +Initialize:Error mapping table $T$ , Action function set $F$ +1 $Y\gets \emptyset$ . +2 for $i\gets 1$ to n do +3 $p\gets \pi_{\alpha}(q,D_q)$ ; // RAG Answer Generation +4 $y\gets \pi_{\theta}(q,D_q,p)$ ; // Critical Feedback Generation +5 if $y = =$ Error then +6 $\hat{p}\gets \pi_{\beta}(q,D_q,p,y,F,T)$ . // Critic-guided Planning +7 $\hat{y}\gets$ Executor( $\hat{p}$ ); // Program Execution +8 $Y\leftarrow Y\cup \{\hat{y}\} ;$ // Output Update +9 else +10 Continue; +11 return $Y$ + +Data Construction. As outlined in Figure 4, based on our comprehensive error system, we follow the process in Section 3.1 to resample the test set from the data pool $D_{\text{Error}}$ by using 5 advanced LLMs (Qwen 2.5 (7B, 70B), Llama 3.1 (8B, 70B), Mistral v0.3 (7B)). Next, we map three levels of error labels according to the predefined framework and employ dual verification with LLM and human evaluation, retaining only correctly marked samples to create a high-quality $D_{\text{Error}}^{\text{test}}$ . For maintaining data balance, we consider two aspects: + +- Error Type Balance. Using 19 secondary labels as a basis, we conduct balanced sampling of $D_{\text{Error}}^{\text{test}}$ to ensure each category appears at least 50 times, totaling 950 samples. +- Correctness Balance. We randomly sample 950 labeled instances from step-2 to balance positive and negative samples. + +Evaluation Protocol. After obtaining LLM outputs, we evaluate performance from two aspects: + +- Error Identification: We calculate accuracy metrics to assess the model's judgment correctness, reporting overall and per-label accuracy. +- Fine-grained Error Classification: For each level and label category, we use the F1 score to measure annotation accuracy across different error types and compute the average accuracy. + +Data Statistics. We construct the RAG-Error benchmark, which is derived from 5 LLMs, 9 + +data sources, and dual verification. To ensure balanced sampling across categories, we sampled 50 instances from each fine-grained category, resulting in a total of 950 error samples. To maintain the balance between correct and incorrect samples, we also included 950 correct samples. Ultimately, RAG-Error benchmark includes 1,900 samples, encompassing 9 coarse-grained and 19 fine-grained error categories, addressing both error discrimination and fine-grained annotation assessment. + +# 4 Experiment + +# 4.1 Experimental Setup + +Datasets. We evaluate six datasets covering four distinct task types, including (1) Single-hop QA represented by NQ (Kwiatkowski et al., 2019) and TriviaQA (Joshi et al., 2017); (2) Multi-hop QA includes HotpotQA (Yang et al., 2018) and 2Wiki-multihopQA (Ho et al., 2020); (3) Long-form QA contains the ASQA (Stelmakh et al., 2022); (4) Dialogue Generation includes the WoW (Dinan et al., 2018). For evaluation metrics, we use EM + +for the accuracy of the top-ranked response and F1 score to assess the similarity to the ground truth. + +RAG-Error Benchmark. To assess the error identification and classification capabilities of LLMs, we evaluate existing LLMs on our RAG-Error benchmark. Notably, we evaluate the critic performance of LLMs from (1) Error Identification and (2) Error Classification as section 3.4. + +Baselines. In our experiments, we primarily evaluate two categories of baselines: (1) Proprietary Models: o1-preview (Jaech et al., 2024), GPT4o (OpenAI et al., 2024), Claude3.5-sonnet (Anthropic, 2024), Qwen2.5 (Yang et al., 2024) (3B-70B) and Llama3.1 (Meta, 2024) (8B,70B) series. (2) Critical RAG Baselines: SelfRAG (Asai et al., 2024), FLARE (Jiang et al., 2023b), MetaRAG (Zhou et al., 2024) and SelfRefine (Madaan et al., 2023). More detailed implementations are listed in Appx. $\S B$ + +# 4.2 Main Result. + +Our main results are presented in Tab. 3. Overall, RAG-Critic consistently outperforms all baselines, decisively establishing its superiority. Furthermore, we have identified the following insights: + +1) Existing critic-based RAG methods struggle to correct complex QA errors. Compared to standard RAG, Self-Refine and FLARE do + +Table 3: Overall performance on 7 RAG related datasets, including single-hop, multi-hop, long-form QA and dialogue Generation tasks. The best two results are in **bold** and **underlined**. The overall result improvement / decrease of each method compared to the standard RAG with the same backbone is calculated in parentheses. + +
MethodBackboneNQTriviaQAHotpotQA2WikiASQAWOWELI5Overall
EMF1EMF1EMF1EMF1F1F1F1F1
Standard RAGLlama3.1-8B2338.34455.32735.21830.111.510.220.128.7
Standard RAGQwen2.5-7B1833.24152.13243.52128.221.313.320.530.3
Standard RAGLlama3.1-70B2640.15160.13747.02129.814.39.620.831.7
Standard RAGQwen2.5-72B2541.24254.32839.02231.217.114.121.331.2
Critical-based RAG
Self-RefineLlama3.1-8B1022.32032.31524.71223.119.011.722.622.2 (-6.5)
FLARELlama3.1-8B1219.84857.12025.81022.710.54.219.722.8 (-5.9)
Self-RAGLlama3.1-8B2732.32435.7917.6418.929.317.421.824.7 (-4.0)
MetaRAGLlama3.1-8B2240.25059.23747.02029.212.06.220.330.6 (+1.9)
Ours
RAG-CriticLlama3.1-8B2742.05060.14051.22133.119.011.621.234.0 (+5.3)
RAG-CriticQwen2.5-7B2237.35358.53748.82532.824.314.422.634.1 (+3.8)
RAG-CriticLlama3.1-70B3045.45262.24151.82331.517.910.722.534.6 (+2.9)
RAG-CriticQwen2.5-72B2643.14658.82944.72234.319.214.823.134.0 (+2.8)
+ +Table 4: Ablation study of RAG-Critic (Llama3.1-8B). + +
MethodNQTrivaQAHotpotQA
F1F1F1
RAG-Critic42.060.151.2
w/o Data-driven38.7 (-3.3)58.5 (-1.6)48.8 (-2.4)
w/o Manual Sum.40.1 (-1.9)59.2 (-0.9)47.0 (-4.2)
w/o Auto-Planning39.2 (-2.8)57.2 (-2.9)45.5 (-5.7)
w/o Critic Model37.0 (-5.0)56.5 (-3.6)47.0 (-4.2)
+ +not achieve consistent improvements across all datasets, with declines exceeding $5\%$ observed in Multi-Hop QA (HotpotQA & 2wiki). This underscores the lack of an effective method for error-oriented correction in complex RAG scenarios. + +2) Our proposed model RAG-Critic exhibits exceptional alignment capabilities across various datasets. Compared to critic-based RAG methods, RAG-Critic (Llama3.1-8B) achieves the best overall performance across all datasets $(5.3\% \uparrow)$ . Moreover, RAG-Critic maintains a stable improvement over standard RAG baselines in each dataset, validating the superior error correction capability of our automated critic workflow. +3) RAG-Critic is a versatile plug-and-play solution compatible with various LLM backbones. Regardless of varying parameter sizes (7B, 70B) or different LLM backbone series (Llama3.1, Qwen2.5), RAG-Critic consistently delivers improvements over standard RAG baselines, highlighting its flexible application potential in real-world RAG systems. + +Ablation Study. To investigate the effectiveness of various modules in RAG-Critic, we perform an ablation study in Tab. 4. We use "w/o" + +Table 5: Overall performance on RAG-Error Benchmark. The top 1/2 results are bolded/underlined. + +
MethodIdentificationClassification
CorrectErrorAvg.Tag1Tag2Avg.
Closed-source LLMs
o1-preview79.059.469.223.67.415.5
GPT4-o77.978.178.038.515.426.9
Claude 3.546.789.368.232.210.621.3
Open-source LLMs
Qwen2.5-72B79.879.879.845.517.431.5
Llama3.1-70B95.242.768.925.710.017.8
Ours
RAG-Critic (3B)95.896.696.265.242.458.3
+ +to denote variants without specific modules. The results reveal that (1) The performance declines when any part of the design is removed, indicating that all components are highly effective. (2) In the error system construction, removing either the data-driven or manual components significantly impacts performance. This aligns with our motivation: the data-driven approach captures more fine-grained error types from the responses pool, while manual summarization overcomes the mechanization of automated processes. (3) The most significant performance drop occurs when the error-critic model is removed, underscoring that high-quality feedback is fundamental to the error-critic process. + +# 4.3 Analysis in RAG-Error Benchmark. + +To delve deeper into the fine-grained error-critic capabilities of RAG-Critic and existing LLMs, we analyze RAG-Error bench's results in two aspects: + +Coarse-Grained Identification. As shown in Tab. 5, Current LLMs do not perform well + +in coarse-grained error identification, particularly Claude-3.5 and Llama3.1-70B, which struggle around borderline accuracy (<70% in Avg.). Despite their poor performance, these two LLMs excel at identifying correct and incorrect samples (>95%). This result reveals a bias in existing LLMs towards over-predicting either the correct or incorrect categories in error identification. In contrast, our RAG-Critic achieves exceptional performance (95%) in all categories, which we attribute to our robust error system and progressive training objectives. + +Fine-Grained Classification. The RAG-Error bench requires LLMs to select a series of tags from 1st-tier (7 categories) and 2nd-tier (20 categories) error labels for fine-grained labeling. As illustrated in Tab. 5 and Fig. 5, such a challenging task has led to struggles for both strong closed-source LLMs (o1-preview, GPT-4o) and open-source LLMs (Qwen2.5-70B, Llama3.3-70B), especially with 2nd-tier labeling, where accuracy falls below $40\%$ . Notably, our RAG-Critic model with only 3B parameters achieves an over $50\%$ accuracy score, surpassing powerful models with over 70B parameters, thus realizing a lightweight and efficient RAG error-critic process2. + +# 4.4 Error Statistics & Analysis. + +To deepen our understanding of the deficiencies exposed in current RAG tasks, as shown in Fig. 6, we analyze the occurrence of 1st-tier error types (7 categories) in Qwen2.5-7B and Llama3.1-8B across 9 datasets evaluated in the main results. Overall, errors during the generation phase of LLMs $(58.7\%)$ are more frequent than those during the retrieval $(41.3\%)$ . Notably, over $40\%$ of errors involved incomplete information or responses. To further investigate specific errors, we provide a detailed discussion of 2nd-tier error types in the Appx. §A.4, revealing that information noise in the retrieval and factual inaccuracies in the generation are core issues hindering task generalization in RAG. This suggests that providing more accurate information for both retrieval and reasoning in the RAG domain is more urgent than merely improving the reasoning capabilities of the RAG generator. + +# 5 Conclusion + +In this paper, we introduce RAG-Critic, a novel framework that utilizes a critic-guided agentic + +![](images/b853360c0843d18bd407ceea2ac8dc6e1e87f62bf48180007808d9d17027725b.jpg) +Figure 5: The results of LLMs on RAG-Error bench. + +![](images/d44dfd46a56d1b1f4f3394a8399fd407d6ed8e61686c9ee85b68440683f3d87f.jpg) +Figure 6: The statistics of different error types in RAG. + +workflow to autonomously enhance RAG capabilities. We first design a data-driven error mining pipeline to establish a hierarchical RAG error system. Using this system, we progressively align an error-critic model with a coarse-to-fine training objective, automating the fine-grained error feedback. We then introduce the critic-guided agentic workflow, which facilitates an error-driven correction by autonomously customizing executor-based solution flows based on error feedback. Experimental results across seven RAG-related datasets demonstrate the effectiveness of RAG-Critic, while qualitative analysis provides valuable insights for building reliable RAG systems. + +# Acknowledgments + +This work was supported by Beijing Natural Science Foundation No. L233008, Beijing Municipal Science and Technology Project No. Z231100010323009, National Science and Technology Major Project No. 2022ZD0120103, National Natural Science Foundation of China No. 62272467, and the fund for building world-class universities (disciplines) of Renmin University of China. The work was partially done at the Engineering Research Center of Next-Generation Intelligent Search and Recommendation, MOE. + +# References + +Marah I Abdin, Sam Ade Jacobs, Ammar Ahmad Awan, Jyoti Aneja, Ahmed Awadallah, Hany Awadalla, Nguyen Bach, Amit Bahree, Arash Bakhtiari, Harkirat S. Behl, Alon Benhaim, Misha Bilenko, Johan Bjorck, Sebastien Bubeck, Martin Cai, Caio Cesar Teodoro Mendes, Weizhu Chen, Vishrav Chaudhary, Parul Chopra, Allie Del Giorno, Gustavo de Rosa, Matthew Dixon, Ronen Eldan, Dan Iter, Amit Garg, Abhishek Goswami, Suriya Gunasekar, Emman Haider, Junheng Hao, Russell J. Hewett, Jamie Huynh, Mojan Javaheripi, Xin Jin, Piero Kauffmann, Nikos Karampatziakis, Dongwoo Kim, Mahoud Khademi, Lev Kurilenko, James R. Lee, Yin Tat Lee, Yuanzhi Li, Chen Liang, Weishung Liu, Eric Lin, Zeqi Lin, Piyush Madan, Arindam Mitra, Hardik Modi, Anh Nguyen, Brandon Norick, Barun Patra, Daniel Perez-Becker, Thomas Portet, Reid Pryzant, Heyang Qin, Marko Radmilac, Corby Rosset, Sambudha Roy, Olatunj Ruwase, Olli Saarikivi, Amin Saied, Adil Salim, Michael Santacroce, Shital Shah, Ning Shang, Hiteshi Sharma, Xia Song, Masahiro Tanaka, Xin Wang, Rachel Ward, Guanhua Wang, Philipp Witte, Michael Wyatt, Can Xu, Jiahang Xu, Sonali Yadav, Fan Yang, Ziyi Yang, Donghan Yu, Chengruidong Zhang, Cyril Zhang, Jianwen Zhang, Li Lyna Zhang, Yi Zhang, Yue Zhang, Yunan Zhang and Xiren Zhou. 2024. Phi-3 technical report: A highly capable language model locally on your phone. CoRR, abs/2404.14219. + +AI Anthropic. 2024. Claude 3.5 sonnet model card addendum. Claude-3.5 Model Card, 3(6). + +Akari Asai, Zeqiu Wu, Yizhong Wang, Avirup Sil, and Hannaneh Hajishirzi. 2024. Self-rag: Learning to retrieve, generate, and critique through self-reflection. In The Twelfth International Conference on Learning Representations, ICLR 2024, Vienna, Austria, May 7-11, 2024. OpenReview.net. + +Xiao Bi, Deli Chen, Guanting Chen, Shanhuang Chen, Damai Dai, Chengqi Deng, Honghui Ding, Kai Dong, Qiushi Du, Zhe Fu, Huazuo Gao, Kaige Gao, Wenjun Gao, Ruiqi Ge, Kang Guan, Daya Guo, Jianzhong Guo, Guangbo Hao, Zhewen Hao, Ying He, Wenjie Hu, Panpan Huang, Erhang Li, Guowei Li, Jiashi Li, Yao Li, Y. K. Li, Wenfeng Liang, Fangyun Lin, Alex X. Liu, Bo Liu, Wen Liu, Xiaodong Liu, Xin Liu, Yiyuan Liu, Haoyu Lu, Shanghao Lu, Fuli Luo, Shirong Ma, Xiaotao Nie, Tian Pei, Yishi Piao, Junjie Qiu, Hui Qu, Tongzheng Ren, Zehui Ren, Chong Ruan, Zhangli Sha, Zhihong Shao, Junxiao Song, Xuecheng Su, Jingxiang Sun, Yaofeng Sun, Minghui Tang, Bingxuan Wang, Peiyi Wang, Shiyu Wang, Yaohui Wang, Yongji Wang, Tong Wu, Y. Wu, Xin Xie, Zhenda Xie, Ziwei Xie, Yiliang Xiong, Hanwei Xu, R. X. Xu, Yanhong Xu, Dejian Yang, Yuxiang You, Shuiping Yu, Xingkai Yu, B. Zhang, Haowei Zhang, Lecong Zhang, Liyue Zhang, Mingchuan Zhang, Minghua Zhang, Wentao Zhang, Yichao Zhang, Chenggang Zhao, Yao Zhao, Shangyan Zhou, Shunfeng Zhou, Qihao Zhu, and Yuheng Zou. 2024. + +Deepseek LLM: scaling open-source language models with longtermism. CoRR, abs/2401.02954. + +Lars Buitinck, Gilles Louppe, Mathieu Blondel, Fabian Pedregosa, Andreas Mueller, Olivier Grisel, Vlad Niculae, Peter Prettenhofer, Alexandre Gramfort, Jaques Grobler, Robert Layton, Jake VanderPlas, Arnaud Joly, Brian Holt, and Gael Varoquaux. 2013. API design for machine learning software: experiences from the scikit-learn project. In ECML PKDD Workshop: Languages for Data Mining and Machine Learning, pages 108-122. + +Zheng Cai, Maosong Cao, Haojiong Chen, Kai Chen, Keyu Chen, Xin Chen, Xun Chen, Zehui Chen, Zhi Chen, Pei Chu, Xiaoyi Dong, Haodong Duan, Qi Fan, Zhaoye Fei, Yang Gao, Jiaye Ge, Chenya Gu, Yuzhe Gu, Tao Gui, Aijia Guo, Qipeng Guo, Conghui He, Yingfan Hu, Ting Huang, Tao Jiang, Penglong Jiao, Zhenjiang Jin, Zhikai Lei, Jiaxing Li, Jingwen Li, Linyang Li, Shuaibin Li, Wei Li, Yining Li, Hongwei Liu, Jiangning Liu, Jiawei Hong, Kaiwen Liu, Kuikun Liu, Xiaoran Liu, Chengqi Lv, Hajun Lv, Kai Lv, Li Ma, Runyuan Ma, Zerun Ma, Wenchang Ning, Linke Ouyang, Jiantao Qiu, Yuan Qu, Fukai Shang, Yunfan Shao, Demin Song, Zifan Song, Zhihao Sui, Peng Sun, Yu Sun, Huanze Tang, Bin Wang, Guoteng Wang, Jiaqi Wang, Jiayu Wang, Rui Wang, Yudong Wang, Ziyi Wang, Xingjian Wei, Qizhen Weng, Fan Wu, Yingtong Xiong, Xiaomeng Zhao and et al. 2024. Internl m2 technical report. CoRR abs/2403.17297. + +Chi-Min Chan, Weize Chen, Yusheng Su, Jianxuan Yu, Wei Xue, Shanghai Zhang, Jie Fu, and Zhiyuan Liu. 2024. Chateval: Towards better llm-based evaluators through multi-agent debate. In The Twelfth International Conference on Learning Representations, ICLR 2024, Vienna, Austria, May 7-11, 2024. OpenReview.net. + +Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde de Oliveira Pinto, Jared Kaplan, Harrison Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, Alex Ray, Raul Puri, Gretchen Krueger, Michael Petrov, Heidi Khlaaf, Girish Sastry, Pamela Mishkin, Brooke Chan, Scott Gray, Nick Ryder, Mikhail Pavlov, Alethea Power, Lukasz Kaiser, Mohammad Bavarian, Clemens Winter, Philippe Tillet, Felipe Petroski Such, Dave Cummings, Matthias Plappert, Fotios Chantzis, Elizabeth Barnes, Ariel Herbert-Voss, William Hebgen Guss, Alex Nichol, Alex Paino, Nikolas Tezak, Jie Tang, Igor Babuschkin, Suchir Balaji, Shantanu Jain, William Saunders, Christopher Hesse, Andrew N. Carr, Jan Leike, Joshua Achiam, Vedant Misra, Evan Morikawa, Alec Radford, Matthew Knight, Miles Brundage, Mira Murati, Katie Mayer, Peter Welinder, Bob McGrew, Dario Amodei, Sam McCandlish, Ilya Sutskever, and Wojciech Zaremba. 2021. Evaluating large language models trained on code. CoRR, abs/2107.03374. + +Yiruo Cheng, Kelong Mao, Ziliang Zhao, Guanting Dong, Hongjin Qian, Yongkang Wu, Tetsuya Sakai, + +Ji-Rong Wen, and Zhicheng Dou. 2024. CORAL: benchmarking multi-turn conversational retrieval-augmentation generation. CoRR, abs/2410.23090. +Tri Dao. 2023. Flashattention-2: Faster attention with better parallelism and work partitioning. CoRR. +Emily Dinan, Stephen Roller, Kurt Shuster, Angela Fan, Michael Auli, and Jason Weston. 2018. Wizard of wikipedia: Knowledge-powered conversational agents. In International Conference on Learning Representations. +Guanting Dong, Yifei Chen, Xiaoxi Li, Jiajie Jin, Hongjin Qian, Yutao Zhu, Hangyu Mao, Guorui Zhou, Zhicheng Dou, and Ji-Rong Wen. 2025. Toolstar: Empowering lmm-brained multi-tool reasoner via reinforcement learning. Preprint, arXiv:2505.16410. +Guanting Dong, Rumei Li, Sirui Wang, Yupeng Zhang, Yunsen Xian, and Weiran Xu. 2023a. Bridging the kb-text gap: Leveraging structured knowledge-aware pre-training for KBQA. In Proceedings of the 32nd ACM International Conference on Information and Knowledge Management, CIKM 2023, Birmingham, United Kingdom, October 21-25, 2023, pages 3854-3859. ACM. +Guanting Dong, Rumei Li, Sirui Wang, Yupeng Zhang, Yunsen Xian, and Weiran Xu. 2023b. Bridging the kb-text gap: Leveraging structured knowledge-aware pre-training for kbqa. In Proceedings of the 32nd ACM International Conference on Information and Knowledge Management, pages 3854-3859. +Guanting Dong, Keming Lu, Chengpeng Li, Tingyu Xia, Bowen Yu, Chang Zhou, and Jingren Zhou. 2024a. Self-play with execution feedback: Improving instruction-following capabilities of large language models. CoRR, abs/2406.13542. +Guanting Dong, Xiaoshuai Song, Yutao Zhu, Runqi Qiao, Zhicheng Dou, and Ji-Rong Wen. 2024b. Toward general instruction-following alignment for retrieval-augmented generation. CoRR, abs/2410.09584. +Guanting Dong, Xiaoshuai Song, Yutao Zhu, Runqi Qiao, Zhicheng Dou, and Ji-Rong Wen. 2024c. Toward general instruction-following alignment for retrieval-augmented generation. CoRR, abs/2410.09584. +Guanting Dong, Hongyi Yuan, Keming Lu, Chengpeng Li, Mingfeng Xue, Dayiheng Liu, Wei Wang, Zheng Yuan, Chang Zhou, and Jingren Zhou. 2024d. How abilities in large language models are affected by supervised fine-tuning data composition. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), ACL 2024, Bangkok, Thailand, August 11-16, 2024, pages 177-198. Association for Computational Linguistics. +Guanting Dong, Chenghao Zhang, Mengjie Deng, Yutao Zhu, Zhicheng Dou, and Ji-Rong Wen. 2024e. + +Progressive multimodal reasoning via active retrieval. arXiv preprint arXiv:2412.14835. +Guanting Dong, Yutao Zhu, Chenghao Zhang, Zechen Wang, Zhicheng Dou, and Ji-Rong Wen. 2024f. Understand what LLM needs: Dual preference alignment for retrieval-augmented generation. CoRR, abs/2406.18676. +Abhimanyu Dubey, Abhinav Jauhri, Abhinav Pandey, Abhishek Kadian, Ahmad Al-Dahle, Aiesha Letman, Akhil Mathur, Alan Schelten, Amy Yang, Angela Fan, Anirudh Goyal, Anthony Hartshorn, Aobo Yang, Archi Mitra, Archie Sravankumar, Artem Korenev, Arthur Hinsvark, Arun Rao, Aston Zhang, Aurelien Rodriguez, Austen Gregerson, Ava Spataru, Baptiste Roziere, Bethany Biron, Binh Tang, Bobbie Chern, Charlotte Caucheteux, Chaya Nayak, Chloe Bi, Chris Marra, Chris McConnell, Christian Keller, Christophe Touret, Chunyang Wu, Corinne Wong, Cristian Canton Ferrer, Cyrus Nikolaidis, Damien Alonsius, Daniel Song, Danielle Pintz, Danny Livshits, David Esiobu, Dhruv Choudhary, Dhruv Mahajan, Diego Garcia-Olano, Diego Perino, Dieuwke Hupkes, Egor Lakomkin, Ehab AlBadawy, Elina Lobanova, Emily Dinan, Eric Michael Smith, Filip Radenovic, Frank Zhang, Gabriel Synnaeve, Gabrielle Lee, Georgia Lewis Anderson, Graeme Nail, Grégoire Mialon, Guan Pang, Guillem Cucurell, Hailey Nguyen, Hannah Korevaar, Hu Xu, Hugo Touvron, Iliyan Zarov, Imanol Arrieta Ibarra, Isabel M. Kloumann, Ishan Misra, Ivan Evtimov, Jade Copet, Jaewon Lee, Jan Geffert, Jana Vranes, Jason Park, Jay Mahadeokar, Jeet Shah, Jelmer van der Linde, Jennifer Billock, Jenny Hong, Jenya Lee, Jeremy Fu, Jianfeng Chi, Jianyu Huang, Jiawen Liu, Jie Wang, Jiecao Yu, Joanna Bitton, Joe Spisak, Jongsoo Park, Joseph Rocca, Joshua Johnstun, Joshua Saxe, Junteng Jia, Kalyan Vasuden Alwala, Kartikeya Upasani, Kate Plawiak, Ke Li, Kenneth Heafield, Kevin Stone, and et al. 2024. The llama 3 herd of models. CoRR abs/2407.21783. +Zhibin Gou, Zhihong Shao, Yeyun Gong, Yelong Shen, Yujiu Yang, Nan Duan, and Weizhu Chen. 2024. CRITIC: large language models can self-correct with tool-interactive critiquing. In The Twelfth International Conference on Learning Representations, ICLR 2024, Vienna, Austria, May 7-11, 2024. Open-Review.net. +Daya Guo, Dejian Yang, Haowei Zhang, Junxiao Song, Ruoyu Zhang, Runxin Xu, Qihao Zhu, Shirong Ma, Peiyi Wang, Xiao Bi, et al. 2025. Deepseek-r1: Incentivizing reasoning capability in llms via reinforcement learning. arXiv preprint arXiv:2501.12948. +Xanh Ho, Anh-Khoa Duong Nguyen, Saku Sugawara, and Akiko Aizawa. 2020. Constructing A multi-hop QA dataset for comprehensive evaluation of reasoning steps. In Proceedings of the 28th International Conference on Computational Linguistics, COLING 2020, Barcelona, Spain (Online), December 8-13, 2020, pages 6609-6625. International Committee on Computational Linguistics. + +Aaron Jaech, Adam Kalai, Adam Lerer, Adam Richardson, Ahmed El-Kishky, Aiden Low, Alec Helyar, Aleksander Madry, Alex Beutel, Alex Carney, Alex Iftimie, Alex Karpenko, Alex Tachard Passos, Alexander Neitz, Alexander Prokofiev, Alexander Wei, Allison Tam, Ally Bennett, Ananya Kumar, Andre Saraiva, Andrea Vallone, Andrew Duberstein, Andrew Kondrich, Andrey Mishchenko, Andy Applebaum, Angela Jiang, Ashvin Nair, Barret Zoph, Behrooz Ghorbani, Ben Rossen, Benjamin Sokolowsky, Boaz Barak, Bob McGrew, Borys Minaiev, Botao Hao, Bowen Baker, Brandon Houghton, Brandon McKinzie, Brydon Eastman, Camillo Lugaresi, Cary Bassin, Cary Hudson, Chak Ming Li, Charles de Bourcy, Chelsea Voss, Chen Shen, Chong Zhang, Chris Koch, Chris Orsinger, Christopher Hesse, Claudia Fischer, Clive Chan, Dan Roberts, Daniel Kappler, Daniel Levy, Daniel Selsam, David Dohan, David Farhi, David Mely, David Robinson, Dimitris Tsipras, Doug Li, Dragos Oprica, Eben Freeman, Eddie Zhang, Edmund Wong, Elizabeth Proehl, Enoch Cheung, Eric Mitchell, Eric Wallace, Erik Ritter, Evan Mays, Fan Wang, Felipe Petroski Such, Filippo Raso, Florencia Leoni, Foivos Tsimpourlas, Francis Song, Fred von Lohmann, Freddie Sulit, Geoff Salmon, Giambattista Parascandolo, Gildas Chabot, Grace Zhao, Greg Brockman, Guillaume Leclerc, Hadi Salman, Haiming Bao, Hao Sheng, Hart Andrin, Hessam Bagherinezhad, Hongyu Ren, Hunter Lightman, Hyung Won Chung, Ian Kivlichan, Ian O'Connell, Ian Osband, Ignasi Clavera Gilaberte and Ilge Akkaya. 2024. Openai o1 system card. CoRR, abs/2412.16720. + +Albert Q. Jiang, Alexandre Sablayrolles, Arthur Mensch, Chris Bamford, Devendra Singh Chaplot, Diego de Las Casas, Florian Bressand, Gianna Lengyel, Guillaume Lample, Lucile Saulnier, Lélio Renard Lavaud, Marie-Anne Lachaux, Pierre Stock, Teven Le Scao, Thibaut Lavril, Thomas Wang, Timothée Lacroix, and William El Sayed. 2023a. Mistral 7b. CoRR, abs/2310.06825. + +Dongfu Jiang, Yishan Li, Ge Zhang, Wenhao Huang, Bill Yuchen Lin, and Wenhu Chen. 2024. Tigerscore: Towards building explainable metric for all text generation tasks. Trans. Mach. Learn. Res., 2024. + +Zhengbao Jiang, Frank F. Xu, Luyu Gao, Zhiqing Sun, Qian Liu, Jane Dwivedi-Yu, Yiming Yang, Jamie Callan, and Graham Neubig. 2023b. Active retrieval augmented generation. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, EMNLP 2023, Singapore, December 6-10, 2023, pages 7969-7992. Association for Computational Linguistics. + +Jiajie Jin, Yutao Zhu, Xinyu Yang, Chenghao Zhang, and Zhicheng Dou. 2024a. Flashrag: A modular toolkit for efficient retrieval-augmented generation research. CoRR, abs/2405.13576. + +Zhuoran Jin, Hongbang Yuan, Tianyi Men, Pengfei Cao, Yubo Chen, Kang Liu, and Jun Zhao. 2024b. Rag-rewardbench: Benchmarking reward models in re + +trieval augmented generation for preference alignment. CoRR, abs/2412.13746. + +Mandar Joshi, Eunsol Choi, Daniel S. Weld, and Luke Zettlemoyer. 2017. Triviaqa: A large scale distantly supervised challenge dataset for reading comprehension. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics, ACL 2017, Vancouver, Canada, July 30 - August 4, Volume 1: Long Papers, pages 1601-1611. Association for Computational Linguistics. + +Pei Ke, Bosi Wen, Andrew Feng, Xiao Liu, Xuanyu Lei, Jiale Cheng, Shengyuan Wang, Aohan Zeng, Yuxiao Dong, Hongning Wang, Jie Tang, and Minlie Huang. 2024. Critiquellm: Towards an informative critique generation model for evaluation of large language model generation. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), ACL 2024, Bangkok, Thailand, August 11-16, 2024, pages 13034-13054. Association for Computational Linguistics. + +Tom Kwiatkowski, Jennimaria Palomaki, Olivia Redfield, Michael Collins, Ankur P. Parikh, Chris Alberti, Danielle Epstein, Illia Polosukhin, Jacob Devlin, Kenton Lee, Kristina Toutanova, Llion Jones, Matthew Kelcey, Ming-Wei Chang, Andrew M. Dai, Jakob Uszkoreit, Quoc Le, and Slav Petrov. 2019. Natural questions: a benchmark for question answering research. Trans. Assoc. Comput. Linguistics, 7:452-466. + +Woosuk Kwon, Zhuohan Li, Siyuan Zhuang, Ying Sheng, Lianmin Zheng, Cody Hao Yu, Joseph Gonzalez, Hao Zhang, and Ion Stoica. 2023. Efficient memory management for large language model serving with pagedattention. In Proceedings of the 29th Symposium on Operating Systems Principles, SOSP 2023, Koblenz, Germany, October 23-26, 2023, pages 611-626. ACM. + +Hung Le, Yue Wang, Akhilesh Deepak Gotmare, Silvio Savarese, and Steven C. H. Hoi. 2022. Coderl: Mastering code generation through pretrained models and deep reinforcement learning. Preprint, arXiv:2207.01780. + +Shanglin Lei, Guanting Dong, Xiaoping Wang, Keheng Wang, and Sirui Wang. 2023. Instructerc: Reforming emotion recognition in conversation with a retrieval multi-task llms framework. CoRR, abs/2309.11911. + +Patrick S. H. Lewis, Ethan Perez, Aleksandra Pik-tus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich Kuttler, Mike Lewis, Wen-tau Yih, Tim Roektaschel, Sebastian Riedel, and Douwe Kiela. 2020. Retrieval-augmented generation for knowledge-intensive NLP tasks. In Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual. + +Dawei Li, Bohan Jiang, Liangjie Huang, Alimohammad Beigi, Chengshuai Zhao, Zhen Tan, Amrita Bhattacharjee, Yuxuan Jiang, Canyu Chen, Tianhao Wu, Kai Shu, Lu Cheng, and Huan Liu. 2024a. From generation to judgment: Opportunities and challenges of llm-as-a-judge. CoRR, abs/2411.16594. +Haitao Li, Qian Dong, Junjie Chen, Huixue Su, Yujia Zhou, Qingyao Ai, Ziyi Ye, and Yiqun Liu. 2024b. Llms-as-judges: A comprehensive survey on llm-based evaluation methods. CoRR, abs/2412.05579. +Xiaoxi Li, Guanting Dong, Jiajie Jin, Yuyao Zhang, Yujia Zhou, Yutao Zhu, Peitian Zhang, and Zhicheng Dou. 2025a. Search-o1: Agentic search-enhanced large reasoning models. CoRR, abs/2501.05366. +Xiaoxi Li, Jiajie Jin, Guanting Dong, Hongjin Qian, Yutao Zhu, Yongkang Wu, Ji-Rong Wen, and Zhicheng Dou. 2025b. Webthinker: Empowering large reasoning models with deep research capability. CoRR, abs/2504.21776. +Xiaoxi Li, Jiajie Jin, Yujia Zhou, Yongkang Wu, Zhonghua Li, Qi Ye, and Zhicheng Dou. 2024c. Retroll: Empowering large language models to retrieve fine-grained evidence within generation. arXiv preprint arXiv:2412.11919. +Yen-Ting Lin and Yun-Nung Chen. 2023. Llm-eval: Unified multi-dimensional automatic evaluation for open-domain conversations with large language models. CoRR, abs/2305.13711. +Zicheng Lin, Zhibin Gou, Tian Liang, Ruilin Luo, Haowei Liu, and Yujiu Yang. 2024. Criticbench: Benchmarking llms for critique-correct reasoning. In Findings of the Association for Computational Linguistics, ACL 2024, Bangkok, Thailand and virtual meeting, August 11-16, 2024, pages 1552-1587. Association for Computational Linguistics. +Yang Liu, Dan Iter, Yichong Xu, Shuohang Wang, Ruochen Xu, and Chenguang Zhu. 2023. G-eval: NLG evaluation using gpt-4 with better human alignment. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, EMNLP 2023, Singapore, December 6-10, 2023, pages 2511-2522. Association for Computational Linguistics. +Keming Lu, Hongyi Yuan, Zheng Yuan, Runji Lin, Junyang Lin, Chuanqi Tan, Chang Zhou, and Jingren Zhou. 2023. #instag: Instruction tagging for analyzing supervised fine-tuning of large language models. CoRR, abs/2308.07074. +Haoran Luo, Haihong E, Zichen Tang, Shiyao Peng, Yikai Guo, Wentai Zhang, Chenghao Ma, Guanting Dong, Meina Song, Wei Lin, Yifan Zhu, and Anh Tuan Luu. 2024. ChatKBQA: A generate-then-retrieve framework for knowledge base question answering with fine-tuned large language models. In Findings of the Association for Computational Linguistics ACL 2024, pages 2039-2056, Bangkok, Thailand and virtual meeting. Association for Computational Linguistics. + +Aman Madaan, Niket Tandon, Prakhar Gupta, Skyler Hallinan, Luyu Gao, Sarah Wiegreffe, Uri Alon, Nouha Dziri, Shrimai Prabhumoye, Yiming Yang, Shashank Gupta, Bodhisattwa Prasad Majumder, Katherine Hermann, Sean Welleck, Amir Yazdanbakhsh, and Peter Clark. 2023. Self-refine: Iterative refinement with self-feedback. In Advances in Neural Information Processing Systems 36: Annual Conference on Neural Information Processing Systems 2023, NeurIPS 2023, New Orleans, LA, USA, December 10 - 16, 2023. +Meta. 2024. Introducing meta llama 3: The most capable openly available llm to date. +OpenAI, :, Aaron Jaech, Adam Kalai, Adam Lerer, Adam Richardson, Ahmed El-Kishky, Aiden Low, Alec Helyar, Aleksander Madry, Alex Beutel, Alex Carney, Alex Iftimie, Alex Karpenko, Alex Tachard Passos, Alexander Neitz, Alexander Prokofiev, Alexander Wei, Allison Tam, Ally Bennett, Ananya Kumar, Andre Saraiva, Andrea Vallone, Andrew Duberstein, Andrew Kondrich, Andrey Mishchenko, Andy Applebaum, Angela Jiang, Ashvin Nair, Barret Zoph, Behrooz Ghorbani, Ben Rossen, Benjamin Sokolowsky, Boaz Barak, Bob McGrew, Borys Minaiev, Botao Hao, Bowen Baker, Brandon Houghton, Brandon McKinzie, Brydon Eastman, Camillo Lugaresi, Cary Bassin, Cary Hudson, Chak Ming Li, Charles de Bourcy, Chelsea Voss, Chen Shen, Chong Zhang, Chris Koch, Chris Orsinger, Christopher Hesse, Claudia Fischer, Clive Chan, Dan Roberts, Daniel Kappler, Daniel Levy, Daniel Selsam, David Dohan, David Farhi, David Mely, David Robinson, Dimitris Tsipras, Doug Li, Dragos Oprica, Eben Freeman, Eddie Zhang, Edmund Wong, Elizabeth Proehl, Enoch Cheung, Eric Mitchell, Eric Wallace, Erik Ritter, Evan Mays, Fan Wang, Felipe Petroski Such, Filippo Raso, Florencia Leoni, Foivos Tsimpourlas, Francis Song, Fred von Lohmann, Freddie Sulit, Geoff Salmon, Giambattista Parascandolo, Gildas Chabot, Grace Zhao, Greg Brockman, Guillaume Leclerc, Hadi Salman, Haiming Bao, Hao Sheng, Hart Andrin, Hessam Bagherinezhad, Hongyu Ren Hunter Lightman, Hyung Won Chung, Ian Kivlichan, Ian O'Connell, Ian Osband, Ignasi Clavera Gilaberte Ilge Akkaya, Ilya Kostrikov, Ilya Sutskever, Irina Kofman, Jakub Pachocki, James Lennon, Jason Wei Jean Harb, Jerry Twore, Jiacheng Feng, Jiahui Yu Jiayi Weng, Jie Tang, Jieqi Yu, Joaquin Quinonero Candela, Joe Palermo, Joel Parish Johannes Heidecke John Hallman John Rizzo Jonathan Gordon Jonathan Uesato Jonathan WardJoost Huizinga. Julie Wang,Kai Chen,Kai Xiao,Karan Singhal,Karina Nguyen,Karl Cobbe,Katy Shi,Kayla Wood Kendra Rimbach,Keren Gu-LembergKevin Liu Kevin Lu Kevin Stone Kevin Yu Lama Ahmad Lauren YangLeo LiuLeon Maksin Leyton Ho Liam FedusLillian WengLinden LiLindsay McCallumLindsey HeldLorenz Kuhn Lukas Kondraciuk,Lukasz Kaiser,Luke Metz,Madelaine Boyd Maja Trebacz Manas Joglekar Mark Chen Marko TintorMason Meyer Matt JonesMatt Kaufer Max Schwarzer Meghan Shah Mehmet Yatbaz + +Melody Y. Guan, Mengyuan Xu, Mengyuan Yan, Mia Glaese, Mianna Chen, Michael Lampe, Michael Malek, Michele Wang, Michelle Fradin, Mike McClay, Mikhail Pavlov, Miles Wang, Mingxuan Wang, Mira Murati, Mo Bavarian, Mostafa Rohaninejad, Nat McAleese, Neil Chowdhury, Neil Chowdhury, Nick Ryder, Nikolas Tezak, Noam Brown, Ofir Nachum, Oleg Boiko, Oleg Murk, Olivia Watkins, Patrick Chao, Paul Ashbourne, Pavel Izmailov, Peter Zhokhov, Rachel Dias, Rahul Arora, Randall Lin, Rapha Gontijo Lopes, Raz Gaon, Reah Miyara, Reimar Leike, Renny Hwang, Rhythm Garg, Robin Brown, Roshan James, Rui Shu, Ryan Cheu, Ryan Greene, Saachi Jain, Sam Altman, Sam Toizer, Sam Toyer, Samuel Miserendino, Sandhini Agarwal, Santiago Hernandez, Sasha Baker, Scott McKinney, Scottie Yan, Shengjia Zhao, Shengli Hu, Shibani Santurkar, Shraman Ray Chaudhuri, Shuyuan Zhang, Siyuan Fu, Spencer Papay, Steph Lin, Suchir Balaji, Suvansh Sanjeev, Szymon Sidor, Tal Broda, Aidan Clark, Tao Wang, Taylor Gordon, Ted Sanders, Tejal Patwardhan, Thibault Sottiaux, Thomas Degry, Thomas Dimson, Tianhao Zheng, Timur Garipov, Tom Stasi, Trapit Bansal, Trevor Creech, Troy Peterson, Tyna Eloundou, Valerie Qi, Vineet Kosaraju, Vinnie Monaco, Vitchyr Pong, Vlad Fomenko, Weiyi Zheng, Wenda Zhou, Wes McCabe, Wojciech Zaremba, Yann Dubois, Yinghai Lu, Yining Chen, Young Cha, Yu Bai, Yuchen He, Yuchen Zhang, Yunyun Wang, Zheng Shao, and Zhuohan Li. 2024. Openai o1 system card. Preprint. arXiv:2412.16720. + +OpenAI. 2023. GPT-4 technical report. CoRR, abs/2303.08774. + +Runqi Qiao, Qiuna Tan, Guanting Dong, Minhui Wu, Chong Sun, Xiaoshuai Song, Zhuoma Gongque, Shanglin Lei, Zhe Wei, Miaoxuan Zhang, Runfeng Qiao, Yifan Zhang, Xiao Zong, Yida Xu, Muxi Diao, Zhimin Bao, Chen Li, and Honggang Zhang. 2024a. We-math: Does your large multimodal model achieve human-like mathematical reasoning? CoRR, abs/2407.01284. + +Shuofei Qiao, Honghao Gui, Chengfei Lv, Qianghuai Jia, Huajun Chen, and Ningyu Zhang. 2024b. Making language models better tool learners with execution feedback. Preprint, arXiv:2305.13068. + +Rafael Rafailov, Archit Sharma, Eric Mitchell, Stefano Ermon, Christopher D. Manning, and Chelsea Finn. 2023. Direct preference optimization: Your language model is secretly a reward model. + +Jeff Rasley, Samyam Rajbhandari, Olatunjri Ruwase, and Yuxiong He. 2020. Deepspeed: System optimizations enable training deep learning models with over 100 billion parameters. KDD '20. + +Matthew Renze and Erhan Guven. 2024. Self-reflection in LLM agents: Effects on problem-solving performance. CoRR, abs/2405.06682. + +Morgane Rivière, Shreya Pathak, Pier Giuseppe Sessa, Cassidy Hardin, Surya Bhupatiraju, Léonard + +Hussenot, Thomas Mesnard, Bobak Shahriari, Alexandre Ramé, Johan Ferret, Peter Liu, Pouya Tafti, Abe Friesen, Michelle Casbon, Sabela Ramos, Ravin Kumar, Charline Le Lan, Sammy Jerome, Anton Tsitsulin, Nino Vieillard, Piotr Stanczyk, Sertan Girgin, Nikola Momchev, Matt Hoffman, Shantanu Thakoor, Jean-Bastien Grill, Behnam Neyshabur, Olivier Bachem, Alanna Walton, Aliaksei Severyn, Alicia Parrish, Aliya Ahmad, Allen Hutchison, Alvin Abdagic, Amanda Carl, Amy Shen, Andy Brock, Andy Coenen, Anthony Laforge, Antonia Paterson, Ben Bastian, Bilal Piot, Bo Wu, Brandon Royal, Charlie Chen, Chintu Kumar, Chris Perry, Chris Welty, Christopher A. Choquette-Choo, Danila Sinopalnikov, David Weinberger, Dimple Vijaykumar, Dominika Rogozinska, Dustin Herbison, Elisa Bandy, Emma Wang, Eric Noland, Erica Moreira, Evan Senter, Evgenii Eltsyshev, Francesco Visin, Gabriel Rasskin, Gary Wei, Glenn Cameron, Gus Martins, Hadi Hashemi, Hanna Klimczak-Plucinska, Harleen Batra, Harsh Dhand, Ivan Nardini, Jacinda Mein, Jack Zhou, James Svensson, Jeff Stanway, Jetha Chan, Jin Peng Zhou, Joana Carrasqueira, Joana Iljazi, Jocelyn Becker, Joe Fernandez, Joost van Amersfoort, Josh Gordon, Josh Lipschultz, Josh Newlan, Ju-yeong Ji, Kareem Mohamed, Kartikeya Badola, Kat Black, Katie Millican, Keelin McDonell, Kelvin Nguyen, Kiranbir Sodhia, Kish Greene, Lars Lowe Sjösund, Lauren Usui, Laurent Sifre, Lena Heuermann, Leticia Lago, and Lilly McNealus. 2024. Gemma 2: Improving open language models at a practical size. CoRR, abs/2408.00118. + +Dongyu Ru, Lin Qiu, Xiangkun Hu, Tianhang Zhang, Peng Shi, Shuaichen Chang, Cheng Jiayang, Cunxiang Wang, Shichao Sun, Huanyu Li, Zizhao Zhang, Binjie Wang, Jiarong Jiang, Tong He, Zhiguo Wang, Pengfei Liu, Yue Zhang, and Zheng Zhang. 2024. Ragchecker: A fine-grained framework for diagnosing retrieval-augmented generation. CoRR, abs/2408.08067. + +Kurt Shuster, Spencer Poff, Moya Chen, Douwe Kiela, and Jason Weston. 2021. Retrieval augmentation reduces hallucination in conversation. In *Findings of the Association for Computational Linguistics: EMNLP* 2021, Virtual Event/Punta Cana, Dominican Republic, 16-20 November; 2021, pages 3784-3803. Association for Computational Linguistics. + +Ivan Stelmakh, Yi Luan, Bhuwan Dhingra, and Ming-Wei Chang. 2022. ASQA: factoid questions meet long-form answers. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, EMNLP 2022, Abu Dhabi, United Arab Emirates, December 7-11, 2022, pages 8273-8288. Association for Computational Linguistics. + +Jiejun Tan, Zhicheng Dou, Wen Wang, Mang Wang, Weipeng Chen, and Ji-Rong Wen. 2025. HtmIrag: HtmI is better than plain text for modeling retrieved knowledge in rag systems. In Proceedings of the ACM on Web Conference 2025, pages 1733-1746. + +Liang Wang, Nan Yang, Xiaolong Huang, Binxing Jiao, Linjun Yang, Daxin Jiang, Rangan Majumder, and Furu Wei. 2022. Text embeddings by weakly-supervised contrastive pre-training. CoRR, abs/2212.03533. +Joe H Ward Jr. 1963. Hierarchical grouping to optimize an objective function. Journal of the American statistical association, 58(301):236-244. +Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Brian Ichter, Fei Xia, Ed H. Chi, Quoc V. Le, and Denny Zhou. 2022. Chain-of-thought prompting elicits reasoning in large language models. In Advances in Neural Information Processing Systems 35: Annual Conference on Neural Information Processing Systems 2022, NeurIPS 2022, New Orleans, LA, USA, November 28 - December 9, 2022. +Tianhao Wu, Weizhe Yuan, Olga Golovneva, Jing Xu, Yuandong Tian, Jiantao Jiao, Jason Weston, and Sainbayar Sukhbaatar. 2024. Meta-rewarding language models: Self-improving alignment with llm-as-a-meta-judge. CoRR, abs/2407.19594. +Shitao Xiao, Zheng Liu, Peitian Zhang, and Niklas Muennighof. 2023. C-pack: Packaged resources to advance general chinese embedding. CoRR, abs/2309.07597. +Shi-Qi Yan, Jia-Chen Gu, Yun Zhu, and Zhen-Hua Ling. 2024. Corrective retrieval augmented generation. CoRR, abs/2401.15884. +An Yang, Baosong Yang, Beichen Zhang, Binyuan Hui, Bo Zheng, Bowen Yu, Chengyuan Li, Dayiheng Liu, Fei Huang, Haoran Wei, Huan Lin, Jian Yang, Jianhong Tu, Jianwei Zhang, Jianxin Yang, Jiaxi Yang, Jingren Zhou, Junyang Lin, Kai Dang, Keming Lu, Keqin Bao, Kexin Yang, Le Yu, Mei Li, Mingfeng Xue, Pei Zhang, Qin Zhu, Rui Men, Runji Lin, Tianhao Li, Tingyu Xia, Xingzhang Ren, Xuancheng Ren, Yang Fan, Yang Su, Yichang Zhang, Yu Wan, Yuqiong Liu, Zeyu Cui, Zhenru Zhang, and Zihan Qiu. 2024. Qwen2.5 technical report. CoRR, abs/2412.15115. +Zhilin Yang, Peng Qi, Saizheng Zhang, Yoshua Bengio, William W. Cohen, Ruslan Salakhutdinov, and Christopher D. Manning. 2018. Hotpotqa: A dataset for diverse, explainable multi-hop question answering. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, Brussels, Belgium, October 31 - November 4, 2018, pages 2369-2380. Association for Computational Linguistics. +Seungjun Yi, Jaeyoung Lim, and Juyong Yoon. 2024. Protocollm: Automatic evaluation framework of llms on domain-specific scientific protocol formulation tasks. CoRR, abs/2410.04601. +Alex Young, Bei Chen, Chao Li, Chengen Huang, Ge Zhang, Guanwei Zhang, Heng Li, Jiangcheng Zhu, Jianqun Chen, Jing Chang, Kaidong Yu, Peng Liu, Qiang Liu, Shawn Yue, Senbin Yang, Shiming + +Yang, Tao Yu, Wen Xie, Wenhao Huang, Xiaohui Hu, Xiaoyi Ren, Xinyao Niu, Pengcheng Nie, Yuchi Xu, Yudong Liu, Yue Wang, Yuxuan Cai, Zhenyu Gu, Zhiyuan Liu, and Zonghong Dai. 2024. Yi: Open foundation models by 01.ai. CoRR, abs/2403.04652. +Xiang Yue, Boshi Wang, Ziru Chen, Kai Zhang, Yu Su, and Huan Sun. 2023. Automatic evaluation of attribution by large language models. In *Findings of the Association for Computational Linguistics: EMNLP* 2023, Singapore, December 6-10, 2023, pages 4615-4635. Association for Computational Linguistics. +Aohan Zeng, Bin Xu, Bowen Wang, Chenhui Zhang, Da Yin, Diego Rojas, Guanyu Feng, Hanlin Zhao, Hanyu Lai, Hao Yu, Hongning Wang, Jiadai Sun, Jiajie Zhang, Jiale Cheng, Jiayi Gui, Jie Tang, Jing Zhang, Juanzi Li, Lei Zhao, Lindong Wu, Lucen Zhong, Mingdao Liu, Minlie Huang, Peng Zhang, Qinkai Zheng, Rui Lu, Shuaiqi Duan, Shudan Zhang, Shulin Cao, Shuxun Yang, Weng Lam Tam, Wenyi Zhao, Xiao Liu, Xiao Xia, Xiaohan Zhang, Xiaotao Gu, Xin Lv, Xinghan Liu, Xinyi Liu, Xinyue Yang, Xixuan Song, Xunkai Zhang, Yifan An, Yifan Xu, Yilin Niu, Yuantao Yang, Yueyan Li, Yushi Bai, Yuxiao Dong, Zehan Qi, Zhaoyu Wang, Zhen Yang, Zhengxiao Du, Zhenyu Hou, and Zihan Wang. 2024. Chatglm: A family of large language models from GLM-130B to GLM-4 all tools. CoRR, abs/2406.12793. +Xinghua Zhang, Bowen Yu, Haiyang Yu, Yangyu Lv, Tingwen Liu, Fei Huang, Hongbo Xu, and Yongbin Li. 2023a. Wider and deeper LLM networks are fairer LLM evaluators. CoRR, abs/2308.01862. +Yue Zhang, Yafu Li, Leyang Cui, Deng Cai, Lemao Liu, Tingchen Fu, Xinting Huang, Enbo Zhao, Yu Zhang, Yulong Chen, Longyue Wang, Anh Tuan Luu, Wei Bi, Freda Shi, and Shuming Shi. 2023b. Siren's song in the AI ocean: A survey on hallucination in large language models. CoRR, abs/2309.01219. +Yuyao Zhang, Zhicheng Dou, Xiaoxi Li, Jiajie Jin, Yongkang Wu, Zhonghua Li, Qi Ye, and Ji-Rong Wen. 2025. Neuro-symbolic query compiler. arXiv preprint arXiv:2505.11932. +Ruochen Zhao, Wenxuan Zhang, Yew Ken Chia, Deli Zhao, and Lidong Bing. 2024. Auto arena of llms: Automating LLM evaluations with agent peer-battles and committee discussions. CoRR, abs/2405.20267. +Lianmin Zheng, Wei-Lin Chiang, Ying Sheng, Siyuan Zhuang, Zhanghao Wu, Yonghao Zhuang, Zi Lin, Zhuohan Li, Dacheng Li, Eric P. Xing, Hao Zhang, Joseph E. Gonzalez, and Ion Stoica. 2023. Judging llm-as-a-judge with mt-bench and chatbot arena. In Advances in Neural Information Processing Systems 36: Annual Conference on Neural Information Processing Systems 2023, NeurIPS 2023, New Orleans, LA, USA, December 10 - 16, 2023. +Yujia Zhou, Zheng Liu, Jiajie Jin, Jian-Yun Nie, and Zhicheng Dou. 2024. Metacognitive retrieval-augmented large language models. In Proceedings of + +the ACM on Web Conference 2024, WWW 2024, Singapore, May 13-17, 2024, pages 1453-1463. ACM. +Yutao Zhu, Zhaoheng Huang, Zhicheng Dou, and JiRong Wen. 2025. One token can help! learning scalable and pluggable virtual tokens for retrieval-augmented large language models. In AAAI-25, Sponsored by the Association for the Advancement of Artificial Intelligence, February 25 - March 4, 2025, Philadelphia, PA, USA, pages 26166-26174. AAAI Press. +Yutao Zhu, Huaying Yuan, Shuting Wang, Jiongnan Liu, Wenhan Liu, Chenlong Deng, Zhicheng Dou, and Ji-Rong Wen. 2023. Large language models for information retrieval: A survey. CoRR, abs/2308.07107. +Yutao Zhu, Peitian Zhang, Chenghao Zhang, Yifei Chen, Binyu Xie, Zheng Liu, Ji-Rong Wen, and Zhicheng Dou. 2024. INTERS: unlocking the power of large language models in search with instruction tuning. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), ACL 2024, Bangkok, Thailand, August 11-16, 2024, pages 2782-2809. Association for Computational Linguistics. + +# Appendix + +# A Detailed Experiments of RAG-Critic 17 + +A.1 Computation Cost 17 +A.2 Iteration Exploration of RAG-Critic 17 +A.3 Detailed Results of RAG-Error Benchmark 18 +A.4 Detailed Error Statistics & Analysis 18 +A.5 LLM Pool for Response Sampling 19 +A.6 Error-Action Mapping Table 19 +A.7 Action Functions 19 + +# B Details of Experimental Settings 20 + +B.1 Datasets 20 +B.2 Implementation Details 20 +B.3Baselines 22 +B.4 Case Study 22 +B.5 Prompt Template 23 + +# C Limitations 24 + +# A Detailed Experiments of RAG-Critic + +# A.1 Computation Cost + +To verify the computational cost rationality of RAG-Critic, as shown in Tab. 8, we compare the inference costs of RAG-Critic and the strong baseline MetaRAG during the inference process. The statistics show that in the planning and final generation stages, both methods execute based on solutions. MetaRAG first requires a planning model to assess whether its knowledge is sufficient to answer the question, then executes a rule-based preset solution; On the other hand, RAG-Critic executes a solution customized by the planning model. Therefore, in this respect, the consumption difference between the two is minimal. + +Regarding the model's judgment capability, RAG-Critic requires only a 3B model for a single inference, while MetaRAG requires a 70B model for triple critique verification, including: 1) assessing if the response contains errors; 2) verifying if external documents support the question's inference; 3) evaluating whether the model's knowledge is sufficient for direct inference. Notably, in fine-grained error detection, RAG-Critic demonstrates greater accuracy with a smaller model size. This indicates that, compared to critique-based RAG methods, we maintain reasonable resource consumption while ensuring performance. + +Table 6: Performance of Different LLMs with N Iterations in the RAG-Critic Workflow. The values in parentheses represent the performance increase or decrease for each round. + +
ModelNQTQASQAWow
Llama3-8B38.355.311.510.2
+ 1 iteration42.0 (+3.7)60.1 (+4.9)19.0 (+7.5)11.6 (+1.4)
+ 2 iterations42.4 (+0.4)60.4 (+0.0)19.6 (+0.6)12.5 (+0.9)
Llama3-70B40.160.114.39.6
+ 1 iteration45.4 (+5.3)62.2 (+2.1)17.9 (+3.6)10.7 (+1.1)
+ 2 iterations44.8 (-0.7)62.2 (+0.0)19.0 (+1.1)11.6 (+0.9)
+ +Table 7: Overall performance on RAG-Error Benchmark. The top2 results are in bold and underlined. + +
MethodIdentificationClassification
Correct Error Avg. Tag1 Tag2 Avg.
Closed-source LLMs
o1-preview79.059.469.223.67.4 15.5
o1-mini89.342.966.117.75.6 11.7
GPT4-o77.978.178.038.515.4 26.9
Claude 3.546.789.368.232.210.6 21.3
Open-source LLMs
Qwen2.5-72B79.879.879.845.517.4 31.5
Llama3.1-70B95.242.768.925.710.0 17.8
Qwen2.5-7B58.585.672.341.821.9 31.9
Llama3.1-8B98.727.863.326.018.4 22.2
Deepseek-R1-Distill-7B78.743.661.214.28.3 11.3
Phi-3.5-mini46.58.3727.427.912.6 20.3
Ours
RAG-Critic (3B)95.896.696.265.242.4 58.3
+ +# A.2 Iteration Exploration of RAG-Critic + +As shown in Fig. 3, the unique design of the RAG-Critic workflow allows for iterative error-oriented correction. Therefore, this section further explores the performance trends of Llama3.1-8B and Llama3-70B under multiple rounds of RAG-Critic. As indicated in Tab. 6, RAG-Critic demonstrates significant improvements across various datasets in the first round of iterations, confirming its effectiveness. In the second round, Llama3.1-8B still achieves improvements in challenging tasks such as ASQA and WOW, while performance gains in simpler QA tasks like NQ and TQ remain minimal. Llama3-70B exhibits a similar trend, with a slight decline in performance on NQ. This suggests that iterations provide more substantial performance gains for RAG-Critic in difficult tasks, but achieving further improvements in simpler RAG tasks proves challenging. + +Table 8: The comparison between MetaRAG and RAG-Critic in computation costs. + +
DatasetCritic Model#Count ↓Critic Acc.(%) ↑Planning Model#Count ↓RAG Generator#Count ↓
MetaRAGLlama3.1-70B368.8Llama3.1-70B1Llama3.1-70B1
RAG-CriticQwen2.5-3B196.8Llama3.1-70B1Llama3.1-70B1
+ +![](images/434d53cdc39310cf4103ec198fda7aca59b01cb023288be100e4b04a3613810a.jpg) +Figure 7: The Fine-grained errors (20 categories) of RAG-Error Benchmark. + +# A.3 Detailed Results of RAG-Error Benchmark + +In this section, we present more granular results from the RAG-Error Benchmark, analyzed from two perspectives: + +Coarse-Grained Identification. As shown in Table 7, we first present results from additional closed-source and open-source LLMs, including the newly added o1-mini, Deepseek-R1-Distill-7B, Qwen2.5-7B, Llama3.1-8B, and Phi-3.5-mini. Consistent with the main experimental conclusions, these models also exhibit the tendency to over-predict correct labels, as seen in o1-mini, Llama3.1-8B, Deepseek-R1-Distill-7B, and Phi-3.5-mini. This phenomenon indicates that existing LLMs struggle to achieve stable error-critique capabilities in RAG tasks. Notably, RAG Critic maintains optimal performance with only 3B parameters, demonstrating its advantage in parameter efficiency. + +Fine-Grained Classification. As outlined in Fig. 7, we also present the evaluation results for the recognition ability of fine-grained error types (20 categories) in the RAG-Error benchmark. Our RAG-Critic shows comprehensive and outstanding capabilities in fine-grained error identification, significantly surpassing the strong closed + +source model GPT4-o and the open-source model Qwen2.5-72B. This further validates that the error-oriented correction ability of the RAG-Critic framework greatly benefits from its precise and detailed error classification. In summary, RAG-Critic not only excels in parameter efficiency but also demonstrates strong potential in fine-grained error recognition, providing important insights for future research and applications. + +# A.4 Detailed Error Statistics & Analysis + +To explore the most common fine-grained RAG errors across models with different parameter sizes more deeply, follow WE-MATH (Qiao et al., 2024a), we sample 100 responses from each dataset, specifically Qwen2.5 (7B, 72B) and Llama3.1 (8B, 70B), as shown in Figure 8 to 11. We utilize RAG-Critic for both coarse and fine-grained error labeling and present the error types in tier-2 for the top-5 error frequencies. The results indicate that irrelevant information and insufficient information retrieval are the most prevalent issues, showing consistency across the Qwen and Llama series. In the generation phase, besides insufficient information to support reasoning, the problem of factual inaccuracies is also quite significant. This suggests that providing more accurate information for both retrieval and reasoning in the RAG do + +![](images/d83192c10e94ce01b5ece92caa3ea67db04a2f0aaf73ad8826998c2334431cd1.jpg) +Distribution of Error Types in Llama3.1-8B + +![](images/c0312fa5e0278d506b38a1d05905d7a7961d4badcb49e8e19c42959be16bc9d1.jpg) +Distribution of Error Types in Llama3.1-70B +Figure 9: The statistic of fine-grained RAG error types in Llama3.1-70B. + +Table 9: The display of our LLM pool for sampling + +
#Param sizesModel
70BQwen2.5-70B-Instruct, llama3.3-70B-Instruct
32B - 34BQwen2.5-32B-Instruct, Yi-1.5-34B-Chat
27BGemma-2-27b-it
20BInternLM2.5-20B-Chat
14BQwen2.5-14B-Instruct
7B - 9BLlama3.1-8B-Instruct, Qwen2.5-7B-Instruct, Mistral-v0.3-7B-Instruct, GLM-4-9B-Chat, InternLM2.5-7B-Chat, Yi-1.5-9B-Chat, Gemma-2-9b-it, Deepseek-llm-7b-chat
3BLlama3.2-3B-Instruct, Qwen2.5-3B-Instruct, Phi-3.5-mini-instruct
+ +main is more urgent than merely improving the reasoning capabilities of the RAG generator. + +# A.5 LLM Pool for Response Sampling + +In this section, we present the LLMs utilized in constructing the hierarchical RAG error system. As shown in Table 9, we select a diverse pool $M$ of 15 open-source models from 9 series, with parameter sizes ranging from 3B to 70B. The model pool $M$ includes Qwen2.5 (Yang et al., 2024), Llama3 (Meta, 2024), Deepseek (Bi et al., 2024), Yi (Young et al., 2024), Phi3 (Abdin et al., 2024), + +![](images/8f355f408a6130dabd63e6f4fe1e03100e2a6bbcd7f1a045ce519922724a255c.jpg) +Figure 8: The statistic of fine-grained RAG error types in Llama3.1-8B. +Distribution of Error Types in Qwen2.5-7B + +![](images/a296cbb7ad60f78a89b3dea9aa1ea91b62291e38d639ca10a68e330a7af3f433.jpg) +Figure 10: The statistics of fine-grained RAG error types in Qwen2.5-7B. +Figure 11: The statistics of fine-grained RAG error types in Qwen2.5-72B. + +Gemma2 (Rivière et al., 2024), Mistral (Jiang et al., 2023a), InternLM2.5 (Cai et al., 2024) and GLM4 (Zeng et al., 2024). This way effectively mitigates response bias and overly uniform errors typically associated with single-series models. + +# A.6 Error-Action Mapping Table + +In this section, we present the Action-Error Mapping Table that we constructed offline. As shown in Tab. 11, for each error type at the first-tier, we provide recommended actions as solutions through LLMs and manual design. This table will serve as a reference for the planning agent in developing the executor-based solution flow. + +# A.7 Action Functions + +In this section, we present the 15 fine-grained functionalities corresponding to the five Action functions. As shown in Tab. 12, for each Action function, we can control the execution of 15 different actions by allowing the large model to autonomously input various function inputs, facilitating an automated, efficient, and flexible error correction process. + +Table 10: The statistics of datasets in our main result. + +
DatasetTask# Train#Dev#Test
NQSingle-hop QA79.1k8.7k3.6k
TriviaQASingle-hop QA78.7k8.8k11.3k
HotpotQAMulti-hop QA90.4k7.4k-
2WikiMulti-hop QA15.0k12.5k-
WoWDialogue Generation63.7k3.0k-
ASQALong-form QA4.3k9.4k-
ELI5Long-form QA272k1.5k-
+ +# B Details of Experimental Settings + +# B.1 Datasets + +In our main experiment, we utilize six datasets covering four distinct task types, including Single-hop QA, Multi-hop QA, Long-form QA, and Dialogue Generation, as shown in Tab. 10. Single-hop QA includes NQ (Kwiatkowski et al., 2019) and TriviaQA (Joshi et al., 2017), where the questions are fact-based and don't require complex reasoning. Multi-hop QA includes HotpotQA (Yang et al., 2018) and 2WikimultihopQA (Ho et al., 2020), with questions that needed multiple information points to answer. Long-form QA contains the ASQA (Stelmakh et al., 2022) dataset, which requires comprehensive answers to given questions, thus possibly necessitating richer background information. The dialogue generation task includes the WoW (Dinan et al., 2018) dataset, whose objective is to continue a given dialogue and generate content that fits the context and dialogue background. Due to the multiple stages of response verification involved in critic-based RAG baselines, we sample 100 samples from the test set of each dataset to evaluate all the baselines and our RAG-Critic. + +# B.2 Implementation Details + +Retrieval Setting. We implement the retriever based on the FlashRAG framework (Jin et al., 2024a). We use E5-base-v2 (Wang et al., 2022) as the embedding model and Wikipedia-2018 as the retrieval document corpus. For the naive RAG, we retrieve the top-5 passages for each question as input. + +Error System Construction Settings. For all datasets, we sample from the corresponding training set portions using the vLLM framework (Kwon et al., 2023) for efficient sampling, with the temperature set to 0.1 and the maximum context length set to 4096 tokens. All error type annotation models are based on Qwen 2.5-72B and utilize the int8 + +version for lightweight deployment. + +In terms of manual summarization, we employ three PhD students in computer science, adhering to local salary standards. The entire annotation process takes only half an hour, demonstrating that the RAG-Critic framework requires minimal human effort, with the error sampling process largely automated. + +RAG-Error Benchmark Settings. For the RAG-Error Bench, we use the test set of the corresponding dataset and follow the aforementioned error system annotation process, subsequently applying the error system's label mapping. The difference is that we employ GPT-4o and additionally hire a PhD student in computer science for dual verification, with the temperature set to 0.1; To ensure the high quality of the bench, inspired by the FollowRAG benchmark (Dong et al., 2024c), any annotation deemed incorrect by either party is discarded. After dual uniform sampling, we ultimately establish the RAG-Error Bench. + +Training for RAG Error-Critic Model. In the SFT phase, we perform full fine-tuning on Qwen2.5-3B-instruct with a learning rate of 7e-6, using a linear scheduler with 20 warm-up steps. All models are trained with DeepSpeed ZeRO Stage 3 (Rasley et al., 2020) and Flash-Attention 2 (Dao, 2023). We use a global batch size of 128, a weight decay of 0.1, and train for 3 epochs, saving checkpoints every 200 steps. Mixed precision training with bf16 is used, and the maximum context length is set to 2048 tokens. For Qwen2-72B and Llama3-70B, the global batch size is 512. Our training setup is aligned with previous RAG work (Dong et al., 2024e; Zhang et al., 2025; Li et al., 2024c; Cheng et al., 2024; Dong et al., 2025;?, 2024b). + +In the DPO phase, the learning rate is set to 5e-7 with a cosine scheduler and a 0.1 warm-up ratio. We use DeepSpeed ZeRO Stage 3 and FlashAttention 2 for efficiency, with a global batch size of 64. Training utilizes a sigmoid loss function with a beta value of 0.3 and spans 2 epochs. Mixed precision training with bf16 is employed, and the maximum context length is 4096 tokens. + +Notably, we run all our experiments on 8 NVIDIA A800s. We report averaged performance from five randomly seeded experiments. + +Clustering Settings. In order to organize and cluster the types of errors obtained, we first use the BGE-M3 model (Xiao et al., 2023) to obtain the + +Table 11: The illustration of our Error-Action mapping table. + +
Error TypeActions
Incomplete Information- Re-retrieval: Rewrite the query for supplementary retrieval. +- Rewriting the input: Refine the retrieved knowledge.
Irrelevant Information- Re-retrieval: Perform replacement retrieval using the same query. +- Rewriting the input: Correct the retrieved knowledge.
Erroneous Information- Rewriting the input: Correct the retrieved knowledge. +- Rewriting the reasoning answer: Correct the reasoning part.
Incomplete Response- Re-retrieval: Perform supplementary retrieval using the same query. +- Rewriting the input: Provide examples for the retrieved knowledge.
Inaccurate Response- Rewriting the reasoning answer: Refine the reasoning part. +- Rewriting the input: Explain the retrieved knowledge.
Off-Topic Response- Re-retrieval: Rewrite the query for replacement retrieval. +- Rewriting the query: Break down the query into sub-questions.
Overly Verbose Response- Rewriting the input: Refine the retrieved knowledge. +- Rewriting the reasoning answer: Do not rely on the original reasoning part.
+ +Table 12: The illustration of 15 functionalities corresponding to our 5 Action functions. + +
Error TypeActions
Retrieval(·)1. Perform supplementary retrieval using the same query. +2. Perform replacement retrieval using the same query. +3. Rewrite the query for supplementary retrieval. +4. Rewrite the query for replacement retrieval.
Rewrite(·)1. Expand the query. +2. Refine the query. +4. Summarize the query. +5. Clarify or explain the query.
Decompose(·)- Break down the query into sub-questions.
Refine(·)1. Explain the retrieved knowledge. +2. Refine the retrieved knowledge. +3. Correct the retrieved knowledge. +4. Delete the specific retrieved knowledge. +5. Provide examples for the retrieved knowledge. +6. Summarize the retrieved knowledge.
Generate(·)- Generate the final answer.
+ +embedding vectors for the error causes of each case. We standardize all the embedding data and perform hierarchical clustering. Hierarchical clustering is performed using the sklearn library (Buitinck et al., 2013) with the Ward linkage method and Euclidean distance metric. We cluster all the data into 20 clusters. + +Human Annotators. There are two instances involving minimal human annotation: the construction of the error system and the RAG-Error bench. + +In the first part, we employ three well-educated PhD students in computer science, adhering to lo- + +cal salary standards. The entire annotation process takes only half an hour, demonstrating that the RAG-Critic framework requires minimal human effort, with the error sampling process largely automated. + +In the second part, we only need one PhD student to conduct a round of annotation screening, performing binary classification on the annotation results from Qwen2.5-72B. The entire process takes less than an hour, and we ensure that the values match the labels assigned by GPT-4o. + +Our human annotation does not involve any po + +tential risks. First, the datasets are sourced from open-source collections, as shown in Tab. 10. Secondly, the annotation for the error system construction only involves high-level label creation, as illustrated in Fig. 2. Finally, our RAG error bench requires human input solely for binary judgments, without any risk of content modification. + +# B.3Baselines + +This section details the baselines referenced in Section 4.1. We categorize these into proprietary models and critical RAG systems. + +# Proprietary Models: + +- OpenAI o1 Series (Jaech et al., 2024) The o1 model series uses large-scale reinforcement learning to enhance safety and robustness through chain-of-thought reasoning. These models effectively reason about safety policies in context when responding to potentially unsafe prompts, achieving excellent performance in benchmarks for generating illicit advice, selecting stereotyped responses, and resisting known jailbreaks. +- GPT-4o (OpenAI, 2023). GPT-4o is a multimodal model by OpenAI that excels not only in text generation but also in handling image and audio inputs. It offers near-human conversational experiences with extremely low latency responses. +- Claude 3.5 (Anthropic, 2024) is an advanced AI language model by Anthropic, known for its contextual understanding and coherent responses. It prioritizes safety and ethical use, making it suitable for various applications like content creation and summarization, all while ensuring user-friendly interactions. +- Qwen2.5 Series (Yang et al., 2024). Developed by Alibaba Cloud, the Qwen2.5 series includes a range of open-source large language models from 0.5B to 72B parameters, optimized for knowledge acquisition, programming capabilities, and mathematical task performance. +- Llama3.x Series (Meta, 2024). The Llama3 series from Meta AI employs Grouped Query Attention (GQA) and an expanded vocabulary size of 128K tokens, significantly enhancing inference speed and downstream performance. + +- Mistral Series (Jiang et al., 2023a). Mistral7B, despite having fewer parameters, outperforms larger models like Llama2-13B in various benchmarks, utilizing Sliding Window Attention (SWA) to maintain high performance with reduced hardware requirements. +- Deepseek-R1-Distill (Guo et al., 2025). DeepSeek-R1-Distill leverages reinforcement learning and distillation techniques to enhance the reasoning capabilities of smaller models, enabling efficient operation even under resource constraints. + +In our experiments, all the open-source LLMs are used in their instruction or chat versions, to ensure sufficient instruction-following capability. + +# Critical RAG Baselines: + +- Self-RAG (Asai et al., 2024). Self-RAG introduces reflection tokens that allow LLMs to control retrieval behavior as needed, improving factual accuracy and citation reliability in generated content. +- FLARE (Jiang et al., 2023b). FLARE employs a forward-looking active retrieval strategy, dynamically retrieving information multiple times during the generation process to effectively reduce hallucinations in the output. +MetaRAG (Zhou et al., 2024). MetaRAG integrates metacognitive concepts, enabling the model to monitor and adjust its cognitive processes, thereby enhancing reasoning accuracy in complex tasks. +- Self-Refine (Madaan et al., 2023) involves an iterative process where the model reviews its own output to gather feedback and proposes improvements based on that feedback. This cycle continues until the evaluation shows that no errors remain. + +# B.4 Case Study + +To gain a deeper understanding of how RAG-Critic employs a "Generate-Critic-Planning-Execution" workflow to facilitate automated problem solving, we conduct case studies in Tab. 13 and Tab. 14 that illustrate each sub-output of the entire inference process. + +Table 13: Case Study of our RAG-Critic workflow (1). + +
Question: Who has trained the most Melbourne Cup winners?
Retrieved Docs: +- [1] Etienne L. de Mestre... +- [2] Melbourne Cup... +- [3] David Joseph Hall... +- [4] In 2004, Makybe Diva became the first mare to win two cups... +- [5] Colin Sidney Hayes...
Judgement Result: The answer is incorrect. +The passages provided do not explicitly state the number of Melbourne Cup wins for each trainer, which led to the model's misinterpretation. Etienne L. de Mestre is mentioned as having won the first two Melbourne Cups, but this does not necessarily mean he trained the most winners overall. The model should have recognized the need for additional information to accurately answer the question.
Critic Tags: +Tag1: ["Irrelevant or Off-Topic Response", "Incomplete Information", "Irrelevant Information"] +Tag2: ["Insufficient or Incomplete Information Retrieval", "Irrelevant Content and Topic Drift", "Irrelevant Information Retrieval"] +Tag3: ["Overreliance on Partial Information", "Insufficient Information Handling", "Lack of Contextual Understanding", "Factual Inaccuracy"]
Agent Output: +clarified_query = RewriteQuery(query=question, instruction="clarify") +retrieved Documents = Retrieval(query=clarified_query[0], topk=5) +summarized Documents = [ +RefineDoc(query=question, doc=doc, instruction="summarize") for doc in retrieved Documents +] +final_answer = GenerateAnswer( +query=question, +docs=summarized Documents, +additionalInstruction="Ensure the answer is accurate and provides the name of the trainer with the most Melbourne Cup wins." +)
New Answer: To answer the question of who has trained the most Melbourne Cup winners, let's break down the information provided in the passage. +Step 1: Identify the trainers mentioned in the passage who have won the Melbourne Cup. +- Etienne L. de Mestre (5 wins) +- Bart Cummings (12 wins) +Step 2: Determine the number of Melbourne Cup wins for each trainer. +- Etienne L. de Mestre: 5 wins +- Bart Cummings: 12 wins +Step 3: Compare the number of wins to determine who has trained the most Melbourne Cup winners. +- Bart Cummings has 12 wins, which is more than Etienne L. de Mestre's 5 wins. +Therefore, the answer is: Bart Cummings.
Final Answer: Bart Cummings
+ +# B.5 Prompt Template + +Annotation Instruction In the hierarchical error system setup phase, we sample from the model pool in Step-1, with the relevant prompt template provided in Prompt A. Additionally, in Steps 1 and 2, we use Qwen2.5-72B-Instruct for annotating open-set labels, and the prompts used are detailed in Prompt B and Prompt C. + +Evaluation Instruction For the evaluation of the RAG task, our method uses the same generation prompts as all baselines to ensure fairness. The specific prompts can be found in Prompt A. For short-form datasets, we instruct the model to output responses with a fixed prefix (e.g., "So the final + +answer is"), and we extract the corresponding short answers using regular expressions for evaluation. For long-form datasets, due to the more extensive nature of the responses, the outputs generated by the model are used directly for final evaluation without additional processing. + +Training and Deployment Instruction For the RAG error-critic mode, we use Prompt D for training. Subsequently, we utilize the generated outputs along with the original RAG inputs, following Prompt F for executor-based planning. For the RAG reward benchmark, our method uses the same generation prompts as all baselines, as detailed in Prompt E. + +Table 14: Case Study of our RAG-Critic workflow (2). + +
Question: Who is the spouse of the director of film Eden And After?
Retrieved Docs: +- [1] After the Wedding (2017 film)... +- [2] Paul Almond... +- [3] Afterwards is a 2008 English-language psychological thriller film... +- [4] Eden (2014 French film)... +- [5] Waiting for Eden...
Original Answer: There is no information available about the film "Eden And After" or its director's spouse.
Judgement Result: The answer is incorrect. +The model's error likely stems from the fact that it did not have the correct information in the provided passages and may have relied on external information that was not accurate or up-to-date.
Critic Tags: +Tag1: ["Erroneous Information", "Incomplete or Missing Response", "Irrelevant Information"] Tag2: ["Specificity and Precision Errors", "Erroneous Information Retrieval", "Irrelevant Information Retrieval"] Tag3: ["External Knowledge Misuse", "Factly Incorrect", "Data Mismatch"]
Agent Output: +clarified_query = RewriteQuery(query=question, instruction="clarify") +retrieved_documents = Retrieval(query=clarified_query[0], topk=5) +summarizeddocuments = [ +RefineDoc(query=question, doc=doc, instruction="summarize") for doc in retrieved Documents +] +final_answer = GenerateAnswer( +query=question, +docs=summarized/documents, +additionalInstruction="Provide more specific and relevant information about the director of the film 'Eden And After' and their spouse." +)
Final Answer: Bart Cummings
+ +# C Limitations + +Despite our best efforts to optimize the RAG-Critic process, there are still several limitations and areas for improvement. + +Firstly, Since RAG-Critic is a critic-based correction method, its computational cost is higher compared to the standard RAG system, which is a shared problem. We discuss this in Appx. §A.1. On the engineering side, we have already used the vLLM framework and a lightweight 3B critic model to accelerate inference, and we will consider more optimization methods in the future. + +Secondly, expanding the experimental coverage to include a broader range of RAG scenarios is another area for optimization. RAG-Critic samples nine datasets related to RAG and used Wikipedia as the retrieval corpus. In the future, we aim to explore the application of our research in industrial-level queries and databases to enhance the generalization capability of our approach. + +# Prompt A: Responses Sampling (Stage-1) + +Find the useful content from the provided documents, then answer the question. Answer the question directly. Your response should be very concise. Please provide the final answer is: ' as a prefix for the final answer. The following are the given documents. + +Passage: {Top-K Retrieved Passages} + +Answer the question directly. Your response should be very concise. Please use 'So the final answer is:' as a prefix for the final answer. **Question**: {Question} **Response**: + +# Prompt B: Generating Detailed Error Rationale (Stage-1) + +You are an expert in error analysis for retrieval-augmented generation tasks. We will provide you with a prompt that includes both the question and relevant knowledge, along with a model's prediction and the golden answer. The details are as follows: + +Prompt: {RAG inputs} + +Model's Prediction: {RAG model's prediction} + +Golden Answer: {Golden answer} + +If the model's prediction is incorrect, please respond with a single JSON including the judgement in key 'Judgement' and a detailed error analysis in key 'Error analysis'. Here is an example of output JSON format: + +```json +{'Judgement': "incorrect", 'Error analysis': "The model's prediction is incorrect because ..."} +``` + +If the model's prediction is correct, please respond with a single JSON as follows: + +```json +{'Judgement': "Correct", 'Error analysis': "None"} +``` + +# Prompt C: Open-set Annotation (Stage-2) + +You are a tagging system designed to provide useful error type tags for retrieval-augmented generation (RAG) tasks. Your goal is to assist in detailed error analysis to improve the performance of AI assistants. Below is a detailed error analysis: + +# {Detailed error analysis} + +Please provide fine-grained error tags to identify the main error types in the analysis. Your response should be a list that includes the titles of the error tags along with a brief explanation for each tag. Please adhere strictly to the following JSON format: + +```jsonl +{"tag": "", "explanation": ""} +``` + +Please respond in English. + +# Prompt D: Fine-tuning Template of RAG-Critic + +You are a critical system designed to provide useful error type tags for retrieval-augmented generation (RAG) tasks. Your goal is to assist in detailed error analysis to improve the performance of AI assistants. Below are the [Question], the top-5 retrieved relevant [Passages], and the [Model's Prediction] for the RAG tasks. + +Question: {Question} + +Passage: {Top-K Retrieved Passages} + +Model's Prediction: {RAG model's prediction} + +Please first determine whether the model's prediction is correct. If it is correct, output it as follows: + +```json +{"Judgement": "Correct"} +``` + +If it is incorrect, please identify the error tags at three levels, from coarse to fine, and provide a detailed error analysis. Adhere strictly to the following JSON format: + +```jsonl +{"Judgement": "Error", "Error analysis": "", "tag1": [], "tag2": [], "tag3": []} +``` + +# Prompt E: Evaluation Template of RAG-Error Bench + +You are a critical system designed to provide useful error type tags for retrieval-augmented generation (RAG) tasks. Your goal is to assist in detailed error analysis to improve the performance of AI assistants. Below are the [Question], the top-5 retrieved relevant [Passages], and the [Model's Prediction] for the RAG tasks. + +Question: {Question} + +Passage: {Top-K Retrieved Passages} + +Model's Prediction: {RAG model's prediction} + +Please first determine whether the model's prediction is correct. If it is correct, output it as follows: + +```json +{"Judgement": "Correct"} +``` + +If it is incorrect, give these error types, tag1 corresponds to tag2 one-to-one: + +tag1 = [list of error types in Tag1] + +tag2 = [list of error types in Tag2] + +Please identify the error tags at three levels, from coarse to fine, and provide a detailed error analysis. Adhere strictly to the following JSON format: + +```jsonl +{"Judgement": "Error", "Error analysis": "", "tag1": [], "tag2": [], "tag3": []} +``` + +# Prompt F: Executor-based Planning + +You are an agent tasked with optimizing a Retrieval-Augmented Generation process. The goal is to improve the model's predictions by addressing issues flagged in the error type. You are given the results from an initial RAG process, including a query, a list of retrieved documents, a prediction, and the identified error type. Your task is to optimize the current RAG process by selecting the + +appropriate functions and generating the corresponding Python code to fix the problem. Available Functions + +```txt +Retrieval(query: str, topk: int) -> List[str]** +``` + +**Purpose**: Retrieves the top-k most relevant documents for a given query from the corpus. +**Parameters**: +- 'query' ('str'): The input query string to retrieve relevant documents. +- 'topk' ('int'): The number of top documents to return. +**Returns**: +- A list of 'topk' relevant document strings, sorted by relevance. + +```markdown +RewriteQuery(query: str, instruction: str) -> List[str]``` +``` + +**Purpose**: Rewrites the query based on the provided instruction to better match relevant documents. + +**Parameters**: + +- 'query' ('str'): The original query string to be rewritten. +- 'instruction' ('str'): The instruction for rewriting the query. Possible instructions include: +- "clarify": Make the query more specific. +- "expand": Add more context or related terms to the query. +**Returns**: +- A list of rewritten query strings, each representing a possible version of the query. + +```typescript +DecomposeQuery(query: str) -> List[str] +``` + +**Purpose**: Breaks down the input query into smaller, more specific sub-queries. +**Parameters**: +- 'query' ('str'): The original query string to decompose. +**Returns**: +- A list of sub-query strings, which represent different aspects or more specific details of the original query. + +```txt +RefineDoc(query: str, doc: str, instruction: str) -> str +``` + +**Purpose**: Refine a document in the doc list (index starts from 0) based on the query. Use this function when you find some document in the doc list is not relevant to the question. + +**Parameters**: + +- 'query' ('str'): The input query string. +- 'doc' ('str'): The document to refine. +- 'instruction' ('str'): The instruction for refining the document. Supported instructions include: +- "explain": Provide a detailed explanation of the document. +- "summurate": Summarize the document. +**Returns**: +- The refined document as a string, which could be either an explanation or a summary. + +```txt +GenerateAnswer(query: str, docs: List[str], additionalInstruction: str = None) -> str +``` + +**Purpose**: Generates an answer based on the query and relevant documents, incorporating additional instructions for answer improvement. + +**Parameters**: + +- 'query' ('str'): The input query string. +- 'docs' ('List[str]'): A list of relevant documents used to generate the answer. +- 'additional instruction' ('str'): Additional instruction describing issues in the previous answer and desired improvements (e.g., requirements for precision, conciseness, or additional information). + +**Returns**: +- A generated answer string, potentially incorporating information from the documents, adjusted according to the provided instruction. + +You can directly use the variables I provide to act as the input of the functions. You can freely combine the functions to improve the performance. \ No newline at end of file diff --git a/ragcriticleveragingautomatedcriticguidedagenticworkflowforretrievalaugmentedgeneration/images.zip b/ragcriticleveragingautomatedcriticguidedagenticworkflowforretrievalaugmentedgeneration/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..dc0e2c822d5e981e6a4563e15a1badd059da6c4b --- /dev/null +++ b/ragcriticleveragingautomatedcriticguidedagenticworkflowforretrievalaugmentedgeneration/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9ec1bdc06cee9bea6f032c8b7d5538798fd0b1ecd56dc8352dfb9d9992cbdb34 +size 1454903 diff --git a/ragcriticleveragingautomatedcriticguidedagenticworkflowforretrievalaugmentedgeneration/layout.json b/ragcriticleveragingautomatedcriticguidedagenticworkflowforretrievalaugmentedgeneration/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..bc206cd1a0da290284d23369b606d7ce419a608a --- /dev/null +++ b/ragcriticleveragingautomatedcriticguidedagenticworkflowforretrievalaugmentedgeneration/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ace6dfde8e7d3ff7c277a83f24ad42816b46004f807ea7961c7d44b9476a5c9e +size 801941 diff --git a/ragevalscenariospecificragevaluationdatasetgenerationframework/2befc6df-c50d-4008-957b-58aa4a8d715f_content_list.json b/ragevalscenariospecificragevaluationdatasetgenerationframework/2befc6df-c50d-4008-957b-58aa4a8d715f_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..a251b6bb7ef9566a465deb6a90dcd19ac2822f7d --- /dev/null +++ b/ragevalscenariospecificragevaluationdatasetgenerationframework/2befc6df-c50d-4008-957b-58aa4a8d715f_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:481c36c47565ce55eca0afa5acfd5670f0c13d42a3f0c32913c9aaf64606f252 +size 155816 diff --git a/ragevalscenariospecificragevaluationdatasetgenerationframework/2befc6df-c50d-4008-957b-58aa4a8d715f_model.json b/ragevalscenariospecificragevaluationdatasetgenerationframework/2befc6df-c50d-4008-957b-58aa4a8d715f_model.json new file mode 100644 index 0000000000000000000000000000000000000000..d5f31b528bacba3db3683f8b0964819f757cf129 --- /dev/null +++ b/ragevalscenariospecificragevaluationdatasetgenerationframework/2befc6df-c50d-4008-957b-58aa4a8d715f_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:92d444a24c1598ac4081e59847ab1ce898cc20817c4b625b641fac9571a67dcc +size 185509 diff --git a/ragevalscenariospecificragevaluationdatasetgenerationframework/2befc6df-c50d-4008-957b-58aa4a8d715f_origin.pdf b/ragevalscenariospecificragevaluationdatasetgenerationframework/2befc6df-c50d-4008-957b-58aa4a8d715f_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ede732cb1d8fa496ad95c7de46d589c94383b565 --- /dev/null +++ b/ragevalscenariospecificragevaluationdatasetgenerationframework/2befc6df-c50d-4008-957b-58aa4a8d715f_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:56a989d105b2f640e30b69a504a64e6837f8ca6664172e7c52bbce96f04f7680 +size 602602 diff --git a/ragevalscenariospecificragevaluationdatasetgenerationframework/full.md b/ragevalscenariospecificragevaluationdatasetgenerationframework/full.md new file mode 100644 index 0000000000000000000000000000000000000000..0ea7e71bd52abccbb55854445f2205644da371a7 --- /dev/null +++ b/ragevalscenariospecificragevaluationdatasetgenerationframework/full.md @@ -0,0 +1,668 @@ +# RAGEval: Scenario Specific RAG Evaluation Dataset Generation Framework + +Kunlun Zhu $^{17*}$ , Yifan Luo $^{2*}$ , Dingling Xu $^{3*}$ , Yukun Yan $^{1\dagger}$ , Zhenghao Liu $^{4}$ , Shi Yu $^{1}$ , Ruobing Wang $^{5}$ , Shuo Wang $^{1}$ , Yishan Li $^{6}$ , Nan Zhang $^{6}$ , Xu Han $^{1}$ , Zhiyuan Liu $^{1\dagger}$ , Maosong Sun $^{1}$ + +$^{1}$ Department of Computer Science and Technology, Institute for AI, Tsinghua University, $^{2}$ Institute for Interdisciplinary Information Sciences, Tsinghua University, + +3Beijing Normal University, 4Northeastern University, University of Chinese Academy of Sciences, 6ModelBest, 7University of Illinois Urbana-Champaign + +# Abstract + +Retrieval-Augmented Generation (RAG) is a powerful approach that enables large language models (LLMs) to incorporate external knowledge. However, evaluating the effectiveness of RAG systems in specialized scenarios remains challenging due to the high costs of data construction and the lack of suitable evaluation metrics. This paper introduces RAGEval, a framework designed to assess RAG systems across diverse scenarios by generating high-quality documents, questions, answers, and references through a schema-based pipeline. With a focus on factual accuracy, we propose three novel metrics—Completeness, Hallucination, and Irrelevance—to evaluate LLM-generated responses rigorously. Experimental results show that RAGEval outperforms zero-shot and one-shot methods in terms of clarity, safety, conformity, and richness of generated samples. Furthermore, the use of LLMs for scoring the proposed metrics demonstrates a high level of consistency with human evaluations. RAGEval establishes a new paradigm for evaluating RAG systems in real-world applications. The code and dataset are released at https://github.com/OpenBMB/RAGEval. + +# 1 Introduction + +Retrieval-Augmented Generation (RAG) systems are increasingly gaining attention (Gao et al., 2023; Asai et al., 2024) due to their ability to integrate external knowledge into large language models (LLMs). This ability is crucial in fields such as medicine, finance, and law, where factual accuracy is crucial in decision-making. However, RAG systems are still prone to hallucination, mainly due to noise introduced during retrieval and LLMs' limited capacity to exploit retrieved information fully. + +![](images/dde5b2560dd22ac3e4fdf3f55c15d95fbd0a3d5e3e1d869297683f8d67f35f48.jpg) +Figure 1: The challenges of building scenario-specific RAG evaluation datasets: scenario coverage and annotation costs. + +Although various benchmarks for measuring the capabilities of existing RAG systems have been proposed (Joshi et al., 2017; Nguyen et al., 2017; Kwiatkowski et al., 2019; Chen et al., 2024b; Lyu et al., 2024), they often lack sufficient coverage of diverse, domain-specific scenarios and fail to incorporate comprehensive metrics for assessing factual accuracy, which limits their applicability in real-world contexts that require precise and reliable information (Bruckhaus, 2024). Furthermore, the challenges of building scenario-specific evaluation datasets—such as dynamic real-world conditions, privacy concerns, and the need for expert annotation—further exacerbate the issue. + +To address these challenges, we propose RAGEval, a novel framework designed to automatically generate scenario-specific RAG evaluation datasets. By summarizing essential knowledge from seed documents, RAGEval creates a schema that forms the basis for generating questions, answers, and references for evaluation. Additionally, factual key points are extracted from each answer, enabling a more accurate assessment of the RAG system predictions. + +In RAG system assessments, evaluation met + +rics, like data, also play a pivotal role. Traditional metrics such as F1, ROUGE-L (Lin, 2004), and BLEU (Papineni et al., 2002) are often inadequate for complex or long-form responses. They mainly focus on the lexical overlap of the responses with the gold reference and overlook the semantic similarity. Some novel approaches, such as those relying on LLMs to evaluate responses directly (Es et al., 2024; Saad-Falcon et al., 2023), suffer from issues of stability and comparability. To address these limitations, we introduce three novel metrics—Completeness, Hallucination, and Irrelevance—that are grounded in factual key points and provide a more stable and comparable scoring method. + +Our main contributions are: (1) We propose RAGEval, a novel framework for automatically generating scenario-specific RAG evaluation datasets. (2) We introduce three novel evaluation metrics to assess the factual accuracy of generated answers more effectively than existing metrics like ROUGE-L and BLEU. (3) We develop a new RAG benchmark, DragonBall, and conduct comprehensive experiments to analyze the impact of RAG systems' retrieval and generation components on the performance results. + +# 2 Related Work + +The evaluation of question-answering (QA) and RAG systems has seen significant advancements in recent years. Traditional open-domain QA benchmarks, such as HotpotQA (Yang et al., 2018), TriviaQA (Joshi et al., 2017), MS Marco (Nguyen et al., 2017), and Natural Questions (Kwiatkowski et al., 2019), have long served as foundational datasets for general QA tasks. However, these benchmarks face limitations in evaluating modern RAG systems, particularly their ability to assess domain-specific knowledge, nuanced outputs, and retrieval accuracy. For instance, potential data leakage in these datasets and a lack of fine-grained metrics hinder their effectiveness in evaluating the nuanced behaviour of RAG systems. + +In response, several RAG-specific benchmarks have emerged. RGB (Chen et al., 2024b) focuses on assessing LLMs' ability to integrate retrieved information, emphasizing noise robustness. CRUDRAG (Lyu et al., 2024) categorizes RAG tasks into Create, Read, Update, and Delete operations to evaluate different aspects of information retrieval. CRAG (Yang et al., 2024) extends domain cov + +erage by introducing mock APIs to simulate real-world retrieval tasks, while MultiHop-RAG (Tang and Yang, 2024) challenges systems with multi-hop reasoning across multiple documents. These benchmarks, while valuable, remain constrained by predefined domains and fixed task structures, limiting their adaptability to dynamic, real-world applications. + +Traditional evaluation metrics, such as F1, ROUGE-L, and BLEU, have been widely used in various benchmarks to assess the quality of generated answers in RAG systems. However, these metrics focusing on lexical often fail to capture the full complexity of generative tasks, especially in the case of long-form responses where factual accuracy and contextual relevance are critical. Moreover, metrics like Hit Rate, MRR, and NDCG are commonly used for retrieval evaluation but cannot assess generative capabilities (Liu, 2023; Nguyen, 2023). + +In recent years, newer approaches have integrated LLMs into the evaluation process, trying to solve the problems of traditional metrics. RAGAS (Es et al., 2024) and ARES (Saad-Falcon et al., 2023) use LLM-generated data to evaluate contextual relevance and informativeness without relying on ground truth references. While these methods provide valuable insights, they fail to address the complexities of scenario-specific evaluations. RGB (Chen et al., 2024b) introduces task-oriented metrics that assess noise robustness and information integration, but it does not offer the flexibility required for dynamic, application-specific tasks. RAGTruth (Niu et al., 2024) proposes a corpus for evaluating hallucinations, a critical issue in RAG systems. + +While the aforementioned benchmarks and evaluation methods have made significant strides, they still face challenges in addressing the diversity of real-world application scenarios, which often require domain-specific data generation and context-sensitive evaluation. To solve the problem of scenario diversity in RAG evaluation, our method builds upon these advancements by introducing a novel framework for automatically generating evaluation datasets. Unlike existing frameworks that rely on predefined datasets and fixed benchmarks, our method offers higher contextual agility, enabling the design of scenario-specific factual queries tailored to different applications. + +Furthermore, we introduce three novel keypoint-based evaluation metrics—Completeness, Halluci- + +nation, and Irrelevance—designed to assess factual accuracy and relevance in these dynamically generated, scenario-specific contexts. These metrics stand in contrast to traditional benchmarks that assess RAG systems using a single, static set of evaluation criteria. Our framework enables the automatic generation of diverse datasets and provides more adaptable evaluation metrics, making it better suited for evolving application domains. + +# 3 Method + +In this section, we introduce the proposed RAGEval method. To provide an overview, we summarize the overall generation process as follows: + +$$ +\mathcal {S} \rightarrow \mathcal {C} \rightarrow \mathcal {D} \rightarrow (\mathcal {Q}, \mathcal {A}) \rightarrow \mathcal {R} \rightarrow \text {K e y p o i n t s} +$$ + +This sequence outlines how the schema summary $(\mathcal{S})$ leads to configuration generation $(\mathcal{C})$ , followed by document generation $(\mathcal{D})$ . From there, question-answer pairs $(\mathcal{Q},\mathcal{A})$ are derived, and supporting references $(\mathcal{R})$ are identified. Finally, keypoints are extracted, serving as concise representations of the critical information in the answers. + +# 3.1 Schema Summary + +In scenario-specific text generation, a schema $(S)$ is an abstract representation of key elements, encapsulating the aspects of essential factual knowledge from input documents. This schema serves as the backbone that ensures content diversity and reliability while standardizing outputs across various scenarios to maintain alignment with professional standards. + +The schema defines a structural framework of key elements for domain-specific documents without containing actual data. In medicine, it may outline categories for symptoms and treatments; in finance, it could establish classifications for sectors, organizations, and metrics. Specific data is later populated into this predefined framework during configuration generation. For example, in legal contexts, the schema might encompass fundamental legal concepts—such as case law, statutes, and court rulings—ensuring broad applicability without relying on specific legal instances. This approach allows the schema to remain versatile and scalable across various legal scenarios. A concrete example of a legal domain schema illustrating these principles is provided in figure 12 in Appendix E. + +The schema is initially generated using GPTs1 based on a curated set of seed documents, which + +establish the foundational domain-specific knowledge. Following this, the schema undergoes a series of iterative refinements guided by human intuition and contextual understanding. This process ensures that the schema maintains a balance between comprehensiveness, accuracy, and generalizability, effectively supporting content generation across diverse sub-scenarios. The refinement process $^2$ is designed to prevent over-specialization, thereby enhancing the schema's scalability and adaptability. + +# 3.2 Configuration and Document Generation + +Generating scenario-specific documents with rich factual information and internal consistency is crucial for creating high-quality datasets, ensuring the generated content can be evaluated accurately and applied effectively in downstream tasks. To achieve this, we first generate configurations $\mathcal{C}$ , derived from the previously established schema $S$ . These configurations act as references and constraints for text generation, ensuring consistency across the document. + +We adopt a hybrid approach to generate configurations $\mathcal{C}$ , combining rule-based methods with LLMs to assign values to schema elements. Rule-based methods (e.g., selecting values randomly from predefined scenario-specific options) ensure high accuracy and factual consistency for structured data. Meanwhile, LLMs generate more complex or diverse content, balancing consistency and creativity. For instance, in financial reports, configurations may include various sectors such as agriculture, aviation, and construction, each covering multiple aspects of its respective domain. An illustrative configuration for the legal scenario is provided in figure 12 in Appendix E, demonstrating how different elements can be combined within this domain. + +We then use GPT-4o to convert the factual information from the configuration $\mathcal{C}$ into a structured narrative format tailored to a specific scenario. For example, in medical records, the generated document may include categories such as patient information, medical history, and treatment plan to ensure accuracy and relevance. Similarly, we include a company summary in financial reports to maintain continuity and distinct sections such as Financial Report, Corporate Governance, and Environmental and Social Responsibility. + +![](images/74309c57ec956b68b1755852942c0be078b49cb58194c7de5752d87fc28d85e3.jpg) + +![](images/1ac2aa84b4ac5cb4ee0556f951396357dffd78d9f6cb5894bd8d9db4163d112f.jpg) + +![](images/c5e8c693fec5a9af8477fb9a8c733d625c22e3ef7dec13c322a43bc22b9fa1fe.jpg) + +![](images/cb4e1f2ee7cad0689d104734a436da649cca4172552fbf8212d0c1b97cae905c.jpg) +Figure 2: RAGEval Progress: $①$ summarizing a schema containing specific knowledge from seed documents. $②$ filling in factual information based on this schema to generate diverse configurations. $③$ generating documents according to the configurations. $④$ creating evaluation data composed of questions, answers, and references derived from the configurations and documents. + +# 3.3 QRA Generation + +In this subsection, we describe the process of generating Question-Reference-Answer (QRA) triples using the documents $\mathcal{D}$ and configurations $\mathcal{C}$ to establish a robust evaluation framework for information retrieval and reasoning. The goal is to ensure that generated content can be evaluated comprehensively across multiple aspects of information understanding. + +We utilize configurations $\mathcal{C}$ to guide the generation of questions and initial answers, ensuring the generated content is aligned with the schema elements. These configurations are embedded within prompts to ensure that the generated questions are specific and that the answers are precise and grounded in the schema elements. We address different types of questions, such as factual, multi-hop reasoning, summarization, and multi-document questions, each designed to evaluate specific facets of language understanding. To ensure the diversity and controllability of the questions generated by the model, we have designed 7 question types, as detailed in Table 16 in Appendix E. The GPT-4o model is provided with detailed instructions and examples for each question type, generating targeted questions $\mathcal{Q}$ and initial answers $\mathcal{A}$ . + +Specific prompts and examples are detailed in the Appendix E. Using the generated questions $\mathcal{Q}$ and initial answers $\mathcal{A}$ , we extract relevant information fragments (references) $\mathcal{R}$ from the documents $\mathcal{D}$ . This is accomplished using an extraction + +prompt, ensuring that the generated answers are grounded in the source material for reliability and traceability. Extracting these references enhances the comprehensiveness and consistency of the generated content. + +To ensure alignment between answers $\mathcal{A}$ and references $\mathcal{R}$ , we iteratively refine the answers to improve coherence and accuracy. If references contain content missing from the answers, we supplement them accordingly. Conversely, if the answers contain unsupported content, we either locate the relevant references or remove the unsupported sections. This step reduces hallucinations and ensures that the final answers are accurate and well-supported by $\mathcal{R}$ . + +Keypoints are generated from answers $\mathcal{A}$ for each question $\mathcal{Q}$ to highlight the critical information in the responses. We employ a predefined prompt with in-context learning, including examples across different scenarios and question types. Typically, each response is distilled into 3-5 keypoints, encompassing essential factual details, relevant inferences, and conclusions. This keypoint extraction supports a precise and reliable evaluation of generated content. + +# 3.4 DragonBall Dataset + +We construct the DragonBall dataset, which stands for Diverse RAG Omni-Benchmark for All scenarios, by leveraging the generation method described above. This dataset encompasses a range + +of texts and RAG questions across three critical domains—finance, law, and medical—chosen for their real-world importance. In addition, the dataset features both Chinese and English texts, serving as a comprehensive resource for multilingual, scenario-specific research. Overall, the dataset contains 6,711 questions, reflecting its extensive scale and diversity. Additional details on the generated DragonBall dataset, including human evaluations of data quality, are provided in Appendix C and D. + +# 3.5 Evaluation Metrics for RAG Systems + +In this work, we propose a comprehensive evaluation framework for RAG systems, considering both retrieval and generation components. + +We define multiple metrics to evaluate the model's effectiveness and efficiency in the retrieval phase. These metrics are designed explicitly for RAG systems, considering the situations when generating answers with incomplete and noisy information. + +# 3.5.1 Retrieval Metrics + +Recall. We introduce the RAG Retrieval Recall metric to evaluate the effectiveness of the retrieval process in matching ground truth references. The Recall is formally defined as + +$$ +\operatorname {R e c a l l} = \frac {1}{n} \sum_ {i = 1} ^ {n} \mathbb {1} (M (G _ {i}, \mathcal {R})), \tag {1} +$$ + +where $n$ is the total number of ground truth references, $G_{i}$ denotes the $i$ -th ground truth reference, $\mathcal{R} = \{R_1, R_2, \ldots, R_k\}$ represents the set of retrieved references, $M(G_{i}, \mathcal{R})$ is a boolean function that returns true if all sentences in $G_{i}$ are found in at least one reference in $\mathcal{R}$ , and false otherwise, and $\mathbb{1}(\cdot)$ is the indicator function, returning 1 if the condition is true and 0 otherwise. + +This metric assesses the alignment between retrieved and ground truth references at the sentence level. A ground truth reference is considered successfully recalled if all its constituent sentences are present in at least one retrieved reference. + +Effective Information Rate (EIR). This metric quantifies the proportion of relevant information within the retrieved passages, ensuring that the retrieval process is accurate and efficient regarding information content. It is calculated as + +$$ +\operatorname {E I R} = \frac {\sum_ {i = 1} ^ {m} \left| G _ {i} \cap R _ {t} \right|}{\sum_ {j = 1} ^ {k} \left| R _ {j} \right|}, \tag {2} +$$ + +where $G_{i}$ is the $i$ -th ground truth reference, $R_{t}$ is the set of total retrieved passages, $m$ is the number of ground truth references successfully matched, $|G_{i} \cap R_{t}|$ represents the number of words in the intersection of the $i$ -th ground truth reference and the concatenated retrieved passages $R_{t}$ , calculated only if $G_{i}$ is matched in $R_{t}$ , $|R_{j}|$ represents the total number of words in the $j$ -th retrieved passage, and $k$ is the total number of retrieved passages. + +To calculate $|G_i \cap R_t|$ at the sentence level, follow these steps: 1) divide $G_i$ into individual sentences, 2) for each sentence in $G_i$ , check if it matches any sentence in $R_t$ , 3) calculate the number of words in the matched sentences, and 4) sum the number of words from all matched sentences to get $|G_i \cap R_t|$ . These steps ensure the overlap is calculated based on sentence-level matches, providing a more granular and accurate measure of relevant information within the retrieved passages. + +# 3.5.2 Generation Metrics + +For the generation component, we introduce novel metrics tailored for RAG evaluation. These metrics comprehensively evaluate the quality and reliability of generated answers. + +Completeness. Completeness measures how well the generated answer captures the key information from the ground truth. We employ LLM to generate a set of key points $K = \{k_{1}, k_{2}, \ldots, k_{n}\}$ from the ground truth. The Completeness score is then calculated as the proportion of key points semantically covered by the generated answer $A$ : + +$$ +\operatorname {C o m p} (A, K) = \frac {1}{| K |} \sum_ {i = 1} ^ {n} \mathbb {1} [ A \text {c o v e r s} k _ {i} ], \tag {3} +$$ + +where $\mathbb{1}[\cdot ]$ is an indicator function that evaluates to 1 if the generated answer $A$ semantically covers the key point $k_{i}$ , and 0 otherwise. Here, "covers" means that the generated answer contains information consistent with and correctly representing the key point. Specifically, for a key point to be considered covered, the generated answer must include the relevant information and present it accurately without contradictions or factual errors. + +Hallucination. Hallucination identifies instances where the content contradicts key points, highlighting potential inaccuracies. The Hallucination score is calculated as + +$$ +\operatorname {H a l l u} (A, K) = \frac {1}{| K |} \sum_ {i = 1} ^ {n} \mathbb {1} [ A \text {c o n t r a d i c t s} k _ {i} ], \tag {4} +$$ + +where $\mathbb{1}[\cdot ]$ is an indicator function that evaluates to 1 if the generated answer $A$ contradicts the key point $k_{i}$ , and 0 otherwise. + +Irrelevancy. Irrelevancy assesses the proportion of key points from the ground truth that are neither covered nor contradicted by the generated answer. Irrelevancy quantifies the proportion of key points neither covered nor contradicted, indicating areas where the answer fails to engage with relevant information. The Irrelevancy score is calculated as + +$$ +\operatorname {I r r} (A, K) = 1 - \operatorname {C o m p} (A, K) - \operatorname {H a l l u} (A, K). \tag {5} +$$ + +Completeness, Hallucination, and Relevance pinpoint specific RAG models' strengths and weaknesses. They ensure that generated answers are informative, accurate, and relevant, enhancing their quality and trustworthiness. More details about the prompt for evaluation and keypoints generation, and the comparison with human evaluation can refer to the Appendix C. + +# 4 Experiments + +# 4.1 Setup + +In our experiments (Table 1), the BGE-M3 (Chen et al., 2024a) model is used both for Chinese and English, with the following hyperparameters: the TopK retrieved documents are set to 5, the retrieval batch size is 256. The maximum length for the retrieval query is capped at 128 tokens. The default chunk size is set to 512, and meta-information (e.g., company name, patient details) is added to enhance retrieval. + +For generation, the maximum input length for the query generator is set to 4096 tokens, and batches of 5 are processed. The generation parameters include a maximum of 512 new tokens per output. + +We use the model's default generation configurations (e.g., temperature, Top-P). If not available, the default settings from Hugging Face will be applied. For ChatGPT models, temperature is set to 0.2 and TopP to 1.0, generating one response per query. + +We use FlashRAG (Jin et al., 2024) as the RAG inference pipeline with vLLM (Kwon et al., 2023) as the backend. + +# 4.2 Generation Performance Comparison + +In this experiment, we compare the performance of 9 popular open/close-sourced generation models + +with different parameter sizes, including MiniCPM2B-sft and MiniCPM3-4B (Hu et al., 2024), Baichuan-2-7B-chat (Yang et al., 2023), Llama3-8B-Instruct (AI@Meta, 2024), Qwen1.5-7B/14B-chat (Bai et al., 2023), Qwen2-7B-Instruct (Bai et al., 2023), GPT-3.5-Turbo-0125, and GPT-4o-2024-0806 $^{3}$ . We use the same input prompt to compare the outputs of the different generation models. + +The overall experimental results of the different generation models are shown in Table 1. + +GPT-4o and MiniCPM3-4B Show Superior Generation Performance. According to our proposed keypoint-based evaluation shown in Table 1, GPT-4o achieves the highest Completeness scores of $79.13\%$ (CN) and $69.36\%$ (EN) and the lowest Hallucination scores in Chinese at $12.10\%$ . What's more, the best-performing small-to-medium opensource model is MiniCPM3-4B, which highlights significant room for improvement among opensource alternatives. + +Findings on Model Size. Our experimental results in Table 1 further validate the scaling law (Kaplan et al., 2020) within the same model family. For instance, Qwen1.5-14B-chat outperforms Qwen1.5-7B-chat and other open-source models except for MiniCPM3-4B, achieving better scores in both Completeness and Hallucination. + +The Effectiveness of Keypoint-Based Metrics. Our analyses reveal notable discrepancies between traditional evaluation metrics, such as Rouge-L and BLEU—and keypoint-based metrics that assess deep semantic alignment. For instance, in the Chinese setting, Baichuan-2-7B-chat achieves the highest Rouge-L (38.30%) and BLEU (21.55%) scores, yet its Completeness score is relatively low at only 60.25%. Conversely, GPT-4o performs the best on Completeness, scoring 79.13% in Chinese, while it exhibits both the low Rouge-L (21.30%) and BLEU (8.70%) in Chinese. These results suggest that while Rouge-L and BLEU primarily measure surface-level language similarity, keypoint-based metrics capture deeper semantic correspondence, thereby offering a more nuanced reflection of a model's true performance in RAG tasks. + +# 4.3 Hyperparameter Comparison + +In the RAG system, various hyperparameters—such as the chunk size, the number of re + +
ModelCompleteness (↑)Hallucination (↓)Irrelevance (↓)Rouge-L (↑)BLEU (↑)
CNENCNENCNENCNENCNEN
MiniCPM-2B-sft54.5957.8828.8219.4916.5822.6331.1126.9415.196.38
MiniCPM3-4B75.7464.0913.7816.4210.4819.4932.0627.9916.346.82
Baichuan-2-7B-chat60.2557.4023.9719.6015.7722.9938.3030.6821.558.84
Qwen1.5-7B-chat69.5062.7619.2517.6511.2519.6032.4921.6217.114.06
Qwen2-7B-Instruct70.8365.3816.9316.4112.2418.2124.5522.9910.264.69
Llama3-8B-Instruct69.2663.6118.2915.1212.4521.2721.5425.229.155.12
Qwen1.5-14B-chat73.1764.4114.4015.5012.4320.0931.9323.9915.254.84
GPT-3.5-Turbo75.4068.3713.1015.7211.5015.9118.9219.846.453.35
GPT-4o79.1369.3612.1013.798.7716.8521.3023.258.704.80
+ +Table 1: Overall model performance results (\%) of nine language models in generation across Chinese (CN) and English (EN) datasets. The evaluation covers both open-source and proprietary models, with open-source models ranging from 2B to 14B parameters. + +
ModelRetrievalGeneration
Recall (↑)EIR (↑)Completeness (↑)Hallucination (↓)Irrelevance (↓)
CNENCNENCNENCNENCNEN
BM2574.2158.084.117.0571.8963.8017.3416.6110.7719.60
GTE-multilingual-Base52.5541.612.945.7255.1754.3028.3523.0116.4822.69
MiniCPM-Embedding71.6755.294.027.5669.8963.0820.0218.7910.0918.13
BGE-M372.9455.104.036.8470.2464.0818.6217.0311.1418.89
+ +Table 2: The performance results (%) of various retrieval models on Chinese (CN) and English (EN) datasets. Metrics include Recall, EIR, Completeness, Hallucination and Irrelevance. We sample 50 queries for each query type in each domain randomly, 2100 queries in total. List of query types can be found at Figure 16 + +trieved items (Top-K), and the selection of retrieval models—play a pivotal role in determining overall performance. To examine their impact on our dataset, we first explore different retrieval models, including BM25, GTE-multilingual-Base (Zhang et al., 2024), MiniCPM-Embedding $^{4}$ , and BGE-M3 (Chen et al., 2024a). Next, with the chunk size fixed at 512, we investigate how varying the Top-K retrieval value affects the results. Finally, we assess the impact of 3 distinct chunk Top-K selection strategies on completeness under different scenarios. In these experiments, we randomly select 50 samples from all query types, consistent with the data proportions described in Section 4.2. All other parameters remain identical to those in the main experimental setup, and we employ the Llama3-8B-Instruct model for testing. Through these hyperparameter evaluations, we aim to develop a more comprehensive understanding of our DragonBall dataset. + +# 4.3.1 Retrieval Model observation + +Our experiments shown in Table 2 demonstrate a strong correlation between retrieval metrics (Recall, EIR) and downstream generation quality. For instance, BM25 achieves the highest Recall (74.21% CN) and simultaneously attains the best Completeness (71.89% CN), aligning with expectations. High EIR score also indicates normally low Hallucination, for instance BM25 has the lowest Hallucination and the highest EIR. However, retrieval superiority alone does not guarantee optimal generation performance—BGE-M3 exhibits marginally lower Recall (55.10% EN) yet best Completeness (64.08% EN). We hypothesize that while BM25 effectively retrieves keyword-matching chunks, it may miss contextually nuanced passages requiring deeper reasoning, which are also critical for keypoint coverage in generation tasks. + +Notably, the strong performance of BM25 (surpassing dense retrievers like BGE-M3 in generation metrics) can be attributed to two factors: 1) Queries in our benchmark often contain explicit keywords that align with document chunks, and 2) The limited number of relevant references per + +
TopKRetrievalGeneration
Recall (↑)Completeness (↑)Hallucination (↓)Irrelevance (↓)
CNENCNENCNENCNEN
249.1838.1655.0451.2924.5222.2920.4526.42
572.9455.1070.3863.9618.6316.8010.9919.24
878.9464.0572.3269.4117.1013.9610.5816.63
+ +Table 3: TopK Performance Results (%) + +query allows simple methods to dominate when retrieving top-5 passages. This contrasts with GTE-multilingual-Base, which underperforms in both retrieval (52.55% CN Recall) and generation (55.17% CN Completeness), likely due to its suboptimal cross-lingual alignment. + +# 4.3.2 TopK Retrieval Observations. + +As shown in Table 3, increasing TopK from 2 to 8 improves Recall by $60.51\%$ (CN) and $67.8\%$ (EN) relative to Recall at $\mathrm{TopK} = 2$ , confirming that broader retrieval enhances coverage of critical information. Due the no-equivalent of the total tokens retrieved, we don't include EIR metric in Table 3 since it would be useless. + +Notably, generation quality exhibits diminishing returns: expanding TopK from 2 to 5 boosts Completeness by $27.87\%$ (CN) and $24.70\%$ (EN), whereas further increasing to $\mathrm{TopK} = 8$ yields only marginal gains ( $2.76\%$ CN, $8.52\%$ EN). This suggests that while initial retrieval expansion ( $2 \rightarrow 5$ ) addresses core information gaps, subsequent additions ( $5 \rightarrow 8$ ) primarily refine minor details. + +Balancing Retrieval Breadth and Noise. While increasing TopK generally improves generation robustness, excessive expansion risks introducing irrelevant passages that may overwhelm the LLM's processing capacity. Although our current results show reduced hallucination with larger TopK, this trend could reverse in scenarios with lower retrieval precision, where noisy inputs mislead the generator. Thus, selecting an optimal TopK—sufficiently large to capture key information yet within the LLM's context window constraints—is critical. + +# 4.3.3 Different hyper-parameter trend across three Question Types + +As shown in Fig 3, the 3 query types (FQ, MRQ, and NCQ) respond differently to changes in the Chunk-TopK configuration. FQ achieves its highest Completeness at 256-10, MRQ peaks at 512-5, + +![](images/dc4366f8d25b3529adef51e79baae053081e298ce59a1c5c80f54d6cf5dcdf49.jpg) +Figure 3: Results $(\%)$ of Completeness of different query types under different Chunk-TopK settings on finance scenario in English dataset. We test three query types: Factual Question (FQ), Multi-hop Reasoning Question (MRQ), Numerical Comparison Question (NCQ). + +and NCQ performs best at 128-20, demonstrating that each query type requires a distinct configuration for optimal performance. + +These results highlight that no single configuration uniformly benefits all query types. Instead, each query type demands a tailored Chunk-TopK setting. This underscores our core insight: adapting retrieval-augmented generation to the specific characteristics of each query type leads to more robust performance across different scenarios. + +# 5 Conclusion + +This paper introduces RAGEval, a framework for rapidly generating scenario-specific datasets to evaluate RAG systems. Our approach addresses the limitations of existing benchmarks by prioritizing factual accuracy and scenario-specific knowledge, which are critical across industries. Experimental results show that our metrics offer a more comprehensive and accurate RAG assessment in specific scenarios compared to conventional ones. GPT-4o outperforms overall, but the performance gap with top open-source models is small, showing potential + +for improvement. Our experiments also demonstrate that scenario-specific settings are crucial for RAG assessment. Future work could explore extending the framework to diverse scenarios and further close the performance gap in RAG systems. + +# Limitations + +We highlight two primary limitations of our framework. First, the text generation component heavily relies on large language models, which may produce hallucinations despite our careful prompt design and validation steps. Second, using advanced closed-source models can be costly, although open-source alternatives can help mitigate expenses. + +# Acknowledgment + +This work is partly supported by the Natural Science Foundation of China under Grant (No. 62206042). This work is also supported by the AI9Stars community. + +# References + +AI@Meta. 2024. Llama 3 model card. + +Akari Asai, Zexuan Zhong, Danqi Chen, Pang Wei Koh, Luke Zettlemoyer, Hannaneh Hajishirzi, and Wen-tau Yih. 2024. Reliable, adaptable, and attributable language models with retrieval. arXiv preprint arXiv:2403.03187. +Jinze Bai, Shuai Bai, Yunfei Chu, Zeyu Cui, Kai Dang, Xiaodong Deng, Yang Fan, Wenbin Ge, Yu Han, Fei Huang, Binyuan Hui, Luo Ji, Mei Li, Junyang Lin, Runji Lin, Dayiheng Liu, Gao Liu, Chengqiang Lu, Keming Lu, Jianxin Ma, Rui Men, Xingzhang Ren, Xuancheng Ren, Chuanqi Tan, Sinan Tan, Jianhong Tu, Peng Wang, Shijie Wang, Wei Wang, Shengguang Wu, Benfeng Xu, Jin Xu, An Yang, Hao Yang, Jian Yang, Shusheng Yang, Yang Yao, Bowen Yu, Hongyi Yuan, Zheng Yuan, Jianwei Zhang, Xingxuan Zhang, Yichang Zhang, Zhenru Zhang, Chang Zhou, Jingren Zhou, Xiaohuan Zhou, and Tianhang Zhu. 2023. Qwen technical report. arXiv preprint arXiv:2309.16609. +Tilmann Bruckhaus. 2024. Rag does not work for enterprises. Preprint, arXiv:2406.04369. +Jianlyu Chen, Shitao Xiao, Peitian Zhang, Kun Luo, Defu Lian, and Zheng Liu. 2024a. M3-embedding: Multi-linguality, multi-functionality, multi-granularity text embeddings through self-knowledge distillation. In Findings of the Association for Computational Linguistics ACL 2024, pages 2318–2335, Bangkok, Thailand and virtual meeting. Association for Computational Linguistics. + +Jiawei Chen, Hongyu Lin, Xianpei Han, and Le Sun. 2024b. Benchmarking large language models in retrieval-augmented generation. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 38, pages 17754-17762. +Shahul Es, Jithin James, Luis Espinosa Anke, and Steven Schockaert. 2024. RAGAs: Automated evaluation of retrieval augmented generation. In Proceedings of the 18th Conference of the European Chapter of the Association for Computational Linguistics: System Demonstrations, pages 150-158, St. Julians, Malta. Association for Computational Linguistics. +Yunfan Gao, Yun Xiong, Xinyu Gao, Kangxiang Jia, Jinliu Pan, Yuxi Bi, Yi Dai, Jiawei Sun, and Haofen Wang. 2023. Retrieval-augmented generation for large language models: A survey. arXiv preprint arXiv:2312.10997. +Shengding Hu, Yuge Tu, Xu Han, Chaoqun He, Ganqu Cui, Xiang Long, Zhi Zheng, Yewei Fang, Yuxiang Huang, Weilin Zhao, et al. 2024. Minicpm: Unveiling the potential of small language models with scalable training strategies. arXiv preprint arXiv:2404.06395. +Jiajie Jin, Yutao Zhu, Xinyu Yang, Chenghao Zhang, and Zhicheng Dou. 2024. Flashrag: A modular toolkit for efficient retrieval-augmented generation research. CoRR, abs/2405.13576. +Mandar Joshi, Eunsol Choi, Daniel S Weld, and Luke Zettlemoyer. 2017. Triviaqa: A large scale distantly supervised challenge dataset for reading comprehension. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1601-1611. +Jared Kaplan, Sam McCandlish, Tom Henighan, Tom B. Brown, Benjamin Chess, Rewon Child, Scott Gray, Alec Radford, Jeffrey Wu, and Dario Amodei. 2020. Scaling laws for neural language models. Preprint, arXiv:2001.08361. +Tom Kwiatkowski, Jennimaria Palomaki, Olivia Redfield, Michael Collins, Ankur Parikh, Chris Alberti, Danielle Epstein, Illia Polosukhin, Jacob Devlin, Kenton Lee, et al. 2019. Natural questions: a benchmark for question answering research. Transactions of the Association for Computational Linguistics, 7:453-466. +Woosuk Kwon, Zhuohan Li, Siyuan Zhuang, Ying Sheng, Lianmin Zheng, Cody Hao Yu, Joseph E. Gonzalez, Hao Zhang, and Ion Stoica. 2023. Efficient memory management for large language model serving with pagedattention. In Proceedings of the ACM SIGOPS 29th Symposium on Operating Systems Principles. +Chin-Yew Lin. 2004. Rouge: A package for automatic evaluation of summaries. In Text summarization branches out, pages 74-81. + +Jerry Liu. 2023. Building production-ready rag applications. +Yuanjie Lyu, Zhiyu Li, Simin Niu, Feiyu Xiong, Bo Tang, Wenjin Wang, Hao Wu, Huanyong Liu, Tong Xu, and Enhong Chen. 2024. *Crud-rag: A comprehensive Chinese benchmark for retrieval-augmented generation of large language models.* arXiv preprint arXiv:2401.17043. +Isabelle Nguyen. 2023. Evaluating rag part i: How to evaluate document retrieval. +Tri Nguyen, Mir Rosenberg, Xia Song, Jianfeng Gao, Saurabh Tiwary, Rangan Majumder, and Li Deng. 2017. MS MARCO: A human-generated MAchine reading COprehension dataset. +Cheng Niu, Yuanhao Wu, Juno Zhu, Siliang Xu, KaShun Shum, Randy Zhong, Juntong Song, and Tong Zhang. 2024. RAGTruth: A hallucination corpus for developing trustworthy retrieval-augmented language models. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 10862-10878, Bangkok, Thailand. Association for Computational Linguistics. +Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. 2002. Bleu: a method for automatic evaluation of machine translation. In Proceedings of the 40th annual meeting of the Association for Computational Linguistics, pages 311-318. +Jon Saad-Falcon, Omar Khattab, Christopher Potts, and Matei Zaharia. 2023. Ares: An automated evaluation framework for retrieval-augmented generation systems. arXiv preprint arXiv:2311.09476. +Yixuan Tang and Yi Yang. 2024. Multihop-rag: Benchmarking retrieval-augmented generation for multi-hop queries. +Aiyuan Yang, Bin Xiao, Bingning Wang, Borong Zhang, Ce Bian, Chao Yin, Chenxu Lv, Da Pan, Dian Wang, Dong Yan, et al. 2023. Baichuan 2: Open large-scale language models. arXiv preprint arXiv:2309.10305. +Xiao Yang, Kai Sun, Hao Xin, Yushi Sun, Nikita Bhalla, Xiangsen Chen, Sajal Choudhary, Rongze Daniel Gui, Ziran Will Jiang, Ziyu Jiang, et al. 2024. Crag-comprehensive rag benchmark. arXiv preprint arXiv:2406.04744. +Zhilin Yang, Peng Qi, Saizheng Zhang, Yoshua Bengio, William Cohen, Ruslan Salakhutdinov, and Christopher D Manning. 2018. Hotpotqa: A dataset for diverse, explainable multi-hop question answering. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 2369-2380. +Xin Zhang, Yanzhao Zhang, Dingkun Long, Wen Xie, Ziqi Dai, Jialong Tang, Huan Lin, Baosong Yang, Pengjun Xie, Fei Huang, et al. 2024. mgte: Generalized long-context text representation and reranking + +models for multilingual text retrieval. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing: Industry Track, pages 1393-1412. + +# A Schema Refinement + +Our refinement constitutes only a small portion of the overall schema and is primarily focused on optimizing its format to better align with the requirements for generating configurations and documents. Specifically, the schema is represented in JSON format. In the original schema, the keys for events were often direct descriptions of the events themselves (e.g., "Major Asset Acquisition"), while the corresponding values were dictionaries composed of fields such as "time", "description", and "impact". However, this structure is not conducive to generating configurations or handling the schema universally in code. + +To address this issue, we implemented a manual refinement process, transforming most schema keys into more generic names. For instance, "Major Asset Acquisition" was converted from a specific key into a value in a general dictionary structure comprising the following fields: "event", "time", "description", and "impact". This refinement not only standardizes and unifies the schema structure but also facilitates universal handling and extensibility in subsequent configuration generation and code processing. See figure 9 and 10 for example. Due to the rapid advancement and remarkable progress in model capabilities, current models can now meet such requirements with some constraints in the prompt, potentially eliminating the need for manual refinement in the future. + +# B Document Generation + +To ensure content consistency in complex document generation, we have developed a hierarchical configuration generation mechanism. The implementation involves three key phases: First, constructing fundamental event schemas that may contain multiple sub-events. The configuration parameters of these base events are then fed back as secondary inputs to drive sub-event generation. For financial reports (particularly multi-sectional filings), we employ a modular approach: generating structured outline configurations for each section first, then producing and integrating content based on these outlines. Additionally, pre-generated standardized company profiles are dynamically embed + +5: The response is completely correct and fluent. +4: The response is correct but includes redundant information. +3: Most of the response is correct. +2: About half of the response is correct. +1: A small part of the response is correct, or there are logical errors. +0: The response is irrelevant or completely incorrect. + +Figure 4: QRA quality scoring criteria. + +ded into documents to maintain consistent corporate descriptions throughout the report. + +# C Quality Assessment + +In this section, we introduce the human verification process used to assess the quality of the generated dataset and the evaluation. The assessment is divided into three main tasks: QRA validation, generated documents quality assessment, and automated evaluation validation. + +QRA Quality Assessment. We ask 8 annotators to assess the quality of the QRAs by scoring the correctness of the QRAs generated under different configurations according to the standards listed in Figure 4. Those annotators are highly educated students or researchers with enough background knowledge for certain annotated fields and are adequately paid for after the annotations. We randomly select ten samples per question type for every language and scenario, resulting in 420 samples in total for annotation. When scoring, annotators are provided with the document, question, question type, generated response, and references. The results from Table 5 indicate that the QRA quality scores are consistently high across different scenarios, with slight variations between languages. Specifically, the combined proportion of scores 4 and 5 for all scenarios is approximately $95\%$ or higher. This suggests that our approach maintains a high standard of accuracy and fluency in QRAs. + +Document Quality Assessment. We evaluate the quality of the documents generated using RAGEval by comparing them with documents generated using baseline methods, which include zero-shot prompting (to ask the LLM to generate the document given only a scenario prompt) and one-shot prompting (to ask the LLM to generate the document given a scenario prompt and a sample document). We randomly select 20, 20, and 19 generated documents for finance, legal, and medical sce + +Safety: Avoidance of real-world sensitive information. + +Clarity: Clear and specific information. + +Conformity: Remembrance to real documents like financial reports or medical records. + +Richness: Depth and breadth of information. + +Figure 5: Document quality comparison criteria. + +narios for both languages, respectively, and pack each document with 2 baseline documents generated by zero- and one-shot prompting into one group for comparison. Annotators are asked to rank the documents in each group in terms of clarity, safety, richness, and conformity, as defined in Figure 5, with ties allowed. Results shown in Figure 6 demonstrate that our method consistently outperforms zero-shot and one-shot methods across all criteria, particularly in safety, clarity, conformity, and richness. Specifically, for the Chinese and English datasets across the three aspects of richness, clarity, and safety, our method ranks first in over $85\%$ of the cases. This demonstrates the effectiveness of our approach in generating high-quality articles with diverse and rich content without compromising safety and clarity. + +Validation of Automated Evaluation. To validate the consistency between LLM evaluations and human assessments, we compare the LLM-reported metrics—completeness, hallucination, and irrelevance—with those provided by human evaluators. Specifically, we selected the top five results for each question type across various scenarios, covering both Chinese and English, from the Baichuan-2-7B-chat model. This process yielded a total of 210 annotated questions, with each question evaluated by three independent annotators. The annotations were then aggregated using a voting mechanism, classifying each keypoint as either "relevant to the answer," "irrelevant," or "contradictory to the answer." We then calculate the three metrics and compare them with LLM-annotated results. Results in Figure 7 show that the machine and human evaluations show a high degree of alignment in all metrics. The final absolute difference between the human evaluation and the machine evaluation is $1.67\%$ . The Fleiss' Kappa value between the three annotators is 0.7686. This validates the reliability of our automated evaluation metrics and confirms their consistency with human judgment. + +To ensure robust human evaluation, we invited + +
MetricCorrelation TypeCorrelation Coefficientp-value
CompleSpearman0.85360.0000
ComplePearson0.85490.0000
IrreleSpearman0.75890.0000
IrrelePearson0.75680.0000
HalluSpearman0.79830.0000
HalluPearson0.78510.0000
+ +Table 4: Correlation between Automated Metrics and Human Annotations. We report Spearman and Pearson correlation coefficients for three evaluation dimensions: Complete (Completeness), Irrele (Irrelevancy), and Hallu (Hallucination). All results are statistically significant ( $p < 0.0001$ ). The table is resized to fit the single-column layout. + +
FinanceLawMedical
CN4.944.814.76
EN4.844.794.87
+ +three NLP researchers with diverse academic and industry backgrounds to annotate the responses independently, as shown in Table 4. + +In summary, the human evaluation results highlight the robustness and effectiveness of our method in generating accurate, safe, and rich content across various scenarios, as well as the reliability of our automated evaluation metrics in reflecting human judgment. + +# D DragonBall Datasets Details + +For document generation, the dataset includes texts from 20 different corporate scenarios in finance, with one randomly selected text per scenario; 10 different legal scenarios, with two randomly selected texts per scenario; and 19 major medical categories, each with two subcategories and one randomly selected text per major category. This ensures a balanced number of human-evaluated documents across finance, law, and medical scenarios. + +Table 5: QAR quality human review scores by domain. + +
scenarioLanguageDocument Count
FinanceCN & EN40 & 40
LegalCN & EN30 & 30
MedicalCN & EN38 & 38
+ +Table 6: Distribution of Documents in the DRAGONBALL Dataset, in total, we have 6711 questions. + +![](images/cb96025f1c240821666174212427dc7b813b5165b519bde746e08d50630c44b4.jpg) +Figure 6: Document generation comparison by scenario. + +![](images/6c8313a4f051d58d95454dbf8bcda1810cf54c634b478c8a5c100ae7a1c68abc.jpg) +Figure 7: Automated metric validation results. We show the absolute differences between the two evaluations. + +In Table 6, we present a detailed breakdown of the DRAGONBall dataset. The first section of the table shows the distribution of documents across the three scenarios (finance, legal, and medical) in both Chinese (CN) and English (EN), with an equal number of documents for each language. The second section categorizes the types of questions included in the dataset, providing percentages for each type. The third section details the distribution of the number of reference documents used in answering the questions, reflecting the complexity and variability of the dataset. In total, the dataset comprises 6711 questions. + +To ensure the high quality of the QRA triples, we first consider the balance and diversity among the different question types, and then we remove homogeneous and meaningless questions. For example, if the number of unanswerable questions is insufficient, we supplement them according to the article. Second, we eliminate redundant references and answer statements and correct logical reasoning errors in the answers to ensure the dataset quality. + +![](images/3d24e330dd83d6248ef7af56e8d47573bbdd54fd819ef080c295d2de9dcc156c.jpg) +Figure 8: Questions type ratios of DragonBall. + +The dataset and the framework will be released under a CC-BY-NC license to ensure its safe use. + +To assess the robustness and generalizability of our RAGEval pipeline, we extended human evaluation to three additional domains, with three annotators from diverse backgrounds annotating a total of 15 generated articles for each domain: Environment Report, Product Introduction, and Business Plan. Evaluations were conducted in both Chinese and English using a structured 5-point scoring system: + +- Score 5: Surpasses typical human-generated articles +- Score 4: High-quality, comparable to well-written human articles +- Score 3: Comparable to average human-written articles +- Score 2: Below-average compared to human-written articles +- Score 1: Significantly lower quality than human-written articles + +The evaluation results, averaged across four dimensions (Safety, Clarity, Normativity, Richness), are summarized below: + +These results in Table 7,8 demonstrate that our RAGEval pipeline consistently generates content of higher quality than zero-shot and one-shot baselines across multiple domains and languages. By leveraging domain-specific seed articles and structured templates, RAGEval effectively adapts to + +varied content types and maintains strong performance, highlighting its generalizability and scalability. The RAGEval codebase is open-sourced to facilitate further evaluation and domain extension. + +# E Examples + +![](images/7369bb76b0eebadda088003eb75aacc4b4ef672af5e14d6d07c891ae243175e2.jpg) +Figure 9: A schema example of Law scenario before refinement. + +![](images/673343610bdafa5197a451986b3f55fe4fa8f2e4c7e2f0bdca3dfc6e1fba4330.jpg) +Figure 10: A schema example of Law scenario after refinement. + +
DomainGeneration TypeSafetyClarityNormativityRichnessAvg
FinanceZero-shot3.332.802.732.472.83
FinanceOne-shot3.602.072.472.002.54
FinanceRAGEval (ours)3.673.002.933.203.20
LawZero-shot3.332.272.532.002.53
LawOne-shot1.802.802.802.272.42
LawRAGEval (ours)3.673.002.932.933.13
MedicalZero-shot2.732.873.002.602.80
MedicalOne-shot2.332.672.872.672.64
MedicalRAGEval (ours)3.333.003.003.003.08
EnvironmentZero-shot3.531.471.801.071.97
EnvironmentOne-shot1.002.932.802.472.30
EnvironmentRAGEval (ours)3.473.073.003.133.17
ProductZero-shot3.132.933.002.672.93
ProductOne-shot3.672.402.271.802.56
ProductRAGEval (ours)3.333.203.073.133.18
Business PlanZero-shot2.402.402.602.202.40
Business PlanOne-shot3.002.732.802.332.72
Business PlanRAGEval (ours)3.272.932.932.933.02
+ +Table 7: Human Evaluation (Chinese). Average scores across four evaluation dimensions for three generation methods in six Chinese domains. + +
DomainGeneration TypeSafetyClarityNormativityRichnessAvg
FinanceZero-shot3.532.602.872.472.62
FinanceOne-shot3.202.332.732.132.60
FinanceRAGEval (ours)3.673.002.803.073.14
LawZero-shot3.532.072.671.802.52
LawOne-shot1.732.932.932.132.43
LawRAGEval (ours)3.673.003.003.003.17
MedicalZero-shot2.732.873.002.532.78
MedicalOne-shot3.072.533.002.472.77
MedicalRAGEval (ours)3.603.003.003.073.17
EnvironmentZero-shot2.271.531.731.071.65
EnvironmentOne-shot1.332.933.202.602.52
EnvironmentRAGEval (ours)3.073.002.933.403.10
ProductZero-shot3.673.003.002.933.15
ProductOne-shot3.672.802.402.402.82
ProductRAGEval (ours)3.603.003.073.333.25
Business PlanZero-shot3.672.202.402.132.60
Business PlanOne-shot3.272.732.672.402.77
Business PlanRAGEval (ours)3.603.002.873.073.14
+ +Table 8: Human Evaluation (English). Average scores across four evaluation dimensions for three generation methods in six English domains. + +
ModelRetrieval
Recall (↑)EIR (↑)
CNENCNEN
BM2580.6966.174.468.80
GTE-multilingual-Base65.2452.643.697.83
MiniCPM-Embedding81.2365.854.629.47
BGE-M382.5464.984.648.60
+ +Table 9: The performance results (%) of various retrieval models on DragonBall dataset. The primary metrics evaluated include Recall and EIR. We test all queries in Dragonball dataset. + +You are an experienced court clerk, you have rich experience in writing legal documents, and have a strong imagination. + +You need to write a detailed legal document sample. +You need to write a legal document item based on a JSON template: +- The charge to be written is: {crime_name} +- In the "defendant" field, the defendant's name, gender, and birth date have been filled out. You only need to fill in their ethnicity, occupation, etc. +- In the "defenseLawyer" field, the lawyer's name has been filled out. You only need to fill in the law firm they belong to. +- In the "process" field, please provide specific dates and detailed descriptions for each key event. +- In the "criminalFacts" field, please create a scenario involving {crime_name}, including specific behavior, time period, place, and amounts involved. +- The "Details" field in "criminalFacts" is a list and should have 3 to 4 incidents, each with "timePeriod", "behavior", and "evidence" elements. +- The offender's specific actions should be very detailed. You need to carefully supplement the case history and details, possibly involving amounts, times, places, brands, etc., that should look very real. +- Evidence materials supporting the verdict need to be very detailed, and you can list multiple pieces of evidence, including written evidence, physical evidence, witness testimony, etc. +- The "legalProcedure" field includes the trial date, trial result, and specific sentencing (if probation is applicable, also inform the probation period). {crime_detail} + +Figure 11: A config prompt of Law scenario. + +![](images/72fc0b6c5dc3f440813dc443891b4e2568b0857f91fea99671ecc7c33c6afd7a.jpg) +Figure 12: A config example of Law scenario. + +
Query TypeRetrievalGeneration
Recall (↑)EIR (↑)Completeness (↑)
128-20256-10512-5128-20256-10512-5128-20256-10512-5
FQ98.00100.0094.001.022.664.8986.0092.0086.00
IIQ59.2668.3973.311.435.7913.6277.7782.7771.60
NCQ86.3377.3368.331.505.459.0179.3368.6763.33
TSQ77.0078.4774.931.946.3612.4782.0079.6767.67
MRQ79.9584.7484.544.567.9215.2176.0078.7079.03
SQ55.9450.2157.893.737.7421.1758.9254.2660.12
UQ13.0013.0016.000.100.391.3448.0048.6754.00
Avg.67.0767.4567.002.045.1811.1072.5772.1068.82
+ +Table 10: Chunk-TopK results (\%) of various query types on finance scenario in English. Seven query types are evaluated: Factual Question (FQ), Information Integration Question (IIQ), Numerical Comparison Question (NCQ), Temporal Sequence Question (TSQ), Multi-hop Reasoning Question (MRQ), Summarization Question (SQ), Unanswerable Question (UQ). + +
Query TypeRetrievalGeneration
Recall (↑)EIR (↑)Completeness (↑)
128-20256-10512-5128-20256-10512-5128-20256-10512-5
FQ100.00100.0098.001.712.071.9098.0088.0090.00
IIQ96.0091.0088.003.263.693.2878.4078.8072.60
NCQ92.0086.6790.672.843.163.2284.0082.6785.67
TSQ94.0089.0075.003.103.412.7390.6779.3371.00
MRQ99.0098.0099.006.738.337.8485.7980.6384.37
SQ94.0490.8693.2510.0512.8712.9871.8569.3368.85
UQ16.0016.0012.000.250.300.3021.0030.0022.00
Avg.84.4381.6579.423.994.834.6175.6772.6870.64
+ +Table 11: Chunk-TopK results (\%) of various query types on finance scenario in Chinese. Seven query types are evaluated: Factual Question (FQ), Information Integration Question (IIQ), Numerical Comparison Question (NCQ), Temporal Sequence Question (TSQ), Multi-hop Reasoning Question (MRQ), Summarization Question (SQ), Unanswerable Question (UQ). + +
You are an experienced court clerk, you have rich experience in writing legal documents, and have a strong imagination.
You need to write a detailed legal document sample.
You need to write a criminal judgment based on a JSON example (case key information in JSON form):
- Based on this completed information, write a legal document that is very detailed, supplementing the case history and details yourself, and writing in the tone of an experienced court clerk. It should be at least 8000 words.
- You should supplement the case history and details based on the information, such as the defendant's confession. You can freely elaborate, but it must comply with legal regulations.
- When writing the document, you should include the following sections: Court and Prosecutor Information, Defendant and Defense Lawyer Information, Case Procedures, Case Statement, Charge, Evidence Description, Sentencing Considerations, Judgment Result, Appeal Rights Explanation, etc. (do not include legal basis).
- When writing the document, the tone should use "This court" as the subject. Pay attention to the formal and official tone.
- Do not make the evidence description and case statement too brief. Describe the case process in detail, and do not use points (1. 2. 3. etc.) in this section.
- You do not need to write out the referenced legal provisions' content, only the article numbers. The crime involved is: {crime_name}.
+ +Figure 13: A document prompt of Law scenario. + +"content":"Ashton, Clarksville Court + +Case No. XYZ12345 + +**IN THE COURT OF ASHTON, CLARKSVILLE** + +**CRIMINAL JUDGMENT** + +\*\*COURT AND PROSECUTOR INFORMATION\*\* + +**Court:** + +Ashton, Clarksville Court + +**Prosecutorate:** + +Ashton, Clarksville Procuratorate + +**Chief Judge:** + +M. Gray + +**Judge:** + +H. Torres + +\*\*Clerk:\*\* + +A. Brown + +**DEFENDANT AND DEFENSE LAWYER INFORMATION** + +**Defendant:** + +Name: J. Gonzalez + +Gender: Female + +Birthdate: 15th June 1999 + +Residence: 53 Bayside Street, Clarksville + +Ethnicity: Hispanic + +Occupation: Senior Inspector, Clarksville Tax Department + +**Defense Lawyer:** + +Name: M. Smith + +Law Firm: Clarksville Legal Associates + +\*\*CASE PROCEDURES\*\* + +The case against J. Gonzalez commenced with an investigation following a suspicious tip received by the Ashton, Clarksville Procuratorate on 1st March 2023. The investigation revealed substantial evidence implicating the defendant in the Crime of Bending the Law for Personal Gain. + +Consequently, J. Gonzalez was taken into detention on 5th March 2023. Criminal detention was applied on 10th March 2023, and the defendant was formally arrested on 12th March 2023. + +\*\*CASE STATEMENT\*\* + +The Crime of Bending the Law for Personal Gain by the defendant, J. Gonzalez, occurred over a span of one year, from January 2022 to December 2022. During this period, J. Gonzalez exploited her position as a Senior Inspector within the Clarksville Tax Department to manipulate tax audits, reports, and reduce penalty fees for several conspiring local businesses in exchange for substantial financial bribes. This court will detail the pertinent events chronologically to provide a comprehensive understanding of the criminal activities committed. + +\*\*Charge:\*\* + +Crime of Bending the Law for Personal Gain as per Article 397 of the applicable law. + +**EVIDENCE DESCRIPTION** + +**1. January 2022 - December 2022: Manipulation of Tax Audits in Exchange for Bribes** + +During the year of 2022, J. Gonzalez engaged in illicit activities using her privileged position. Emails confirmed numerous correspondences between J. Gonzalez and various local business owners. These emails explicitly outlined her agreement to manipulate tax audits and financial reports for monetary compensation. Bank statements revealed a series of significant transactions amounting to $125,000 deposited into an account owned by J. Gonzalez from suspicious sources. Testimonies from several business owners corroborated these findings, revealing a consistent pattern of bribery and exploitation. + +. + +**Date of Judgment:** + +15th May 2023 + +\*\*\* + +M. Gray, Chief Judge + +\*\* \*\* + +H. Torres, Judge + +\*\* \*\* + +A. Brown, Clerk" + +Figure 14: A document example of Law scenario. + +```json +{ "qafact_based": [ { "Question Type": "Factual Question", "Question": "According to the court judgment of Ashton, Clarksville, Court, what was the judgment date?", "ref": [ "Date of Judgment: 15th May 2023"] , "Answer": "15th May 2023." } ], "qa-multi_hop": [ { "Question Type": "Multi-hop Reasoning Question", "Question": "According to the judgment of Ashton, Clarksville, Court, how many instances of bending the law for personal gain did J. Gonzalez commit?", "ref": [ "The Crime of Bending the Law for Personal Gain by the defendant, J. Gonzalez, occurred over a span of one year, from January 2022 to December 2022.", "During this period, J. Gonzalez exploited her position as a Senior Inspector within the Clarksville Tax Department to manipulate tax audits, reports, and reduce penalty fees for several conspiring local businesses in exchange for substantial financial bribes.", "In March 2022, J. Gonzalez revised the tax records for Sunrise Construction Inc., drastically reducing their tax liability after receiving a bribe of \(50,000.", "In exchange for \)30,000, J. Gonzalez facilitated the undue reduction of penalty fees levied on Downtown Boutique Ltd. for late tax submissions.", "The most egregious of the offenses occurred in November 2022, when J. Gonzalez disclosed sensitive and confidential information about ongoing tax investigations to executives at Riven Pharmaceuticals, securing a bribe of \(45,000." ], "Answer": "According to the judgment, J. Gonzalez committed four instances of bending the law for personal gain: manipulating tax audits and reports, altering tax records, reducing penalty fees, and providing confidential information." } ], "qa_summary": [ { "Question Type": "Summary Question", "Summary Content": "Facts of the crime", "Question": "According to the judgment of Ashton, Clarksville, Court, summarize the facts of J. Gonzalez's crimes.", "ref": [ "The Crime of Bending the Law for Personal Gain by the defendant, J. Gonzalez, occurred over a span of one year, from January 2022 to December 2022.", "During this period, J. Gonzalez exploited her position as a Senior Inspector within the Clarksville Tax Department to manipulate tax audits, reports, and reduce penalty fees for several conspiring local businesses in exchange for substantial financial bribes.", "In March 2023, J. Gonzalez revised the tax records for Sunrise Construction Inc., drastically reducing their tax liability after receiving a bribe of \)50,000.", "In exchange for $30,000, J. Gonzalez facilitated the undue reduction of penalty fees levied on Downtown Boutique Ltd. for late tax submissions.", "The most egregious of the offenses occurred in November 2022, when J. Gonzalez disclosed sensitive and confidential information about ongoing tax investigations to executives at Riven Pharmaceuticals, securing a bribe of \(45,000." ], "Answer": "J. Gonzalez, a Senior Inspector at the Clarksville Tax Department, committed the crime of bending the law for personal gain. From January 2022 to December 2022, she manipulated tax audits and reports in exchange for bribes from multiple local businesses. In March 2023, she altered tax records to reduce the tax liability for Sunrise Construction Inc. after receiving $50,000. In August 2023, she reduced penalty fees for late tax submission of Downtown Boutique Ltd. in exchange for $30,000. In November 2023, she provided confidential information about ongoing tax investigations to Riven Pharmaceuticals in exchange for $45,000." } ] +``` + +Figure 15: A QRA example of Law scenario. + +{ + +"prompt": "In this task, you will be given a question and a standard answer. Based on the standard answer, you need to summarize the key points necessary to answer the question. List them as follows: + +1. . +2. ... and so on, as needed. + +Example: + +Question: What are the significant changes in the newly amended Company Law? + +Standard Answer: The 2023 amendment to the Company Law introduced several significant changes. Firstly, the amendment strengthens the regulation of corporate governance, specifically detailing the responsibilities of the board of directors and the supervisory board [1]. Secondly, it introduces mandatory disclosure requirements for Environmental, Social, and Governance (ESG) reports [2]. Additionally, the amendment adjusts the corporate capital system, lowering the minimum registered capital requirements [3]. Finally, the amendment introduces special support measures for small and medium-sized enterprises to promote their development [4]. + +Key Points: + +1. The amendment strengthens the regulation of corporate governance, detailing the responsibilities of the board of directors and the supervisory board. +2. It introduces mandatory disclosure requirements for ESG reports. +3. It adjusts the corporate capital system, lowering the minimum registered capital requirements. +4. It introduces special support measures for small and medium-sized enterprises. + +Question: Comparing the major asset acquisitions of Huaxia Entertainment Co., Ltd. in 2017 and Top Shopping Mall in 2018, which company's acquisition amount was larger? + +Standard Answer: Huaxia Entertainment Co., Ltd.'s asset acquisition amount in 2017 was larger [1], amounting to 120 million yuan [2], whereas Top Shopping Mall's asset acquisition amount in 2018 was 50 million yuan [3]. + +Key Points: + +1. Huaxia Entertainment Co., Ltd.'s asset acquisition amount in 2017 was larger. + +2. Huaxia Entertainment Co., Ltd.'s asset acquisition amount was 120 million yuan in 2017. +3. Top Shopping Mall's asset acquisition amount was 50 million yuan in 2018. + +Question: Comparing the timing of sustainability and social responsibility initiatives by Meihome Housekeeping Services Co., Ltd. and Cultural Media Co., Ltd., which company initiated these efforts earlier? + +Standard Answer: Meihome Housekeeping Services Co., Ltd. initiated its sustainability and social responsibility efforts earlier [1], in December 2018 [2], whereas Cultural Media Co., Ltd. initiated its efforts in December 2019 [3]. + +Key Points: + +1. Meihome Housekeeping Services Co., Ltd. initiated its sustainability and social responsibility efforts earlier. +2. Meihome Housekeeping Services Co., Ltd. initiated its efforts in December 2018. +3. Cultural Media Co., Ltd. initiated its efforts in December 2019. + +Question: Based on the 2017 Environmental and Social Responsibility Report of Green Source Environmental Protection Co., Ltd., how did the company improve community relations through participation in charitable activities, community support and development projects, and public service projects? + +Standard Answer: Green Source Environmental Protection Co., Ltd. improved community relations through several social responsibility activities. Firstly, in March 2017, the company participated in or funded charitable activities and institutions to support education, health, and poverty alleviation, enhancing the company's social image and brand recognition [1]. Secondly, in June 2017, the company invested in the local community, supporting education, health, and social development projects, deepening its connection with the community and promoting overall community well-being and development [2]. Finally, in August 2017, the company participated in public service projects such as urban greening and public health improvement projects, enhancing the quality of life in the community and promoting sustainable development [3]. These measures enhanced public perception of the company and improved community relations [4]. + +Key Points: + +1. In March 2017, the company participated in or funded charitable activities and institutions to support education, health, and poverty alleviation, enhancing the company's social image and brand recognition. +2. In June 2017, the company invested in the local community, supporting education, health, and social development projects, deepening its connection with the community and promoting overall community well-being and development. +3. In August 2017, the company participated in public service projects such as urban greening and public health improvement projects, enhancing the quality of life in the community and promoting sustainable development. +4. These measures enhanced public perception of the company and improved community relations. + +Test Case: + +Question: {question} + +Standard Answer: {groundtruth} + +Key Points: + +Figure 16: Key points generation prompt. + +{"prompt":"""In this task, you will receive a question, a generated answer, and multiple key points from a standard answer. Please categorize each key point by determining whether it is Relevant, Irrelevant, or Wrong based on the generated answer. For each key point, provide a brief analysis and conclude with one of the following classifications: + +[[Relevant]]] indicates that the generated answer contains key information that is related to and consistent with the key point described in the standard answer. + +[[Irrelevant]]] indicates that the generated answer does not contain or involve information related to the key point in the standard answer. + +[[Wrong]]] indicates that the generated answer contains information related to the key point but it is incorrect or contradicts the standard answer keypoints. + +Ensure that each key point is categorized into only one of the three categories. Provide your analysis and conclusion for each key point sequentially. + +Example 1: + +Question: What is the current situation and future outlook for wealth management fee income? + +Generated Answer: In the first three quarters, the bank achieved wealth management fee income of 5.105 billion yuan, down $20.7\%$ year-on-year. This decline was mainly due to the active reduction of non-standard product scales and the decline in fund sales caused by fluctuations in the securities market. To address this situation, the bank plans to continue upgrading its products, teams, professionalism, and technological capabilities. Specific measures include improving asset selection and product screening capabilities, enriching and optimizing product shelves, continuously strengthening the construction of professional teams, and focusing on enhancing team professional skills and middle-office empowerment levels to enhance the endogenous development capabilities of the teams. The future outlook includes achieving more stable and higher-quality development through these measures to cope with the challenges of declining wealth management fee income. + +Standard Answer Key Points: + +Here are 2 key points + +1. Current situation of wealth management fee income: Income in the first three quarters decreased by $21.6\%$ year-on-year. +2. Future measures: Plans to upgrade products and teams to achieve stable development. + +Key Point Evaluation: + +Key Point 1: + +Comparable fragment of the generated answer: "wealth management fee income of 5.105 billion yuan, down $20.7\%$ year-on-year." + +Analysis: The generated answer mentions a decrease of $20.7\%$ year-on-year, whereas the standard key point specifies a decrease of $21.6\%$ . The percentage difference makes this information incorrect. Conclusion: [[Wrong]] + +Key Point 2: + +Comparable fragment of the generated answer: "plans to continue upgrading its products, teams, professionalism, and technological capabilities." + +Analysis: The generated answer aligns with the standard key point by detailing plans to upgrade products and teams to achieve more stable development. + +Conclusion: [[Relevant]]] .... omit three example here + +Before you begin the evaluation, please pay attention to the following points: + +1. [[Wrong]] should only be assigned when there is a specific factual or logical conflict between the key point and the generated answer. If important content is missing, it should be categorized as [[Irrelevant]]], not [[Wrong]]. More special cases should refer to point 5 below. +2. [[Relevant]]] does not require the generated answer to include all the details. It only needs to contain the key information necessary to answer the question. Not all details are required. We ensure that each key point in the standard answer is typically necessary, although some details might not be important for answering the question. When making judgments, focus only on whether the most important information is included and consistent. Also, identical content in different forms can be considered relevant as long as the core key information is present. +3. Please ensure that the number of key points evaluated matches the number of key points in the standard answer. Each key point must be evaluated; do not skip or over-evaluate any key point. +4. After evaluating the key points, do not repeat your conclusions. Ensure that the total number of classifications - [[Relevant]]], [[Wrong]]], and [[Irrelevant]]] - matches the number of key points in the standard answer. .... omit three more instruction + +Test cases: + +Question: {question} + +Generated Answer: {prediction} + +Standard Answer Key Points: + +Here are {key_points_num} key points + +{key_points} + +Key Point Evaluation:""" + +} + +Figure 17: Key points evaluation prompt. + +
Query TypeRetrievalGeneration
Recall (↑)EIR (↑)Completeness (↑)
128-20256-10512-5128-20256-10512-5128-20256-10512-5
FQ98.0094.0088.832.242.522.0799.0088.0091.00
IIQ84.6381.9279.152.772.972.7278.0079.0079.00
NCQ93.0078.3368.672.832.582.1284.0071.6765.33
TSQ81.3376.3367.672.582.892.3861.3360.6756.00
MRQ91.4181.9382.4711.9512.1011.2349.3746.4149.41
SQ74.6373.6874.2313.9814.6814.0958.8964.9760.80
UQ10.007.003.000.140.080.0844.0057.0044.00
Avg.76.1470.4666.295.215.404.9667.8566.8363.67
+ +Table 12: Chunk-TopK results (\%) of various query types on law scenario in Chinese. Seven query types are evaluated: Factual Question (FQ), Information Integration Question (IIQ), Numerical Comparison Question (NCQ), Temporal Sequence Question (TSQ), Multi-hop Reasoning Question (MRQ), Summarization Question (SQ), Unanswerable Question (UQ). + +
Query TypeRetrievalGeneration
Recall (↑)EIR (↑)Completeness (↑)
128-20256-10512-5128-20256-10512-5128-20256-10512-5
FQ85.0087.0090.001.582.225.1588.0088.0091.00
IIQ75.0772.2364.033.334.085.2077.5077.0076.17
NCQ52.0064.5045.172.344.175.2554.8354.8339.33
TSQ79.3359.1752.005.444.404.5458.6745.3340.00
MRQ29.4230.3019.713.197.508.9341.7428.2823.85
SQ18.5125.7525.904.239.0312.8633.3836.2934.89
UQ2.002.002.000.120.120.1179.3783.5085.83
Avg.48.7648.7142.692.894.506.0162.0159.1055.93
+ +Table 13: Chunk-TopK results (\%) of various query types on law scenario in English. Seven query types are evaluated: Factual Question (FQ), Information Integration Question (IIQ), Numerical Comparison Question (NCQ), Temporal Sequence Question (TSQ), Multi-hop Reasoning Question (MRQ), Summarization Question (SQ), Unanswerable Question (UQ). + +
Query TypeRetrievalGeneration
Recall (↑)EIR (↑)Completeness (↑)
128-20256-10512-5128-20256-10512-5128-20256-10512-5
FQ85.0099.0095.001.041.310.9780.0094.0096.00
IIQ86.8383.8383.501.952.131.6187.0083.0079.00
NCQ83.3970.2070.612.902.872.3984.3371.3373.00
TSQ94.0094.0087.672.723.212.3587.3388.0080.33
MRQ83.3680.9089.664.464.644.4467.5562.5067.73
SQ85.1077.9683.426.276.325.9867.6362.5263.15
UQ2.000.002.000.030.000.0364.6760.6763.33
Avg.74.2472.2773.122.772.932.5476.9374.5774.65
+ +Table 14: Chunk-TopK results (\%) of various query types on medical scenario in Chinese. Seven query types are evaluated: Factual Question (FQ), Information Integration Question (IIQ), Numerical Comparison Question (NCQ), Temporal Sequence Question (TSQ), Multi-hop Reasoning Question (MRQ), Summarization Question (SQ), Unanswerable Question (UQ). + +
Query TypeRetrievalGeneration
Recall (↑)EIR (↑)Completeness (↑)
128-20256-10512-5128-20256-10512-5128-20256-10512-5
FQ98.6791.6780.002.612.241.7090.0090.0088.00
IIQ93.2780.6081.774.933.274.2883.0076.0088.00
NCQ90.5080.5044.672.221.490.9881.0074.3340.67
TSQ81.0097.0092.002.822.532.8166.0073.3372.67
MRQ66.1764.1640.465.835.232.6451.2255.3843.20
SQ57.4264.3550.2913.7414.0011.4752.9659.7952.37
UQ0.000.000.000.000.000.0096.0090.0098.00
Avg.69.5768.3355.604.594.113.4174.3174.1268.99
+ +Table 15: Chunk-TopK results (\%) of various query types on medical scenario in English. Seven query types are evaluated: Factual Question (FQ), Information Integration Question (IIQ), Numerical Comparison Question (NCQ), Temporal Sequence Question (TSQ), Multi-hop Reasoning Question (MRQ), Summarization Question (SQ), Unanswerable Question (UQ). + +
Question TypeDefinition
Single-document QA
FactualQuestions targeting specific details within a reference (e.g., a company's profit in a report, a verdict in a legal case, or symptoms in a medical record) to test RAG's retrieval accuracy.
SummarizationQuestions that require comprehensive answers, covering all relevant information, to mainly evaluate the recall rate of RAG retrieval.
Multi-hop ReasoningQuestions involve logical relationships among events and details within a document, forming a reasoning chain to assess RAG's logical reasoning ability.
Multi-document QA
Information IntegrationQuestions that need information from two documents combined, typically containing distinct information fragments, to test cross-document retrieval accuracy.
Numerical ComparisonQuestions requiring RAG to find and compare data fragments to draw conclusions, focusing on the model's summarizing ability.
Temporal SequenceQuestions requiring RAG to determine the chronological order of events from information fragments, testing the model's temporal reasoning skills.
Unanswerable Questions
UnanswerableQuestions arise from potential information loss during the schema-to-article generation, where no corresponding information fragment exists, or the information is insufficient for an answer.
+ +Table 16: DragonBall Dataset question types and their definitions \ No newline at end of file diff --git a/ragevalscenariospecificragevaluationdatasetgenerationframework/images.zip b/ragevalscenariospecificragevaluationdatasetgenerationframework/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..ea8f78b36021f9b47297dac0fb63ae357aafc996 --- /dev/null +++ b/ragevalscenariospecificragevaluationdatasetgenerationframework/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:129b611b04ea77dc917190e29efb53ecadd1671109beeea88f963c27741e5ab5 +size 1719494 diff --git a/ragevalscenariospecificragevaluationdatasetgenerationframework/layout.json b/ragevalscenariospecificragevaluationdatasetgenerationframework/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..14ac8bd0c5c1da3b0e83a60272a507b788dfda03 --- /dev/null +++ b/ragevalscenariospecificragevaluationdatasetgenerationframework/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:11b1f1c3d26d51b78a1635463feb395fc638db0dfa6accfd561d1b4f0dcd16b8 +size 679758 diff --git a/rankcotrefiningknowledgeforretrievalaugmentedgenerationthroughrankingchainofthoughts/8f6125c9-2a9d-4c94-a99a-9e98e45710ac_content_list.json b/rankcotrefiningknowledgeforretrievalaugmentedgenerationthroughrankingchainofthoughts/8f6125c9-2a9d-4c94-a99a-9e98e45710ac_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..86b428274e486cf5457e7b7ba52aa11e2e73e8bb --- /dev/null +++ b/rankcotrefiningknowledgeforretrievalaugmentedgenerationthroughrankingchainofthoughts/8f6125c9-2a9d-4c94-a99a-9e98e45710ac_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b66a7ef69d89d0c27e1c666c122b2dd7ace949f4df3ce5ded001b56c589db2a5 +size 123414 diff --git a/rankcotrefiningknowledgeforretrievalaugmentedgenerationthroughrankingchainofthoughts/8f6125c9-2a9d-4c94-a99a-9e98e45710ac_model.json b/rankcotrefiningknowledgeforretrievalaugmentedgenerationthroughrankingchainofthoughts/8f6125c9-2a9d-4c94-a99a-9e98e45710ac_model.json new file mode 100644 index 0000000000000000000000000000000000000000..33848e362f6265fdaf74197c3089c656f417e812 --- /dev/null +++ b/rankcotrefiningknowledgeforretrievalaugmentedgenerationthroughrankingchainofthoughts/8f6125c9-2a9d-4c94-a99a-9e98e45710ac_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e3ced862d684ae5ba52c6a3c3d0877fc1916eb1f9efc170338c513a383890374 +size 152421 diff --git a/rankcotrefiningknowledgeforretrievalaugmentedgenerationthroughrankingchainofthoughts/8f6125c9-2a9d-4c94-a99a-9e98e45710ac_origin.pdf b/rankcotrefiningknowledgeforretrievalaugmentedgenerationthroughrankingchainofthoughts/8f6125c9-2a9d-4c94-a99a-9e98e45710ac_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..c1aba748c8a50aa83bf553afaddd75c3d0495bf5 --- /dev/null +++ b/rankcotrefiningknowledgeforretrievalaugmentedgenerationthroughrankingchainofthoughts/8f6125c9-2a9d-4c94-a99a-9e98e45710ac_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:13049ff890910b602dd9fb512b02b2d52fbd33342bae2f51ca3f23d401d09c40 +size 2783930 diff --git a/rankcotrefiningknowledgeforretrievalaugmentedgenerationthroughrankingchainofthoughts/full.md b/rankcotrefiningknowledgeforretrievalaugmentedgenerationthroughrankingchainofthoughts/full.md new file mode 100644 index 0000000000000000000000000000000000000000..663dc235aa6d619797fe62d18d122d24997fac9e --- /dev/null +++ b/rankcotrefiningknowledgeforretrievalaugmentedgenerationthroughrankingchainofthoughts/full.md @@ -0,0 +1,607 @@ +# RankCoT: Refining Knowledge for Retrieval-Augmented Generation through Ranking Chain-of-Thoughts + +Mingyan Wu $^{1}$ , Zhenghao Liu $^{1*}$ , Yukun Yan $^{2*}$ , Xinze Li $^{1}$ , Shi Yu $^{2}$ , Zheni Zeng $^{2}$ , Yu Gu $^{1}$ , Ge Yu $^{1}$ + +$^{1}$ School of Computer Science and Engineering, Northeastern University, China + $^{2}$ Department of Computer Science and Technology, Institute for AI, Tsinghua University, China +Beijing National Research Center for Information Science and Technology, China + +# Abstract + +Retrieval-Augmented Generation (RAG) enhances the performance of Large Language Models (LLMs) by incorporating external knowledge. However, LLMs still encounter challenges in effectively utilizing the knowledge from retrieved documents, often being misled by irrelevant or noisy information. To address this issue, we introduce RankCoT, a knowledge refinement method that incorporates reranking signals in generating CoT-based summarization for knowledge refinement based on given query and all retrieval documents. During training, RankCoT prompts the LLM to generate Chain-of-Thought (CoT) candidates based on the query and individual documents. It then fine-tunes the LLM to directly reproduce the best CoT from these candidate outputs based on all retrieved documents, which requires LLM to filter out irrelevant documents during generating CoT-style summarization. Additionally, RankCoT incorporates a self-reflection mechanism that further refines the CoT outputs, resulting in higher-quality training data. Our experiments demonstrate the effectiveness of RankCoT, showing its superior performance over other knowledge refinement models. Further analysis reveals that RankCoT can provide shorter but effective refinement results, enabling the generator to produce more accurate answers. All code and data are available at https://github.com/NEUIR/RankCoT. + +# 1 Introduction + +Retrieval-Augmented Generation (RAG) (Lewis et al., 2020b; Guu et al., 2020; Ram et al., 2023; Shi et al., 2024) empowers Large Language Models (LLMs) to access external knowledge, providing up-to-date information during the generation process. RAG models have demonstrated their effectiveness in mitigating the hallucination problem commonly encountered by LLMs (Shuster et al., + +![](images/4195761aeae5ba8f0d3c5684eab8516e89ba800b28c4fbd1b84eb598bd2188fa.jpg) +Figure 1: Illustration of implicit ranking and summarization in the RankCoT model. We present how knowledge refinement can be achieved by incorporating reranking into CoT-based summarization. + +2021), enhancing the performance of LLMs, such as GPT-4 (Achiam et al., 2023) and LLaMA (Touvron et al., 2023), in different NLP tasks. + +RAG models typically use dense retrieval methods (Karpukhin et al., 2020; Xiong et al., 2021) to retrieve query-relevant documents from external knowledge bases. These documents, along with the query, are then fed as the input context into LLMs (Ram et al., 2023). Thriving on their incontext learning capabilities (Brown et al., 2020; Dong et al., 2023), LLMs are able to extract relevant semantics from retrieved documents and generate appropriate responses to address the given query. However, the potential knowledge conflict between external knowledge and parameterized memory still poses a challenge for LLMs in generating precise responses (Chen et al., 2024b; Asai et al., 2024b). + +Many RAG models focus on building modular RAG pipelines to enhance retrieval performance (Gao et al., 2024; Asai et al., 2024a). These models primarily aim to refine the retrieved knowl + +edge by assessing the relevance of each document to the query and subsequently filtering out irrelevant ones (Yan et al., 2024; Asai et al., 2024a). However, the reranking model still requires feeding the remaining documents into LLMs, which means that query-unrelated content within a relevant document may still mislead the generators (Xu et al., 2024a). Some models address this problem by prompting LLMs to summarize query-relevant knowledge from the retrieved documents, thereby reducing the influence of irrelevant information (Vig et al., 2022; Yu et al., 2024a; Xu et al., 2024a). This summarization approach often incorporates information from unrelated documents as part of the summaries, resulting in the introduction of noise. Both the reranking and summarization modules have advantages for knowledge refinement. However, in existing RAG systems, these modules are typically modeled separately by prompting the same LLMs. + +This paper presents RankCoT, a knowledge refinement method that combines the strengths of both ranking and summarization to effectively enhance the process for retrieval result refinement. As shown in Figure 1, we feed both the query and all retrieved documents into the RankCoT model, which incorporates reranking signals in generating CoT-based summarization as knowledge refinements, thereby aiding LLMs in generating more accurate responses for answering the given query. During training the RankCoT model, we independently feed the query and retrieved document to the LLM, asking it to generate several Chain-of-Thought (CoT) responses to answer the question, which can be considered as summarization results. We then design the self-refinement model to prompt LLMs to answer the question according to these sampled CoTs, helping to refine the CoT results for more effective training. If the refined CoT contains the ground truth answer, it is considered a positive refinement result, while those that do not contain the ground truth answer are considered negative refinements. + +Our experiments demonstrate that RankCoT outperforms all baseline models, achieving over a $2\%$ improvement. Notably, RankCoT proves effective across LLMs of various scales. It generates shorter knowledge refinement results compared to both reranking and summarization methods, while enhancing the response accuracy of generator. Further analysis reveals that RankCoT successfully incorporates ground truth answers into the knowl + +edge refinement results, while also including more query-relevant content. Additionally, RankCoT effectively extracts crucial semantics from the retrieved documents and alleviates the conflict between retrieved contents and internal knowledge. + +# 2 Related Work + +Retrieval-Augmented Generation (RAG) aims to enhance Large Language Models (LLMs) by enabling them to access external knowledge bases, providing up-to-date information during the generation process (Shi et al., 2024; Ram et al., 2023). This approach has demonstrated promising results across various NLP tasks, including open-domain question answering (Izacard et al., 2023), code generation (Zhou et al., 2023), and dialogue (Shuster et al., 2022). In these RAG models, retrieved documents are typically used as context to assist LLMs in generating more accurate responses (Ram et al., 2023). However, the conflict between the external knowledge and the parametric memory of LLMs often undermines the effectiveness of current RAG systems (Asai et al., 2024b; Xie et al., 2024; Chen et al., 2024b). + +To mitigate the potentially negative impact of retrieved knowledge, existing models focus on refining the external knowledge through various modules designed to help LLMs generate more precise responses. Earlier works concentrate on reranking the retrieved documents (Yu et al., 2023; Shi et al., 2024; Yu et al., 2024b), while others employ query-focused summarization techniques (Vig et al., 2022; Xu et al., 2023) to reduce noise. However, reranking models often overlook noise within individual passages, and summarization models may fail to account for query-document relevance, sometimes incorporating misleading content in the summarization results. Chain-of-Note (Yu et al., 2024a) attempts to instruct LLMs to generate query-related notes when answering a given query. This model incorporates the knowledge refinement process into the reasoning stage (Wei et al., 2022) and heavily relies on the capabilities of LLMs, which may limit its applicability in RAG systems (Gao et al., 2024). + +Modular RAG systems (Gao et al., 2024; Xu et al., 2024c) focus on refining external knowledge through different modules implemented by LLMs, which have become a key trend in the RAG area. For instance, Self-RAG (Asai et al., 2024a) uses different tags for adaptive retrieval (Jiang et al., 2023) and self-reflection to refine knowledge. Some ap + +proaches also focus on reformulating queries to identify more useful documents for answering questions (Yan et al., 2024; Trivedi et al., 2023). Yan et al. (2024) introduce a retrieval evaluator that acts as a judge to trigger query reformulation, search, and knowledge refinement actions to supply more accurate evidence for generation. + +To further improve the performance of modular RAG systems, these models focus on fine-tuning various components of the RAG framework. Some efforts aim to align the information needs between the retriever and the generator by optimizing the retrievers based on feedback from the generation models (Yu et al., 2023; Shi et al., 2024; Izacard and Grave, 2021). Lin et al. (2024) adapt LLMs within the RAG setting by constructing instruction-tuning data for Supervised Fine-Tuning (SFT), enabling the models to better leverage the retrieved documents. Additionally, Li et al. (2024) use Direct Preference Optimization (DPO) (Rafailov et al., 2024) to jointly optimize the modules in a RAG system, aligning their data preferences. + +# 3 Methodology + +As illustrated in Figure 2, this section introduces the RankCoT method. First, we introduce the preliminary of knowledge refinement in Retrieval-Augmented Generation (RAG) systems (Sec. 3.1). And then we describe how to optimize LLMs to produce more effective chain-of-thoughts for knowledge refinement (Sec. 3.2). + +# 3.1 Preliminary of Knowledge Refinement in Retrieval-Augmented Generation Systems + +Given a query $q$ and a set of retrieved documents $D = \{d_{1}, d_{2}, \ldots, d_{n}\}$ , vanilla RAG system (Ram et al., 2023) uses retrieved documents as context and leverages the in-context learning method to help the generation model $\mathcal{M}_{\mathrm{Gen}}$ produce the answer $y_{\mathrm{Gen}}$ : + +$$ +(q, D) \rightsquigarrow \mathcal {M} _ {\text {G e n}} \rightsquigarrow y _ {\text {G e n}}. \tag {1} +$$ + +Instead of directly feeding retrieved documents to the generation model $(\mathcal{M}_{\mathrm{Gen}})$ , some RAG models (Gao et al., 2024; Asai et al., 2024a) design various modules to refine retrieved documents $D$ : + +$$ +(q, D) \rightsquigarrow \mathcal {M} _ {\mathrm {K R}} \rightsquigarrow y _ {\mathrm {K R}}. \tag {2} +$$ + +The refined knowledge $y_{\mathrm{KR}}$ is then passed to the generation model to mitigate the negative impact + +of retrieval noise: + +$$ +\left(q, y _ {\mathrm {K R}}\right)\rightsquigarrow \mathcal {M} _ {\text {G e n}} \rightsquigarrow y _ {\text {G e n}}. \tag {3} +$$ + +In the rest of this subsection, we will introduce different methods for implementing the knowledge refinement model $\mathcal{M}_{\mathrm{KR}}$ in Eq. 2, including reranking, summarization, and RankCoT. + +Reranking. Following previous work (Asai et al., 2024a), we prompt LLMs to evaluate the relevance of the $i$ -th retrieved document $d_{i}$ with respect to the query $q$ , and output a binary label $y_{\mathrm{Rerank}}^{i}$ for filtering out noisy documents: + +$$ +y _ {\text {R e r a n k}} ^ {i} = \operatorname {L L M} \left(\operatorname {I n s t r u c t} _ {\text {R e r a n k}}, q, d _ {i}\right), \tag {4} +$$ + +where $\mathrm{Instruct}_{\mathrm{Rerank}}$ prompts the LLM to assess the relevance between $q$ and $d_{i}$ . The prediction label $y_{\mathrm{Rerank}}^{i}$ can be "YES" or "NO", indicating whether the $i$ -th document $d_{i}$ is relevant or irrelevant to the query $q$ . We then retain the documents predicted as "YES" and construct the filtered document set $\{d_1,\ldots ,d_k\}$ . The knowledge refinement result $y_{\mathrm{KR}}$ is then represented as: + +$$ +y _ {\mathrm {K R}} = d _ {1} \oplus \dots \oplus d _ {k}, \tag {5} +$$ + +where $\oplus$ is the concatenation operation. + +Summarization. Another approach for knowledge refinement is summarization, which aims to extract query-related content from the retrieved documents (Vig et al., 2022). The knowledge refinement result can be obtained as: + +$$ +y _ {\mathrm {K R}} = \operatorname {L L M} \left(\operatorname {I n s t r u c t} _ {\text {S u m}}, q, D\right), \tag {6} +$$ + +where $\mathrm{InstructSum}$ is the instruction prompting the LLM to generate a summary. Unlike reranking, summarization directly generates the refined knowledge, avoiding the need to feed raw documents to the generation model $\mathcal{M}_{\mathrm{Gen}}$ . + +RankCoT. RankCoT further incorporates a Chain-of-Thought (CoT) (Wei et al., 2022) into the knowledge refinement process: + +$$ +y _ {\mathrm {K R}} = \operatorname {L L M} \left(\operatorname {I n s t r u c t} _ {\mathrm {C o T}}, q, D\right), \tag {7} +$$ + +where $\mathrm{Instruct}_{\mathrm{CoT}}$ is the instruction that prompts the LLM to generate CoT. RankCoT incorporates the chain-of-thought reasoning as the knowledge refinement result $y_{\mathrm{KR}}$ to extract relevant knowledge from retrieved documents $D$ , thereby assisting RAG models in answering the query. Unlike summarization, RankCoT integrates the reranking mechanism during the chain-of-thought generation (Sec. 3.2) to mitigate the influence of noisy documents (Liu et al., 2024; Xie et al., 2024). + +![](images/8d59c0901d5d77b193b8b8e9d1195daddb99078e0600d7b67bebfa322320cbd4.jpg) +Figure 2: Illustration of RankCoT. + +# 3.2 Knowledge Refinement through Ranking Chain-of-Thoughts + +To generate tailored knowledge refinement results $y_{\mathrm{KR}}$ for RAG modeling, RankCoT optimizes the LLM $(\mathcal{M})$ by incorporating reranking into the CoT generation process. Furthermore, we introduce a self-reflection method to further refine the CoT results, mitigating the risk of overfitting to undesired CoT patterns during training RankCoT. + +# 3.2.1 Reranking Modeling in CoT Generation + +To learn the query-document relevance, we feed each document $d_{i}$ into the LLM $(\mathcal{M})$ and sample one CoT output $y_{\mathrm{CoT}}(d_i)$ : + +$$ +y _ {\mathrm {C o T}} \left(d _ {i}\right) \sim \mathcal {M} \left(q, d _ {i}\right). \tag {8} +$$ + +Next, we gather all generated CoT results from each document in the retrieved document set $D$ to form the candidate CoT set $Y_{\mathrm{CoT}}$ : + +$$ +Y _ {\mathrm {C o T}} = \left\{y _ {\mathrm {C o T}} \left(d _ {1}\right), \dots , y _ {\mathrm {C o T}} \left(d _ {n}\right) \right\}. \tag {9} +$$ + +We treat the CoT result $y_{\mathrm{CoT}} \in Y_{\mathrm{CoT}}$ that contains the ground truth answer as the positive $y_{\mathrm{CoT}}^{+}$ , while the result that does not contain the ground truth answer is regarded as the negative $y_{\mathrm{CoT}}^{-}$ . + +Finally, we can optimize the LLM $(\mathcal{M})$ to assign higher generation probabilities to positive knowledge refinement results $y_{\mathrm{CoT}}^{+}$ than the negative ones $y_{\mathrm{CoT}}^{-}$ . The training process is implemented with the Direct Preference Optimization + +(DPO) method (Rafailov et al., 2024): + +$$ +\mathcal {L} = - \mathbb {E} _ {\left(q, y _ {\mathrm {C o T}} ^ {+}, y _ {\mathrm {C o T}} ^ {-}\right) \sim \mathcal {T}} \left[ \log \sigma \left(\beta \log \right. \right. +$$ + +$$ +\left. \frac {\mathcal {M} \left(y _ {\mathrm {C o T}} ^ {+} \mid q , D\right)}{\mathcal {M} ^ {\operatorname {R e f}} \left(y _ {\mathrm {C o T}} ^ {+} \mid q , D\right)} - \beta \log \left. \frac {\mathcal {M} \left(y _ {\mathrm {C o T}} ^ {-} \mid q , D\right)}{\mathcal {M} ^ {\operatorname {R e f}} \left(y _ {\mathrm {C o T}} ^ {-} \mid q , D\right)}\right) \right], \tag {10} +$$ + +where $\beta$ is a hyperparameter and $\sigma$ is the Sigmoid function. $\mathcal{M}^{\mathrm{Ref}}$ is the reference model, which remains frozen during training. + +In DPO training, we input all documents $D$ into the model $\mathcal{M}$ and aim to assign a higher probability to the positive knowledge refinement result $y_{\mathrm{CoT}}^{+}$ , which is individually generated from one of the retrieved documents. This guides the model $\mathcal{M}$ to rerank the retrieved documents $D$ when generating chain-of-thought as the refinement. + +# 3.2.2 CoT Refinement through Self-Reflection + +While these generated CoTs help the RAG model generate more accurate answers, the generated CoT results of LLMs may contain undesired patterns, such as "According to the document" and "the reasoning process is". These training patterns can mislead the LLM $(\mathcal{M})$ to overfit these CoT results during training (Gudibande et al., 2023). To address this problem, RankCoT proposes a self-reflection method to refine the CoT results $Y_{\mathrm{CoT}}$ . + +Specifically, we first sample the CoT outputs $\tilde{y}_{\mathrm{CoT}}(d_i)$ by feeding the given query $q$ and each + +document $d_{i}$ to the LLM: + +$$ +\tilde {y} _ {\mathrm {C o T}} \left(d _ {i}\right) \sim \mathcal {M} \left(\text {I n s t r u c t} _ {\mathrm {C o T}}, q, d _ {i}\right), \tag {11} +$$ + +where $\mathrm{Instruct}_{\mathrm{CoT}}$ is used to prompt the LLM to generate a chain-of-thought. Then the CoT result $\tilde{y}_{\mathrm{CoT}}(d_i)$ is refined as $y_{\mathrm{CoT}}(d_i)$ by using the same LLM $(\mathcal{M})$ : + +$$ +y _ {\mathrm {C o T}} \left(d _ {i}\right) = \mathcal {M} \left(\text {I n s t r u c t} _ {\text {R e f}}, q, \tilde {y} _ {\mathrm {C o T}} \left(d _ {i}\right)\right), \tag {12} +$$ + +where the instruction InstructRef prompts the LLM $(\mathcal{M})$ to answer the given query $q$ based on the initial CoT result $\tilde{y}_{\mathrm{CoT}}(d_i)$ . Such a self-reflection mechanism helps to extract more query-related contents from the initial CoT $\tilde{y}_{\mathrm{CoT}}(d_i)$ , producing higher-quality data to optimize LLMs. Finally, we collect the refined CoT results to form $Y_{\mathrm{CoT}}(d_i) = \{y_{\mathrm{CoT}}(d_1), \dots, y_{\mathrm{CoT}}(d_n)\}$ , which is used to train the LLM through DPO (Eq. 10). + +# 4 Experimental Methodology + +In this section, we describe the datasets, baselines, evaluation metrics, and implementation details in our experiments. More experimental details are shown in Appendix A.4. + +Datasets. In our experiments, we follow previous work (Lin et al., 2024) and utilize the instruction tuning datasets to train and evaluate RAG models. For all datasets and baselines, we use BGE-large (Chen et al., 2024a) to retrieve documents from the MS MARCO V2.1 document collection (Bajaj et al., 2016). We select six datasets for evaluation, including NQ (Kwiatkowski et al., 2019), HotpotQA (Yang et al., 2018), Trivia QA (Joshi et al., 2017), PopQA (Mallen et al., 2023), ASQA (Stelmakh et al., 2022), and MARCO QA (Bajaj et al., 2016), which require models to retrieve factual knowledge or conduct more complex reasoning to help answer the given query. All data statistics are shown in Table 1. + +Baselines. In our experiments, we compare RankCoT with the Vanilla RAG (No Refinement) model and three knowledge refinement models, including Rerank, Summary, and CoT, which are described in Sec. 3.1. For the vanilla RAG model, we follow previous work (Ram et al., 2023) and feed 5 retrieved documents as context to answer the question. For the Rerank model, we prompt the LLM to evaluate the relevance between the query and retrieved documents (Asai et al., 2024a; Li et al., 2024). If the document is relevant to the + +
Split#QueryTasks
Train15,444Open-Domain QA
8,527Reasoning
Dev1,752Open-Domain QA
912Reasoning
Test20,294Open-Domain QA
+ +Table 1: Data Statistics. + +question, it outputs "YES" and retains the document, otherwise, it outputs "NO" and discards the document. The Summary model and CoT model prompt the LLM to extract query-related knowledge from retrieved documents using summarization and Chain-of-Thought (Wei et al., 2022) formats to conclude query-related knowledge from retrieved documents. + +Evaluation Metrics. Following Xu et al. (2024b), we utilize Rouge-L as evaluation metric for MARCO QA task. Following Gao et al. (2023), we utilize String-EM as evaluation metric for ASQA. For other tasks, we use the Accuracy metric for evaluation. + +Implementation Details. We implement our RankCoT model using Llama3-8B-Instruct (Touvron et al., 2023) as the backbone model. To construct a training dataset for DPO training, we ask Llama3-8B-Instruct to generate CoTs using 10 retrieved documents independently and use the same model to refine CoTs. During training, we feed 5 relevant documents as external knowledge and ask the LLM to reproduce the refined CoT results. We use LoRA (Hu et al., 2022) method to fine-tune Llama3-8B-Instruct, with $\beta$ set to 0.1 and the learning rate set to 2e-5. + +For the RAG model, we concatenate the generated CoT with the query to let Llama3-8B-Instruct generate the final answer. In addition, we also use LLMs of different scales, such as MiniCPM3-4B (Hu et al., 2024) and Qwen2.5-14B-Instruct (Yang et al., 2024), to build the RAG model and evaluate the generalization ability of RankCoT. + +# 5 Evaluation Result + +In this section, we first evaluate the performance of various RAG methods, followed by ablation studies to examine the impact of self reflection module and different training strategies. We then investigate the characteristics of RankCoT by analyzing the knowledge utilization capabilities of RAG models + +
MethodNQ (acc)HotpotQA (acc)TriviaQA (acc)PopQA (acc)ASQA (str-em)MARCO (rouge)Avg.
Llama3-8B-Instruct
No Refinement45.6829.4382.8535.6038.7920.7342.18
Rerank46.1830.3083.5136.2039.9220.7242.81
Summary44.2728.0582.0933.6737.8122.6741.32
CoT45.3326.3681.4534.1340.2519.5241.17
RankCoT47.4132.2185.1841.1741.0220.8444.64
MiniCPM3-4B
No Refinement42.5124.9380.9132.5324.3113.5536.46
RankCoT48.7833.1385.2036.8735.8524.5944.07
Qwen2.5-14B-Instruct
No Refinement47.6629.7079.4936.9744.7318.5042.84
RankCoT49.9833.9186.6844.4541.9424.6246.93
+ +using different knowledge refinement models. We also examine the effectiveness of the refined knowledge generated by RankCoT through answering consistency in Appendix A.3. The case study is conducted in Appendix A.7. + +# 5.1 Overall Performance + +This section presents the knowledge refinement performance of different models, as shown in Table 2. Additional baseline comparison results are shown in Appendix A.2. + +The evaluation results reveal that these three knowledge refinement models, Rerank, Summary, and CoT, show distinct performance. Specifically, Rerank exhibits a slight improvement, while both Summary and CoT lead to a decrease in RAG performance. This highlights the challenge of effectively refining knowledge for RAG modeling. In contrast, RankCoT demonstrates a $2.5\%$ improvement over vanilla RAG model, indicating its effectiveness in providing more meaningful refinements that help LLMs better answer questions. Furthermore, RankCoT outperforms the Rerank model with a $1.8\%$ improvement and avoids the need to feed raw passages into the LLM twice for knowledge refinement and question answering. + +Then we present the performance of RankCoT by applying it to different RAG systems implemented with LLMs of various scales. The results indicate that RankCoT maintains its effectiveness across different RAG configurations, yielding a $7.6\%$ improvement over the MiniCPM3-4B-based RAG model and a $4.1\%$ improvement over + +Table 2: Overall Performance of RAG System with Different Knowledge Refinement Models. We use Llama3-8B-Instruct as the backbone model for different knowledge refinement models and apply RankCoT to the RAG system, which is implemented with Llama3-8B-Instruct, MiniCPM3-4B, and Qwen2.5-14B-Instruct. + +
MethodNQ (acc)HotpotQA (acc)TriviaQA (acc)Avg.
Vanilla RAG45.6829.4382.8552.65
Inference w/ Finetuned QA Model
Rerank45.9629.8883.0452.96
Summary38.4625.2976.1345.63
CoT41.6333.2383.2452.70
SFT Training
Rerank47.0231.2184.1654.13
Summary43.3628.3982.2651.34
CoT43.4327.2382.8051.15
DPO Training
Rerank46.8030.7084.7054.07
Summary46.6330.6183.9553.73
RankCoT47.4132.2185.1854.97
w/o Reflect46.7030.5983.8253.70
+ +Table 3: Ablation Study. Both SFT and DPO methods optimize knowledge refinement models using self-reflection labels. RankCoT w/o Reflect refers to that the RankCoT model is optimized using unrefined CoT. + +the RAG model implemented with Qwen2.5-14B-Instruct. These findings demonstrate that RankCoT has strong generalization ability in knowledge refinement, enabling LLMs of different scales to effectively leverage external knowledge. For more experiments, please see Appendix A.5. + +# 5.2 Ablation Study + +We conduct ablation studies to evaluate the effectiveness of various training strategies. + +As shown in Table 3, we first conduct the approach from prior work (Lin et al., 2024), where a fine-tuned QA model is used for knowledge re + +
MethodHas-AnswerMiss-AnswerInternal Knowledge
NQHotpotQATriviaQANQHotpotQATriviaQANQHotpotQATriviaQA
LLM w/o RAG46.4142.9980.486.5114.7346.04100.0100.0100.0
Vanilla RAG63.4557.6988.762.418.8919.7077.3067.8990.80
Rerank64.0957.0988.743.1410.8727.4178.2068.2891.24
Summary61.4053.2087.203.0210.1925.2776.8963.2389.93
CoT62.9051.7687.532.537.6922.9177.1959.7789.38
RankCoT65.4458.9290.494.1013.0330.8480.4270.8192.61
+ +Table 4: RAG Performance by Using Different Knowledge Refinement Models. We conduct three testing scenarios to evaluate the knowledge usage of RAG systems, including Has-Answer, Miss-Answer and Internal Knowledge. + +finement. We then train several knowledge refinement models—Rerank, Summary, and CoT—using the self-reflection mechanism introduced by RankCoT. Specifically, the self-reflection mechanism involves feeding the knowledge refinement results into LLMs to generate self-reflection results based on these inputs. In this setup, SFT methods select self-reflection results containing ground truth answers to train knowledge refinement models, while DPO methods select both positive and negative responses—those that contain ground truth answers and those that do not—for training. + +After fine-tuning with QA supervision, the LLM is able to generate knowledge refinement results using different prompts. However, the evaluation results illustrate that these QA models present limited effectiveness compared to vanilla RAG model. We then train the knowledge refinement models using training signals refined by the LLM itself. Among the SFT-based models, Rerank achieves the best performance, illustrating that the reranking signals can be easily learned by LLMs through SFT. Using the DPO training method, both Summary and RankCoT show significant improvements over these knowledge refinement models using the SFT strategy. Furthermore, RankCoT outperforms all knowledge refinement models, demonstrating its effectiveness in producing effective knowledge refinement results to help LLMs generate more accurate answers. By replacing self-refined CoTs with the raw CoT outcomes during DPO training, RankCoT achieves a $1.3\%$ decline, showing the effectiveness of our self-reflection mechanism. + +# 5.3 Knowledge Usage Performance of Different Refinement Models + +In this experiment, we evaluate the ability of RankCoT to assist RAG models in leveraging external knowledge to generate final answers. We compare RankCoT with three knowledge refinement models: Rerank, Summary, and CoT. + +As shown in Table 4, we conduct three testing + +The internal knowledge scenario is a scenario in which the retrieval of knowledge models from external sources is not possible. This scenario involves cases where the retrieved documents contain the correct (golden) answer. This scenario evaluates whether the knowledge refinement model can effectively extract key information from these documents to aid the LLM in answering the question. The Miss-Answer scenario, on the other hand, deals with cases where the retrieved documents do not include the golden answer. This scenario further tests the ability of the knowledge refinement models to minimize the impact of retrieved noise. Finally, the Internal Knowledge scenario examines the ability of different knowledge refinement models to handle conflicts between internal and external knowledge. + +As shown in the evaluation results, RankCoT outperforms all knowledge refinement models across all datasets in the Has-Answer scenario. This demonstrates the effectiveness of RankCoT in incorporating more query-relevant information from retrieved documents, thereby enhancing the accuracy of the RAG system in this scenario. In the Miss-Answer scenario, the performance of vanilla RAG models significantly drops compared to LLMs w/o RAG, indicating that query-irrelevant documents mislead LLMs into producing incorrect answers. However, the use of different knowledge refinement models mitigates this performance decline. Among these models, RankCoT exhibits the most substantial improvements, demonstrating its effectiveness in filtering out noisy information from retrieval and reducing the misleading information of irrelevant documents. In the internal knowledge scenario, knowledge refinement models-Rerank, Summary, and CoT-perform comparably or even worse than vanilla RAG model, illustrating that existing methods are less effective in addressing the knowledge conflict issue. In contrast, RankCoT outperforms these knowledge refinement models, demonstrating its ability to pro + +![](images/3aa402721b858f526fa817009d0069ad4e1b7ae2aed8e9e90a58905828895dbc.jpg) +(a) Similarity between Query (b) Hit Rate of Ground Truth and Refined Knowledge. Answers. + +![](images/ab2fa738fec11380db252f4509ce41e93938623a914d582297e17fb35744f2e2.jpg) +Figure 3: Quality of Refined Knowledge Generated by Different Models. In Figure 3(a), we first estimate the text similarity between the query and the knowledge refinement results using the BGE model (Chen et al., 2024a). Then, we calculate the hit rate of these knowledge refinement results in Figure 3(b), which evaluates whether the ground truth answers are included in the knowledge refinement results. + +![](images/f542abced1f7dc0225080c844fb87046faccec5ca008a9b20ef6a1db30d7bb7a.jpg) +(a) Average Length. + +![](images/0dbc20f9d7153033b7a89b2b94b96f34b06ca799a4d17648b98bedf914350d83.jpg) +(b) Length Change Ratio. +Figure 4: The Length of Knowledge Refinement Results Produced by Different Models. We first present the average length of the refinement results in Figure 4(a). Then, the length change ratio relative to vanilla LLMs is illustrated in Figure 4(b). + +vide more tailored knowledge refinement results. The RankCoT-produced knowledge refinement results effectively alleviate knowledge conflicts, aiding LLMs in better utilizing both internal and external knowledge. + +# 5.4 Characteristics of the Refined Knowledge Produced by RankCoT + +This experiment further explores the characteristics of RankCoT-produced knowledge refinement results by estimating both the quality and length of the refined knowledge. We conduct the experiment on the NQ and TriviaQA datasets, specifically in the Has-answer test scenario, where the retrieved documents contain the ground truth answers. + +Refinement Quality. As shown in Figure 3, we evaluate the quality of the knowledge refinement results based on query relevance and the hit rate of the golden answer. Specifically, the similarity scores between the query and the refined knowledge generated by three different knowledge refinement mod + +els are presented in Figure 3(a). RankCoT achieves the highest similarity score with the query, demonstrating its effectiveness in retaining more query-related information from the retrieved documents. Furthermore, we show the hit rate of the ground truth answer in Figure 3(b). As indicated by the evaluation results, Rerank achieves the highest hit rates, while Summary performs the worst. This outcome likely stems from the fact that the Rerank model only selects the most relevant document, whereas the Summary model must extract key information, inevitably discarding some of the relevant contents that contain the ground truth answers. Although RankCoT is also a summarization-style knowledge refinement model, it achieves higher hit rates, showing that RankCoT can capture more ground truth answers in its refinement results. + +Length of Knowledge Refinement. Subsequently, we present the results of knowledge refinement lengths for different models in Figure 4. As shown in Figure 4(a), the summarization-style knowledge refinement methods, Summary and RankCoT, significantly reduce the length of the refined knowledge compared to the Rerank model. Notably, RankCoT achieves the shortest refinement length, demonstrating its effectiveness in minimizing the consumption of prompt inputs for LLMs (Mu et al., 2023) while helping to reduce inference time (please see Appendix A.6 for related experiments). Additionally, we investigate the length change ratio across different training methods in Figure 4(b). As shown in the results, these SFT methods generally result in shorter knowledge refinement outputs, illustrating that SFT encourages the summarization-style knowledge refinement model to overfit training signals (Li et al., 2024). In contrast, the DPO training method helps these knowledge refinement models produce longer results, facilitating more flexible responses that incorporate more crucial knowledge. + +# 6 Conclusion + +This paper proposes RankCoT, a knowledge refinement method that leverages the strengths of both ranking and summarization to effectively refine the knowledge from retrieval results, thereby aiding LLMs in generating more accurate responses. Our experimental studies show that RankCoT can effectively refine external knowledge and balance the utilization of internal and external knowledge. In-depth analysis reveals that the CoT generated by + +our method has a high similarity to the query and a high ground truth answer hit rate. In addition, RankCoT shows its effectiveness in minimizing the consumption of prompt inputs for LLMs while helping to reduce inference time. + +# Limitations + +Although RankCoT demonstrates its effectiveness in refining retrieved knowledge for RAG systems, the quality of the refinement is still constrained by the capabilities of LLMs. Specifically, RankCoT is optimized using the DPO method, which relies on LLMs to generate meaningful chosen and rejected pairs during optimization. Therefore, the generation of meaningful preference pairs for optimization still heavily depends on the performance of the LLMs. + +# Acknowledgments + +This work is partly supported by the Natural Science Foundation of China under Grant (No. 62206042 and No. 62137001), CCF-zhipu Large Model Innovation Fund (No. 202403), the Joint Funds of Natural Science Foundation of Liaoning Province (No. 2023-MSBA-081), and the Fundamental Research Funds for the Central Universities under Grant (No. N2416012). This work is also supported by the AI9Stars community. + +The authors would like to thank Weiqing Yang for his help in drawing figures during the writing process of the paper, and Sijia Yao for her careful and patient review of the final draft of the paper and her suggestions for revision. + +# References + +Josh Achiam, Steven Adler, Sandhini Agarwal, Lama Ahmad, Ilge Akkaya, Florencia Leoni Aleman, Diogo Almeida, Janko Altenschmidt, Sam Altman, Shyamal Anadkat, et al. 2023. Gpt-4 technical report. ArXiv preprint. +Shourya Aggarwal, Divyanshu Mandowara, Vishwajeet Agrawal, Dinesh Khandelwal, Parag Singla, and Dinesh Garg. 2021. *Explanations for Common-senseQA: New Dataset and Models*. In *Proceedings of ACL*, pages 3050-3065. +Aida Amini, Saadia Gabriel, Shanchuan Lin, Rik Koncel-Kedziorski, Yejin Choi, and Hannaneh Hajishirzi. 2019. MathQA: Towards interpretable math word problem solving with operation-based formalisms. In Proceedings of NAACL-HLT, pages 2357-2367. + +Akari Asai, Zeqiu Wu, Yizhong Wang, Avirup Sil, and Hannaneh Hajishirzi. 2024a. Self-RAG: Learning to retrieve, generate, and critique through self-reflection. In Proceedings of ICLR. +Akari Asai, Zexuan Zhong, Danqi Chen, Pang Wei Koh, Luke Zettlemoyer, Hannaneh Hajishirzi, and Wentau Yih. 2024b. Reliable, adaptable, and attributable language models with retrieval. ArXiv preprint. +Payal Bajaj, Daniel Campos, Nick Craswell, Li Deng, Jianfeng Gao, Xiaodong Liu, Rangan Majumder, Andrew McNamara, Bhaskar Mitra, Tri Nguyen, et al. 2016. Ms marco: A human generated machine reading comprehension dataset. ArXiv preprint. +Jonathan Berant, Andrew Chou, Roy Frostig, and Percy Liang. 2013. Semantic parsing on Freebase from question-answer pairs. In Proceedings of EMNLP, pages 1533-1544. +Tom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel M. Ziegler, Jeffrey Wu, Clemens Winter, Christopher Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. 2020. Language models are few-shot learners. In Proceedings of NeurIPS. +Jianlv Chen, Shitao Xiao, Peitian Zhang, Kun Luo, Defu Lian, and Zheng Liu. 2024a. Bge m3-embedding: Multi-lingual, multi-functionality, multi-granularity text embeddings through self-knowledge distillation. ArXiv preprint. +Jiawei Chen, Hongyu Lin, Xianpei Han, and Le Sun. 2024b. Benchmarking large language models in retrieval-augmented generation. In Proceedings of AAAI, 16, pages 17754-17762. +Karl Cobbe, Vineet Kosaraju, Mohammad Bavarian, Mark Chen, Heewoo Jun, Lukasz Kaiser, Matthias Plappert, Jerry Tworek, Jacob Hilton, Reiichiro Nakano, et al. 2021. Training verifiers to solve math word problems. ArXiv preprint. +Qingxiu Dong, Lei Li, Damai Dai, Ce Zheng, Jingyuan Ma, Rui Li, Heming Xia, Jingjing Xu, Zhiyong Wu, Tianyu Liu, et al. 2023. A survey on in-context learning. ArXiv preprint. +Tianyu Gao, Howard Yen, Jiatong Yu, and Danqi Chen. 2023. Enabling large language models to generate text with citations. In Proceedings of EMNLP, pages 6465-6488. +Yunfan Gao, Yun Xiong, Meng Wang, and Haofen Wang. 2024. Modular rag: Transforming rag systems into lego-like reconfigurable frameworks. ArXiv preprint. + +Mor Geva, Daniel Khashabi, Elad Segal, Tushar Khot, Dan Roth, and Jonathan Berant. 2021. Did aristotle use a laptop? a question answering benchmark with implicit reasoning strategies. Transactions of the Association for Computational Linguistics, pages 346-361. +Arnav Gudibande, Eric Wallace, Charlie Snell, Xinyang Geng, Hao Liu, Pieter Abbeel, Sergey Levine, and Dawn Song. 2023. The false promise of imitating proprietary llms. ArXiv preprint. +Kelvin Guu, Kenton Lee, Zora Tung, Panupong Pasupat, and Ming-Wei Chang. 2020. Retrieval augmented language model pre-training. In Proceedings of ICML, pages 3929-3938. +Edward J Hu, Phillip Wallis, Zeyuan Allen-Zhu, Yanzhi Li, Shean Wang, Lu Wang, Weizhu Chen, et al. 2022. Lora: Low-rank adaptation of large language models. In Proceedings of ICLR. +Shengding Hu, Yuge Tu, Xu Han, Chaoqun He, Ganqu Cui, Xiang Long, Zhi Zheng, Yewei Fang, Yuxiang Huang, Weilin Zhao, et al. 2024. Minicpm: Unveiling the potential of small language models with scalable training strategies. ArXiv preprint. +Gautier Izacard and Edouard Grave. 2021. Distilling knowledge from reader to retriever for question answering. In Proceedings of ICLR. +Gautier Izacard, Patrick S. H. Lewis, Maria Lomeli, Lucas Hosseini, Fabio Petroni, Timo Schick, Jane Dwivedi-Yu, Armand Joulin, Sebastian Riedel, and Edouard Grave. 2023. Atlas: Few-shot learning with retrieval augmented language models. Journal of Machine Learning Research, pages 251:1-251:43. +Zhengbao Jiang, Frank F Xu, Luyu Gao, Zhiqing Sun, Qian Liu, Jane Dwivedi-Yu, Yiming Yang, Jamie Callan, and Graham Neubig. 2023. Active retrieval augmented generation. In Proceedings of EMNLP, pages 7969-7992. +Mandar Joshi, Eunsol Choi, Daniel Weld, and Luke Zettlemoyer. 2017. TriviaQA: A large scale distantly supervised challenge dataset for reading comprehension. In Proceedings of ACL, pages 1601-1611. +Vladimir Karpukhin, Barlas Oguz, Sewon Min, Patrick Lewis, Ledell Wu, Sergey Edunov, Danqi Chen, and Wen-tau Yih. 2020. Dense passage retrieval for open-domain question answering. In Proceedings of EMNLP, pages 6769-6781. +Tom Kwiatkowski, Jennimaria Palomaki, Olivia Redfield, Michael Collins, Ankur Parikh, Chris Alberti, Danielle Epstein, Illia Polosukhin, Jacob Devlin, Kenton Lee, Kristina Toutanova, Llion Jones, Matthew Kelcey, Ming-Wei Chang, Andrew M. Dai, Jakob Uszkoreit, Quoc Le, and Slav Petrov. 2019. Natural questions: A benchmark for question answering research. Transactions of the Association for Computational Linguistics, pages 452-466. + +Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Veselin Stoyanov, and Luke Zettlemoyer. 2020a. BART: Denoising sequence-to-sequence pre-training for natural language generation, translation, and comprehension. In Proceedings of ACL, pages 7871-7880. +Patrick S. H. Lewis, Ethan Perez, Aleksandra Pik-tus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich Kuttler, Mike Lewis, Wen-tau Yih, Tim Rocktäschel, Sebastian Riedel, and Douwe Kiela. 2020b. Retrieval-augmented generation for knowledge-intensive NLP tasks. In Proceedings of NeurIPS. +Xinze Li, Sen Mei, Zhenghao Liu, Yukun Yan, Shuo Wang, Shi Yu, Zheni Zeng, Hao Chen, Ge Yu, Zhiyuan Liu, et al. 2024. Rag-ddr: Optimizing retrieval-augmented generation using differentiable data rewards. ArXiv preprint. +Xi Victoria Lin, Xilun Chen, Mingda Chen, Weijia Shi, Maria Lomeli, Richard James, Pedro Rodriguez, Jacob Kahn, Gergely Szilvasy, Mike Lewis, Luke Zettlemoyer, and Wen tau Yih. 2024. RA-DIT: Retrieval-augmented dual instruction tuning. In Proceedings of ICLR. +Wang Ling, Dani Yogatama, Chris Dyer, and Phil Blunson. 2017. Program induction by rationale generation: Learning to solve and explain algebraic word problems. In Proceedings of ACL, pages 158-167. +Nelson F Liu, Kevin Lin, John Hewitt, Ashwin Paranjape, Michele Bevilacqua, Fabio Petroni, and Percy Liang. 2024. Lost in the middle: How language models use long contexts. Transactions of the Association for Computational Linguistics, pages 157-173. +Alex Mallen, Akari Asai, Victor Zhong, Rajarshi Das, Daniel Khashabi, and Hannaneh Hajishirzi. 2023. When not to trust language models: Investigating effectiveness of parametric and non-parametric memories. In Proceedings of ACL, pages 9802-9822. +Jesse Mu, Xiang Lisa Li, and Noah Goodman. 2023. Learning to compress prompts with gist tokens. In Proceedings of NeurIPS. +Rafael Rafailov, Archit Sharma, Eric Mitchell, Christopher D Manning, Stefano Ermon, and Chelsea Finn. 2024. Direct preference optimization: Your language model is secretly a reward model. In Proceedings of NeurIPS. +Ori Ram, Yoav Levine, Itay Dalmedigos, Dor Muhlgay, Amnon Shashua, Kevin Leyton-Brown, and Yoav Shoham. 2023. In-context retrieval-augmented language models. Transactions of the Association for Computational Linguistics, pages 1316-1331. +Weijia Shi, Sewon Min, Michihiro Yasunaga, Minjoon Seo, Richard James, Mike Lewis, Luke Zettlemoyer, and Wen-tau Yih. 2024. REPLUG: Retrievalaugmented black-box language models. In Proceedings of NAACL-HLT, pages 8371-8384. + +Kurt Shuster, Spencer Poff, Moya Chen, Douwe Kiela, and Jason Weston. 2021. Retrieval augmentation reduces hallucination in conversation. In Proceedings of EMNLP Findings, pages 3784-3803. +Kurt Shuster, Jing Xu, Mojtaba Komeili, Da Ju, Eric Michael Smith, Stephen Roller, Megan Ung, Moya Chen, Kushal Arora, Joshua Lane, et al. 2022. Blenderbot 3: a deployed conversational agent that continually learns to responsibly engage. *ArXiv* preprint. +Ivan Stelmakh, Yi Luan, Bhuwan Dhingra, and Ming-Wei Chang. 2022. ASQA: Factoid questions meet long-form answers. In Proceedings of EMNLP, pages 8273-8288. +Alon Talmor, Jonathan Herzig, Nicholas Lourie, and Jonathan Berant. 2019. CommonsenseQA: A question answering challenge targeting commonsense knowledge. In Proceedings of NAACL-HLT, pages 4149-4158. +Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothée Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, et al. 2023. Llama: Open and efficient foundation language models. ArXiv preprint. +Harsh Trivedi, Niranjan Balasubramanian, Tushar Khot, and Ashish Sabharwal. 2023. Interleaving retrieval with chain-of-thought reasoning for knowledge-intensive multi-step questions. In Proceedings of ACL, pages 10014-10037. +Jesse Vig, Alexander R. Fabbri, Wojciech Kryscinski, Chien-Sheng Wu, and Wenhao Liu. 2022. Exploring neural models for query-focused summarization. In *Findings of the Association for Computational Linguistics: NAACL*, pages 1455-1468. +Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, brian richter, Fei Xia, Ed H. Chi, Quoc V Le, and Denny Zhou. 2022. Chain of thought prompting elicits reasoning in large language models. In Advances in Neural Information Processing Systems. +Jian Xie, Kai Zhang, Jiangjie Chen, Renze Lou, and Yu Su. 2024. Adaptive chameleon or stubborn sloth: Revealing the behavior of large language models in knowledge conflicts. In Proceedings of ICLR. +Lee Xiong, Chenyan Xiong, Ye Li, Kwok-Fung Tang, Jialin Liu, Paul N. Bennett, Junaid Ahmed, and Arnold Overwijk. 2021. Approximate nearest neighbor negative contrastive learning for dense text retrieval. In Proceedings of ICLR. +Fangyuan Xu, Weijia Shi, and Eunsol Choi. 2024a. RE-COMP: Improving retrieval-augmented LMs with context compression and selective augmentation. In Proceedings of ICLR. +Ruochen Xu, Song Wang, Yang Liu, Shuohang Wang, Yichong Xu, Dan Iter, Pengcheng He, Chenguang Zhu, and Michael Zeng. 2023. Lmgqs: A large-scale + +dataset for query-focused summarization. In Proceedings of EMNLP Findings, pages 14764-14776. +Shicheng Xu, Liang Pang, Mo Yu, Fandong Meng, Huawei Shen, Xueqi Cheng, and Jie Zhou. 2024b. Unsupervised information refinement training of large language models for retrieval-augmented generation. ArXiv preprint. +Zhipeng Xu, Zhenghao Liu, Yibin Liu, Chenyan Xiong, Yukun Yan, Shuo Wang, Shi Yu, Zhiyuan Liu, and Ge Yu. 2024c. Activerag: Revealing the treasures of knowledge via active learning. ArXiv preprint. +Shi-Qi Yan, Jia-Chen Gu, Yun Zhu, and Zhen-Hua Ling. 2024. Corrective retrieval augmented generation. ArXiv preprint. +An Yang, Baosong Yang, Beichen Zhang, Binyuan Hui, Bo Zheng, Bowen Yu, Chengyuan Li, Dayiheng Liu, Fei Huang, Haoran Wei, et al. 2024. Qwen2.5 technical report. ArXiv preprint. +Yi Yang, Wen-tau Yih, and Christopher Meek. 2015. WikiQA: A challenge dataset for open-domain question answering. In Proceedings of EMNLP, pages 2013-2018. +Zhilin Yang, Peng Qi, Saizheng Zhang, Yoshua Bengio, William Cohen, Ruslan Salakhutdinov, and Christopher D. Manning. 2018. HotpotQA: A dataset for diverse, explainable multi-hop question answering. In Proceedings of EMNLP, pages 2369-2380. +Wenhao Yu, Hongming Zhang, Xiaoman Pan, Peixin Cao, Kaixin Ma, Jian Li, Hongwei Wang, and Dong Yu. 2024a. Chain-of-note: Enhancing robustness in retrieval-augmented language models. In Proceedings of EMNLP, pages 14672-14685. +Yue Yu, Wei Ping, Zihan Liu, Boxin Wang, Jiaxuan You, Chao Zhang, Mohammad Shoeybi, and Bryan Catanzaro. 2024b. Rankrag: Unifying context ranking with retrieval-augmented generation in llms. ArXiv preprint. +Zichun Yu, Chenyan Xiong, Shi Yu, and Zhiyuan Liu. 2023. Augmentation-adapted retriever improves generalization of language models as generic plug-in. In Proceedings of ACL, pages 2421-2436. +Shuyan Zhou, Uri Alon, Frank F. Xu, Zhengbao Jiang, and Graham Neubig. 2023. Docprompting: Generating code by retrieving the docs. In Proceedings of ICLR. + +
MethodNQ (acc)HotpotQA (acc)TriviaQA (acc)Avg.
Vanilla RAG45.6829.4382.8552.65
Self-RAG (2024a)39.9024.5978.3547.61
Recomp (2024a)40.4725.3679.0448.29
SEGENC (2022)40.4724.8976.7347.36
RankCoT47.4132.2185.1854.93
+ +Table 5: Overall Performance of More Baselines. + +# A Appendix + +# A.1 License + +This section summarizes the licenses of the datasets used in our experiments. + +All of these datasets under their respective licenses and agreements allow for academic use: Natural Questions (CC-BY-SA-3.0 License); PopQA, Commonsense QA, Wiki QA, MARCO QA, StrategyQA, and Grade School Math 8K (MIT License); Web Questions and HotpotQA (CC-BY-4.0 License); TriviaQA, ASQA, Algebra QA with Rationales, and Math QA (Apache 2.0 License); Explanations for CommonsenseQ (CDLA-Sharing-1.0 License); Yahoo! Answers QA shows its terms of use at website1. + +# A.2 Additional Baseline Comparison Results + +This section presents the comparison results between RankCoT and several baseline models. + +In this experiment, we compare RankCoT with four baselines: vanilla LLM, Self-RAG, Recomp, and SEGENC. Self-RAG (Asai et al., 2024a) optimizes Llama3-8B-Instruct to retrieve documents on demand and ranks them by reflecting the retrieved documents using reflection tokens. SEGENC (Vig et al., 2022) is a Query-Focused Summarization model, initialized from the BART model (Lewis et al., 2020a), which summarizes documents based on a given query. Recomp (Xu et al., 2024a) proposes a method to compress retrieved documents, reducing the computational overhead of language models during inference. + +As shown in Table 5, Self-RAG, Recomp, and SEGENC all show performance degradation compared to vanilla RAG. This indicates that ranking, compressing, or summarizing documents inevitably lead to information loss, thereby reducing response accuracy. In contrast, RankCoT not only incorporates advantages of ranking and summarization, but also generates a CoT that preserves + +![](images/eb284efe6628ab047d1b86527d10d3a48701817a2af13f8bc295320842b0b6f1.jpg) +Figure 5: QA Consistency of the RAG Model Using Different Knowledge Refinement Models. + +as much useful information as possible. This approach reduces the input length for the QA model while improving response accuracy. + +# A.3 QA Consistency Using Different Knowledge Refinements + +This experiment evaluates the QA consistency based on different knowledge refinement results. Since the experiment is conducted in the internal knowledge scenario, all queries can be accurately answered by the RAG model without any external knowledge. + +As illustrated in Figure 5, we use the TriviaQA dataset to conduct the experiment. For each query, we input both the query and the refinement results from different models, then sample responses from the RAG model 300 times. The ratio of correct answers is calculated and denoted as Accuracy, which serves to evaluate the QA consistency of the RAG model. A higher accuracy reflects that the knowledge refinement results help the RAG model consistently produce correct answers. + +As shown in the evaluation results, RankCoT demonstrates its effectiveness by achieving an average accuracy of approximately $91.3\%$ , outperforming both refinement baselines, Rerank and Summary. The accuracy of the Rerank and Summary methods shows significant variation, indicating that the knowledge refinements produced by both models still contain knowledge that causes the RAG model to lack consistency in its answers. In contrast, after applying RankCoT, the accuracy becomes concentrated at either 0 or 1, demonstrating that it better supports the RAG model in maintaining answer consistency. + +
SplitTaskDatasetMetricRawFiltered
TrainingOpen-Domain QACommonsense QA (2019)Accuracy4,0003,037
Math QA (2019)Accuracy4,0003,509
Web Questions (2013)Accuracy3,5781,810
Wiki QA (2015)Rouge-L840840
Yahoo! Answers QARouge-L4,0004,000
MARCO QA (2016)Rouge-L4,0004,000
ReasoningAlgebra QA with Rationales (2017)Accuracy2,5272,222
Explanations for CommonsenseQ (2021)Accuracy4,0003,202
Grade School Math 8K (2021)Accuracy4,0003,090
StrategyQA (2021)Accuracy1,860925
EvaluationOpen-Domain QANatural Questions (2019)Accuracy2,837-
HotpotQA (2018)Accuracy5,600-
TriviaQA (2017)Accuracy5,359-
PopQA (2023)Accuracy3,000-
ASQA (2022)STR-EM948-
MARCO QA (2016)Rouge-L3,000-
+ +Table 6: Data Statistics. + +
MethodNQ (acc)HotpotQA (acc)TriviaQA (acc)Avg.
MiniCPM3-4B
Vanilla RAG42.5124.9380.9149.45
RankCoT (Not Aligned)48.7833.1385.2055.70
RankCoT (Aligned)45.6827.5279.2150.80
Qwen2.5-14B-Instruct
Vanilla RAG47.6629.7079.4952.28
RankCoT (Not Aligned)49.9833.9186.6856.86
RankCoT (Aligned)52.1737.3486.4958.67
+ +Table 7: Overall Performance of the RankCoT Model with and without Backbone Model Alignment in the RAG System. "Not aligned" refers to using Llama3-8B-Instruct as the backbone model while applying RankCoT to RAG systems built with MiniCPM3-4B or Qwen2.5-14B-Instruct. "Aligned" refers to using consistent backbone models, either MiniCPM3-4B or Qwen2.5-14B-Instruct, throughout the RankCoT and RAG components. + +# A.4 Additional Experimental Details + +In this subsection, we first describe the process of constructing the training data and then show the prompt templates used in our experiments. + +Data Preprocessing for RankCoT. The quantities of our training and evaluation data, along with the corresponding evaluation metrics, are presented in Table 6. The "Filtered" column indicates the number of training samples used for DPO training. + +During RankCoT training, we collect ten datasets, obtain 32,805 samples, and process them as described in Section 3.2. Since the generated CoT can either be fully correct or incorrect, we cannot form preference data pairs from these generated CoT candidates. Thus, we filter out such samples and divide the remaining ones into training and validation datasets with a 9:1 ratio. + +Prompt Templates. The prompts used for CoT + +generation (InstructCoT) are shown in Figure 6(a). The prompt used for question answering is illustrated in Figure 7. Additionally, the prompts used for CoT refinement (InstructRef) are shown in Figure 6(b). Finally, Figure 8 presents the prompts used for implementing baselines. + +# A.5 Evaluating RankCoT under Aligned Parameter Scales in RAG Systems + +Although RankCoT (Llama3-8B-Instruct) can be applied to various RAG systems implemented with LLMs of different scales and demonstrates its effectiveness, the performance gains may diminish when larger-scale LLMs are used as the generation models in RAG systems. This is because larger LLMs inherently possess stronger knowledge refinement capabilities. To assess the impact of model scale on RankCoT, we conduct experiments by aligning the parameter scales of both the RAG models and the RankCoT model. + +As shown in Table 7, we compare two variants of RankCoT: one without alignment and one with alignment. Both variants implement RankCoT using either Llama3-8B-Instruct or the same LLMs employed by the corresponding RAG models. The results demonstrate that when Qwen2.5-14B-Instruct is used consistently across components, the knowledge refinement process is more effective, leading to improved answer accuracy. In contrast, aligning all components with MiniCPM3-4B results in lower overall performance compared to the unaligned setting. This outcome is expected, as the unaligned setting leverages Llama3-8B-Instruct for knowledge refinement, which benefits from a larger model size and stronger refinement capabilities. + +
MethodNQHotpotQATriviaQANumber of LLM Calls
RefineGen.RefineGen.RefineGen.
Vanilla RAG-54s-57s-58s1
Rerank212s56s638s58s280s56s2
Summary101s11s101s11s89s9s2
CoT106s12s111s13s96s10s2
RankCoT82s10s84s10s74s8s2
+ +Table 8: Inference Time of RAG with Different Knowledge Refinement Models. A total of 500 samples are drawn from each of the NQ, HotpotQA, and TriviaQA datasets. All experiments are conducted using the Llama3-8B-Instruct model with the vLLM inference engine and a batch size of 60. "Refine" denotes the time spent on knowledge extraction, while "Gen." refers to the time taken for answer generation. + +# A.6 Inference Time of RAG with Different Knowledge Refinement Models + +This section reports the inference time of various knowledge refinement models across different datasets, as summarized in Table 8. + +During inference, both RankCoT and the baseline refinement models make the same number of calls to the LLM: once for refining the retrieved knowledge and once for answering the question based on the refined knowledge. Compared to vanilla RAG, most of the additional time introduced by these models is spent on the knowledge refinement step. Among all evaluated methods, RankCoT achieves the lowest inference latency. As discussed in Section 5.4, RankCoT generates the shortest knowledge refinement results, which largely accounts for its superior inference efficiency. + +# A.7 Case Study + +In Table 9, we present a case study to illustrate the effectiveness of the RankCoT model. For the given query, it asks about "Australia's location in the world and region". And the retrieved documents contain both related and unrelated information about the geographical location of Australia. + +The summarization method captures some geographical information about Australia from the retrieved documents, such as "being in the Southern Hemisphere and located between the Indian and Pacific Oceans". However, these descriptions offer only a broad geographical scope rather than directly answering the query about the regional location of Australia. Consequently, the LLM is misled by the ambiguous information in the summarized documents and generates inaccurate answers. Moreover, the summarization contains some irrelevant information, such as "7,682,300 square kilometers" and "smallest continent and the sixth-largest country". + +In contrast, RankCoT refines the retrieved docu + +ments in a question-answering based summarization manner by generating a Chain-of-Thought (CoT). These CoT results are constructed by sequentially integrating information from different retrieved documents, while ranking and prioritizing the most query-relevant knowledge. Rather than directly summarizing keypoint information from retrieved documents, RankCoT identifies crucial geographical attributes in each document and organizes them in a structured reasoning result. At the start of the CoT, broad geographical attributes, such as "Southern Hemisphere" and "between the Indian and Pacific Oceans" are strengthened, as they appear consistently across documents. More specific regional information, such as "Oceania", is ranked higher in the reasoning process, ensuring that the final CoT provides the most accurate regional classification. This demonstrates that RankCoT is not merely a direct extraction or summary of retrieved documents, but rather a refined reasoning chain that aligns closely with the query. + +# Query: What is australia's location in the world and region? Ground Truth: Oceania Documents: + +(1) ... Australia is both a continent and a country. It is located to the south of Indonesia and Papua New Guinea, in the southeast part of the Indian Ocean. New Zealand lies to its east, and most of the Indian Ocean lies to its west. ... Australia is the world's smallest continent, though it is also the sixth-largest country in the world. The total land area of Australia is 7,682,300 sq. km. +(2) ... Australia is the smallest continent and the largest country in Oceania located between the Indian Ocean and Pacific Ocean in the Southern hemisphere. ... Australia is separated from Papua New Guinea by the Coral Sea and Torres Strait to the northeast; from Indonesia by the Timor and Arafura seas to the northwest; from Coral Sea Islands Territory by the Great Barrier Reef; from New Zealand by Tasman Sea to the southeast; +(3) ... Australia is located south of the equator and is bordered by the Indian Ocean and the Pacific Ocean. + +# Summary: + +Summary: Here is a concise summary: Australia is located in the Southern Hemisphere, between the Indian Ocean and the Pacific Ocean. It is the world's smallest continent and the sixth-largest country, covering an area of 7,682,300 square kilometers. Australia is surrounded by the Indian Ocean to the west, the Timor, Arafura, and Coral Seas to the north, the Pacific Ocean to the east, and the Tasman Sea and Southern Ocean to the south. The country is made up of six states (Western Australia, South Australia, Victoria, Tasmania, New South Wales, and Queensland) and two territories (the Northern Territory and the Australian Capital Territory) + +Answer: Australia is located in the Southern Hemisphere, between the Indian Ocean and the Pacific Ocean. (X) + +# RankCoT: + +Chain-of-Thought: According to the passages, Australia is: + +1. An island continent located in the Southern Hemisphere. +2. Situated between the Indian Ocean and the Pacific Ocean. +3. Located south of the equator. +4. Surrounded by the Indian Ocean to the west, the Timor, Arafura, and Coral Seas to the north, the Pacific Ocean to the east, and the Tasman Sea and Southern Ocean to the south. +5. An island continent in Oceania, which is a region that includes Australia, New Zealand, and many Pacific island nations. + +So, Australia's location in the world is in the Southern Hemisphere, in the region of Oceania. + +Answer: Australia is an island continent located in the Southern Hemisphere, in the region of Oceania. + +Table 9: Case Study. We randomly sample one case from the NQ dataset to show the knowledge refinement result. Different colors are used to annotate the key information from the retrieved knowledge retained by different knowledge refinement models: Pink for Summary, Blue for RankCoT. And we also highlight the key points that can help answer the query in Purple. + +# Prompts for CoT Generation + +[TASK]: Web Questions, Wiki QA, Yahoo! Answers QA, MARCO QA, Grade School Math 8K, StrategyQA, Natural Questions, HotpotQA, TriviaQA, PopQA, ASQA [Instruction]: Passage:{passage} Based on these passages, answer the question below. Question:{question} Let's think step by step. + +[TASK]:CommonsenseQA,MathQA,AlgebraQA with Rationales, +Explanations for CommonsenseQ +[Instruction]:Passage:{passage} +Based on these passages, please answer the multiple choice question below. +Question:{question} +Let's think step by step. + +(a) CoT Generation. + +# Prompts for CoT Refinement + +[TASK]: Web Questions, Wiki QA, Yahoo! Answers QA, MARCO QA, Grade School Math 8K, StrategyQA +[Instruction]: Task Description: +1. Read the given question and related chain of thought to gather relevant information. +2. The content of the chain of thought is the thinking process that may be used to answer the question. +3. If the chain of thought don't work, please answer the question based on your own knowledge. +4. Give a short answer to a given question. +Question:{question} +Chain of Thought:{CoT} + +[TASK]:CommonsenseQA,MathQA,AlgebraQA with Rationales, +Explanations for CommonsenseQ +[Instruction]:Task Description: +1. Read the given question and related chain of thought to gather relevant information. +2. The content of the chain of thought is the thinking process that may be used to answer the question. +3.If the chain of thought don't work, please answer the question based on your own knowledge. +4.Output only the choice between \*\*\*\* and \*\*\*\* at first,then give a short answer to the multiple choice question. +Question:{question} +Chain of Thought:{CoT} + +(b) CoT Refinement. + +Figure 6: Prompt Templates Used in RankCoT. + +# Prompts for Question Answering + +[TASK]: Natural Questions, HotpotQA, TriviaQA, PopQA + +[Instruction]: Task Description: + +1. Read the given question and related chain of thought to gather relevant information. +2. The content of the chain of thought is the thinking process that may be used to answer the question. +3. If the chain of thought don't work, please answer the question based on your own knowledge. +4. Please answer the question and only output the answer. Question:{question} + +Chain of Thought:{COT} + +[TASK]: ASQA + +[Instruction]: Task Description: + +1. Read the given question and related chain of thought to gather relevant information. +2. The content of the chain of thought is the thinking process that may be used to answer the question. +3. If the chain of thought don't work, please answer the question based on your own knowledge. +4. Answer the following question. The question may be ambiguous and have multiple correct answers, and in that case, you have to provide a long-form answer including all correct answers. + +Question:{question} + +Chain of Thought:{COT} + +[TASK]: MARCO QA + +[Instruction]: Task Description: + +1. Read the given question and related chain of thought to gather relevant information. +2. The content of the chain of thought is the thinking process that may be used to answer the question. +3. If the chain of thought don't work, please answer the question based on your own knowledge. +4. Give a short answer to a given question. + +Question:{question} + +Chain of Thought:{COT} + +Figure 7: Prompt Templates Used for Question Answering. + +# Prompts for Baselines + +[MODEL]: Vanilla RAG + +[TASK]: All except ASQA + +[Instruction]: Background:{Passages} + +Question:{Question}Answer: + +[MODEL]: Vanilla RAG + +[TASK]: ASQA + +[Instruction]: Background:{Passages} + +Answer the following question. The question may be ambiguous and have multiple correct answers, and in that case, you have to provide a long-form answer including all correct answers. + +Question:{Question}Answer: + +[MODEL]:Rerank + +[TASK]: All + +[Instruction]: Given the following question and context, return YES if the context is relevant to the question and NO if it isn't. Question: {question} Context:{context} Relevant (YES / NO): + +[MODEL]: Summary Generation + +[TASK]: All + +[Instruction]: You are tasked with summarizing the context in a concise manner, focusing on the key information relevant to answering the given question. Question: {question} + +Context:{context} + +Provide a concise summary that captures the main points and relevant details from the context to address the question: + +[MODEL]: Summary Question Answering + +[TASK]: Natural Questions, HotpotQA, TriviaQA, PopQA + +[Instruction]: Task Description: + +1. Read the given question and related summary to gather relevant information. + +2. If the summary don't work, please answer the question based on your own knowledge. + +3. Please answer the question and only output the answer. + +Question:{question} + +Summary: {summary} + +[MODEL]: Summary Question Answering + +[TASK]:ASQAI + +[Instruction]: Task Description: + +1. Read the given question and related summary to gather relevant information. + +2. If the summary don't work, please answer the question based on your own knowledge. + +3. Answer the following question. The question may be ambiguous and have multiple correct answers, and in that case, you have to provide a long-form answer including all correct answers. + +Question:{question} + +Summary: {summary} + +[MODEL]: Summary Question Answering + +[TASK]: MARCO QAI + +[Instruction]: Task Description: + +1. Read the given question and related summary to gather relevant information. + +2. If the summary don't work, please answer the question based on your own knowledge. + +3. Give a short answer to a given question Question:{question} + +Summary: {summary} + +Figure 8: Prompt Templates Used for Implementing Baselines. \ No newline at end of file diff --git a/rankcotrefiningknowledgeforretrievalaugmentedgenerationthroughrankingchainofthoughts/images.zip b/rankcotrefiningknowledgeforretrievalaugmentedgenerationthroughrankingchainofthoughts/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..a33c827974cf3face27e040c46bcfc1eec06c2ab --- /dev/null +++ b/rankcotrefiningknowledgeforretrievalaugmentedgenerationthroughrankingchainofthoughts/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:94211e2cce8ac41bbd7be5547786e0c8dcaf36d716d6271ee55b2b35141554c7 +size 795671 diff --git a/rankcotrefiningknowledgeforretrievalaugmentedgenerationthroughrankingchainofthoughts/layout.json b/rankcotrefiningknowledgeforretrievalaugmentedgenerationthroughrankingchainofthoughts/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..a44e070ccf9faba9f4dbb6591fe56ffcdda30a3f --- /dev/null +++ b/rankcotrefiningknowledgeforretrievalaugmentedgenerationthroughrankingchainofthoughts/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:67b3c972563234914921e98dc67fc332af1d4e1213f2f8478da446a50d8c2735 +size 569108 diff --git a/rankingunraveledrecipesforllmrankingsinheadtoheadaicombat/b4993003-acb3-44c9-9c58-ba518e67c4d1_content_list.json b/rankingunraveledrecipesforllmrankingsinheadtoheadaicombat/b4993003-acb3-44c9-9c58-ba518e67c4d1_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..884ece73e3538ec78b21ba8857d417a8f2b111d3 --- /dev/null +++ b/rankingunraveledrecipesforllmrankingsinheadtoheadaicombat/b4993003-acb3-44c9-9c58-ba518e67c4d1_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a3f8acd5e19b060e14669ffe596fc128f274764aa943d1dc00cc5f0897f63b7c +size 92309 diff --git a/rankingunraveledrecipesforllmrankingsinheadtoheadaicombat/b4993003-acb3-44c9-9c58-ba518e67c4d1_model.json b/rankingunraveledrecipesforllmrankingsinheadtoheadaicombat/b4993003-acb3-44c9-9c58-ba518e67c4d1_model.json new file mode 100644 index 0000000000000000000000000000000000000000..1d90775fa49816b2760ecb87d499644b85871ae2 --- /dev/null +++ b/rankingunraveledrecipesforllmrankingsinheadtoheadaicombat/b4993003-acb3-44c9-9c58-ba518e67c4d1_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:36eddb4dc45be4de9f83a15d540e37bd1f0333d3e9a021f2e8c72e8ebcf26f84 +size 108072 diff --git a/rankingunraveledrecipesforllmrankingsinheadtoheadaicombat/b4993003-acb3-44c9-9c58-ba518e67c4d1_origin.pdf b/rankingunraveledrecipesforllmrankingsinheadtoheadaicombat/b4993003-acb3-44c9-9c58-ba518e67c4d1_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..56228c1c2dd0af00d7d2bed80ca81c6fad47204c --- /dev/null +++ b/rankingunraveledrecipesforllmrankingsinheadtoheadaicombat/b4993003-acb3-44c9-9c58-ba518e67c4d1_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b1f6103ec74ea7e8f566bedd56e44af043d2bb51fac7926e01a239b6e44c12a7 +size 631368 diff --git a/rankingunraveledrecipesforllmrankingsinheadtoheadaicombat/full.md b/rankingunraveledrecipesforllmrankingsinheadtoheadaicombat/full.md new file mode 100644 index 0000000000000000000000000000000000000000..f59831272bc729168c01eedb94be439ea2b615a9 --- /dev/null +++ b/rankingunraveledrecipesforllmrankingsinheadtoheadaicombat/full.md @@ -0,0 +1,437 @@ +# Ranking Unraveled: Recipes for LLM Rankings in Head-to-Head AI Combat + +Roland Daynauth*, Christopher Clarke*, Krisztian Flautner, Lingjia Tang, Jason Mars + +University of Michigan + +{daynauth, csclarke, manowar, lingjia, profmars} @umich.edu + +# Abstract + +Evaluating large language models (LLMs) is a complex task. Pairwise ranking, where humans compare LLM outputs based on predefined criteria, has become a leading approach. By aggregating these comparisons through algorithms such as Elo, rankings across multiple LLMs can be derived. However, applying ranking algorithms in LLM evaluation presents several challenges. Traditional systems like Elo, designed initially for structured competitions such as chess, often produce inconsistent and unstable rankings due to the dynamic and context-dependent nature of LLM performance. Despite the increasing reliance on these methods, a systematic study of ranking algorithms for LLM evaluation remains lacking. This paper examines the effectiveness of various ranking systems for head-to-head LLM comparisons. We define key principles for robust ranking, conduct extensive evaluations of different ranking algorithms, and analyze their stability, accuracy, and sensitivity to real-world conditions. Our findings offer insights into the limitations of existing approaches and provide guidelines for selecting the most appropriate ranking method based on evaluation objectives and resource constraints. + +# 1 Introduction + +Rapid progress in large language models (LLMs) has highlighted the critical need for LLM evaluation methodologies, especially for complex generation tasks (Guo et al., 2023). Traditionally, NLP evaluation has relied on benchmarks such as GLUE (Wang et al., 2019), SuperGLUE (Wang et al., 2020), and more recent LLM-focused benchmarks like LM-Eval (Gao et al., 2023). However, a significant limitation of these classical benchmarks is their reliance on established ground truth, making + +![](images/ddb51db38da027ccbf39e13a57e2e73e68d8846e76d7774ce9850bd0ae4b5095.jpg) +Figure 1: Different ranking algorithms can produce different rankings with the same human evaluation data, making it difficult to determine which algorithm is appropriate for various use cases. + +them unsuitable for evaluating more nuanced, diverse, and complex cases where such ground truth is difficult to define or entirely unattainable (Chiang et al., 2024). This problem is particularly evident in complex tasks such as open-ended text generation, conversational dialogue, and creative writing, where human judgment is paramount. Previous work has shown that these benchmark evaluation results do not correlate well with human LLM evaluations (Zheng et al., 2024; Irugalbandara et al., 2023). + +This shortcoming has led the NLP community to adopt pairwise human evaluation methods (Dubois et al., 2024; Zheng et al., 2024; Chiang et al., 2024). A widely recognized example is Chatbot Arena (Chiang et al., 2024), which directly compares models through "head-to-head combat," where users vote between responses from two competing models. This method aligns with the Elo rating system (Elo, 1978), initially developed to classify chess players according to their historical competition results and relative strengths. Elo and other ranking methods have gained popularity as structured meth + +ods incorporating human feedback and preferences to effectively rank models (Dettmers et al., 2024; Wu and Aji, 2023; Chiang et al., 2023). + +However, as our experiments later demonstrated, Elo and other established ranking algorithms can often produce inconsistent and sometimes unreliable results (Figure 1), generating conflicting ranks. Thus, it is critical to understand how to select the ranking algorithm appropriately. There has been a lack of comprehensive studies across multiple ranking algorithms applied to LLM evaluations. + +- First, a general framework for such a study has been lacking. It remains unclear which key metrics should be used to evaluate ranking algorithms and the factors that can affect the accuracy of the ranking algorithm. +- There has been no comprehensive study comparing multiple ranking algorithms or offering guidelines for selecting the most suitable in the context of LLM evaluations. Although prior work such as Boubdir et al. (2023) has explored some challenges associated with using Elo for LLM ranking, its focus is limited to Elo. In addition, our experiments show that recommendations from previous work are not always effective in practice. + +Choosing the best model can significantly impact the user experience of the application that incorporates it. This paper explores the critical issues surrounding ranking LLMs in head-to-head human evaluations. Our contributions are as follows. + +- We first systemically outline a set of fundamental properties that ranking systems should adhere to when evaluating LLMs. +- Second, we evaluate the performance of four widely used ranking algorithms (Elo, Bradley-Terry, Glicko, and Markov Chain) in two different evaluation scenarios (Arena Style vs. Controlled Style), analyzing their ability to maintain transitivity, ensure prediction accuracy, and remain stable across hyperparameter variations. +- Third, we conduct an in-depth analysis of these results, highlighting flaws in the current application of these popular algorithms. Despiteits wide use for LLM ranking, Elo remains unstable even after extensive tuning is applied. + +- Lastly, we propose systematic guidelines for selecting the most appropriate approach based on the specific characteristics of the evaluation task and the available resources. + +To our knowledge, this paper represents the first work that systematically addresses the complexities and intricacies of ranking LLMs across various methodologies. We release all code, data, and models to facilitate reproducibility and further research in this area. + +# 2 Background + +In this section, we formally define the task of pairwise ranking and briefly describe the suite of algorithms often used for aggregating ranking from pair-wise comparison results. The first three algorithms—Elo (Elo, 1978), Bradley-Terry (Bradley and Terry, 1952), and Glicko (Glickman, 1999)—are well-established and widely used in contexts such as sports competitions, while the Markov chain, based on a random walker model, is simpler in design and has demonstrated strong performance in previous studies (Callaghan et al., 2003, 2004). + +# 2.1 Ranking + +Let $M$ be the set of models under evaluation where $M = \{1,2,\dots ,m\}$ . For any pair $i,j\in M$ , the result $S_{ij}$ of a head-to-head match is defined as $S_{ij} = 1$ when $i$ beats $j$ and $S_{ij} = 0$ when $i$ loses and $S_{ij} = 0.5$ for ties. + +If $\theta_{i},\theta_{j}$ represents the strength of $i$ and $j$ respectively, then the probability that $S_{ij} = 1$ , written as $p_{ij}$ , for $\theta_{i},\theta_{j}$ is assumed to follow a probability distribution $F$ such that (David, 1988): + +$$ +p _ {i j} = F \left(\theta_ {i} - \theta_ {j}\right) \tag {1} +$$ + +# 2.2 Elo Rating system + +The Elo rating system was first adopted by the United States Chess Federation (USCF) in 1960 to measure players' strengths (Elo, 1978). For two players $i$ and $j$ with relative strengths $\theta_{i}$ and $\theta_{j}$ , the probability that $i$ beats $j$ , is calculated as follows: + +$$ +p _ {i j} = \frac {1}{1 + 1 0 ^ {\left(\theta_ {j} - \theta_ {i}\right) / 4 0 0}} \tag {2} +$$ + +For any match between model $i$ and $j$ , $\theta_{i}$ (also called the Elo score for $i$ ) is updated via the formula: + +$$ +\theta_ {i} ^ {\prime} = \theta_ {i} + k \times \left(S _ {i j} - p _ {i j}\right) \tag {3} +$$ + +where $k$ is a hyperparameter know as the $k$ -factor. The value of $k$ determines the rate at which the Elo score of a player changes based on the outcome of the game. + +# 2.3 Bradley-Terry Model + +The Bradley-Terry model (Bradley and Terry, 1952) was introduced in 1952 and assumes that $F$ in equation 1 follows a logistic distribution where + +$$ +p _ {i j} = \frac {e ^ {\theta_ {i}}}{e ^ {\theta_ {i}} + e ^ {\theta_ {j}}} \tag {4} +$$ + +The strengths $\theta_{i}$ for each model can be estimated by solving the likelihood function $\mathcal{L}(\theta)$ such that: + +$$ +\mathcal {L} (\theta) = \prod_ {i < j} p _ {i j} ^ {y _ {i j}} p _ {j i} ^ {y _ {j i}} \tag {5} +$$ + +where $y_{ij}$ is the number of times that model $i$ beats $j$ and $p_{ij}$ is the probability of $i$ beating $j$ . + +# 2.4 Glicko Rating system + +The Glicko rating system (Glickman, 1999) was introduced in 1995 as an improvement to Elo. Glicko extends Elo by introducing a secondary parameter $(\sigma)$ known as the rating deviation. This parameter measures the reliability of a player's rating score, acting as a confidence interval for the player's rank, decreasing based on the number of games played, regardless of wins or losses. This factor is important given that two players can potentially have the same score in a tournament despite a different number of previous matches. This situation is prevalent in LLM evaluations, as new models are frequently introduced and the number of games played between them vary significantly. In Appendix A.1 we explore the details of the algorithm. + +# 2.5 Markov Chain + +The Markov Chain Model is a nonparametric ranking algorithm adapted from Callaghan et al. (2003, 2004) and adapted into a Markov Chain Model by (Kvam and Sokol, 2006) (see Appendix A.2 for details). The Markov chain employs a series of random walkers traversing a graph, with each node representing a player/model in the tournament connected by an edge denoting a match between two nodes. Each walker chooses an initial node $i$ , staying in the node or moving to an adjacent node $j$ according to a single condition $p$ . In a random match between $i$ and $j$ , the walker moves to the winning node with a probability of $p$ for $p > 0.5$ , + +a hyperparameter chosen in advance. Every time a walker moves or stays on a node, it represents a vote for that node, and the sum of all votes from every walker represents the rank of that player/model. In practice, the optimal value for $p$ can vary depending on the tournament. In our experiments, we use $p = 0.8$ as the default value similar to Callaghan et al. (2003), which achieved stable results with $p$ ranging from $p = 0.75$ to $p = 0.95$ . + +# 3 Desirable Properties of Ranking System + +The goal of a ranking system is to provide a structured approach to compare and order items based on their performance or quality. In the context of LLMs, an effective ranking system allows researchers, practitioners, and end-users to identify the most capable models for their specific needs. By simplifying decision-making and optimizing resource allocation, such a system highlights models that are likely to deliver superior performance in the real-world applications. However, implementing a robust ranking system requires addressing several key properties to ensure its validity and reliability. In this section, we identify and discuss three essential properties that a ranking system for LLMs should adhere to: 1) Transitivity, 2) Prediction Accuracy, and 3) Sensitivity to Hyperparameters and Battle Conditions. + +# 3.1 Transitivity + +Transitivity is a fundamental property for a ranking system to maintain consistency. + +Definition 3.1. For any three models $i,j,k\in M$ their match-ups are transitive if $p_{ij} > 0.5,p_{jk}>$ 0.5 and $p_{ik} > 0.5$ . If $i,j,k$ are transitive, we say that a ranking system preserves transitivity if it ranks these models in order $i,j,k$ . Transitivity ensures that the ranking is coherent and interpretable. + +Human evaluation data contains transitive and intransitive relationships, whereas ranking algorithms always produce perfectly transitive rankings. Transitive and intransitive relationships are mutually exclusive; however, intransitive relationships are inevitably lost, since ranking enforces transitivity. One of the key strengths of a ranking algorithm lies in its ability to preserve as much of the original transitive structure from human data as possible. Failure to do so can lead to paradoxical rankings, where the ordering of models becomes inconsistent, ultimately diminishing trust in the rating system. + +# 3.2 Prediction Accuracy + +Like transitivity, prediction accuracy is a critical metric that assesses how well the ranking system forecasts the results in head-to-head matches. It measures the probability that the ranking system correctly predicts the winner between any two LLMs. High prediction accuracy indicates that the ranking system is reliable and can be trusted to make informed decisions about the superiority of the model for a downstream task. For combat-style evaluation in LLM, where assessment is based on subjective human judgment, prediction accuracy acts as an indicator of the ranking system's ability to align with human preferences. This alignment is crucial for tasks like open-ended text generation or conversational agents, where the model's performance is best judged by human preference. Thus, the ranking system should reflect statistical superiority and resonate with qualitative human evaluations to truly enhance the utility and adoption of LLM. + +# 3.3 Sensitivity to Hyperparameters + +Another critical aspect of evaluating ranking algorithms is understanding their sensitivity to hyperparameters, which can significantly affect the consistency and stability of rankings (Boubdir et al., 2023). Ranking algorithms such as Elo have been shown to produce drastically different rankings based on the order in which matches are evaluated and the number of permutations (Boubdir et al., 2023). Since these hyperparameters can influence the behavior and outcomes of the ranking system, it is essential to choose the right settings to ensure reliable and consistent rankings. Sensitivity to hyperparameters means that the ranking system should respond to changes in these settings in a predictable and manageable way. An overly sensitive system might produce drastically different rankings with minor parameter changes, leading to instability and unreliability. In contrast, a system with too little sensitivity might fail to capture essential differences between models. In this work, we consider the impact of two different classes of hyperparameters/conditions: 1) Algorithmic Hyperparameters: parameters native to the ranking algorithm itself and 2) Matchup Distribution: Arena style vs. controlled style. + +Algorithmic Hyperparameters such as $k$ -factor in Elo, $p$ -value in Markov Chain, and $\sigma$ in Glicko can significantly affect the rankings produced by + +
AlgorithmArena (%)SLAM (%)
Elo68.2452.5
Markov51.3851.67
Glicko56.5453.33
Bradley-Terry77.2956.67
+ +Table 1: Ranking Algorithm Performance on preserving transitivity on Chatbot Arena & SLAM Dataset. + +these algorithms. Similarly, the distribution of matchups between models can also influence the rankings. In practice, certain models may participate in many more matchups than others, creating an uneven distribution of data. This skews the rankings because models with fewer matches do not have sufficient data to be ranked reliably, while those with more matchups dominate the rankings. The ranking system chosen should be robust to these variations and produce consistent and reliable rankings across different hyperparameters and battle conditions. + +# 4 Evaluating Ranking Algorithms + +Building on the properties discussed in section 3, this section outlines a series of experiments designed to assess the quality of traditional ranking systems and their use in LLM rankings. We investigate how each algorithm performs under different conditions and evaluate their effectiveness in producing stable and consistent rankings. + +# 4.1 Datasets + +To evaluate these ranking systems, we use two diverse human evaluation datasets representative of two evaluation styles: + +- Chatbot Arena (Chiang et al., 2024) is a dynamic platform where users evaluate two randomly selected model outputs head-to-head. As newer models are released, they are added to the arena to battle the older models. This data set consists of 57 models and a total of 244,978 match-ups. The distribution of matches varies wildly, with some models having up to 30416 matches or as few as 954. As such, we refer to this dataset as an Arena-Style dataset. +- SLAM (Irugalbandara et al., 2023) consists of pairwise match-ups between models evaluated using the SLAM tool on domain-specific task questions. Unlike Chatbot Arena, the + +SLAM platform is tightly controlled with a fixed number of models and a similar number of match-ups between models, thus making it a controlled style dataset. The SLAM dataset consists of 11 models with a total of 2858 match-ups, each model having at most 529 match-ups and at least 501. As such, we refer to this dataset as a Controlled Style dataset. + +These two diverse datasets enable us to assess ranking algorithms under varying conditions, offering a comprehensive view of their behavior. To evaluate dataset consistency, we apply Kendall's test (Kendall and Smith, 1940) (see A.6 for details), which confirms that any inconsistencies in the datasets are statistically insignificant. + +# 4.2 Preserving Transitivity + +Using the Chatbot Arena and SLAM datasets, we evaluated the ability of each ranking algorithm to preserve transitivity (see 3.1). We evaluated the transitive performance of each ranking algorithm by first calculating the number of triples within the data set. Three models $i,j,k$ are part of a triple if $i$ wins the majority of comparisons with $j$ , and $j$ wins the majority of comparisons with $k$ , and transitivity is considered preserved if this order is maintained in the final ranking. Table 1 shows the performance of each ranking algorithm under the arena and controlled style evaluation scenarios. We observe that the Bradley-Terry model is the most performant, preserving transitivity in $77.29\%$ and $56.67\%$ of the triples, respectively, compared to its closest competitor, Elo, at $68.24\%$ and $52.5\%$ . + +Bradley-Terry uses Maximum Likelihood Estimation to calculate each player's strength based on the outcome of all their matches concurrently. This is in contrast to Elo, which updates each player's rating after each match sequentially and is therefore sensitive to the other in which matches are evaluated. This gives Bradley-Terry the advantage in preserving transitivity in larger datasets such as Chatbot Arena. + +Bradley-Terry consistently outperforms other algorithms in preserving transitivity, achieving the highest rankings across both datasets. + +# 4.3 Prediction Accuracy + +Next, we evaluate the ability of each ranking algorithm to predict the outcome of unseen LLM matches. We first partition each dataset into a 75/25 train/test split, running each ranking algorithm on + +
AlgorithmArena (F1)SLAM (F1)
Elo0.900.87
Markov0.770.88
Glicko0.880.88
Bradley-Terry0.820.87
+ +Table 2: Ranking algorithm performance in prediction accuracy (F1 score) on Chatbot Arena & SLAM Dataset. + +the training set to determine the final ranking and strength of each model $\pi$ . We then use each ranking algorithm to predict the outcome of the matches in the test set and calculate the F1 score as our performance metric. + +Performance on the Arena Dataset Due to its uneven distribution of model match-ups, the Arena data set presents an interesting challenge for ranking algorithms to predict future outcomes. When matches between models are unevenly distributed, some algorithms struggle with prediction accuracy. Our results show the Elo model to be the most accurate, achieving an F1 score of 0.90 compared to the F1 score of 0.88, 0.82, and 0.77 for the Glicko, Bradley-Terry and Markov Chain models, respectively (Table 2). + +The impact of the match-up distribution on the prediction accuracy is shown in the performance of the Markov chain which is affected by the sparsity of certain model match-ups, leading to lower prediction accuracy, as shown by the poor performance on models such as deepseek-llm-67b-chat and dolphin-2.2.1-mistral-7b in figure 4 of the appendix. + +Another example of the impact of matchup distribution is shown in the performance of the Bradley-Terry model in the appendix figure 4. We observe that the Bradley-Terry system suffers when dealing with "powerful models," where there is a strong imbalance between a model's wins and losses. For example, in the arena dataset, gpt-4-turbo had a win/loss ratio of 12288/3979. This skew in model wins/loss results in overestimation of the model's strength as shown by the low F1 score of 0.82 achieved by gpt-4-turbo using Bradley-Terry compared to an F1 score of 0.95, 0.96 and 0.92 from Elo, Glicko, and Markov Chain, respectively. This is known as the 'rare events' problem in logistic regression (King and Zeng, 2001). One method of countering this is to use a weighted logistic regression (Chiang et al., 2024). However, we observe that this has a negligible impact on the final result. + +
MethodEloMarkovGlickoBradley-TerryWin-Rate
Elo Rating1.000.890.930.950.91
Markov-1.000.990.970.98
Glicko--1.000.990.99
Bradley-Terry---1.000.98
Win-Rate----1.00
+ +Table 3: Spearman's correlation between ranking algorithms on the SLAM dataset + +
MethodEloMarkovGlickoBradley-TerryWin-Rate
Elo Rating1.000.740.860.940.93
Markov-1.000.760.810.78
Glicko--1.000.810.89
Bradley-Terry---1.000.91
Win-Rate----1.00
+ +Table 4: Spearman's correlation between ranking algorithms on the Arena dataset + +Furthermore, the bootstrap confidence interval used by Chatbot Arena shows a narrow range of [-2.2, 2.3], suggesting a high confidence in the model ranking. However, this interval does not guarantee how well the model will perform against unseen opponents. + +Prediction accuracy on the SLAM dataset The distribution of matches between models in the SLAM dataset is tightly controlled so that every reviewer evaluates an equal number of models, resulting in a near uniform distribution of matches. We observe near-identical performance for all models. This result is due to the balanced distribution of match-ups in the dataset, where if a model has the most wins in the competition, its performance is directly reflected in its win rate. We further validate this occurrence by ranking all the models in SLAM by win rate and calculating the correlation between each pair of ranking algorithms, as shown in Tables 3 and 4. We observe a high correlation between all methods and the win rate. + +All algorithms perform similarly on the SLAM dataset, but on Arena, Elo leads in accuracy, followed by Glicko. Bradley-Terry, however, is negatively affected by the uneven distribution of the Arena dataset. + +# 4.4 Hyperparameter Sensitivity + +To measure the sensitivity of the hyperparameters, we calculate the F1 score of each ranking system as described in Section 4.3, varying each hyperparameter over a range of 100 values. Figure 2 showcases the range of results produced by Elo, Markov and Glicko across the two evaluation scenarios. + +Elo k-factor The $k$ factor in Elo dictates the extent to which the score of a player is influenced by + +the outcome of an individual match. For example, with large $k$ values, highly ranked players can incur a significant penalty when losing to a player with a lower ranking, while defeating such a player only results in a slight increase in score. The evaluation of the performance of the model (depicted in Figure 2) at varying levels of hyperparameter $k$ shows marked sensitivity, which emphasizes the need for meticulous tuning. Elo shows the largest variation across both datasets, and is less stable, particularly for the smaller SLAM dataset. Through our tuning of this parameter, we determined that the ideal $k$ factor for Elo is less than the standard 32 commonly used in previous research (Dettmers et al., 2024; Wu and Aji, 2023; Chiang et al., 2023). This reduced convergence rate can be attributed to the complexities of human preferences as opposed to the typical assessment of real-world games, which rely on the differing abilities of opposing teams. + +Markov Chain: $p$ Score The $p$ score in the Markov Chain determines the extent to which the overall ranking is influenced by each model's win rate, with values closer to 1 indicating greater influence compared to those closer to 0.5. We observe that Markov shows stable performance on the controlled SLAM datasets, performing as well as Glicko (Figure 2), however, the algorithm struggles on the large ARENA dataset due to its over reliance on win-rates for calculating ranks. When optimizing the value of this parameter, we find that the optimal $p$ value for the Markov chain on the SLAM dataset is larger than the Arena dataset, indicating that the model's strength is greatly influenced by its overall win rate. + +Glicko: Rating deviation For Glicko, the ranking deviation $(\sigma)$ is a measure of consistency or variability in a player's performance over time and determines how flexible a player's rating can be. If $\sigma$ is initially set too high, the system will interpret the early game results as more variable or uncertain. This leads to larger rating adjustments, making the player's rating fluctuate more. In contrast, setting $\sigma$ too low initially restricts the system from adjusting the rating freely. As a result, players, especially newcomers, may take much longer to reach a rating that accurately reflects their true skill level. This is particularly impactful in fast-changing or skill-evolving games, where a low initial variability setting could lead to underestimation of skill. We observe that Glicko's prediction performance is consistent across both datasets, showing that its + +![](images/daabde9e0e9b9ef580185a7fdaefef4ee740d90be549cd662227a722d2d044c7.jpg) + +![](images/f22673f7fbdf4c51906718e5c1a4c03bf0ec298d9372b53c41b525114dd91a54.jpg) +Figure 2: Distribution of F1 scores for the SLAM (top) and ARENA (bottom) datasets, showing the performance of Elo, Markov, and Glicko algorithms across a subset of models with 100 different hyperparameter settings. The results highlight the volatility of Elo, demonstrating its high sensitivity to hyperparameter changes compared to the more stable performance of Markov and Glicko. + +performance is less impacted by changes in its hyperparameters compared to Elo and Markov Chain. We theorize that this is due to the large number of games played for each model in both scenarios, allowing the system to adjust the rating deviation dynamically. + +Elo shows high sensitivity to hyperparameter whereas Glicko demonstrates greater stability and accuracy which suggests that Glicko is a more reliable alternative for LLM evaluation. + +# 5 Recommended Best Practices + +In sections 3 and 4, we outlined the desired properties of ranking systems and presented experiments assessing the performance of these systems in achieving these criteria. Based on these observations, this section puts these results into perspective and provides practical recommendations for select + +ing the most appropriate ranking algorithm. We outline which algorithms perform best under specific circumstances, offering guidance on their optimal use depending on the structure of the dataset, the matchup distribution, and the model evaluation goals. These recommendations, summarized in Table 5, aim to improve the reliability and applicability of classification systems in real-world LLM evaluations. + +# 5.1 Challenges with Elo + +An important result in this paper is that Elo, even with $>1,000$ permutations, struggles to achieve stable rankings A.5. This indicates that Elo's dependency on permutations for ranking stabilization is inadequate, challenging previous studies (Boubdir et al., 2023). Combined with the high sensitivity to hyperparameters and the average performance in preserving transitivity. We do not + +
CriteriaEloMarkovGlickoBradley-Terry
TransitivityModerate performance on smaller datasets, better than average performance on larger datasets.Preserves transitivity but sensitive to sparse and uneven matches.Good transitivity preservation in both types of datasets.Generally good at maintaining transitivity, in smaller controlled and larger uncontrolled datasets.
Hyperparameter SensitivityHighly sensitive to K-factor and permutation count; performance fluctuates with changes.Sensitive to the p-value, with rankings varying significantly based on its setting.Incorporates rating deviation, making it less sensitive than Elo, but hyperparameter tuning is still necessary.Does not use any hyperparameters.
Prediction AccuracyModerate prediction accuracy but inconsistent with small sample sizes or highly uneven matches.Moderate prediction accuracy but highly dependent on matchup distribution.High prediction accuracy due to consideration of the uncertainty in the ratings (rating deviation).Higher prediction accuracy in controlled datasets but suffers in uneven matches.
Recommended Use CasesNot recommended for small, unevenly distributed datasets; may perform better in larger datasets with consistent matches.Applicable where dataset size is small and even, but sensitive to distribution; effective if properly tuned in moderately structured environments.Best suited for large, unevenly distributed datasets. Able to manage uncertainty and prevent low matchup models from being ranked too high.Ideal for small, unevenly distributed datasets. Also effective for large, evenly distributed datasets where interpretability and scalability are valued.
+ +Table 5: Consideration for Ranking Algorithm Selection based on Desired Ranking Properties + +# recommend ELO as an algorithm to rank LLM performance. + +Best Practice 1. Elo's high sensitivity to changes in its $K$ factor and instability (even with large permutations) make it unsuitable for efficient ranking of LLM performance in pairwise evaluation (Sections 4.4 and A.5). + +# 5.2 Choose Bradley-Terry for Small Controlled Datasets + +In section 4.3, we demonstrate that ranking algorithms exhibit varied performance based on battle conditions. When matches are evenly distributed, the ranking algorithms produce similar results. However, a heavily skewed distribution can negatively impact some methods such as Elo and Bradley-Terry. In this scenario, where matchups are balanced and the number of matches is small, objective findings show that Bradley-Terry is best due to its ability to preserve transitivity while also maintaining comparable prediction accuracy. + +Best Practice 2. Bradley-Terry's simplicity and lack of hyperparameters make it ideal for controlled evaluation settings, although its reliance on sufficient matchup data limits its effectiveness in unevenly distributed scenarios. + +# 5.3 Choose Glicko for large uneven datasets + +For larger datasets, especially those with uneven matchup distributions, the Bradley-Terry model encounters difficulties due to the rare event problem. This problem occurs when new models with high win rates, participate in fewerATCHups than well-established models. As a result, these new models can be ranked disproportionately higher based on limited data, leading to biased rankings. In this scenario, the Glicko system provides a superior solution. Glicko utilizes a rating deviation parameter to account for uncertainty in a model's ranking due to limitedATCHups. This allows the system to adjust the rankings more conservatively for models with + +fewer comparisons, preventing them from being ranked too high based only on a few matches. As data sets become larger and more uneven, Glicko's ability to incorporate rating deviation ensures that the rankings accurately reflect the true performance throughout the dataset, even when new models appear with limited match histories. This flexibility makes Glicko particularly effective for large-scale LLM assessments where uneven matchup distributions are prevalent. + +Best Practice 3. Glicko is effective for large data sets with uneven matches due to its rating deviation parameter, which manages uncertainty and prevents models with few matches from being overrated. + +# 5.4 Bradley-Terry for other Dataset Types + +For small, uneven datasets, Bradley-Terry's simplicity and ability to model pairwise comparisons make it a robust choice, even when the data distribution is skewed. It does not require parameter estimation, which allows it to handle small datasets efficiently without the need for complex adjustments or hyperparameter tuning, making it ideal for situations where uneven distributions might otherwise require additional preprocessing. + +In the case of large, evenly distributed datasets, Bradley-Terry is effective because of its scalability and ease of interpretation. For large data sets where the distribution of results is balanced, Bradley-Terry's ability to produce clear, interpretable rankings without adding excessive computational overhead is a significant advantage. Although more complex models such as Glicko can offer finer granularity in large, uneven data cases, Bradley-Terry's efficiency and interpretability make it a viable alternative when computational simplicity and transparency are prioritized. + +Best Practice 4. Bradley-Terry's scalability and interpretability make it a viable choice for large, evenly distributed datasets, offering clear rankings with minimal computational overhead. + +# 6 Related Work + +Pairwise ranking has recently emerged as a popular method for evaluating LLMs, as it allows for direct comparisons between models and provides a more nuanced assessment of their performance than traditional metrics (Chiang et al., 2024). This evaluation involves presenting human judges with pairs of model outputs and asking them to select the better one. The outcomes of these pairwise comparisons are then aggregated into final rankings using ranking algorithms such as Elo (Elo, 1978). Despite their widespread use, there has been limited research on the applicability of these ranking algorithms to LLM evaluation. Works such as (Boubdir et al., 2023) have critically analyzed the compatibility of Elo with LLM evaluations by examining how well it adheres to reliability and transitivity. However, Elo is not the only ranking algorithm used in LLM evaluation. There exists a number of other algorithms that have been proposed to rank in different contexts, such as the Bradley-Terry model (Bradley and Terry, 1952) and Glicko (Glickman and Jones, 1999), which have been shown to outperform Elo in certain scenarios, but their performance in the context of LLM evaluation has not been systematically evaluated. However, several factors affect the performance of these algorithms, such as the distribution of the data, the number of models that are compared, and the number of pairwise comparisons. As such, there is a need for a systematic comparison of ranking algorithms in the context of LLM evaluation to identify the most suitable algorithm for different scenarios which this paper aims to address. + +# 7 Conclusion + +In this paper, we explore the application of several ranking algorithms in the context of evaluating LLMs. Through our experiments and analysis, we identify significant limitations in the ability of these algorithms to maintain stable and accurate ranking across varying dataset types and distribution patterns. To combat these challenges, we introduce a set of guidelines for selecting the most appropriate ranking system based on the specific characteristics of the evaluation task and available resources. We + +believe that our findings and recommendations will be valuable to researchers and practitioners working in the field of LLM evaluation, and we hope that our work will inspire further research in this area. + +# 8 Limitations + +While our study comprehensively explores the ranking of Large Language Models (LLMs) through head-to-head combat, several limitations warrant discussion. + +**Scalability Constraints** One significant limitation arises from the scalability constraints inherent in pairwise evaluations. As the number of LLMs in the ecosystem expands, the number of required comparisons grows quadratically. This introduces computational challenges and resource constraints that may limit the feasibility of exhaustive head-to-head evaluations, particularly for larger sets of models. + +Human Feedback Variability Another concern is the variability in human feedback, on which our rankings are heavily based. Human judgments can be subjective and influenced by numerous factors, including the individual's background, expertise, and contextual understanding. This variability can introduce noise into the ranking system, affecting the evaluations' stability and reliability. + +# References + +Meriem Boubdir, Edward Kim, Beyza Ermis, Sara Hooker, and Marzieh Fadaee. 2023. Elo uncovered: Robustness and best practices in language model evaluation. arXiv preprint arXiv:2311.17295. +Ralph Allan Bradley and Milton E Terry. 1952. Rank analysis of incomplete block designs: I. the method of paired comparisons. Biometrika, 39(3/4):324-345. +Thomas Callaghan, Peter J Mucha, and Mason A Porter. 2003. Random walker ranking for ncaa division i-a football. arXiv. +Thomas Callaghan, Peter J Mucha, and Mason A Porter. 2004. The bowl championship series: A mathematical review. arXiv. +Wei-Lin Chiang, Zhuohan Li, Zi Lin, Ying Sheng, Zhanghao Wu, Hao Zhang, Lianmin Zheng, Siyuan Zhuang, Yonghao Zhuang, Joseph E. Gonzalez, Ion Stoica, and Eric P. Xing. 2023. Vicuna: An open-source chatbot impressing gpt-4 with $90\%$ * chatgpt quality. + +Wei-Lin Chiang, Lianmin Zheng, Ying Sheng, Anastasios Nikolas Angelopoulos, Tianle Li, Dacheng Li, Hao Zhang, Banghua Zhu, Michael Jordan, Joseph E. Gonzalez, and Ion Stoica. 2024. Chatbot arena: An open platform for evaluating llms by human preference. Preprint, arXiv:2403.04132. +H. A. David. 1988. The Method of Paired Comparisons, 2nd edition. Griffin's Statistical Monographs & Courses, Oxford University Press, London: New York. Revised edition, Griffin's statistical monographs & courses; no. 41. +Tim Dettmers, Artidoro Pagnoni, Ari Holtzman, and Luke Zettlemoyer. 2024. Qlora: Efficient finetuning of quantized lms. Advances in Neural Information Processing Systems, 36. +Yann Dubois, Chen Xuechen Li, Rohan Taori, Tianyi Zhang, Ishaan Gulrajani, Jimmy Ba, Carlos Guestrin, Percy S Liang, and Tatsunori B Hashimoto. 2024. Alpacafarm: A simulation framework for methods that learn from human feedback. Advances in Neural Information Processing Systems, 36. +A.E. Elo. 1978. The Rating of Chessplayers, Past and Present. Arco Pub. +Leo Gao, Jonathan Tow, Baber Abbasi, Stella Biderman, Sid Black, Anthony DiPofi, Charles Foster, Laurence Golding, Jeffrey Hsu, Alain Le Noac'h, Haonan Li, Kyle McDonell, Niklas Muennighoff, Chris Ociepa, Jason Phang, Laria Reynolds, Hailey Schoelkopf, Aviya Skowron, Lintang Sutawika, Eric Tang, Anish Thite, Ben Wang, Kevin Wang, and Andy Zou. 2023. A framework for few-shot language model evaluation. +Mark E Glickman. 1999. Parameter estimation in large dynamic paired comparison experiments. Journal of the Royal Statistical Society Series C: Applied Statistics, 48(3):377-394. +Mark E Glickman and Albyn C Jones. 1999. Rating the chess rating system. CHANCE-BERLIN THEN NEW YORK-, 12:21-28. +Zishan Guo, Renren Jin, Chuang Liu, Yufei Huang, Dan Shi, Linhao Yu, Yan Liu, Jiaxuan Li, Bojian Xiong, Deyi Xiong, et al. 2023. Evaluating large language models: A comprehensive survey. arXiv preprint arXiv:2310.19736. +Chandra Irugalbandara, Ashish Mahendra, Roland Daynauth, Tharuka Kasthuri Arachchige, Krisztian Flautner, Lingjia Tang, Yiping Kang, and Jason Mars. 2023. Scaling down to scale up: A cost-benefit analysis of replacing openai's gpt-4 with self-hosted open source slms in production. arXiv preprint arXiv:2312.14972. +Maurice G Kendall and B Babington Smith. 1940. On the method of paired comparisons. Biometrika, 31(3/4):324-345. +Gary King and Langche Zeng. 2001. Logistic regression in rare events data. Political analysis, 9(2):137-163. + +Paul Kvam and Joel S Sokol. 2006. A logistic regression/markov chain model for ncaa basketball. *Naval Research Logistics (NrL)*, 53(8):788-803. +Ricky Sanjaya, Jun Wang, and Yaodong Yang. 2022. Measuring the Non-Transitivity in Chess. Algorithms, 15(5):152. +Alex Wang, Yada Pruksachatkun, Nikita Nangia, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel R. Bowman. 2020. Superglue: A stickier benchmark for general-purpose language understanding systems. Preprint, arXiv:1905.00537. +Alex Wang, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel R. Bowman. 2019. Glue: A multi-task benchmark and analysis platform for natural language understanding. Preprint, arXiv:1804.07461. +Minghao Wu and Alham Fikri Aji. 2023. Style over substance: Evaluation biases for large language models. arXiv. +Lianmin Zheng, Wei-Lin Chiang, Ying Sheng, Siyuan Zhuang, Zhanghao Wu, Yonghao Zhuang, Zi Lin, Zhuohan Li, Dacheng Li, Eric Xing, et al. 2024. Judging llm-as-a-judge with mt-bench and chatbot arena. Advances in Neural Information Processing Systems, 36. + +# A Appendix + +# A.1 Glicko Algorithm Details + +For model $i \in M$ , the rating and the rating deviation are updated as: + +$$ +\theta_ {i} ^ {\prime} = \theta_ {i} + \frac {q}{\frac {1}{\sigma_ {i} ^ {2}} + \frac {1}{d ^ {2}}} \sum_ {j = 1} ^ {J} g \left(\sigma_ {j}\right) \left(S _ {i j} - p _ {i j}\right) \tag {6} +$$ + +$$ +\sigma_ {i} ^ {\prime} = \left(\frac {1}{\sigma_ {i} ^ {2}} + \frac {1}{d ^ {2}}\right) ^ {- 1} \tag {7} +$$ + +where $q = \log (10) / 400$ , $J$ is the set of opponents for $i$ and $g(\sigma) = 1 / \sqrt{1 + 3q^2\sigma^2 / \pi^2}$ . + +Given the rating $\theta_{i}$ and $\theta_{j}$ of model $i$ and $j$ , the expected outcome $p_{ij}$ is calculated as: + +$$ +p _ {i j} = \frac {1}{1 + 1 0 ^ {- g \left(\sigma_ {j}\right) \left(\theta_ {i} - \theta_ {j}\right) / 4 0 0}} \tag {8} +$$ + +$$ +d ^ {2} = \left(q ^ {2} \sum_ {j = 1} ^ {J} g \left(\sigma_ {j}\right) ^ {2} p _ {i j} \left(1 - p _ {i j}\right)\right) ^ {- 1} \tag {9} +$$ + +where $d^2$ is the scaling factor for the system's certainty. + +# A.2 Markov Chain Details + +The Markov Chain Model was originally developed as a random walker model Callaghan et al. (2003, 2004) where ranks were calculated by solving a series of differential equations. This method was adapted into a Markov Chain Model by (Kvam and Sokol, 2006). When expressed as a Markov chain, the elements $T_{ij}$ of the transition matrix $T$ are the probabilities that a walker moves from model $i$ to $j$ in a single time step, with the initial values computed as follows: + +$$ +t _ {i j} = \frac {1}{N _ {i}} \left[ w _ {i j} (1 - p) + l _ {i j} p \right], \quad \forall j \neq i \tag {10} +$$ + +$$ +t _ {i j} = \frac {1}{N _ {i}} \left[ W _ {i} p + L _ {i} (1 - p) \right] \tag {11} +$$ + +where $W_{i}, L_{i}$ are the number of matches won by model $i$ and $w_{ij}, l_{ij}$ are the number of games won by model $i$ against model $j$ . + +The steady-state probability vector $\pi = [\theta_i]$ represents the final ranking of each team $i\in M$ such that $\pi T = \pi$ and $\sum_{i = 1}^{m}\theta_{i} = 1$ . + +# A.3 F1 scores per model + +In this paper, F1 scores are used as an evaluation metric to assess the consistency and predictive performance of the ranking algorithms. The F1 score is calculated based on the precision and recall of the correctly predicted pairwise outcomes compared to the observed outcomes in the dataset. In the following, we detail the methodology for computing the F1 scores: + +Let the data set consist of $m$ pairwise matches between models. For each pair $(i,j)$ , $p_{ij}$ is the probability that the model $i$ beats $j$ in a random match. If model $i$ plays $M_i$ matches then $E_i$ , the expected number of games won by model $i$ is $E_i = \lfloor M_i p_{ij} \rfloor$ and the actual number of games won is given by $A_i$ . + +The Precision and Recall are calculated as: + +$$ +\text {p r e c i s i o n} = \frac {\left| E _ {i} \cap A _ {i} \right|}{\left| E _ {i} \right|}, \quad \text {r e c a l l} = \frac {\left| E _ {i} \cap A _ {i} \right|}{\left| A _ {i} \right|} +$$ + +The F1 score is calculated as the harmonic mean of precision and recall: + +$$ +F 1 \text {S c o r e} = 2 \cdot \frac {\text {P r e c i s i o n} \cdot \text {R e c a l l}}{\text {P r e c i s i o n} + \text {R e c a l l}}. +$$ + +The total F1 score for a ranking algorithm is computed by averaging the F1 scores for all pairwise matches $(i,j)$ : + +$$ +F 1 \operatorname {S c o r e} _ {\text {O v e r a l l}} = \frac {1}{| M |} \sum_ {(i, j) \in M} F 1 \operatorname {S c o r e} _ {(i, j)}, +$$ + +where $M$ is the set of all pairwise matches. + +Figures 3 and 4 show the F1 scores for both the SLAM and Arena datasets, and also their overall F1 score. + +![](images/432adeb32d185a28c5edcf76589acad0797f49e33eb6c0ec8bf925b8e80f4d4c.jpg) +Figure 3: F1 scores for all models in the SLAM dataset. + +![](images/003be54b51f16129a40501a4e09409f21553bb345688785731f177608c2e075c.jpg) +Figure 4: F1 scores of the top ten (10) highest and lowest ranked models using the Elo rating system on the Chatbot Arena dataset. In general, Elo provides the best prediction accuracy by achieving an F1 score of 0.90. + +# A.3.1 Experimental Setup + +To evaluate the predictive accuracy of the ranking algorithms, each data set was split into a $75\%$ training set and a $25\%$ test set. + +# A.3.2 Procedure + +The ranking algorithms were applied to the training set to compute model rankings based on pairwise matchups. Using these rankings, the algorithms predicted the outcomes of matchups in the test set, expressed as the number of games each model was expected to win. These predictions were compared with the actual results of the match and the precision, recall and F1 scores were calculated for each match. + +The F1 scores, aggregated across all matches in the test set, quantified the alignment between the predicted and observed results, providing a measure of the ability of each algorithm to generalize to unseen data. + +# A.4 Elo's rank at $k = 3$ vs $k = 5$ + +To analyze the sensitivity of Elo rankings to hyperparameter settings, we conducted experiments using two versions of Elo, with $K = 3$ and $K = 5$ , on the SLAM dataset. + +# A.4.1 Experimental Setup + +For each $K$ -factor, we evaluated Elo rankings under varying numbers of permutations: 1, 10, 100, and 1000. Permutations involve randomizing the order of matchups, a strategy commonly employed to reduce the effect of matchup order on final rankings and improve stability. + +# A.4.2 Procedure + +For each $K$ factor ( $K = 3$ and $K = 5$ ), Elo rankings were calculated using the raw SLAM matchup data without permutations. Matchup orders were permuted 1, 10, 100, and 1000 times for each factor $K$ , with Elo rankings recalculated after each set of permutations. Our findings (shown in figure 5), show volatility of Elo's ranking for each of the $k$ value. + +![](images/e05a83df3175e7a38870acf0fb4670613e38b0131f08afe555fb5f7e14999473.jpg) +(a) Ranks produced by Elo for $k = 3$ + +![](images/cd10fe1126debcc754506fd61353b931ecb0e70381a0cb35817cb506fc244f88.jpg) +(b) Ranks produced by Elo for $k = 5$ +Figure 5: Elo produces different ranks based on the value of the hyperparameter $k$ . Increasing the number of permutation can lead to more stable ratings, however, model ranks may still be unstable as is the case with orca-min_3b and neural-chat_7b. + +# A.5 Elo's Instability at higher permutation + +To analyze the performance of Elo at higher permutations, we conducted two separate experiments on the SLAM dataset. + +# A.5.1 Experimental Setup + +For a single $K$ factor of 25, we evaluated Elo rankings by performing two separate evaluations of each 10,000 permutation using the strategy of the previous section. + +# A.5.2 Procedure + +We observed the ranks produced by each experiment, showing that even with a large permutation, ELO can produce two different ranks for the same two models6. + +# A.6 Evaluating the consistency of crowd-workers evaluators + +In this section, we recommend a method to evaluate the consistency of crowd-worker evaluations based on the Analytic hierarchy process (AHP) practices. We begin by formally defining cycles in a pairwise ranking dataset. + +Definition A.1. For models $i_1, i_2, \dots, i_k \in M$ , if $p_{i_1i_2} > 0.5, p_{i_2i_3} > 0.5, \dots, p_{iki_1} > 0.5$ , then their games is said to be cyclic. A cycle of length three is called a Rock, Paper, Scissors (RPS) cycle. + +![](images/751550e26a3bade4b5d8a84b3699ea37ee3ca2e3f5a8381cd247bd4ae2fa9261.jpg) +Figure 6: Two separate ranks produced by ELO for permutations of 10,000 each. + +For any three models $i, j$ , and $k$ , it is expected that if a reviewer prefers $i$ over $j$ and $j$ over $k$ , they prefer $i$ over $k$ (transitivity). However, this may not always be due to personal preference, evaluation error, or evaluator negligence. If the transitive property does not hold, we say that the three models are intransitive and the evaluation is inconsistent. + +Measuring the consistency of pairwise ranking falls under the domain of AHP. According to AHP theory, if the number of RPS cycles remains small, it reflects the complexity of the ranking problem rather than the judges' complacency. However, a high number of cycles represents a low quality of judgments. + +According to (Kendall and Smith, 1940), the expected number of RPS cycles for a pairwise comparison dataset of $m$ items follows a $\chi^2$ distribution, and if the actual number of RPS cycles is significantly less than the expected number, we can be reasonably confident that the dataset is consistent. + +The number of RPS cycles can be calculated by first generating the win rate matrix $P$ as defined in section 4.2. This is followed by the adjacency matrix $A$ , where $a_{ij} = 1$ if $p_{ij} > 0.5$ and 0 otherwise. Finally, the total number of RPS cycles is calculated as $\rho = 1 / 3\sum_{i = 1}^{M}a_{i,i}^{*}$ , where $a_{ii}^{*}$ are diagonals of $A^3$ (Sanjaya et al., 2022). + +The $\chi^2$ statistic is calculated as: + +$$ +\chi^ {2} = \frac {8}{k - 4} \left\{\frac {1}{4} \binom {k} {3} - d - \frac {1}{3} + \rho \right\} \tag {12} +$$ + +$$ +v = \frac {k (k - 1) (k - 2)}{(k - 4) ^ {2}} \tag {13} +$$ + +where $v$ is the degrees of freedom. + +The RPS count and $\chi^2$ statistic for both the SLAM and Arena datasets are shown in table 6. At a p-value close to 0, we can be confident that inconsistencies are not due to the quality of the judges. + +Table 6: Non-Transitivity statistic for the two datasets that were used. The p-value is calculated based on the $\chi^2$ estimated via Kendal's Chi-squared approximation to the circular triad distribution. + +
DatasetRPS Countx²p-value
SLAM1945.060.001
Arena3931107.250.000
\ No newline at end of file diff --git a/rankingunraveledrecipesforllmrankingsinheadtoheadaicombat/images.zip b/rankingunraveledrecipesforllmrankingsinheadtoheadaicombat/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..2ac733d6eceeeea2a8e7468a3d6b89f3c7281d58 --- /dev/null +++ b/rankingunraveledrecipesforllmrankingsinheadtoheadaicombat/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dbff0393b6b73d2ae47148e6f17e82f3c9bb590f142c433b11b842b51584840c +size 557307 diff --git a/rankingunraveledrecipesforllmrankingsinheadtoheadaicombat/layout.json b/rankingunraveledrecipesforllmrankingsinheadtoheadaicombat/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..6098ed53085f5cafd362187965e1ee937e150e97 --- /dev/null +++ b/rankingunraveledrecipesforllmrankingsinheadtoheadaicombat/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:763ac1031de286c9700ad28b5cbb856e5ea4a8d3299f3802441eb98a8eda31ce +size 486858 diff --git a/rareretrievalaugmentedreasoningenhancementforlargelanguagemodels/b975a564-3470-43bc-aefc-a67598ac26f4_content_list.json b/rareretrievalaugmentedreasoningenhancementforlargelanguagemodels/b975a564-3470-43bc-aefc-a67598ac26f4_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..d16a0b99ec6f746275ceba29ec8f837995a02586 --- /dev/null +++ b/rareretrievalaugmentedreasoningenhancementforlargelanguagemodels/b975a564-3470-43bc-aefc-a67598ac26f4_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2e517b0318d517096b06a1ae5f848b3a10d236a5678b3072941b68106290cf1d +size 140352 diff --git a/rareretrievalaugmentedreasoningenhancementforlargelanguagemodels/b975a564-3470-43bc-aefc-a67598ac26f4_model.json b/rareretrievalaugmentedreasoningenhancementforlargelanguagemodels/b975a564-3470-43bc-aefc-a67598ac26f4_model.json new file mode 100644 index 0000000000000000000000000000000000000000..92f4f718d9a090ed74a0438437ee089ea619d27c --- /dev/null +++ b/rareretrievalaugmentedreasoningenhancementforlargelanguagemodels/b975a564-3470-43bc-aefc-a67598ac26f4_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b38eddab2966d2af285cb4b06d18bf5075602689d35616e2d9a571b50984dcf7 +size 172583 diff --git a/rareretrievalaugmentedreasoningenhancementforlargelanguagemodels/b975a564-3470-43bc-aefc-a67598ac26f4_origin.pdf b/rareretrievalaugmentedreasoningenhancementforlargelanguagemodels/b975a564-3470-43bc-aefc-a67598ac26f4_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..22d1215011ae056c302c63fa3480fa56024c174a --- /dev/null +++ b/rareretrievalaugmentedreasoningenhancementforlargelanguagemodels/b975a564-3470-43bc-aefc-a67598ac26f4_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3355d713659ec4ba0326761763f20b332036971fcaf88ae579fec301248b11a6 +size 1558486 diff --git a/rareretrievalaugmentedreasoningenhancementforlargelanguagemodels/full.md b/rareretrievalaugmentedreasoningenhancementforlargelanguagemodels/full.md new file mode 100644 index 0000000000000000000000000000000000000000..a0d9e57f7fdc5909eb4cee2fe63d047fbbc9910e --- /dev/null +++ b/rareretrievalaugmentedreasoningenhancementforlargelanguagemodels/full.md @@ -0,0 +1,568 @@ +# RARE: Retrieval-Augmented Reasoning Enhancement for Large Language Models + +Hieu Tran1, Zonghai Yao1, Zhichao Yang1, Junda Wang1, Yifan Zhang2, Shuo Han2, Feiyun Ouyang2, Hong Yu1,2 + +1University of Massachusetts, Amherst +2University of Massachusetts, Lowell + +# Abstract + +This work introduces RARE (Retrieval-Augmented Reasoning Enhancement), a versatile extension to the mutual reasoning framework (rStar), aimed at enhancing reasoning accuracy and factual integrity across large language models (LLMs) for complex, knowledge-intensive tasks such as medical and commonsense reasoning. RARE incorporates two innovative actions within the Monte Carlo Tree Search framework: (A6), which generates search queries based on the initial problem statement, performs information retrieval using those queries, and augments reasoning with the retrieved data to formulate the final answer; and (A7), which leverages information retrieval specifically for generated sub-questions and re-answers these sub-questions with the relevant contextual information. Additionally, a Retrieval-Augmented Factuality Scorer is proposed to replace the original discriminator, prioritizing reasoning paths that meet high standards of factuality. Experimental results with LLaMA 3.1 show that RARE enables open-source LLMs to achieve competitive performance with top closed-source models like GPT-4 and GPT-4o. This research establishes RARE as a scalable solution for improving LLMs in domains where logical coherence and factual integrity are critical1. + +# 1 Introduction + +Question answering (QA) is a cornerstone task in natural language processing that involves generating answers to questions posed in natural language. QA spans a broad spectrum of domains and types, ranging from open-domain QA (Yang et al., 2018; Kwiatkowski et al., 2019) to more specialized areas like medical QA (Jin et al., 2021; Cao et al., 2011). The overwhelming volume and complexity of medical information necessitate medical QA, which benefits many downstream tasks such as medical + +education, clinical decision support, and patient care optimization (Cai et al., 2023; Liu et al., 2023; Jin et al., 2024b). + +Medical QA represents a unique and demanding subset of QA, requiring models to navigate intricate medical knowledge, interpret clinical scenarios, and select correct and contextually appropriate options (Singhal et al., 2023b; Wu et al., 2024). Similar to general domain QA, Medical QA requires structured multi-step reasoning, where answers emerge from various sequential steps. Take Figure 1 as an example, to find appropriate treatment given patient information, the QA model should first identify patient conditions (colored in red, e.g., chief complaint and past conditions), then analyze contributing factors and diagnose the disease (colored in blue), and determine appropriate evidence-based interventions in the final step (colored in yellow). Without such structured multi-step reasoning, it would be challenging to arrive at an accurate and contextually relevant answer for such a complex medical question. + +Moreover, Medical QA presents two non-trivial challenges that distinguish it from general-domain QA. First, Medical QA depends heavily on domain-specific knowledge that is not always available within pre-trained models, necessitating knowledge-based retrieval from external sources (Xiong et al., 2024a). Figure 1 is an example which involves specific medical terms such as allergic conjunctivitis. In addition, medical knowledge evolves rapidly, and new treatments or updated guidelines may not be included in the model's pretrained corpus. For example, newer drugs (like epinastine hydrochloride for allergic conjunctivitis) may be recommended by recent guidelines but absent in older pre-trained models. Second, Medical QA encompasses a wide variety of question types, including not only multi-step reasoning and knowledge-based retrieval as previously mentioned, but also composite questions requiring iterative evi + +![](images/99f0b6c37675be0f0c0757ba5a2ab3b2e038de5ba0151802414118f98e3a68b7.jpg) +Figure 1: Overview of our reasoning process, which combines generation and factuality scoring. (1) A retrieval-augmented generator produces multiple candidate reasoning paths using Monte Carlo Tree Search (MCTS); (2) a retrieval-augmented factuality scorer evaluates the factual accuracy of each reasoning path; (3) the trajectory with the highest factuality score is selected as the final answer. + +dence retrieval, where they demand retrieval of relevant knowledge at each reasoning step to ensure accuracy and relevance throughout the process. + +In parallel, Commonsense Question Answering shares similar complexities with Medical QA, particularly in its reliance on structured multi-step reasoning and iterative evidence retrieval. While Medical QA draws heavily on domain-specific knowledge, Commonsense QA focuses on leveraging a model's understanding of general world knowledge and logical connections to answer questions that are often indirect or abstract. For example, tasks like StrategyQA (Geva et al., 2021) require models to infer hidden relationships and execute multi-hop reasoning, akin to diagnosing a condition in Medical QA (Trivedi et al., 2023; Bauer et al., 2018; Chen et al., 2020). This similarity in reasoning processes across both domains underscores the importance of designing frameworks that can adapt to and optimize multi-step reasoning workflows, irrespective of the domain. + +In this paper, we propose Retrieval-Augmented Reasoning Enhancement (RARE) to handle aforementioned challenges. We built upon rStar (Qi et al., 2024) where a language model generates reasoning steps and another verifies them, improving accuracy without fine-tuning or superior models. To answer knowledge-based questions, RARE designed a new action A6, which generates multiple search queries based on the question and retrieves relevant documents. To answer composite + +questions, we add action A7, which refines subquestions, retrieves targeted information, and updates the next step. RARE applies the Monte Carlo Tree Search (MCTS) algorithm to select the best action path that leads to the final answer. In addition, RARE is complemented by Retrieval-Augmented Factuality Scorer (RAFS) that evaluates and ranks reasoning paths for factual accuracy. + +We applied RARE and other baselines on 3 medical QA tasks and 3 general domain QA tasks. Results show that RARE significantly enhances accuracy across various LLMs, enabling the open-source LLMs (LLaMA 3) to achieve competitive performance with top closed-source LLMs like GPT-4o. Our contributions are as follows: + +1. Formulating Medical QA as Multi-Step Reasoning: We build upon the rStar framework to model medical QA as a structured multi-step reasoning task, addressing the complexity and sequential nature of medical queries. +2. Novel Retrieval Actions: We introduce two retrieval-augmented actions within the MCTS framework, enabling the integration of real-time, context-specific information to enhance reasoning accuracy and relevance. +3. Retrieval-Augmented Factuality Scorer: We propose a Retrieval-Augmented Factuality Scorer to evaluate and rank reasoning paths, + +# Actions + +![](images/dfde9208ff2e3bb2cefd50cd1b2356bbab50bbd6874622937e395be0659738ca.jpg) + +Propose a one-step thought + +![](images/c360cb7189ffbe8e5edaa574097d6d357c1e6642f9a5a3388ed2be80a7110305.jpg) + +Complete remaining thought + +![](images/c1029b57dbce03118420e6d45fdc107e978a72fe86006d6aba4bf70491513dfb.jpg) + +Propose a subquestion and + +answer + +![](images/69d74e7de4e7b1d522e1a0743789b010e062aa3747e0a7270ed56fe6e4553019.jpg) + +Reanswer the subquestion + +Rephrase the question + +![](images/5e62f3666fd5393fc5d826fb45b9d480f7ba45ae6026595d932b0eca616f03d7.jpg) + +Search Query Generation + +![](images/3107b7332b393211d9eae89e08cd18d0cece59cb61b1eb6bbfa0acbced33a30f.jpg) + +2.1.1.1.1 + +Sub-question Retrieval and Re-answering + +...Therefore, warm compresses would be the most appropriate treatment for this patient. The answer is C: Warm compresses. + +![](images/5c9996a7847dc5f977beb246407619e7c053b093c1d2656090456025ff3681bc.jpg) +Figure 2: An example to illustrate the process of retrieval-augmeted generator. Highlighted nodes from top to bottom constitute a complete reasoning trace. Given a question, MCTS augments the LLM to explore a rich, human-like reasoning action space and generate the next steps based on the current state. + +ensuring they maintain both logical coherence and factual reliability throughout the reasoning process. + +# 2 Preliminaries + +This section introduces the foundational concepts and notations used in this work, focusing on the Monte Carlo Tree Search (MCTS) algorithm and the rStar framework (Qi et al., 2024), which serve as the basis for our proposed RARE method. + +# 2.1 Monte Carlo Tree Search (MCTS) + +Monte Carlo Tree Search (MCTS) is a decision-making algorithm that incrementally builds a search tree by simulating outcomes to estimate action values, making it effective for complex reasoning tasks (Browne et al., 2012). It operates through iterative selection, expansion, simulation, and backpropagation phases, balancing exploration and exploitation via the Upper Confidence Bound applied on Trees (UCT). MCTS enables adaptive strategy refinement in large search spaces where direct computation is infeasible. A detailed explanation of MCTS and its implementation can be found in the Appendix A.5. + +# 2.2 Mutual Reasoning Makes Smaller LLMs Stronger Problem-Solvers + +Building upon MCTS, (Qi et al., 2024) proposed rStar, a framework that augments MCTS with a diverse set of reasoning actions. This enhancement is designed to improve exploration of the solution space in complex reasoning tasks by allowing more dynamic and human-like reasoning + +pathways. Traditional approaches, such as Chain of Thought (CoT) reasoning (Wei et al., 2022) or self-consistency (Wang et al., 2022), often rely on a single action type, which can limit the diversity and effectiveness of generated solutions. In contrast, rStar incorporates five distinct actions that enable more adaptive exploration(the prompt for each action can be found in Appendix A.7): + +- A1: Propose a One-Step Thought. This action generates the next reasoning step based on previous steps, allowing the LLM to build the solution incrementally. +- A2: Propose Remaining Thought Steps. This action enables the LLM to produce all remaining reasoning steps in one inference, similar to CoT, for simpler questions. +- A3: Generate Next Sub-question and Answer. This action decomposes the main problem into a sequence of sub-questions, each solved in turn. +- A4: Re-answer Sub-question. This action allows the LLM to re-answer a previously generated sub-question, increasing accuracy by using few-shot prompting. +- A5: Rephrase Question/Sub-question. This action rephrases the question to clarify conditions and reduce misunderstandings, enhancing the LLM's interpretation of the problem. + +# 3 Methodology + +# 3.1 Overview of RARE Framework + +Inspired by the generator-discriminator structure of rStar (Qi et al., 2024), RARE introduces a retrieval- + +![](images/2359545c8cc149b411bb7892b8cf0ca3ea21e6e179eb592ba5ee7844dbe1fb5d.jpg) +A6 + +The patient had bladder infection. Which of the following conditions is also commonly associated with this double-stranded DNA virus infection? A: Gastroenteritis, B: Painful dermatomal vesicles, C:Lymphadenopathy, D: Vesicular rash + +![](images/f2ede844e483cde96a4e9e2ebcad9104c9a144c0cf15be6c42a0cb105110aaa8.jpg) +Question + +augmented generator and a factuality scorer to enhance reasoning accuracy and factual integrity in large language models. As illustrated in Figure 1, RARE operates in two main stages: + +Candidate Generation with Retrieval-Augmented Generator: The retrieval-augmented generator builds on the MCTS-based rStar self-generator, incorporating two new retrieval-augmented actions that dynamically fetch relevant external information. These actions improve the relevance and accuracy of candidate reasoning paths by integrating contextually enriched knowledge into intermediate reasoning steps, especially for complex questions, illustrated in Figure 2. + +Factuality Evaluation with Retrieval-Augmented Factuality Scorer : Replacing the discriminator in rStar, the Retrieval-Augmented Factuality Scorer evaluates each candidate trajectory's factual reliability. This scorer verifies the alignment of intermediate reasoning steps with retrieved evidence, assigning a factuality score that reflects the trajectory's consistency with external knowledge. The trajectory with the highest + +factuality score is selected as the final answer, prioritizing the most factually supported reasoning path. This selection ensures coherence and factual alignment, enhancing response reliability. + +Through these stages, RARE systematically integrates retrieval-based evidence into the reasoning process, optimizing both reasoning coherence and factual accuracy. This approach makes RARE well-suited for knowledge-intensive tasks, such as commonsense and medical reasoning. + +![](images/615deca73a0bc559de3cd5a515a92d094012e32305032fc405f8bc9567ef2310.jpg) +Figure 3: Illustration of the proposed retrieval-augmented action A6 in RARE: Given a question, LLMs generate search queries and retrieve relevant documents to construct a contextually enriched final answer. Key entities are underlined. +Figure 4: Illustration of the proposed retrieval-augmented action A7 in RARE: LLMs decompose the question into sub-questions, perform retrieval for each sub-question, and re-answer them based on the retrieved documents. The final sub-question is a rephrased version of the original question, so the sub-answer to this final sub-question also serves as the answer to the original question. In comparison with previous figure, we can find that A6 tends to use existing entity from the main question where A7 tends to use additional entity from previous subanswer. + +# 3.2 Retrieval-Augmented Generator + +Traditional retrieval-augmented generation methods often rely on a single retrieval step before generating responses, which limits their effectiveness in complex reasoning tasks. However, recent advances in medical RAG have demonstrated the importance of iterative retrieval in improving reasoning quality. i-MedRAG (Xiong et al., 2024b) highlights that multi-turn retrieval, where an LLM generates follow-up queries dynamically, signifi + +# Retrieval-Augmented Factuality Scorer (RAFS) + +![](images/2220703fc39887134fb89c36dfd2522506f0e6818c163ae3ce63a81b10c54b2a.jpg) +Figure 5: The RAFS assesses the factual accuracy of reasoning paths in four steps. (1) Split into sentences: The reasoning is divided into individual statements. (2) Generate retrieval queries: For each statement, an LLM generates multiple queries aimed at retrieving relevant information. (3) Retrieve information: The retrieval system gathers supporting information based on these queries. (4) Rate using retrieved information: Each statement is evaluated against the retrieved information and labeled as Supported or Not Supported. The final output includes a factuality score, calculated as the proportion of supported statements, which aids in selecting the most factually reliable reasoning path. + +cantly enhances response accuracy by refining its knowledge base. Inspired by this approach, we introduce two new retrieval-augmented actions into the original rStar self-generator (Qi et al., 2024), transforming it into a Retrieval-Augmented Generator, as illustrated in Figures 3 and 4. These retrieval-augmented actions enable the generator to dynamically incorporate external knowledge during intermediate reasoning steps, improving both the contextual relevance and factual accuracy of generated responses. + +- A6: Search Query Generation and Information Retrieval. In this step, the LLM generates targeted search queries from the original question and retrieves relevant information. This additional context is then used to enrich the reasoning path, enabling the model to deliver a more comprehensive and contextually grounded final answer. +A7: Sub-question Retrieval and Reanswering. Unlike Action A6, which centers + +on the main question, this action targets subquestions generated by Action A3. For each sub-question, the model fetches relevant information and re-answers accordingly. By refining these intermediary steps, A7 improves the reasoning chain's coherence and factual reliability, resulting in more accurate overall outcomes. + +By incorporating these retrieval-augmented actions, the generator can explore a wider range of possible solutions, leading to reasoning paths that are both logically coherent and enriched with external knowledge. This upgrade transforms the generator into a retrieval-augmented generator, enabling RARE to better handle complex, knowledge-intensive reasoning tasks. We draw on a diverse corpus—PubMed, StatPearls, medical textbooks, and Wikipedia—for authoritative, up-to-date information. For efficient retrieval, we employ the ColBERT model (Khattab and Zaharia, 2020), a dense retrieval approach optimized for passage-level retrieval, enabling fine-grained token-level matching + +to enhance the precision of retrieved information. Additional details on the retrieval corpus and model can be found in Appendix A.4, the prompt for each action can be found in Appendix A.7. + +# 3.3 Retrieval-Augmented Factuality Scorer (RAFS) + +Inspired by the Search Augmented Factuality Evaluator (SAFE) (Wei et al., 2024), which combines an LLM (GPT-3.5-turbo) with Google Search to evaluate the factuality of responses, RARE introduces the Retrieval-Augmented Factuality Scorer. RAFS adapts this approach by replacing GPT-3.5-turbo with LLaMA 3.1 and Google Search with a corpus index retrieval system containing both general-domain knowledge (Wikipedia) and medical-domain resources (PubMed, StatPearls, and Medical Textbooks). This adaptation enhances domain specificity and accessibility for tasks requiring specialized knowledge. To assess the factual accuracy of generated reasoning paths, RAFS evaluates each candidate trajectory in four systematic steps, as illustrated in Figure 5. More details about the retrieval corpus can be found in Appendix A.4. + +1. Split into Statements: Each reasoning path is divided into individual statements. +2. Generate Retrieval Queries: For each statement, RAFS employs an LLM to generate multiple retrieval queries designed to retrieve contextually relevant evidence. +3. Retrieve Information: The retrieval system gathers documents or information that corresponds to each generated query. +4. Rate Using Retrieved Information: Each statement is compared against the retrieved evidence and labeled as either Supported or Not Supported, based on alignment with the information. The overall factuality score for the reasoning path is calculated as the proportion of supported statements, indicating the trajectory's factual reliability. + +As shown in Figure 5, RAFS outputs a factuality score along with Supported or Not Supported labels for each statement. This scoring aids in selecting the most reliable reasoning path from multiple candidates, allowing RARE to prioritize responses that align closely with verified external knowledge. + +
ModelMethodMedQAMedMCQAMMLU-MAvg
LLaMA3.2 3BCoT52.6349.8257.6753.37
MedRAG52.0851.7865.5856.48
i-MedRAG60.8853.6066.7660.41
SC56.0950.8558.4955.14
rStar61.2754.2667.2260.92
RARE63.8656.6170.9863.82
LLaMA3.1 8BCoT61.5155.1571.6362.76
MedRAG63.0056.8774.5664.81
i-MedRAG73.6161.6178.4271.21
SC64.7356.3572.7364.60
rStar70.4062.1379.1670.56
RARE75.5764.3281.6373.84
LLaMA3.1 70BCoT76.6768.7581.7275.71
MedRAG77.6171.1984.7677.85
i-MedRAG82.4072.3886.6980.49
SC79.4970.1982.7377.47
rStar84.9972.7287.1981.63
RARE87.4375.1890.9184.51
Meditron 70BCoT51.6946.7464.9254.45
Mixtral (8x7B)CoT64.1056.2874.0164.80
GPT-3.5CoT65.0455.2572.9164.40
GPT-4CoT83.9769.8889.4481.10
GPT-4o MiniCoT73.2966.1784.3074.59
GPT-4oCoT85.5574.7090.4583.57
+ +Table 1: Performance of RARE and baseline methods on three medical reasoning benchmarks: MedQA, MedMCQA, and MMLU-Medical. SC is self-consistency. RARE consistently outperforms rStar across all model sizes, with improvements statistically significant at $\mathbf{p} < 0.01$ based on paired t-tests over multiple runs. + +# 4 Results + +In this section, we evaluate the performance of our proposed method, RARE, on both medical reasoning and commonsense reasoning tasks using three large language models: LLaMA 3.2 3B Instruct, LLaMA 3.1 8B Instruct and LLaMA 3.1 70B Instruct (Dubey et al., 2024). Throughout our work, we may drop "Instruct", but we are always referring to the "Instruct" versions. Detail settings of the experiments, descriptions of the evaluation tasks and baselines can be found in Appendix. + +# 4.1 Performance on Medical Reasoning tasks + +Table 1 shows the performance of RARE and various baseline methods on three challenging medical reasoning benchmarks: MedQA, MedMCQA, and MMLU-Medical. These datasets require not only complex reasoning but also a high degree of factual accuracy, making them suitable for evaluating the effectiveness of RARE's retrieval-augmented reasoning approach. The results demonstrate the effectiveness of RARE in enhancing the reasoning capabilities of LLaMA models compared to baseline methods, including Chain of Thought, MedRAG, iMedRAG, Self-Consistency(SC), and rStar. Across all model sizes—LLaMA3.2 3B, LLaMA3.1 8B, and LLaMA3.1 70B—RARE consistently outperforms baseline methods. On LLaMA3.1 8B, RARE + +achieves substantial gains, outperforming rStar by $5.17\%$ on MedQA, $2.19\%$ on MedMCQA, and $2.47\%$ on MMLU-Medical. The performance improvement becomes more pronounced as model size increases, with RARE-enhanced LLaMA3.1 70B outperforming GPT-4o on MedQA $(87.43\%)$ vs. $85.55\%$ and MMLU-Medical $(90.91\%)$ vs. $90.45\%$ ), highlighting its competitive edge. + +# 4.2 Performance on Commonsense Reasoning + +Table 2 presents the performance of RARE compared to other methods and larger language models on commonsense reasoning benchmarks, including StrategyQA, CommonsenseQA, and Physical IQA. These datasets test a range of commonsense reasoning skills, with StrategyQA requiring more multi-step reasoning. RARE consistently outperforms baseline methods, including CoT, MedRAG, iMedRAG, SC and rStar, across both LLaMA3.1 8B and LLaMA3.1 70B models. For LLaMA3.1 8B, RARE achieves substantial improvements over rStar, with gains of $6.45\%$ on StrategyQA, $4.26\%$ on CommonsenseQA, and $2.87\%$ on PIQA. On LLaMA3.1 70B, RARE further closes the gap with state-of-the-art proprietary models, achieving $85.74\%$ on StrategyQA, $86.98\%$ on CommonsenseQA, and $92.66\%$ on PIQA, surpassing GPT-4o. + +RARE's retrieval-augmented reasoning method provides substantially larger gains over CoT on multi-step inference tasks (like StrategyQA) compared to commonsense-heavy tasks (such as CommonsenseQA), indicating its particular effectiveness in handling implicit, multi-hop reasoning. Specifically, RARE's largest improvement over CoT is observed on StrategyQA(10.19%), where multi-step reasoning is crucial, suggesting that its retrieval-augmented reasoning enhancement method is particularly effective in handling implicit, multi-hop inference. In contrast, while RARE outperforms CoT on CommonsenseQA(7.22%), the gains are relatively smaller, indicating that tasks relying more on commonsense knowledge rather than explicit step-by-step reasoning do not benefit as significantly from retrieval-augmented reasoning. + +# 4.3 Ablation Study + +We conduct an ablation study on 250 MedQA samples using the LLaMA 3.1 8B model to assess the contributions of each RARE component (Table 3). Starting with the baseline (rStar) at $70.0\%$ accu + +
ModelMethodSQACQAPIQAAvg
LLaMA3.1 8BCoT67.8373.6276.1772.54
MedRAG66.0874.4578.6773.07
i-MedRAG68.1275.1880.5274.61
SC68.4174.9077.4273.58
rStar71.5776.5883.0477.06
RARE78.0280.8485.9181.59
LLaMA3.1 70BCoT76.7178.6281.6679.00
MedRAG75.5482.2386.0781.28
i-MedRAG77.2983.1387.7682.73
SC77.2978.8782.6779.61
rStar81.8083.6689.2784.91
RARE85.7486.9892.6688.46
Claude-3 HaikuCoT69.5867.4082.3273.10
Claude-3.5 SonnetCoT76.8674.1289.3980.12
GPT-4o MiniCoT78.6082.3188.4183.11
GPT-4oCoT80.6486.5091.1386.09
+ +Table 2: Performance comparison on common sense reasoning tasks with various LLMs and reasoning methods, evaluated on StrategyQA (SQA), Common-senseQA (CQA), and Physical IQA (PIQA). SC is self-consistency. RARE consistently outperforms rStar across all model sizes, with improvements statistically significant at $\mathbf{p} < 0.01$ based on paired t-tests over multiple runs. + +
ConfigurationAccuracy
rStar70.0
rStar + RAFS71.4
rStar + A672.4
rStar + A771.2
rStar + A6 + A773.2
RARE (rStar + A6 + A7 + RAFS)74.8
+ +Table 3: Ablation study on RARE components, evaluated on 250 MedQA samples using LLaMA 3.1 8B. + +racy, adding the RAFS improves reliability, increasing accuracy to $71.4\%$ . Incorporating A6 and A7 further boosts accuracy to $72.4\%$ and $71.2\%$ , respectively. Combining both actions yields $73.2\%$ , demonstrating their synergy in strengthening reasoning. The full RARE configuration, integrating rStar, A6, A7, and RAFS, achieves the highest accuracy $(74.8\%)$ , highlighting the collective impact of retrieval and factuality scoring in enhancing reasoning accuracy. + +# 4.4 Common Reasoning Paths Patterns + +Exploring common paths leading to correct answers helps us understand and refine the reasoning patterns that most reliably produce accurate solutions. Figures 8 and 9 illustrate the top 10 most common reasoning paths that lead to correct answers on MedQA and StrategyQA, respectively. + +In MedQA, prominent paths such as A1 $\rightarrow$ A2,A3 $\rightarrow$ A2,and A1 $\rightarrow$ A6 constitute a large + +share of successful reasoning. More complex sequences like $\mathrm{A}3 \to \mathrm{A}7 \to \mathrm{A}3$ also appear, demonstrating the generator's capacity to explore multiple approaches adaptively. + +A similar pattern occurs on StrategyQA, where paths like A1 $\rightarrow$ A2, A3 $\rightarrow$ A2, and A1 $\rightarrow$ A6 remain dominant. Still, simpler actions such as A6 and A2 also play a noticeable role, reflecting the distinct reasoning demands of this task. + +Overall, both figures highlight the RARE's flexibility in navigating a variety of reasoning strategies. They further illustrate the importance of both straightforward and more intricate paths in effectively tackling different categories of tasks. + +# 4.5 Human Evaluation of the Retrieval-Augmented Factuality Scorer + +
MetricScore (%)
Inter-Annotator Agreement86.49
RAFS Alignment with Annotator 187.84
RAFS Alignment with Annotator 282.43
Average RAFS-Annotator Alignment85.14
+ +Table 4: Human evaluation of RAFS. + +To assess the effectiveness of RAFS, we conducted a human evaluation comparing its factual assessments with expert judgments. We selected 10 medical questions from MedQA and generated corresponding responses using RARE with LLaMA 3 8B, segmenting each response into approximately 100 individual statements. RAFS classified each statement as either Supported or Not Supported. Two medical experts—both of whom have passed the United States Medical Licensing Examination (USMLE)—independently labeled each statement as Correct or Incorrect, corresponding to RAFS's Supported and Not Supported labels, respectively. + +Table 4 shows a high inter-annotator agreement of $86.49\%$ , confirming consistency among expert evaluations. RAFS achieves strong alignment with human judgments, with an average agreement of $85.14\%$ (87.84% with Annotator 1 and $82.43\%$ with Annotator 2), demonstrating its reliability in factual assessment. The slightly lower alignment with Annotator 2 suggests some subjectivity in evaluating borderline statements. Overall, RAFS effectively prioritizes factually accurate reasoning paths, closely aligning with expert validation. + +![](images/766d2cdff86020e7d6dde4ecad4d4c8a9242c3b1a692372678efcf5ef49bcb70.jpg) +Figure 6: Accuracy vs. Number of Generated Tokens for Different Methods + +# 4.6 Computational Analysis + +Figure 6 illustrates the trade-off between inference cost and reasoning performance, averaged across commonsense reasoning tasks. CoT requires approximately 400 tokens per example, while rStar averages 92.6k tokens, and RARE increases this to 119.9k tokens due to its additional retrieval-augmented steps. On average, rStar improves accuracy over CoT by $4.52\%$ , and RARE achieves a $9.05\%$ improvement—the highest among all methods. Although RARE uses roughly 27.3k more tokens than rStar, its superior accuracy demonstrates that the additional computation enhances reasoning robustness. This finding aligns with recent trends such as OpenAI O1 and DeepSeek R1 (El-Kishky et al., 2025; Guo et al., 2025), which prioritize deeper reasoning over minimal latency, reinforcing that improved accuracy can justify increased computational cost in complex reasoning tasks. + +# 5 Related Work + +# 5.1 Prompting LLMs to reason + +Prompting LLMs to reason has become a central focus of recent research, particularly through the development of prompting-based techniques such as Chain-of-Thought prompting (Wei et al., 2022). These approaches aim to improve inference capabilities by structuring prompts to encourage multi-step reasoning. Key advancements include planning-based prompting (Hao et al., 2023; Ding et al., 2023), problem decomposition (Zhou et al., 2022; Khot et al., 2022), abstraction (Zheng et al., 2023), and program-based reasoning (Chen et al., 2022; Zhou et al., 2023b). While effective for single-step inference, these methods often rely on a limited range of operations, which can restrict the diversity and generality of the solutions generated. + +MCTS has emerged as a powerful tool for optimizing reasoning paths across a vast solution space, enhancing both exploration and decision-making efficiency (Silver et al., 2018). MCTS has been widely adopted in domains such as game theory (Sironi et al., 2018; Ontanón, 2016) and strategic planning (Zhou et al., 2023a; Yu et al., 2023). When integrated with reinforcement learning, MCTS enables self-play training, achieving human-level or even superhuman performance in complex domains like Go (Silver et al., 2016). + +More recently, MCTS has been applied to LLMs to identify optimal reasoning trajectories without requiring additional supervision (Feng et al., 2023; Zhou et al., 2023a; Tian et al., 2024; Huang et al., 2024). For instance, Feng et al. (2023) restricted the search granularity to word or sentence level, while Tian et al. (2024) introduced $\eta$ MCTS to enable hierarchical planning with tailored reward functions. MCTS has also been employed to curate high-quality reasoning paths for training reward models, leading to iterative improvements in model reasoning (Zhang et al., 2024). Zhou et al. (2023a) further generalized the use of MCTS by incorporating all possible reasoning and action steps into a unified search space, supporting joint inference, action, and planning. + +The most relevant work to ours is rStar (Qi et al., 2024), which extends MCTS by incorporating a diverse set of reasoning operations. rStar improves solution-space exploration through dynamic, human-like reasoning and introduces five distinct operations that enable more flexible planning. Moreover, it employs a discriminator—another LLM with reasoning capabilities similar to the main model—to verify the plausibility of each candidate reasoning path. + +# 5.2 Medical RAG + +Retrieval-augmented generation has proven highly effective in grounding LLM reasoning with up-to-date external knowledge, especially in medical tasks such as question answering and generation (Xiong et al., 2024a; Tian et al., 2019; Xia et al., 2022; Wang et al., 2024; Yao et al., 2024; Yao and Yu, 2025). RAG has also been applied to classification, information extraction, lay-language generation (Li et al., 2024; Guo et al., 2024; Yao et al., 2023), and medical dialogue systems (Shi et al., 2024). To enhance retrieval effectiveness, various improvements have been proposed, such as + +query rewriting (Zhang et al., 2022) and multi-step retrieval (Mrini et al., 2022), enabling LLMs to iteratively refine their knowledge intake for clinical decision-making and literature synthesis (Zakka et al., 2024; Wang et al., 2023; Jeong et al., 2024). For example, Wang et al. (2023) developed a hybrid retriever with complex filtering mechanisms to identify high-quality documents, while Jeong et al. (2024) introduced SelfBioRAG, a self-reflective retriever that integrates reasoning signals into the retrieval loop. Iterative RAG variants like i-MedRAG allow LLMs to refine their understanding by posing follow-up queries in multiple rounds (Xiong et al., 2024b). The most relevant RAG-based system to our work is SeRTS (Hu et al., 2024), which leverages MCTS to guide query generation. However, SeRTS follows a depth-first strategy, generating and executing one query at a time, whereas our framework—RARE—adopts a more flexible, agentic planning approach. + +RARE integrates both RAG-based and non-RAG operations, allowing for breadth-first exploration via A6, which generates multiple queries simultaneously. This enables RARE to handle a wider variety of reasoning tasks. In contrast to SeRTS, which always requires iterative retrieval, RARE can also answer simple problems directly via step-by-step (CoT-like) reasoning without invoking retrieval. This design makes RARE more versatile, allowing it to dynamically adapt between retrieval-driven and retrieval-free reasoning depending on the task complexity. + +# 6 Conclusion + +We introduced RARE (Retrieval-Augmented Reasoning Enhancement), a framework designed to improve the reasoning accuracy and factual reliability of large language models (LLMs) through retrieval-augmented actions and factuality scoring. RARE operates entirely as an autonomous language agent, requiring no additional training or fine-tuning of the underlying LLM. This makes the framework robust to overfitting and highly adaptable across tasks and datasets, as it relies solely on real-time retrieval and reasoning mechanisms. Experiments on medical and commonsense reasoning benchmarks demonstrate RARE's effectiveness, RARE bridges the gap between open-source models and state-of-the-art proprietary systems, showcasing its potential as a scalable and effective solution for knowledge-intensive reasoning tasks. + +# 7 Limitations + +While RARE demonstrates significant improvements in reasoning accuracy and factual reliability, it has certain limitations that present opportunities for future work. + +First, the framework has only been tested on open-source models like LLaMA 3.1 and not on larger proprietary models such as GPT-4. This is due to the high number of API calls required by RARE's iterative retrieval and reasoning process, making evaluations on closed-source models prohibitively costly. However, the framework is designed to be model-agnostic and can be directly applied to proprietary models if resources permit. + +Second, RARE is designed to identify a single reasoning path that leads to a correct answer but does not necessarily optimize for the best or shortest path that maximizes robustness (e.g., achieving the highest model confidence). Future work could explore designing better reward functions to prevent reward hacking and improve the selection of the most reliable reasoning paths. + +Finally, RARE is currently limited to using Monte Carlo Tree Search for exploring action paths. While effective, this approach does not leverage a trained reward model to dynamically guide the search process. Future extensions could incorporate reward models or alternative optimization strategies to further enhance reasoning quality and efficiency. + +These limitations highlight areas for improvement and potential research directions to make RARE more robust, generalizable, and applicable to a wider range of models and reasoning tasks. + +# 8 Ethics Statement + +This work aims to advance the field of Medical QA by enhancing the reasoning capabilities of language models through the RARE framework. While the results demonstrate significant improvements, several ethical considerations must be addressed to ensure responsible development and deployment: + +Clinical Applicability. RARE is designed to improve reasoning and factual reliability but is not intended to replace healthcare professionals or serve as a standalone diagnostic or treatment tool. Any integration into medical workflows must be supervised by qualified practitioners to ensure patient safety and ethical use. + +Bias and Fairness. Language models, including those tested with RARE, may reflect biases + +present in their training data. These biases could impact the fairness and reliability of the reasoning process, particularly in sensitive medical contexts. Future work must include rigorous audits for bias and fairness to minimize potential harm. + +Generalizability. As RARE has been primarily evaluated in English-language, text-based general and medical domain QA tasks, its applicability to non-English-speaking contexts and multimodal scenarios remains untested. Efforts should be made to extend the framework to diverse linguistic and cultural contexts to ensure equitable access to its benefits. + +Societal Impacts. While RARE demonstrates the potential for improving medical reasoning tasks, its outputs should be considered supplementary to human expertise. The ethical deployment of RARE requires clear guidelines to avoid overreliance on AI and ensure that it enhances, rather than replaces, human decision-making in healthcare. + +Human Annotation. The human evaluation in this study was conducted by two medical experts who have passed the United States Medical Licensing Examination (USMLE). Annotators were compensated fairly for their time at a rate of $40/hour. All participants were informed about the scope of their role and participated voluntarily. + +# References + +Lisa Bauer, Yicheng Wang, and Mohit Bansal. 2018. Commonsense for generative multi-hop question answering tasks. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 4220-4230. +Yonatan Bisk, Rowan Zellers, Jianfeng Gao, Yejin Choi, et al. 2020. Piqa: Reasoning about physical commonsense in natural language. In Proceedings of the AAAI conference on artificial intelligence, volume 34, pages 7432-7439. +Cameron B Browne, Edward Powley, Daniel Whitehouse, Simon M Lucas, Peter I Cowling, Philipp Rohlfshagen, Stephen Tavener, Diego Perez, Spyridon Samothrakis, and Simon Colton. 2012. A survey of monte carlo tree search methods. IEEE Transactions on Computational Intelligence and AI in games, 4(1):1-43. +Pengshan Cai, Zonghai Yao, Fei Liu, Dakuo Wang, Meghan Reilly, Huixue Zhou, Lingxi Li, Yi Cao, Alok Kapoor, Adarsha Bajracharya, et al. 2023. Paniniqa: Enhancing patient education through interactive question answering. Transactions of the Association for Computational Linguistics, 11:1518-1536. + +YongGang Cao, Feifan Liu, Pippa Simpson, Lamont Antieau, Andrew Bennett, James J Cimino, John Ely, and Hong Yu. 2011. Askhermes: An online question answering system for complex clinical questions. Journal of biomedical informatics, 44(2):277-288. +Qianglong Chen, Feng Ji, Haiqing Chen, and Yin Zhang. 2020. Improving commonsense question answering by graph-based iterative retrieval over multiple knowledge sources. In Proceedings of the 28th International Conference on Computational Linguistics, pages 2583-2594. +Wenhu Chen, Xueguang Ma, Xinyi Wang, and William W Cohen. 2022. Program of thoughts prompting: Disentangling computation from reasoning for numerical reasoning tasks. arXiv preprint arXiv:2211.12588. +Ruomeng Ding, Chaoyun Zhang, Lu Wang, Yong Xu, Minghua Ma, Wei Zhang, Si Qin, Saravan Rajmohan, Qingwei Lin, and Dongmei Zhang. 2023. Everything of thoughts: Defying the law of penrose triangle for thought generation. arXiv preprint arXiv:2311.04254. +Abhimanyu Dubey, Abhinav Jauhri, Abhinav Pandey, Abhishek Kadian, Ahmad Al-Dahle, Aiesha Letman, Akhil Mathur, Alan Schelten, Amy Yang, Angela Fan, et al. 2024. The llama 3 herd of models. arXiv preprint arXiv:2407.21783. +Ahmed El-Kishky, Alexander Wei, Andre Saraiva, Borys Minaev, Daniel Selsam, David Dohan, Francis Song, Hunter Lightman, Ignasi Clavera, Jakub Pachocki, et al. 2025. Competitive programming with large reasoning models. arXiv preprint arXiv:2502.06807. +Xidong Feng, Ziyu Wan, Muning Wen, Stephen Marcus McAleer, Ying Wen, Weinan Zhang, and Jun Wang. 2023. Alphazero-like tree-search can guide large language model decoding and training. arXiv preprint arXiv:2309.17179. +Mor Geva, Daniel Khashabi, Elad Segal, Tushar Khot, Dan Roth, and Jonathan Berant. 2021. Did aristotle use a laptop? a question answering benchmark with implicit reasoning strategies. Transactions of the Association for Computational Linguistics, 9:346-361. +Daya Guo, Dejian Yang, Haowei Zhang, Junxiao Song, Ruoyu Zhang, Runxin Xu, Qihao Zhu, Shirong Ma, Peiyi Wang, Xiao Bi, et al. 2025. Deepseek-r1: Incentivizing reasoning capability in llms via reinforcement learning. arXiv preprint arXiv:2501.12948. +Yue Guo, Wei Qiu, Gondy Leroy, Sheng Wang, and Trevor Cohen. 2024. Retrieval augmentation of large language models for lay language generation. Journal of Biomedical Informatics, 149:104580. +Shibo Hao, Yi Gu, Haodi Ma, Joshua Jiahua Hong, Zhen Wang, Daisy Zhe Wang, and Zhiting Hu. 2023. Reasoning with language model is planning with world model. arXiv preprint arXiv:2305.14992. + +Minda Hu, Licheng Zong, Hongru Wang, Jingyan Zhou, Jingjing Li, Yichen Gao, Kam-Fai Wong, Yu Li, and Irwin King. 2024. Serts: Self-rewarding tree search for biomedical retrieval-augmented generation. In *Findings of the Association for Computational Linguistics: EMNLP* 2024, pages 1321-1335. +Jiatan Huang, Mingchen Li, Zonghai Yao, Zhichao Yang, Yongkang Xiao, Feiyun Ouyang, Xiaohan Li, Shuo Han, and Hong Yu. 2024. Ritek: A dataset for large language models complex reasoning over textual knowledge graphs. arXiv preprint arXiv:2410.13987. +Minbyul Jeong, Jiwoong Sohn, Mujeen Sung, and Jaewoo Kang. 2024. Improving medical reasoning through retrieval and self-reflection with retrieval-augmented large language models. Bioinformatics, 40(Supplement_1):i119-i129. +Di Jin, Eileen Pan, Nassim Oufattole, Wei-Hung Weng, Hanyi Fang, and Peter Szolovits. 2021. What disease does this patient have? a large-scale open domain question answering dataset from medical exams. Applied Sciences, 11(14):6421. +Qiao Jin, Robert Leaman, and Zhiyong Lu. 2024a. Pubmed and beyond: biomedical literature search in the age of artificial intelligence. *EBioMedicine*, 100. +Qiao Jin, Zifeng Wang, Charalampos S Floudas, Fangyuan Chen, Changlin Gong, Dara Bracken-Clarke, Elisabetta Xue, Yifan Yang, Jimeng Sun, and Zhiyong Lu. 2024b. Matching patients to clinical trials with large language models. Nature Communications, 15(1):9074. +Omar Khattab and Matei Zaharia. 2020. Colbert: Efficient and effective passage search via contextualized late interaction over bert. In Proceedings of the 43rd International ACM SIGIR conference on research and development in Information Retrieval, pages 39-48. +Tushar Khot, Harsh Trivedi, Matthew Finlayson, Yao Fu, Kyle Richardson, Peter Clark, and Ashish Sabharwal. 2022. Decomposed prompting: A modular approach for solving complex tasks. arXiv preprint arXiv:2210.02406. +Tom Kwiatkowski, Jennimaria Palomaki, Olivia Redfield, Michael Collins, Ankur Parikh, Chris Alberti, Danielle Epstein, Illia Polosukhin, Jacob Devlin, Kenton Lee, et al. 2019. Natural questions: a benchmark for question answering research. Transactions of the Association for Computational Linguistics, 7:453-466. +Mingchen Li, Halil Kilicoglu, Hua Xu, and Rui Zhang. 2024. Biomedrag: A retrieval augmented large language model for biomedicine. arXiv preprint arXiv:2405.00465. + +Siru Liu, Aileen P Wright, Barron L Patterson, Jonathan P Wanderer, Robert W Turer, Scott D Nelson, Allison B McCoy, Dean F Sittig, and Adam Wright. 2023. Using ai-generated suggestions from chatgpt to optimize clinical decision support. Journal of the American Medical Informatics Association, 30(7):1237-1245. +Zhiyong Lu. 2011. Pubmed and beyond: a survey of web tools for searching biomedical literature. Database, 2011:baq036. +Khalil Mrini, Harpreet Singh, Franck Dernoncourt, Seunghyun Yoon, Trung Bui, Walter Chang, Emilia Farcas, and Ndapa Nakashole. 2022. Medical question understanding and answering with knowledge grounding and semantic self-supervision. arXiv preprint arXiv:2209.15301. +Santiago Ontanón. 2016. Informed monte carlo tree search for real-time strategy games. In 2016 IEEE Conference on Computational Intelligence and Games (CIG), pages 1-8. IEEE. +Ankit Pal, Logesh Kumar Umapathi, and Malaikannan Sankarasubbu. 2022. Medmcqa: A large-scale multi-subject multi-choice dataset for medical domain question answering. In Conference on health, inference, and learning, pages 248-260. PMLR. +Zhenting Qi, Mingyuan Ma, Jiahang Xu, Li Lyna Zhang, Fan Yang, and Mao Yang. 2024. Mutual reasoning makes smaller llms stronger problem-solvers. arXiv preprint arXiv:2408.06195. +Xiaoming Shi, Zeming Liu, Li Du, Yuxuan Wang, Hongru Wang, Yuhang Guo, Tong Ruan, Jie Xu, and Shaoting Zhang. 2024. Medical dialogue: A survey of categories, methods, evaluation and challenges. arXiv preprint arXiv:2405.10630. +David Silver, Aja Huang, Chris J Maddison, Arthur Guez, Laurent Sifre, George Van Den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Veda Panneershelvam, Marc Lanctot, et al. 2016. Mastering the game of go with deep neural networks and tree search. nature, 529(7587):484-489. +David Silver, Thomas Hubert, Julian Schrittwieser, Ioannis Antonoglou, Matthew Lai, Arthur Guez, Marc Lanctot, Laurent Sifre, Dharshan Kumaran, Thore Graepel, et al. 2018. A general reinforcement learning algorithm that masters chess, shogi, and go through self-play. Science, 362(6419):1140-1144. +Karan Singhal, Shekoofeh Azizi, Tao Tu, S Sara Mahdavi, Jason Wei, Hyung Won Chung, Nathan Scales, Ajay Tanwani, Heather Cole-Lewis, Stephen Pfohl, et al. 2023a. Large language models encode clinical knowledge. Nature, 620(7972):172-180. +Karan Singhal, Tao Tu, Juraj Gottweis, Rory Sayres, Ellery Wulczyn, Le Hou, Kevin Clark, Stephen Pfohl, Heather Cole-Lewis, Darlene Neal, et al. 2023b. Towards expert-level medical question answering with large language models. arXiv preprint arXiv:2305.09617. + +Chiara F Sironi, Jialin Liu, Diego Perez-Liebana, Raluca D Gaina, Ivan Bravi, Simon M Lucas, and Mark HM Winands. 2018. Self-adaptive mcts for general video game playing. In International Conference on the Applications of Evolutionary Computation, pages 358-375. Springer. +Alon Talmor, Jonathan Herzig, Nicholas Lourie, and Jonathan Berant. 2018. Commonsenseqa: A question answering challenge targeting commonsense knowledge. arXiv preprint arXiv:1811.00937. +Nandan Thakur, Nils Reimers, Andreas Rückle, Abhishek Srivastava, and Iryna Gurevych. 2021. Beir: A heterogenous benchmark for zero-shot evaluation of information retrieval models. arXiv preprint arXiv:2104.08663. +Ye Tian, Baolin Peng, Linfeng Song, Lifeng Jin, Dian Yu, Haitao Mi, and Dong Yu. 2024. Toward self-improvement of llms via imagination, searching, and criticizing. arXiv preprint arXiv:2404.12253. +Yuanhe Tian, Weicheng Ma, Fei Xia, and Yan Song. 2019. Chimed: A chinese medical corpus for question answering. In Proceedings of the 18th BioNLP Workshop and Shared Task, pages 250-260. +Harsh Trivedi, Niranjan Balasubramanian, Tushar Khot, and Ashish Sabharwal. 2023. Interleaving retrieval with chain-of-thought reasoning for knowledge-intensive multi-step questions. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 10014-10037. +Junda Wang, Zhichao Yang, Zonghai Yao, and Hong Yu. 2024. Jmlr: Joint medical llm and retrieval training for enhancing reasoning and professional question answering capability. arXiv preprint arXiv:2402.17887. +Xuezhi Wang, Jason Wei, Dale Schuurmans, Quoc Le, Ed Chi, Sharan Narang, Aakanksha Chowdhery, and Denny Zhou. 2022. Self-consistency improves chain of thought reasoning in language models. arXiv preprint arXiv:2203.11171. +Yubo Wang, Xueguang Ma, and Wenhu Chen. 2023. Augmenting black-box llms with medical textbooks for clinical question answering. arXiv preprint arXiv:2309.02233. +Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Fei Xia, Ed Chi, Quoc V Le, Denny Zhou, et al. 2022. Chain-of-thought prompting elicits reasoning in large language models. Advances in neural information processing systems, 35:24824-24837. +Jerry Wei, Chengrun Yang, Xinying Song, Yifeng Lu, Nathan Hu, Jie Huang, Dustin Tran, Daiyi Peng, Ruibo Liu, Da Huang, et al. 2024. Long-form factuality in large language models. arXiv preprint arXiv:2403.18802. + +Chaoyi Wu, Weixiong Lin, Xiaoman Zhang, Ya Zhang, Weidi Xie, and Yanfeng Wang. 2024. Pmc-llama: toward building open-source language models for medicine. Journal of the American Medical Informatics Association, page ocae045. +Fei Xia, Bin Li, Yixuan Weng, Shizhu He, Kang Liu, Bin Sun, Shutao Li, and Jun Zhao. 2022. Medconqa: medical conversational question answering system based on knowledge graphs. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pages 148-158. +Guangzhi Xiong, Qiao Jin, Zhiyong Lu, and Aidong Zhang. 2024a. Benchmarking retrieval-augmented generation for medicine. arXiv e-prints, pages arXiv-2402. +Guangzhi Xiong, Qiao Jin, Xiao Wang, Minjia Zhang, Zhiyong Lu, and Aidong Zhang. 2024b. Improving retrieval-augmented generation in medicine with iterative follow-up questions. arXiv preprint arXiv:2408.00727. +Zhilin Yang, Peng Qi, Saizheng Zhang, Yoshua Bengio, William W Cohen, Ruslan Salakhutdinov, and Christopher D Manning. 2018. Hotpotqa: A dataset for diverse, explainable multi-hop question answering. arXiv preprint arXiv:1809.09600. +Zonghai Yao, Nandyala Siddharth Kantu, Guanghao Wei, Hieu Tran, Zhangqi Duan, Sunjae Kwon, Zhichao Yang, Hong Yu, et al. 2023. Readme: Bridging medical jargon and lay understanding for patient education through data-centric nlp. arXiv preprint arXiv:2312.15561. +Zonghai Yao, Aditya Parashar, Huixue Zhou, Won Seok Jang, Feiyun Ouyang, Zhichao Yang, and Hong Yu. 2024. Mcqq-srefine: Multiple choice question generation and evaluation with iterative self-critique, correction, and comparison feedback. arXiv preprint arXiv:2410.13191. +Zonghai Yao and Hong Yu. 2025. A survey on llm-based multi-agent ai hospital. +Xiao Yu, Maximillian Chen, and Zhou Yu. 2023. Prompt-based monte-carlo tree search for goal-oriented dialogue policy planning. arXiv preprint arXiv:2305.13660. +Cyril Zakka, Rohan Shad, Akash Chaurasia, Alex R Dalal, Jennifer L Kim, Michael Moor, Robyn Fong, Curran Phillips, Kevin Alexander, Euan Ashley, et al. 2024. Almanac—retrieval-augmented language models for clinical medicine. NEJM AI, 1(2):AIoa2300068. +Dan Zhang, Sining Zhoubian, Ziniu Hu, Yisong Yue, Yuxiao Dong, and Jie Tang. 2024. Rest-mcts*: Llm self-training via process reward guided tree search. arXiv preprint arXiv:2406.03816. + +Ming Zhang, Shuai Dou, Ziyang Wang, and Yunfang Wu. 2022. Focus-driven contrastive learning for medical question summarization. In Proceedings of the 29th international conference on computational linguistics, pages 6176-6186. +Huaixiu Steven Zheng, Swaroop Mishra, Xinyun Chen, Heng-Tze Cheng, Ed H Chi, Quoc V Le, and Denny Zhou. 2023. Take a step back: Evoking reasoning via abstraction in large language models. arXiv preprint arXiv:2310.06117. +Andy Zhou, Kai Yan, Michal Shlapentokh-Rothman, Haohan Wang, and Yu-Xiong Wang. 2023a. Language agent tree search unifies reasoning acting and planning in language models. arXiv preprint arXiv:2310.04406. +Aojun Zhou, Ke Wang, Zimu Lu, Weikang Shi, Sichun Luo, Zipeng Qin, Shaoqing Lu, Anya Jia, Linqi Song, Mingjie Zhan, et al. 2023b. Solving challenging math word problems using gpt-4 code interpreter with code-based self-verification. arXiv preprint arXiv:2308.07921. +Denny Zhou, Nathanael Scharli, Le Hou, Jason Wei, Nathan Scales, Xuezhi Wang, Dale Schuurmans, Claire Cui, Olivier Bousquet, Quoc Le, et al. 2022. Least-to-most prompting enables complex reasoning in large language models. arXiv preprint arXiv:2205.10625. + +# A Appendix + +# A.1 Implementation Details + +In the MCTS framework of the Retrievalaugmented Generator, we set the number of rolls to 4 for LLaMA 3.2 3B and LLaMA 3.1 8B models, and 2 for the LLaMA 3.1 70B model. This configuration strikes a balance between effective inference and computational efficiency, particularly for larger models where inference costs are higher. + +In the factuality scoring stage, we perform a self-scorer setup, where the Retrieval-Augmented Factuality Scorer uses the same backbone model as the generator. For instance, when the generator utilizes LLaMA 3.1 3B, the RAFS also employs the LLaMA 3.2 3B model for factuality evaluation. This ensures consistency between the generator and scorer while maintaining efficient inference. All inference processes, including factuality scoring, are parallelized to further enhance efficiency. + +# A.2 Evaluation tasks + +To rigorously test the reasoning capabilities of RARE, we evaluate it on a range of reasoning tasks, categorized into two main domains: + +Medical Reasoning Tasks: We use three medical datasets that require complex, domain-specific reasoning, including: + +- MedQA-USMLE (Jin et al., 2021): A medical question-answering dataset based on the United States Medical Licensing Examination (USMLE) questions. +- MedMCQA (Pal et al., 2022): A dataset consisting of multiple-choice medical questions designed to test clinical knowledge. +- MMLU-Medical (Singhal et al., 2023a): The medical subset of the Massive Multitask Language Understanding (MMLU) benchmark, focusing on diverse topics in the medical field. + +Commonsense Reasoning Tasks: We evaluate RARE's general reasoning ability on commonsense datasets. While StrategyQA requires complex, implicit reasoning strategies, other tasks benefit from advanced reasoning but may not require it to the same extent: + +- StrategyQA (Geva et al., 2021): A dataset of open-domain questions that require implicit reasoning strategies. + +- CommonsenseQA (Talmor et al., 2018): A multiple-choice question-answering dataset designed to test commonsense knowledge. +PIQA (Physical Interaction QA) (Bisk et al., 2020): A dataset for physical reasoning, where models must answer questions about common physical interactions. + +# A.3 Baselines + +We compare the performance of RARE with several baseline reasoning methods, including: + +- Chain of Thought (CoT) (Wei et al., 2022): A reasoning approach that generates explanations step-by-step, aiming for more coherent answers. +- Self-Consistency (Wang et al., 2022): A method that uses majority voting among multiple reasoning paths to increase response accuracy. +- rStar (Qi et al., 2024): A framework that extends MCTS with a diverse set of reasoning actions, improving reasoning accuracy. +- MedRAG (Xiong et al., 2024a): A retrieval-augmented framework designed for medical question answering, integrating knowledge retrieval from domain-specific corpora. +- i-MedRAG (Xiong et al., 2024b): An iterative retrieval-based medical reasoning model that dynamically refines queries to improve response accuracy in medical QA tasks. + +A.4 Retrieval Model and Corpus + +
Corpus#Docs#SnippetsAvg. LDomain
PubMed23.9M23.9M296Biomed.
StatPearls9.3k301.2k119Clinics
Textbooks18125.8k182Medicine
Wikipedia6.5M29.9M162General
MedCorp30.4M54.2M221Mixed
+ +Table 5: Statistics of the retrieval corpus used in our experiments. #Docs refers to the number of documents, #Snippets represents extracted text units, and Avg. L indicates the average snippet length. + +For information retrieval, we leverage the MedCorp (Xiong et al., 2024a) corpus, a curated collection of high-quality and domain-specific resources + +that serve as knowledge bases for medical and general question answering. The MedCorp corpus consists of (table 5): + +- PubMed2: A widely used biomedical literature database containing over 36 million articles (Lu, 2011; Jin et al., 2024a). For our retrieval tasks, we utilize a subset of 23.9 million articles with valid titles and abstracts, similar to the MedRAG setup (Xiong et al., 2024a). +- StatPearls3: A clinical decision support resource with publicly available medical articles hosted on NCBI Bookshelf4. The corpus includes 9,330 peer-reviewed StatPearls articles, structured into hierarchical snippets where each paragraph is treated as a retrieval unit, with corresponding hierarchical headings as metadata. +Medical Textbooks: A collection of 18 widely used medical textbooks (Jin et al., 2021) that are commonly referenced for foundational medical knowledge and United States Medical Licensing Examination (USMLE) preparation. The textbook corpus is segmented into passages of up to 1,000 characters using the RecursiveCharacterTextSplitter from LangChain. +- Wikipedia: A large-scale, general-domain encyclopedia frequently used in information retrieval tasks (Thakur et al., 2021). We incorporate a processed version of Wikipedia from Huggingface and apply text chunking techniques to facilitate passage-level retrieval. + +To retrieve relevant passages from MedCorp, we employ the ColBERT retrieval model (Khattab and Zaharia, 2020), an efficient neural retrieval framework optimized for passage ranking. ColBERT's late interaction mechanism enables fine-grained token-level relevance matching, allowing our retrieval-augmented generator to identify and incorporate contextually relevant medical knowledge. This approach enhances the factual accuracy and reliability of generated responses while efficiently handling large-scale biomedical corpora. + +# A.5 Monte Carlo Tree Search (MCTS) + +Monte Carlo Tree Search (MCTS) is a decision-making algorithm widely used in complex decision processes, such as games, by building a search tree and simulating outcomes to estimate the value of potential actions. MCTS operates through four main phases (Browne et al., 2012). + +Selection: Starting from the root node, the algorithm traverses through child nodes based on strategies like the Upper Confidence Bound applied on Trees (UCT), which balances exploration and exploitation, continuing until a leaf node is reached. + +Expansion: At the leaf node, if it does not represent a terminal state, one or more feasible child nodes are added to represent potential future actions. + +Simulation (Evaluation): From one of the newly added nodes (typically selected randomly), random simulations (or "rollouts") are performed by selecting actions randomly until reaching a terminal state, thereby estimating the node's potential. + +Backpropagation: After simulation, the results (win, loss, or draw) are propagated back through the traversed nodes, updating the statistical data (e.g., rewards or visit counts) to guide future decision-making. + +By iterating through these phases, MCTS incrementally builds a decision tree, enabling optimal strategy refinement in scenarios where direct calculation of the best strategy is infeasible due to a vast state space. A crucial component of MCTS is the Upper Confidence Bound applied on Trees (UCT) algorithm, used during the selection phase to balance exploration and exploitation. The UCT formula for choosing actions is defined as follows: + +$$ +\mathrm {U C T} _ {j} = \bar {X} _ {j} + C \sqrt {\frac {2 \ln N}{N _ {j}}} \tag {1} +$$ + +where $\bar{X}_j$ is the average reward of action $j$ , $N$ is the total visit count of the parent node, $N_j$ is the visit count of node $j$ , and $C$ is a constant that controls the balance between exploration and exploitation. + +rStar enhanced MCTS-based exploration of candidate solutions. Specifically, rStar leverages a reward mechanism to guide tree expansion. Each node $s$ generated under action $a$ has a reward value $Q(s,a)$ . Unexplored nodes are initialized with $Q(s_{i},a_{i}) = 0$ , leading to random tree expansions initially. Upon reaching a terminal node $s_d$ , a reward score $Q(s_d,a_d)$ is computed based on + +whether the trajectory reaches the correct answer and is then back-propagated to each intermediate node in the trajectory $t = x \oplus s_1 \oplus s_2 \oplus \ldots \oplus s_d$ . For each intermediate node $s_i$ , the reward is updated as $Q(s_i, a_i) = Q(s_i, a_i) + Q(s_d, a_d)$ , with $Q(s_d, a_d)$ determined by the likelihood or confidence from self-consistency majority voting. This reward propagation directs the search toward paths with higher probabilities of correctness, enhancing decision-making within the reasoning process. + +# A.6 Evaluation of Reasoning Candidates with RAFS + +Figure 7 demonstrates how the Retrieval-Augmented Factuality Scorer (RAFS) evaluates reasoning candidates for a medical question. The example involves diagnosing and treating a patient presenting with symptoms consistent with seasonal allergic conjunctivitis. RAFS assigns factuality scores to each candidate reasoning path based on their alignment with retrieved evidence. + +Candidate Reasoning 1 accurately identifies the condition and treatment, correctly selecting ketotifen eye drops (Answer B) with a factuality score of 1.0. Candidate Reasoning 2 suggests fluorometholone eye drops (Answer D) but includes conflicting reasoning and inaccuracies, resulting in a lower factuality score of 0.625. Candidate Reasoning 3 incorrectly recommends warm compresses (Answer C) as the most appropriate treatment, reflecting limited factual alignment and receiving a score of 0.6. + +This example highlights RAFS's ability to differentiate between reasoning paths based on factual correctness, ensuring that the most reliable and evidence-supported answer is prioritized. + +# A.7 Prompt of Different Actions in MCTS + +# RAFS Examples + +Question: A 35-year-old man comes to the physician because of itchy, watery eyes for the past week. He has also been sneezing multiple times a day during this period. He had a similar episode 1 year ago around springtime. He has iron deficiency anemia and ankylosing spondylitis. Current medications include ferrous sulfate, artificial tear drops, and indomethacin. He works as an elementary school teacher. His vital signs are within normal limits. Visual acuity is 20/20 without correction. Physical examination shows bilateral conjunctival injection with watery discharge. The pupils are $3\mathrm{mm}$ , equal, and reactive to light. Examination of the anterior chamber of the eye is unremarkable. Which of the following is the most appropriate treatment? A: Erythromycin ointment, B: Ketotifen eye drops, C: Warm compresses, D: Fluorometholone eye drops + +Candidate Reasoning 1: Let's think step by step. Based on the symptoms described - itchy, watery eyes, sneezing, bilateral conjunctival injection, and watery discharge - along with the history of a similar episode around springtime, it's clear that the patient is experiencing allergic conjunctivitis, likely triggered by seasonal allergens like pollen given his profession as an elementary school teacher. For symptomatic relief of allergic conjunctivitis, antihistamine eyedrops or mast cell stabilizers can be effective. Among the options provided, ketotifen eye drops act as a mast cell stabilizer and would be appropriate for treating allergic conjunctivitis. The answer is B: Ketotifen eye drops. $\checkmark$ The factuality score is 1.0 + +Candidate Reasoning 2: Based on the patient's symptoms of itchy, watery eyes, sneezing, and physical examination findings of bilateral conjunctival injection with watery discharge, the diagnosis is allergic conjunctivitis. Considering the timing of the episode and the patient's profession, the most likely causative agent is seasonal pollen. Treatment should focus on reducing symptoms rather than eliminating the allergen source. Fluorometholone eye drops are corticosteroid drops that reduce inflammation and can provide relief from itching and redness. Other options like erythromycin or ketotifen may have some effect but would be less effective in addressing this presentation. Warm compresses might help with discharge, but again, would be less effective compared to the impact of corticosteroids. Therefore, the most appropriate treatment is fluorometholone eye drops. The answer is D: Fluorometholone eye drops. $\times$ The factuality score is 0.625 + +Candiate Reasoning 3: Given the patient's symptoms of itchy, watery eyes, sneezing, and conjunctival injection, along with a history of similar episodes around springtime, this case is most consistent with seasonal allergic conjunctivitis. The best treatment for mild allergic conjunctivitis involves avoiding triggers when possible, using lubricating artificial tears regularly, and applying a cold compress. Warm compresses are often recommended to help loosen crusts and debris, improving comfort. Therefore, warm compresses would be the most appropriate treatment for this patient. The answer is C: Warm compresses. $\times$ The factuality score is 0.6 + +Figure 7: Evaluation of reasoning candidates by the Retrieval-Augmented Factuality Scorer (RAFS). Each candidate provides a reasoning path for a given question, with RAFS assigning a factuality score based on alignment with retrieved evidence. + +![](images/c535e467e8ca68b9d29ed6e1238e7c9154637b354cdc63ed64208c5d0243e25c.jpg) +Figure 8: Top 10 common paths that lead to correct answer (MedQA) + +![](images/daf0bcf4edb7bd28526e3d8f8d4cbe274ce1b4f5b25569e8f233c801f60b78f4.jpg) +Figure 9: Top 10 common paths that lead to correct answer (StrategyQA) + +# Multi-step reasoning in Medical QA + +Question: A 23-year-old pregnant woman at 22 weeks gestation presents with burning upon urination. She states it started 1 day ago and has been worsening despite drinking more water and taking cranberry extract. She otherwise feels well and is followed by a doctor for her pregnancy. Her temperature is $97.7^{\circ}\mathrm{F}$ $(36.5^{\circ}\mathrm{C})$ , blood pressure is $122/77\mathrm{mmHg}$ , pulse is $80/\mathrm{min}$ , respirations are $19/\mathrm{min}$ , and oxygen saturation is $98\%$ on room air. Physical exam is notable for an absence of costovertebral angle tenderness and a gravid uterus. Which of the following is the best treatment for this patient? A: Ampicillin, B: Ceftriaxone, C:Ciprofloxacin, D: Doxycycline, E: Nitrofurantoin + +Step 1: Identify key clinical features A 23-year-old pregnant woman at 22 weeks gestation presents with burning upon urination (dysuria), worsening symptoms over one day, and no systemic signs of infection (normal temperature, blood pressure, and oxygen saturation). Physical exam shows no costoverterbral angle tenderness, suggesting the absence of pyelonephritis. + +Step 2: Determine the likely diagnosis Dysuria without systemic signs in a pregnant woman is most consistent with acute cystitis, a lower urinary tract infection. + +Step 3: Evaluate treatment options for cystitis in pregnancy Nitrofurantoin: Safe and effective during the second trimester, commonly used for uncomplicated cystitis. Ampicillin: Can be used but has high resistance rates among common uropathogens like E. coli. Ceftriaxone: Typically used for severe infections like pyelonephritis and administered intravenously, not necessary here. Ciprofloxacin: A fluoroquinolone, contraindicated in pregnancy due to potential cartilage damage to the fetus. Doxycycline: A tetracycline, contraindicated in pregnancy due to risks of fetal bone growth inhibition and teeth discoloration. + +Step 4: Select the best treatment Nitrofurantoin is the safest and most effective option for this patient in the second trimester. + +Step 5: Conclusion The best treatment for this patient is nitrofurantoin. The answer is E: Nitrofurantoin. + +Figure 10: An example of a medical question that requires multi-step reasoning to answer. + +# Action 1. Propose an one-step thought. + +Instruction: A 46-year-old woman comes to the physician because of a 2-week history of diplopia and ocular pain when reading the newspaper. She also has a 3-month history of amenorrhea, hot flashes, and increased sweating. She reports that she has been overweight all her adult life and is happy to have lost $6.8\mathrm{kg}$ (15 lb) of weight in the past 2 months. Her pulse is $110 / \mathrm{min}$ , and blood pressure is $148 / 98\mathrm{mmHg}$ . Physical examination shows moist palms and a nontender thyroid gland that is enlarged to two times its normal size. Ophthalmologic examination shows prominence of the globes of the eyes, bilateral lid retraction, conjunctival injection, and an inability to converge the eyes. There is no pain on movement of the extraocular muscles. Visual acuity is 20/20 bilaterally. Neurologic examination shows a fine resting tremor of the hands. Deep tendon reflexes are $3+$ with a shortened relaxation phase. Which of the following is the most likely cause of this patient's ocular complaints? A: Granulomatous inflammation of the cavernous sinus, B: Abnormal communication between the cavernous sinus and the internal carotid artery, C: Glycosaminoglycan accumulation in the orbit, D: Bacterial infection of the orbital contents, E: Sympathetic hyperactivity of levator palpebrae superioris + +\*\*\* Response: Let's think step by step. + +Step 1: Identify key clinical features: A 46-year-old woman presents with diplopia, ocular pain, weight loss, amenorrhea, and hyperthyroid signs like tachycardia, enlarged thyroid gland, and hyperreflexia. + +Step 2: Recognize underlying condition: These findings suggest Graves' disease with thyroid-associated orbitopathy (TAO). + +Step 3: Determine cause of ocular symptoms: Prominent globes, lid retraction, and conjunctival injection are caused by immune-mediated glycosaminoglycan accumulation in the orbit, characteristic of TAO. + +Step 4: Eliminate other options: Conditions like cavernous sinus inflammation, carotid-cavernous fistula, and bacterial infection do not fit the patient's presentation. + +Step 5: The most likely cause of the ocular complaints is glycosaminoglycan accumulation in the orbit. + +Step 6: Conclusion: The answer is C: Glycosaminoglycan accumulation in the orbit. + +Instruction: {user question} + +\*\*\* Response: Let's think step by step. + +# Action 2: Propose the remaining thought steps / Action 4: Answer the sub-question again. + +Instruction: A 1-year-old boy presents to the emergency department with weakness and a change in his behavior. His parents state that they first noticed the change in his behavior this morning and it has been getting worse. They noticed the patient was initially weak in his upper body and arms, but now he won't move his legs with as much strength or vigor as he used to. Physical exam is notable for bilateral ptosis with a sluggish pupillary response, a very weak sucking and gag reflex, and shallow respirations. The patient is currently drooling and his diaper is dry. The parents state he has not had a bowel movement in over 1 day. Which of the following is the pathophysiology of this patient's condition? A: Antibodies against postsynaptic nicotinic cholinergic ion channels, B: Autoantibodies against the presynaptic voltage-gated calcium channels, C: Autoimmune demyelination of peripheral nerves, D: Blockade of presynaptic acetylcholine release at the neuromuscular junction, E: Lower motor neuron destruction in the anterior horn + +\#\#\# Response: Let's think step by step. The infant has rapidly progressing weakness starting from the upper body and moving downward, bilateral ptosis, sluggish pupils, weak sucking and gag reflexes, shallow respirations, drooling, constipation (dry diaper and no bowel movement), and decreased muscle strength. These symptoms are consistent with infant botulism, caused by ingestion of Clostridium botulinum spores (often from honey) that produce botulinum toxin. The toxin inhibits the release of acetylcholine at the presynaptic terminals of the neuromuscular junction by cleaving SNARE proteins necessary for vesicle fusion. This blockade leads to flaccid paralysis and autonomic dysfunction. Therefore, the pathophysiology is blockade of presynaptic acetylcholine release at the neuromuscular junction. The answer is D: Blockade of presynaptic acetylcholine release at the neuromuscular junction. + +Instruction: {user question} + +Response: + +# Action 3: Propose next sub-question along with its answer. + +Given a question, please decompose it into sub-questions. For each sub-question, please answer it in a complete sentence, ending with "The answer is". When the original question is answerable, please start the subquestion with "Now we can answer the question: ". + +Question 1: A 23-year-old pregnant woman at 22 weeks gestation presents with burning upon urination. She states it started 1 day ago and has been worsening despite drinking more water and taking cranberry extract. She otherwise feels well and is followed by a doctor for her pregnancy. Her temperature is $97.7^{\circ}\mathrm{F}$ $(36.5^{\circ}\mathrm{C})$ , blood pressure is $122/77\mathrm{mmHg}$ , pulse is $80/\mathrm{min}$ , respirations are $19/\mathrm{min}$ , and oxygen saturation is $98\%$ on room air. Physical exam is notable for an absence of costovertebral angle tenderness and a gravid uterus. Which of the following is the best treatment for this patient? A: Ampicillin, B: Ceftriaxone, C: Ciprofloxacin, D: Doxycycline, E: Nitrofurantoin + +Question 1.1: What is the most likely diagnosis for this patient? + +Answer 1.1: The patient is a 23-year-old pregnant woman at 22 weeks gestation presenting with burning upon urination, known as dysuria. She has no fever, normal vital signs, and no costovertebral angle tenderness. This suggests that she is experiencing an acute uncomplicated urinary tract infection (UTI), specifically cystitis. + +Question 1.2: Which antibiotics are safe and effective for treating cystitis during pregnancy? + +Answer 1.2: During pregnancy, certain antibiotics are preferred due to their safety profiles for both the mother and the fetus. Nitrofurantoin is commonly used and considered safe during the second trimester for treating cystitis. Ampicillin may be less effective due to resistance. Ceftriaxone is typically reserved for more severe infections like pyelonephritis and is administered intravenously. Ciprofloxacin and doxycycline are contraindicated in pregnancy because they can harm fetal development. + +Question 1.3: Now we can answer the question: Which of the following is the best treatment for this patient? + +Answer 1.3: The best treatment for this pregnant patient with acute cystitis is Nitrofurantoin, as it is safe during the second trimester and effective against common urinary pathogens. Therefore, the answer is E: Nitrofurantoin. + +Question 2: {user question} + +# Action 5: Rephrase the question/sub-question. + +You are an AI assistant to help me rephrase questions by splitting the question context into conditions. In your rephrased question, remember to fully express the information in the original question. + +Original Question: A 62-year-old woman comes to the physician because of coughing and fatigue during the past 2 years. In the morning, the cough is productive of white phlegm. She becomes short of breath walking up a flight of stairs. She has hypertension and hyperlipidemia. She has recently retired from working as a nurse at a homeless shelter. She has smoked 1 pack of cigarettes daily for 40 years. Current medications include ramipril and fenofibrate. Her temperature is $36.5^{\circ}\mathrm{C}$ $(97.7^{\circ}\mathrm{F})$ , respirations are 24/min, pulse is 85/min, and blood pressure is $140/90\mathrm{mmHg}$ . Scattered wheezing and rhonchi are heard throughout both lung fields. There are no murmurs, rubs, or gallops but heart sounds are distant. Which of the following is the most likely underlying cause of this patient's symptoms? A: Chronic decrease in pulmonary compliance, B: Local accumulation of kinins, C: Mycobacterial invasion of pulmonary parenchyma, D: Progressive obstruction of expiratory airflow, E: Incremental loss of functional residual capacity + +Rephrased Question: A 62-year-old woman comes to the physician due to a 2-year history of coughing and fatigue. She has a morning cough productive of white phlegm and becomes short of breath when climbing stairs. She has hypertension and hyperlipidemia and recently retired from nursing at a homeless shelter. She has a 40-pack-year smoking history. Her medications include ramipril and fenofibrate. Vital signs are temperature $36.5^{\circ}\mathrm{C}$ $(97.7^{\circ}\mathrm{F})$ , respirations 24/min, pulse 85/min, and blood pressure 140/90 mmHg. Physical examination reveals scattered wheezing and rhonchi throughout both lung fields. Heart sounds are distant with no murmurs, rubs, or gallops. Which of the following is the most likely underlying cause of this patient's symptoms? A: Chronic decrease in pulmonary compliance, B: Local accumulation of kinins, C: Mycobacterial invasion of pulmonary parenchyma, D: Progressive obstruction of expiratory airflow, E: Incremental loss of functional residual capacity + +Original question: {user question} + +Rephrased Question: + +# Action 6: Generate multiple search queries and retrieve information. + +Given a question, generate a search query that would help gather information to answer it. Your goal is to formulate a query that will retrieve useful evidence or additional details that contribute to answering the question. The query should aim to obtain new information and be specific enough to ensure that the search results are relevant and helpful. + +Question 1: A 23-year-old pregnant woman at 22 weeks gestation presents with burning upon urination. She states it started 1 day ago and has been worsening despite drinking more water and taking cranberry extract. She otherwise feels well and is followed by a doctor for her pregnancy. Her temperature is $97.7^{\circ}\mathrm{F}$ $(36.5^{\circ}\mathrm{C})$ , blood pressure is $122/77\mathrm{mmHg}$ , pulse is $80/\mathrm{min}$ , respirations are $19/\mathrm{min}$ , and oxygen saturation is $98\%$ on room air. Physical exam is notable for an absence of costovertebral angle tenderness and a gravid uterus. Which of the following is the best treatment for this patient? A: Ampicillin, B: Ceftriaxone, C: Ciprofloxacin, D: Doxycycline, E: Nitrofurantoin + +Query 1.1: Common causes and management of dysuria in pregnant women without systemic symptoms. + +Document 1.1: Dysuria in pregnant women without systemic symptoms like fever or flank pain is often indicative of acute cystitis, a lower urinary tract infection typically caused by bacteria such as Escherichia coli. Pregnancy increases the risk of urinary tract infections due to hormonal changes that relax ureteral smooth muscle and mechanical compression from the enlarging uterus, leading to urinary stasis. Management involves confirming the diagnosis with a urine culture and initiating antibiotic therapy that is safe for use during pregnancy. + +Query 1.2: Antibiotics that are safe and effective for treating cystitis during pregnancy. + +Document 1.2: Safe and effective antibiotics for treating cystitis in pregnancy include nitrofurantoin and certain beta-lactam antibiotics like ampicillin and cephalexin. Nitrofurantoin is commonly used during the second trimester and is effective against common urinary pathogens. Ampicillin can be used but may have increased resistance rates. Ceftriaxone is a third-generation cephalosporin administered intravenously and is typically reserved for more severe infections like pyelonephritis. Antibiotics such as doxycycline (a tetracycline) and ciprofloxacin (a fluoroquinolone) are contraindicated in pregnancy due to potential risks to fetal development. + +Query 1.3: Antibiotics contraindicated during pregnancy and their associated risks. + +Document 1.3: Certain antibiotics are contraindicated during pregnancy due to teratogenic effects or adverse outcomes for the fetus. Doxycycline, a tetracycline antibiotic, is contraindicated because it can inhibit bone growth and cause permanent tooth discoloration in the developing fetus. Ciprofloxacin, a fluoroquinolone, is avoided as it has been associated with cartilage damage in animal studies and potential musculoskeletal risks in humans. These medications should not be used to treat infections in pregnant patients. + +Question 2: {user question} + +# Action 7: Re-answer the question/sub-question with retrieved information. + +Instruction: A 1-year-old boy presents to the emergency department with weakness and a change in his behavior. His parents state that they first noticed the change in his behavior this morning and it has been getting worse. They noticed the patient was initially weak in his upper body and arms, but now he won't move his legs with as much strength or vigor as he used to. Physical exam is notable for bilateral ptosis with a sluggish pupillary response, a very weak sucking and gag reflex, and shallow respirations. The patient is currently drooling and his diaper is dry. The parents state he has not had a bowel movement in over 1 day. Which of the following is the pathophysiology of this patient's condition? A: Antibodies against postsynaptic nicotinic cholinergic ion channels, B: Autoantibodies against the presynaptic voltage-gated calcium channels, C: Autoimmune demyelination of peripheral nerves, D: Blockade of presynaptic acetylcholine release at the neuromuscular junction, E: Lower motor neuron destruction in the anterior horn + +Relevant Documents: + +Infant Botulism: Caused by ingestion of Clostridium botulinum spores (common sources include honey and soil). Spores germinate in the infant's gut, producing botulinum toxin. + +Botulinum Toxin Mechanism: Blocks the release of acetylcholine at presynaptic neuromuscular junctions by cleaving SNARE proteins. Results in flaccid paralysis and autonomic dysfunction. + +Clinical Features: Symmetric descending paralysis starting with cranial nerves (ptosis, poor suck, weak gag reflex). + +Autonomic symptoms: constipation, dry mouth, drooling. Hypotonia and respiratory difficulties. + +\#\#\# Response: Let's think step by step. The infant presents with rapidly progressing weakness starting in the upper body and moving downward, bilateral ptosis with sluggish pupillary response, weak sucking and gag reflexes, shallow respirations, drooling, and constipation (dry diaper, no bowel movement). These symptoms are characteristic of infant botulism, caused by ingestion of Clostridium botulinum spores that produce botulinum toxin. The toxin inhibits the release of acetylcholine at the presynaptic terminals of the neuromuscular junction by cleaving SNARE proteins necessary for neurotransmitter release. This blockade leads to flaccid paralysis and autonomic dysfunction. Therefore, the pathophysiology is blockade of presynaptic acetylcholine release at the neuromuscular junction. The answer is D: Blockade of presynaptic acetylcholine release at the neuromuscular junction. + +Instruction: {user question} + +Relevant Documents: {relevant documents} + +Response: \ No newline at end of file diff --git a/rareretrievalaugmentedreasoningenhancementforlargelanguagemodels/images.zip b/rareretrievalaugmentedreasoningenhancementforlargelanguagemodels/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..71f7d31cf449096c6a557381f151f6d32fd68357 --- /dev/null +++ b/rareretrievalaugmentedreasoningenhancementforlargelanguagemodels/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:47262839dd59fd38600ac6944f54a3f75f106405a524abb6a91543748ad995ad +size 727022 diff --git a/rareretrievalaugmentedreasoningenhancementforlargelanguagemodels/layout.json b/rareretrievalaugmentedreasoningenhancementforlargelanguagemodels/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..cf549116b8bea335659328597a5228d3b29543fe --- /dev/null +++ b/rareretrievalaugmentedreasoningenhancementforlargelanguagemodels/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:564e63a218d08b44da668e4f694899539de6cbe9ca395da8b2f68b698fd1b202 +size 616085 diff --git a/rationalystpretrainingprocesssupervisionforimprovingreasoning/0d7c1c10-3f4a-40f4-8f09-d45ff8c6bad2_content_list.json b/rationalystpretrainingprocesssupervisionforimprovingreasoning/0d7c1c10-3f4a-40f4-8f09-d45ff8c6bad2_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..10f8c902830dec523279b1cfce80b68c9595258d --- /dev/null +++ b/rationalystpretrainingprocesssupervisionforimprovingreasoning/0d7c1c10-3f4a-40f4-8f09-d45ff8c6bad2_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f827bb04909a45cfff59f51792df79599528061d6468be1aa63150b5a5f3bb7b +size 135764 diff --git a/rationalystpretrainingprocesssupervisionforimprovingreasoning/0d7c1c10-3f4a-40f4-8f09-d45ff8c6bad2_model.json b/rationalystpretrainingprocesssupervisionforimprovingreasoning/0d7c1c10-3f4a-40f4-8f09-d45ff8c6bad2_model.json new file mode 100644 index 0000000000000000000000000000000000000000..c47c5b66692eccf7af6ef569e76e95437af55b0c --- /dev/null +++ b/rationalystpretrainingprocesssupervisionforimprovingreasoning/0d7c1c10-3f4a-40f4-8f09-d45ff8c6bad2_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f8cddfb7b1e5af4a92b85c26641180bf4323d26cafb4f52a599e2670f9d3a1d0 +size 159940 diff --git a/rationalystpretrainingprocesssupervisionforimprovingreasoning/0d7c1c10-3f4a-40f4-8f09-d45ff8c6bad2_origin.pdf b/rationalystpretrainingprocesssupervisionforimprovingreasoning/0d7c1c10-3f4a-40f4-8f09-d45ff8c6bad2_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d6379ee54a5ef597aa50d5572f4e8f48ccafa84b --- /dev/null +++ b/rationalystpretrainingprocesssupervisionforimprovingreasoning/0d7c1c10-3f4a-40f4-8f09-d45ff8c6bad2_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0063889742a355dd068cb99104e0ec71b223ee06c6c5f80c92c6b7ef76782cac +size 1226769 diff --git a/rationalystpretrainingprocesssupervisionforimprovingreasoning/full.md b/rationalystpretrainingprocesssupervisionforimprovingreasoning/full.md new file mode 100644 index 0000000000000000000000000000000000000000..be200b976b54b21dea9e7edeb514c893fc8b8a37 --- /dev/null +++ b/rationalystpretrainingprocesssupervisionforimprovingreasoning/full.md @@ -0,0 +1,626 @@ +![](images/d801a41780ff09311e56cbeca7825238fdf855e0a49ce1949338bfe6ec93da6d.jpg) + +# RATIONALYST: Pre-training Process-Supervision for Improving Reasoning + +Dongwei Jiang\* Guoxuan Wang\* Yining Lu\* Andrew Wang\* Jingyu Zhang\* Chuyu Liu\* Benjamin Van Durme\* Daniel Khashabi\* Johns Hopkins University, \*University of Notre Dame djiang21@jhu.edu + +# Abstract + +The reasoning steps generated by LLMs might be incomplete, as they mimic logical leaps common in everyday communication found in their pre-training data: underlying rationales are frequently left implicit (unstated). To address this challenge, we introduce RATIONALYST, a model for process-supervision of reasoning based on pre-training on a vast collection of rationale annotations extracted from unlabeled data. We extract 79k rationales from web-scale unlabelled dataset (the Pile) and a combination of reasoning datasets with minimal human intervention. This web-scale pre-training for reasoning allows RATIONALYST to consistently generalize across diverse reasoning tasks, including mathematical, commonsense, scientific, and logical reasoning. Fine-tuned from LLaMa-3-8B-Instruct, RATIONALYST improves the accuracy of reasoning by an average of $3.9\%$ on 7 representative reasoning benchmarks. It also demonstrates superior performance compared to significantly larger verifiers like GPT-4 and similarly sized models fine-tuned on matching training sets. + +# 1 Introduction + +Rationales play a crucial role in human reasoning and its accuracy (Rips, 1994; Mercier and Sperber, 2011). In reasoning problems, having accurate rationales often correlates with accurate outcomes (Tversky et al., 1982; Davis, 1984). This importance of rationales extends to Large Language Models (LLMs) as well. Wei et al. (2022) were among the first to show that generating chain-of-thought rationales significantly improves LLMs' reasoning performance. Subsequent research has further refined the methods for eliciting rationales, leading to improved performance (Fu et al., 2023; Zhou et al., 2022). + +$^{1}$ Our code, data, and model can be found at this repository: https://anonymous.4open.science/r/RATIONALYST-B5CD + +![](images/ef81b43c1a68cdeb0642f4c4fee5743ff4dd45e9938299c576de8ec5c1340ae9.jpg) +Figure 1: A simplified example showing how implicit rationales in pre-training data can be leveraged to improve reasoning. ①: Implicit rationales (unstated logical connections) occur frequently in LLM pre-training data. ②: Existing LLMs pre-trained to replicate their pretraining data tend to omit these logical steps as well. ③: However, RATIONALYST learns to generate these rationales at inference time to supervise the chain-of-thought process for better reasoning. + +In the context of LLM reasoning, these rationales are typically employed through a chain-of-thought process that makes reasoning explicit by articulating them as plain-text rationales. In this approach, each subsequent rationale is generated conditioned on rationales produced in preceding steps, effectively using them as a form of supervision. However, the generated reasoning chains might be incomplete, containing potential logical leaps while leaving some rationales implicit (or hidden) during the generation process. These gaps in the reasoning chain can weaken the LLM's reasoning ability throughout the problem-solving process. + +One reason why chain-of-thought methods might miss implicit steps is that models trained with "next-token prediction" often replicate the omissions present in their training data. Implicit rationales—underlying logical connections that are often not explicitly stated—are frequently missing + +![](images/b71be1f435498189e8ef7a398c56fde71df8eb551ac73aa8d6f1e7295ef37712.jpg) +Figure 2: An example showing how RATIONALYST works at inference time. RATIONALYST generates implicit rationales given the current reasoning trajectory, which includes both the question and the reasoning steps generated so far ①. Agent LLM generates multiple next-step candidates for reasoning, also based on the current reasoning trajectory ②. Implicit rationale generated by RATIONALYST is used to provide heuristics for choosing the next step candidates proposed by the agent LLM by estimating the probability of the next step candidate given the rationale ③. The reasoning trajectory is updated iteratively with the highest scoring next step candidate ④. + +in daily communication and web text. Figure 1 $①$ illustrates this concept using a typical document from LLM pre-training data. In this example, we see a passage from Harry Potter: "Harry used magic outside... He is punished to attend..." The text contains the implicit (unstated) rationale: "When someone breaks the rule, he will be punished!" This implicit rationale is crucial in inferring the causal reasoning that connects the cause (Harry breaking rules) to its effect (punishment), but is also left unstated in the context. As a result, existing LLMs trained to mimic web text will have difficulty surfacing these implicit statements during the reasoning process, which can lead to flawed conclusions, such as erroneously justifying theft as a praiseworthy act when done to support one's family ( $②$ in Figure 1). + +This paper presents RATIONALYST, a model tailored for process-supervision of reasoning. RATIONALYST is trained on a vast collection of implicit rationales extracted from a mixture of web-scale unlabeled datasets and existing reasoning datasets. Although existing LLMs may miss crucial details in their reasoning, leading to flawed conclusions (2) in Figure 1), using RATIONALYST provides additional supervision mechanism to guide their reasoning processes, resulting in more robust conclusions (3) in Figure 1). + +RATIONALYST is developed and used in three stages: (1) we employ LLMs to extract implicit rationales from unlabeled text corpora without human annotation. These rationales are subsequently + +filtered based on their helpfulness in predicting subsequent text (§3.1); (2) we train RATIONALYST to predict those rationales given the preceding context (§3.2); and then (3) as depicted in Figure 2, during inference, we assume reasoning is done incrementally in a chain-of-thought fashion (Wei et al., 2022) by another agent model, and we use RATIONALYST to provide supervision for the agent model at each reasoning step throughout the reasoning process §3.3. By adopting a data-centric approach, RATIONALYST utilizes abundant unlabelled data to provide process supervision (Lightman et al., 2023) across various reasoning tasks without the need for human annotation. + +Our method extracts 65k implicit rationales from the web-scale unlabelled dataset The Pile (Gao et al., 2020). To adapt the extracted rationales to our tested domain and stabilize training, we additionally extract a much smaller set of 14k implicit rationales from the question-answer pairs in the training sets of two reasoning datasets: GSM8K (Cobbe et al., 2021a) and ECQA (Aggarwal et al., 2021). Our extraction process controls for answer leakage to prevent artificial amplification of performance. Using this curated set of rationales, RATIO-NALYST is then fine-tuned from LLaMa-3-8B. To assess the effectiveness of our approach, we evaluate RATIO-NALYST on a diverse set of reasoning tasks, including mathematical, commonsense, scientific, and logical reasoning. Our results show that RATIO-NALYST improves the accuracy of reasoning by an average of $3.9\%$ ( $\S 5.1$ ). To understand the + +contribution of different data sources, we conduct an ablation study that demonstrates the utility of rationales from both the large-scale Pile dataset and the smaller, specialized reasoning datasets (§5.2). Notably, RATIONALYST exhibits superior performance when compared to strong general-purpose verifiers like GPT-4 and similar capacity models specifically fine-tuned on matching training sets (§5.4). + +Implicit rationales generated by RATIONALYST are also designed to provide supervision in a human-readable form, offering improved interpretability for LLM generation. This added interpretability is particularly beneficial when reasoning over complex domains such as mathematics or coding, where the step-by-step logic can be difficult for humans to follow without explicit explanations. As shown in §5.5, our model is capable of generating human-understandable rationales for unseen data from complex math reasoning. + +# 2 Related Work + +Supervising reasoning. Supervision-based approaches have been shown to enhance the reasoning abilities of LLMs. Cobbe et al. (2021b) and Snell et al. (2024) demonstrate that training a "verifier" to supervise reasoning can be more parameter-efficient than simply expanding the parameters of the "reasoner" responsible for solving the reasoning task. Ground-truth feedback from interaction with the environment is an effective form of supervision (Wang et al., 2023), but it works only in controlled environments like simulated world. General-purpose verifiers (Dhuliawala et al., 2023; Weir et al., 2024, 2023; Vacareanu et al., 2024) offer broader applicability utilizing principles like compositional reasoning. However, they don't fully capitalize on the vast amount of unlabelled data in the way a data-driven approach might. Process-based supervision (Lightman et al., 2023) offers supervision at each reasoning step rather than just at the final result. While promising, it requires substantial human annotation for the correctness of intermediate steps, making it resource-intensive. Our work aims to address these challenges by proposing a data-centric process-supervision method without the need for human annotation. + +Knowledge extraction from unlabelled data. LLMs are conventionally trained on extensive web data using autoregressive next-token prediction. While effective, this approach may not fully har + +ness the potential of the pre-training data, as latent information within this data could be better accessed using techniques beyond simple next-token prediction. Recent research has demonstrated several approaches to utilize this latent information to develop more sophisticated language model capabilities (Jiang et al., 2024c). Schick et al. (2023) introduced Toolformer, which autonomously annotates and extracts appropriate positions, names, and inputs for tool use by leveraging supervision from future tokens. Similarly, Cornille et al. (2024) developed a method for learning to plan coherent article writing through self-supervised learning in text. More closely related to our work, Zelikman et al. (2024) proposed Quiet-Star, which applied a comparable technique to uncover underlying rationales in daily communication to enhance reasoning capabilities. Our work adopts a strategy similar to Quiet-Star for extracting rationales in an unsupervised manner. However, our approach diverges in its primary objective: we aim to train a "supervisor" that can utilize these rationales to provide process supervision for any "reasoner." This focus enables us to implement a simpler and more reliable method, as we don't need to directly integrate rationale extraction with "reasoner" training. Our approach thus offers a novel perspective on leveraging latent information in language models to enhance their capabilities. + +Rationales as the basis for reasoning. Various studies have focused on improving the use of rationales to elicit reasoning. Fu et al. (2023) refine rationales for more effective reasoning elicitation, while Li et al. (2023) explore different approaches to leveraging rationales to enhance reasoning. Other works, such as Hwang et al. (2024), examine the verification of rationales produced by LLMs during reasoning to improve performance. Additionally, training LLMs on rationale-rich data is a common strategy for enhancing reasoning skills. As highlighted by Lewkowycz et al. (2022) and Jiang et al. (2024a), LLMs trained on science and math data tend to perform better on reasoning tasks, particularly when CoT prompting is used. In this work, we build on this foundation by using rationales as the core of our method to supervise reasoning. + +# 3 Building RATIONALYST + +We discuss the construction of RATIONALYST and its usage at inference time. First, we describe ex + +![](images/cc08c0e096bc92caf7f8ef49ab55cc7ec01108d9e3b18361a3d4e86e9adf5809.jpg) +Figure 3: We use LLMs to extract implicit rationales (enclosed by $\langle \mathtt{BOT} \rangle$ and $\langle \mathtt{EOT} \rangle$ in bold) that capture reasoning in unlabelled text ( $\S 3.1$ A and B). The sample at the top is taken from unlabelled web-scale pre-training datasets The Pile and the sample at the bottom is taken from existing datasets (GSM8K). These rationales are subsequently filtered based on whether they are useful for predicting future text ( $\S 3.1$ C). + +tracting rationales from unlabeled text (§3.1), then use them to train RATIONALYST (§3.2), and finally, employ RATIONALYST to supervise reasoning during inference (§3.3). + +Setup. As we will be using multiple LLMs throughout the process, we define them here: $M_{\mathrm{Ra}}$ is the trained rationale generation model (RATIONALYST) that generates rationales and heuristics during inference. $M_{\mathrm{Agent}}$ is a general-purpose reasoning agent that produces candidate reasoning steps and incorporates rationales during inference. We use one additional model $M$ for initial rationale extraction, rationale filtration, and probability estimation of potential next reasoning steps during inference. These LLMs can be implemented using various state-of-the-art models, allowing for adaptability to specific research needs and computational resources. + +# 3.1 Large-scale Rationale Extraction + +Implicit rationales are often embedded in unlabelled text, reflecting natural thought processes in daily communication. Our extraction process, illustrated in Figure 3, aims to make these rationales explicit. Using an aligned language model $M$ , we generate rationales from text and then use $M$ to filter these rationales to retain only those that are useful, akin to the self-supervised "tool" learning approach described by Schick et al. (2023). The same $M$ is subsequently used to train $M_{\mathrm{Ra}}$ . + +Extracting rationales from pre-training data. We employ $M$ to generate rationales from the Pile. Due to the size of this dataset, we implement a pre-filtering process to identify reasoning-rich documents by (1) computing the average semantic embedding of representative reasoning training sets + +using a paragraph embedding model, and (2) selecting documents from unlabelled datasets that exceed a cosine similarity threshold $\alpha$ when compared to this average embedding. After pre-filtering, we segment the selected paragraphs into 2000-word segments and instruct $M$ to generate rationales at the end of each sentence, using prompts with demonstrations. Detailed information on the prompts and in-context learning demonstrations used for rationale extraction can be found in Appendix B. + +Extracting rationales from reasoning datasets. In parallel to $\mathbf{A}$ , we also extract rationales from existing reasoning datasets to adapt the extracted rationales to our tested domain and stabilize training. For a given reasoning dataset with pairs of questions and final answers $D = \{(q_i, a_i)\}_{i=1}^m$ , we create a prompt $P$ that instructs $M$ to generate rationales for each reasoning step in the final answer $a_i$ . The input of the prompt consists of the entire question and answer, and the output includes implicit rationales that can be inferred from the reasoning process in the answer. Consider the concrete example from existing datasets (bottom) in Figure 3. The solution involves two reasoning steps: "Natalia sold 48 / 2 = 24 clips in May" and "Natalia sold 48 + 24 = 72 chips altogether." Here, the implicit rationale that connects the first and second steps, "Now we should calculate the sum of chips in April and May," is implicit yet helpful for the prediction of the second step. These rationales are subsequently filtered and used to train RATIONALYST. + +C Filtering extracted rationales. Generated rationales in A and B may not always be accurate or helpful. In reasoning tasks, our objective is for the extracted rationales to effectively aid in future + +reasoning, which means a good rationale should enhance the likelihood of accurately predicting the following text. Let $i$ be the position of the rationale $r$ in the sequence $\mathbf{x} = x_1, \ldots, x_n$ . Given a sequence of weights $(w_k)_{k \in \mathbb{N}}$ , the cross-entropy loss for future token prediction is defined as: + +$$ +L _ {i} (\mathbf {r}) = - \sum_ {j = i} ^ {n} w _ {j - i} \cdot \log p _ {M} (x _ {j} \mid \mathbf {r}, x _ {1: j - 1}), +$$ + +where $M$ , in a different role from its previous use, is employed to estimate the probability over tokens $x_{i}, \ldots, x_{n}$ prefixed by preceding tokens $x_{1:i-1}$ and rationale $\mathbf{r}$ . The weight assigned to each future token decreases exponentially by a factor of 0.9 for each step further away it is from the rationale. We compute $L_{i} = L_{i}(r_{i}) - L_{i}(\varepsilon)$ , where $\varepsilon$ represents an empty rationale (i.e., predicting following tokens based only on preceding tokens). A rationale is considered helpful if it makes the prediction of future tokens easier, indicated by $L_{i} \geq \tau_{f}$ , where $\tau_{f}$ is a filtering threshold. We retain rationales for which adding the rationale reduces the loss by at least $\tau_{f}$ compared to having no rationale. + +It's crucial to clarify two key aspects of our rationale extraction process. First, while $M$ extracts rationales from the training sets of reasoning datasets, these training sets are not directly used as targets when training $M_{\mathrm{Ra}}$ . Instead, the target of training is the rationale generated by $M$ . Second, we explicitly instruct $M$ to exclude answers from the extracted rationales. This precaution prevents answer leakage in our prompts. + +# 3.2 RATIONALYST Training + +The goal of RATIONALYST (denoted by $M_{\mathrm{Ra}}$ ) training is to develop a model that can generate implicit rationales to guide stepwise problem-solving during inference time. For web-scale datasets like The Pile, the input context consists of a segment of text from a document. $M_{\mathrm{Ra}}$ learns to generate an implicit rationale that can guide the prediction of the next segment of text in the document's flow. In the case of structured reasoning datasets such as GSM8K or ECQA, the input context includes the question and any preceding reasoning steps toward the answer. Here, $M_{\mathrm{Ra}}$ learns to generate rationales that could guide the next step in the problem-solving sequence. + +Given the appropriate context from either source, the implicit rationales, extracted and filtered as described in §3.1, serve as the target outputs during + +training. The overall training objective is to minimize the per-token cross-entropy loss between the generated rationales and their ground truth values from the extracted and filtered rationales. + +# 3.3 Inference with the Help of RATIONALYST + +During inference, any general-purpose LLM (the "agent model" or $M_{\mathrm{Agent}}$ ) can be employed for reasoning across various problems. Algorithm 1 outlines the procedure. + +$M_{\mathrm{Agent}}$ generates reasoning incrementally in a chain-of-thought fashion, producing multiple candidates for the next reasoning step. These steps and the question form a "reasoning trajectory" $T$ that aims to solve the problem, which also serves as input to $M_{\mathrm{Ra}}$ . $M_{\mathrm{Ra}}$ then generates $r$ , the implicit rationale (line 3) With the help of implicit rationale, we provide supervision for the next reasoning step. Two supervision methods we considered are: + +Implicit supervision. For this supervision, $M_{\mathrm{Agent}}$ generates the next reasoning steps conditioned on the trajectory $T$ (line 6). We then use $M$ to estimate the probability of potential next reasoning steps given rationale $r$ and reasoning trajectory $T$ (line 13). This probability-based heuristic aligns with our rationale filtration process used during $M_{\mathrm{Ra}}$ training: just as we identified rationales that improved the prediction of future text during filtration, here we use rationales to improve the selection of future reasoning steps. By leveraging the probability estimates as a heuristic, we can discriminate between more and less likely next steps in the reasoning process, guiding the overall trajectory towards more accurate conclusions. + +Explicit supervision. Another approach is to directly incorporate the implicit rationale into the generation of the next reasoning steps. This method makes the previously implicit rationale an explicit part of the reasoning process. To do that, we ask $M_{\text{Agent}}$ to generate multiple candidate next steps by temporarily appending $r$ to the trajectory $T$ , and then producing potential continuations based on this augmented context (line 8). Then, we estimate the probability of candidate generations according to $M_{\text{Agent}}$ (line 15). This approach allows $M_{\text{Agent}}$ to make the final decision on the next reasoning step, as in normal beam search (Snell et al., 2024; Yao et al., 2023), while benefiting from the additional context provided by $M_{\text{Ra}}$ 's rationales. + +Algorithm 1 Inference with RATIONALYST +Input: Question $q$ RATIONALYST $M_{\mathrm{Ra}}$ Agent model $M_{\mathrm{Agent}}$ Probability estimation model $M$ Functions: Heuristic function $H(M_{\mathrm{Ra}},q,T)$ , stopping condition stop_condition() Hyperparameters: Sampling temperature $t$ and number of sampled rationales $N$ +1: $T\gets q$ Initialize reasoning trajectory as the question. +2: repeat +3: $r\gets M_{\mathrm{Ra}}(T)$ Generate rationale given trajectory. +4: heuristic_list $\equiv \emptyset$ +5: if supervision $\equiv =$ implicit then +6: next_steps $\leftarrow M_{\mathrm{Agent}}(T)$ +7: else if supervision $\equiv =$ explicit then +8: next_steps $\leftarrow M_{\mathrm{Agent}}(T,r)$ +9: end if +10: for $n = 1\dots N$ do +11: $x\gets$ next_steps[n] Take next step generation. +12: if supervision $\equiv =$ implicit then +13: $h\gets M(x|T,r)$ Estimate probability of next reasoning step. +14: else if supervision $\equiv =$ explicit then +15: $h\gets M_{\mathrm{Agent}}(x|T,r)$ +16: end if +17: heuristic_list.append(h) +18: end for +19: m_idx $\leftarrow$ argmax(heuristic_list) +20: $T\gets T +$ next_steps[m_idx] Extend trajectory with the highest scoring step. +21: until stop_condition(T) E.g.,the trajectory contains strings like "The final answer is:" +22: return $T$ + +After providing heuristics for the next reasoning steps, the step with the highest heuristic (line 19) is selected. The reasoning trajectory is then extended with this highest-scoring step (line 20). The reasoning process concludes when the stop condition is satisfied (line 21), which varies by dataset and often includes cues like "The final answer is:" that can be specified in system prompts for $M_{\text{Agent}}$ for different tasks. + +The computational cost of $M_{\mathrm{Ra}}$ is comparable to a normal beam search, with the only additional cost being the generation of rationales, which are typically quite short. + +# 4 Experimental Setup + +# 4.1 Setup for Training RATIONALYST + +Rationale extraction. As discussed in §3.1 (A), we perform pre-filtering on The Pile, an unlabelled web-scale dataset, to identify documents with extensive reasoning content before rationale extraction. This is achieved by computing the average semantic embedding from the training sets of the reasoning datasets we test, filtering documents that exceed the cosine similarity threshold $\alpha$ of 0.3, and keeping only the documents with length under 2000 tokens to fit within LLaMa-3 models' context length. The model we used to calculate these embeddings is MPNet-base (Song et al., 2020). + +Following the recipe in §3.1 $\widehat{\mathbb{B}}$ , we also ex + +tract rationales from existing reasoning datasets. GSM8K (Cobbe et al., 2021b) and ECQA (Aggarwal et al., 2021) were selected for their complementary coverage of mathematical and commonsense reasoning, respectively. This combination ensures RATIONALYST is trained on diverse reasoning patterns, enhancing its versatility across various tasks. + +Rationale annotation and filtration. The model $M$ used for rationale extraction and rationale filtering are both LLama-3-8B-Instruct (MetaAI, 2024). On GSM8K and ECQA, we manually annotated 100 pairs of {preceding_context, rationale, following_context} to determine an appropriate filtration threshold. The annotations include 50 positive and 50 negative rationale examples. Since it's straightforward to scale up the extraction of rationales from unlabelled data for filtration, we prioritize maximizing the precision of our filtered rationales, even if it means extracting fewer of them. We set the threshold $\tau_{f}$ to ensure that $95\%$ of the filtered rationales are accurate. On The Pile, we do not perform rationale annotation due to its diverse composition of corpora with varying characteristics. So the filter threshold $\tau_{f}$ for the Pile is set to 0 for all of its subdomains. The results of rationale extraction and filtration on GSM8K, ECQA, and The Pile are presented in Table 1. From our extraction and filtration process, we obtained approximately 14k rationales from GSM8K and ECQA combined, and about 65k from The Pile after filtration. Detailed statistics of rationale extraction and filtration results for each dataset, including the number of rationales per document and filtration rates, can be found in Appendix H. + +
DatasetSubdomains#Docs. # RationalesRationales Left (%)τf
GSM8KN/A74731756619.51.2
ECQAN/A76001966957.60.5
The PilePile-CC266.6K853.2K2.90
StackExchange21.8K113.6K29.80
Github19.9K45.8K2.60
HackerNews5.8K24.4K9.40
PubMed Central4.9K18.6K3.20
Wikipedia (en)4.2K23.0K7.80
+ +Table 1: The statistics on rationale sampling and filtration. We provide the total number of documents and rationales before filtering, and the percentage of leftover rationales after filtering. + +RATIONALYST training. RATIONALYST is finetuned with LLaMa-3-8B-Instruct as the base model. We use the default hyperparameters as specified in the LLaMa-3 technical report (MetaAI, 2024) for + +fine-tuning. After training, we conducted manual annotation of the model's output and found that the accuracy of rationales generated on unseen test data closely matches the filtration accuracy we specified for training data through our filtration parameters. + +# 4.2 Setup for Evaluating RATIONALYST + +We evaluate RATIONALYST across diverse reasoning tasks including mathematical (GSM8K (Cobbe et al., 2021b), MATH (Hendrycks et al., 2021), commonsense (ECQA(Aggarwal et al., 2021) and HellaSwag (Zellers et al., 2019)), logical (ProofWriter (Tafjord et al., 2021)), scientific (ARC Clark et al., 2018)), and multi-task reasoning (MMLU-Pro (Wang et al., 2024b)). For inference, we use LLaMa-3-8B-Instruct as our base agent model with temperature 0.7 and topk sampling of 3. We compare RATIONALYST against both process supervision approaches (using LLaMa-3-8B-Instruct and GPT-4) and outcomebased verifiers. Complete experimental details are provided in Appendix A. + +# 4.3 Setup for other verifiers. + +To evaluate the effectiveness of RATIONALYST's process supervision, we compare it with other approaches. For process supervision with other models, we include LLaMa-3-8B-Instruct and GPT-4 in our comparison. These models are prompted to rerank partial reasoning trajectories as reasoning steps are generated. The prompts and in-context learning demonstrations used for these models on representative datasets are provided in Appendix E. For outcome supervision, we also compare with outcome-based verifiers derived from LLaMa-3-8B-Instruct. These verifiers are fine-tuned on the training sets of each reasoning dataset. Following the approach outlined by Cobbe et al. (2021b), they assess the correctness of the final prediction by directly evaluating the question and final solution. This comparison allows us to assess the performance of RATIONALYST against both process-based and outcome-based supervision methods. + +# 5 Empirical Results + +# 5.1 Main result: RATIONALYST Improves Performance on Various Tasks + +In this section, we train RATIONALYST using a combination of rationales extracted from GSM8K and ECQA, as well as from The Pile, as outlined in Table 1. The baseline does not use any verifier. We + +use implicit supervision for this experiment. The main result is shown in Table 2. + +
Reasoning TypeDatasetBaseline Acc.RATIONALYST Acc.Δ Acc.
MathematicalGSM8K77.681.64.0
Math28.032.54.5
CommonSenseECQA72.675.22.6
HellaSwag58.260.32.1
LogicalProofWriter86.490.74.3
ScientificARC77.680.73.1
CombinedMMLU-Pro39.645.35.7
+ +Table 2: Accuracy and absolute improvement over baseline using RATIONALYST. RATIONALYST generalizes improved performance across different reasoning tasks. + +Evaluation of RATIONALYST shows that training with rationales from GSM8K, ECQA, and The Pile improves performance not only on GSM8K and ECQA, but also on other reasoning tasks (e.g. scientific reasoning, logical reasoning, etc) not directly used in rationale extraction. This supports the idea that rationales can be broadly applicable across different reasoning tasks. In addition, since we use the same model (LLaMa-3-8B-Instruct) for rationale extraction, filtering, RATIONALYST training, and inference, our results do not leverage external knowledge from stronger models like LLaMa-3-70B-Instruct or GPT-4. Future work might change $M$ to stronger models, with the expectation that higher-quality rationales will lead to better performance. + +# 5.2 Ablation: Web-scale Rationales Enhance Performance Across Tasks + +To assess the benefit of web-scale rationales, we train another model: RATIONALYST w/o Pile solely on rationales extracted from the training sets of GSM8K and ECQA. We re-ran the experiments on the same reasoning datasets using implicit supervision. The results are detailed in Table 3. + +We find that training the model on web-scale data results in better performance compared to training only on the rationales extracted from GSM8K and ECQA. This improvement is consistent and particularly significant on MMLU-Pro. Web-scale data likely provides exposure to more diverse reasoning types and content, including specialized knowledge, complex real-world scenarios, and interdisciplinary connections not present in the more focused datasets. + +
DatasetRATIONALYSTRATIONALYST (w/o Pile)ΔAcc.
GSM8K81.680.3-1.3
Math32.531.4-1.1
ECQA75.274.5-0.7
HellaSwag60.359.1-1.2
ProofWriter90.788.2-2.5
ARC80.778.8-1.9
MMLU-Pro45.341.2-4.1
+ +# 5.3 Ablation: Implicit Supervision Works Better than Explicit Supervision + +In this section, we conduct ablation studies to test the effectiveness of different supervision methods. To isolate the impact of supervision methods and minimize confounding variables, we focus on GSM8K and ECQA as representative benchmarks for mathematical and commonsense reasoning, respectively. We train two versions of RATIONALYST: one on rationales extracted from the GSM8K training set (RATIONALYST - GSM8K) and another on rationales from the ECQA training set (RATIONALYST - ECQA). These models are used to supervise $M_{\text{Agent}}$ during inference on their respective tasks. + +As shown in Table 4, implicit supervision outperforms explicit supervision. Our manual analysis revealed that implicit supervision's superior performance stems from its greater robustness to errors. When RATIONALYST generates an imperfect rationale, the probability-based heuristic used in implicit supervision can still provide useful guidance even if the rationale itself is not ideal. This approach is less likely to lead $M_{\text{Agent}}$ to produce incorrect next steps. In contrast, explicit supervision directly incorporates potentially flawed rationales into the reasoning process, which can cause $M_{\text{Agent}}$ to produce incorrect next steps. Essentially, implicit supervision acts as a softer guide, allowing for some imperfection in rationales, while explicit supervision more strictly adheres to potentially flawed rationales, making it more susceptible to errors. + +# 5.4 RATIONALYST Outperforms Other Verifiers + +Table 5 presents an analysis of RATIONALYST against various verifiers. Our findings reveal several insights: + +Table 3: An ablation study on the benefit of rationales extracted from pre-training data (The Pile). The consistent accuracy drop shows that, utilizing web-scale rationales improves performance on various reasoning datasets. + +
Heuristic↓ - Evaluation task→GSM8KECQA
Implicit Supervision80.374.5
Explicit Supervision77.572.2
+ +Table 4: Comparison of implicit and explicit supervision methods on GSM8K and ECQA tasks. Implicit supervision outperforms explicit supervision due to its robustness to errors. + +RATIONALYST outperforms vanilla LLaMa-3-8B-Instruct using process supervision: RATIONALYST, even without leveraging The Pile dataset, outperforms process-based verifiers using vanilla LLaMa-3-8B-Instruct. A manual examination of reasoning trajectories suggests that LLaMa-3-8B-Instruct faces difficulties in reranking partial reasoning steps. This challenge likely stems from the model's struggle to differentiate among its own generated outputs, a phenomenon observed in recent studies (Jiang et al., 2024b; Huang et al., 2023). + +RATIONALYST shows superior process-supervision performance than much bigger models like GPT-4: We observe consistent superior performance of RATIONALYST compared to GPT-4's process supervision. We hypothesize that this advantage arises from RATIONALYST's specialized design for providing supervision, in contrast to GPT-4's general-purpose training. + +RATIONALYST surpasses outcome-based verifiers trained using matching data: Notably, our method surpasses the performance of finetuned outcome-based verifiers on both GSM8K and ECQA datasets, despite these verifiers being trained on matching data. We attribute this success to the richer feedback provided by process-based supervision compared to outcome-based approaches. + +We would also like to mention that methods like self-consistency and other prompting techniques (e.g. STEP-BACK Prompting (Zheng et al., 2024)) are complementary to our approach. RATIONALYST can be integrated with these methods to potentially achieve even better results. For more detail, please refer to Appendix I. + +# 5.5 RATIONALYST Generates Accurate and Easy-to-understand Rationals + +We annotate some samples from the test set of Math (Hendrycks et al., 2021) at inference time, which was not part of the rationale sampling datasets. Through manual observation, we find that our + +
SupervisionGSM8KECQA
N/A77.672.6
Process Supervision w/ LLaMa-377.471.5
Process Supervision w/ GPT-480.074.7
Outcome Supervision w/ LLaMa-3 + FT79.274.3
RATIONALYST w/o Pile80.374.5
RATIONALYST81.676.2
+ +Table 5: Comparison of different supervision methods. RATIONALYST outperforms both strong verifiers like GPT-4 and similarly-sized models fine-tuned on matching training data. + +model can generate useful rationales that is helpful for understanding LLM's reasoning process on Math (an example is provided in Appendix D). Comparing the rationales generated by RATIONALYST with those generated by Quiet-Star (Zelikman et al., 2024) on the same problems, we find that our method produces more human-understandable rationales. We believe this happens because Quiet-Star optimizes rationales during training using the accuracy of the final prediction as a reward. This approach, while effective for improving task performance, does not explicitly prioritize human interpretability. In addition, this approach might inadvertently develop shortcuts or non-intuitive patterns that optimize for accuracy but not necessarily for clarity or human understanding. + +# 6 Conclusion and Future Work + +In this paper, we introduced RATIONALYST, a novel self-supervised model designed to enhance the reasoning capabilities of LLMs by leveraging hidden rationales extracted from unlabeled text. While our results demonstrate the effectiveness of this approach, there are several promising directions for future work, including scaling to larger models and datasets, integrating with test-time compute optimization techniques, and exploring the role of implicit rationales in model training. We discuss these future directions in detail in Appendix F. Through this work, we have demonstrated that extracting and utilizing implicit rationales from unlabeled text can meaningfully improve LLMs' reasoning abilities. We hope these insights will inspire further research into leveraging latent knowledge in pre-training data to enhance model capabilities. + +# 7 Limitations + +One limitation of this work is the comprehensiveness of our experiments. In future research, we plan to extend our experiments to a broader range of reasoning tasks and compare RATIONALYST with + +other outcome-based and process-based verifiers. We also plan to adjust the combination of rationales used to train RATIONALYST by (1) sampling from different reasoning tasks and (2) altering the mix of rationales in unlabelled web-scale pre-training data to better understand its generalizability. An additional limitation is that we could potentially improve performance through preference tuning (e.g., DPO) where the model learns to distinguish between valid and invalid rationales, but we have not explored this direction. + +# References + +Shourya Aggarwal, Divyanshu Mandowara, Vishwajeet Agrawal, Dinesh Khandelwal, Parag Singla, and Dinesh Garg. 2021. *Explanations for Common-senseQA: New Dataset and Models*. In *Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics* and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), Online. Association for Computational Linguistics. +Peter Clark, Isaac Cowhey, Oren Etzioni, Tushar Khot, Ashish Sabharwal, Carissa Schoenick, and Oyvind Tafjord. 2018. Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challenge. arXiv preprint arXiv:1803.05457. +Karl Cobbe, Vineet Kosaraju, Mohammad Bavarian, Mark Chen, Heewoo Jun, Lukasz Kaiser, Matthias Plappert, Jerry Tworek, Jacob Hilton, Reiichiro Nakano, Christopher Hesse, and John Schulman. 2021a. Training verifiers to solve math word problems. Preprint, arXiv:2110.14168. +Karl Cobbe, Vineet Kosaraju, Mohammad Bavarian, Mark Chen, Heewoo Jun, Lukasz Kaiser, Matthias Plappert, Jerry Tworek, Jacob Hilton, Reiichiro Nakano, Christopher Hesse, and John Schulman. 2021b. Training verifiers to solve math word problems. +Nathan Cornille, Marie-Francine Moens, and Florian Mai. 2024. Learning to plan for language modeling from unlabeled data. Preprint, arXiv:2404.00614. +Randall Davis. 1984. Diagnostic reasoning based on structure and behavior. Artificial intelligence, 24(1-3):347-410. +Shehzaad Dhuliawala, Mojtaba Komeili, Jing Xu, Roberta Raileanu, Xian Li, Asli Celikyilmaz, and Jason Weston. 2023. Chain-of-verification reduces hallucination in large language models. Preprint, arXiv:2309.11495. +Yao Fu, Hao Peng, Ashish Sabharwal, Peter Clark, and Tushar Khot. 2023. Complexity-based prompting for multi-step reasoning. In ICLR. OpenReview.net. +Leo Gao, Stella Biderman, Sid Black, Laurence Golding, Travis Hoppe, Charles Foster, Jason Phang, Horace He, Anish Thite, Noa Nabeshima, Shawn Presser, and Connor Leahy. 2020. The Pile: An 800gb dataset of diverse text for language modeling. arXiv preprint arXiv:2101.00027. +Suriya Gunasekar, Yi Zhang, Jyoti Aneja, Caio Cesar Teodoro Mendes, Allie Del Giorno, Sivakanth Gopi, Mojan Javaheripi, Piero Kauffmann, Gustavo de Rosa, Olli Saarikivi, Adil Salim, Shital Shah, Harkirat Singh Behl, Xin Wang, Sebastien Bubeck, Ronen Eldan, Adam Tauman Kalai, Yin Tat Lee, and Yuanzhi Li. 2023. Textbooks are all you need. Preprint, arXiv:2306.11644. + +Dan Hendrycks, Collin Burns, Saurav Kadavath, Akul Arora, Steven Basart, Eric Tang, Dawn Song, and Jacob Steinhardt. 2021. Measuring Mathematical Problem Solving With the MATH Dataset. In NeurIPS, Menlo Park, Calif. AAAI Press. +Jie Huang, Xinyun Chen, Swaroop Mishra, Huaixiu Steven Zheng, Adams Wei Yu, Xinying Song, and Denny Zhou. 2023. Large language models cannot self-correct reasoning yet. +Hyeonbin Hwang, Doyoung Kim, Seungone Kim, Seonghyeon Ye, and Minjoon Seo. 2024. Self-expllore to avoid the pit: Improving the reasoning capabilities of language models with fine-grained rewards. Preprint, arXiv:2404.10346. +Dongwei Jiang, Marcio Fonseca, and Shay B. Cohen. 2024a. Leanreasoner: Boosting complex logical reasoning with lean. Preprint, arXiv:2403.13312. +Dongwei Jiang, Jingyu Zhang, Orion Weller, Nathaniel Weir, Benjamin Van Durme, and Daniel Khashabi. 2024b. Self-[in]correct: Llms struggle with refining self-generated responses. Preprint, arXiv:2404.04298. +Zhengping Jiang, Yining Lu, Hanjie Chen, Daniel Khashabi, Benjamin Van Durme, and Anqi Liu. 2024c. RORA: Robust free-text rationale evaluation. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1070-1087, Bangkok, Thailand. Association for Computational Linguistics. +Aitor Lewkowycz, Anders Andreassen, David Dohan, Ethan Dyer, Henryk Michalewski, Vinay V. Ramasesh, Ambrose Slone, Cem Anil, Imanol Schlag, Theo Gutman-Solo, Yuhuai Wu, Behnam Neyshabur, Guy Gur-Ari, and Vedant Misra. 2022. Solving quantitative reasoning problems with language models. In NeurIPS. +Yifei Li, Zeqi Lin, Shizhuo Zhang, Qiang Fu, Bei Chen, Jian-Guang Lou, and Weizhu Chen. 2023. Making large language models better reasoners with step-aware verifier. Preprint, arXiv:2206.02336. +Hunter Lightman, Vineet Kosaraju, Yura Burda, Harri Edwards, Bowen Baker, Teddy Lee, Jan Leike, John Schulman, Ilya Sutskever, and Karl Cobbe. 2023. Let's verify step by step. Preprint, arXiv:2305.20050. +Liangchen Luo, Yinxiao Liu, Rosanne Liu, Samrat Phatale, Harsh Lara, Yunxuan Li, Lei Shu, Yun Zhu, Lei Meng, Jiao Sun, and Abhinav Rastogi. 2024. Improve mathematical reasoning in language models by automated process supervision. Preprint, arXiv:2406.06592. +Hugo Mercier and Dan Sperber. 2011. Why do humans reason? arguments for an argumentative theory. Behavioral and brain sciences, 34(2):57-74. + +MetaAI. 2024. Introducing meta llama 3: The most capable openly available llm to date. https://ai.meta.com/blog/meta-llama-3/. +Keiran Paster, Marco Dos Santos, Zhangir Azerbayev, and Jimmy Ba. 2023. Openwebmath: An open dataset of high-quality mathematical web text. Preprint, arXiv:2310.06786. +Lance J Rips. 1994. The psychology of proof: Deductive reasoning in human thinking. Mit Press. +Timo Schick, Jane Dwivedi-Yu, Roberto Dessì, Roberta Raileanu, Maria Lomeli, Luke Zettlemoyer, Nicola Cancedda, and Thomas Scialom. 2023. Toolformer: Language models can teach themselves to use tools. arXiv preprint arXiv:2302.04761. +Charlie Snell, Jaehoon Lee, Kelvin Xu, and Aviral Kumar. 2024. Scaling llm test-time compute optimally can be more effective than scaling model parameters. Preprint, arXiv:2408.03314. +Kaitao Song, Xu Tan, Tao Qin, Jianfeng Lu, and TieYan Liu. 2020. Mpnet: Masked and permuted pre-training for language understanding. Preprint, arXiv:2004.09297. +Oyvind Tafjord, Bhavana Dalvi, and Peter Clark. 2021. Proofwriter: Generating implications, proofs, and abductive statements over natural language. In ACL. +Amos Tversky, Daniel Kahneman, and Paul Slovic. 1982. Judgment under uncertainty: Heuristics and biases. Cambridge. +Robert Vacareanu, Anurag Pratik, Evangelia Spiliopoulou, Zheng Qi, Giovanni Paolini, Neha Anna John, Jie Ma, Yassine Benajiba, and Miguel Ballesteros. 2024. General purpose verification for chain of thought prompting. Preprint, arXiv:2405.00204. +Guanzhi Wang, Yuqi Xie, Yunfan Jiang, Ajay Mandlekar, Chaowei Xiao, Yuke Zhu, Linxi Fan, and Anima Anandkumar. 2023. Voyager: An open-ended embodied agent with large language models. Preprint, arXiv:2305.16291. +Peiyi Wang, Lei Li, Zhihong Shao, R. X. Xu, Damai Dai, Yifei Li, Deli Chen, Y. Wu, and Zhifang Sui. 2024a. Math-shepherd: Verify and reinforce llms step-by-step without human annotations. Preprint, arXiv:2312.08935. +Yubo Wang, Xueguang Ma, Ge Zhang, Yuansheng Ni, Abhranil Chandra, Shiguang Guo, Weiming Ren, Aaran Arulraj, Xuan He, Ziyan Jiang, Tianle Li, Max Ku, Kai Wang, Alex Zhuang, Rongqi Fan, Xiang Yue, and Wenhu Chen. 2024b. Mmlu-pro: A more robust and challenging multi-task language understanding benchmark. Preprint, arXiv:2406.01574. +Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Fei Xia, Ed Chi, Quoc V Le, Denny Zhou, et al. 2022. Chain-of-thought prompting elicits + +reasoning in large language models. Advances in Neural Information Processing Systems (NeurIPS), 35:24824-24837. +Nathaniel Weir, Peter Clark, and Benjamin Van Durme. 2023. Nellie: A neuro-symbolic inference engine for grounded, compositional, and explainable reasoning. Preprint, arXiv:2209.07662. +Nathaniel Weir, Kate Sanders, Orion Weller, Shreya Sharma, Dongwei Jiang, Zhengping Jiang, Bhavana Dalvi Mishra, Oyvind Tafjord, Peter Jansen, Peter Clark, and Benjamin Van Durme. 2024. Enhancing systematic decompositional natural language inference using informal logic. Preprint, arXiv:2402.14798. +Yangzhen Wu, Zhiqing Sun, Shanda Li, Sean Welleck, and Yiming Yang. 2024. An empirical analysis of compute-optimal inference for problem-solving with language models. Preprint, arXiv:2408.00724. +Shunyu Yao, Dian Yu, Jeffrey Zhao, Izhak Shafran, Thomas L. Griffiths, Yuan Cao, and Karthik Narasimhan. 2023. Tree of thoughts: Deliberate problem solving with large language models. In Advances in Neural Information Processing Systems (NeurIPS). +Eric Zelikman, Georges Harik, Yijia Shao, Varuna Jayasiri, Nick Haber, and Noah D. Goodman. 2024. Quiet-star: Language models can teach themselves to think before speaking. Preprint, arXiv:2403.09629. +Rowan Zellers, Ari Holtzman, Yonatan Bisk, Ali Farhadi, and Yejin Choi. 2019. HellaSwag: Can a machine really finish your sentence? In ACL. +Huaixiu Steven Zheng, Swaroop Mishra, Xinyun Chen, Heng-Tze Cheng, Ed H. Chi, Quoc V Le, and Denny Zhou. 2024. Take a step back: Evoking reasoning via abstraction in large language models. Preprint, arXiv:2310.06117. +Fan Zhou, Haoyu Dong, Qian Liu, Zhoujun Cheng, Shi Han, and Dongmei Zhang. 2022. Reflection of thought: Inversely eliciting numerical reasoning in language models via solving linear systems. Preprint, arXiv:2210.05075. + +# A Evaluation Setup Details + +# A.1 Task Configuration and Metrics + +We evaluate RATIONALYST on a diverse set of reasoning tasks, carefully selected to assess performance across different reasoning domains. Table 6 provides a comprehensive overview of our evaluation configuration. + +
Task#Eval#ShotsReasoning Type
GSM8K13198Math
Math50005Math
ECQA179446CommonSense
HellaSwag100004CommonSense
ProofWriter6002Logical
ARC11724Scientific
MMLU-Pro120005Mixed
+ +Table 6: Detailed configuration of evaluation tasks. For each dataset, we report the training set size (#Train), evaluation set size (#Eval), and number of few-shot demonstrations (#Shots) used during evaluation. We use exact match accuracy across all tasks, following standard evaluation protocols. + +For each dataset, we implement specific evaluation protocols: + +- GSM8K: We evaluate on the standard test split, using 8-shot demonstrations that showcase step-by-step mathematical reasoning. +- MATH: Our evaluation encompasses all difficulty levels and mathematical topics in the dataset, utilizing 5-shot demonstrations calibrated for complexity. +- ECQA: We use the validation split due to evaluation server constraints for the test set, maintaining consistency with prior work. +- HellaSwag: Evaluation follows the original setup with 4-shot demonstrations focusing on commonsense inference. +ProofWriter: We specifically evaluate on proofs with depth more than 5 to assess complex logical reasoning capabilities. +- ARC: Our evaluation focuses on the more challenging ARC-Challenge subset, employing 4-shot demonstrations. +- MMLU-Pro: Following the original paper's protocol, we evaluate across all reasoning categories using 5-shot demonstrations. + +# A.2 Inference Configuration + +Our inference setup utilizes LLaMa-3-8B-Instruct as the base agent model ( $M_{\text{Agent}}$ ). Key configuration parameters include: + +Sampling Parameters. We employ temperature $= 0.7$ and top-k $= 3$ during inference. This configuration allows for diverse reasoning path exploration while maintaining coherence. The temperature setting represents a calculated trade-off between deterministic output (temperature $= 0$ ) and exploration, showing particular effectiveness on logical reasoning tasks like ProofWriter. + +Chain-of-Thought Implementation. For each task category, we implement specialized chain-of-thought prompting: + +- Mathematical and Procedural Tasks: Demonstrations break down solutions into atomic reasoning steps, with explicit intermediate calculations. +- Multiple-Choice Tasks: Prompts guide systematic analysis of each answer choice, encouraging comparative reasoning. +- Logical Reasoning: Step-by-step deductive reasoning chains are demonstrated, emphasizing premise utilization. + +# B Prompts used for rationale sampling + +In this section, we provide the prompts we used for rationale sampling on GSM8K (Figure 4), ECQA (Figure 5), and The Pile (Figure 6). + +# C Prompts used during inference + +In this section, we provide the prompts used during inference time to encourage the agent model reason step by step for GSM8K (Figure 7) and ECQA (Figure 8). Note that the input to the agent model appends the last rationale generated by the agent model. + +# D Examples of rationales generated at inference time + +In this section, we provide rationales generated by RATIONALYST from the test set of MATH during inference time Figure 9, which was not part of the rationale sampling datasets, and observe that our model can still generate useful rationales that help to understand LLM's reasoning process. + +# E Prompts used for LLaMa-3 reranking + +In this section, we provide the prompts and in-context-learning demonstrations used to instruct + +# System Prompt: + +Your task is to add rationals to a piece of text. The rationals should help you with predicting future text. You can add rationals by writing "rational". Here are some examples of rationale generation: + +# Example Input 1: + +Question: Michael had 58 golf balls. On tueyday, he lost 23 golf balls. On wednesday, he lost 2 more. How many golf balls did he have at the end of wednesday? + +Answer: Michael started with 58 golf balls. After losing 23 on tueyday, he had $58 - 23 = 35$ . After losing 2 more, he had 35-2= 33 golf balls. The answer is 33 + +# Example Output 1: + +Question: Michael had 58 golf balls. On tueyday, he lost 23 golf balls. On wednesday, he lost 2 more. How many golf balls did he have at the end of wednesday? + +Answer: First, we need to calculate how many golf balls Michael had after losing 23 on tuea Michael started with 58 golf balls. After losing 23 on tueaay, he had 58 - 23 = 35. Afer losing 2 more on wednesday, we need to calculate how many golf balls he had left After losing 2 more, he had 35 - 2 = 33 golf balls. We are ready to output the final answer The answer is 33 + +# Example Input 2: + +Question: Brennan was researching his school project and had to download files from the internet to his computer to use for reference. After downloading 800 files, he deleted $70\%$ of them because they were not helpful. He downloaded 400 more files but again realized that 3/5 of them were irrelevant. How many valuable files was he left with after deleting the unrelated files he downloaded in the second round? + +Answer: The number of non-valuable files Brennan downloaded in the first round is $70 / 100 * 800 = <<70 / 100 * 800 = 560 >> 560$ files. The number of valuable files Brennan downloaded in the first round is $800 - 560 = <<800 - 560 = 240 >> 240$ When he downloaded 400 new files, there were $3 / 5 * 400 = <<3 / 5 * 400 = 240 >> 240$ non-useful files, which he deleted again. The total number of valuable files he downloaded in the second round is $400 - 240 = <<400 - 240 = 160 >> 160$ To write his research, Brennan had $160 + 240 = <<160 + 240 = 400 >> 400$ useful files to reference to write his research. The answer is 400 + +# Example Output 2: + +Question: Brennan was researching his school project and had to download files from the internet to his computer to use for reference. After downloading 800 files, he deleted $70\%$ of them because they were not helpful. He downloaded 400 more files but again realized that 3/5 of them were irrelevant. How many valuable files was he left with after deleting the unrelated files he downloaded in the second round? + +Answer: First, we need to calculate how many non-valuable files Brennan downloaded in the first round The number of non-valuable files Brennan downloaded in the first round is 70/100*800 = <<70/100*800=560>>560 files. Next, we need to calculate how many valuable files Brennan downloaded in the first round The number of valuable files Brennan downloaded in the first round is 800-560 = <<800-560=240>>240 After downloading 400 new files, we need to calculate how many non-valuable files he downloaded When he downloaded 400 new files, there were 3/5*400 = <<3/5*400=240>>240 non-useful files, which he deleted again. Finally, we need to calculate how many valuable files he was left with The total number of valuable files he downloaded in the second round is 400-240 = <<400-240=160>>160 Now we need to calculate the total number of valuable files he has left to write his research To write his research, Brennan had 160+240 = <<160+240=400>>400 useful files to reference to write his research. We are ready to output the final answer The answer is 400 + +Figure 4: The prompt and in-context learning examples used for sampling rationales for GSM8K. The bolded rationales represent implicit rationales in the document. + +LLaMa-3-8B-Instruct and GPT-4 to provide feedback by directly reranking partial reasoning traces given the question (Figure 10). + +# F Discussion + +Scaling up RATIONALYST. Scaling RATIONALYST with stronger models and increased computational resources is a logical next step. Utilizing stronger models, such as LLaMa-3-70B or GPT4, would enhance the quality of extracted rationales, improve filtration accuracy, and ultimately strengthen RATIONALYST. However, due to computational constraints, we have not pursued this, which remains a limitation of this paper. Additionally, using larger unlabelled datasets with more extensive reasoning content, such as OpenWebMath (Paster et al., 2023), is currently infeasible due to the significant computational and time requirements for pre-filtering and training. These enhancements are planned for future work. + +Connection to research on scaling test-time compute. Recent research has focused on extending computational resources at test-time (Snell et al., 2024; Wu et al., 2024), particularly for complex reasoning tasks. In our experiments, we focus on developing heuristics and employ a straightforward approach of sampling multiple candidates and reranking them based on RATIONALYST's guidance. However, RATIONALYST's framework is compatible with more sophisticated test-time compute techniques. Its heuristics can be integrated into existing algorithms like beam-search or lookahead search, potentially enhancing their performance without significantly increasing computational cost. + +Is training on extracted rationales necessary? In our approach, we first select a subset of unlabeled data that contains strong reasoning signals, then extract implicit rationales from this data for model fine-tuning. While it has been demonstrated + +# System Prompt: + +Your task is to add rationals to a piece of text. The rationals should help you with predicting future text. You can add rationals by writing "rational"EOT". Here are some examples of rationale generation: + +# Example Input 1: + +Question: He came across a raw item but his pack was full, he had to abandon something if he was to what the item? +Choices: A - join, B - acquire, C - engage, D - maintain, E - remit +Answer: Acquiring an item requires one to have space to carry it. As he had box full of items, he had to abandon one of them in order to acquire new one. Join and Engage is not related to item. Maintain an item does not require one to abandon existing item. One cannot remit raw item. The answer is B - acquire. + +# Example Output 1: + +Question: He came across a raw item but his pack was full, he had to abandon something if he was to what the item? +Choices: A - join, B - acquire, C - engage, D - maintain, E - remit +Answer: Acquiring an item requires one to have space to carry it. We also need to establish relationship between acquire and the question itself As he had box full of items, he had to abandon one of them in order to acquire new one. Let's check whether other answer choices are related to the word item in question Join and Engage is not related to item. Let's check whether other answer choices are contradictory to the word abandon in question Maintain an item does not require one to abandon existing item. Let's check whether other answer choices are related to the word raw item in question One cannot remit raw item. We are ready to make final prediction The answer is B - acquire. + +# Example Input 2: + +Question: Where is aberdeen in the US located? +Choices: A - washington, B - europe, C - scotland, D - maryland, E - south dakota +Answer: Aberdeen is located in Washington state which is in US. Aberdeen is also located in Scotland which is part of Europe. However, Scotland or Europe are not inside US. Aberdeen is not located in Maryland and South Dakota states. The answer is A - washington. + +# Example Output 2: + +Question: Where is aberdeen in the US located? +Choices: A - washington, B - europe, C - scotland, D - maryland, E - south dakota +Answer: Aberdeen is located in Washington state which is in US. We need to think whether there is another aberdeen with the same name Aberdeen is also located in Scotland which is part of Europe. The answer choice need to be in the U.S. as mentioned in the question However, Scotland or Europe are not inside US. Let's check whether aberdeen is located in other answer choices Aberdeen is not located in Maryland and South Dakota states. We are ready to make final prediction The answer is A - washington. + +Figure 5: The prompt and in-context learning examples used for sampling rationales for ECQA. The bolded rationales represent implicit rationales in the document. + +that training on data with robust reasoning signals can enhance reasoning capabilities on its own (Gunasekar et al., 2023; Jiang et al., 2024a), we believe our method offers additional performance benefits for two reasons. First, many language models have already been trained on datasets like The Pile. The value of fine-tuning on previously encountered text is likely lower than the value of fine-tuning on newly incorporated rationales. Second, implicit rationales encapsulate the reasoning process. Pre-training on these rationales enhances reasoning more effectively than focusing on the whole document. + +# G Extended Related Work + +Supervising reasoning. Supervision-based approaches have been shown to enhance the reasoning abilities of LLMs. Cobbe et al. (2021b) and Snell et al. (2024) demonstrate that training a "verifier" to supervise reasoning can be more parameter-efficient than simply expanding the parameters of the "reasoner" responsible for solving the reasoning task. Ground-truth feedback from interaction with the environment is an effective form of supervision + +(Wang et al., 2023), but it works only in controlled environments like simulated world. Some verifiers employ principles like compositional reasoning to validate the reasoning process (Dhuliawala et al., 2023; Weir et al., 2024, 2023; Vacareanu et al., 2024), these general-purpose approaches do not fully leverage the vast amount of available unlabeled data that a data-driven approach could utilize. Process-based supervision (Lightman et al., 2023; Luo et al., 2024; Wang et al., 2024a) offers supervision at each reasoning step rather than just at the final result. While promising, it requires substantial human annotation for the correctness of intermediate steps or the existence of ground-truth answers for data collection. Our work aims to address these challenges by proposing a data-centric process-supervision method without the need for human annotation. + +Knowledge extraction from unlabelled data. LLMs are conventionally trained on extensive web data using autoregressive next-token prediction. While effective, this approach may not fully harness the potential of the pre-training data, as latent information within this data could be better ac + +cessed using techniques beyond simple next-token prediction. Recent research has demonstrated several approaches to utilize this latent information to develop more sophisticated language model capabilities. Schick et al. (2023) introduced Toolformer, which autonomously annotates and extracts appropriate positions, names, and inputs for tool use by leveraging supervision from future tokens. Similarly, Cornille et al. (2024) developed a method for learning to plan coherent article writing through self-supervised learning in text. More closely related to our work, Zelikman et al. (2024) proposed Quiet-Star, which applied a comparable technique to uncover underlying rationales in daily communication to enhance reasoning capabilities. Our work adopts a strategy similar to Quiet-Star for extracting rationales in an unsupervised manner. However, our approach diverges in its primary objective: we aim to train a "supervisor" that can utilize these rationales to provide process supervision for any "reasoner." This focus enables us to implement a simpler and more reliable method, as we don't need to directly integrate rationale extraction with "reasoner" training. Our approach thus offers a novel perspective on leveraging latent information in language models to enhance their capabilities. + +Rationales as the basis for reasoning. Various studies have focused on improving the use of rationales to elicit reasoning. Fu et al. (2023) refine rationales for more effective reasoning elicitation, while Li et al. (2023) explore different approaches to leveraging rationales to enhance reasoning. Other works, such as Hwang et al. (2024), examine the verification of rationales produced by LLMs during reasoning to improve performance. Additionally, training LLMs on rationale-rich data is a common strategy for enhancing reasoning skills. As highlighted by Lewkowycz et al. (2022) and Jiang et al. (2024a), LLMs trained on science and math data tend to perform better on reasoning tasks, particularly when CoT prompting is used. In this work, we build on this foundation by using rationales as the core of our method to supervise reasoning. + +# H The Resulting Data from Extraction/Filteration. + +On GSM8K, our method generates an average of 2.34 rationales per document, while on ECQA, it generates 2.58 rationales per document. The filtration process removes $80.5\%$ of the generated + +rationales on GSM8K and $42.4\%$ on ECQA. + +For The Pile, we report the number of rationales per document and the number after filtration for each subdomain. The Pile's documents, being longer than those in GSM8K and ECQA, yield a higher average number of rationales per document. Among the subdomains, StackExchange retains the highest percentage of rationales, likely due to its question-answering format aligning well with our reasoning tasks and containing more inherent reasoning. However, The Pile as a whole contains less reasoning content, making rationale extraction challenging. Setting the threshold to 0 accepts all rationales more helpful than not having them, but the yield remains low. A manual review shows that most filtered rationales describe the preceding context rather than guiding future reasoning. + +In total, we extracted approximately 14k rationales from GSM8K and ECQA combined, and about 65k from The Pile after filtration. + +# I RATIONALYST in Combination with General Methods for Reasoning Enhancement + +We have conducted additional experiments focusing on GSM8K and Math datasets to verify our claim. We specifically chose these arithmetic reasoning benchmarks over multiple-choice questions, as using self-consistency on multiple-choice tasks could artificially inflate performance. Using 64 generations for self-consistency, we observed improved accuracy on both benchmarks with the help of RATIONALYST. + +# System Prompt: + +Your task is to add rationals to a piece of text. The rationals should help you with predicting future text. You can add rationals by writing "rational"EOT>". Here are one example of rationale generation: + +# Example Input: + +\n\nNot applicable.\n\nJZ, DY and XS are the attending doctors of this patient. QS is responsible for Pathological results and WW is for Microbiological results. YS and XS is responsible for revision of the manuscript. All authors read and approved the final manuscript.\nAuthors' information + +{FPar1}n============================================================================================================================================================================================================&& physicians-in-training, and Yi Shi, Qunli Shi, Weiping Wang and Xin Su are attending specialist physicians who dedicate their time to mentoring trainees + +# Example Output: + +\n\nNot applicable..n\nJZ takes responsibility for drafting the manuscript. Indicates JZ's role, suggesting the next roles to be described will involve other tasks like attending doctors and result analysis. JZ, DY and XS are the attending doctors of this patient. QS is responsible for Pathological results and WW is for Microbiological results. Following the pattern, specific tasks related to results analysis are now described, predicting further details on manuscript revision. YS and XS is responsible for revision of the manuscript. The revision responsibility follows naturally after result analysis, likely leading to a final approval statement. All authors read and approved the final manuscript. Final approval statement indicates the roles and tasks, suggesting a summary or author information follows. $\backslash$ Authors' information $\backslash$ Transition to detailed author information section, predicting descriptions of each author's background + +\n===================================\n\nStarting with the roles of resident physicians-in-training, predicting subsequent details about attending specialist physicians and Yi Shi, Qunli Shi, Weiping Wang and Xin Su are attending specialist physicians who dedicate their time to mentoring trainees + +# Example Input: + +Suppose $-s^*w = -26^*w$ . Suppose $-15 = -5*j - w^j$ . Let $g(b) = b**3 - 3*b**2 - 2*b + 3$ . What is $g(j)?\backslash n-3\backslash nLet o(w) = -9 - 31214^*w + 31220^*w - 3$ . Determine $o(1)$ . $\backslash n-6\backslash nLet y = -11 + 15$ . Suppose $-4*c + 30 = -y^*r + 50$ , $\theta = -5*c - r - 25$ . Let $q(d) = d + 5$ . Give $q(c)$ . $\backslash n\theta\backslash nLet r = 2899 - 2906$ . Let $i(s) = 2*s^*2 + 12*s - 3$ . Calculate $i(r)$ . $\backslash n11\backslash nLet q$ be $6/(-105) + 4199/595$ . Let $m(t) = t**3 - 9*t**2 + 5*t + 5$ . Give $m(q)$ . $\backslash n-58\backslash nLet d = 440 - 92$ + +# Example Output: + +Suppose $-5\ast w = -26\ast w$ Suppose $-15 = -5\ast j - w\ast j$ . Let $g(b) = b\ast 3 - 3\ast b\ast 2 - 2\ast b + 3$ . What is g(j)?\\nFirst solve the equations to find j, then substitute j into g(b) to calculate g(j)\n-3\nLet o(w) = -9 - 31214\*w + 31220\*w - 3. Determine o(1).\\nSubstitute w = 1 into the function o(w) and simplify to determine its value\n-6\nLet y = -11 + 15. Suppose $-4\ast c + 30 = -y^{\star}r + 50$ $\theta = -5^{*}c - r - 25$ . Let q(d) = d + 5. Give q(c).\\nFirst calculate y, then solve the equations to find c, and finally substitute c into q(d) to calculate q(c)\n0\nLet r = 2899 - 2906. Let i(s) = 2\*s\*\*2 + 12\*s - 3. Calculate i(r).\\nFirst calculate r, then substitute r into the function i(s) to calculate i(r)\n11\nLet q be $6 / (-105) + 4199 / 595$ . Let m(t) = t\*\*3 - 9\*t\*\*2 + 5\*t + 5. Give m(q).\\nFirst calculate q, then substitute q into the function m(t) to determine m(q)\n-58\nLet d = 440 - 92\nCalculate the value of d as 440 - 92 + +Figure 6: The prompt and in-context learning examples used for sampling rationales for The Pile. The bolded rationales represent implicit rationales in the document. + +# System Prompt: + +You are a smart assistant that solves math word problems. You will only generate one sentence that extends the reasoning trajectory that solves the question given the question and partial answer reasoning trajectory. Please don't repeat your previous generation while you're generating the sentence. If you think you're ready to output the answer, you can finish the response with The answer is: + +# Example Input: + +Question: Weng earns $12 an hour for babysitting. Yesterday, she just did 50 minutes of babysitting. How much did she earn? + +Answer: + +# Example Output: + +Weng earns 12/60 = $<<12/60=0.2>>0.2 per minute. + +# Example Input: + +Question: Weng earns $12 an hour for babysitting. Yesterday, she just did 50 minutes of babysitting. How much did she earn? + +Answer:Weng earns $12 / 60 = \$ <<12 / 60 = 0.2>>0.2$ per minute. + +# Example Output: + +Working 50 minutes, she earned \(0.2 \times 50 = \\)<<0.2*50=10>>10\( . The answer is: 10 + +Figure 7: The prompt and in-context-learning demonstrations used during inference time to encourage the agent model reason step by step on GSM8K. + +# System Prompt: + +You are a smart assistant that solves commonsense reasoning problems. You will only generate one sentence that extends the reasoning trajectory that solves the question given the question and partial answer reasoning trajectory. Please don't repeat your previous generation while you're generating the sentence. Please analyze all answer choices before finishing reasoning. If you think you're ready to output the answer, you can finish the response with The answer is: + +# Example Input: + +Question: He came across a raw item but his pack was full, he had to abandon something if he was to what the item? + +Choices: A - join, B - acquire, C - engage, D - maintain, E - remit + +Answer: + +# Example Output: + +Join is not the type of the activity associated with item. + +# Example Input: + +Question: He came across a raw item but his pack was full, he had to abandon something if he was to what the item? + +Choices: A - join, B - acquire, C - engage, D - maintain, E - remit + +Answer: Join is not the type of the activity associated with item. + +# Example Output: + +Acquiring requires space in a pack. To create space in a full pack, one has to abandon an item. + +# Example Input: + +Question: He came across a raw item but his pack was full, he had to abandon something if he was to what the item? + +Choices: A - join, B - acquire, C - engage, D - maintain, E - remit + +Answer: Join is not the type of the activity associated with item. Acquiring requires space in a pack. To create space in a full pack, one has to abandon an item. + +# Example Output: + +Engage is not related to item. + +# Example Input: + +Question: He came across a raw item but his pack was full, he had to abandon something if he was to what the item? + +Choices: A - join, B - acquire, C - engage, D - maintain, E - remit + +Answer: Join is not the type of the activity associated with item. Acquiring requires space in a pack. To create space in a full pack, one has to abandon an item. Engage is not related to item. + +# Example Output: + +Maintain an item does not require one to make space for it. + +# Example Input: + +Question: He came across a raw item but his pack was full, he had to abandon something if he was to what the item? + +Choices: A - join, B - acquire, C - engage, D - maintain, E - remit + +Answer: Join is not the type of the activity associated with item. Acquiring requires space in a pack. To create space in a full pack, one has to abandon an item. Engage is not related to item. Maintain an item does not require one to make space for it. + +# Example Output: + +One cannot remit raw item. The answer is B - acquire. + +Figure 8: The prompt and in-context-learning demonstrations used during inference time to encourage the agent model reason step by step on ECQA. + +# System Prompt: + +You are a smart assistant that solves math problems. You will only generate one sentence that extends the reasoning trajectory that solves the question given the question and partial answer reasoning trajectory. Please don't repeat your previous generation while you're generating the sentence. + +# Example Input: + +Question: If $2x - 9y = 14$ and $\$6x = 42 + y$ , what is the value of the product $\$xy$ ? Answer: + +# Generated Rationale: + +Let's first rewrite the second equation to isolate $y$ in terms of $x$ + +# Example Output: + +Rewrite the second equation to express $y\$$ in terms of $\$x$ : $6x = 42 + y$ $\text{implies} y = 6x - 42$ + +# Example Input: + +Question: If $2x - 9y = 14$ and $\$6x = 42 + y$ , what is the value of the product $\$xy$ ? Answer: Rewrite the second equation to express $\$y$ ' in terms of $\$x$ : $\$6x = 42 + y$ \`implies $y = 6x - 42$ + +# Generated Rationale: + +Substitute the expression for $\$ y$ into the first equation + +# Example Output: + +Substitute $y = 6x - 42$ into the first equation: $\$ 2x - 9(6x - 42) = 14$ + +# Example Input: + +Question: If $2x - 9y = 14$ and $\$6x = 42 + y$ , what is the value of the product $\$xy$ ? Answer: Rewrite the second equation to express $\$y$ 's in terms of $\$x$ : $\$6x = 42 + y$ implies $y = 6x - 42$ . Substitute $\$y = 6x - 42$ into the first equation: $\$2x - 9(6x - 42) = 14$ \ + +# Generated Rationale: + +We should simplify the equation and solve for $x$ + +# Example Output: + +Simplify and solve for $x:$: $2x - 54x + 378 = 14 \implies -52x + 378 = 14 \implies -52x = -364 \implies x = 7$ + +# Example Input: + +Question: If $2x - 9y = 14$ and $6x = 42 +y$, what is the value of the product $xy$? Answer: Rewrite the second equation to express $y$ in terms of $x:$: $6x = 42 + y \implies y = 6x - 42$. Substitute $y = 6x - 42$ into the first equation: $2x - 9(6x - 42) = 14$. Simplify and solve for $x:$: $2x - 54x + 378 = 14 \implies -52x + 378 = 14 \implies -52x = -364 \implies x = 7$ + +# Generated Rationale: + +Use the value of $x$ to calculate $y$ + +# Example Output: + +Substitute $x = 7$ back into $y = 6x - 42$ to find $y$: $y = 6(7) - 42 - 42 = 0$ + +# Example Input: + +Question: If $2x - 9y = 14$ and $6x = 42 +y$, what is the value of the product $xy$? Answer: Rewrite the second equation to express $y$ in terms of $x$: $6x = 42 + y \implies y = 6x - 42$. Substitute $y = 6x - 42$ into the first equation: $2x - 9(6x - 42) = 14$. Simplify and solve for $x$: $2x - 54x + 378 = 14 \implies -52x + 378 = 14 \implies -364 \implies x = 7$. Substitute $x = 7$ back into $y = 6x - 42$ to find $y$: $y = 6(7) - 42 = 42 - 42 = 0$ + +# Generated Rationale: + +Now we can just multiply the values of $x$ and $\$y$ 's to find the product + +# Example Output: + +Finally, calculate the product $xy$: $xy = 7 \cdot{0} = 0$. The value of the product $xy$ is $\boxed{0}$. + +Figure 9: Rationales generated by RATIONALYST for the test set of MATH. + +# System Prompt: + +Your task is to assign rewards to the reasoning trajectory that solves the question given the question and partial answer reasoning trajectory. The more probable the reasoning trajectory is correct, the higher the reward should be. The reward should be an integer in the range of 0 to 3. End your generation with So the reward is: + +# Example Input: + +Question: Michael had 58 golf balls. On tueyday, he lost 23 golf balls. On wednesday, he lost 2 more. How many golf balls did he have at the end of wednesday? Answer: Michael started with 58 golf balls. After losing 23 on tueyday, he had $58 - 23 = 35$ + +# Example Output: + +This reasoning trajectory is correct and reasonable. So the reward is: 3 + +# Example Input: + +Question: Jason had 20 lollipops. He gave Denny some lollipops. Now Jason has 12 lollipops. How many lollipops did Jason give to Denny? + +Answer: Jason started with 20 lollipops. After giving some to Denny, he had 12 left. To find out how many he gave away, we need to add $12 + 20$ , which gives us 32. So, Jason gave Denny 32 lollipops. + +# Example Output: + +This reasoning trajectory incorrectly adds instead of subtracting the lollipops given to Denny, leading to an illogical result. So the reward is: 1. + +Figure 10: The prompt and in-context-learning demonstrations used during process supervision to elicit the feedback by directly reranking partial reasoning trajectory. \ No newline at end of file diff --git a/rationalystpretrainingprocesssupervisionforimprovingreasoning/images.zip b/rationalystpretrainingprocesssupervisionforimprovingreasoning/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..b1375e2e3ac24c614472e374414c7ade2b4dfcc3 --- /dev/null +++ b/rationalystpretrainingprocesssupervisionforimprovingreasoning/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9f4178f23a0dcbd1c4dda10d209cf7c2db530b203c3c8bdde491807980425c6b +size 425183 diff --git a/rationalystpretrainingprocesssupervisionforimprovingreasoning/layout.json b/rationalystpretrainingprocesssupervisionforimprovingreasoning/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..d3fe6cc872cf773b4937e443ad92af0b45ec5039 --- /dev/null +++ b/rationalystpretrainingprocesssupervisionforimprovingreasoning/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d61129772fee5f9e0c3c556137bca8cee42330bbe9fc90e4816ea6e657747d7e +size 645648 diff --git a/re3synadependencybaseddatasynthesisframeworkforlongcontextposttraining/c5973251-ef67-447a-9904-062d624fffa8_content_list.json b/re3synadependencybaseddatasynthesisframeworkforlongcontextposttraining/c5973251-ef67-447a-9904-062d624fffa8_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..dbcdebbc3ac6c78e3d524fc7174382436ff7dc36 --- /dev/null +++ b/re3synadependencybaseddatasynthesisframeworkforlongcontextposttraining/c5973251-ef67-447a-9904-062d624fffa8_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:47d1561dcaedcadaca5c2543770c36a2fb43ac8c618790f4a1eae5a9b2d12481 +size 83477 diff --git a/re3synadependencybaseddatasynthesisframeworkforlongcontextposttraining/c5973251-ef67-447a-9904-062d624fffa8_model.json b/re3synadependencybaseddatasynthesisframeworkforlongcontextposttraining/c5973251-ef67-447a-9904-062d624fffa8_model.json new file mode 100644 index 0000000000000000000000000000000000000000..ada279d52a32506b87a2da0fb955546ce36139aa --- /dev/null +++ b/re3synadependencybaseddatasynthesisframeworkforlongcontextposttraining/c5973251-ef67-447a-9904-062d624fffa8_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7e057715c0a3abffc5bfa41e2a56ce919018c307f22d65b72eb77c4252e7fa3f +size 102008 diff --git a/re3synadependencybaseddatasynthesisframeworkforlongcontextposttraining/c5973251-ef67-447a-9904-062d624fffa8_origin.pdf b/re3synadependencybaseddatasynthesisframeworkforlongcontextposttraining/c5973251-ef67-447a-9904-062d624fffa8_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..40baf11d3f8d647cfdb813d1c15b5fcef9660521 --- /dev/null +++ b/re3synadependencybaseddatasynthesisframeworkforlongcontextposttraining/c5973251-ef67-447a-9904-062d624fffa8_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c0db3a56f86483af43d66991f79a65cd4e34365538c26cb40714c6f5dda33ea7 +size 2404181 diff --git a/re3synadependencybaseddatasynthesisframeworkforlongcontextposttraining/full.md b/re3synadependencybaseddatasynthesisframeworkforlongcontextposttraining/full.md new file mode 100644 index 0000000000000000000000000000000000000000..78be7d0ca16351a99cef252c698b12986b302faa --- /dev/null +++ b/re3synadependencybaseddatasynthesisframeworkforlongcontextposttraining/full.md @@ -0,0 +1,354 @@ +# $\mathbf{R}\mathbf{E}^{3}\mathbf{S}\mathbf{Y}\mathbf{N}$ : A Dependency-Based Data Synthesis Framework for Long-Context Post-training + +Zhiyang Zhang\*1 Ziqiang Liu\*2 Huiming Wang\*3 Renke Shan Li Kuang†1 Lu Wang De Wen Soh3 + +1Central South University + +$^{2}$ Shenzhen Institutes of Advanced Technology, Chinese Academy of Sciences + +$^{3}$ Singapore University of Technology and Design + +zzy573678@csu.edu.cn zq.liu4@siat.ac.cn huiming_wang@mymail.sutd.edu.sg + +kuangli@csu.edu.cn lwwzfzl@gmail.com dewen_soh@sutd.edu.sg + +# Abstract + +An important trend in the realm of large language models (LLMs) is the development of longer context windows. However, training LLMs with long context windows to acquire the capability of effectively modeling lengthy inputs is often hindered by the scarcity of naturally long-context data. Existing methods for constructing long-context data by concatenating short documents have overlooked a crucial characteristic of long-context data quality, namely semantic dependency. In this paper, we propose a novel framework called Retrieval, Dependency Recognition, and Reorder for data synthesis $(\mathbf{RE}^3\mathbf{SYN}^1)$ , which leverages semantic similarity to retrieve relevant documents and form several batches. Within each batch, the framework comprehensively recognizes dependency and utilizes them, along with a reorder algorithm, to organize the short documents into coherent long-context data. Comprehensive experiments on multiple benchmarks indicate that the data generated by the $\mathrm{RE}^3\mathrm{SYN}$ has longer dependencies and significantly enhances the model's long-context capabilities. + +# 1 Introduction + +The recent emergence of large language models (LLMs), such as the Flan series (Chung et al., 2022), LLaMA (Touvron et al., 2023a,b; Dubey et al., 2024) and ChatGPT (OpenAI, 2022; Achiam et al., 2023), has brought a paradigm shift in natural language processing (NLP) due to their impressive performance. Their remarkable understanding capabilities prompts more researchers to leverage these models in tackling more complex NLP challenges (Brown, 2020), such as book summarization or learning new tasks on the fly from many examples (Bai et al., 2023; Zhang et al., 2023), which + +also poses a great challenge to the ability of LLMs to process extremely long inputs. + +Due to the fact that positional encodings of LLMs (e.g., Rotary Position Embeddings (RoPE) (Su et al., 2024)) usually exhibit weak generalization to sequences longer than those encountered during training, these LLMs mostly choose to extend the context length by extrapolating positional encodings and fine-tuning with a small amount of long-context data (referred to as Long-Context Post-training) (Chen et al., 2023b; de Vries, 2023). + +Despite their exciting performance, natural long documents are often scarce and originate from specific domains (e.g., arXiv, Wikipedia, books, etc.) (Chen et al., 2024), and this uneven domain distribution of such data will lead to a degradation of the general capabilities of LLMs and affect their performance (Fu et al., 2024). On the other hand, studies by (Fu et al., 2023) et al. indicate that the quality of long document data is crucial for unlocking the long-context modeling capabilities of LLMs. (Chen et al., 2024) et al. further reveals that a significant characteristic of high-quality long documents is their stronger forward and backward dependencies. In summary, a promising direction is to leverage short documents to be organized into more coherent and higher-quality long documents. + +Several data engineering approaches have been proposed in previous researches to concatenate short documents either randomly or based on similarities (Staniszewski et al., 2023; Shi et al., 2023; Zhao et al., 2024), as shown in Figure 1. However, these methods of concatenating short documents do not reliably generate dependencies, resulting in the creation of numerous pseudo-long documents and raising concerns about data quality. This highlights the need for a more robust framework capable of effectively recognizing dependencies between documents and constructing high-quality long context data for post-training. + +![](images/ee527a5de36bba7d5adf1b6a4b81f7881d35eb79aa182ceae824166fcb31b235.jpg) +Figure 1: Overview of Different Synthesis Methods. Standard methods randomly mix documents into contexts, while similarity-based methods may group overly similar documents together, which can lead to document redundancy (Gao et al., 2024a) and result in low-quality pseudo-long documents. In contrast, $\mathrm{RE}^3\mathrm{SYN}$ emphasizes the dependencies between documents, thus synthesizing higher-quality long documents with more coherent semantics. + +![](images/5a0176ed17431e33cb4fd8105d4657389451fc4a2685470639906a7b132767a0.jpg) + +Motivated by this, in this work, we incorporate dependencies into the synthesis of long context data (Fu et al., 2023; Borgeaud et al., 2022). The underlying principle of dependencies is that the lower the perplexity (ppl) on a pre-trained model for the target corpus, the more fluent the semantics of that corpus are, indicating higher quality. We provide a novel framework for synthesizing long context data, namely Retrieval, Dependency Recognition, and Reorder (RE $^3$ SYN). RE $^3$ SYN effectively recognize dependencies between short documents and concatenates them into long-context data of a specified length based on these dependencies. + +The $\mathrm{RE}^3\mathrm{SYN}$ framework consists of two main steps. Firstly, considering that the likelihood of dependencies between documents with low semantic similarity is also low, $\mathrm{RE}^3\mathrm{SYN}$ connects nonredundant short documents based on semantic similarity and divides them into several batches for significant optimization of computational efficiency. Secondly, it evaluates the perplexity scores of different combinations of short documents within each batch using a small model to recognize dependencies, and then reorders the documents according to these dependencies. This ensures that the $\mathrm{RE}^3\mathrm{SYN}$ framework can distribute dependencies throughout the long documents, enhancing the long-range modeling capabilities of LLMs. Further, we adopt various strategies to optimize the computational efficiency, including chunked computation and evaluating perplexity with small models. Through these two steps, we concatenate short documents into long documents with stronger dependencies. + +Experimental results on multiple benchmarks and data evaluation frameworks indicate that the + +training data generated by $\mathrm{RE}^3\mathrm{SYN}$ significantly outperforms current data synthesis method and enhances the LLM's long-context modeling capabilities. Highlights of our contributions are as follows: +- To the best of our knowledge, this is the first study to utilize dependency instead of similarity to synthesize high-quality long-context data. +- We propose a simple yet effective data synthesis framework, $\mathbf{R}\mathbf{E}^{3}\mathbf{S}\mathbf{Y}\mathbf{N}$ , which organizes metadata into more meaningful long-context data with clearer preceding and following dependencies through similarity retrieval and document order adjustment. +- We balance the effectiveness and efficiency of the $\mathrm{RE}^3\mathrm{SYN}$ framework, resulting in a data processing step overhead of approximately $10\%$ and $5\%$ throughout the post-training process for the 7B and 13B models, respectively. +- Compared to standard or similarity-based concatenation, the data obtained from $\mathrm{RE}^3\mathrm{SYN}$ framework leads to models that demonstrate superior performance on both short-text and long-context benchmarks. + +# 2 Related Work + +# 2.1 Long-Context LLMs + +There are primarily two types of methods for extending the context window of LLMs. The first category involves directly adjusting the LLM's positional encodings or attention matrices (Han et al., 2023; Xiao et al., 2023) to accommodate longer contexts without any additional fine-tuning. The second category builds upon this by posttraining (Xiong et al., 2023), which typically results in better performance. Some studies, including Position Interpolation (Chen et al., 2023b), NTK-aware (bloc97, 2023), and YaRN (Peng + +![](images/1f73746588099ae72d60e9fa85c5afafcd63eaac3dfd20eda78de6cc4b5ded4a.jpg) +Figure 2: Framework of $\mathsf{RE}^3\mathsf{SYN}$ + +![](images/eb2dc937ccb7db1b4d1ed44fe11afa7af1da957ee316e99e1ae3eb193a5ab5e5.jpg) + +et al., 2023), modify the Rotary Position Encoding (RoPE) and then perform post-training for a certain number of steps to expand the model's context window. MPT-7B-StoryWriter (Team et al., 2023) utilizes the books3 dataset as the training set, fine-tuning MPT-7B (Team et al., 2023) on sequences of length 65K. LongLoRA (Chen et al., 2023c) implements fine-tuning with LoRA (Hu et al., 2021), expanding LLama2 (Touvron et al., 2023b) from a 4k context to 100k. + +However, as reported by de Vries (de Vries, 2023), for the post-training phase, the scarcity of long-context data presents the real challenge. As opposed to randomly stitching together unrelated short texts to reach a predetermined length (Chen et al., 2023c; Li et al., 2023; Chen et al., 2023a; Tworkowski et al., 2024), a viable direction is to concatenate metadata into higher-quality long texts. + +# 2.2 Long-Context Data Engineering + +Recently, many studies have explored the role of data engineering in LLM training. (Shi et al., 2023) proposed a similar method, ICLM, placing similar documents into the same pre-training window while ensuring that documents do not appear more than once, focusing on training from scratch. (Gao et al., 2024a) synthesizes long-context data by predicting queries for documents, extracting keywords, and concatenating them based on shared keywords. + +However, compared to merely "similar" documents, recent studies have delved deeper into the definition of high-quality training data. (Chen et al., 2024) found that the characteristic of high-quality long-context data lies in the existence of stronger dependency, proposing a data filtering method called Prolong based on this insight. Although data quality is ensured, data filtering methods cannot resolve the issue of the shortage of long- + +context data. + +Researchers have also attempted to construct training data with clearer sequential relevance using explicit hyperlinks between documents. (Yasunaga et al., 2022) merged Wikipedia documents containing hyperlinks or citations into the input context and pre-trained a masked language model, but as most data sources do not come with inherent hyperlinks, they are not a universal solution. Instead, we use the relative results calculated from perplexity between documents as an basis to judge the dependencies between documents, which provides an efficient and generalizable solution. + +# 3 RE $^3$ SYN Framework + +Figure 2 illustrates the overall framework of $\mathrm{RE}^3\mathrm{SYN}$ . For a given set of short documents, considering the low likelihood of dependency among documents with lower similarity, documents can first be clustered to reduce overhead. Specifically, $\mathrm{RE}^3\mathrm{SYN}$ is accomplished through the following two steps: (1) Leveraging an embedding model and dense vector retrieval system, documents are retrieved and grouped into batches based on semantic similarity, with each batch maintaining a fixed size. (2) For each batch, an enhanced topological sorting algorithm is employed to reordering documents by analyzing their inter-dependency. + +# 3.1 Document Clustering + +As shown in the left half of Figure 2, to cluster documents based on similarity, we first obtain the similar documents for each document and then construct the document graph based on similarity. In this graph, each node corresponds to a document, and the edges between nodes represent the semantic similarities between the documents. Specifically, for any document $d_{i}$ in Docs, we use the + +Algorithm 1 Greedy Similarity Search +1: Input: Docs Graph $G = (N,E)$ +2: $N = \{d_i \in Docs\}$ +3: $Nbr(d_i)$ return the neighbors list of $d_i$ +4: rand( $\mathcal{S}$ ) return a random doc +5: Output: $\mathcal{L}: \{d_0, d_1, \ldots\}$ +6: $\mathcal{S} \gets \operatorname{set}(N)$ +7: $\mathcal{L} \gets []$ +8: while $\mathcal{S}$ is not empty +9: $d \gets rand(\mathcal{S})$ +10: $\mathcal{L}.append(d)$ +11: $\mathcal{S}.remove(d)$ +12: while $Nbr(d) \cap S \neq \emptyset$ +13: $d \gets Nbr(d)[0]$ +14: $\mathcal{L}.append(d)$ +15: $\mathcal{S}.remove(d)$ +16: return $\mathcal{L}$ + +embedding model to generate the corresponding embedding $v_{i}$ for each document. Next, we employ the dense vector retrieval tool FAISS (Johnson et al., 2019) to efficiently search in large batches for the top-k documents that have the highest semantic similarity to each document's vector $v_{i}$ , which we denote as $Nbr(d_{i})$ . The documents in $Nbr(d_{i})$ are arranged in descending order of similarity, ensuring that the most similar documents can be retrieved first during subsequent traversals. + +Following this, we treat all documents as nodes $N = \{d_{i} \text{ in Docs}\}$ and establish the similarity relationships between documents as edges $E = \{(d_{i}, d_{j}) \text{ for } d_{j} \text{ in } Nbr(d_{i})\}$ to create the document graph $G = (N, E)$ . Previous studies (Shi et al., 2023; Gao et al., 2024a) have shown that identical training data can be detrimental to model performance. Hence, our goal is to traverse the document graph to obtain a sequence of documents that minimizes duplication while keeping similar documents as close as possible (Shi et al., 2023). Specifically, we can use a greedy similarity traversal algorithm to find an approximate solution in this scenario, which can be shown in Algorithm 1. + +Initially, an arbitrary node from the current node set is selected to the target document sequence, and removed from the node set. Next, $\mathsf{RE}^3\mathsf{SYN}$ traverses the neighboring nodes of this node until it finds the first neighbor that is not in the node set (i.e., an unvisited node) and continues to traverse. Once all neighboring nodes of the current node are in the node set, a new random node is selected from the set. This process continues until all nodes + +![](images/809e7f654bf3828d8dda803edadc2ccf22cf063e08ab41eca39fb38304ebe050.jpg) +Figure 3: Calculate the ppl between two documents. + +have been ordered. Through the greedy similarity traversal, we obtain a sequence of documents $\{doc_0, doc_1, \ldots\}$ , in which similar documents are kept close together. This process is similar to the approach by (Shi et al., 2023; Staniszewski et al., 2023) in constructing long-context data based on document similarity, but with a suitably reduced granularity to improve efficiency. Next, we divide the document sequence into several batches, each containing 128 documents, for subsequent dependency recognition and reordering. + +# 3.2 Dependency Recognition + +As shown in the right half of Figure 2, for any two documents $d_{i}$ and $d_{j}$ within a batch, the dependency between $d_{i}$ and $d_{j}$ can be assessed using perplexity under different concatenation orders. + +Specifically, if there is a dependency from $d_j$ to $d_i$ (i.e., it is more coherent for $d_i$ to precede $d_j$ ), the $ppl([d_i;d_j])$ should be lower than $ppl([d_j;d_i])$ , where $[d_i;d_j]$ indicates that the document $d_i$ is concatenated directly before the document $d_j$ . Therefore, we can select a smaller-sized language model to compute $ppl([d_i;d_j])$ and $ppl([d_j;d_i])$ . If $ppl([d_i;d_j])$ is lower, we connect an edge from $d_j$ to $d_i$ to indicate a dependency between the two documents, and vice versa. + +As shown in Figure 3, to mitigate the computation overhead associated with perplexity calculations, we employed a sampling and summation strategy. Specifically, we sampled $n$ fixed-length, non-overlapping chunks from both $d_{i}$ and $d_{j}$ , then calculated the perplexity for $n$ pairs of chunks in the specified order and summed them up to obtain $ppl([d_i;d_j])$ for that order. + +# 3.3 Dependency-based Reorder + +Through dependency recognition, we can determine the dependency relationships between any two documents within a batch, allowing us to create a document dependency graph $G_{d} = (N_{d},E_{d})$ . + +Algorithm 2 Dependency-based Reorder +1: Input: Document Dependency Graph $G_{d} = (N_{d},E_{d})$ +2: $N = \{d_i\in Docs\_batch\}$ +3: $Nbr(d_i)$ return the list of $d_j$ if $(d_j,d_i)\in E_d$ +4: $otd(d_i)$ return the out-degree of $d_i$ +5: $cand\_nodes$ return nodes with out-degree 0 +6: $rm\_cycle(G)$ remove cycles from the graph +7: Output: $\mathcal{L}:\{d_0,d_1,\ldots \}$ +8: $\mathcal{L}\gets []$ +9: $orig\_otd(d_i)\gets otd(d_i)$ +10: $rm\_cycle(G_d)$ +11: while $|N_d| > 0$ do +12: $d_i\gets argmin_{d\in cand\_nodes}orig\_otd(d_i)$ +13: $\mathcal{L}.append(d_i)$ +14: for each $d_j\in Nbr(d_i)$ do +15: $otd[d_j]\gets otd[d_j] - 1$ +16: end for +17: end while +18: return $\mathcal{L}$ + +Where the nodes represent the documents in the current batch $N_{d} = \{d_{i}$ in Docs_batch}, and the dependency relationships between the documents serve as edges $E_{d} = \{(d_{i},d_{j},w_{ij})\mid d_{i},d_{j}\in$ $N_{b}\wedge ppl([d_{i};d_{j}] < ppl([d_{j};d_{i}])\}$ , where $w_{ij} =$ $\frac{\mathrm{ppl}([\mathrm{doc}_i;\mathrm{doc}_j])}{\mathrm{ppl}([\mathrm{doc}_j;\mathrm{doc}_i])}$ represents the relative size of the dependency between the two documents. + +Our goal is to ensure that the concatenated documents retain only unidirectional dependency relationships after reordering, which can transform to a topological sorting problem (Kahn, 1962). The objective is to traverse the graph and ensure that for each directed edge $(j,i)$ , node $i$ appears before node $j$ in the ordering. We design an enhanced algorithm based on topological sorting, called Dependency-based Reorder tailored to our specific problem scenario, which is illustrated in Algorithm 2. + +First, we traverse the graph, upon encountering cycles, we remove the edge with the smallest weight $w_{ij}$ within the cycle (indicating the weakest dependency between the two documents) to eliminate the cycle, thus transforming it into an acyclic graph. Next, we obtain all nodes with an out-degree of zero and select the node with the highest original out-degree among them to add to the ordered sequence, while updating the out-degrees of its neighboring nodes. This process continues until all nodes are ordered. The motivation for selecting the node with the highest original out-degree is to + +prioritize those nodes that directly impact a greater number of other nodes, thereby facilitating a tighter arrangement of interdependent nodes. + +Finally, we use the sequences obtained after dependency-based reorder to concatenate all documents and split them into fixed-size contexts for training. + +# 4 Experiment Setup + +# 4.1 Training Details + +We conduct post-training on LLama2 (Touvron et al., 2023b) models with 7B and 13B. We applied an NTK-aware (bloc97, 2023) method with a base of 160,000 to adjust position indices, extending the model's capability to support a context window of 32K tokens. Both model variants were trained with the objective of next token prediction, with the learning rate set to 2e-5, no weight decay, and a single epoch, while the global batch size was set to 128. Additionally, we utilized over 20 steps of linear learning rate warm-up, along with the AdamW optimizer, where $\beta_{1} = 0.9$ and $\beta_{2} = 0.95$ . + +To enhance the reliability of our methods, multiple trials are necessary. Given the substantial computational resource cost of a round of experiments, we conducted a total of three rounds of experiments. The results reported in the paper are the averages of these rounds. + +# 4.2 Training Data + +We use the open-source dataset FineWeb (Penedo et al., 2024) for training, which contains cleaned and deduplicated English web data from CommonCrawl (Wenzek et al., 2019). It is worth noting that CommonCrawl accounts for more than $80\%$ of LLaMA's training data (de Vries, 2023), which ensures that the data distribution in the pre-training stage and the post-training stage is basically consistent. We randomly sampled 40B tokens in total from the SAMPLE-350BT (Penedo et al., 2024) version of FineWeb. We used the $\mathrm{RE}^3\mathrm{SYN}$ framework to construct our training data, which has a length of 32K. The training dataset remains completely consistent across all our experiments. + +During the document clustering, we use the embedding model a11-MiniLM-L6-v2 (Reimers and Gurevych, 2019) to generate corresponding embeddings for each document, with a maximum retrieval number $k = 10$ . To improve computational efficiency in the dependency recognition, we choose OPT-350m (Zhang et al., 2022) as the smaller lan + +
MethodTest setAvg.Evaluation Context Window Size
2048409681921638432768
Standardproofpile3.473.923.543.383.293.25
ICLMproofpile3.163.813.353.052.852.74
RE3SYNproofpile3.113.743.303.012.822.71
StandardPG1910.1110.8610.279.959.779.70
ICLMPG1910.1711.6910.669.939.419.18
RE3SYNPG199.8711.0810.259.689.289.07
+ +Table 1: Sliding window perplexity (stride S=1024) of 32k-length documents truncated to evaluation context window size on different data synthesis method base on LLaMA2 7B. + +guage model to calculate perplexity, which has been shown to maintain high accuracy with faster speed (Chen et al., 2024). The chunk sampling number and size are set to 4 and 128, respectively. + +# 4.3 Baseline + +We compared the $\mathrm{RE}^3\mathrm{SYN}$ framework with two baseline methods: (1) The Standard randomly concat documents in the corpus until a preset context window is reached, after which it is truncated (Roziere et al., 2023; Chen et al., 2023c; Tworkowski et al., 2024; Li et al., 2023). (2) ICLM (Shi et al., 2023) concatenates the current document with the most similar documents in the corpus, using the traveling salesman algorithm to avoid duplicates. We use this open-sourced method to represent similarity-based data concatenation solutions of the same type. All methods are processed and synthesised on the same data, going through the same number of post-training steps to ensure consistent computational costs. + +# 4.4 Task Setting + +We comprehensively evaluate the model's performance under different data processing methods, which includes the following three tasks: + +Language Modeling Task Language modeling task measures the perplexity of the LLM on the test set corpus, serving as one of the key indicators for assessing LLM performance. We follow (Chen et al., 2023c, 2024) to randomly sampled 128 documents from the total proof-pile (Azerbayev et al., 2022) and PG19 test split, and all perplexity calculations used a sliding window method with a stride of $s = 1024$ . + +Long-Context Task We used LongBench (Bai et al., 2023) to evaluate the LLM's performance on real-world long-context tasks, including + +single/multi-document question answering, summarization, code completion, etc. The average length of the tasks ranges from 5K to 15K, which poses a significant challenge for the LLM's understanding capabilities in ultra-long contexts. In addition, Needle in a HayStack Task is also an important benchmark for evaluating the retrieval ability of LLMs. The evaluation results of Needle in a HayStack Task can be found in AppendixA.2. + +Standard Benchmark We assessed the LLM against a selection of standard short benchmarks from the HuggingFace Open LLM harness (Gao et al., 2024b), thereby validating its foundational comprehension and modeling skills. + +# 5 Experiment Result + +# 5.1 Language Modeling Task + +We evaluated the language modeling perplexity of LLMs trained on concatenated data using the $\mathrm{RE}^3\mathrm{SYN}$ and baseline methods. Results are shown in Table 1. Firstly, the perplexity of the $\mathrm{RE}^3\mathrm{SYN}$ method is significantly better than that of the similarity concatenation method, indicating that the data constructed using the $\mathrm{RE}^3\mathrm{SYN}$ method better stimulates the language modeling capabilities of LLMs. Additionally, we observed that on PG19, the performance of ICLM is slightly inferior to that of the Standard method. We speculate this is due to the concatenation of overly similar documents when the context length increases to $32k$ , leading to document redundancy and thus causing a decline in performance, and the dependency recognition and reorder of $\mathrm{RE}^3\mathrm{SYN}$ avoid excessive redundancy and enhance the inter-document coherence. + +# 5.2 Performance on LongBench + +We use a real-world benchmark LongBench to assess models trained with different data synthesis + +
MethodModel sizeAvg.Sgl.Multi.Sum.Few.Syn.Code.
Standard7B23.9417.3217.7613.9560.672.531.45
ICLM7B29.0124.0923.1222.1366.712.3835.62
RE3 SYN7B30.3124.4324.8423.6166.273.2839.43
Standard13B21.2814.7219.9312.5961.003.1416.31
ICLM13B27.9522.2817.2317.4966.293.041.46
RE3 SYN13B29.1321.4923.7818.5566.273.7540.95
+ +Table 2: Experimental results of models with ${32}\mathrm{k}$ context length on LongBench. + +
MethodModel sizeAvg.MMLUWinograndeHellaswagARC_EARC_C
Standard7B0.6220.4110.6520.7740.7730.501
ICLM7B0.6270.4110.6710.7850.7710.499
RE3 SYN7B0.6340.4220.6720.7820.7830.512
Standard13B0.6700.5000.6770.8050.8100.558
ICLM13B0.6710.5010.6640.8120.8200.565
RE3 SYN13B0.6740.5020.6730.8100.8150.569
+ +Table 3: Performance comparison of different models on different short text benchmarks. + +methods, the average results of the six categories of tasks in LongBench are shown in Table 2. Detailed results can be found in Appendix A.1. From this, we can see that our method significantly outperforms other baseline methods overall. Specifically, on the 7B model, $\mathrm{RE}^3\mathrm{SYN}$ improves by an average of $6.37\%$ compared to standard method, and by an average of $1.3\%$ compared to ICLM. On the 13B model, $\mathrm{RE}^3\mathrm{SYN}$ improves by an average of $7.85\%$ compared to standard method, and by an average of $1.18\%$ compared to ICLM. These results demonstrate the effectiveness of using the $\mathrm{RE}^3\mathrm{SYN}$ framework to concatenate metadata into longer dependency texts for training, suggesting that from a data perspective, it can further address real-world long-context tasks. + +# 5.3 Standard Benchmark + +We assessed LLMs corresponding to different data concatenation methods on several standard benchmarks from the Hugging Face Open LLM leaderboard, including MMLU (Hendrycks et al., 2020), Winogrande (Sakaguchi et al., 2021), Hellaswag (Zellers et al., 2019),ARC_Easy and ARC_Challenge (Clark et al., 2018). As shown in Table 3, we can see that LLMs obtained with $\mathrm{RE}^3\mathrm{SYN}$ also maintain stronger performance on short benchmarks, outperforming baseline methods or being roughly on par. This is crucial be + +cause it indicates that the LLMs trained on concatenated texts with longer dependencies have not lost their short-text capabilities while improving long-context abilities, further validating the robustness of our method. + +# 6 Analysis + +# 6.1 Balance between Effectiveness and Efficiency + +Considering that in practical applications, data processing steps should not incur excessive overhead, we provide some more efficient techniques, such as clustering in Section 3.1 and chunked computation in dependency recognition in Section 3.2, which help us complete data preparation more quickly. + +Taking 40B training tokens and a 7B model as an example, we present the overhead (GPU-hours) and proportions of the three stages in the entire process in Table 4. Specifically, the three stages are as follows: Clustering: get semantically similar documents and greedy similarity search; Reorder: dependency recognition and reorder; Training: We perform post-training on the LLama2 7B using A800 GPUs. It can be seen that the costs of Clustering and Reorder are roughly equal. For the 7B model, these two steps account for $4.6\%$ and $5.6\%$ of the total cost, respectively, while the entire data processing constitutes about $10\%$ of the whole process. For the 13B model, the costs of these two + +
StageGPU·HourProportion
Clustering3124.6%
Reorder3845.6%
Training614489.8%
+ +stages will be reduced to $2.4\%$ and $2.9\%$ , respectively. As the model size increases, this proportion will decrease further, which is within an acceptable range. On the other hand, the synthesized data using our method can be reused repeatedly and even applied to tasks such as dialogue data construction, further ensuring the versatility of our approach. + +# 6.2 Document Redundancy and Long-Dependency + +Research has shown that concatenating documents based on similarity can lead to excessively similar content in long-context data, resulting in document redundancy, which can decrease model performance (Gao et al., 2024a). On the other hand, long dependencies have been proven to be an important indicator of the quality of long-context data (Chen et al., 2024). One important goal in the design of the $\mathrm{RE}^3\mathrm{SYN}$ is to reduce redundancy and enhance the dependency relationships between documents. Specifically, the documents in the dataset we used have an average length of about $1.6\mathrm{k}$ , and to concatenate $32\mathrm{k}$ of data, approximately 20 documents are needed. We perform dependency recognition and reordering in batches of 128 documents, allowing the documents to recognize dependency relationships with other documents that are further apart (i.e., less similar), while effectively resolving overly redundancy arising from similarity searches. + +To evaluate whether our method can ultimately lead to longer dependencies, we used the Prolong (Chen et al., 2024) framework to compute scores based on all data concatenated through standard, ICLM, $\mathrm{RE}^3\mathrm{SYN}$ and its two variants: $\mathrm{RE}^3\mathrm{SYN}_{knn}$ (use knn (Guu et al., 2020; Levine et al., 2021) for document clustering) and $\mathrm{RE}^3\mathrm{SYN}_{64doc}$ (reorder using batches of 64 documents), taking the average. The results are shown in Table 5. We can see that the scores obtained using our method are significantly higher than both baseline methods, nearly five times the random concatenation score, and an improvement of $46\%$ + +Table 4: The proportion of each process overhead in the entire training phase. + +
MethodProlong score
Standard19.432
ICLM64.741
RE3SYN94.587
RE3SYNknn72.476
RE3SYN64doc83.130
+ +Table 5: The scores given by prolong under different data synthesis methods for the same original data. + +over similarity concatenation. This indicates that $\mathrm{RE}^3\mathrm{SYN}$ surpasses current state-of-the-art methods in synthesizing long-range dependencies in long-texts data. Using knn for document clustering and reordering smaller batches both lead to a reduction in the final data dependencies. We believe this is because the one-to-many similarity search in knn increases document redundancy. This result also underscores the importance of maintaining larger batches to uncover more potential dependencies. + +It is worth noting that, $\mathrm{RE}^3\mathrm{SYN}$ do not set longer dependencies as an explicit synthesis goal, such as separating two documents with dependencies as much as possible. We believe that methods which select the next document based on the similarity of remaining candidate documents to the previous one, lead to associations existing among only nearby documents (Shi et al., 2023). In contrast, $\mathrm{RE}^3\mathrm{SYN}$ calculates the dependencies between all documents to be connected and applies an improved topological sort to ensure that the overall sequence of documents remains more coherent, which is the source of the long dependencies in the data produced by $\mathrm{RE}^3\mathrm{SYN}$ . + +# 7 Conclusion + +In this paper, we introduce a simple and effective data synthesis framework $\mathrm{RE}^3\mathrm{SYN}$ aimed at establishing stronger dependencies, which recognize dependencies between discrete documents by recognizing dependencies on similar documents, resulting in more coherent long-context data through reordering. Extensive experiments on multiple benchmarks demonstrate that $\mathrm{RE}^3\mathrm{SYN}$ can further enhance the long context modeling capability of LLMs. We believe this research can provide new insights for future researchers in the direction of high-quality data synthesis. + +# 8 Limitations + +The following are some limitations that the $\mathrm{RE}^3\mathrm{SYN}$ may face: (1) We implemented document clustering for $\mathrm{RE}^3\mathrm{SYN}$ using a simple and fast method, which could be improved by currently available more precise similar document retrieval methods. (2) Due to resource constraints, we validated the effectiveness of $\mathrm{RE}^3\mathrm{SYN}$ on the LLama2-7B and LLama2-13B models, it is excepted to obtain better performance with more base-models. We will explore the above listed limitations further in future studies. + +# 9 Ethical Statements + +Our study do not carry any ethical concerns. Specifically, Our training data are publicly available and designated for research purposes only. We inspect our dataset to ensure it does not contain any unethical content, private information and offensive topics. Moreover, the base models we used are also publicly available for research purpose. + +# Acknowledgments + +This work has been supported by the National Key R&D Program of China under grant No. 2022YFF0902500, the National Natural Science Foundation of China under grant No.62472447, the Science and Technology Innovation Program of Hunan Province under grant No.2023RC1023, Fujian Provincial Natural Science Foundation of China (No. 2024J08371), and Hunan Provincial Natural Science Foundation of China under grant No.2024JK2006. + +# References + +Josh Achiam, Steven Adler, Sandhini Agarwal, Lama Ahmad, Ilge Akkaya, Florencia Leoni Aleman, Diogo Almeida, Janko Altenschmidt, Sam Altman, Shyamal Anadkat, et al. 2023. Gpt-4 technical report. arXiv preprint arXiv:2303.08774. +Zhangir Azerbayev, Edward Ayers, and Bartosz Piotrowski. 2022. Proof-pile. +Yushi Bai, Xin Lv, Jiajie Zhang, Hongchang Lyu, Jiankai Tang, Zhidian Huang, Zhengxiao Du, Xiao Liu, Aohan Zeng, Lei Hou, et al. 2023. Longbench: A bilingual, multitask benchmark for long context understanding. arXiv preprint arXiv:2308.14508. +bloc97. 2023. Ntk-aware scaled rope allows llama models to have extended $(8k+)$ context size without any fine-tuning and minimal perplexity degradation. + +Sebastian Borgeaud, Arthur Mensch, Jordan Hoffmann, Trevor Cai, Eliza Rutherford, Katie Millican, George Bm Van Den Driessche, Jean-Baptiste Lespiau, Bogdan Damoc, Aidan Clark, et al. 2022. Improving language models by retrieving from trillions of tokens. In International conference on machine learning, pages 2206-2240. PMLR. +Tom B Brown. 2020. Language models are few-shot learners. arXiv preprint arXiv:2005.14165. +Guanzheng Chen, Xin Li, Zaiqiao Meng, Shangsong Liang, and Lidong Bing. 2023a. Clex: Continuous length extrapolation for large language models. arXiv preprint arXiv:2310.16450. +Longze Chen, Ziqiang Liu, Wanwei He, Yunshui Li, Run Luo, and Min Yang. 2024. Long context is not long at all: A prospector of long-dependency data for large language models. arXiv preprint arXiv:2405.17915. +Shouyuan Chen, Sherman Wong, Liangjian Chen, and Yuandong Tian. 2023b. Extending context window of large language models via positional interpolation. arXiv preprint arXiv:2306.15595. +Yukang Chen, Shengju Qian, Haotian Tang, Xin Lai, Zhijian Liu, Song Han, and Jiaya Jia. 2023c. Longlora: Efficient fine-tuning of long-context large language models. arXiv preprint arXiv:2309.12307. +Hyung Won Chung, Le Hou, S. Longpre, Barret Zoph, Yi Tay, William Fedus, Eric Li, Xuezhi Wang, Mostafa Dehghani, Siddhartha Brahma, Albert Webson, Shixiang Shane Gu, Zhuyun Dai, Mirac Suzgun, Xinyun Chen, Aakanksha Chowdhery, Dasha Valter, Sharan Narang, Gaurav Mishra, Adams Wei Yu, Vincent Zhao, Yanping Huang, Andrew M. Dai, Hongkun Yu, Slav Petrov, Ed Huai hsin Chi, Jeff Dean, Jacob Devlin, Adam Roberts, Denny Zhou, Quoc V. Le, and Jason Wei. 2022. Scaling instruction-finetuned language models. ArXiv, abs/2210.11416. +Peter Clark, Isaac Cowhey, Oren Etzioni, Tushar Khot, Ashish Sabharwal, Carissa Schoenick, and Oyvind Tafjord. 2018. Think you have solved question answering? try arc, the ai2 reasoning challenge. arXiv preprint arXiv:1803.05457. +Harm de Vries. 2023. In the long (context) run. +Abhimanyu Dubey, Abhinav Jauhri, Abhinav Pandey, Abhishek Kadian, Ahmad Al-Dahle, Aiesha Letman, Akhil Mathur, Alan Schelten, Amy Yang, Angela Fan, et al. 2024. The llama 3 herd of models. arXiv preprint arXiv:2407.21783. +Yao Fu, Xinyao Niu, Xiang Yue, Rameswar Panda, Kim, Yoon, and Hao Peng. 2023. Understanding data influence on context scaling. +Yao Fu, Rameswar Panda, Xinyao Niu, Xiang Yue, Hananeh Hajishirzi, Yoon Kim, and Hao Peng. 2024. Data engineering for scaling language models to 128k context. arXiv preprint arXiv:2402.10171. + +Chaochen Gao, Xing Wu, Qi Fu, and Songlin Hu. 2024a. Quest: Query-centric data synthesis approach for long-context scaling of large language model. arXiv preprint arXiv:2405.19846. +Leo Gao, Jonathan Tow, Baber Abbasi, Stella Biderman, Sid Black, Anthony DiPofi, Charles Foster, Laurence Golding, Jeffrey Hsu, Alain Le Noac'h, Haonan Li, Kyle McDonell, Niklas Muennighoff, Chris Ociepa, Jason Phang, Laria Reynolds, Hailey Schoelkopf, Aviya Skowron, Lintang Sutawika, Eric Tang, Anish Thite, Ben Wang, Kevin Wang, and Andy Zou. 2024b. A framework for few-shot language model evaluation. +Kelvin Guu, Kenton Lee, Zora Tung, Panupong Pasupat, and Mingwei Chang. 2020. Retrieval augmented language model pre-training. In International conference on machine learning, pages 3929-3938. PMLR. +Chi Han, Qifan Wang, Wenhan Xiong, Yu Chen, Heng Ji, and Sinong Wang. 2023. Lm-infinite: Simple on-the-fly length generalization for large language models. arXiv preprint arXiv:2308.16137. +Dan Hendrycks, Collin Burns, Steven Basart, Andy Zou, Mantas Mazeika, Dawn Song, and Jacob Steinhardt. 2020. Measuring massive multitask language understanding. arXiv preprint arXiv:2009.03300. +Cheng-Ping Hsieh, Simeng Sun, Samuel Kriman, Shantanu Acharya, Dima Rekesh, Fei Jia, Yang Zhang, and Boris Ginsburg. 2024. Ruler: What's the real context size of your long-context language models? arXiv preprint arXiv:2404.06654. +Edward J Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. 2021. Lora: Low-rank adaptation of large language models. arXiv preprint arXiv:2106.09685. +Jeff Johnson, Matthijs Douze, and Hervé Jégou. 2019. Billion-scale similarity search with GPUs. IEEE Transactions on Big Data, 7(3):535-547. +Arthur B Kahn. 1962. Topological sorting of large networks. Communications of the ACM, 5(11):558-562. +Yoav Levine, Noam Wies, Daniel Jannai, Dan Navon, Yedid Hoshen, and Amnon Shashua. 2021. The inductive bias of in-context learning: Rethinking pretraining example design. arXiv preprint arXiv:2110.04541. +Shanda Li, Chong You, Guru Guruganesh, Joshua Ainslie, Santiago Ontanon, Manzil Zaheer, Sumit Sanghai, Yiming Yang, Sanjiv Kumar, and Srinadh Bhojanapalli. 2023. Functional interpolation for relative positions improves long context transformers. arXiv preprint arXiv:2310.04418. +OpenAI. 2022. Introducing chatgpt. + +Guilherme Penedo, Hynek Kydlíček, Anton Lozhkov, Margaret Mitchell, Colin Raffel, Leandro Von Werra, Thomas Wolf, et al. 2024. The fine web datasets: Decanting the web for the finest text data at scale. arXiv preprint arXiv:2406.17557. +Bowen Peng, Jeffrey Quesnelle, Honglu Fan, and Enrico Shippole. 2023. Yarn: Efficient context window extension of large language models. arXiv preprint arXiv:2309.00071. +Nils Reimers and Iryna Gurevych. 2019. Sentence-bert: Sentence embeddings using siamese bert-networks. arXiv preprint arXiv:1908.10084. +Baptiste Roziere, Jonas Gehring, Fabian Gloeckle, Sten Sootla, Itai Gat, Xiaqing Ellen Tan, Yossi Adi, Jingyu Liu, Romain Sauvestre, Tal Remez, et al. 2023. Code llama: Open foundation models for code. arXiv preprint arXiv:2308.12950. +Keisuke Sakaguchi, Ronan Le Bras, Chandra Bhagavatula, and Yejin Choi. 2021. Winogrande: An adversarial winograd schema challenge at scale. Communications of the ACM, 64(9):99-106. +Weijia Shi, Sewon Min, Maria Lomeli, Chunting Zhou, Margaret Li, Victoria Lin, Noah A Smith, Luke Zettlemoyer, Scott Yih, and Mike Lewis. 2023. Incontext pretraining: Language modeling beyond document boundaries. arXiv preprint arXiv:2310.10638. +Konrad Staniszewski, Szymon Tworkowski, Sebastian Jasczur, Henryk Michalewski, Lukasz Kuciński, and Piotr Miłos. 2023. Structured packing in llm training improves long context utilization. arXiv preprint arXiv:2312.17296. +Jianlin Su, Murtadha Ahmed, Yu Lu, Shengfeng Pan, Wen Bo, and Yunfeng Liu. 2024. Roformer: Enhanced transformer with rotary position embedding. Neurocomputing, 568:127063. +MosaicML NLP Team et al. 2023. Introducing mpt-7b: A new standard for open-source, commercially usable llms. +Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothee Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, Aur'elien Rodriguez, Armand Joulin, Edouard Grave, and Guillaume Lample. 2023a. Llama: Open and efficient foundation language models. *ArXiv*, abs/2302.13971. +Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, et al. 2023b. Llama 2: Open foundation and fine-tuned chat models. arXiv preprint arXiv:2307.09288. +Szymon Tworkowski, Konrad Staniszewski, Mikołaj Pacek, Yuhuai Wu, Henryk Michalewski, and Piotr Miłos. 2024. Focused transformer: Contrastive training for context scaling. Advances in Neural Information Processing Systems, 36. + +Guillaume Wenzek, Marie-Anne Lachaux, Alexis Conneau, Vishrav Chaudhary, Francisco Guzmán, Armand Joulin, and Edouard Grave. 2019. Ccnet: Extracting high quality monolingual datasets from web crawl data. arXiv preprint arXiv:1911.00359. +Guangxuan Xiao, Yuandong Tian, Beidi Chen, Song Han, and Mike Lewis. 2023. Efficient streaming language models with attention sinks. arXiv preprint arXiv:2309.17453. +Wenhan Xiong, Jingyu Liu, Igor Molybog, Hejia Zhang, Prajjwal Bhargava, Rui Hou, Louis Martin, Rashi Rungta, Karthik Abinav Sankararaman, Barlas Oguz, et al. 2023. Effective long-context scaling of foundation models. arXiv preprint arXiv:2309.16039. +Michihiro Yasunaga, Jure Leskovec, and Percy Liang. 2022. Linkbert: Pretraining language models with document links. arXiv preprint arXiv:2203.15827. +Rowan Zellers, Ari Holtzman, Yonatan Bisk, Ali Farhadi, and Yejin Choi. 2019. Hellaswag: Can a machine really finish your sentence? arXiv preprint arXiv:1905.07830. +Lei Zhang, Yunshui Li, Ziqiang Liu, Junhao Liu, Min Yang, et al. 2023. Marathon: A race through the realm of long context with large language models. arXiv preprint arXiv:2312.09542. +Susan Zhang, Stephen Roller, Naman Goyal, Mikel Artetxe, Moya Chen, Shuohui Chen, Christopher Dewan, Mona Diab, Xian Li, Xi Victoria Lin, et al. 2022. Opt: Open pre-trained transformer language models. arXiv preprint arXiv:2205.01068. +Yu Zhao, Yuanbin Qu, Konrad Staniszewski, Szymon Tworkowski, Wei Liu, Piotr Miłos, Yuxiang Wu, and Pasquale Minervini. 2024. Analysing the impact of sequence composition on language model pretraining. arXiv preprint arXiv:2402.13991. + +# A Experimental Details + +# A.1 32K Longbench Results + +Table 6 and Table 7 report the detailed performance of different LLM on Longbench subtasks. + +
MethodModel sizeSingle-Doc QAMulti-Doc QACode Completion
NarrativeQAQasperMultiFieldQAHotpotQA2WikiMultihopQAMuSiQueLCCRepoBench-P
Standard7B16.4815.6419.8524.0620.468.7834.3528.55
ICLM7B19.5319.9732.7932.7121.2715.3938.4132.84
RE3SYN7B19.9519.8233.5134.8826.812.8442.8236.03
Standard13B16.0315.9612.1830.0620.289.4716.7215.89
ICLM13B15.0224.8926.9329.0214.498.1941.1541.77
RE3SYN13B12.0623.4428.9736.3121.9213.142.1639.73
+ +Table 6: Evaluation Results on LongBench subtasks. + +
MethodModel sizeFew-shotSummarizationSynthetic Tasks
TriviaQASAMSumTRECGovReportQMSumMultiNewsPassageRetrievalPassageCount
Standard7B79.5438.4764.011.6620.59.74.50.5
ICLM7B86.2242.9371.028.9821.1116.314.250.5
RE3SYN7B86.4742.7169.529.0221.4420.365.01.55
Standard13B81.8737.6563.510.7219.257.85.271.0
ICLM13B83.7341.6573.525.2523.773.455.01.0
RE3SYN13B82.9242.3873.526.0223.785.846.01.5
+ +Furthermore, table 8 and table 9 report the evaluation results for LongBench-E. LongBench-E is designed with uniform length-based sampling, ensuring a comparable amount of test data across the 0-4k, 4-8k, and $8\mathrm{k}+$ length intervals. This makes it more suitable for evaluating a model's ability to handle variations in input lengths. + +Table 7: Evaluation Results on LongBench subtasks. + +
MethodModel sizeAvg.passage_countsamsumlcctrec2wikimqamulti_news
ICLM7B27.601.0039.9943.2567.339.6213.20
RE3 SYN7B28.512.9840.3547.6167.3310.0317.42
ICLM13B28.493.0540.9343.2673.6710.227.33
RE3 SYN13B29.464.2640.0850.3570.3311.848.28
+ +Table 8: Evaluation Results on LongBench-E. + +# A.2 Needle in a HayStack Task + +Needle in a Haystack Task This task places a random statement in the middle of a long context window, requiring the model to retrieve and output this text, evaluating the LLM's retrieval ability in long contexts. We set the maximum context length to 32K. The evaluation results for the LLMs corresponding to the three methods are shown in Figure 4. $\mathrm{RE}^3\mathrm{SYN}$ Obtains $94\%$ needle in a haystack accuracy across all tested depths and context length, representing a significant improvement over the $86\%$ accuracy of the ICLM method, and far surpassing the random synthesis method. This further highlights that using our method to synthesis long-dependency data for LLM training can enhance the retrieval capabilities of LLMs. + +# A.3 32K RULER Result + +This task (Hsieh et al., 2024) offers a more comprehensive evaluation of long-context language models than simple retrieval-based benchmarks. It comprises a diverse set of tasks designed to probe a model's true long-context understanding and reasoning capabilities, including multihoptracing, aggregation, and + +
MethodModel sizetriviaqamultifieldqahotpotqagov_reportrepobenchpassage_retrievalqasper
ICLM7B85.3216.6710.6829.3727.856.508.30
RE3 SYN7B82.2116.7111.3728.5731.346.118.63
ICLM13B84.4514.8410.6225.7739.858.118.26
RE3 SYN13B84.4216.0311.5726.9237.5013.398.02
+ +Table 9: Evaluation Results on LongBench-E. + +
MethodModel sizeAvg.4K8K16K32K
Standard7B66.782.171.462.450.7
ICLM7B71.485.576.665.457.9
RE3 SYN7B73.887.076.269.762.1
Standard13B67.782.772.363.851.8
ICLM13B72.686.976.768.558.2
RE3 SYN13B74.788.277.869.563.3
+ +Table 10: Experimental results of models with ${32}\mathrm{k}$ context length on RULER. + +complex question answering, rather than merely assessing its ability to locate specific information. We evaluated our methods in 32K RULER, and the detailed results are presented in Table 10. Our proposed $\mathrm{RE}^3\mathrm{SYN}$ consistently outperforms both the standard and ICLM methods in all context lengths tested (4K, 8K, 16K, and 32K). + +![](images/aed79d58e46897452ae838e9e5a000e36ba338be173bfa7726ef3359fb096f47.jpg) + +![](images/fa4febcc66490244b4182b9818f5c4f662543fbf5161fdbb2e2a06e608bc7f2a.jpg) +Figure 4: Performance of ICLM-7B and $\mathbb{R}\mathbb{E}^3\mathbb{S}\mathbb{Y}\mathbb{N}-7\mathbb{B}$ in Needle In A Haystack. \ No newline at end of file diff --git a/re3synadependencybaseddatasynthesisframeworkforlongcontextposttraining/images.zip b/re3synadependencybaseddatasynthesisframeworkforlongcontextposttraining/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..db946dac2c834f3998453b41317af5b440862242 --- /dev/null +++ b/re3synadependencybaseddatasynthesisframeworkforlongcontextposttraining/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1975a36c25f531d3dbe418b2ad866a6ef9448f0c25d6e5b4c50d4b3b83b8601d +size 570086 diff --git a/re3synadependencybaseddatasynthesisframeworkforlongcontextposttraining/layout.json b/re3synadependencybaseddatasynthesisframeworkforlongcontextposttraining/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..707f97e4e7828df0b9afb6fcf572f1b962ca2a0f --- /dev/null +++ b/re3synadependencybaseddatasynthesisframeworkforlongcontextposttraining/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bf7e1bcb7f114f9d19e4b468a24f7891b7e396d768854cf7b9e6c519b1b8e3a5 +size 454867 diff --git a/readitintwostepstranslatingextremelylowresourcelanguageswithcodeaugmentedgrammarbooks/88c3e393-a219-43a1-8c34-87e0302a3ca1_content_list.json b/readitintwostepstranslatingextremelylowresourcelanguageswithcodeaugmentedgrammarbooks/88c3e393-a219-43a1-8c34-87e0302a3ca1_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..3524229ce7266a5c38b886273d83776c79d7d5ed --- /dev/null +++ b/readitintwostepstranslatingextremelylowresourcelanguageswithcodeaugmentedgrammarbooks/88c3e393-a219-43a1-8c34-87e0302a3ca1_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c6553ced26f16749491c72780706e201a453bafb8c0ac5760e33f878a73cdb04 +size 136310 diff --git a/readitintwostepstranslatingextremelylowresourcelanguageswithcodeaugmentedgrammarbooks/88c3e393-a219-43a1-8c34-87e0302a3ca1_model.json b/readitintwostepstranslatingextremelylowresourcelanguageswithcodeaugmentedgrammarbooks/88c3e393-a219-43a1-8c34-87e0302a3ca1_model.json new file mode 100644 index 0000000000000000000000000000000000000000..bb0bffb4b5c131451183da9f15a35bf018b083b2 --- /dev/null +++ b/readitintwostepstranslatingextremelylowresourcelanguageswithcodeaugmentedgrammarbooks/88c3e393-a219-43a1-8c34-87e0302a3ca1_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8e149ed417324be69118b04873b608a171164aae88fb9d541ab4a72e9f7f1507 +size 162228 diff --git a/readitintwostepstranslatingextremelylowresourcelanguageswithcodeaugmentedgrammarbooks/88c3e393-a219-43a1-8c34-87e0302a3ca1_origin.pdf b/readitintwostepstranslatingextremelylowresourcelanguageswithcodeaugmentedgrammarbooks/88c3e393-a219-43a1-8c34-87e0302a3ca1_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..4b31c84d38a57e85a604b6b340a793b0b69f9730 --- /dev/null +++ b/readitintwostepstranslatingextremelylowresourcelanguageswithcodeaugmentedgrammarbooks/88c3e393-a219-43a1-8c34-87e0302a3ca1_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ea39ddbcdbfafd5677a7aef123c0032c3e29bd3533d5584c694294c601b06f03 +size 8718071 diff --git a/readitintwostepstranslatingextremelylowresourcelanguageswithcodeaugmentedgrammarbooks/full.md b/readitintwostepstranslatingextremelylowresourcelanguageswithcodeaugmentedgrammarbooks/full.md new file mode 100644 index 0000000000000000000000000000000000000000..379d1d6dd2629e608cbadc53e2688feb88f495ae --- /dev/null +++ b/readitintwostepstranslatingextremelylowresourcelanguageswithcodeaugmentedgrammarbooks/full.md @@ -0,0 +1,518 @@ +# Read it in Two Steps: Translating Extremely Low-Resource Languages with Code-Augmented Grammar Books + +Chen Zhang*, Jiuheng Lin*, Xiao Liu, Zekai Zhang, Yansong Feng† + +Wangxuan Institute of Computer Technology, Peking University + +{zhangch, fengyansong}@pku.edu.cn + +linjiuheng@stu.pku.edu.cn + +# Abstract + +While large language models (LLMs) have shown promise in translating extremely low-resource languages using resources like dictionaries, the effectiveness of grammar books remains debated. This paper investigates the role of grammar books in translating extremely low-resource languages by decomposing it into two key steps: grammar rule retrieval and application. To facilitate the study, we introduce ZHUANGRULES, a modularized dataset of grammar rules and their corresponding test sentences. Our analysis reveals that rule retrieval constitutes a primary bottleneck in grammar-based translation. Moreover, although LLMs can apply simple rules for translation when explicitly provided, they encounter difficulties in handling more complex rules. To address these challenges, we propose to represent grammar rules as code functions, motivated by their similarities in structures and the benefit of code in facilitating LLM reasoning. Our experiments show that using code rules significantly boosts both rule retrieval and application, ultimately resulting in a $13.1\%$ BLEU improvement in translation. + +# 1 Introduction + +Most human languages suffer from data scarcity (Joshi et al., 2020). With only a few thousand sentences available for extremely low resource (XLR) languages, traditional pretraining or finetuning methods (Yong et al., 2023; Liu et al., 2020) are impractical for building effective machine translation (MT) systems. Facing the challenge of XLR MT, large language models (LLMs) offer a promising alternative. Recent research reveals that LLMs can perform XLR MT through in-context learning (ICL), leveraging small-scale linguistic resources like dictionaries and parallel sentences (Tanzer et al., 2024; Zhang + +![](images/821bf13027c0313961b97e6b61b5c7012d949a7c84928da6e550ae2a958902ed.jpg) +Figure 1: An illustration of LLMs using grammar rules in code format to translate Zhuang, an extremely low-resource language. + +et al., 2024a). Among these resources, grammar books, with their systematic linguistic descriptions, appear ideal for guiding translation, but their effectiveness remains debated. Some studies claim that prompting LLMs with full grammar books improves translation performance (Tanzer et al., 2024; Gemini Team et al., 2024; Zhang et al., 2024b), while others argue that such improvements may stem from lexical leakage, where LLMs identify the bilingual explanations of several words in the test sentence from the grammar book and use them as shortcuts, rather than genuinely understanding grammar rules (Aycock et al., 2024). However, no existing dataset effectively eliminates such interference factors, making it difficult to assess whether LLMs truly understand grammar rules. + +To address this gap, we introduce ZHUANGRULES, a fine-grained dataset focusing on the grammar rule understanding for Zhuang (ISO 639-1: za), a language frequently studied in XLR + +MT (Zhang et al., 2024a; Bai et al., 2024). ZHUAN-GRULES decomposes grammar books into modular elements, consisting of 109 atomic grammar rules, each paired with an average of 5.6 Zhuang-Chinese parallel sentences for testing. We ensure that correctly translating each test instance requires applying its corresponding grammar rule. We provide a Zhuang-Chinese lexicon for each sentence during testing, to disentangle grammar rule comprehension from lexical knowledge. These designs enable more controlled and interpretable evaluation in LLMs' ability of grammar understanding. + +Given that each test sentence in ZHUANGRULES is annotated with its relevant grammar rule, we conduct a pilot study comparing two settings: providing all grammar rules (akin to an entire grammar book) versus supplying only the necessary one. We find that the latter significantly outperforms the former, suggesting that grammar-based MT relies heavily on LLMs' ability to identify the required rules. We thus break down grammar-based MT into two stages, grammar rule retrieval and grammar rule application, and explore the following research questions: (1) RQ1: Can LLMs retrieve the grammar rules required for translating a test sentence? (2) RQ2: Can LLMs effectively apply a given rule for translation as instructed? + +We discover that grammar rule retrieval is a significant bottleneck in XLR MT, as LLMs struggle to effectively locate the necessary rules. Regarding rule application, we find LLMs can apply simple rules for translation when explicitly provided, with further gains observed when auxiliary elements like parallel sentence examples and interlinear glossed texts (IGTs) are included in the prompt. However, handling complex rules involving multiple actions remains a challenge for LLMs, with performance dropping to half that of simpler cases. + +We further explore strategies to enhance LLMs' ability to utilize grammar rules in these two steps. Inspired by prior works on improving LLM reasoning through code representations (Liu et al., 2023; Li et al., 2024), we observe a strong analogy between the sequential operations in grammar rule application and the procedural structures of code. For instance, adding affixes to a word resembles an arithmetic addition operation, while selecting different affixes based on conditions aligns with an if-else structure in code. Therefore, as illustrated in Figure 1, we convert grammar rules into code-based representations using GPT-4o (OpenAI et al., 2024), to facilitate LLMs in translation. Ad + +ditionally, we propose RULE-BY-RULE retrieval, a simple but effective strategy that examines the necessity of each rule individually instead of processing the whole book directly. + +Our experiments show that retrieving grammar rules in code format improves recall by $8.8\%$ compared to textual rules, and enhances LLMs' ability to utilize given rules effectively, boosting the translation performance by $12.2\%$ BLEU on ZHUANGRULES. This benefit is also observed on MTOB (Tanzer et al., 2024), another translation benchmark for XLR MT. Finally, combining code rule with RULE-BY-RULE retrieval strategy outperforms the end-to-end translation using the textual grammar book by $13.1\%$ BLEU on ZHUANGRULES. + +Our contributions are summarized as follows: (1) We underscore the necessity of breaking down grammar-based MT into two steps, rule retrieval and application, and identify rule retrieval as a major bottleneck. (2) We introduce a code-based format for grammar rules, improving LLMs' abilities in both steps and yielding substantial gains in translation performance. (3) We present ZHUANG-GRULES, a dataset for explainable research on XLR MT using grammar rules, decomposing grammar books into structured elements including rules, parallel sentences, lexicons, and IGTs. Our data and code are publicly available to the community1. + +# 2 Dataset: ZHUANGRULES + +We study the problem of grammar understanding using Zhuang, a low-resource language in China, which current LLMs hardly understand (Zhang et al., 2024a). We collect ZHUANGRULES, a set of 109 rules on Zhuang grammar written in Chinese. Each rule is paired with several Zhuang-Chinese parallel phrases/sentences for testing, amounting to 608 pairs. Each pair is further annotated with a bilingual lexicon covering all relevant lexical items in the sentences, which can disentangle the interference from LLMs' lack of Zhuang lexical knowledge when evaluating their understanding of grammar rules. Compared to previous resources of complete grammar books (Tanzer et al., 2024; Zhang et al., 2024b; Hus and Anastasopoulos, 2024), ZHUANGRULES enables more systematic and controllable analysis with its modularized structures for XLR MT. + +# 2.1 Rule Collection + +We collect the rules from two books on Zhuang written in Chinese,《壮语通论》(General Introduction to Zhuang Language; Wei and Qin, 2006) and 《壮语基础教程》(Basic Course of Zhuang Language; Wei and Qin, 2008). From these books, we collect grammar rules of Zhuang and their Zhuang-Chinese parallel phrases/sentences, which are typically concise and concretely illustrate the usage of the corresponding rule. For each sentence, we provide a Zhuang-Chinese lexicon covering the words appearing in the Zhuang sentence, which helps eliminate the interference to the experiments caused by the model not knowing word meanings. The following is a grammar rule and one of its parallel examples. See data statistics and details of collection in Appendix B. + +Rule: 在壮语中,形容词作名词的修饰时,名词在前,形容词于后。(In Zhuang, when adjectives modify nouns, the noun comes first and the adjective follows.) + +# Example: + +Zhuang: byoem henj + +Chinese: 黄头发 (yellow hair) + +Lexicon: {byoem:头发(hair), henj:黄(yellow)} + +# 2.2 Analysis of Rules + +Zhuang exhibits diverse linguistic features in its grammar rules. To gain a deeper understanding of these rules, we annotate each with fine-grained attributes including action, difficulty, and domain. These attributes provide clear categorization, enabling detailed analysis of their utilization in XLR MT. + +Regarding action, we identify the atomic operations required in applying each grammar rule for Chinese-Zhuang translation, such as adding affixes and reordering two words. The number of actions in a grammar rule can reflect its difficulty. We evaluate the difficulty of each rule based on the number of involved actions and the degree of difference between Zhuang and Chinese. The rules are thereby categorized into three levels: easy, medium, and hard, with the average number of required operations being 1.2, 1.5 and 2.1, respectively. Additionally, we label rules according to their linguistic domain, following the taxonomy in WALS (Dryer and Haspelmath, 2013). We find that most rules in ZHUANGRULES deal with morphology and word order. See Appendix B.4 for detailed categorization of each attribute. + +![](images/28a40cb24c936f49991e966ff3f4348c9a24aaf3fe389f61f8e0e930bd8c80df.jpg) +Figure 2: Change in translation performance of providing varying numbers of irrelevant grammar rules in addition to the required rule (Qwen-2.5-72B-Instruct, Chinese $\rightarrow$ Zhuang). + +# 3 Methodology + +Motivated by a pilot study that highlights the significant impact of the number of provided grammar rules on MT performance, we formalize the translation process using grammar books as a two-step procedure: grammar rule retrieval and grammar rule application. To gain deeper insights into LLMs' capabilities, we evaluate their performance at each stage independently. Additionally, we explore strategies to enhance LLMs' abilities in these two stages, especially representing grammar rules in a structured code-based format. + +# 3.1 Pilot Study: Providing LLMs with Varying Numbers of Rules + +Using ZHUANGRULES, we conduct a pilot study to assess whether providing varying numbers of grammar rules in the prompt affects LLMs' abilities of utilizing them for translation. + +As shown in Figure 2, we observe that the translation performance declines sharply when we begin with only the required rule and progressively add more irrelevant rules. This suggests that LLMs struggle with numerous irrelevant rules in the grammar book, highlighting that the performance of grammar-based XLR MT is closely related to LLMs' ability to identify the required grammar rules. + +Based on these findings, we are motivated to decouple rule retrieval from the process of end-to-end grammar-based translation, and evaluate two separate abilities of LLMs: finding the relevant grammar rules from a grammar book, and applying + +them in translation. + +# 3.2 Retrieving Grammar Rules + +Our pilot study indicates that the performance of grammar-based XLR MT is closely related to LLMs' ability to identify the required grammar rules. Therefore, given a sentence to be translated, we first explore whether LLMs can find the required rules from a grammar book, which is simulated by the concatenation of all the rules in ZHUANGRULES (approximately 4K tokens). + +We mainly explore whether changing the task format or presentation of grammar rules affects LLMs' abilities of finding required grammar rules. As a baseline, we adopt BM25 (Robertson et al., 2009), where we use the test sentence as the query and retrieve the top $k$ relevant rules from the grammar book. + +Changing the Task Format Similar to the default setting of performing XLR translation with a full book in previous works (Tanzer et al., 2024), given a grammar book (a concatenation of rules) and a sentence to be translated as input, we instruct LLMs to output relevant rules in the book. We refer to this strategy as FULL-BOOK. + +Considering the FULL-BOOK approach places a high demand on the model's ability of long-context understanding, we propose another RULE-BY-RULE strategy with a much shorter input length. In this approach, instead of handling the entire grammar book at once, LLMs examine whether each rule in the grammar book is relevant to the sentence to be translated individually. Specifically, we input one candidate grammar rule and a test sentence at a time, and require LLMs to perform binary classification over their relevance. + +Changing the Representation of Rules Previous works find that code formats can enhance the reasoning capabilities of LLMs in tasks involving math or logic (Chen et al., 2023; Liu et al., 2023). These advantages stem from the similarities between these tasks and code representations in terms of the modular structure and control flow. Similarly, operations involved in grammar rules exhibit a natural resemblance to code. For example, adding or removing affixes resembles arithmetic operations, while selecting different affixes based on conditions can be represented with an if-else structure in code. Building on this observation, we investigate whether the benefits of code-based reasoning extend to grammar rule understanding. + +We convert the textual rules in ZHUANGRULES into code rules with GPT-4o (OpenAI et al., 2024). Each code rule consists of two parts: (1) a concise comment outlining the steps for applying the rule in translation, and (2) a pseudo-code function that simulates the translation process. We only provide 5 exemplars for ICL during conversion, without applying further constraints on the structure or style of the pseudo-code since LLMs exhibit robustness to variations in code style and format when reasoning with code (Liu et al., 2023). We randomly sample 10 code rules for quality check and find GPT-4o is effective at generating pseudocodes. All samples follow proper Python syntax, and only one sample omits minor information of the original rule. The remaining samples are all complete and accurate in both translation directions. See examples of code rules in Appendix C. + +# 3.3 Applying Grammar Rules + +After exploring the retrieval stage in XLR MT, we investigate LLM's ability to apply specific grammar rules in a targeted manner, by asking LLMs to translate a sentence directly using the required rule. We explore whether LLMs exhibit preferences for different representations of grammar rules and further examine the impact of auxiliary components commonly included in grammar books, such as parallel examples and IGTs. + +Presentation of Rules We mainly investigate the effects of rule formats on grammar rule application, by comparing the settings using textual and code rules. We additionally examine how the language used for writing rules affects translation, which is discussed in Appendix D.2. + +Auxiliary Elements We further explore whether providing auxiliary elements from grammar books in the prompt can facilitate LLMs to apply rules. + +Parallel examples can demonstrate the use of grammar rules more intuitively and are considered effective in XLR translation (Court and Elsner, 2024; Aycock et al., 2024). In addition to the required rule, we provide each test sentence with several pairs of parallel sentences requiring the same rule. + +Interlinear glossed text (IGT) is a line-by-line format for annotating linguistic corpora, where each morpheme is labeled with a descriptive annotation. It has been widely adopted as an intermediate form for low-resource language translation (Ginn et al., 2024a,b; Ramos et al., 2024). + +As the two grammar books used for collecting ZHUANGRULES do not provide IGTs for the parallel sentences in them, we use GPT-4o to generate IGT annotations for each Zhuang sentence in ZHUANGRULES, with 123 IGTs collected from The壮语语法标注文本》(Annotated Zhuang Grammar Text; Lan, 2016) as ICL exemplars. We also conduct a quality check, finding that GPT-4o generates the correct symbols for $72\%$ of the morphemes. See details in B.2. + +In XLR translation experiments, we follow the approach described in Ramos et al. (2024), where each parallel sentence in the prompt is paired with its corresponding IGT, and LLMs are instructed to first generate the IGT for the test sentence before translating. + +# 4 Experiments and Analyses + +We answer our two research questions by analyzing the current capabilities of LLMs and exploring the benefits of representing rules in a code-based format. We then aggregate our findings obtained from the two-step investigation to summarize the best practice for using grammar books in XLR MT. + +# 4.1 Experimental Setups + +Models We use three open-source LLMs for experiments: Qwen-2.5-7B-Instruct, Qwen-2.5-72B-Instruct (Yang et al., 2024), and Llama-3.1-70B-Instruct (Dubey et al., 2024). + +Datasets ZHUANGRULES is the only dataset so far supporting controllable and interpretable experiments on grammar books. To validate the generalizability of our conclusions, we additionally use MTOB (Tanzer et al., 2024) for experiments, which contains a grammar book for Kalamang (ISO 639-3: kgv), an XLR language in Indonesia. We extract paragraphs of grammar descriptions and their corresponding examples from the book using regular expressions3. See details of data construction from MTOB in Appendix B.3. + +Metrics For BM25, we report recall@ $k$ , reflecting whether the relevant rule appears in the top- $k$ retrieval results. For FULL-BOOK and RULE-BY-RULE retrieval with LLMs, as the number of retrieved rules is not pre-defined, we report the aver + +
za2zhzh2za
BASELINErec@1rec@5rec@1rec@5
BM2526.341.613.527.3
FULL-BOOKrec#rulesrec#rules
Qwen-2.5-7B3.12.35.22.2
Llama-3.1-70B33.93.222.92.5
Qwen-2.5-72B52.81.849.41.8
RULE-BY-RULErec#rulesrec#rules
Qwen-2.5-7B (text)55.12.567.94.0
Qwen-2.5-7B (code)68.43.880.34.7
Llama-3.1-70B (text)69.72.275.83.6
Llama-3.1-70B (code)82.24.287.55.5
Qwen-2.5-72B (text)89.44.184.74.4
Qwen-2.5-72B (code)89.63.987.14.1
+ +Table 1: Performance of different rule retrieval strategies on ZHUANGRULES. The best scores are made bold, with the second underlined. + +age number and recall of retrieved rules. For rule application, we report BLEU (Papineni et al., 2002) and $\mathrm{chrF} + +$ (Popovic, 2017), using the implementation from Post (2018). + +Prompting For the experiments involving parallel sentence examples in grammar rule application, we randomly sample two pairs of examples for ICL from those requiring the same rule with the test instances. For all settings except the ones explicitly annotated with w/o Lexicon, we include Zhuang-Chinese lexicons covering the words appearing in the prompt by default. See all the prompts used in our experiments in Appendix C. + +# 4.2 RQ1: Can LLMs Find the Required Grammar Rule? + +LLMs struggle to retrieve rules from the full grammar book directly. In Table 1, we compare the performance of different strategies for finding relevant rules for the sentence to be translated. BM25, relying solely on lexical overlap, fails to retrieve the relevant rules for more than half of the test instances within the top-5 results, underscoring the complexity of rule retrieval. + +Using LLMs to identify the required rules from the entire grammar book (FULL-BOOK) shows notable improvements over BM25, as LLMs can better capture the semantic relationships between rules and testing instances beyond simple lexical matching. However, their performance is still far from perfect, with the best results still hovering around $50\%$ in recall. Moreover, this approach is highly dependent on model capabilities, as weaker models, + +
BLEU / chrF++Zhuang → ChineseChinese → ZhuangAverage
Qwen (72B)Llama (70B)Qwen (7B)Qwen (72B)Llama (70B)Qwen (7B)
Baselines
No Rule (w/o Lexicon)2.7 / 1.90.3 / 0.31.0 / 0.80.7 / 8.10.6 / 4.80.1 / 2.20.9 / 3.0
No Rule31.2 / 28.328.7 / 27.025.7 / 24.022.1 / 49.121.4 / 49.924.1 / 49.525.5 / 38.0
Parallel Examples65.6 / 61.358.0 / 55.654.7 / 50.763.4 / 80.161.8 / 80.657.4 / 75.860.2 / 67.4
+ Synthetic IGT65.6 / 62.660.4 / 60.356.3 / 55.7- / -- / -- / -- / -
Textual Grammar Rules
Random Textual Rule31.8 / 29.028.4 / 27.824.8 / 23.921.6 / 49.318.7 / 42.815.7 / 43.623.5 / 36.1
Gold Textual Rule51.4 / 50.547.8 / 48.739.4 / 40.651.8 / 78.747.9 / 79.335.6 / 66.245.7 / 60.7
+ Parallel Examples70.7 / 68.068.4 / 64.958.5 / 57.380.7 / 91.078.9 / 90.463.9 / 80.670.2 / 75.4
+ Synthetic IGT67.9 / 66.662.2 / 64.060.0 / 58.7- / -- / -- / -- / -
Code Grammar Rules
Random Code Rule27.7 / 25.923.7 / 25.222.3 / 22.820.2 / 48.718.4 / 48.015.2 / 44.021.3 / 35.8
Gold Code Rule63.3 / 61.157.8 / 57.949.5 / 50.069.3 / 86.755.2 / 83.152.0 / 76.157.9 / 69.2
+ Parallel Examples73.4 / 71.472.0 / 69.962.3 / 61.081.2 / 91.677.8 / 90.167.7 / 83.472.4 / 77.9
+ Synthetic IGT68.5 / 66.865.1 / 64.459.8 / 59.5- / -- / -- / -- / -
+ +Table 2: Translation performance of different settings of rule application on ZHUANGRULES. Note that IGTs do not support high-to-low-resource language translation, i.e. Chinese $\rightarrow$ Zhuang. The best scores are made bold, with the second underlined. + +
kgv2engeng2kgv
BLEUchrF++BLEUchrF++
No Rule (w/o Lex.)1.69.30.88.6
No Rule12.034.639.963.8
Random Textual Rule11.934.840.763.5
Random Code Rule13.336.337.961.9
Gold Textual Rule14.639.243.867.3
Gold Code Rule16.040.744.567.0
+ +Table 3: Translation performance of Qwen-2.5-72B-Instruct between English and Kalamang, using different rule formats. + +such as Qwen-2.5-7B-Instruct, are almost unable to find the correct rules. + +This finding indicates that when LLMs perform end-to-end translation with a grammar book, they mostly do not know which grammar rules are necessary for translating a given sentence, in line with our pilot study in Figure 2, where we find a strong correlation between rule retrieval performance and final translation quality. By addressing the bottleneck of rule retrieval, it is possible to further improve the translation performance of LLMs. We then explore two strategies for improving rule retrieval: transforming the task format and changing the form of rules. + +Converting the retrieval task into RULE-BY-RULE classification helps. As shown in Table 1, instead of providing the entire grammar book (FULL-BOOK), examining each rule individually (RULE-BY-RULE) leads to significantly better + +performance. This approach achieves nearly $80\%$ recall with fewer than 5 retrieved rules on average, making it a more practical solution compared to providing LLMs with the entire book (FULL-BOOK). + +Rules in code format are more LLM-friendly for retrieval. As shown in Table 1, converting textual rules into code forms, combined with the RULE-BY-RULE strategy, improves retrieval performance across all models, achieving up to $90\%$ recall while maintaining a manageable number of retrieved rules. Code forms transform descriptive rules into procedural knowledge, making it easier for LLMs to understand the requirements of translation than textual rules. + +# 4.3 RQ2: Can LLMs Apply a Given Grammar Rule as Instructed? + +LLMs can apply simple rules for translation when explicitly given. As shown in Table 2, providing the necessary textual grammar rule significantly improves translation performance over providing no or random grammar rules. For example, on ZHUANGRULES we observe an absolute increase of $26\%$ $\mathrm{chrF}++$ in Qwen-2.5-72B's performance, after providing the gold grammar rules. This finding is also validated in another XLR language, Kalamang. As shown in Table 3, there is an increase of $4\%$ $\mathrm{chrF}++$ on Kalamang-English translation after providing relevant rules, compared to the settings providing no or random rules. These + +improvements can be attributed to LLMs' strong capability to comprehend and follow clearly-given instructions. + +We then investigate the role of other auxiliary elements of the grammar books in facilitating the understanding of grammar rules. In the absence of explicit grammar rules, parallel examples and IGTs prove valuable for translation, aligning with findings from previous work (Aycock et al., 2024; Ginn et al., 2024a). After pairing textual grammar rules with parallel examples, we observe an average $\mathrm{chrF}++$ gain of $14.7\%$ over using rules alone. We conjecture that parallel examples help LLMs identify common patterns or usages in a more intuitive way than rules alone. Besides, their format resembles testing instances, aiding LLMs in better mimicking the translation process. However, further incorporating synthetic IGTs when grammar rules are provided reduces the gain from parallel examples. This may be due to the noise introduced by the GPT-4o generated IGTs (see Appendix B.2), which may be inconsistent with the provided rules. + +Code formats enhance rule understanding, especially for difficult rules. As shown in Table 2, code rules consistently outperform textual rules, resulting in an average improvement of $8.5\%$ $\mathrm{chrF}++$ on ZHUANGRULES. This trend holds for Kalamang as well, as seen in Table 3, where code rules also outperform textual rules in most settings. + +The advantage of code format is more pronounced on difficult grammar rules, which involve more operation steps when applied for translation. As shown in Table 4, the improvement of code rules over textual ones is particularly noticeable on the hard subset of ZHUANGRULES, especially when parallel examples are unavailable. See Appendix E for a case study. + +Beyond performance improvements, code formats exhibit more advantages as a structural representation for XLR translation. It offers a language-agnostic interface for understanding grammar, without requiring pre-defined language-specific protocols such as the glossing conventions required by IGTs (Rules, 2008). Furthermore, the conversion into code format can be well performed by powerful LLMs, requiring little human labor while yielding substantial performance gains. + +Code formats support simultaneous application of multiple rules. In the previous experiments, we adopt an idealized setting where translating a testing sentence requires only a single grammar rule, + +
za2zhzh2za
easymediumhardeasymediumhard
No Rule29.528.824.218.622.230.5
Text Rule65.651.334.685.582.469.3
Code Rule76.357.948.693.087.576.8
Δ+10.7+6.6+14.0+7.5+5.2+7.5
Text Rule + 2 Ex.78.869.152.095.291.185.6
Code Rule + 2 Ex.81.172.656.794.992.087.2
Δ+2.3+3.5+4.6+0.3+1.0+1.6
+ +Table 4: Translation performance (chrF++) of Qwen-2.5-72B-Instruct on ZHUANGRULES in different levels of difficulty. We additionally report the performance difference $(\Delta)$ between using textual and code rules. + +![](images/d14a28bf1aed5e9350eae0d2f084657c05c82d32e6a4f7ae57f7140d2b97e2eb.jpg) +Figure 3: An illustration of three strategies for combining multiple rules. + +to facilitate controlled experiments. However, in real-world scenarios, translating a sentence often necessitates the application of multiple grammar rules. To validate our findings under a more realistic setting, we collect a small set of 96 testing instances requiring multiple rules. Concretely, we select suitable candidates from the parallel sentences in ZHUANGRULES and modify them to require two rules for translation. See Appendix B for details. + +Using code formats for multiple grammar rules in translation is non-trivial. The structural nature of code enables diverse strategies for combining these rules. As shown in Figure 3, we explore three combining strategies. In the FUNC CALL strategy, LLMs generate a new function that determines the order of rule application and calls two existing rule functions sequentially. For the other two INLINE strategies, the bodies of two rules compose the new function. In INLINE (Template), we directly concatenate the bodies of two rules in random or + +
za2zhzh2za
BLEUchrF++BLEUchrF++
No Rule30.225.220.947.9
One Textual Rule39.531.639.564.0
Two Textual Rules47.341.745.573.9
FUNC CALL46.644.750.672.3
INLINE (Template)56.048.551.475.5
INLINE (LLM)56.752.750.474.7
+ +der into a new function, while in INLINE (LLM), LLMs freely generate a new function combining the contents of two rule functions. + +As shown in Table 5, providing all necessary rules significantly improves translation performance compared to providing no or one rule, demonstrating that LLMs can effectively apply multiple rules. Consistent with the findings in single-rule application, code rules yield noticeable advantages over textual ones. Among the strategies for combining multiple code rules, INLINE (LLM) achieves the best overall performance, indicating that LLMs can find a more effective way of organizing multiple rules by themselves. + +# 4.4 Putting it Together: Best Practice of Utilizing Grammar Rules + +In previous experiments, we decompose the grammar-based translation process into two steps and examine them independently. We find that although LLMs show promising abilities to apply it for translation when given a relevant grammar rule, they struggle to find relevant rules from a long grammar book for a sentence to be translated. To mitigate the bottleneck of rule retrieval and enhance the application of harder rules, we propose a RULE-BY-RULE retrieval strategy and represent rules in code format. These approaches enhance the performance of both steps individually. + +Now we present a comprehensive evaluation of the entire pipeline, assessing various combinations of design choices for each step. As shown in Table 6, the gains in rule retrieval brought by RULE-BY-RULE retrieval strategy and code-based rule representations can propagate to the final translation performance, with up to $13.1\%$ increase in $\mathrm{chrF + + }$ for Qwen-2.5-72B-Instruct compared to feeding the whole grammar books to LLMs, the default practice of previous works. Based on these findings, we summarize a promising strategy of + +Table 5: Translation performance of Qwen-2.5-72B using different strategies for utilizing multiple grammar rules. + +
Application +RetrievalText RuleCode Rule
za2zhzh2zaza2zhzh2za
w/o Retrieval42.664.2--
FULL-BOOK43.166.550.269.4
RULE-BY-RULE (text)46.869.955.472.3
RULE-BY-RULE (code)47.671.455.774.3
+ +Table 6: Translation performance (chrF++) of Qwen-2.5-72B-Instruct in different settings of retrieving and applying rules. The result of w/o Retrieval + Code Rule is not reported because the input exceeds the maximum context length of evaluated LLMs. + +using grammar books with a moderate number of grammar rules: first, converting the rules in the grammar book into code format, then employing RULE-BY-RULE retrieval with code rules, and finally applying the retrieved code rules for translation. + +# 5 Related Works + +XLR MT with LLMs LLMs have been widely adopted for XLR MT for their training-free nature and efficient use of limited data. Existing works focusing on improving XLR MT performance using linguistic resources, such as dictionaries (Ghazvininejad et al., 2023; Elsner and Needle, 2023; Lu et al., 2024; Dimakis et al., 2024), parallel corpora (Court and Elsner, 2024; Guo et al., 2024; Liu et al., 2024; Zhang et al., 2024a), grammar rules (Tanzer et al., 2024; Gemini Team et al., 2024; Zhang et al., 2024b; Hus and Anastasopoulos, 2024; Aycock et al., 2024), and IGTs (Ginn et al., 2024a,b; Ramos et al., 2024). However, these works arrive at divergent conclusions, due to inconsistent experimental setups. In contrast, we conduct controlled experiments using decomposable data, unveiling LLMs' true capabilities in XLR MT. + +Reasoning with Code Code has been proven a better interface for LLMs to perform reasoning than natural languages under many circumstances such as math reasoning (Li et al., 2024) and causal reasoning (Liu et al., 2023). Existing works either use the modularity feature of code to describe structures (Madaan et al., 2022; Boin et al., 2024) or use the control flow of code to describe logical flows (Liu et al., 2025; Puerto et al., 2024; Chae et al., 2024). We take advantage of both aspects of code to represent grammar rules, which greatly facilitate LLMs in XLR MT. + +In the area of machine translation, rule-based machine translation systems, such as Apertium (For + +cada et al., 2011), employ structured rule specification languages. Our work on using code for machine translation extends this idea, adapting the concept of structured rules within the context of LLMs. + +# 6 Conclusion + +We present a comprehensive evaluation of LLMs' ability to leverage grammar books for translating XLR languages. Using ZHUANGRULES, a newly introduced dataset for interpretable research, we decompose the translation process into two key steps: grammar rule retrieval and grammar rule application. Our analysis reveals that while LLMs can effectively apply simple grammar rules, they struggle significantly with retrieving the relevant rules. To address this, we propose to represent grammar rules in code format, which improves the performance of both retrieval and application, eventually enhancing the overall translation quality. + +# Limitations + +Scope of Studied Languages Collecting suitable data for controlled experiments on extremely low-resource languages requires significant effort. We do our best to investigate the research question on two XLR languages, Zhuang and Kalamang, which are considered unseen by current LLMs and thus frequently used for the research of on-the-fly XLR MT with linguistic resources (Tanzer et al., 2024; Aycock et al., 2024; Zhang et al., 2024a; Bai et al., 2024). Moreover, the substantial typological differences between Zhuang (morphologically analytic, SVO) and Kalamang (morphologically synthetic, SOV) lend credence to the generalizability of our findings. + +Unlike other low-resource languages that LLMs have some preliminary support for, with a sufficiently large corpus available for fine-tuning, we believe that these extremely low-resource languages could benefit more from grammar book-based approaches. Thus, we select Zhuang and Kalamang as our primary research targets. We encourage future work to explore whether our findings generalize to low-resource languages with slightly more data availability. + +Token Efficiency While code rules substantially enhance LLMs' understanding of grammar, they are longer than textual rules, resulting in a higher token count in the input. However, this issue can be mitigated through effective rule retrieval over + +the grammar book. As demonstrated in our experiments, the best retrieval strategy not only improves translation performance but also maintains a manageable input length. + +Idealized Scenarios In most of our experiments, test instances are designed to require only a single grammar rule for translation. This controlled setting allows for a more precise and interpretable diagnosis of LLMs' behavior. However, this represents an idealized scenario, as real-world translations often require applying multiple rules from grammar books. To bridge this gap, we have conducted preliminary experiments on a subset of instances requiring two rules, further validating our findings. We leave the exploration of more open-ended and unconstrained translation settings for future work. + +# Acknowledgements + +This work is supported in part by NSFC (62161160339) and Beijing Science and Technology Program (Z231100007423011). We thank the anonymous reviewers for their valuable feedback. We also thank Shaodan Sui for the efforts in the dataset construction. For any correspondence, please contact Yansong Feng. + +# References + +Seth Aycock, David Stap, Di Wu, Christof Monz, and Khalil Sima'an. 2024. Can llms really learn to translate a low-resource language from one grammar book? arXiv preprint arXiv:2409.19151. +Yushi Bai, Shangqing Tu, Jiajie Zhang, Hao Peng, Xiaozhi Wang, Xin Lv, Shulin Cao, Jiazheng Xu, Lei Hou, Yuxiao Dong, et al. 2024. Longbench v2: Towards deeper understanding and reasoning on realistic long-context multitasks. arXiv preprint arXiv:2412.15204. +Ben Bogin, Shivanshu Gupta, Peter Clark, and Ashish Sabharwal. 2024. Leveraging code to improve incontext learning for semantic parsing. In Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), pages 4971-5012, Mexico City, Mexico. Association for Computational Linguistics. +Hyungjoo Chae, Yeonghyeon Kim, Seungone Kim, Kai Tzu-iunn Ong, Beong-woo Kwak, Moohyeon Kim, Sunghwan Kim, Taeyoon Kwon, Jiwan Chung, Youngjae Yu, and Jinyoung Yeo. 2024. Language models as compilers: Simulating pseudocode execution improves algorithmic reasoning in language + +models. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, pages 22471-22502, Miami, Florida, USA. Association for Computational Linguistics. +Wenhu Chen, Xueguang Ma, Xinyi Wang, and William W. Cohen. 2023. Program of thoughts prompting: Disentangling computation from reasoning for numerical reasoning tasks. Transactions on Machine Learning Research. +Sara Court and Micha Elsner. 2024. Shortcomings of LLMs for low-resource translation: Retrieval and understanding are both the problem. In Proceedings of the Ninth Conference on Machine Translation, pages 1332-1354, Miami, Florida, USA. Association for Computational Linguistics. +Antonios Dimakis, Stella Markantonatou, and Antonios Anastasopoulos. 2024. Dictionary-aided translation for handling multi-word expressions in low-resource languages. In *Findings of the Association for Computational Linguistics: ACL* 2024, pages 2588–2595, Bangkok, Thailand. Association for Computational Linguistics. +Matthew S. Dryer and Martin Haspelmath, editors. 2013. WALS Online (v2020.4). Zenodo. +Abhimanyu Dubey, Abhinav Jauhri, Abhinav Pandey, Abhishek Kadian, Ahmad Al-Dahle, Aiesha Letman, Akhil Mathur, Alan Schelten, Amy Yang, Angela Fan, et al. 2024. The llama 3 herd of models. arXiv preprint arXiv:2407.21783. +Micha Elsner and Jordan Needle. 2023. Translating a low-resource language using GPT-3 and a human-readable dictionary. In Proceedings of the 20th SIGMORPHON workshop on Computational Research in Phonetics, Phonology, and Morphology, pages 1-13, Toronto, Canada. Association for Computational Linguistics. +Julen Etxaniz, Gorka Azkune, Aitor Soroa, Oier Lacalle, and Mikel Artetxe. 2024. Do multilingual language models think better in English? In Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 2: Short Papers), pages 550-564, Mexico City, Mexico. Association for Computational Linguistics. +Mikel L. Forcada, Mireia Ginesti-Rosell, Jacob Nordfalk, Jimmy O'Regan, Sergio Ortiz Rojas, Juan Antonio Pérez-Ortiz, Felipe Sánchez-Martínez, Gema Ramírez-Sánchez, and Francis M. Tyers. 2011. Aperium: a free/open-source platform for rule-based machine translation. Machine Translation, 25:127-144. +Gemini Gemini Team, Petko Georgiev, Ving Ian Lei, Ryan Burnell, Libin Bai, Anmol Gulati, Garrett Tanzer, Damien Vincent, Zhufeng Pan, Shibo Wang, et al. 2024. Gemini 1.5: Unlocking multimodal understanding across millions of tokens of context. arXiv preprint arXiv:2403.05530. + +Marjan Ghazvininejad, Hila Gonen, and Luke Zettlemoyer. 2023. Dictionary-based phrase-level prompting of large language models for machine translation. Preprint, arXiv:2302.07856. +Michael Ginn, Mans Hulden, and Alexis Palmer. 2024a. Can we teach language models to gloss endangered languages? In *Findings of the Association for Computational Linguistics: EMNLP* 2024, pages 5861-5876, Miami, Florida, USA. Association for Computational Linguistics. +Michael Ginn, Lindia Tjuatja, Taiqi He, Enora Rice, Graham Neubig, Alexis Palmer, and Lori Levin. 2024b. GlossLM: A massively multilingual corpus and pretrained model for interlinear glossed text. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, pages 12267-12286, Miami, Florida, USA. Association for Computational Linguistics. +Ping Guo, Yubing Ren, Yue Hu, Yunpeng Li, Jiarui Zhang, Xingsheng Zhang, and Heyan Huang. 2024. Teaching large language models to translate on low-resource languages with textbook prompting. In Proceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation (LREC-COLING 2024), pages 15685-15697, Torino, Italia. ELRA and ICCL. +Jonathan Hus and Antonios Anastasopoulos. 2024. Back to school: Translation using grammar books. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, pages 20207-20219, Miami, Florida, USA. Association for Computational Linguistics. +Pratik Joshi, Sebastin Santy, Amar Budhiraja, Kalika Bali, and Monojit Choudhury. 2020. The state and fate of linguistic diversity and inclusion in the NLP world. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 6282-6293, Online. Association for Computational Linguistics. +Liguo Lan. 2016. Annotated Zhuang Grammar Text. Social Sciences Academic Press (China). +Bryan Li, Tamer Alkhouli, Daniele Bonadiman, Nikolaos Pappas, and Saab Mansour. 2024. Eliciting better multilingual structured reasoning from LLMs through code. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 5154-5169, Bangkok, Thailand. Association for Computational Linguistics. +Emmy Liu, Graham Neubig, and Jacob Andreas. 2024. An incomplete loop: Instruction inference, instruction following, and in-context learning in language models. In First Conference on Language Modeling. +Xiao Liu, Da Yin, Chen Zhang, Yansong Feng, and Dongyan Zhao. 2023. The magic of IF: Investigating causal reasoning abilities in large language models + +of code. In Findings of the Association for Computational Linguistics: ACL 2023, pages 9009-9022, Toronto, Canada. Association for Computational Linguistics. +Xiao Liu, Da Yin, Chen Zhang, Dongyan Zhao, and Yansong Feng. 2025. Eliciting and improving the causal reasoning abilities of large language models with conditional statements. Computational Linguistics, pages 1-38. +Yinhan Liu, Jiatao Gu, Naman Goyal, Xian Li, Sergey Edunov, Marjan Ghazvininejad, Mike Lewis, and Luke Zettlemoyer. 2020. Multilingual denoising pretraining for neural machine translation. Transactions of the Association for Computational Linguistics, 8:726-742. +Hongyuan Lu, Haoran Yang, Haoyang Huang, Dongdong Zhang, Wai Lam, and Furu Wei. 2024. Chain-of-dictionary prompting elicits translation in large language models. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, pages 958-976, Miami, Florida, USA. Association for Computational Linguistics. +Aman Madaan, Shuyan Zhou, Uri Alon, Yiming Yang, and Graham Neubig. 2022. Language models of code are few-shot commonsense learners. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 1384-1403, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics. +OpenAI, Aaron Hurst, Adam Lerer, Adam P Goucher, Adam Perelman, Aditya Ramesh, Aidan Clark, AJ Ostrow, Akila Welihinda, Alan Hayes, Alec Radford, et al. 2024. Gpt-4o system card. arXiv preprint arXiv:2410.21276. +Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. 2002. Bleu: a method for automatic evaluation of machine translation. In Proceedings of the 40th Annual Meeting of the Association for Computational Linguistics, pages 311-318, Philadelphia, Pennsylvania, USA. Association for Computational Linguistics. +Maja Popovic. 2017. $\mathrm{chrF}++$ : words helping character n-grams. In Proceedings of the Second Conference on Machine Translation, pages 612-618, Copenhagen, Denmark. Association for Computational Linguistics. +Matt Post. 2018. A call for clarity in reporting BLEU scores. In Proceedings of the Third Conference on Machine Translation: Research Papers, pages 186-191, Brussels, Belgium. Association for Computational Linguistics. +Haritz Puerto, Martin Tutek, Somak Aditya, Xiaodan Zhu, and Iryna Gurevych. 2024. Code prompting elicits conditional reasoning abilities in Text+Code LLMs. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, pages 11234-11258, Miami, Florida, USA. Association for Computational Linguistics. + +Rita Ramos, Everlyn Asiko Chimoto, Maartje ter Hoove, and Natalie Schluter. 2024. Grammamt: Improving machine translation with grammar-informed in-context learning. arXiv preprint arXiv:2410.18702. +Stephen Robertson, Hugo Zaragoza, et al. 2009. The probabilistic relevance framework: Bm25 and beyond. Foundations and Trends® in Information Retrieval, 3(4):333-389. +Leipzig Glossing Rules. 2008. Conventions for interlinear morpheme-by-morpheme glosses. URL: https://www.eva.mpg.de/lingua/resources/glossing-rules.php, . +Freda Shi, Mirac Suzgun, Markus Freitag, Xuezhi Wang, Suraj Srivats, Soroush Vosoughi, Hyung Won Chung, Yi Tay, Sebastian Ruder, Denny Zhou, Dipanjan Das, and Jason Wei. 2023. Language models are multilingual chain-of-thought reasoners. In The Eleventh International Conference on Learning Representations. +Garrett Tanzer, Mirac Suzgun, Eline Visser, Dan Jurafsky, and Luke Melas-Kyriazi. 2024. A benchmark for learning to translate a new language from one grammar book. In *The Twelfth International Conference on Learning Representations*. +Eline Visser. 2022. A grammar of Kalamang. Comprehensive Grammar Library. Language Science Press, Germany. +Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Brian Ichter, Fei Xia, Ed Chi, Quoc Le, and Denny Zhou. 2023. Chain-of-thought prompting elicits reasoning in large language models. Preprint, arXiv:2201.11903. +Jingyun Wei and Xiangzhou Qin. 2008. *Basic Course of Zhuang Language*. China Minzu University Press. +Jingyun Wei and Xiaohang Qin. 2006. General Introduction to Zhuang Language. China Minzu University Press. +An Yang, Baosong Yang, Beichen Zhang, Binyuan Hui, Bo Zheng, Bowen Yu, Chengyuan Li, Dayiheng Liu, Fei Huang, Haoran Wei, et al. 2024. Qwen2.5 technical report. arXiv preprint arXiv:2412.15115. +Zheng Xin Yong, Hailey Schoelkopf, Niklas Muennighoff, Alham Fikri Aji, David Ifeoluwa Adelani, Khalid Almubarak, M Saiful Bari, Lintang Sutawika, Jungo Kasai, Ahmed Baruwa, Genta Winata, Stella Biderman, Edward Raff, Dragomir Radev, and Vassilina Nikoulina. 2023. BLOOM+1: Adding language support to BLOOM for zero-shot prompting. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 11682-11703, Toronto, Canada. Association for Computational Linguistics. +Chen Zhang, Xiao Liu, Jiuheng Lin, and Yansong Feng. 2024a. Teaching large language models an + +unseen language on the fly. In Findings of the Association for Computational Linguistics: ACL 2024, pages 8783-8800, Bangkok, Thailand. Association for Computational Linguistics. +Kexun Zhang, Yee Choi, Zhenqiao Song, Taiqi He, William Yang Wang, and Lei Li. 2024b. Hire a linguist!: Learning endangered languages in LLMs with in-context linguistic descriptions. In *Findings of the Association for Computational Linguistics: ACL* 2024, pages 15654–15669, Bangkok, Thailand. Association for Computational Linguistics. + +# A Introduction of Studied Languages + +The Zhuang Language Zhuang is a group of Kra-Dai languages spoken primarily by the Zhuang people in Southern China, particularly in Guangxi Province and the neighboring regions of Yunnan and Guangdong. With over 16 million speakers, Zhuang is one of the largest minority languages in China. Zhuang is an isolating language, characterized by a lack of inflectional morphology. The current official writing system for Zhuang is the Latin script. In this study, we focus on Standard Zhuang, the officially standardized form of the language. Notably, current open-source and commercial language models show near-zero proficiency in processing Zhuang, highlighting its status as an underrepresented language that lacks support in existing LLMs. + +The Kalamang Language Kalamang is an endangered language primarily used in the villages on the largest of the Karas islands off the west coast of the Bomberai Peninsula in Indonesian Papua. It belongs to the Greater West Bomberai language family. Kalamang has a small speaker population (less than 200 people) and was only recently documented (Visser, 2022; Tanzer et al., 2024). Written Kalamang uses the Latin script. + +# B Dataset Collection and Statistics + +# B.1 Grammar Book Extracts + +In Figure 4, we provide a brief extract from the Zhuang grammar book (Wei and Qin, 2006, 2008), and in Figure 5 an extract from the Kalamang grammar book (Visser, 2022). Each figure begins with a textual grammar rule, followed by a set of parallel phrases or sentences as examples. + +# B.2 Collection Details of Zhuang Data + +Rule Selection of ZHUANGRULES From two grammar books, we extract suitable grammatical rules and their parallel sentence examples. A suitable rule should be concise and relatively independent, which means it does not rely on other rules as prerequisites. Afterward, we consult the dictionary at the end of the grammar book to build a lexicon for each Zhuang sentence in the dataset. Finally, we annotate fine-grained attributes for each rule, including action, difficulty, and domain, which will be discussed in the dataset statistics (Appendix B.4). + +IGT Generation for ZHUANGRULES We use GPT-4o to generate an IGT for each Zhuang sentence in ZHUANGRULES. To obtain ICL examples, we collect 123 pieces of IGT from《壮语语法标注文本》(Annotated Zhuang Grammar Text; Lan, 2016). Each data point consists of a Zhuang sentence, its IGT, and its Chinese translation. The following is an example. + +(1) gou aeu aen laj 1SG要(want)CL-个(one)下面(below) “我要下面那个(Iwanttheonebelow)” + +We then use this collection of 123 IGT examples, together with a gloss list of 67 symbols, to guide GPT-4o in annotating each sentence in ZHUANGRULES. + +We sample 20 IGTs generated by GPT-4o and check their quality. GPT-4o generates the correct symbols for $72\%$ of the morphemes. + +Construction of Multi-Rule Testing Instances We additionally collect a small set of data (96 test instances in total) from ZHUANGRULES that requires multiple rules for experiments. Specifically, we select suitable candidates from the parallel sentences in ZHUANGRULES and modify them to require two rules for translation. For instance, we modify sentences governed by a word order rule by inserting or replacing words related to a morphological rule. See Figure 6 for an example. + +Data Checking We check the data in ZHUAN-GRULES to ensure it contains no information that names or uniquely identifies individuals, nor any offensive content. + +# B.3 Collection Details of Kalamang Data + +Collection Process The Kalamang grammar book in MTOB is written in a progressive style, where the understanding of most example sentences relies on multiple rules, which are difficult to annotate. + +Given the infeasibility of engaging proficient Kalamang speakers in annotation, we leverage regular expressions to automatically match and extract certain contents from the book. Specifically, most parallel sentence examples in MTOB follow a three-line structure: the original Kalamang sentence, its IGT, and its English translation. We write regular expressions to capture this structure, using the paragraph preceding it as the corresponding grammar rule. + +However, because the MTOB grammar book often requires multiple rules for each example sentence, and lacks annotations for specific rules, we exclude it from rule retrieval experiments. Additionally, the small number of parallel sentence examples (1.6 per rule on average) limits its utility in rule application experiments. Consequently, we focus primarily on grammar rules due to inadequate in-context learning sentence examples. + +Potential Issues Note that the collected data might contain noise from two sources. First, many rules and their parallel examples in MTOB are not well-structured and cannot be captured by regular expressions. Second, rules in the Kalamang grammar book are often written in a progressive style (i.e., they directly reference parts of previously defined grammar rules without providing additional clarification, making it difficult to understand their meaning when viewed in isolation without giving those previously defined rules) and include extensive explanations for some parallel sentence examples, which complicates the rule descriptions. + +These issues might hinder the performance of using collected grammar rules for translation, explaining why including grammar rules leads to a smaller improvement in Kalamang than in Zhuang. + +# B.4 Data Statistics + +Sizes and Lengths ZHUANGRULES contains 109 rules in total, with an average length of 57.1 Chinese characters. These rules are paired with 608 Zhuang-Chinese parallel examples, of which 432 are words or phrases, and 176 are sentences. The average length of sentence examples is 8.4 Chinese characters or 5.4 Zhuang words. We also calculated the total token number for each element in ZHUANGRULES using the tokenizer for Qwen-2.5-72B-Instruct. The results are shown in Table 8. + +From MTOB, we collect 97 rules for Kalamang, with an average length of 120.4 English words. These rules are paired with 152 Kalamang-English parallel examples. The average length of sentence examples is 9.2 English words or 10.9 Kalamang words. + +Additional Attributes For each rule in ZHUAN-GRULES, we annotate several fine-grained attributes to gain deeper insights, including action, difficulty, and domain. + +- Action: For each rule, we annotate the actions that are required when applying this rule for + +
ActionDomain
Add53Morphology28
Delete6Nominal Categories16
Reorder54Nominal Syntax1
Break6Verbal Categories14
Select22Word Order37
Simple Clauses7
Complex Sentences1
Lexicon6
+ +Table 7: Number of rules for each type of action or domain in ZHUANGRULES. + +
ElementTotal Tokens
Textual Rules4386
Code Rules (Ver. For Retrieval)23,165
Code Rules32,231
Lexicon18819
Parallel Examples6,992
IGTs4,927
Text Rules + Lex. + 2 Ex.13,973
Text Rules + Lex. + 2 Ex. + IGT15,787
Code Rules + Lex. + 2 Ex.41,818
Code Rules + Lex. + 2 Ex. + IGT43,632
+ +Table 8: Number of tokens for each elements in ZHUANGRULES. + +Chinese-Zhuang translation. Possible actions include add (adding affixes to form a new word or adding some words to form a new phrase), delete (omitting certain words), reorder (reordering several words), break (breaking a word to several parts), and select (selecting a branch in the rule). As shown in Table 7, the two most common actions are add and reorder, which nearly half of the rules require. + +- Difficulty: We categorize the rules into three levels: easy, medium and hard, based on the number of actions it involves and the degree of difference between Zhuang and Chinese reflected by this rule. Out of the 109 rules, there are 47 easy, 43 medium, and 19 hard rules. The average number of required operations is 1.2, 1.5, and 2.1 for the three levels of rules, respectively. +- Domain: Following WALS (Dryer and Haspelmath, 2013), a database of structural properties of languages, we label the rules with its linguistic domain, including morphology, nominal categories, nominal syntax, verbal categories, word order, simple clauses, complex sentences, and lexicon. As shown in Table 7, most of the rules deal with how the words are formed and ordered. + +
za2zhzh2za
BLEUchrF++BLEUchrF++
No Rule28.224.421.751.4
Grammar Rules Only
Chinese Rule51.450.551.878.7
English Rule51.448.948.478.3
Grammar Rules with Parallel Examples
Chinese Rule + 2 Ex.70.768.080.791.0
English Rule + 2 Ex.66.262.381.692.3
+ +# C Implementation Details + +Conversion of Code Rules Given our decomposition of using grammar books into two distinct steps—rule retrieval and rule application, we design different styles of code for the two steps, following the principle of using task-appropriate data. The code for rule retrieval shows the steps to examine whether the rule should be applied, while the code for rule application demonstrates the translation process. We provide an example of the code rules for rule retrieval in Table 11, and for rule application in Table 12. + +Prompts for Rule Retrieval and Application For RULE-BY-RULE retrieval, we provide an example of prompt in Table 13. For rule application, we provide a prompt example in Table 14. We typically employ zero-shot learning without chain-of-thought (Wei et al., 2023) for efficiency considerations. + +Hyperparameters of Prompting For the prompt-based method, we use greedy search without doing a hyperparameter search. + +# D Additional Experimental Results + +# D.1 Effect of Providing Varying Numbers of Rules + +We present the complete results of MT performance by providing varying numbers of rules for Qwen2.5-72B-Instruct. For Chinese-to-Zhuang translation, the BLEU score is shown in Figure 2. For Zhuang-to-Chinese translation, the BLEU score is shown in Figure 7. We observe similar phenomena on both translation directions. + +# D.2 Effect of Grammar Rule Languages + +As previous work shows that LLM performance varies when instructions are presented in different + +Table 9: MT performance of Qwen-2.5-72B-Instruct on Zhuang grammar rules written in different languages. + +
za2zhzh2za
BLEUchrF++BLEUchrF++
No Rule31.228.322.149.1
Induced Rule45.243.445.573.4
Gold Rule51.450.551.878.7
Induced R. + 2 Ex.67.964.273.085.5
Gold R. + 2 Ex.70.768.080.791.0
+ +Table 10: Translation performance of Qwen-2.5-72B-Instruct using induced and gold rules. + +languages (Shi et al., 2023; Etxaniz et al., 2024), we examine how the language of rules affects translation. We translate the Chinese rules in ZHUAN-GRULES into English with GPT-4o and revise the translation manually. + +We present the results of using the grammar rules written in English for translation in Table 9. The performance drop when using the English rules, compared to the original Chinese rules, is relatively small, indicating that the language of the grammar book has little impact on MT performance. We leave further analysis across languages in future studies. + +# D.3 Induction of Descriptive Grammar Rules + +Beyond being used for the study of translation, ZHUANGBENCH can be also used for the research of grammar induction. + +Experimental Setups For each grammar rule in ZHUANGRULES, we ask LLMs to summarize a grammar rule based on its parallel sentence examples. We adopt two-shot ICL with Qwen-2.5-72B-Instruct, + +Since directly evaluating the quality of the generated rules is challenging, we perform an extrinsic evaluation: we use the induced rules for machine translation and compare the results to those obtained using gold-standard rules. + +Results As shown in Table 10, the grammar rules induced by LLMs are useful for translation. While the performance using induced rules is lower than using gold rules, it significantly outperforms the scenario without any rules, achieving improvements of $15.1\%$ and $24.3\%$ $\mathrm{chrF} + +$ for Zhuang-to-Chinese and Chinese-to-Zhuang translation, respectively. Additionally, pairing the induced rules with parallel examples further improves translation performance. We provide examples of the induced grammar rules in Table 16. + +These results demonstrate the potential of using LLMs to generate grammar rules for XLR languages. Our pilot study focuses on clustered groups of simple parallel sentences sharing common grammatical features. Future work can explore the possibility of using LLMs to distill descriptive grammar from a larger, unordered corpus of parallel data. + +# E Case Study + +We provide examples of Zhuang-to-Chinese translation from different methods in Table 15. When no additional input is provided, the model fails to translate the sentence into Zhuang, instead generating sentences with irrelevant words that do not even appear in Zhuang dictionaries, highlighting the current limitations of LLMs in supporting the Zhuang language. However, when a lexicon is provided, the translation improves significantly, though it still suffers from hallucinations and syntax errors. When rules or parallel sentence examples are provided, the model can understand the rule or mimic the examples to perform the translation, yielding better results with both lexical and syntactical accuracy. Code rules further enhance the model's ability to understand and utilize grammar rules due to the similarity between code execution and grammar rule application, and the stepwise breakdown inherent in code rules helps LLMs better comprehend complex grammar rules, also leading to improved performance. Moreover, when the test instance requires multiple rules, including all the necessary rules enables the model to generate a better translation, while using only a subset of the required rules reduces performance. + +def check Whether_apply.sourcesentence, dictionary): +Table 11: An example of the code rule for rule retrieval. The text in italics are the English translations. The code rules consist of two parts: (1) a concise comment outlining the steps for checking whether this rule needs to be applied, and (2) a pseudo-code function simulating the rule checking process. +#语法规则:在壮语中,单词"dwg"是系动词。在表示肯定判断的简单句中,“dwg”一般省略。然而,在表示否定时,“dwg”不可省略,且否定词"mbouj"需置于系动词“dwg”之前。(Grammar rule: In Zhuang, the word "dwg" is a copula. In affirmative simple sentences, "dwg" is usually omitted. However, in negative sentences, "dwg" cannot be omitted, and the negation word "mbouj" must be placed before the copula "dwg".) +##检查是否需要应用此规则将汉语翻译为壮语的步骤如下:(The steps to check whether this rule needs to be applied in the translation are as follows:) +1. 判断句子是否为判断句(1. Determine if the sentence is a judgment sentence.) +2. 若是判断句,返回True表示需要应用该规则;否则,返回False(2. If the sentence is a judgment sentence, return True indicating the rule should be applied, otherwise return False.) +```python +``` +#1. 判断句子是否为判断句(1. Determine if the sentence is a judgment sentence.) +if isjudge Sentence.sourcesentence): + #2. 若是判断句,返回True表示需要应用该规则(2. If the sentence is a judgment sentence, return True.) +return True +else: #否则,返回False(Otherwise, return False) +return False + +def apply_rule.sourcesentence, dictionary): +应用此规则将汉语翻译为壮语的步骤如下:(The steps for applying this rule to translate Chinese into Zhuang are as follows:) +1. 判断句子是否为否定句 (1. Determine if the sentence is negative.) +2. 提取主语、谓语和宾语 (2. Extract the subject, predicate, and object.) +3. 翻译主语、谓语和宾语 (3. Translate the subject, predicate, and object.) +4. 根据句子类型(肯定或否定)调整系动词“dwg”和否定词“mbouj”的使用 (4. Adjust the use of copula "dwg" and negation word "mbouj" based on sentence type, affirmative or negative.) +5. 拼接成完整的句子 (5. Combine to form the complete sentence.) +1. 判断句子是否为否定句 (1. Determine if the sentence is negative.) +is_negate = "不是" in sourceSentence +#2.提取主语、谓语和宾语(2.Extract the subject,predicate,and object.) subject,predicate,object $\equiv$ extractsubjectPredicate_object.sourceSentence) +#3. 翻译主语、谓语和宾语 (3. Translate the subject, predicate, and object.) +subject_in_zhuang = translate(subject, dictionary) +predicate_in_zhuang = translate Predicat, dictionary) object_in_zhuang $=$ translate(object_,dictionary) +#4. 根据句子类型调整系动词和否定词 (4. Adjust the use of copula "dwg" and negation word "mbouj" based on sentence type, affirmative or negative.) +if is_negat: # 否定句,使用"mbouj dwg" (Negative sentence, use "mbouj dwg") translated_sentence = f"subject_in_zhuang mbouj dwg predicate_in_zhuang object_in_zhuang else: # 肯定句,省略"dwg" (Affirmative sentence, omit "dwg") translated_sentence = f"subject_in_zhuang predicate_in_zhuang object_in_zhuang" +#5. 返回完整的翻译句子 (5. Return the complete sentence.) return translatedsentence +Table 12: An example of the code rule for rule application. The text in italics are the English translations. The code rules consist of two parts: (1) a concise comment outlining the translation steps, and (2) a pseudo-code function simulating the translation process. +# 语法规则:在壮语中,单词“dwg”是系动词。在表示肯定判断的简单句中,“dwg”一般省略。然而,在表示否定时,“dwg”不可省略,且否定词“mbouj”需置于系动词“dwg”之前。(Grammar rule: In Zhuang, the word "dwg" is a copula. In affirmative simple sentences, "dwg" is usually omitted. However, in negative sentences, "dwg" cannot be omitted, and the negation word "mbouj" must be placed before the copula "dwg".) + +#壮语是中国的一门少数民族语言。你是一名语言学家,以下是一条壮语语法规则的相关信息。给你一些需要翻译为壮语的汉语短语或句子,请根据该语法规则的内容,逐一检查翻译过程中是否需要使用该规则。你的回答中只应包含是否需要使用该规则的判断(“是”或“否”),不包含任何其他额外信息。(Zhuang is a minority language in China. You are a linguist, and the following is a grammar rule for the Zhuang language. You are given some Chinese phrases or sentences to translate into Zhuang; please check whether this rule applies in the translation process. Your answer should only contain whether the rule needs to be applied ("yes" or "no"), and no other additional information.) + +## 语法规则:(Grammar Rule:) + +## 语法规则描述:在壮语中,单词“dwg”是系动词。在表示肯定判断的简单句中,“dwg”一般省略。然而,在表示否定时,“dwg”不可省略,且否定词“mbouj”需置于系动词“dwg”之前。(Description of the Grammar Rule: In Zhuang, the word "dwg" is a copula. In affirmative simple sentences, "dwg" is usually omitted. However, in negative sentences, "dwg" cannot be omitted, and the negation word "mbouj" must be placed before the copula "dwg".) + +请检查下面的汉语短语或句子,判断是否需要使用该语法规则进行翻译:(Please check the following Chinese phrase or sentence and determine whether the grammar rule needs to be applied in the translation:) + +## 汉语短语或句子:他是我的父亲。(Chinese phrase or sentence: He is my father.) + +在上面的短语或句子中,汉语词语“父亲”在壮语中的翻译是“daxboh”;汉语词语“他”在壮语中的翻译是“de”;汉语词语“我”在壮语中的翻译是“gou”。(In the above phrase or sentence, the Chinese word "father" is translated into Zhuang as "daxboh"; "he" is translated as "de"; and "I" is translated as "gou.") + +Table 13: Prompt template for the RULE-BY-RULE retrieval method. The italicized text represents the English translations. When applying code rules, we directly replace the rule in the Description of the Grammar Rule with the code-format one. + +#壮语是中国的一门少数民族语言。你是一名语言学家,请根据给出的信息将汉语短语或句子翻译成壮语。你的回答应该只包含翻译结果,不要包含任何其他额外信息。(Zhuang is a minority language in China. You are a linguist, please translate the given Chinese phrases or sentences into Zhuang. Your answer should only include the translation, without any additional information.) + +# 以下是一条关于壮语的语法规则:(Below is a grammar rule for Zhuang:) + +## 语法规则:在壮语中,单词“dwg”是系动词。在表示肯定判断的简单句中,“dwg”一般省略。然而,在表示否定时,“dwg”不可省略,且否定词“mbouj”需置于系动词“dwg”之前。(Description of the Grammar Rule: In Zhuang, the word "dwg" is a copula. In affirmative simple sentences, "dwg" is usually omitted. However, in negative sentences, "dwg" cannot be omitted, and the negation word "mbouj" must be placed before the copula "dwg".) + +# 以下为该规则的一些例句及其IGT(Interlinear Glossed Text),可以帮助你完成翻译: (Here are some example sentences with their IGT (Interlinear Glossed Text), which can help you in the translation process:) + +例句1:(Example 1:) + +字典为:{"de":"他", "daxboh": "父亲", "gou": "我"} (Dictionary: {"de": "he", "daxboh": "father", "gou": "I"}) + +壮语:De mbouj dwg daxboh gou. + +IGT: 3sg NEG COP 父亲 1sg + +汉语:他不是我的父亲。(Chinese: He is not my father.) + +例句2:(Example 2:) + +字典为:{"daxmeh": "妈", "gou": "我", "vunz": "人", "laj mbanj": "乡下"} (Dictionary: {"daxmeh": "mother", "gou": "I", "vunz": "person", "laj mbanj": "rural area"}) + +壮语:Daxmeh gou vunz lij mbanj. + +IGT:母亲 $1\mathrm{sg}$ 人乡下 + +汉语:我妈是乡下人。(Chinese: My mother is from the countryside.) + +请首先写出下面的壮语短语或句子的IGT,然后将其翻译成汉语:(Please first write the IGT of the following Zhuang phrase or sentence, and then translate it into Chinese:) + +字典为:{"de": "他", "daxboh": "父亲", "gou": "我"} (Dictionary: {"de": "he", "daxboh": "father", "gou": "I"}) 壮语:De daxboh gou. + +所以,该壮语短语或句子的IGT和汉语翻译分别是:(So, the IGT and Chinese translation for the Zhuang phrase or sentence are:) + +Table 14: Prompt template for grammar rule application with 2 parallel examples and IGTs. The italicized text represents the English translations. When applying code rules, we directly replace the rule in the Description of the Grammar Rule with the code-format one. + +# 2. naengz "每" (Every) + +ngoenznaengz 意为“每天”,这是一个由ngoenz(“天”)和naengz 组成的合成词。naengz 本身无实际意义,但附加在一些时间名词或动量词之后,便含有“每”的意思。例如:(The word "ngoenznaengz" means "every day." It is a compound word formed by "ngoenz" ("day") and "naengz." The word "naengz" itself has no specific meaning, but when attached to certain time nouns or dynamic verbs, it conveys the meaning of "every". For example:) binaengz 每年 (every year) ndwennaengz 每月 (every month) haemhnaengz 每晚 (every night) baeznaengz 每次 (every time) + +# 10.2.1 Proximal wa'PROX + +# 10.2.1.1 Spatial use + +Proximal demonstrative wa is prototypically used adnominally, pronominally and identificationally to indicate referents that are close to the speaker. (9) illustrates an adnominal and (10) a pronominal use of the proximal demonstrative, both in object position (hence the object form wat). The demonstrative in (9) refers to a woman in a picture in front of the speaker, with the speaker pointing at her. The demonstrative in (10) stands in for a fishing net the speaker is holding. + +(9) ma enem wat=a tu 3SG woman PROX.OBJ=FOC hit 'He hits this woman.' + +[stim6_11:45] + +(10) ki wat napaki $\equiv$ kin ye ge 2PL PROX.OBJ use $\equiv$ VOL or not Are you going to use this or not? + +[conv3_1:59] + +Grammar Rule 1: 壮语代词gag“自己”与第一/第二/第三人称代词结合时,放在第一/第二/第三代词前或后均可,但意义各不相同。放在前面的表示“仅、只”的意思。放在后面的表示“自己”的意思。(The Zhuang pronoun "gag" meaning " oneself". It can be combined with first, second, or third-person pronouns, and it can be placed either before or after the pronoun, but the meaning differs in each case. When placed before the pronoun, it means "only" or "just". When placed after the pronoun, it means " oneself") + +Grammar Rule 2: 壮语时间名词的表达具有一定规律性,通过加入特定后缀可以表示特定某天的时间。后缀 -bonz、-lwenz、-neix、-cog、-rawz 分别表示“前天”、“昨天”、“今天”、“明天”和“后天”的时间。(The expression of time nouns in Zhuang follows certain patterns, where specific suffixes can indicate the time of a particular day. The suffixes -bonz, -lwenz, -neix, -cog, and -rawz represent "the day before yesterday", "yesterday", "today", "tomorrow" and "the day after tomorrow" respectively.) + +![](images/2be137560ef6c60815d867358f5e73af108b48dc132618faf28a060e9b68df9f.jpg) +Figure 4: A simplified extract from the Zhuang grammar book. The text in italics are the English translations. +Figure 5: A simplified extract from the Kalamang grammar book. +Figure 6: An testing instance that requires multiple grammar rules. To construct this, we modify sentences governed by Rule 1 (a rule about word order) by inserting words related to Rule 2 (a morphological rule). The text in italics are the English translations. + +![](images/2912fd497dc38c04f39b2c6e1d9ff59f211c6cf8e106c48f1ac07cf5045f69d0.jpg) +Figure 7: Performance of BLEU by rule number (Qwen-2.5-72B-Instruct, Zhuang $\rightarrow$ Chinese) + +
Case 1 (Single Rule)
Grammar Rule:壮语中表达“先做某事”用“......gonq”,壮语中也有汉语借词sien“先”,需要将两者结合表达一个共同的意思。(In Zhuang, the expression “to do something first” is formed with “......gonq”; Zhuang also has the Chinese loanword sien meaning “first,” which should be combined with gong to express the meaning.)
Input:让她先讲一讲。(Let her speak first.)
Lexicon:{"让": "hawj", "她": "de", "讲": "gangj"} ("let": "hawj", "she": "de", "speak": "gangj")
Gold:Hawj de sien gangj gonq.
No Rule (w/o Lexicon):Gou baez boux goz daen laj.
No Rule (w/ Lexicon):Hawj de gangj.
Parallel Examples:Hawj de sien gangj yiz gangj gonq.
Textual Rule:Hawj de sien gonq gangj.
Code Rule:Hawj de sien gangj gonq.
Textual Rule + 2 Examples:Hawj de sien gangj gonq.
Code Rule + 2 Examples:Hawj de sien gangj gonq.
Case 2 (Multiple Rules)
Grammar Rule:(1).修饰语作中心语的修饰或限制时,壮语中心语在前,修饰语于后。(When modifiers function as modifiers or restrictors of the head, the head appears first, followed by the modifier in Zhuang.)
(2). “yaep ndeu”意为“一会儿,一下”,在口语中使用频率较高,用来表示时间的短暂性,需要放在句尾。(“yaep ndeu” means “a while” or “a moment,” commonly used in spoken language to indicate the brevity of time, and should appear at the end of the sentence.)
Input:我看一会儿这本书。(I'll read this book for a while.)
Lexicon:{"我": "gou", "看": "yawj", "这": "neix", "本": "bonj", "书": "saw"} ("I": "gou", "read": "yawj", "this": "neix", "measure word of books": "bonj", "book": "saw")
Gold:Gou yawj bonj saw neix yaep ndeu.
No Rule (w/o Lexicon):Gou baeq boux gaj goek.
No Rule (w/ Lexicon):Gou yawj neix bonj saw haeuq.
Textual Rule 1 Only:Gou yawj saw neix bonj.
Textual Rule 2 Only:Gou yawj neix bonj saw yaep ndeu.
Both Textual Rules:Gou yawj neix bonj saw yaep ndeu.
Combined Code Rule:Gou yawj saw neix bonj yaep ndeu.
+ +Table 15: Two examples of Zhuang-to-Chinese translation from different methods. The text in italics are the English translations. + +
Case 1
Gold Grammar Rule:“yied…… yied……”表示随着时间的推移或事物的发展,数量或程度逐渐增加或减少,类似于汉语中的“越来越……”。("yied…… yied……” indicates a gradual increase or decrease in quantity or degree over time or with development, similar to the Chinese “more and more……”).
Input Parallel Example 1:汉语:我们越走就越靠近他家了。(Chinese: The farther we walk, the closer we get to his house.)Zhuang: Raeuz yied byaij yied dep laeng de lo.字典为:{“我们”:“raeuz”,“走”:“byaij”,“靠近”:“dep”,“家”:“laeng”,“他”:“de"}(Dictionary: {"we": "raeuz", "walk": "byaij", "approach": "dep", "house": "laeng", "his": "de"})
Input Parallel Example 2:汉语:夏天到了,白天越来越长了。(Chinese: Summer has arrived, and the days become longer.)Zhuang: Seizhah daengz lo, doengxngoenz yied daej yied raez.字典为:{“夏天”:“seizhah", "到": "daengz", "了": "lo", "白天”: "doengxngoenz", "来": "daeuj", "长": "raez"}(Dictionary: {"summer": "seizhah", "arrive": "daengz", "completed": "lo", "daytime": "doengxngoenz", "become": "daeuj", "long": "raez"})
Induced Grammar Rule:在壮语中,当需要表达某个状态或动作的程度逐渐加深或变化时,可以在两个相关的动词或形容词之间使用“yied...yied...”结构,以强调这种渐进的变化过程。(In Zhuang, when expressing a gradual increase or change in a state or action, the "yied...yied..." structure can be used between two related verbs or adjectives to emphasize this progressive change.)
Case 2
Gold Grammar Rule:“dox”+一般动词,表示动作行为是由甲乙双方相互进行的。(“dox” + general verbs indicate that the action is performed by both parties in interaction.)
Input Parallel Example 1:汉语:对骂 (Chinese: To curse at each other.)Zhuang: doxdaq字典为:{“骂”: "ndaq"}(Dictionary: {"curse": "ndaq'})
Input Parallel Example 2:汉语:互助 (Chinese: Mutual assistance.)Zhuang: doxbang字典为:{"帮": "bang"}(Dictionary: {"help": "bang'})
Induced Grammar Rule:在壮语中,为了表达两个主体之间的互动或相互作用的行为,可以在相关动词前添加前缀“dox”,以构成表示互动或相互作用的复合动词。(In Zhuang, to express interactive or reciprocal actions between two subjects, the prefix "dox" can be added to relevant verbs to form compound verbs indicating interaction.)
Case 3
Gold Grammar Rule:动词后边一般能在后面带上时态助词gvaq“过”,表示经历时态。但壮汉语在结构上略有不同,壮语的gvaq置于述宾词组之后,汉语的“过”则紧贴着动词之后。(Verbs in Zhuang can typically be followed by the tense marker "gvaq" to indicate the experiential past. However, Zhuang and Chinese differ in structure: Zhuang places "gvaq" after the verb-object phrase, while in Chinese, "过" follows immediately after the verb.)
Input Parallel Example 1:汉语:我看过这本书。(Chinese: I have read this book.)Zhuang: Gou yawj bonj saw neix gvaq.字典为:{“我”: "gou", "看": "yawj", "本": "bonj", "书": "saw", "这": "neix"}(Dictionary:{“I”: "gou", "read": "yawj", "measure word of book": "bonj", "book": "saw", "this": "neix')}
Input Parallel Example 2:汉语:他到过北京。(Chinese: He has been to Beijing.)Zhuang: De bae daengz Bwzgingh gvaq.字典为:{“他”: "de", "去": "bae", "到": "daengz", "北京": "Bwzgingh"}(Dictionary:{“he”: "de", "go": "bae", "arrive": "daengz", "Beijing": "Bwzgingh"})
Induced Grammar Rule:在壮语中,表示过去经历的助词“gvaq”通常置于句子的末尾,用于表达动作已经发生或完成。(In Zhuang, the experiential marker "gvaq" is usually placed at the end of the sentence to indicate that the action has already occurred or been completed.)
+ +Table 16: Examples of grammar rule inducted by Qwen-2.5-72B-Instruct. The text in italics are the English translations. \ No newline at end of file diff --git a/readitintwostepstranslatingextremelylowresourcelanguageswithcodeaugmentedgrammarbooks/images.zip b/readitintwostepstranslatingextremelylowresourcelanguageswithcodeaugmentedgrammarbooks/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..be6d9eeaaf5d6d86f9144fefd36ed97c2c1dac53 --- /dev/null +++ b/readitintwostepstranslatingextremelylowresourcelanguageswithcodeaugmentedgrammarbooks/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f7fa593270a1e28e5810bed12a5be5dd02b2148e2136f2b4052a95b013df887a +size 1138800 diff --git a/readitintwostepstranslatingextremelylowresourcelanguageswithcodeaugmentedgrammarbooks/layout.json b/readitintwostepstranslatingextremelylowresourcelanguageswithcodeaugmentedgrammarbooks/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..087823ac9034e9fdca39ea0ca6990bea4a1303c4 --- /dev/null +++ b/readitintwostepstranslatingextremelylowresourcelanguageswithcodeaugmentedgrammarbooks/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:30d778cbae3317cb4dce08b68f0646aeed55ddd96eb44afc9fc30fe07e8f3166 +size 515024 diff --git a/realmmragarealworldmultimodalretrievalbenchmark/66af96e2-571b-4778-80e2-4fe5587c1047_content_list.json b/realmmragarealworldmultimodalretrievalbenchmark/66af96e2-571b-4778-80e2-4fe5587c1047_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..d4959c32f70c815ede2dc159223c1b7a2ebe0fab --- /dev/null +++ b/realmmragarealworldmultimodalretrievalbenchmark/66af96e2-571b-4778-80e2-4fe5587c1047_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5304cd8eeec281909a85115e40fdf7309b8f546d6b9f28f6cd5041fc462d4a17 +size 194791 diff --git a/realmmragarealworldmultimodalretrievalbenchmark/66af96e2-571b-4778-80e2-4fe5587c1047_model.json b/realmmragarealworldmultimodalretrievalbenchmark/66af96e2-571b-4778-80e2-4fe5587c1047_model.json new file mode 100644 index 0000000000000000000000000000000000000000..08da4c8ab57a2e2a06a3b573bbee828ebd1ce248 --- /dev/null +++ b/realmmragarealworldmultimodalretrievalbenchmark/66af96e2-571b-4778-80e2-4fe5587c1047_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4d077682a297544e3037f0fad843f49320f23315117847d0608dfa8ea32905ae +size 218263 diff --git a/realmmragarealworldmultimodalretrievalbenchmark/66af96e2-571b-4778-80e2-4fe5587c1047_origin.pdf b/realmmragarealworldmultimodalretrievalbenchmark/66af96e2-571b-4778-80e2-4fe5587c1047_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7999a477823f50943f8c2fc71117360eeb0b0335 --- /dev/null +++ b/realmmragarealworldmultimodalretrievalbenchmark/66af96e2-571b-4778-80e2-4fe5587c1047_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3b3e0a4dfb79a140797b07072b544d7a18717f991ed2edf3e697c9b1bbe3fcf3 +size 7387710 diff --git a/realmmragarealworldmultimodalretrievalbenchmark/full.md b/realmmragarealworldmultimodalretrievalbenchmark/full.md new file mode 100644 index 0000000000000000000000000000000000000000..d740629d78042329fa071732314ab88d8ba283b0 --- /dev/null +++ b/realmmragarealworldmultimodalretrievalbenchmark/full.md @@ -0,0 +1,916 @@ +# REAL-MM-RAG: A Real-World Multi-Modal Retrieval Benchmark + +Navve Wasserman $^{1,2}$ , Roi Pony $^{1}$ , Oshri Naparstek $^{1}$ , Adi Raz Goldfarb $^{1}$ , Eli Schwartz $^{1}$ , Udi Barzelay $^{1}$ , Leonid Karlinsky $^{1}$ + +1IBM Research Israel 2Weizmann Institute of Science + +navve.wasserman@weizmann.ac.il + +# Abstract + +Accurate multi-modal document retrieval is crucial for Retrieval-Augmented Generation (RAG), yet existing benchmarks do not fully capture real-world challenges with their current design. We introduce REAL-MM-RAG, an automatically generated benchmark designed to address four key properties essential for real-world retrieval: (i) multi-modal documents, (ii) enhanced difficulty, (iii) Realistic-RAG queries and (iv) accurate labeling. Additionally, we propose a multi-difficulty-level scheme based on query rephrasing to evaluate models' semantic understanding beyond keyword matching. Our benchmark reveals significant model weaknesses, particularly in handling table-heavy documents and robustness to query rephrasing. To mitigate these shortcomings, we curate a rephrased training set and introduce a new finance-focused, table-heavy dataset. Finetuning on these datasets enables models to achieve state-of-the-art retrieval performance on REAL-MM-RAG benchmark. Our work offers a better way to evaluate and improve retrieval in multi-modal RAG systems while also providing training data and models that address current limitations. Our benchmark is available at this project page. + +# 1 Introduction + +Accurate retrieval of relevant documents is a cornerstone of modern natural language processing (NLP) applications, whether used alone or in advanced pipelines like Retrieval-Augmented Generation (RAG). RAG (Lewis et al., 2020) has emerged as a powerful approach wherein models retrieve external information before generating answers or content, enabling operation over large document collections. Multi-modal RAG extends this to real-world scenarios involving text, figures, tables, and potentially entire page images. + +Successful retrieval is crucial for RAG, as retrieving the wrong page or document inevitably + +hinders the final generated response. Therefore our analysis will focus on the retrieval part. Although research on RAG is advancing, the field still lacks a complete understanding of how models perform in realistic setups, both for evaluating performance and identifying current weaknesses to overcome. This gap arises from a shortage of benchmarks that thoroughly assess real-world retrieval challenges. + +We identify four essential properties for a real-world document retrieval benchmark, particularly in multi-modal contexts: (i) Multi-modal documents: The dataset should include pages with text, figures, tables, and other visual elements to reflect the complexity of real-world materials. (ii) Enhanced difficulty: Queries should require more than simple keyword matching and involve a large corpus of contextually similar pages to ensure challenging evaluations. (iii) Realistic-RAG queries: Questions must be posed naturally, without explicit references to pages—reflecting queries a person might ask when seeking information without knowing the answer's location (in contrast to generic question-answering setups). (iv) Accurate labeling: All documents relevant to a query must be correctly and exhaustively labeled to prevent underestimation of retrieval performance and to avoid false negatives. + +Although a few recent benchmarks touch on some of these aspects (Faysse et al., 2024; Ma et al., 2024a,b), most fail to fully capture them, limiting their usefulness for understanding and improving multi-modal retrieval models. We introduce REAL-MM-RAG-Bench (Real-World Multi-Modal Retrieval-Augmented Generation Benchmark), a benchmark designed to satisfy the properties above: + +Multi-modal documents (Property i): Our dataset comprises slides and documents with text, figures, tables, and images, requiring systems to handle combined textual and visual data. + +![](images/a812ffd0bc3ff13d19bad9f3745bb37e2ccfbcfe650e78d4e94564593e2da5fb.jpg) +Figure 1: Proposed Real-MM-RAG Benchmark + +Enhanced difficulty (Property ii): Instead of relying on isolated pages or trivial queries, we focus on long documents from specialized domains (e.g., IBM finance reports, FlashSystem technical materials). This makes retrieval significantly more challenging, as models must differentiate between highly similar content within the same domain. Additionally, we incorporate a rephrasing step to ensure that query wording and order are not identical to the page content, requiring semantic understanding rather than simple keyword matching. + +Realistic-RAG queries (Property iii): We use a two-step process to generate queries: vision-language models (VLMs) create retrieval-focused queries, and large language models (LLMs) filter them to ensure natural phrasing and realistic user intent. Unlike many existing datasets, our queries avoid direct references to specific pages, reflecting authentic retrieval scenarios. + +Accurate labeling (Property iv): Ensuring all pages answering a query are correctly identified is crucial, especially in benchmarks with many similar pages. Existing benchmarks often mislabel valid documents as incorrect, leading to false negatives. To address this, we employ an automated pipeline using VLMs to verify query relevance to each page. While computationally intensive, this approach enhances labeling reliability, particularly for closely related pages. + +Our benchmark enables reliable evaluation of current retrieval models and uncovering some of their + +weaknesses. Additionally, it incorporates two essential properties that expose specific retrieval challenges: + +Rephrasing Robustness Evaluation: In real-world scenarios, users rarely phrase their queries exactly as they appear in documents. However, both VLMs and human annotators tend to generate queries that closely mirror the source material, often using similar words and sentence structures (Smeaton and Kelley, 1998; Zhu et al., 2024). This fails to reflect natural user behavior, where users are not directly exposed to the document page when forming queries. To address this, we introduce a multi-level rephrasing benchmark, modifying queries at three distinct levels—ranging from slight rewording to significant structural changes. Our experiments show that current retrieval models struggle to maintain performance across these variations, highlighting a critical weakness in their semantic understanding. + +Table-Focused Scenarios: Table-heavy documents (e.g. financial reports) often contain dense tabular data, posing a major challenge for retrieval models. By incorporating table-heavy documents into our benchmark, we expose key deficiencies in table comprehension that significantly impact model performance. These properties allow us to demonstrate that all current retrieval models exhibit weaknesses in handling both rephrased queries and table-heavy financial documents. + +To address these shortcomings, we leverage in + +sights from our benchmark to enhance retrieval performance. Specifically, we introduce two targeted training strategies: (i) a rephrased training dataset, generated by rephrasing the ColPali training dataset (Faysse et al., 2024), and (ii) a financetable-heavy training set, designed to improve retrieval in tabular contexts. Fine-tuning the current best model on these datasets achieves state-of-the-art retrieval performance on our benchmarks. This demonstrates how systematic evaluation through our benchmark can informs effective training strategies, leading to more robust and adaptable retrieval models. + +# The contributions of this paper are as follows: + +- Defining properties of a real-world retrieval benchmark and highlighting shortcomings in existing ones. +- Introducing a high-quality multi-modal retrieval benchmark with an automated pipeline for query generation, filtering, and labeling verification. +- Establishing a rephrasing robustness evaluation framework via multi-level query rephrasing. +- Providing two specialized training datasets: (i) a rephrased dataset and (ii) a finance-table-heavy dataset, where fine-tuning on them significantly enhances retrieval performance. + +# 2 Related Work + +# 2.1 Text-Based Retrieval + +Text-based retrieval methods identify relevant documents given a query and are widely used in RAG systems. Lexical matching techniques like BM25 (Robertson et al., 1994) and TF-IDF (Sparck Jones, 1972) are efficient but lack semantic understanding. Sparse models like SPLADE (Formal et al., 2021) improve retrieval by expanding queries into high-dimensional sparse representations but struggle with deep contextual meaning. Dense retrieval models, leveraging transformers like BERT (Devlin, 2018), T5 (Raffel et al., 2020), and DPR (Karpukhin et al., 2020), map queries and documents into a continuous vector space, enhancing recall but demanding significant computational resources for training and inference. Hybrid methods, that combine lexical and dense retrieval, such as ColBERT (Khattab and Zaharia, 2020) and ANCE (Xiong et al., 2020), often achieving state-of-the-art performance. A recent model, M3-Embedding (Chen et al., 2024), unifies dense, sparse, and multi-vector embeddings, achieving + +strong retrieval performance. Despite advancements, text-based retrieval struggles with multimodal content, particularly in scenarios where visual cues enhance contextual understanding. + +# 2.2 Multi-Modal Retrieval + +Until recently, multi-modal retrieval primarily relied on Optical Character Recognition (OCR) to extract textual information from documents, including text within visual elements. More recent approaches detect visual components and process them in one of two ways: (i) Captioning-based retrieval, where a VLM generates textual descriptions of visual elements, enabling standard text-based retrieval (Ramos et al., 2023); or (ii) Direct embedding, where visual elements are embedded either using VLMs directly or through contrastive Vision-Language Models that align separate visual and text encoders via contrastive losses (Radford et al., 2021; Zhai et al., 2023). + +A more recent line of work leverages the strong performance of VLMs in analyzing full document images by embedding entire document pages instead of relying on OCR-based extraction. Methods such as VISRAG (Yu et al., 2024) and DSE (Ma et al., 2024a) generate dense embeddings directly from document images. Similarly, ColPali (Faysse et al., 2024) generates multi-vector embeddings for ColBERT-style late interaction retrieval, using PaliGemma (Beyer et al., 2024) or in a newer variant, ColQwen, utilizes Qwen2-VL (Wang et al., 2024a). These methods have demonstrated significant improvements over earlier text-based and OCR-dependent retrieval approaches. Our benchmark provides a rigorous evaluation framework for both text-based and visual-based multi-modal retrieval. + +# 2.3 Query Rephrasing + +Retrieval models known to be highly vulnerable to query rephrasing (Zuccon et al., 2016; Bailey et al., 2017; Sidiropoulos and Kanoulas, 2022; Penha et al., 2022; Hagen et al., 2024), often leading to significant performance degradation. However, only few works have provided accessible and reliable evaluation frameworks for model robustness. An early study (Bailey et al., 2016) introduced a basic Query Variability dataset, while more recent works (Benham et al., 2018; Lu et al., 2019; Penha et al., 2022) focus on automatically generating query variations. Yet, no prior research has established a standardized benchmark for retrieval + +![](images/47c9223bf06990bba346aee3577b7dc711e45a9a18c5e10a32562871b8154d7b.jpg) +Figure 2: Benchmark Construction Pipeline + +robustness, nor a dedicated RAG robustness benchmark—especially for multi-modal retrieval. In contrast, we leverage LLMs to generate multi-level query rephrasing, enabling structured comparative evaluation for multi-modal documents retrieval. + +# 2.4 Multi-Modal Retrieval Benchmarks + +Despite the growing importance of document retrieval in multi-modal RAG systems, only a few evaluation benchmarks exist, all of which fall short in key aspects crucial for real-world scenarios. We review recent efforts and highlight their limitations (with further comparison in Table 1 and section 4). While many question-answering benchmarks exist (Mathew et al., 2021; Zhu et al., 2022; Masry et al., 2022; Islam et al., 2023; Ding et al., 2024), they are largely unsuitable for RAG. Their queries assume exposure to a specific page (unlike RAG), and their tendency toward high variability make retrieval easier. Some benchmarks, such as MMLong-Bench (Ma et al., 2024b) (based on 130 lengthy PDFs) and SlideVQA (Tanaka et al., 2023), are partially relevant but not suited for RAG (see section 4). + +A notable benchmark is WIKI-SS-NQ (Ma et al., 2024a), generated from Wikipedia screenshots with real human queries—the only dataset providing mostly valid retrieval queries. However, it is not multi-modal benchmark, consists of mainly text-based documents, and has narrow sub-domain coverage. The ViDoRe benchmark (Faysse et al., 2024), introduced in the ColPali paper, comprises both QA datasets and domain-specific documents with generated queries filtered by human annotators. While the QA datasets are unsuitable for RAG, the domain-specific queries are better tailored but suffer from trivial difficulty (e.g., synthetic datasets reporting an NDCG@5 > 95). This occurs because pages often differ significantly, and VLM-generated questions closely mirror the original page wording, making retrieval easy. + +Our REAL-MM-RAG-Bench is the first multimodal retrieval benchmark incorporating all essential properties for real-world RAG. It features a challenging setup with broad sub-domain coverage, long documents, RAG-tailored rephrased queries, and accurate labeling. Additionally, it is the first to offer a robustness evaluation through multi-level query rephrasing. + +# 3 REAL-MM-RAG-Bench + +Creating a high-quality benchmark manually is both exhaustive and error-prone, limiting its size and reliability. To address this, we propose an automated generation and verification pipeline tailored for Retrieval-Augmented Generation (RAG) evaluation. Our benchmark introduces robustness evaluation through multi-level query rephrasing, further improving upon previous benchmarks. The benchmark construction begins with document collection, followed by four key steps: (1) Query Generation, (2) Query Verification, (3) Query Rephrasing, and (4) False Negative Verification. + +# 3.1 Document Collection + +To reflect real-world retrieval challenges, we focus on long documents rather than isolated pages, and also ensuring many pages within the same sub-domain by focusing on a single company data (IBM). Our dataset consists of 8000 pages across four sub-domains, forming four specialized benchmarks (see Table S1 for details). For each page, we added the document name to the page image to provide context. FinReport: Financial reports (2005-2023), totaling 19 documents and 2687 pages, with a mix of text and tables. FinSlides: Quarterly financial presentations (2008-2024), totaling 65 presentations and 2280 pages, primarily table-heavy. TechReport: 17 Technical documents on FlashSystem, totaling 1674 pages, text-heavy with visual elements and tables. TechSlides: 62 Technical presentations on business and IT automation, totaling + +
StatisticsMulti-ModalEnhanced DifficultyRealistic-RAG QueriesAccurate Labels
Benchmark#Pages#QueriesMMPagesLongDocsSubdomainCoverQueriesRephrasingRAGTailoredGen.RAGQueryVerif.FalseNeg.Verif.
SlideVQA52k14.5k✓✓XXXXX
MMLONG7k1k✓✓XXXXX
WIKI-SS-NQ4k4kXXXX✓✓X
ViDoRe8k4k✓XXXX✓X
Ours8k5k✓✓✓✓✓✓✓
+ +Table 1: Document Retrieval Benchmarks Comparison. + +1963 pages, with significant visual content. + +# 3.2 Query Generation & Filtering + +Generation. We aim to generate queries that are both answerable by a specific document and RAG-suitable, meaning they reflect natural user inquiries without prior knowledge of the exact page or answer location (unlike traditional Q/A datasets tied to specific pages). To achieve this, we employed a Pixtral-12B VLM (Agrawal et al., 2024), prompting it to generate RAG-specific questions (see Fig. S4). Each document page was fed into the VLM, which produced 10 query-answer pairs per page, later keeping only a subset that met the benchmark's quality criteria after filtering. Each retained query-answer pair is labeled with the corresponding page it was generated from. + +Verification. Although the VLM is instructed to generate RAG-specific queries, many still do not fully align with our requirements. To systematically classify them, we use Mixtral-8x22B-v0.1 LLM (Jiang et al., 2024), which evaluates each generated query and determines whether it is suitable as retrieval query (see prompt in Fig. S5). Queries that are well-formed for RAG are those that a user might ask without prior knowledge of the document's structure, ensuring they are neither too general nor overly specific to a single page. Queries that fail this criterion fall into two categories: those with explicit page references, such as "in Figure 5" or "the title of the page", and those that are too broad, like "What is the net revenue in 2020?" instead of "What is IBM's net revenue in 2020?". + +# 3.3 Query Rephrasing + +In real-world retrieval, a user formulating a query does not have direct access to the document's content and will naturally phrase their question without mirroring the exact wording from the source. + +However, VLMs often generate queries by copying phrases directly, leading to an over-reliance on keyword matching rather than true semantic retrieval. To address this, we introduce a rephrasing step that preserves query meaning while reducing dependence on specific document wording. Each query is processed by Mixtral-8x22B-v0.1 with a dedicated prompt designed to alter phrasing while maintaining intent. The rephrased query is then verified by the LLM using a validation prompt (Fig. S6), along with the original query and answer, to ensure it retains the original meaning and still corresponds to the known answer in the labeled page. + +To enable deeper evaluation, each query undergoes three levels of rephrasing using distinct prompts (Fig. S6). The first level introduces minor word changes while maintaining structure. The second modifies word choice and sentence order, making the phrasing more distinct. The third involves significant word rephrasing and sentence restructuring while preserving meaning. At the end of this process, each query exists in four versions: the original and three progressively rephrased forms, all linked to the same document page (see examples in Figs. S1 and S2). + +# 3.4 Accurate Labeling + +The final step in preparing our benchmark is verifying the correctness of negative labels. This is especially crucial for our challenging benchmarks, where many pages share highly similar content within the same sub-domain. Each query is systematically tested against all benchmark pages. Though computationally expensive, this step prevents false negatives and ensures reliable evaluation. Queries together with each page are processed using Pixtral-12B, which determines whether a page contains an answer to the query. Every query is then explicitly linked to all relevant pages. For + +simplicity, our final benchmark retains queries whose only the originally assigned page is verified to contain the correct answer. This results in a high-quality dataset of triplets: a page image, a query, and its corresponding answer. Note that our benchmark includes pages without corresponding queries. These are pages whose queries were filtered out at some stage, either because they were not suitable for RAG-style questions in general (e.g., title pages) or because the specific generated queries were not suitable for RAG. + +# 4 Benchmarks Quality Evaluation + +A high-quality benchmark for multi-modal retrieval is essential, yet few existing benchmarks are designed for this purpose, and none comprehensively define or implement the necessary properties. Table 1 compares our benchmark with other prominent ones, which suffer from limitations such as poor alignment with real-world queries, high false-negative rates, and trivial difficulty. + +Accurate Labeling. Many perceived retrieval errors in existing benchmarks are actually false negatives, meaning pages that correctly answer the query but were mislabeled as irrelevant. To mitigate this, we introduce a false-negative verification process that exhaustively labels all valid pages. Human Evaluation. We sampled 50 top-1 retrieval errors of ColQwen on Vidore, MMlongbench, and our benchmark. Annotators reviewed the query and retrieved page (labeled as negative) to determine if it could answer the query (Fig. S8). A total of 234 responses from 5 annotators were collected. + +
VidoreMMLongOurs
False Negative (%) ↓86.977.831.9
+ +The table shows that Vidore and MMlongbench had a high rate of false negatives, whereas our benchmark, despite its challenging design with similar sub-domain pages, had significantly fewer, proving the effectiveness of accurate labeling. + +Enhanced Difficulty. A strong benchmark must pose real challenges. Existing ones fall short by offering too few relevant candidates or allowing retrieval via simple keyword matching rather than true semantic understanding. For example, having 1,000 financial pages from different companies is insufficient, as knowing the company name narrows the candidates to a few dozen. The ColQwen model achieves an NDCG@5 of around 90 on Vidore. Other sub-datasets, although reporting lower + +performance, contain many errors that are actually false negatives, as demonstrated by our human evaluation presented above. We address this issue through accurate labeling and by incorporating long documents and extensive sub-domain coverage. This provides many similar pages, making retrieval more challenging and better reflecting real-world scenarios. Moreover, we prevent trivial keyword-based retrieval by introducing the first rephrasing benchmark for multi-modal document RAG, ensuring robustness to query variations and promoting semantic learning. + +Realistic-RAG Queries. To reflect real RAG use cases, queries must resemble natural information-seeking questions. Our benchmark ensures this through a two-step RAG-tailored pipeline: generation and filtering. Human Evaluation. We randomly sampled 500 queries from Vidore, MMLong-Bench, and our benchmark. Annotators, unaware of the source benchmark or study goal, evaluated whether each query could reasonably be asked by a real user (Fig. S7). A total of 2578 responses were collected from 10 annotators. + +
VidoreMMLongOurs
Realistic-RAG Queries (%) ↑32.935.888.0
+ +The table shows that most Vidore/MMLongBench queries were labeled as unrealistic RAG queries (see some examples in Fig. S3), whereas $85\%$ of ours were validated as realistic, highlighting shortcomings in existing benchmarks and the effectiveness of our query generation and filtering process. + +Summary. Our benchmark enhances multimodal retrieval evaluation by introducing nontrivial difficulty with long documents and broad sub-domain coverage. It ensures RAG-aligned queries and promotes semantic retrieval over keyword matching through query rephrasing, addressing key limitations of existing benchmarks. + +# 5 Model Evaluation & Enhancement + +Evaluation Models and Metrics. We evaluate multiple models on our benchmark, covering both text and vision-based approaches. We use the ColPali benchmark code (ViDoRe) to assess our text-based models and the vision-based models ColPali and ColQwen. For the text-based methods, we follow the framework suggested in ColPali, which employs Unstructured in a high-resolution configuration with OCR engine to parse PDFs. For each document, Unstructured produces text chunks and + +
BenchmarkFinReportFinSlidesTechReportTechSlides
Text
BM25 (OCR)21.75.935.131.2
BGE-M3 (OCR)36.511.437.149.7
BM25 (Captioning)25.39.937.236.1
BGE-M3 (Captioning)35.913.837.551.7
Vision
ColPali34.527.662.075.8
RobColPali47.1 +12.648.4 +20.866.6 +4.6082.8 +7.0
TabColPali50.5 +16.041.5 +13.961.3 -0.777.6 +1.8
RobTabColPali63.2 +28.758.3 +30.770.7 +8.783.3 +7.5
ColQwen41.831.166.978.1
RobColQwen47.5 +5.744.3 +13.269.5 +2.683.0 +4.9
TabColQwen54.0 +12.249.6 +18.565.9 -1.078.9 -0.8
RobTabColQwen67.1 +25.361.6 +30.573.2 +6.385.0 +6.9
+ +Table 2: Performance of Different Models on Our Benchmark. We evaluate various models, including text- and vision-based approaches, across our four benchmarks. Results, measured using NDCG@5, are reported on our final benchmark with queries rephrased at the highest level (Level 3). We also present results for our fine-tuned models trained on our proposed datasets: Rob - trained on a rephrased dataset, Tab - trained on a table-heavy dataset, and RobTab - incorporating both. + +visual chunks (e.g., tables, figures, images). We consider two text-based variants: (1) OCR, where visual data is processed through an OCR engine, and (2) Captioning, where visual elements are described using a Vision Language Model (Qwen2-VL-72B-Instruct (Wang et al., 2024b)). We then evaluate two retrieval methods: Okapi BM25 and BGE-M3 (Chen et al., 2024) (see appendix A.1 for more details). We report NDCG@5 as our primary ranking metric, which evaluates how well relevant items are ranked within the top 5 results, giving higher importance to those appearing earlier. Additional metrics and details provided in A.1 & A.5. + +# 5.1 Results Analysis + +In Table 2, we report NDCG@5 performance for different models across our four benchmarks with high rephrasing levels, which better reflect real-world scenarios. We first present observations about the vanilla models, including text-based models, ColPali, and ColQwen: Visual vs. Text-Based Models. Vision-based models, which use VLMs on page images, significantly outperform text-based models across all benchmarks. This supports the notion that visual information is essential for our benchmark and that these models can effectively utilize it. Non-Trivial Difficulty. + +Performance is generally low, especially compared to Vidore, where ColQwen achieves nearly $90\%$ on average. Rephrasing Effects on Performance. Some of the drop in performance is due to rephrasing. In Table 3, we analyze the impact of rephrasing level, showing a clear performance drop as rephrasing intensity increases. BM25 suffers the most, as expected for a lexical-based model, while dense retrieval models are more resilient. Table-Heavy Finance Benchmarks Are Harder. Our financial benchmarks (FinReport, FinSlides), which are table-heavy, are significantly more challenging than text/visual-based ones (see table vs. non-table analysis in Table S5). + +# 5.2 Table and Finance Focused Training + +To address the challenges in table-heavy datasets, we curated a table-focused finance dataset using FinTabNet (Zheng et al., 2021), which contains complex tables from S&P 500 company reports. Through the pipeline in section 3, we generated 46,000 query-answer-page triplets to enhance retrieval for table-heavy financial data (see Table S7 for a VLM ablation study). We fine-tuned ColPali and ColQwen for one epoch on this dataset while incorporating the ColPali training set, producing the TabCol models. + +As shown in Fig. 3 and Table 2, TabCol models significantly improve performance on financial benchmarks, effectively addressing table-heavy dataset challenges. Importantly, this enhancement does not come at the cost of generalization, as TabCol models continue well across the two other benchmarks. + +![](images/02f495e066ab7e31d4728e7bede33b73d6072cd1da180b72a041c7006a67b373.jpg) +Figure 3: Table-Focused Training Improves Financial Benchmarks. Fine-tuning with our proposed table-heavy training set, combined with the ColPali training set (both in their original and rephrased versions) significantly enhances performance on financial benchmarks (results shown for rephrasing level 3). + +
Rephrasing Levels0123
BM25 (Captioning)52.741.631.327.1
BGE-M3 (Captioning)43.339.236.534.7
ColPali71.366.156.050.6
RobColPali76.773.966.061.2
RobTabColPali80.877.872.568.9
ColQwen73.967.559.654.5
RobColQwen74.170.264.461.1
RobTabColQwen83.980.675.171.7
+ +Table 3: Query Rephrasing Effect. This table presents the NDCG@5 scores averaged across all benchmarks for different models and rephrasing levels. '0' represents no rephrasing, while '3' indicates significant rephrasing (see Table S2 for full results). + +![](images/71e03267ec03c1663bf1697cc154c4850e50307d2479992910c48edc5efb5e70.jpg) +Figure 4: Fine-Tuning on Rephrased Training Set. We compare the NDCG@5 scores across rephrasing levels for baseline models (ColPali and ColQwen) against our fine-tuned models (RobCol). The results demonstrate that fine-tuning with our rephrased training data significantly enhances rephrasing robustness for both ColPali and ColQwen. + +![](images/8d1771ea2a2b52491ea74e41b446767c8c6669bc8fc74779d24ee2b579d96916.jpg) + +# 5.3 Rephrasing Robustness Training + +Our benchmark reveals that current models struggle with rephrasing, suggesting that training and evaluation queries often closely match the phrasing of their retrieved pages. To address this, we augmented the ColPali training set by rephrasing half of its queries, randomly selecting one of three rephrasing levels. This was done using LLaMA-3-70B $^1$ , a different LLM than the one used for the benchmark. This dataset forces models to learn semantics rather than relying on keyword matching. We fine-tuned ColPali-v1.2 and ColQwen2-v1.0 $^2$ (using the ColPali code) for one epoch, producing the RobCol models. + +As demonstrated in Fig. 4 and Table 3 (and in Tables 2 and S2), RobCol significantly outperforms baselines on rephrased queries while maintaining comparable performance on non-rephrased cases, achieving an average NDCG@5 improvement of 11.1 at rephrasing level 3. The gains are stronger on financial benchmarks, where the task is more complex, suggesting that enhanced semantic understanding through rephrasing robustness is particularly beneficial. In Table S6, we show that fine-tuning on the original data (rather than the rephrased version) provides much lower improvement for ColPali and leads to a decrease in performance for ColQwen. + +Additionally, we created a rephrased version of the tabled-focused dataset and fine-tuned both models on it, along with the rephrased ColPali training set, producing RobTabCol models. RobTabCol consistently outperforms all models across nearly + +all benchmarks and rephrasing levels, achieving a 25-30 NDCG@5 improvement over base models on rephrased finance benchmarks and 6-9 on non-financial ones. We further show in appendix A.6 that our RobTab models outperform the baselines on the newly released ViDoRe V2 benchmark. + +# 6 Conclusions + +We introduced REAL-MM-RAG-Bench, a real-world multi-modal retrieval benchmark designed to evaluate retrieval models in reliable, challenging, and realistic settings. Our benchmark addresses key properties essential for evaluating retrieval systems in real-world applications, which prior benchmarks often fail to capture. An important contribution of our work is the introduction of a multilevel rephrasing evaluation, which assesses models under increasing linguistic variation, highlighting their limitations in generalizing beyond surface-level text matching. + +Our findings reveal two major weaknesses in current models: (i) retrieval over table-heavy financial documents and (ii) sensitivity to query rephrasing. To address these, we proposed dedicated training sets: a finance-table-heavy dataset to improve retrieval on tabular content and a rephrased dataset to enhance model robustness to query variations. Fine-tuning on these datasets yields significant improvements across benchmarks, demonstrating the impact of targeted training data. REAL-MM-RAG-Bench and our proposed solutions establish a foundation for future research, paving the way for robust and effective retrieval models in real-world multi-modal retrieval scenarios. + +# Limitations + +While REAL-MM-RAG-Bench presents a comprehensive and realistic evaluation framework for multi-modal retrieval, several limitations remain: + +Query Variability: Our queries are generated using a Vision-Language Model (VLM), which, while effective, may not fully capture the full range of plausible user queries. + +LLM and VLM Limitations: Despite the strength of modern Large Language Models (LLMs) and VLMs, our filtering strategies and labeling process remain subject to their limitations. While our human evaluation confirms the effectiveness of our approach, errors in labeling and query selection may still occur. As LLMs and VLMs continue to improve, future benchmarks could leverage more accurate models to refine dataset construction further. + +Multi-Page Reasoning Queries: Our benchmark is designed to best evaluate the retrieval component of Retrieval-Augmented Generation (RAG). While the dataset can be used for the generation step as well, it does not explicitly assess multi-page reasoning. Future work could explore automated query generation that combines multiple pages using LLMs and/or VLMs to construct multi-page reasoning tasks, enhancing the benchmark's ability to evaluate complex retrieval scenarios. + +REAL-MM-RAG-Bench provides a realistic, reliable, and challenging retrieval benchmark, helping to identify critical weaknesses in current multimodal retrieval models and paving the way for future improvements in both evaluation and model development. + +# References + +Pravesh Agrawal, Szymon Antoniak, Emma Bou Hanna, Baptiste Bout, Devendra Chaplot, Jessica Chudnovsky, Diogo Costa, Baudouin De Monicault, Saurabh Garg, Theophile Gervet, et al. 2024. Pixtral 12b. arXiv preprint arXiv:2410.07073. +Peter Bailey, Alistair Moffat, Falk Scholer, and Paul Thomas. 2016. Uqv100: A test collection with query variability. In Proceedings of the 39th International ACM SIGIR conference on Research and Development in Information Retrieval, pages 725-728. +Peter Bailey, Alistair Moffat, Falk Scholer, and Paul Thomas. 2017. Retrieval consistency in the presence of query variations. In Proceedings of the 40th international ACM SIGIR conference on research and development in information retrieval, pages 395-404. + +Rodger Benham, J Shane Culpepper, Luke Gallagher, Xiaolu Lu, and Joel M Mackenzie. 2018. Towards efficient and effective query variant generation. In DESIRES, pages 62-67. +Lucas Beyer, Andreas Steiner, André Susano Pinto, Alexander Kolesnikov, Xiao Wang, Daniel Salz, Maxim Neumann, Ibrahim Alabdulmohsin, Michael Tschannen, Emanuele Bugliarello, et al. 2024. Paligemma: A versatile 3b vlm for transfer. arXiv preprint arXiv:2407.07726. +Jianlv Chen, Shitao Xiao, Peitian Zhang, Kun Luo, Defu Lian, and Zheng Liu. 2024. Bge m3-embedding: Multi-lingual, multi-functionality, multi-granularity text embeddings through self-knowledge distillation. arXiv preprint arXiv:2402.03216. +Jacob Devlin. 2018. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805. +Yihao Ding, Kaixuan Ren, Jiabin Huang, Siwen Luo, and Soyeon Caren Han. 2024. Mvqa: A dataset for multimodal information retrieval in pdf-based visual question answering. arXiv preprint arXiv:2404.12720. +Manuel Faysse, Hugues Sibille, Tony Wu, Bilel Omrani, Gautier Viaud, Céline Hudelot, and Pierre Colombo. 2024. Colpali: Efficient document retrieval with vision language models. arXiv preprint arXiv:2407.01449. +Thibault Formal, Benjamin Piwowarski, and Stéphane Clinchant. 2021. Splade: Sparse lexical and expansion model for first stage ranking. In Proceedings of the 44th International ACM SIGIR Conference on Research and Development in Information Retrieval, pages 2288-2292. +Tim Hagen, Harrison Scells, and Martin Potthast. 2024. Revisiting query variation robustness of transformer models. In *Findings of the Association for Computational Linguistics: EMNLP* 2024, pages 4283-4296. +Pranab Islam, Anand Kannappan, Douwe Kiela, Rebecca Qian, Nino Scherrer, and Bertie Vidgen. 2023. Financebench: A new benchmark for financial question answering. arXiv preprint arXiv:2311.11944. +Albert Q Jiang, Alexandre Sablayrolles, Antoine Roux, Arthur Mensch, Blanche Savary, Chris Bamford, Devendra Singh Chaplot, Diego de las Casas, Emma Bou Hanna, Florian Bressand, et al. 2024. Mixtral of experts. arXiv preprint arXiv:2401.04088. +Vladimir Karpukhin, Barlas Oğuz, Sewon Min, Patrick Lewis, Ledell Wu, Sergey Edunov, Danqi Chen, and Wen-tau Yih. 2020. Dense passage retrieval for open-domain question answering. arXiv preprint arXiv:2004.04906. +Omar Khattab and Matei Zaharia. 2020. Colbert: Efficient and effective passage search via contextualized late interaction over bert. In Proceedings of the 43rd + +International ACM SIGIR conference on research and development in Information Retrieval, pages 39-48. +Patrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich Kuttler, Mike Lewis, Wen-tau Yih, Tim Rocktäschel, et al. 2020. Retrieval-augmented generation for knowledge-intensive nlp tasks. Advances in Neural Information Processing Systems, 33:9459-9474. +Xiaolu Lu, Oren Kurland, J Shane Culpepper, Nick Craswell, and Ofri Rom. 2019. Relevance modeling with multiple query variations. In Proceedings of the 2019 ACM SIGIR International Conference on Theory of Information Retrieval, pages 27-34. +Xueguang Ma, Sheng-Chieh Lin, Minghan Li, Wenhu Chen, and Jimmy Lin. 2024a. Unifying multimodal retrieval via document screenshot embedding. arXiv preprint arXiv:2406.11251. +Yubo Ma, Yuhang Zang, Liangyu Chen, Meiqi Chen, Yizhu Jiao, Xinze Li, Xinyuan Lu, Ziyu Liu, Yan Ma, Xiaoyi Dong, et al. 2024b. Mmlongbench-doc: Benchmarking long-context document understanding with visualizations. arXiv preprint arXiv:2407.01523. +Ahmed Masry, Do Xuan Long, Jia Qing Tan, Shafiq Joty, and Enamul Hoque. 2022. Chartqa: A benchmark for question answering about charts with visual and logical reasoning. arXiv preprint arXiv:2203.10244. +Minesh Mathew, Dimosthenis Karatzas, and CV Jawahar. 2021. Docvqa: A dataset for vqa on document images. In Proceedings of the IEEE/CVF winter conference on applications of computer vision, pages 2200-2209. +Gustavo Penha, Arthur Camara, and Claudia Hauff. 2022. Evaluating the robustness of retrieval pipelines with query variation generators. In European conference on information retrieval, pages 397-412. Springer. +Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. 2021. Learning transferable visual models from natural language supervision. In International conference on machine learning, pages 8748-8763. PMLR. +Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J Liu. 2020. Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of machine learning research, 21(140):1-67. +Rita Ramos, Desmond Elliott, and Bruno Martins. 2023. Retrieval-augmented image captioning. arXiv preprint arXiv:2302.08268. +S Robertson, Steve Walker, Susan Jones, and MHB GATFORD. 1994. Okapi at 3. In Proceedings of the 3rd Text RETrieval Conference (-3), pages 109-126. + +Georgios Sidiropoulos and Evangelos Kanoulas. 2022. Analysing the robustness of dual encoders for dense retrieval against misspellings. In Proceedings of the 45th International ACM SIGIR Conference on Research and Development in Information Retrieval, pages 2132-2136. +Alan F Smeaton and Fergus Kennedy. 1998. User-chosen phrases in interactive query formulation for information retrieval. In 20th Annual BCS-IRSG Colloquium on IR. BCS Learning & Development. +Ray Smith. 2007. An overview of the tesseractOCR engine. In Ninth international conference on document analysis and recognition (ICDAR 2007), volume 2, pages 629-633. IEEE. +Karen Sparck Jones. 1972. A statistical interpretation of term specificity and its application in retrieval. Journal of documentation, 28(1):11-21. +Ryota Tanaka, Kyosuke Nishida, Kosuke Nishida, Taku Hasegawa, Itsumi Saito, and Kuniko Saito. 2023. Slidevqa: A dataset for document visual question answering on multiple images. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 37, pages 13636-13645. +Peng Wang, Shuai Bai, Sinan Tan, Shijie Wang, Zhihao Fan, Jinze Bai, Keqin Chen, Xuejing Liu, Jialin Wang, Wenbin Ge, Yang Fan, Kai Dang, Mengfei Du, Xuancheng Ren, Rui Men, Dayiheng Liu, Chang Zhou, Jingren Zhou, and Junyang Lin. 2024a. Qwen2-vl: Enhancing vision-language model's perception of the world at any resolution. arXiv preprint arXiv:2409.12191. +Peng Wang, Shuai Bai, Sinan Tan, Shijie Wang, Zhihao Fan, Jinze Bai, Keqin Chen, Xuejing Liu, Jialin Wang, Wenbin Ge, et al. 2024b. Qwen2-vl: Enhancing vision-language model's perception of the world at any resolution. arXiv preprint arXiv:2409.12191. +Lee Xiong, Chenyan Xiong, Ye Li, Kwok-Fung Tang, Jialin Liu, Paul Bennett, Junaid Ahmed, and Arnold Overwijk. 2020. Approximate nearest neighbor negative contrastive learning for dense text retrieval. arXiv preprint arXiv:2007.00808. +Shi Yu, Chaoyue Tang, Bokai Xu, Junbo Cui, Junhao Ran, Yukun Yan, Zhenghao Liu, Shuo Wang, Xu Han, Zhiyuan Liu, et al. 2024. Visrag: Vision-based retrieval-augmented generation on multi-modality documents. arXiv preprint arXiv:2410.10594. +Xiaohua Zhai, Basil Mustafa, Alexander Kolesnikov, and Lucas Beyer. 2023. Sigmoid loss for language image pre-training. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 11975-11986. +Xinyi Zheng, Doug Burdick, Lucian Popa, Peter Zhong, and Nancy Xin Ru Wang. 2021. Global table extractor (gte): A framework for joint table identification and cell structure recognition using visual context. Winter Conference for Applications in Computer Vision (WACV). + +Fengbin Zhu, Wenqiang Lei, Fuli Feng, Chao Wang, Haozhou Zhang, and Tat-Seng Chua. 2022. Towards complex document understanding by discrete reasoning. In Proceedings of the 30th ACM International Conference on Multimedia, pages 4857-4866. +Hongyi Zhu, Jia-Hong Huang, Stevan Rudinac, and Evangelos Kanoulas. 2024. Enhancing interactive image retrieval with query rewriting using large language models and vision language models. In Proceedings of the 2024 International Conference on Multimedia Retrieval, pages 978-987. +Guido Zuccon, Joao Palotti, and Allan Hanbury. 2016. Query variations and their effect on comparing information retrieval systems. In Proceedings of the 25th ACM international on conference on information and knowledge management, pages 691-700. + +# A Appendix + +# A.1 Models Evaluation + +Beside the models from ColPali, we have evaluated on text based methods. Following the ColPali framework, we adopt Unstructured as our PDF parser in its high-resolution configuration, which relies on the Tesseract (Smith, 2007) OCR engine. Unstructured processes each document into two main types of chunks: text chunks and visual chunks (e.g., tables, figures, images). We then construct two text-based variants of our benchmark, differing in how visual chunks are converted into text: + +1. OCR: Text is retained; tables, figures, and images undergo OCR extraction. +2. Captioning: Text remains unchanged; visual elements are described using Qwen2.5-VL-72B-Instruct. + +Retrieval Methods. We evaluate two retrieval approaches: + +- Okapi BM25: A sparse statistical baseline. +- BGE-M3 (multi-vector): A state-of-the-art embedding model. + +In line with ColPali, chunks are embedded and scored independently, and page-level scores are then obtained via maximum pooling across all chunks for a given page. + +# A.2 Data Generation, Filtering and Validation + +To construct a high-quality benchmark, we applied a conservative filtering strategy that prioritizes precision over recall—favoring the exclusion of low-quality queries even at the cost of discarding valid ones. Setting a precise confidence threshold for VLMs/LLMs is non-trivial, so we experimented with multiple prompt templates for filtering. For each prompt, we sampled 150 queries, manually labeled them as good or bad, and selected the prompt that minimized the percentage of bad queries that passed the filter. Since the original pool of generated queries was large, our emphasis was on reducing false positives rather than preserving query volume. + +We then manually reviewed queries that passed the filter and added representative errors as negative examples to the prompt context, improving + +robustness through iterative refinement. This process led to fewer recurring mistakes and was validated through human evaluation, where $85.0\%$ of our queries were rated as good compared to $43.6\%$ for ViDoRe. + +Validating label correctness at scale is more challenging, as it would require exhaustively comparing each query to all documents. Instead, we qualitatively inspected queries with known answer pages to tune the labeling prompt. As shown in section 4, our benchmark yields significantly fewer false negatives than competing datasets. + +We also conducted a false positive validation to assess label quality. Specifically, we randomly sampled 200 query-page pairs from each of the three benchmarks: ViDoRe, MMLong, and ours. Annotators were shown the page image alongside its corresponding query and asked whether the page contained an answer to the query. The results show $0\%$ false positives in both our benchmark and ViDoRe, while MMLong exhibited a high false positive rate of $38.1\%$ . These findings highlight the effectiveness of our benchmark generation pipeline in preventing false positive examples. + +# A.3 Proposed Training sets and Fine-tuning + +Rephrasing Augmentation Training. We aimed to fine-tune a trained model with a short training phase to improve robustness to rephrasing. To achieve this, we created a rephrased training set based on the ColPali training data. Specifically, we used approximately half of the full training set (56k queries) and generated rephrased versions. The rephrasing was performed using LLaMA-3-70B, a different LLM than the one used for filtering and rephrasing in the benchmark. + +Each query was randomly rephrased using one of three rephrasing levels (different prompts, see Fig. S6). To ensure semantic consistency, we used a secondary LLM verification step: the original query and its corresponding answer were fed alongside the rephrased query, and if the meaning was not preserved, the original query was retained in the rephrased training set. + +For fine-tuning, we used the full ColPali training set, incorporating the rephrased queries in approximately half of it. The model was trained for one epoch with configurations similar to those used in the original ColPali/ColQwen training. + +Table and Finance-Focused Training. As we observed that current models performed signifi + +cantly worse on our table-heavy finance benchmark, we curated a dedicated training set to address this gap. We leveraged the publicly available FinTabNet dataset, a large-scale resource designed for financial table recognition and structure extraction. FinTabNet consists of pages from annual reports of S&P 500 companies, featuring complex tables. + +We used the page images from FinTabNet to generate queries and answers using our automated pipeline, which includes a filtering process. Additionally, we explored using Qwen2-VL-72B for generating this training data, with results reported in Table S7. This process resulted in approximately 46k triplets of page images, queries, and answers. + +For fine-tuning, we trained both ColPali and ColQwen on our table-focused training data, combined with the original ColPali training set, for one epoch, producing the TabCol models. For RobTab models, we incorporated LLaMA-3-70B for rephrasing, where half of the newly generated training set was randomly rephrased using three different rephrasing levels. These models were then fine-tuned for one epoch, together with the ColPali rephrased dataset. + +All fine-tuning procedures followed the same configurations as the official ColPali training pipeline, utilizing ColBERT in-batch loss. The specific configurations for ColPali and ColQwen can be found at GitHub. Each model was fine-tuned starting from its respective base version: ColPali from ColPali-1.2 and ColQwen from ColQwen2-1.0. We used a batch size of 64 per GPU, resulting in a total effective batch size of 256. The training maintained the same initial learning rate, warmup steps, learning rate schedule, and LoRA configuration as the original pipeline. All training runs were conducted on four A100 80GB GPUs, with each fine-tuning session taking approximately three hours to complete. + +# A.4 Benchmark Document Examples + +Our benchmarks include a diverse set of pages containing different types of information, including full-text pages, table-heavy pages, and slides with both tables and other visual elements. Table S1 presents the benchmark statistics for the different datasets. Additionally, for each page, we provide four types of queries: the original VLM-generated query and three levels of rephrasing. Examples of pages along with all query versions are shown in Figs. S1 and S2. In Fig. S3, we present examples + +from previous benchmarks, highlighting that many of their queries are not well-suited for RAG, as they often reference specific pages (i.e., QA-style queries) rather than general information-seeking queries. + +# A.5 Additional Results and Ablations + +In our main paper, we focused on reporting the NDCG@5 metric for a subset of models and benchmarks across different rephrasing levels. In Tables S2 to S4, we provide the full results for Recall@1, Recall@5, and NDCG@5. Additionally, Table S5 presents model performance across different evidence source types. A Vision-Language Model (VLM), Pixtral-12B, was used to classify each query based on the type of evidence source from which the answer was retrieved on the corresponding page. We analyze performance across three different evidence types: Text, Table, and Visual. The reported results show NDCG@5 scores on the non-rephrased version, averaged across our four benchmarks. These results highlight a significant weakness in handling tables. However, after fine-tuning on the table-focused dataset, we observe improvements across all evidence types, with tables showing the most substantial gains. + +We further provide two ablation experiments. The first, shown in Table S6, aims to demonstrate that the observed improvements after fine-tuning with our proposed datasets are due to the tailored data rather than fine-tuning itself. To verify this, we performed an additional fine-tuning run using the same training set as the RobCol models but without rephrasing, maintaining the exact number of training examples and identical training configurations. + +As seen in the results, ColPali gains some improvement from fine-tuning alone, but the gains are significantly lower compared to fine-tuning with our rephrased training set. This gap is even more pronounced when evaluating on the rephrased benchmark (Level 3). For ColQwen, the baseline fine-tuning without rephrasing leads to a decrease in performance, whereas our fine-tuned models show substantial improvements on rephrased queries, as expected when training with our rephrased dataset. + +The second ablation (see Table S7) aims to show that the improvements from the table-heavy training set are general and not specific to the Vision-Language Model (VLM) used for question generation. To test this, we generated an alternative + +version of the training set using a different VLM, Qwen2-VL-72B-Instruct, and trained models both with and without rephrasing (using LLaMA-3-3-70B). After filtering, the dataset size was slightly smaller—40k examples compared to 46k with Pixtral generation—likely due to Qwen generating more queries that were filtered out. + +While results show a slight decrease in performance compared to using Pixtral-generated data, the fine-tuned models still significantly outperform the base ColPali and ColQwen models. This confirms that the effectiveness of our data is not limited to a specific VLM and that training on a table-heavy dataset remains highly beneficial. + +# A.6 Our Models' Results on ViDoRe V2 + +We report NDCG@5 performance on the newly released ViDoRe V2 benchmark, both before and after fine-tuning. As shown in Table S8, we compare base models (ColPali and ColQwen), models fine-tuned on the rephrased ColPali training set (Rob variants), and models fine-tuned with our table-focused and rephrased training set (RobTab variants). + +Across 4 out 5 English benchmarks, we observe consistent improvements from fine-tuning, with particularly large gains for ColPali-based models. Among all methods, RobTabColQwen achieves the highest average NDCG@5 score, highlighting the effectiveness of our combined rephrasing and table-focused training strategy. + +We further evaluate performance on the multilingual subset of ViDoRe V2 (Table S9). Here, fine-tuning also improves performance over the base models, with an even greater margin between RobTabColQwen and ColQwen. This suggests that rephrasing augmentation enhances the model's ability to capture semantic similarity beyond surface-level token overlap, which is especially beneficial for cross-lingual retrieval. + +Overall, these results demonstrate the generalization ability of our fine-tuned models across both diverse content types and languages. + +# A.7 Licensing and Additional General Information + +All models and datasets used in this work comply with their respective licenses. Qwen2-VL (ColQwen2) is licensed under Apache 2.0, with adapters under MIT. PaliGemma (ColPali) follows the Gemma license, with adapters under MIT. Pixtral-12B-2409 (mistralai) and Mixtral-8x22B + +are both under Apache 2.0, allowing unrestricted use, modification, and distribution. LLaMA 3.3 70B is licensed under the LLaMA 3.3 Community License Agreement. All datasets used are in English. The Colapl training set consists of subsampled academic datasets redistributed under their original licenses. It also includes synthetic datasets generated from publicly available internet data and VLM-generated queries, which are released without usage restrictions. Benchmark datasets are derived from openly available documents and images, with owner approval for publication. Fine-tuning data (Fintabnet) is collected from publicly available sources and processed for compatibility with our models. + +For human evaluation, we published an online form alongside a request for participation in annotating queries for evaluating data intended for publication. Throughout the paper, an AI assistant (ChatGPT) was used for minor grammar and sentence structure edits. + +Table S1: Benchmark Statistics. + +
BenchmarkDocumentsQueriesEvidence Label
# Pages# DocsAvg. Len# QueriesTextTableVisual
FinReport26871914185375%24%1%
FinSlides22806535105212%83%5%
TechReport16741798129481%12%7%
TechSlides19636232135466%6%28%
+ +![](images/4643ef15b61abea884b22741192fc1c9bee5fae19f9b14b360b05e0f8bef2aae.jpg) + +What is the main role of GenAI in the context of IBM Workload Automation? + +![](images/6e21e5f43fc36af4c602381186fa8bc5a14d0aef3de9e02df9102997e626dc61.jpg) + +What is the primary function of GenAI within the framework of IBM Workload Automation? + +![](images/e520f282dba9cbdfeea0970eea9328eb374884c22f42c337055838dfc8ddac4e.jpg) + +How does GenAI function within the framework of IBM Workload Automation, and what primary purpose does it serve? + +![](images/60c1fca5e3b136fdc971d6d28c31f38ff4c3883f51cdb961b516bcc5c7c212dd.jpg) +Figure S1: Real-MM-RAG Benchmark Examples with Rephrasing. On the right: FinSlides—financial quarterly presentations. On the left: TechSlides Technical slides about business and IT automation. Questions are listed from the original query to Level 3 rephrasing. + +How does Generative Artificial Intelligence function as a key component within the framework of IBM's automated workload management systems? + +AI-Driven Workload Optimization with IBM Workload Automation + +The Future of Work: Human-Al Collaboration + +![](images/97b7a7b948048368866da9e6b2de87b3c7b98a80b2f2b882a377cf36f8bff50e.jpg) + +- GenAI is a powerful tool for augmenting automation and enhancing human capabilities. +Human-Al collaboration is the key to unlocking the full potential of GenAl in the workplace. +- By working together, humans and AI can achieve greater efficiency, productivity, and innovation. + +![](images/c72836fb1bdbb54b26d817c25c079916eb211c7683067892699c1467850f8f0e.jpg) + +hat was the total amount of signings for IBM's Global Services in the second quarter of 2012? + +![](images/fe90213199a2818d06e4816557da79824311b133edfe3c578468803c9327ddf0.jpg) + +What was the overall value of contracts for IBM's Global Services in the second quarter of 2012? + +![](images/01f6ddff4069db0e41d1ce2906ae63df7ec697daa4d57d15273ab90df67e0b25.jpg) + +How much were the total contract signings valued for IBM's Global Services division during Q2 of 2017? + +![](images/f5b380fa314db2a75001aaa6bebf9466fc53197e4631fe3992b1c2eed7a70e22.jpg) + +How much was the cumulative value of contracts secured by IBM's Global Services division during the three-month period ending June 30, 2012? + +IBM financial presentation for the second quarter of the year 2012 + +# EM + +# Supplemental Materials + +# Supplemental Segment Information - 2Q 2012 + +
Supplemental Revenue Information
Revenue Growth$ in BillionsBacklog
Global ServicesYr/Yr@ CCGlobal Services2Q12Yr/Yr@ CC
GTS Outsourcing(3%)2%Total Backlog$136($8)$1
Integrated Tech ServicesFlat4%Change in Backlog due to Currency
Maintenance(3%)2%Quarter-to-Quarter($3)
Total GTS(2%)2%Year-to-Year($9)
GBS Outsourcing(5%)(1%)Outsourcing Backlog$88($8)($2)
GBS C&SI(4%)Flat$ in BillionsSignings
Total GBS(4%)(1%)Global Services2Q12Yr/Yr@ CC
Total Outsourcing(3%)1%Outsourcing - GTS O/S, GBS O/S (AMS)$6.8(5%)(1%)
Total Transactional(3%)1%Transactional6.9(3%)1%
Maintenance(3%)2%- ITS, Consulting & AMS SI(incl. US Federal)
Total Signings$13.7(4%)Flat
+ +Note: Actual backlog calculated using June 30 currency spot rates + +# www.ibm.com/investor + +What types of benefits are provided under the Non-U.S. Retirement Plan at IBM? + +-- + +# + +# + +· + +-- + +- - - + +-- + +-- + +-- + +一 + +-- + +-- + +-- + +一 + +# + +-- + +-- + +![](images/43cf19c8690af9e3b79287350d5fee7677ed02d6e7c75a0d2fb87d2e628c537d.jpg) + +-- + +![](images/d04698922d7766a8d7a8a6745820d603f7a0027f20f87c7b11d362bd90952f7f.jpg) + +·一 + +![](images/fc9a57fa7c6133d8efaa3d3bc80af67bd5b58599ea89ae54c33cf0af2d355bab.jpg) + +-- + +![](images/32321ed66b51b4ab4b09f827e5ad35f495eb45b0f3b2365a69a919e624aa0d96.jpg) + +# + +![](images/d1a7916854b4242de39170984cfb613dcdb3b9794081966cbb5d78acd35d992a.jpg) + +一 + +![](images/c6b3cbcc72b7b5ea903c4f37d87aebb50d6788e99296a55fef10ea3f157a72f3.jpg) + +-- + +![](images/51527c12eb38ab5c7e7e0db37fdb57e51fce08bcbc36f053887fbf81e75708c8.jpg) + +-- + +![](images/ec1ac965621b836d9e39995611e19d1a98fa37182a504fbfc0fb2ca8f4f917de.jpg) + +# + +![](images/8f507547264f691eede9877d6368ac0382ca556819cd1b8ac6d38dd35bd1ac7f.jpg) + +·一 + +![](images/a554812dcd509541719176982c84187e51d2dd863c32550c346268f2922b23ff.jpg) + +-- + +![](images/7385311528c37bc59e628a56218fba43f1dd4ca22d715a4e834d8384790e3f8b.jpg) + +-- + +![](images/733e214f4ae399f628e8dc1e10134a18873b0ef7cf6d69e2ebb79e41b1c10930.jpg) + +-- + +![](images/f93fbdd9795fe7d3b9c7ee76710fbc84495cbf8adb2f9b6a00a67c3c08e7f36e.jpg) + +# + +![](images/45d701721c60490e0698741d6d49806fc78504eeb5942d9e747857d371e8f2ca.jpg) + +at are the + +sp + +ecif + +c b + +ene + +fits + +inc + +ude + +d in + +# + +M's + +non + +-Us + +![](images/0c118aca81c71bdf1cd0f4a997ce452ccf1fa35268d850c883d86c16f3228170.jpg) + +![](images/0dbb48b693aa5f54febd45ccd93b50e56d73d91a863eb8bef62aa8f6f49a3192.jpg) + +![](images/ddb3632bff30162f31752e855f79921bc4797f6adec95ec84896078d47642712.jpg) + +![](images/271a3234914f470b6a134fbdb4aa7adc23890d182a36c9614b13b17f984322a9.jpg) + +![](images/97b0f23646769c4c1fc18ae6f0cd88c579a34595b59ab74dabb0f5aa4ada73af.jpg) + +![](images/9d14eb0ba471a0d17c346f2463fd3a6076f3a91bdde618a85682aa8ce89ff559.jpg) + +![](images/b4c8b4a13c90f71a258996a871a9d386f675f237766aa29d79ed31869251fbab.jpg) + +![](images/1cbcf79b1a05a49f4bd68b0511e0f3c6c62eb0ff6c54508b73728fd386d54342.jpg) + +![](images/1c135e8579c2ed2d1b970254d44af1ae33a22331efcb1a27c9b584e925e7452a.jpg) + +![](images/df737fb63e652c9aab9c339ed294bb6c48b94d1b51cddeb9385ca4321bc182af.jpg) + +![](images/d0e491e38adc3caf0dfdd8916f37810e65a49031182bafb6463772a4f94fba4f.jpg) +Figure S2: Real-MM-RAG Benchmark Examples with Rephrasing. Left: FinReport—financial annual reports. + +![](images/63ee0bc48535fd5546f5dbc88e1fd2fde6edabc115bb65134238c99a14cd4e2d.jpg) + +![](images/21b00b9e722e856d3c45094abd5b5f6d12841478920803a309fbac7b4fd1a15d.jpg) + +![](images/298ada5fc87148112353f6030c930fc0b56ac20ac54927401c1248e25efac980.jpg) + +age rto + +s on it's + +pepa + +ks da ticipa + +es lents + +BM? + +s n + +n-L + +S re + +tine + +men + +nt + +![](images/3b259dd6cffa2e5ab017d377103923e9e88be0d13c26b8864429d91b4593dd93.jpg) + +![](images/494153ff76f5523a9ca73dc13ffe793441d0d3d22bf1eac968476d19f58c8213.jpg) + +![](images/ff05d3be300857ab35b9384fa9d0bc13785a4ce96c2b28fd6bb75a8c80e52bc0.jpg) + +![](images/dee3f30baa2c4a12a96937dcd7c072ea5e819a5cd40ce6eaa2a81f77ccc854dc.jpg) + +![](images/d10f1bea839de48403bd84e02bb0e71423bb5b565344a2b5d833a0466721ee8f.jpg) + +![](images/b4b750e63f22e7a52191c875be4354602377af7137a0060619540b4bcbb13705.jpg) + +![](images/e293cceb5b00234a439a8ce11b55d51f4a0cece93fae4e7ffa476793239ce873.jpg) + +![](images/56ecc2c5c2f70a605e7bde922057e288a0c1b1c5504702c1a11f95cb857b85fa.jpg) + +![](images/825f83eca9df543752e9fa091b515086775200b19b88969409554e73a11863dc.jpg) + +![](images/3a1af4ea4db04173fe786ac97d58865d40a5622d07e8f059679859aef14fabbf.jpg) + +![](images/e5883bef09d562a9ce71b49dee119005aa73644960d1c0d648bfbd74812da304.jpg) + +![](images/67ce60087ba8ded6eff517852702501f494d0fd212c39c483c402c78d7fe788d.jpg) + +![](images/0219fce7524a4ac17735a3e17798f285f5528960bf2a4263a0b27b9ce60ddcc0.jpg) + +![](images/18f44f779e1c9d9ea7f63a378c8533f13a6ac9cc9297f41348fc76b5c8bb3ecc.jpg) + +![](images/e5152fb6a2a6fc02f9f63add22a7c05117002c65817d15c7de2c578aeaa9506a.jpg) + +![](images/145ab98cfc019f6729c69fe87598682c60c3aa3f35bc0a13ddc859aedd80aafe.jpg) + +![](images/8919a1760e09c8a28ea24045656e3bcb5b919e4b4f3f8085292df7241b1bcbd8.jpg) + +![](images/fdc9c4636fa02ccb4b84ef890af752ddbcc5c06572b35ea95c6db3592d4b62cc.jpg) + +![](images/9216d967ea59729ece6140eda97430014882de98611edf2cfe06158b722f3727.jpg) + +![](images/a8fa005cf2e12708ccb31ed07578f8ae18094669b72d4c3e8e86ba2b915553a8.jpg) + +![](images/5f0e343bed199f2cffa920a506552e8cc606cffcba396ad63fd150545564e3b4.jpg) + +![](images/69b3695def4d4728c0223f70ebe8a17209973b094c0fb1d4094ea1ca3b63504a.jpg) + +![](images/be727f8b1dfd5f361f5a72aaf2d841f5f5dd2c9103750069b449bdad9861145f.jpg) + +![](images/113cfb9968ee586a4c1bc4e191205afcf8fc13c7e5ed26c2a800a0436ab3ac4c.jpg) + +![](images/b88d074847c51ea981651ce84c4fc131ea3fc729b561ed665d177c1660039c21.jpg) + +![](images/8851770a550081ebf4dae098e32de066dcb8f6ec65d31a3c7adafaf660231048.jpg) + +![](images/5a4f87fa71ee549eae830cb9c42b6831c9f7b7a06160a88521257be2cfc97291.jpg) + +![](images/3a95a65b7c1c8405297e6cdcdeaea293e49dc145fe6f2d562d4edef1b9b1a4d5.jpg) + +![](images/3a1e1ecfbc3f60df94c1fee7a76ef85650dec52e99e89f1d4b7a1afc70226954.jpg) + +![](images/f1152023e4be6cde87b9236f8b45337c714470c32849edb51acdd229525ae213.jpg) + +# Financial Report of the company IBM on 2019 + +Notes to Consolidated Financial Statements +International Business Machines Corporation and Subsidiary Companies + +NOTE V. RETIREMENT-RELATED BENEFITS + +Description of Plans +IBM sponsors the following retirement-related plans/benefits: + +
PlanEligibilityFundingBenefit CalculationOther
U.S. Defined Benefit (DE) Pension PlansQualified Personal Pension Plan (PPP)U.S. regular, full-time and part-time employees to exceed prior to January 1, 2005Company contributes to irrevocable trust fund, held for sole benefit prior to January 1, 2005Vary based on the participant:Five-year, final pay formula based on salary, years of service, mortality and other participant-specific factorsCash balance formula based on percentage of employees' annual salary, as well as an interest crediting rateBenefit accruals ceased December 31, 2007
Excess Personal Pension Plan (PPP)Unfunded, provides benefits in excess of IRS limitations for qualified plans
Supplemental Executive Retention Plan (Retention Plan)Eligible U.S. executivesUnfundedBased on average earnings, years of service and age at termination of employment
U.S. Defined Contribution (DC) Plans(1)401(k) PlusU.S. regular, full-time and part-time employeesAll contributions are made in cash and invested in accordance with participants' investment electionsDollar-for-dollar match, generally 5 or 6 percent of eligible compensation and automatic matching of 1, 2 or 4 percent of eligible compensation, depending on date of hireEmployees generally receive contributions after one year of service
Excess 401(k) PlusU.S. employees whose eligible compensation is expected to exceed IRS compensation limit for qualified plansUnfunded, non-qualified amounts deferred are record-keeping (notional) accounts and are not held in trust for the participants, but may be invested in accordance with participants' investment elections (under the 401(k) Plus Plan options)Company match and automatic contributions (at the same rate under 401(k) Plus Plan) on eligible compensation deferred and on compensation earned in excess of the IRC pay limit. The percentage varies depending on eligibility and years of serviceEmployees generally receive contributions after one year of service. Amounts deferred into the Plan, including company contributions, are recorded as liabilities
U.S. Nonpension Postretirement Benefit PlanNonpension Postretirement PlanMedical and dental benefits for eligible U.S. retirees and eligible dependents, as well as life insurance for eligible U.S. retireesCompany contributes to irrevocable trust fund, held for the sole benefit of participants and beneficiariesVaries based on plan design formulas and eligibility requirementsSince January 1, 2004, new hires are not eligible for these benefits
Non-U.S. PlansDB or DCEligible regular employees in certain non-U.S. subsidiaries or branchesCompany deposits funds under various fiduciary-type arrangements, purchases annuities under group contracts or provides reserves for these plansBased either on years of service and the employee's compensation (generally during a fixed number of years immediately before retirement) or on annual creditsIn certain countries, benefit accruals have ceased and/or have been closed to new hires as of various dates
Nonpension Postretirement PlanMedical and dental benefits for eligible non-U.S. retirees and eligible dependents, as well as life insurance for certain eligible non-U.S. retireesPrimarily unfunded except for a few select countries where the company contributes to irrevocable trust funds, held for the sole benefit of participants and beneficiariesVaries based on plan design formulas and eligibility requirements by countryMost non-U.S. retirees are covered by local government sponsored and administered programs
+ +[13] Matching and automatic contributions are made once at the end of the year for employees that are employed as of December 15 of the plan year. Contributions may be made for certain types of separations that occur prior to December 15. + +What types of adapters are supported in the new release of IBM Storage Virtualize v8.6? + +![](images/f983e21b745b4d30190866da36b9141f72bda8c53155b827eca6435c2f4e3570.jpg) + +![](images/753c6096adf82fba9f7c2b231d7aab665f5c7e4e653c370a1cdb02792dd165dc.jpg) + +![](images/9376ed09670bedabe9b5f9f07a5a30000f65153e2d3f1d743ef01940614bea0b.jpg) + +![](images/94ea8aede18594a83144973374bd93274252be961fc27e93add08e911e9c1604.jpg) + +![](images/3abca5d23734fa11d3ecb80943a8f76d4dbe47dc626c2a2abe254b31ed814e1c.jpg) + +![](images/f9c5197772ec22a8bad3cd4440be4cb8f991400dfc1806b3b27a475a8931bdf2.jpg) + +![](images/c9195f9cffdd6816724aae0e4dcaf93f210a0980dcb0be654d831ced7b731fe8.jpg) + +![](images/dfdce6c6d5a46aa73c68748d1025b2db5bf5b23ed1ddb45a52166b290725f094.jpg) + +![](images/3c2287d1542e6e96f3c50b317c3e95d67caac766c81b0abcdde7093426e57f5e.jpg) + +![](images/d89026a33d4481e62fdae75a146abce157af5f8299996fdca8da9bf3a119524d.jpg) + +![](images/aa197f48deb8af7df798cd96d424ac5bd528388e56280ebc344e8116abf0fc77.jpg) + +![](images/2ca6f24003b0dbd066f663c11098d3ae32346bc31c55c3fc883e77df6c437f42.jpg) + +![](images/5162640164f84e7d1f21a09d6c626151b66bdd93517ee69aa5538cf4e4efafa8.jpg) + +![](images/41eaf2cb851a84597dc6d0c06780ca159dc4da91f53482cfcd9173c287244f6a.jpg) + +![](images/a4773c4762830a5be720db7e07c189782df00c3f979b893547f7cf313c3f809c.jpg) + +![](images/344e807fa949199cb0746cf587ecde5844715daaff7246e9926218d0f644eb9b.jpg) + +![](images/de4c85a67ee9bfca4b779d19def295639705fa8e7b8a6fb90dd051e160f29373.jpg) + +![](images/cf61435d30428e60758cd50aaafe4b35b1c0bbf8f5cf61beb177117c20ce4033.jpg) + +![](images/fc0bdc34403685d68bd75fe2444f5035bbf79aa31676121dacbc5426cd9583aa.jpg) + +![](images/1b356b604b55ad6c4f6a459f47abcd3e8b80307115ec0394710b25d6585a969b.jpg) + +![](images/e1eb1406c12dadd13a73dceca08fbc6c6d5677d4afe1a34c3ff108dc19643537.jpg) + +![](images/66ec29b07402c31f43412b78881628561d5714dfd07de72ece99a89467030600.jpg) + +![](images/1290d324433f9bd9bb074cedec17315be897759da3744b5a5e8a2ee41650a1d3.jpg) + +![](images/069d6729a71cea45993fc254e4cfca2c958cbc8509d9d61d7dbca5eff69497ac.jpg) + +![](images/a369673f1260694e6a69bd23598238e2d3996a8d13d43281818f86639c97c1fa.jpg) + +![](images/2808cdde3471e8a4553c433abe93387732c3af5e1d2a3e1b9ca35224f2289003.jpg) + +![](images/5728d67ff22928ab72fc5a6ea42a6bb247e24d2a6e746f60e5f86ec5105ce214.jpg) + +![](images/7a0f14520275830b10cf0743fd0565914ba518b48ca21b23e370be202ba64cc2.jpg) + +# IBM Storage FlashSystem 9500 Product Guide for IBM Storage Virtualize 8.6 + +![](images/54dfd4794e0fb7ad1fd41d013d48fa52c9c3eb219dfa187d4ce0f8e14a75a22b.jpg) + +# IBM Storage FlashSystem 9500 Product Guide + +This IBM Redpaper® Product Guide describes the IBM Storage FlashSystem® 9500 (IBM FlashSystem 9500) solution, which is a next-generation IBM Storage FlashSystem control enclosure. It combines the performance of flash and a Non-Volatile Memory Express (NVMe)-optimized architecture with the reliability and innovation of IBM FlashCore® technology and the rich feature set and high availability (HA) of IBM Storage Virtualse. +Often, applications exist that are foundational to the operations and success of an enterprise. These applications might function as prime revenue generators, guide or control important tasks, or provide crucial business intelligence, among many other jobs. Whatever their purpose, they are mission critical to the organization. They demand the highest levels of performance, functionality, security, and availability. They must also be protected against cyberattacks. +To support such mission-critical applications, enterprises of all types and sizes turn to the IBM FlashSystem 9500. +IBM FlashSystem 9500 provides a rich set of software-defined storage (SDS) features that are delivered by IBM Storage Virtualse, including the following examples: +Data reduction and dedduplication +Dynamic tiering +Thin-provisioning +Snapshots +Cloning +Replication and data copy services +Cyber resilience +Transparent cloud tiering +IBM HyperSwap® including 3-site replication for HA +- Scale-out and scale-up configurations that further enhance capacity and throughput for better availability + +With the release of IBM Storage Virtualize V8.6, extra functions and features are available, including support for new third-generation IBM FlashCore Modules NVMe-type drives within the control enclosure, and 100 Gbps Ethernet adapters that provide NVMe Remote Direct Memory Access (RDMA) options. New software features include GUI enhancements, Fibre Channel (FC) portsets, and security enhancements that include multifactor authentication (MFA) and single sign-on (SSO). + +Copyright IBM Corp. 2023. All rights reserved. + +ibm.com/redbooks + +1 + +Right: TechReport—FlashSystem technical reports. Queries are listed from the original to Level 3 rephrasing. + +# ViDoRe / infovqa + +How many infrastructure in this diagram are new? + +![](images/b5484aafc70c891baff976a4767c8446040474b3819b9ef749a297f280a3e7ee.jpg) + +# SlidesVQA + +Where is this market research based on? + +# MMLongBench + +What does the map in the report shows? + +![](images/596b6fd276754fce8289e3739e1e7cc00715538952d9d5bebc77b8e3cc37230f.jpg) + +![](images/6db6cb4cf12a93f73af6480789c2ea2e565ce47581387fa3671176f31658f337.jpg) +Figure S3: Examples from Previous Benchmarks. These examples illustrate common query types in these benchmarks. Many queries are generated for question answering and refer to a specific page rather than resembling real user queries, which are typically asked without prior knowledge of a specific page. + +Table S2: Impact of Rephrasing Levels on Document Retrieval Benchmarks. This table shows NDCG@5 performance variations across rephrasing levels (0-3) for different benchmarks and models. + +
Rephrasing LevelFinReportFinSlidesTechReportTechSlides
0123012301230123
BM25 (OCR)48.838.426.621.713.613.07.15.966.648.038.735.158.745.735.731.2
BGE-M3 (OCR)47.240.337.636.516.916.314.611.444.740.937.837.060.556.351.949.6
BM25 (Captioning)54.443.030.625.320.919.011.09.969.050.841.837.266.453.441.736.1
BGE-M3 (Captioning)46.439.036.935.919.518.716.313.844.640.938.437.562.658.354.551.7
ColPali52.747.240.836.862.259.437.627.680.672.966.562.089.785.079.275.8
RobColPali59.357.451.447.176.875.158.348.480.174.770.066.690.588.284.282.8
TabColPali70.563.556.450.574.570.754.241.582.773.866.861.390.886.580.477.6
RobTabColPali71.068.565.063.280.979.568.058.380.876.272.670.790.587.184.383.3
ColQwen60.854.546.741.859.354.839.131.184.274.971.866.991.385.980.678.1
RobColQwen58.454.549.747.565.863.052.044.381.975.471.869.590.187.884.083.0
TabColQwen78.269.061.554.077.173.958.149.683.675.170.865.992.487.782.578.9
RobTabColQwen79.774.869.467.179.678.569.161.683.779.375.573.292.589.986.385.0
+ +Table S3: Impact of Rephrasing Levels on Document Retrieval Benchmarks (Recall@1). This table shows Recall@1 performance variations across rephrasing levels (0-3) for different benchmarks and models. + +
Rephrasing LevelFinReportFinSlidesTechReportTechSlides
0123012301230123
BM25 (OCR)33.925.417.114.07.77.53.73.053.434.126.123.145.933.425.421.3
BGE-M3 (OCR)34.028.625.825.011.09.59.37.234.431.228.627.848.644.240.037.7
BM25 (Captioning)40.128.019.817.512.210.96.25.756.236.828.824.654.040.831.025.2
BGE-M3 (Captioning)33.427.725.125.312.511.59.68.934.731.128.827.750.945.841.840.1
ColPali40.335.429.125.945.641.623.315.568.157.651.545.882.475.368.463.5
RobColPali44.442.136.532.060.457.439.830.468.060.253.851.282.879.774.173.1
TabColPali55.150.340.936.055.952.035.022.870.358.850.344.883.977.869.466.5
RobTabColPali56.553.949.448.464.061.748.435.867.961.257.454.383.478.475.273.1
ColQwen44.039.632.628.544.740.826.718.773.060.156.551.484.277.470.366.5
RobColQwen41.437.734.833.149.146.637.229.368.560.456.154.283.379.574.672.1
TabColQwen62.753.244.937.558.755.941.233.171.059.854.949.785.978.671.166.9
RobTabColQwen58.152.550.245.862.260.751.441.870.362.259.056.385.080.976.074.9
+ +Table S4: Impact of Rephrasing Levels on Document Retrieval Benchmarks (Recall@5). This table shows Recall@5 performance variations across rephrasing levels (0-3) for different benchmarks and models. + +
FinReportFinSlidesTechReportTechSlides
Rephrasing Level0123012301230123
BM25 (OCR)62.049.935.329.019.718.610.48.777.659.850.045.970.357.145.240.6
BGE-M3 (OCR)58.450.547.647.022.922.819.815.653.549.245.745.270.666.562.360.2
BM25 (Captioning)66.956.340.432.529.427.215.513.879.763.553.549.077.264.851.346.1
BGE-M3 (Captioning)57.048.846.745.525.925.122.718.352.949.346.646.272.668.865.762.0
ColPali64.057.851.747.076.974.750.438.790.785.779.476.195.292.487.885.7
RobColPali73.071.364.760.690.689.874.164.489.886.583.779.596.194.491.990.1
TabColPali83.875.570.163.390.387.171.758.392.786.080.775.196.093.288.986.7
RobTabColPali83.180.878.076.095.094.285.077.791.288.585.184.395.693.791.291.3
ColQwen75.368.059.654.071.866.850.342.593.186.884.579.796.492.388.987.4
RobColQwen73.069.563.060.779.876.565.657.892.687.984.882.795.194.191.391.4
TabColQwen90.782.675.568.092.488.772.864.393.387.283.879.697.294.791.388.6
RobTabColQwen86.380.176.874.492.592.182.076.292.688.886.484.796.995.393.392.6
+ +Table S5: Model Performance Across Different Evidence Source Types A Vision-Language Model (VLM) was used to classify each query based on the type of evidence source from which the answer was retrieved on the corresponding page. We present the division of performance across three different source types: Text, Table, and Visual. The reported results are the NDCG@5 scores on the non-rephrased version, averaged across our four benchmarks. + +
BenchmarkTextTablesVisual
ColPali75.858.684.5
ColQwen79.259.986.8
TabColQwen84.578.588.5
+ +Table S6: Ablation of Fine-Tuning Without Rephrasing. To demonstrate that the performance improvement is not solely due to fine-tuning, we fine-tune the models on the original ColPali dataset without rephrasing, using the exact same fine-tuning configuration. + +
Rephrasing LevelFinReportFinSlidesTechReportTechSlides
03030303
ColPali52.734.562.227.680.662.089.775.8
ColPali Baseline FT57.139.169.135.780.061.490.077.8
RobColPali59.347.176.848.480.166.690.583.3
ColQwen60.841.859.331.184.266.991.378.1
ColQwen Baseline FT58.139.353.427.679.762.190.577.4
RobColQwen58.447.565.844.381.969.590.183.0
+ +Table S7: Comparison of different queries generation models. This table compares the NDCG5 performance of the ColQwen model fine-tuned with the original data of ColPali and our generated table-focused data from the FinTabNet dataset. The evaluation is conducted for two query generation approaches: one using Pixtral and the other using Qwen. The rephrasing for the benchmarks was performed using LLaMA-3-3-70B. Results are presented across rephrasing levels (0 and 3) for our retrieval benchmarks. + +
Rephrasing LevelFinReportFinSlidesTechReportTechSlides
03030303
ColPali52.734.562.227.680.662.089.775.8
ColQwen60.841.859.331.184.266.991.378.1
ColTab (Pixtral Queries Gen.)78.254.077.149.683.665.992.478.9
ColTab (Qwen Queries Gen.)74.849.574.341.583.866.892.679.5
ColRobTab (Pixtral Queries Gen.)79.767.179.661.683.773.292.585.0
ColRobTab (Qwen Queries Gen.)73.561.178.960.082.871.891.884.7
+ +You are given a single page from a document. This page may contain text, figures, tables, and diagrams. The document is about {Document_short_description}. Make sure to mention the company or product name when the question pertains to specific information about it. + +Your task is to produce 10 question-answer pairs. Each question should represent a plausible inquiry that a person (who has not seen the page) might ask about the information uniquely presented on this page. The questions should not reference this specific page directly (by page number, pointing to a specific paragraph or figure, and never refer to the document using phrases like 'in the document'), nor should they quote the text verbatim. They should use natural language reflecting how someone might inquire about the page's content without direct access. + +Please focus mainly on tables and figures rather than just text. Try to formulate questions that require data from multiple locations on the page. The answer should be uniquely supported by the content of this page (i.e., the user could not find the answer elsewhere in the report or infer it without seeing this particular page). Ensure that the questions are not too general. For example, refer to the company name instead of using "the company" generically, as different documents may refer to different companies. + +Good questions: +What types of properties does Wihlborgs specialize in? +How many women are in Wihlborgs' group management? +What was the occupancy rate of Wihlborg properties in 2021? +Was the net letting positive in the first quarter of 2022? +Which key factor contributed the most to the change in property value in 2022? +What's the difference in the number of properties in South Copenhagen between 2021 and 2022? +What is the proportion of women on the board of directors? +How many dividends were paid in 2020 in total equity? +What portion of Wihlborg's sponsorship in 2018 was community-oriented? + +Bad questions: +What is the title of the page? +What is the main purpose of this page? +What can you learn from the figure? +What is the name of the CEO mentioned in the document? +What is IBM's clear path to growth according to the document? +What is the basic earnings per share for 2023? + +Make sure to include references to the company and product names when needed. +Output format: +Return as a list of objects: +{ {"query": "...", "answer": "...}}, { "query": "...", "answer": "...}}, { "query": "...", "answer": "...}}, { "query": "...", "answer": "...}}, { "query": "...", "answer": "..."} ] + +Figure S4: Query Generation Prompt + +You have a large collection of document pages. Your goal is to determine, for each incoming question, whether that question would be suitable for retrieving a specific page from this collection. Classify each question into one of two categories: + +# Category #A: + +A plausible inquiry about the unique information on a page, posed as though the reader does not have direct access to that page. The question does NOT explicitly reference the page number, figure label, or phrases like "in the document" or "on page X." Instead, it uses natural language to reflect how someone would genuinely ask about the content. + +# Category #B: + +Any question that explicitly references the page, figure, table, or paragraph (e.g., "on page 3," "in figure 2," "in the document"). Or is too vague (e.g., "What is the name of the company?" without context). Or otherwise, does not provide enough context to be meaningfully answered from a single page. + +# Below are examples for both categories: + +"Which climate factors had the greatest impact on ABC Farming's wheat yield in 2022?" # A +"How are topic scores calculated for each topical subset in the processing step S265?" # B +"How many corporate partners joined Apple Inc.'s technology incubator program last year?" # A +"Can you show me the figure on page 12 that references the new regulation?" # B +"Which strategic moves led to a $15\%$ revenue increase for Toyota in Q2 2022?" # A +"List the bullet points mentioned in the second paragraph." # B +"What percentage of employees in Google's marketing department are working remotely?" # A +"What is the heading of Table 2 in the document?" # B +"How has the demand for Tesla's electric vehicles changed over the past five years, based on the company's data?" # A +"Who is labeled as the second co-author on page 7?" # B +"By how many degrees did the average global temperature rise according to NASA's 2020-2022 research?" # A +"Which lines in the document discuss the formula for carbon emissions?" # B +"Why did the organization decide to shift to renewable energy solutions?" # B (No specific organization) +"Which historical events contributed most to the British government's policy reforms in 1985?" # A +"How many employees does the company have?" # B (Too vague; no company mentioned) +"Did Walmart notice any major changes in consumer spending habits in Q4 2021?" # A +"What is the official job title of the lead manager in charge?" # B (Unclear which manager or context) +"Which country introduced new tax incentives for renewable energy projects in 2022, according to the IEA's annual report?" # A +"Could you summarize the entire document for me?" # B (Overly broad; not tied to specific info) + +When I give you a question, you should respond with ONLY 'A' or 'B'. + +Figure S5: Query Verification Prompt + +# Rephrasing Level 1 + +```python +""Your task is to rephrase questions by changing only a few words without altering the sentence structure while maintaining the same intent and focus. Question: {"query}" Write only the rephrased question.""" +``` + +# Rephrasing Level 2 + +```txt +""You are an expert at rephrasing questions while retaining their meaning. +Your task is to rewrite the following question using different words, maintaining the same intent and focus: Question:"{\query}" +Write only the Rephrased Question. "" +``` + +# Rephrasing Level 3 + +```python +""You are an expert at rephrasing questions while retaining their meaning. +Your task is to significantly rewrite the following question using different words and sentence order, +maintaining the same intent and focus while changing a lot: +Question:"{query}" +Write only the Rephrased Question.""" +``` + +# Rephrasing Verification + +```txt +You are given an original query, its rephrased version, and the answer. Verify if the rephrased query maintains the same intent and focus as the original query. If the rephrased query is correct, answer "Yes." If not, answer "No." Original Query: {"original_query}" Rephrased Query: {"rephrased_query"} Answer: {"answer"} Response: "" +``` + +Figure S6: Rephrasing Generation and Verification Prompts + +```txt +Classify each question as bad or good based on those definitions: +Category Good +- Written as a genuine information-seeking question. +- Natural language inquiry about specific information.. +- Includes proper context (company names, years, etc.) +- Avoids references to document structure +Category Bad Explicitly references page numbers, figures, or document parts +- Too vague or missing crucial context +Asks about generic document properties Example of Good:"How many corporate partners joined Apple Inc.'s technology incubator program in 2023?" Example of Bad:"What is the heading of Table 2 in the document?" +``` + +Figure S7: Human Evaluation of Query Alignment to RAG. This figure shows the instructions presented to human annotators along with randomly sampled queries from different benchmarks. + +You are given a document page and a query. Determine if the query can be perfectly answered by the information in the document. +Query: What was the year-over-year change in the Gross Margin for IBM's Global Business Services Segment in the third quarter of 2018? + +IBM financial presentation for the third quarter of the year 2019 + +![](images/ff651ca7c02fb2e17d083acd1f86fe58f6f8d538a564076037365f2c3516f994.jpg) + +# Global Business Services Segment + +8 + +Revenue growth driven by application modernization for the cloud and next-generation enterprise apps +Early progress with Red Hat with over 20 deals signed in 3Q19 +Gross margin expansion reflects shift to higher value, leveraging global delivery footprint and productivity actions + +
Segment Results OverviewB/(W)
Segment3Q19Yr/Yr
Revenue (External)$4.12%
Gross Profit Margin (External)31.1%1.1 pts
Pre-Tax Income$0.61%
Pre-Tax Income Margin13.7%0.1 pts
Cloud Revenue$1.310%
+ +Revenue growth rates @CC, $ in billions + +![](images/03bc2b1f7071cd8e936946271b6141a3b7cea80108a41ba6262d446112d10b0a.jpg) + +![](images/7998eda117d3f543f96b0d33347d108dfef9a9a616ac4adf6c349d065258bdd0.jpg) +Figure S8: Human Evaluation of False Negatives. This figure presents an example of the image shown to human annotators, including the instructions, the query, and the negative page retrieved for the given query using ColQwen. The query and page are from our FinSlides benchmark and illustrate a case where the model incorrectly retrieved the wrong year. + +Table S8: ViDoRe V2 Results (English Benchmarks). This table presents NDCG@5 scores for each domain and the overall average on the newly released ViDoRe V2 benchmark. + +
ModelBiomedicalMacroeconomicsRestaurant (RSE)Restaurant (ESG)Insurance (AXA)Avg
ColPali59.151.450.057.953.254.3
RobColPali59.557.558.466.565.061.4
RobTabColPali61.060.355.364.660.060.2
ColQwen61.161.555.863.065.361.3
RobColQwen61.057.060.662.067.261.6
RobTabColQwen62.156.561.766.069.763.2
+ +Table S9: ViDoRe V2 Results (Multilingual Benchmarks). This table presents NDCG@5 scores for each domain and the overall average on the multilingual subset of the newly released ViDoRe V2 benchmark. + +
ModelBiomedicalMacroeconomicsRestaurant (RSE)Insurance (AXA)Avg
ColPali55.947.252.547.450.8
RobColPali58.453.257.957.556.8
RobTabColPali57.755.054.854.455.5
ColQwen56.352.856.956.555.6
RobColQwen58.353.060.659.157.8
RobTabColQwen59.155.160.261.859.1
\ No newline at end of file diff --git a/realmmragarealworldmultimodalretrievalbenchmark/images.zip b/realmmragarealworldmultimodalretrievalbenchmark/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..46c82ab555a94507934fdf617bf0b6691df366f0 --- /dev/null +++ b/realmmragarealworldmultimodalretrievalbenchmark/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bda1b3154206df4908ed22a923164d866944a53cd52d7ab7ecc3c491eae91caf +size 1083502 diff --git a/realmmragarealworldmultimodalretrievalbenchmark/layout.json b/realmmragarealworldmultimodalretrievalbenchmark/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..50471b5b5fffd05209eaa8b92aba1b71795a43b8 --- /dev/null +++ b/realmmragarealworldmultimodalretrievalbenchmark/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7c32f31babf533cd21481ec9e20182f137c2e8d2819fc993db00ab2b8a684ef4 +size 830840 diff --git a/realtimefactualityassessmentfromadversarialfeedback/d8a64c04-af4d-43bb-8eab-c5fd8eb3e396_content_list.json b/realtimefactualityassessmentfromadversarialfeedback/d8a64c04-af4d-43bb-8eab-c5fd8eb3e396_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..c255b26c78cd183ff2ceff5905d028b5dc7020ed --- /dev/null +++ b/realtimefactualityassessmentfromadversarialfeedback/d8a64c04-af4d-43bb-8eab-c5fd8eb3e396_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:81dbff456d25e5deef65bee726cd8b274f5615eeeaec4d425670b2de1107c8a9 +size 131799 diff --git a/realtimefactualityassessmentfromadversarialfeedback/d8a64c04-af4d-43bb-8eab-c5fd8eb3e396_model.json b/realtimefactualityassessmentfromadversarialfeedback/d8a64c04-af4d-43bb-8eab-c5fd8eb3e396_model.json new file mode 100644 index 0000000000000000000000000000000000000000..140ff778f3416b464d9acc0edb01e27ec521e073 --- /dev/null +++ b/realtimefactualityassessmentfromadversarialfeedback/d8a64c04-af4d-43bb-8eab-c5fd8eb3e396_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:39c276e418e31a24cb568c0c12171d6c45b4fb818f92423c1e9fc7a3ad5088b1 +size 156339 diff --git a/realtimefactualityassessmentfromadversarialfeedback/d8a64c04-af4d-43bb-8eab-c5fd8eb3e396_origin.pdf b/realtimefactualityassessmentfromadversarialfeedback/d8a64c04-af4d-43bb-8eab-c5fd8eb3e396_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..110abeb6e44b3c45fe87f629b1fab3f2a6baedd3 --- /dev/null +++ b/realtimefactualityassessmentfromadversarialfeedback/d8a64c04-af4d-43bb-8eab-c5fd8eb3e396_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:810500abbf944a4d34980b1e6b03e276430b60e7d9d48544ea5a4e86dac29111 +size 690909 diff --git a/realtimefactualityassessmentfromadversarialfeedback/full.md b/realtimefactualityassessmentfromadversarialfeedback/full.md new file mode 100644 index 0000000000000000000000000000000000000000..d7b685cba453a0fab3c7a8c1c585d7f4acd87bb9 --- /dev/null +++ b/realtimefactualityassessmentfromadversarialfeedback/full.md @@ -0,0 +1,551 @@ +# Real-time Factuality Assessment from Adversarial Feedback + +Sanxing Chen Yukun Huang Bhuwan Dhingra + +Duke University + +{sanxing.chen,yukun.huang}@duke.edu + +bdhingra@cs.duke.edu + +# Abstract + +We show that existing evaluations for assessing the factuality of news from conventional sources, such as claims on fact-checking websites, result in high accuracies over time for LLM-based detectors—even after their knowledge cutoffs. This suggests that recent popular false information from such sources can be easily identified due to its likely presence in pretraining/retrieval corpora or the emergence of salient, yet shallow, patterns in these datasets. Instead, we argue that a proper factuality evaluation dataset should test a model's ability to reason about current events by retrieving and reading related evidence. To this end, we develop a novel pipeline that leverages natural language feedback from a RAG-based detector to iteratively modify real-time news into deceptive variants that challenge LLMs. Our iterative rewrite decreases the binary classification ROC-AUC by an absolute 17.5 percent for a strong RAG-based GPT-4o detector. Our experiments reveal the important role of RAG in both evaluating and generating challenging news examples, as retrieval-free LLM detectors are vulnerable to unseen events and adversarial attacks, while feedback from RAG-based evaluation helps discover more deceitful patterns. + +# 1 Introduction + +The spread of fake news can have serious consequences, such as influencing elections, inciting violence, and misguiding critical decision-making, particularly in public health. In response, the NLP community has long pursued methods and benchmarks for automatic fake news detection (Zellers et al., 2019). The rise of large language models (LLMs) has fundamentally shifted this landscape (Goldstein et al., 2023; Chen and Shu, 2023). + +LLMs exhibit impressive knowledge and reasoning capabilities, enabling high-accuracy detection of misinformation (Chen and Shu, 2024; Pelrine et al., 2023). The pretraining and prompting + +paradigm of LLM also reduces the risk of creating dataset-specific models that are prone to indistribution shortcut learning (Pagnoni et al., 2022). However, due to the opaque nature of LLM training, their evaluation is often influenced by potential contamination issues. This results in misleading outcomes and underscores a need for out-of-distribution evaluations (Zhou et al., 2023; Vu et al., 2024; Huang et al., 2024a). Existing fake news detection datasets are commonly constructed from past claims curated by fact-checking websites such as PolitiFact and Snopes (Wang, 2017; Shu et al., 2018). These sources often emphasize popular, high-profile claims that are widely circulated on the internet, increasing the likelihood of their inclusion in the pretraining corpora of LLMs. + +To evaluate the LLM's ability to detect misinformation under natural temporal distribution shifts and to mitigate potential contamination from training data, we focus on real-time fake news that emerges concurrently with or after model training. For example, early reports of unfolding events—such as accidents, scientific breakthroughs, or public health advisories—are often accompanied by speculative or incorrect claims that lack coverage in the model's training data. To assess the plausibility of such claims, the LLM draws on both its internal parametric knowledge and external information retrieved in real time. Using newly published fact-checks or reports from the aforementioned sources reduces the risk of contamination from pretraining corpora but can, however, suffer from label leakage in the retrieval context: the model may directly copy a retrieved judgment without reasoning over the underlying evidence. Moreover, fact-checking publishers are often biased in the selection of news they choose to verify, limiting evaluation to specific types of misinformation. + +We observe evidence of all these issues in experiments involving two popular fact-checking sources. On Snopes, we find near-perfect retrieval-free de + +![](images/911eadcfb964dcf61629670c58b62f1d6d720ce329fd7bf0d1ece590b2ffcf2b.jpg) +Rewrite Generation + +![](images/d58aa4038c39d73ba787c5a72fed1ca51abe740285b8439daef8d7cac3280f28.jpg) +Contradiction Filtering +Figure 1: Our proposed adversarial iterative fake news generation. 1) A true news is rewritten by a LLM to multiple candidates containing misinformation. 2) Candidates that do not contradict the original true news are filtered out. 3) The remaining candidates are ranked on their plausibility score according to a RAG-based detector and the most plausible one is selected, the detector's rationales are used to inform the next round generation. The process can be repeated for multiple iterations. + +![](images/02ba3129d28cc98a92f263e82c9836dbec070ab5395f7fc2549ca79ba180f3c3.jpg) +RAG Ranking + +tection for older fake news and a clear decline after the models' knowledge cutoffs, which is easily mitigated by retrieval augmentation. On PolitiFact, we find a surprising uptrend in retrieval-free detection performance even after model knowledge cutoffs, suggesting a gain from non-factual salient patterns of the recent political claims selected. To overcome these limitations and evaluate real-time fake news detection using fresh information (Yang et al., 2022; Hu et al., 2023b; Liao et al., 2023), we investigate LLM-synthesized fake news. + +LLM-generated fake news has been shown to be more deceitful than human-written misinformation (Chen and Shu, 2024); however, we find that current neural fake news still fails to consistently fool strong LLM-based detectors. To address this gap, we propose an adversarial iterative generation approach for crafting fake news capable of deceiving high-performing detectors. Our method is inspired by the feedback-driven learning abilities of LLMs (Madaan et al., 2023). Specifically, the generator receives feedback in the form of a rationale from a retrieval-augmented detector—explaining the factual inconsistencies of the current fake news instance—mimicking the real-world scenario where fact-checkers accompany verdicts with explanations. Given the detector's verdict and the fake news generated in the previous round, the generator revises the text to undermine the prior rationale and avoid detection. This iterative process allows the generator to learn from the detector's perspective, refining its outputs over multiple rounds. Empirically, we find that state-of-the-art LLM detectors, which perform well on conventional political fact-checking datasets, struggle with the fake news produced by our approach. + +Our work makes the following contributions: + +- Background study: We analyze LLM detector + +performance on PolitiFact and Snopes data over the years, revealing limitations that challenge the continued applicability of these popular sources for evaluation. + +- Adversarial generation method: We introduce an iterative, feedback-driven generation approach that introduces highly deceptive fake news grounded in real-time events across diverse domains. Our resulting dataset poses a significantly greater challenge than previous neural fake news corpora. +- Cross-setup generalization: We demonstrate that the increasing deception level generalizes across different LLMs and retrieval sources. +- Analysis of RAG-targeted misinformation: We provide a detailed analysis of how LLMs respond to misinformation that explicitly targets retrieval-augmented generation systems in the context of current-world knowledge. + +We release our code and data on https://github. com/sanxing-chen/adv-fake. + +# 2 Background + +# 2.1 Problem Formulation + +We formulate the fake news detection task as a binary classification problem, where the primary objective is to determine whether a given news is genuine or fabricated. Instances of news cover a wide variety of topics, such as political claims, social media posts, and news releases. Let $\mathcal{D} = \{(x_i,y_i)\}_{i=1}^N$ represent the dataset, where each $x_i$ is a news and $y_i \in \{0,1\}$ is a binary label indicating the factuality of the news. A detector $f: \mathcal{X} \to [0,1]$ maps each news $x_i$ to a probabilistic score $\hat{y}_i = f(x_i)$ , reflecting the likelihood + +![](images/eb637830c01fc743df37efcacfe11a5843784d55aaae385e81722f711d44fca7.jpg) +Figure 2: Comparison of different retrieval-free detectors (AUC-ROC) on PolitiFact and Snopes data over the years. The data is balanced by downsampling the majority class. Both the GPT-4o and Gemini Pro models claim to have knowledge up to the end of 2023. Recent fake news on PolitiFact is increasingly easy to detect by LLMs without the need for fresh external knowledge. While Snopes challenges LLMs in detecting up-to-date fake news, simple retrieval augmentation largely brings back near-perfect performance. + +![](images/215f53f2b5107846f62f93870939950c07e8367d3f0a7c729f7cb76e08112f2e.jpg) + +of the news being factually correct. Under our real-time setup, we also refer to this likelihood as "plausibility" as the wording allows flexibility in fact-checking current and future events where direct evidence may be unavailable. We adopt AUC-ROC as the main metric to evaluate the effectiveness of a detector as it quantifies the model's capability to classify across various thresholds. + +# 2.2 Analysis of Fact-checking Sources + +Fact-checking websites are widely used sources for obtaining news content and human labels when curating fake news detection datasets. Despite their popularity, it is unknown whether they pose continued challenges to state-of-the-art LLM fake news detectors. We study two representative sources of this kind: PolitiFact and Snopes, $^{1}$ both of which are used in creating popular fake news detection datasets (Wang, 2017; Shu et al., 2018; Shahi and Nandini, 2020). In order to evaluate the performance of LLM-based detectors on both past and recent year data, we collect 9,244 PolitiFact news from June 2015 to August 2024, and 3,212 Snopes news from Jan 2016 to October 2024. + +We run a set of LLM-based detectors using simple zero-shot prompting (detailed setup described in section 4). In Figure 2, we observe two opposite trends of detector accuracies through the years. On Snopes, GPT-4o exhibits near-perfect performance on past data, showing potential data contamination due to internet-scale pre-training. Recent fake news, both near and beyond the knowledge cutoff dates, becomes more challenging to detect + +![](images/bbf1067117275d842c25746fb5df299fba5094f62491cfae9fc90905ed6f3c42.jpg) +Figure 3: GPT-4o (retrieval-free) predicted plausibility of PolitiFact claims over the years. The distribution of the true news class remains relatively stable, while the distribution of the fake news class shifts significantly towards lower scores. + +due to the lack of current world knowledge. However, simply augmenting the detectors with Google search results is sufficient to restore performance. On PolitiFact, a source containing mostly political claims, the performance of retrieval-free detectors improves over time. In the most recent year, 2024, we see that LLMs continue to improve, even after the knowledge cutoff and the model release dates. Pelrine et al. (2023) report similar findings. This suggests that up-to-date knowledge is not the deciding factor for PolitiFact fake news detection performance. + +We further investigate the emergent patterns on PolitiFact that have increased the separability of fake and real news (detailed setups in A.2). We first confirm the trend on a much smaller LM, RoBERTa (Liu et al., 2019), which has far less world knowledge. Fine-tuned RoBERTa also performs significantly better on recent year data. We then ablate key features such as removing the originator and publish time of the news from detector + +inputs, and paraphrasing the claim content. None of these features affects the trend of increasing performance over the years (Figure 8). The prediction distribution in Figure 3 reveals that the changes are mostly in the detector's perception of the fake news class, which shifts towards lower scores. Manually going through some fake news examples, we find that in earlier years, political fake news contains statements that, while hyperbolic, can be anchored in a context that requires research through reliable sources (e.g., public records or legislative history) to verify. In contrast, recent fake news includes more sensational and less easily verified claims that seem more speculative or exaggerated without immediate substantive evidence. Consequently, the detection of recent PolitiFact fake news requires less factual knowledge and reasoning, but more pattern recognition and common sense (see Table 9 for some examples). + +To summarize, evaluation on fact-checking data is susceptible to the uncontrolled biases in the curation process. Traditional evaluation of PolitiFact focused on surface-level linguistic patterns (Wang, 2017) is no longer challenging for strong LLMs due to increasing separability of fake political news. Other fact-checking sources (e.g., Snopes) suffer from potential contamination in both the pre-training and retrieval-augmentation stages because of the popularity of both the claims and fact-checking results on the internet. Therefore, to evaluate the factual reasoning ability of LLMs in detecting contemporary fake news, we need to explore new ways to create datasets that cover real-time information from diverse domains for a more challenging evaluation. + +# 3 Methodology + +The wide accessibility of LLMs has not only enabled strong detection models but also facilitated the mass generation of more credible and persuasive fake news (Kreps et al., 2022; Goldstein et al., 2023). Therefore, in combating these emerging threats, the evaluation of detection models should also evolve to incorporate challenging machine-generated misinformation. + +One key challenge in creating fake news datasets is obtaining automatic labels for the data. Open-ended generation, although effective in creating diverse fake news, simultaneously introduces false positives that are hard to verify due to the professional skills required for fact-checking. Our ap + +Algorithm 1 Adversarial Iterative News Rewriting +Require: TrueNews, $k$ { $k$ is the maximum number of iterations} +1: CurrentFake $\leftarrow$ TrueNews +2: for $i\gets 1$ to $k$ do +3: Candidates $\leftarrow$ GenerateCandidates(CurrentFake) +4: repeat +5: Filtered $\leftarrow \emptyset$ +6: for each $c_{i}$ in Candidates do +7: if ContradictsOriginal $(c_i,$ TrueNews) and IsWithinEditLimit $(c_i,$ TrueNews) then +8: Filtered $\leftarrow$ Filtered $\cup \{c_i\}$ +9: end if +10: end for +11: if Filtered $\equiv \emptyset$ then +12: Candidates $\leftarrow$ GenerateCandidates(CurrentFake) +13: end if +14: until Filtered $\neq \emptyset$ +15: Ranked $\leftarrow$ RankByPlausibility(Filtered) +16: CurrentFake $\leftarrow$ SelectMostPlausible(Ranked) +17: end for +18: return CurrentFake + +proach leverages the nuanced text manipulation capabilities of LLMs for controlled misinformation generation (Zellers et al., 2019; Chen and Shu, 2024), introducing factual errors into real news while striving to maintain its original context and style. We implement filtering protocols as an additional safeguard to reduce invalid generation. + +Figure 1 and Algorithm 1 illustrate our pipeline. Formally, we start with a trusted news corpus $\mathcal{T}$ , which contains real-time news from various domains. We independently rewrite each news $\tau_{i} \in \mathcal{T}$ to generate multiple fake news candidates $\mathcal{F}_{i}$ . To ensure that $\mathcal{F}_{i}$ contradicts the original true news $\tau_{i}$ , we employ a LLM-based contradiction detector. We put an additional upper limit on the amount of edits allowed in the rewriting process using a threshold on the Levenshtein distance $\Delta(\tau_{i}, f_{ij})$ , where $f_{ij} \in \mathcal{F}_{i}$ , between the original true news $\tau_{i}$ and the rewritten news $f_{ij}$ . + +After filtering out the candidates that do not meet these criteria, we rank the remaining candidates based on the plausibility score provided by a fake news detector $g(f_{ij}|c)$ , where $c$ is the optional external context retrieved by a retrieval model $\mathcal{R}(f_{ij})$ . If none of the candidates meet the criteria, the generator resamples a new batch of candidates. From this ranked list, we select the top-ranked candidate as the most plausible fake news. + +$$ +\hat {f} _ {i} = \arg \max _ {f _ {i j} \in \mathcal {F} _ {i}} g \left(f _ {i j} \mid c\right) \tag {1} +$$ + +$\hat{f}_i$ and the detector's rationale are then serve as additional information to inform the next round of + +generation on $\tau_{i}$ , creating an iterative process that gradually deceives the detector. In the end of the process, we obtain the most deceptive fake news $\hat{f}_{i}$ across all iterations. + +A critical component of our approach is the retrieval-augmented detector. Using a retrieval-free detector as an adversary, the generator can only improve the factual consistency within the news content or exploit the weaknesses of a LLM with outdated internal knowledge, which can generally be seen as a case of self-evaluation (Kadavath et al., 2022). However, with the information from the retrieved external context, the generator can learn to deceive cross-verification and improve factual consistency beyond its own knowledge, which is important for our real-time news rewrite setup. + +One implementation challenge in Eq. 1 is that we need to run retrieval for each candidate to obtain the external context. This can be computationally expensive for sophisticated retrievers and costly if commercial APIs are used. In practice, we retrieve the external context only for the highest-ranked candidates at the end of each iteration, which we use to inform the next round of detection. Because of the constraints on the amount of change in each iteration, the external context is expected to remain relevant for the next batch generation. In final evaluation, we rerun the retrieval each time to ensure the external context is up-to-date. + +# 3.1 Dataset Creation + +We first obtain 431 actual news stories from NBC News using the news-please crawler (Hamborg et al., 2017). These news stories are from March 1 to March 13, 2024, covering domains such as politics, business, sports, U.S., and world news. Compared to claims from fact-checking websites, these news stories are roughly twice the length of the content. They can be seen as long-form claims, which can be more difficult to fact-check. This two-week range is close to the time when we start the experiments and is beyond the knowledge cutoffs of the LLMs we use, thus ensuring no contamination in model training. Our code supports replicating this process for other date ranges. + +This set of news stories serves as seed true news for our generation pipeline and undergoes one-to-one rewriting to obtain 431 fake news instances. We manually examine all real-fake pairs of the final-round rewrite and filter out 29 invalid pairs. These generations manage to bypass our contradiction detector without introducing factual errors + +that contradict claims in the corresponding real news. Comparing 100 pairs from the first and last rounds of rewrites, the ratio of failed rewrites remains stable at around $7\%$ . We also fact-check 100 last-round examples under an unpaired, shuffled, label-hidden setup, establishing $99\%$ human performance with access to Google. Our final dataset consists of 402 true news and 402 fake news. + +# 4 Experimental Setup + +# 4.1 Generator Setup + +We adopt GPT-4o with different prompts for the all three roles (i.e., generator, contradiction detector, and reranker) in the generation pipeline. The pipeline is iterated for 6 rounds with an extra preparation round 0 of a direct rewrite (no rationale and ranking) on the seed true news. We instruct GPT-4o to "introduce some believable factual errors" without mentioning any concrete strategies or constraints. The open-ended nature of the prompt allows the LLM to explore diverse manipulation strategies. It also encourages the model to craft alterations that, while factually incorrect, would appear plausible within the broader news context, potentially requiring nuanced cross-verification or deeper world knowledge to debunk. + +The generator produces 8 candidates in a zero-shot chain-of-thought fashion for each news story in each round, which are then filtered and ranked based on the plausibility score from the detector. The contradiction detector produces 10 binary scores for each candidate, only if more than eight of them are positive, the candidate is considered to contradict the original true news. String edit distance is used to limit the amount of change in each iteration, with a threshold of more than $60\%$ overlapped tokens. A GPT-4o-based detector (detailed in the next section) is used to provide rationales and serves as the reranker to select the best generation after contradiction filtering. + +# 4.2 Detector Setup + +To implement LLM-based detectors, we prompt the models to assign a plausibility score (on a scale of 1-10, from implausible to plausible) to a given news item in a zero-shot setting. These scores are normalized to the [0, 1] range when computing metrics. We include the directive "Today is March 26, 2024. You predict the plausibility of a news you haven't seen." This establishes the temporal context and emphasizes that the news content should + +
RetrieverNoneNewsGoogle
DetectorfirstlastΔfirstlastΔfirstlastΔ
Gemini-Flash57.050.76.376.162.413.884.176.67.5
Gemini-Pro58.651.67.074.962.812.182.673.78.9
GPT-3.553.750.33.469.357.611.778.269.38.9
GPT-4o58.548.89.782.464.917.593.186.17.0
Llama 3.160.554.06.681.367.413.993.386.66.7
+ +![](images/aa161806e2276ac9d3891b1f86736061a2b66ca461f38d0d3b8063652d793f25.jpg) + +Table 1: AUC-ROC scores of different detectors on the generated fake news of the first and last iteration. The $\Delta$ column shows the effects of the iterative process. News refers to the in-house DPR retriever on news-please data, and Google refers to the Google search API results. The right figure presents results across rounds under the News retrieval setting-more iterations lead to stronger deception. + +
MethodLIAR
AUCF1-MaAcc
RoBERTa-L (2023)-64.764.1
GPT-4 (2023)-68.168.2
USER (2023)-64.5-
STEEL (2024)-71.4-
GPT-4o77.570.770.9
GPT-4o + Google81.174.775.6
+ +Table 2: Our detectors demonstrate superior performance to the state of the art on the LIAR dataset (Wang, 2017). MUSER and STEEL have access to multi-step retrieval on Wikipedia and Bing, respectively. + +be treated as previously unseen. + +Empirically, using "plausibility" instead of "factuality" yields better performance for evaluating recent and future events, while the reverse holds for past events (Table 12). To improve robustness, we sample multiple scores from the model's unscaled prediction distribution (using temperature $t = 1$ ) and compute their average. Rationales are generated via a separate LLM call. + +For retrieval-augmented detection (RAG), we utilize two sources: (1) an in-house News corpus comprising 811k articles from diverse outlets published in March 2024, indexed using a pre-trained DPR retriever (Karpukhin et al., 2020), and (2) real-time Google search results accessed via SerpApi. Both sources are extensively filtered to exclude exact duplicates of the input news and to remove all content from NBC News. From either source, five relevant documents are retrieved using the news headline as the search query. These documents are then inserted into the prompt for fact-checking. We use the News retriever in the GPT-4o detector during generation, while the Google retriever is used only during evaluation due to API cost constraints. + +Our GPT-4o detector is comparable to recent + +state-of-the-art RAG detectors on the popular LIAR datasets (Table 2). Final evaluation is conducted on multiple LLM detectors, including GPT-4o, GPT3.5, Gemini Pro and Flash (Gemini Team, 2024), and open-source 405B Llama 3.1 (Meta AI, 2024). Detailed versions and knowledge cutoffs are provided in Table 7. The actual prompts used by all components are provided in Appendix A.5. + +# 4.3 Baseline Datasets + +We compare to two recent LLM fake news datasets. Su et al. (2023b) apply open-ended rewriting to fake news and rephrase real news from GossipCop and PolitiFact. Chen and Shu (2024) explore various misinformation generation approaches with LLMs, including rewriting fake news and targeted information manipulation of true news. Both approaches utilize one round of generation. Appendix A.4 provides detailed dataset statistics. + +# 5 Experimental Results + +Evaluation results (Table 1) show that our adversarial iterative generation pipeline can produce fake news that can deceive strong LLM-based detectors. We find Llama 3.1 to be the best at detecting fake news generated by our pipeline using GPT-40. Consistent with its earlier release and performance on public benchmarks (Chiang et al., 2024), GPT-3.5 proved most vulnerable to our generated fake news. Datasets generated from our pipeline are significantly more difficult than previous neural fake news datasets (Table 3). + +Through each iteration, the pipeline progressively enhances the deceptive quality of the generated fake news. Relying on the feedback from the GPT-4o RAG-based detector with the in-house retrieval corpus, the generator proves most effective at deceiving this particular detection setting, + +
2023b2024Ours
G++P++RewriteMani.FirstLast
Gemini-Flash72.782.880.475.357.050.7
Gemini-Pro72.886.276.677.358.651.6
GPT-3.564.577.481.268.953.750.3
GPT-4o81.888.884.385.458.548.8
Llama 3.180.491.384.083.360.554.0
+ +![](images/cd497016960cf23941d30f9f665cbc1f768da75cd6bec92c8dffcf82206463d2.jpg) +Figure 4: Distribution of the plausibility scores (retrieval-free and RAG) and the number of words in the set of real news from NBC News (positives, top) and the last-round rewritten fake news (negatives, bottom). + +achieving a reduction of 17.5 AUC-ROC points. Nevertheless, these enhancements are shown to consistently generalize across different LLM backbones and retrieval contexts. + +# 5.1 Analysis + +Real-time news can appear implausible to off-the-shelf LLM detectors. We find that true news articles from NBC News are generally rated as plausible by the LLM detectors, with an average plausibility score of 7.8. However, some news stories receive scores as low as 3.3, indicating that LLM detectors can be fooled by real-time news events that fall outside the model's knowledge (Figure 4). For example, GPT-4o assigns low plausibility scores to reports on RFK Jr.'s presidential campaign and a White House's response to the Sesame Street character's Twitter account on inflation issues.[2] + +Table 3: AUC-ROC scores of different retrieval-free detectors on recent LLM-generated fake news datasets (Su et al., 2023b; Chen and Shu, 2024). Our pipeline produces significantly more difficult datasets. + +
Retriever FeedbackNoneNews
1st2ndΔ1st2ndΔ
Full58.554.44.182.476.95.5
Rat.56.353.13.285.180.44.7
RScore62.058.53.586.182.04.1
Score60.156.63.584.981.13.8
+ +Table 4: GPT-4o detector AUC-ROC on the first two rounds fake news generated with different types of detector feedback in the adversarial setup. "Rat." use non-RAG detector rationale, "RScore" has no access to rationale but the RAG detector's plausibility scores for ranking. "Score" adopts retrieval-free detector's scores. + +
RetrieverNoneGoogle
Score + Majority48.480.4
Score + Average48.684.7
CoT Score + Majority49.781.9
CoT Score + Average47.986.2
+ +Table 5: Comparison of GPT-4o detectors using different reasoning and scoring strategies on the final dataset. + +The LLM detectors' reliance on outdated or incomplete internal knowledge makes them vulnerable to false negatives when evaluating real-time or fringe news. As a result, detectors may mistakenly flag accurate but unfamiliar information as implausible. This underscores the importance of retrieval augmentation for grounding LLM judgments in up-to-date context. + +Retrieval free detectors are vulnerable to adversarial attacks. It is very easy to rewrite unseen news to generate fake news that can evade detection by non-RAG-based LLM detectors. This is evident from the detector performance reported in Table 1 and also from the prediction distribution (purple bars in Figure 4). Retrieval-free detectors result in near random AUC even for the first round generation. On the contrary, RAG-based detectors are generally more robust as they leverage up-to-date external knowledge. As we can clearly see from the true news prediction distribution, more than half of examples receive an unbeatable maximum plausibility score from the RAG-based GPT-4o detectors, while the retrieval-free detector is more conservative in its predictions. The average plausibility score of the RAG-based detectors on the true news is 9.3, significantly higher than 7.8 of the retrieval-free detectors. The confidence of RAG-based detectors does not come without a cost, as they also assign generally higher scores to fake news, suggesting LLMs' weaknesses to be distracted or mis + +trust the external context (Shi et al., 2023; Huang et al., 2024b). + +Stronger defenders enable stronger attackers. RAG-based detectors mount an effective defense against LLM-generated fake news, but the generator can adapt to evade detection, especially when the detector's rationale is accessible. As shown in Table 4, the RAG-based detector rationale outperforms both the non-RAG rationale and ranking-only variants in the first round and continues to reinforce its advantage across iterations. By the sixth round, the RAG-based rationale (64.9) reduces the AUC by 6.5 more points than the non-RAG rationale (71.4). Due to resource constraints, we run the other variants for up to two rounds. + +The success of using RAG-based detector rationale as feedback suggests the generator learns to identify and exploit subtle weaknesses in how the detector integrates or reasons over retrieved evidence. For instance, as seen in our qualitative examples (Section 5.2), it may learn to introduce misinformation that does not directly contradict obvious retrieved facts but rather miscontextualizes them or mixes them with plausible fabrications that the RAG system fails to recognize. + +Chain-of-Thought improves factual reasoning with context. To empirically test the reasoning challenges posed by our dataset, we employ standard techniques such as Chain-of-Thought (Wei et al., 2022). We report results on detector ROC-AUC using GPT-4o on our final dataset, comparing two scoring approaches—average and majority voting—with and without CoT. For each approach, we generate 10 samples using temperature $= 1$ (note that this yields slightly lower scores compared to the paper's main setup using 100 samples). As shown in Table 5, without external information, reasoning techniques do not help—detectors perform worse than random guessing. When augmented with RAG content, CoT improves performance across both score aggregation methods. The observation that CoT only enhances performance when coupled with RAG further underscores that for real-time, unseen content, access to external knowledge is paramount, and reasoning improvements primarily act to better leverage this retrieved information. + +We also observe that the standard setup used throughout our paper, average aggregation, outperforms majority voting in this setting. Future work can explore more advanced reasoning and inference-time scaling strategies. + +
1. Trump says he will debate Biden anytime +After skipping On March 6, 2024, after participating in a few select GOP primary debates, Trump challenged Biden to step onto a stage with him before the November election, , suggesting that the debate be held at a neutral venue yet to be decided.
2. Violence, hunger Rising violence, growing food shortages, and unstable missing political leadership +A long-simmering severe crisis in Haiti has come to a head reached alarming levels as its leader remains stranded in Puerto Rico while its people starve the Dominican Republic for several days. Citizens face extreme food shortages and live in fear of rampant escalating gang-related violence.
3. (round 1) Iranian parliament Saudi Arabia's parliamentary vote sees a low turnout despite government push +Iran Saudi Arabia held its first parliamentary election Friday since mass 2022 protests over mandatory hijab laws following the death of Mahsa Amini, apparently drawing a low turnout amid calls for a boycott. +RAG Rationale Saudi Arabia does not have a parliamentary system; it is an absolute monarchy with a Consultative Assembly (Shura Council) that is appointed by the King, not elected by the public. The reference to Mahsa Amini and mandatory hijab laws is more relevant to Iran, not Saudi Arabia, indicating a possible mix-up of countries. There is no mention of a Saudi parliamentary election in the related news stories, which would be a significant event likely covered by major news outlets. +RAG Score 2.06
3. (round 3) Iranian parliament parliamentary vote sees a low turnout despite government push +Iran held its first parliamentary election Friday since mass 2022 protests over mandatory hijab laws fuel price hikes following the death of Mahsa Amini, government's announcement, apparently drawing a low turnout amid calls for a boycott. +RAG Rationale The related news stories consistently mention that the 2022 protests were over mandatory hijab laws following the death of Mahsa Amini, not over fuel price hikes ... The related news stories do not mention any government announcement about fuel price hikes as a cause for the protests or the low turnout. +RAG Score 3.52
3. (round 5) Iranian parliament parliamentary vote sees a low turnout despite uncertainty amid government push +Iran held its first parliamentary election Friday on Saturday since the mass 2022 protests over mandatory hijab laws disputed local council policies following the death collapse of Mahsa Amini, a building in Abadan, apparently drawing a low turnout mixed reactions amid calls for a boycott. +RAG Rationale The date discrepancy: The news story claims the election was held on Saturday, March 2, 2024, but other sources indicate the election took place on Friday, March 1, 2024. The reason for protests: ..., whereas other sources do not specify this as the cause of the 2022 protests ... +RAG Score 9.17
+ +Table 6: Examples of fake news generated by our pipeline. Deletion and addition to the original true news are marked with colors. The third example shows a case in which the iterative adversarial rewrite is able to improve the quality of a fake news through rounds. + +# 5.2 Qualitative Examples + +Since we allow the LLM to autonomously decide how to introduce factual errors, the generated fake news reflects a diverse range of misinformation strategies. Table 6 presents several illustrative examples. Some common types of modifications that LLMs make to true news include: changing entities, including names, locations, and dates; hallucinating events or inventing details; mimicking typographical errors, e.g., "Nibi" instead of "Libi," "Mark" instead of "Mike." + +Some of these modifications are relatively benign. For example, LLMs frequently paraphrases the original content to vary surface wording, as seen in the second example. However, the model is also capable of embedding misinformation in a + +highly coherent way, substituting entities with plausible alternatives or hallucinating plausible events that are difficult to fact-check. We also observe that LLMs tend to lengthen the original content, a trend reflected in Figure 4. The average length of the original news is approximately 41 words, whereas the modified versions average 53 words. Importantly, the modified news typically retains the same narrative structure as the original. + +The Iran election example illustrates how the LLM refines its output across multiple adversarial rounds. Initially, the model makes a naive change by substituting "Iran" with another Middle Eastern country, "Saudi Arabia." The detector identifies the mismatch between Saudi Arabia and a parliamentary election system, prompting the generator to revise its strategy and modify a different aspect of the story. The second attempt (not shown in the table) still contains similar inconsistencies. In the third round, the model attributes the protest to "fuel price hikes," which remains implausible in the given context. Eventually, the generator produces a more believable but still nonfactual cause. At this point, the detector assigns a score closer to that of true news, indicating that the model has learned to exploit weaknesses in the detector's reasoning, particularly by linking known events (e.g., the 2022 protests) with recent but less publicized developments (e.g., the 2024 parliamentary election). The generator effectively learns to create 'semantic traps' that are harder for the detector to identify even with retrieved context. + +# 6 Related Work + +Fake News Generation and Detection LLMs have been widely studied for fake news detection and generation (Goldstein et al., 2023; Su et al., 2023a; Hu et al., 2024; Chen and Shu, 2024; Liu et al., 2024). External evidence in the form of search results or knowledge graphs has been demonstrated to improve the detection of fake news (Fung et al., 2021; Xu et al., 2022; Liao et al., 2023; Pelrine et al., 2023). + +From the generation perspective, recent research has also shown that external evidence can improve the style, domain and factual consistency of generated fake news (Shu et al., 2021; Mosallanezhad et al., 2022; Lucas et al., 2023; Huang et al., 2023; Wang et al., 2024). However, they investigate one-round generation that is less effective in deceiving today's state-of-the-art LLM-based detectors. Our + +approach introduce the iterative process and the detector perspective which helps to digest the external evidence in examining the flaws of generation. + +Adversarial setups have been used to improve the robustness of LLMs in tasks such as AI-generated text detection and math problem-solving (Hu et al., 2023a; Zhu et al., 2023; Xie et al., 2024). Most of these works focus on modifications that do not change the semantics of the text, which is different from our approach that aims to introduce factual errors in the text. Tailoring to the task of fake news detection, we design a feedback loop using the detector's rationale to guide the generation process, which is a rather realistic threat model in the real-world fact-checking scenario. + +Temporal Reasoning on Future Events Predicting the plausibility of future events requires temporal knowledge and reasoning capabilities (Dhingra et al., 2022). LLMs have the knowledge of the past, but not the future, which they rely on external information via retrieval to access (Kasai et al., 2023; Vu et al., 2024). A similar ability has also been studied in the context of the forecasting task (Zou et al., 2022; Halawi et al., 2024). While forecasting tasks predicting future outcomes based on historical information available prior to an event, our real-time factuality evaluation setup allows access to contemporary external evidence for cross-validation, which presents distinct challenges. + +# 7 Conclusion + +In this paper, we evaluate large language models on fake news detection of events that occur beyond their knowledge cutoff. We find that the conventional use of political claims from fact-checking websites is unsuitable for such tests due to emergent data shortcuts. We thus introduce an adversarial iterative pipeline to generate fake news that can gradually evade strong RAG-based detectors. Our empirical findings shed light on the behaviors of LLMs in both detecting and generating fake news about current world events. We hope that our framework and dataset will facilitate research efforts toward robust factual reasoning models under temporal distribution shift. As malicious actors continue to refine their own generation techniques, our defenses must co-evolve, moving beyond static test sets towards dynamic environments that support continuously adaptive evaluation. + +# Limitations + +Our work focuses on evaluating prompting-based LLM detectors. LLM-generated fake news exhibits patterns that may differ from those found in human-written misinformation, which could limit the generalizability of our dataset for training detectors (Zellers et al., 2019; Huang et al., 2023). Future work could explore debiasing techniques—such as paraphrasing using the same LLM—to mitigate this issue (Su et al., 2023b). + +Our experiments primarily use English-language data centered on U.S. news, which may constrain the generalizability of our conclusions to other languages and regions. Expanding this research to multilingual and multicultural contexts is an important direction for future work. While our background study highlights common limitations and biases in popular fact-checking datasets, the findings are not intended to generalize to all fact-checking sources. + +We use NBC News as a ground truth provider, assuming it to be a reliable and factual source. While we believe this is a reasonable assumption, no source is without bias. Importantly, our generation pipeline is adaptable and can be applied to alternative sources. Our fake news generation is grounded in real-world events, as opposed to fabricating entirely fictional scenarios, which may also spread harmful misinformation. However, during the rewriting process, the LLM may introduce hallucinated details not found in any external source. In such cases, the model must rely on its parametric knowledge to evaluate plausibility. + +Finally, we note that directly evaluating the correlation between classifier performance on our dataset and real-world performance remains infeasible, as the distribution of misinformation is highly dynamic and shaped by ever-evolving events and generation strategies. Nonetheless, our dataset provides a necessary and reliable testbed—its factuality ensured through protocol design and human verification—for advancing the development and deployment of LLM-based detectors. + +# Ethics Considerations + +Our work aims to improve the robustness of fake news detection models by generating challenging fake news that can evade detection. We acknowledge the potential misuse of our method to create more deceptive misinformation. Simultaneously, we have shown that RAG-based detectors with + +high-quality retrieval can effectively counter such misinformation. Our approach focuses on the factual reasoning aspect of fake news detection. Fake news generated does not usually contain propaganda, hate speech, or other harmful content. The release of generators is critical to prepare detectors against adversarial attacks (Zellers et al., 2019). We responsibly released our code and data to facilitate further research on fake news detection. + +# Acknowledgements + +We thank Jun Yang, Junlin Wang and other members of the NLP group at Duke University for fruitful discussions. This work was supported by NSF award IIS-2211526 and a gift from Together AI. + +# References + +Canyu Chen and Kai Shu. 2023. Combating misinformation in the age of llms: Opportunities and challenges. ArXiv preprint, abs/2311.05656. +Canyu Chen and Kai Shu. 2024. Can llm-generated misinformation be detected? In The Twelfth International Conference on Learning Representations, ICLR 2024, Vienna, Austria, May 7-11, 2024. Open-Review.net. +Wei-Lin Chiang, Lianmin Zheng, Ying Sheng, Anastasios Nikolas Angelopoulos, Tianle Li, Dacheng Li, Banghua Zhu, Hao Zhang, Michael I. Jordan, Joseph E. Gonzalez, and Ion Stoica. 2024. Chatbot arena: An open platform for evaluating llms by human preference. In *Forty-first International Conference on Machine Learning*, ICML 2024, Vienna, Austria, July 21-27, 2024. OpenReview.net. +Bhuwan Dhingra, Jeremy R. Cole, Julian Martin Eisenschlos, Daniel Gillick, Jacob Eisenstein, and William W. Cohen. 2022. Time-aware language models as temporal knowledge bases. Transactions of the Association for Computational Linguistics, 10:257-273. +Yi Fung, Christopher Thomas, Revanth Gangi Reddy, Sandeep Polisetty, Heng Ji, Shih-Fu Chang, Kathleen McKeown, Mohit Bansal, and Avi Sil. 2021. InfoSurgeon: Cross-media fine-grained information consistency checking for fake news detection. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 1683-1698, Online. Association for Computational Linguistics. +Gemini Team. 2024. Gemini 1.5: Unlocking multimodal understanding across millions of tokens of context. ArXiv preprint, abs/2403.05530. +Josh A Goldstein, Girish Sastry, Micah Musser, Renee DiResta, Matthew Gentzel, and Katerina Sedova. + +2023. Generative language models and automated influence operations: Emerging threats and potential mitigations. ArXiv preprint, abs/2301.04246. +Danny Halawi, Fred Zhang, Chen Yueh-Han, and Jacob Steinhardt. 2024. Approaching human-level forecasting with language models. *ArXiv preprint*, abs/2402.18563. +Felix Hamborg, Norman Meuschke, Corinna Breitinger, and Bela Gipp. 2017. news-please: A generic news crawler and extractor. In Proceedings of the 15th International Symposium of Information Science, pages 218-223. +Beizhe Hu, Qiang Sheng, Juan Cao, Yuhui Shi, Yang Li, Danding Wang, and Peng Qi. 2024. Bad actor, good advisor: Exploring the role of large language models in fake news detection. In Thirty-Eighth AAAI Conference on Artificial Intelligence, AAAI 2024, Thirty-Sixth Conference on Innovative Applications of Artificial Intelligence, IAAI 2024, Fourteenth Symposium on Educational Advances in Artificial Intelligence, EAAI 2014, February 20-27, 2024, Vancouver, Canada, pages 22105-22113. AAAI Press. +Xiaomeng Hu, Pin-Yu Chen, and Tsung-Yi Ho. 2023a. RADAR: robust ai-text detection via adversarial learning. In Advances in Neural Information Processing Systems 36: Annual Conference on Neural Information Processing Systems 2023, NeurIPS 2023, New Orleans, LA, USA, December 10 - 16, 2023. +Xuming Hu, Zhaochen Hong, Zhijiang Guo, Lijie Wen, and Philip S. Yu. 2023b. Read it twice: Towards faithfully interpretable fact verification by revisiting evidence. In Proceedings of the 46th International ACM SIGIR Conference on Research and Development in Information Retrieval, SIGIR 2023, Taipei, Taiwan, July 23-27, 2023, pages 2319-2323. ACM. +Kung-Hsiang Huang, Kathleen McKeown, Preslav Nakov, Yejin Choi, and Heng Ji. 2023. Faking fake news for real fake news detection: Propaganda-loaded training data generation. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 14571-14589, Toronto, Canada. Association for Computational Linguistics. +Yiming Huang, Zhenghao Lin, Xiao Liu, Yeyun Gong, Shuai Lu, Fangyu Lei, Yaobo Liang, Yelong Shen, Chen Lin, Nan Duan, and Weizhu Chen. 2024a. Competition-level problems are effective LLM evaluators. In Findings of the Association for Computational Linguistics ACL 2024, pages 13526-13544, Bangkok, Thailand and virtual meeting. Association for Computational Linguistics. +Yukun Huang, Sanxing Chen, Hongyi Cai, and Bhuwan Dhingra. 2024b. Enhancing large language models' situated faithfulness to external contexts. arXiv preprint arXiv:2410.14675. +Saurav Kadavath, Tom Conerly, Amanda Askell, Tom Henighan, Dawn Drain, Ethan Perez, Nicholas + +Schiefer, Zac Hatfield-Dodds, Nova DasSarma, Eli Tran-Johnson, Scott Johnston, Sheer El-Showk, Andy Jones, Nelson Elhage, Tristan Hume, Anna Chen, Yuntao Bai, Sam Bowman, Stanislav Fort, Deep Ganguli, Danny Hernandez, Josh Jacobson, Jackson Kernion, Shauna Kravec, Liane Lovitt, Kamal Ndousse, Catherine Olsson, Sam Ringer, Dario Amodei, Tom Brown, Jack Clark, Nicholas Joseph, Ben Mann, Sam McCandlish, Chris Olah, and Jared Kaplan. 2022. Language models (mostly) know what they know. arXiv preprint arXiv: 2207.05221. +Vladimir Karpukhin, Barlas Oguz, Sewon Min, Patrick Lewis, Ledell Wu, Sergey Edunov, Danqi Chen, and Wen-tau Yih. 2020. Dense passage retrieval for open-domain question answering. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 6769-6781, Online. Association for Computational Linguistics. +Jungo Kasai, Keisuke Sakaguchi, Yoichi Takahashi, Ronan Le Bras, Akari Asai, Xinyan Yu, Dragomir Radev, Noah A. Smith, Yejin Choi, and Kentaro Inui. 2023. Realtime QA: what's the answer right now? In Advances in Neural Information Processing Systems 36: Annual Conference on Neural Information Processing Systems 2023, NeurIPS 2023, New Orleans, LA, USA, December 10 - 16, 2023. +Sarah Kreps, R Miles McCain, and Miles Brundage. 2022. All the news that's fit to fabricate: A-generated text as a tool of media misinformation. Journal of experimental political science, 9(1):104-117. +Tom Kwiatkowski, Jennimaria Palomaki, Olivia Redfield, Michael Collins, Ankur Parikh, Chris Alberti, Danielle Epstein, Illia Polosukhin, Jacob Devlin, Kenton Lee, Kristina Toutanova, Llion Jones, Matthew Kelcey, Ming-Wei Chang, Andrew M. Dai, Jakob Uszkoreit, Quoc Le, and Slav Petrov. 2019. Natural questions: A benchmark for question answering research. Transactions of the Association for Computational Linguistics, 7:452-466. +Guanghua Li, Wensheng Lu, Wei Zhang, Defu Lian, Kezhong Lu, Rui Mao, Kai Shu, and Hao Liao. 2024. Re-search for the truth: Multi-round retrieval-augmented large language models are strong fake news detectors. arXiv preprint arXiv: 2403.09747. +Hao Liao, Jiahao Peng, Zhanyi Huang, Wei Zhang, Guanghua Li, Kai Shu, and Xing Xie. 2023. MUSER: A multi-step evidence retrieval enhancement framework for fake news detection. In Proceedings of the 29th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, KDD 2023, Long Beach, CA, USA, August 6-10, 2023, pages 4461-4472. ACM. +Aiwei Liu, Qiang Sheng, and Xuming Hu. 2024. Preventing and detecting misinformation generated by large language models. In Proceedings of the 47th International ACM SIGIR Conference on Research and Development in Information Retrieval, pages 3001-3004. + +Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2019. Roberta: A robustly optimized bert pretraining approach. arXiv preprint arXiv: 1907.11692. +Jason Lucas, Adaku Uchendu, Michiharu Yamashita, Jooyoung Lee, Shaurya Rohatgi, and Dongwon Lee. 2023. Fighting fire with fire: The dual role of LLMs in crafting and detecting elusive disinformation. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 14279-14305, Singapore. Association for Computational Linguistics. +Aman Madaan, Niket Tandon, Prakhar Gupta, Skyler Hallinan, Luyu Gao, Sarah Wiegreffe, Uri Alon, Nouha Dziri, Shrimai Prabhumoye, Yiming Yang, Shashank Gupta, Bodhisattwa Prasad Majumder, Katherine Hermann, Sean Welleck, Amir Yazdanbakhsh, and Peter Clark. 2023. Self-refine: Iterative refinement with self-feedback. In Advances in Neural Information Processing Systems 36: Annual Conference on Neural Information Processing Systems 2023, NeurIPS 2023, New Orleans, LA, USA, December 10 - 16, 2023. +Meta AI. 2024. The llama 3 herd of models. ArXiv preprint, abs/2407.21783. +Ahmadreza Mosallanezhad, Mansoresh Karami, Kai Shu, Michelle V. Mancenido, and Huan Liu. 2022. Domain adaptive fake news detection via reinforcement learning. In Proceedings of the ACM Web Conference 2022, WWW '22, page 3632-3640, New York, NY, USA. Association for Computing Machinery. +Artidoro Pagnoni, Martin Graciarena, and Yulia Tsvetkov. 2022. Threat scenarios and best practices to detect neural fake news. In Proceedings of the 29th International Conference on Computational Linguistics, pages 1233-1249, Gyeongju, Republic of Korea. International Committee on Computational Linguistics. +Kellin Pelrine, Anne Imouza, Camille Thibault, Meilina Reksoprodjo, Caleb Gupta, Joel Christoph, Jean-François Godbout, and Reihaneh Rabbany. 2023. Towards reliable misinformation mitigation: Generalization, uncertainty, and GPT-4. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 6399–6429, Singapore. Association for Computational Linguistics. +Gautam Kishore Shahi and Durgesh Nandini. 2020. Fakecovid-a multilingual cross-domain fact check news dataset for covid-19. arXiv preprint arXiv:2006.11343. +Freda Shi, Xinyun Chen, Kanishka Misra, Nathan Scales, David Dohan, Ed H. Chi, Nathanael Schärli, and Denny Zhou. 2023. Large language models can be easily distracted by irrelevant context. In International Conference on Machine Learning, ICML 2023, + +23-29 July 2023, Honolulu, Hawaii, USA, volume 202 of Proceedings of Machine Learning Research, pages 31210-31227. PMLR. +Kai Shu, Yichuan Li, Kaize Ding, and Huan Liu. 2021. Fact-enhanced synthetic news generation. In Thirty-Fifth AAAI Conference on Artificial Intelligence, AAAI 2021, Thirty-Third Conference on Innovative Applications of Artificial Intelligence, IAAI 2021, The Eleventh Symposium on Educational Advances in Artificial Intelligence, EAAI 2021, Virtual Event, February 2-9, 2021, pages 13825-13833. AAAI Press. +Kai Shu, Deepak Mahudeswaran, Suhang Wang, Dongwon Lee, and Huan Liu. 2018. Fakenewsnet: A data repository with news content, social context and dynamic information for studying fake news on social media. ArXiv preprint, abs/1809.01286. +Jinyan Su, Terry Zhuo, Di Wang, and Preslav Nakov. 2023a. DetectLLM: Leveraging log rank information for zero-shot detection of machine-generated text. In Findings of the Association for Computational Linguistics: EMNLP 2023, pages 12395-12412, Singapore. Association for Computational Linguistics. +Jinyan Su, Terry Yue Zhuo, Jonibek Mansurov, Di Wang, and Preslav Nakov. 2023b. Fake news detectors are biased against texts generated by large language models. arXiv preprint arXiv: 2309.08674. +Tu Vu, Mohit Iyyer, Xuezhi Wang, Noah Constant, Jerry Wei, Jason Wei, Chris Tar, Yun-Hsuan Sung, Denny Zhou, Quoc Le, and Thang Luong. 2024. FreshLLMs: Refreshing large language models with search engine augmentation. In Findings of the Association for Computational Linguistics ACL 2024, pages 13697-13720, Bangkok, Thailand and virtual meeting. Association for Computational Linguistics. +Wei-Yao Wang, Yu-Chieh Chang, and Wen-Chih Peng. 2024. Style-news: Incorporating stylized news generation and adversarial verification for neural fake news detection. In Proceedings of the 18th Conference of the European Chapter of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1531-1541, St. Julian's, Malta. Association for Computational Linguistics. +William Yang Wang. 2017. "liar, liar pants on fire": A new benchmark dataset for fake news detection. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 422-426, Vancouver, Canada. Association for Computational Linguistics. +Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Fei Xia, Ed Chi, Quoc V Le, Denny Zhou, et al. 2022. Chain-of-thought prompting elicits reasoning in large language models. Advances in neural information processing systems, 35:24824-24837. +Roy Xie, Chengxuan Huang, Junlin Wang, and Bhuwan Dhingra. 2024. Adversarial math word problem generation. arXiv preprint arXiv: 2402.17916. + +Weizhi Xu, Junfei Wu, Qiang Liu, Shu Wu, and Liang Wang. 2022. Evidence-aware fake news detection with graph neural networks. In WWW '22: The ACM Web Conference 2022, Virtual Event, Lyon, France, April 25 - 29, 2022, pages 2501-2510. ACM. +Zhiwei Yang, Jing Ma, Hechang Chen, Hongzhan Lin, Ziyang Luo, and Yi Chang. 2022. A coarse-to-fine cascaded evidence-distillation neural network for explainable fake news detection. In Proceedings of the 29th International Conference on Computational Linguistics, pages 2608-2621, Gyeongju, Republic of Korea. International Committee on Computational Linguistics. +Rowan Zellers, Ari Holtzman, Hannah Rashkin, Yonatan Bisk, Ali Farhadi, Franziska Roesner, and Yejin Choi. 2019. Defending against neural fake news. In Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, December 8-14, 2019, Vancouver, BC, Canada, pages 9051-9062. +Kun Zhou, Yutao Zhu, Zhipeng Chen, Wentong Chen, Wayne Xin Zhao, Xu Chen, Yankai Lin, Ji-Rong Wen, and Jiawei Han. 2023. Don't make your lmm an evaluation benchmark cheater. ArXiv preprint, abs/2311.01964. +Kaijie Zhu, Jindong Wang, Jiaheng Zhou, Zichen Wang, Hao Chen, Yidong Wang, Linyi Yang, Wei Ye, Yue Zhang, Neil Zhenqiang Gong, et al. 2023. Prompt-bench: Towards evaluating the robustness of large language models on adversarial prompts. ArXiv preprint, abs/2306.04528. +Andy Zou, Tristan Xiao, Ryan Jia, Joe Kwon, Mantas Mazeika, Richard Li, Dawn Song, Jacob Steinhardt, Owain Evans, and Dan Hendrycks. 2022. Forecasting future world events with neural networks. In Advances in Neural Information Processing Systems 35: Annual Conference on Neural Information Processing Systems 2022, NeurIPS 2022, New Orleans, LA, USA, November 28 - December 9, 2022. + +A Appendix + +
Model VersionKnowledge Cutoff
gpt-3.5-turbo-0125September 2021
gpt-4-turbo-2024-04-09December 2023
gpt-4o-2024-05-13October 2023
gemini-1.5-pro-002November 2023
gemini-1.5-flash-002November 2023
Llama 3.1 (405B Instruct)December 2023
+ +Table 7: Versions and knowledge cutoff dates of the OpenAI, Gemini (Gemini Team, 2024), and Llama (Meta AI, 2024) models used in our study. + +2024-10-18 | As governor of Minnesota, Tim Walz ordered police to shoot residents with paintball guns for not obeying curfew orders during the COVID-19 pandemic. false +2024-10-18 | Comedian and "Family Feud" game show host Steve Harvey died following a tragic accident in early 2024. false +2024-10-19 | Research shows, for pet owners, the deaths of their animals can be just as hard as losing human loved ones. true + +Table 8: Examples of Snopes news from 2024. + +# A.1 Snopes Experiment Details + +We collect 3,212 Snopes news articles from January 2016 to October 2024. The data is accessed through the Google Fact Check Tools API.3 These Snopes news are accompanied with true or false labels. + +2024-08-07 | J.D. Vance says Tim Walz said he carried weapons in war, but "he has not spent a day in a combat zone." true +2024-08-09 | Elissa Slotkin says Mike Rogers "left Michigan to trade on his D.C. connections, helping Chinese tech companies get access to the U.S." false +2024-08-23 | Donald Trump: “Kamala cast the tiebreaking vote to hire 87,000 new IRS agents to go after your tip income.” false + +Table 9: Examples of PolitiFact news from 2024. Although all events happened after the knowledge cutoffs of LLMs, some of them can be reasonably classified using common sense. + +# A.2 PolitiFact Experiment Details + +PolitiFact adopts six fine-grained labels for the truthfulness ratings: pants-fire, false, barely-true, half-true, mostly-true, and true. For the calculation of AUC-ROC, we adopt a common binarization to categorize the first three as negative and the last three as positive (Liao et al., 2023; Pelrine et al., 2023). Digging into the increasing differential trend of the fake news classes, we find that it results from a combination of reasons: 1) there is an increasing proportion of the less truthful class in the data (i.e., 'false' grows over 'barely true' in Figure 5); 2) both the 'false' and 'barely true' + +classes become less plausible (Figure 6). + +We verify the trend by fine-tuning a relatively small LM, RoBERTa (Liu et al., 2019), on two sets of data from different years. In one experiment, we train the model on PolitiFact data from 2015 and evaluate it on data from 2016. In the other, we train the model on data from 2022 and evaluate it on data from 2023 and 2024. The results show that the later data results in a higher AUC-ROC score (0.765 versus 0.680), which is roughly equal to the performance of the GPT-3.5 detector. + +Ablating the attributes we use to classify a news story (Figure 8), we find that none of the attributes affect the increasing trend. Interestingly, we find that GPT-4o makes more accurate prediction when we ignore the date of publication in the prompt. Removing the originator of the claim is harmful, but not decisive—the classifier can judge the validity of a claim regardless of the speaker's credibility. + +
Year#Real#FakeReal Prop.
20157205100.59
20169387580.55
20175265790.48
20185016250.44
20194144220.50
20203435780.37
20212453920.38
20222364020.37
20231672210.43
2024971890.34
+ +Additionally, there is a meaningful distribution shift in PolitiFact data over the years. We observe that the proportion and the absolute number of true news has decreased significantly in recent years, which may result from the increasing prevalence of misinformation in the political landscape (Table 10). From a machine learning perspective, this distribution shift leads to pronounced class imbalance, which can negatively impact the evaluation of fake news detection models if not properly accounted for. + +# A.3 RAG Setup + +To build an in-house RAG pipeline, we gather 811,000 news articles from various news sources within the same date range to create our retrieval corpus. We remove the exact seed true news + +![](images/debe5df8c39030b80816886dedd26ca3dc8554acf3f93be3b2af0c8d902fbf9b.jpg) +Figure 5: Proportion of three fake news classes of PolitiFact claims over the years, up to August 2024. + +![](images/52e524fbcad0a5c1caf66fe533e749f0eedb397f8a0afa06b7f4ae5051f60354.jpg) +Figure 6: GPT-4o (retrieval-free) predicted plausibility of PolitiFact claims over the years, up to August 2024. + +Table 10: The absolute numbers of both real and fake news selected in PolitiFact decrease, and the portion of real news in the range of [2020, 2024] decreases to an average of $38\%$ from an average of $51\%$ in the range of [2015, 2019]. 2024 data is up to August. + +
AUROCF1-MaAcc
Sampling77.570.770.9
0 temp76.269.469.4
+ +Table 11: GPT-4o detector with different sampling techniques on the LIAR dataset. Compared to taking one prediction with a temperature of 0, which is essentially the highest probability output, sampling with a temperature of 1 avoids overconfidence and produces smoother output. + +
Event Range2015-20182021-2024
"Factuality"0.7750.815
"Plausibility"0.7530.822
+ +Table 12: GPT-4o detector using prompts with different wording referring to the event likelihood. We report the AUROC on the PolitiFact data over the years. "Factuality" suits the fact-checking narrative of past events, while "Plausibility" better describes current and future events. + +from the retrieval corpus to avoid direct contamination. For popular news stories, multiple news portals may have similar coverage, which we allow for cross-verification. They still contain varying details that the detector can reason about (Table 15). A dense passage retriever (Karpukhin et al., 2020) pretrained on the Natural Questions dataset (Kwiatkowski et al., 2019) is employed to index this corpus and provide 5 relevant articles when queried with a news headline. We additionally implement an online RAG pipeline using SerpApi to retrieve 5 Google search snippets for the given news headlines. We remove NBC News from the search results for similar reasons stated above. Due to the cost of the API, we only use it for the final evaluation of the generated fake news. + +# A.4 Details of Baseline Datasets + +We compare to two recent LLM fake news datasets. We adopt the machine-written GossipCop and PolitiFact datasets from Su et al. (2023b). The PolitiFact subset contains 132 true news and 97 fake news. The GossipCop dataset is down-sampled to 200 true and fake news. We adopt the rewrite and information manipulation variants of Chen and Shu (2024) generated by ChatGPT based on PolitiFact. The rewrite subset contains 126 true news and 270 fake news. The information manipulation subset contains 378 true news and 378 fake news from three sub-variants (i.e., Outdated Information, Description Ambiguity, False Context). + +# A.5 Detector and Generator Prompts + +We adopt simple prompts that implement corresponding functionality but do not introduce domain or dataset-specific heuristics to maximize generalizability. + +# Detector + +system> Today is March 26, 2024. You predict the plausibility of a news you haven't seen. + +Please predict the plausibility of the following news story: Please give a number representing the plausibility (1-10) and nothing else. + +# RAG Detector + +system> Today is March 26, 2024. You predict the plausibility of a news you haven't seen given a list of related news stories from search results. + +Related news stories from search results: + + + +Please predict the plausibility of the following news story: + + + +Please give a number representing the plausibility (1-10) and nothing else. + +# Detector Rationale + + Today is March 26, 2024. You fact-check a news you haven't seen, given a list of related news stories from search results. + +Related news stories from search results: + + + +Please predict the plausibility of the following news story: + + + +Please explain what you find suspicious about the news story. Give the top 3 points in a list format and nothing else. + +# Generator + + Today is March 26, 2024. + +Please rewrite a real recent news story to introduce some believable factual errors. + +The modification should be able to fool professional fact-checkers. + +Format + +Error introduced: + +Title: + +Description: + +Please rewrite the following news story. + + + +It was previously rewrote as: + + + +Fact-checkers found the following suspicious: + + + +Please rewrite the news story to make it more believable and fool the fact-checkers. + +# Contradiction Detector + +```txt +News 1 + +News 2 + +Does News 2 conflict with News 1? Please type yes or no and nothing else. +``` + +![](images/a98b1c839533eeef1030d8e2aaf495e075df81da51fe8212427902afa5a3fe5b.jpg) +Figure 7: Comparison of different detectors (AUC-ROC) on PolitiFact claims over the years, up to August 2024. This figure shows the results on raw data without balancing. The absolute number and proportion of true news decrease throughout the year. + +![](images/fb58e43133ff3f9ce43d55f8edca399f6d74c94cc689c03a16bce093387bc4dc.jpg) +Figure 8: Ablating different attributes on PolitiFact claims over the years, up to August 2024. This figure shows the results on balanced data. + +
RetrieverNoneNewsGoogle
DetectorfirstlastΔfirstlastΔfirstlastΔ
Gemini-Flash54.650.64.073.962.411.580.072.27.7
Gemini-Pro56.352.14.369.759.210.574.966.08.8
GPT-3.553.450.03.470.859.411.476.866.710.0
GPT-4o57.249.97.283.066.316.791.383.08.4
Llama 3.157.452.35.180.969.211.791.383.28.2
+ +Table 13: Average Precision (AP) of different detectors on the generated fake news of the first and last iteration. The $\Delta$ column shows the effects of the iterative process. News refers to the in-house DPR retriever on news-please data, and Google refers to the Google search API results. + +![](images/0536c2cde78a15be0cb7017ae03f145cc2e5c1edad99b2b7527a3df17047ebd7.jpg) +Figure 9: Non-RAG-based detectors with different LLM backbones (AUC-ROC) on iteratively generated fake news. + +![](images/12ba3916a436a5fdd9c6d941073780729d512c1bed4f023ee49027303771cf26.jpg) +Figure 10: Google-RAG-based detectors with different LLM backbones (AUC-ROC) on iteratively generated fake news. + +
Query: Saudi Arabia's parliamentary vote sees a low turnout despite government push
News (DPR)2024-03-11 - Government claims public's lack of understanding of referenda led to landslide 'no' voteVoters overwhelmingly rejected proposed changes to care the highest ever "no" vote percentage in an Irish referendum2024-03-05 - Opposition leaders react to the announcement of the date for the presidential electionsCARACAS After announcing the date for the next elections in Venezuela, guided by the CNE On July 28, leaders of the Venezuelan opposition expressed their2024-03-09 - Polls could have been derailed because of just one LHC order: CJPJustice Faez underscores pivotal role outgoing Justice Tariq Masood could have played as LHC CJ but SC benefited immensely from his presence | Justice Tariq urges judges2024-03-04 - Senegal election crisis shakes support for Macky Sall's coalitionDAKAR, March 4 (Reuters) - Writer Moustapha Gueye voted for Senegalese President Macky Sall at the last two elections.But disappointment in Sall's second term and the president's thwarted attempt to postpone the next vote have shaken Gueye'sallegiance to the ruling Benno Bokk Yakaar (BBY) coalition. Reclining on a sofa at his home in Dakar, Gueye [...]2024-03-03 - The government's attempt for answers [Feb. 24-Mar. 1]The federal government has ordered the executives of Bell, Rogers, and Telus to answer questions about telecom pricing afterprevious requests were denied.
GoogleTitle: First Iranian parliament vote since 2022 mass protests sees ...Source: PBS, Mar 1, 2024Content: Iran held its first parliamentary election Friday since mass 2022 protests over mandatory hijab laws following thedeath of Mahsa Amini, apparently drawing a ...Title: Low turnout in Saudi Arabia's local polls | NewsSource: Al Jazeera, Oct 22, 2011Content: With women excluded until 2015, only men voted in kingdom's second-ever election, and polling booths remainmostly empty. Title: Growing 'Despondency' And Hard-Liners' DominanceSource: Radio Free Europe/Radio Liberty,Content: Iranian President Ebrahim Raisi casts his vote during parliamentary elections in Tehran on March 1. "The Islamicrepublic is now a minority-ruled ...Title: Democracy in CrisisSource: Freedom House,Content: Political rights and civil liberties around the world deteriorated to their lowest point in more than a decade in 2017,extending a period characterized by ...Title: In Saudi Arabia, Only Men Vote, And Not OftenSource: NPR, Sep 29, 2011Content: Only men could vote in polls to fill half the seats on some 300 municipal councils. The other half are appointed bythe government."
+ +Table 14: Sample retrieval results corresponding to example 3 (round 1) in Table 6, the search query is about "Saudi Arabia", Google robustly returns "Iran" results. + +# Query: Iranian parliamentary vote sees a low turnout despite government push + +# News (DPR) + +"Related news stories from search results: + +2024-03-01 - Iranian parliament vote, first since 2022 mass protests, sees a low turnout despite government push Iran has held its first parliamentary election since mass 2022 protests over mandatory hijab laws after the death of Mahsa Amini, apparently drawing a low turnout amid calls for a boycott. It wasn't immediately clear if voter apathy or an active desire to send a message to Iran's theocracy depressed the number of voters coming to polling stations Friday across the Islamic Republic. While state-controlled television broadcast images of lines of voters, others across the capital of Tehran saw largely empty polling stations. Some, including imprisoned Nobel Peace Prize laureate Narges Mohammadi, urged a boycott of a vote they derided as a “sham.” + +2024-03-01 - Iranian Parliament Vote, First Since 2022 Mass Protests, Sees a Low Turnout Despite Government Push Get latest articles and stories on World at LatestLY. Iran held its first parliamentary election on Friday since mass 2022 protests over mandatory hijab laws following the death of Mahsa Amini, apparently drawing a low turnout amid calls for a boycott. + +World News | Iranian Parliament Vote, First Since 2022 Mass Protests, Sees a Low Turnout Despite Government Push. + +2024-03-01 - Iranian parliament vote, first since 2022 mass protests, sees low turnout despite government push It wasn't immediately clear if voter apathy or an active desire to send a message to Iran's theocracy depressed the number of voters coming to polling stations across the Islamic Republic. + +2024-03-11 - Government claims public's lack of understanding of referenda led to landslide 'no' vote Voters overwhelmingly rejected proposed changes to care the highest ever "no" vote percentage in an Irish referendum + +2024-03-02 - Low turnout in Iran's first vote since 2022 protests +Iran's voters have been reluctant to turn out in the country's first parliamentary election since protests over the death in custody of Mahsa Amini in 2022. + +# Google + +Title: First Iranian parliament vote since 2022 mass protests sees ... + +Source: PBS, Mar 1, 2024 + +Content: Iran held its first parliamentary election Friday since mass 2022 protests over mandatory hijab laws following the death of Mahsa Amini, apparently drawing a ... + +Title: Iranian parliament vote, first since 2022 mass protests ... + +Source: Euronews.com, Mar 1, 2024 + +Content: Officials including Supreme Leader Ayatollah Ali Khamenei sought to link turnout directly to taking a stand against Iran's enemies. + +Title: Hard-liners dominate Iran parliamentary vote that saw a ... + +Source: AP News, Mar 4, 2024 + +Content: Iranian hard-line politicians dominated the country's vote for parliament. However, the election Friday also saw a record-low turnout. + +Title: Low turnout as conservatives dominate Iran parliamentary ... + +Source: Al Jazeera, Mar 4, 2024 + +Content: Conservative politicians will dominate Iran's parliament, according to election results, maintaining their hold on the Islamic Consultative ... + +Title: Iranian parliament vote sees low turnout + +Source: The Sydney Morning Herald, Mar 2, 2024 + +Content: Iran on Friday held its first parliamentary election since mass 2022 protests over mandatory hijab laws following the death of Mahsa Amini. + +Table 15: Sample retrieval results corresponding to example 3 (round 3) in Table 6, the search query is about "Iran", both search engines return relevant results for cross-verification. + +
IDOriginatorClaimDate
11593Marco RubioSays Ted Cruz "is a supporter of legalizing people that are in this country illegally" and "proposed giving them work permits."November 12, 2015
11099Tom CottonPresident Barack Obama "said at the beginning of the negotiations that the basic approach was to dismantle Iran's nuclear program in exchange for dismantling the sanctions."July 15, 2015
11206Bernie Sanders"We spend almost twice as much per capita on health care as do the people of any other country."August 16, 2015
10672Sally Kohn"White men account for 69 percent of those arrested for violent crimes."March 19, 2015
10845Alex McMurtrie Jr.State legislators "quietly shifted $2 billion from education to road building" in 2013.May 7, 2015
11741Steven LandesMedicaid expansion "could cost the Commonwealth of Virginia over $1 billion a year..."December 24, 2015
11443Steven Costantino"I did not play any role in bringing the company to RI as did others in government. I was tasked with handling the legislation affecting the company by my superiors."September 27, 2015
10738Judicial Watch"ISIS camp a few miles from Texas, Mexican authorities confirm."April 14, 2015
10680Martin SmithBy allowing brewpubs to sell beer, Georgia could become like Mexico with only a couple of manufacturers controlling all aspects of market.March 23, 2015
11282Ted Cruz"The Iran Deal will facilitate and accelerate the nation of Iran acquiring nuclear weapons."September 9, 2015
+ +Table 16: PolitiFact collected fake news from 2015, randomly sampled from examples that are assigned a "false" Truth-O-Meter label. + +
IDOriginatorClaimDate
25742Brigitte Gabriel"For 18 months under President Trump, not a single American was harmed in Afghanistan."July 2, 2024
25078Steve ScaliseThe Senate's border bill "accepts 5,000 illegal immigrants a day."February 4, 2024
25020Ron DeSantisSays Winston Churchill said, "Success is not final, failure is not fatal: it is the courage to continue that counts."January 21, 2024
25800Jon StewartMilwaukee's Marcus Performing Arts Center – where 'The Daily Show' had been scheduled – "was originally located in the 'soft perimeter,' they called it, security-wise" but "was shifted, understandably so, to the 'hard perimeter.'"July 16, 2024
25553Ron Johnson"Every Senate Democrat has voted to support unlimited abortions up to the moment of birth."April 15, 2024
25596Jesse WattersJudge Juan Merchan "overrules every objection from the defense and sustains every objection from the prosecution" during former President Donald Trump's New York trial.May 28, 2024
25240Donald Trump"Biden has implemented a formal policy that illegal aliens who intrude into the United States are granted immunity from deportation."March 9, 2024
25376Donald Trump"Crime is down in Venezuela by 67% because they're taking their gangs and their criminals and depositing them very nicely into the United States."April 2, 2024
25956Eric HovdeSays U.S. Sen. Tammy Baldwin "has done absolutely nothing" about the fentanyl crisis.August 13, 2024
25082Elon MuskBiden's strategy is to "get as many illegals in the country as possible" and "legalize them to create a permanent majority."February 2, 2024
+ +Table 17: PolitiFact collected fake news from 2024, randomly sampled from examples that are assigned a "false" Truth-O-Meter label. \ No newline at end of file diff --git a/realtimefactualityassessmentfromadversarialfeedback/images.zip b/realtimefactualityassessmentfromadversarialfeedback/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..893459b4fad18241a3f5b919e47170d3c4d29c85 --- /dev/null +++ b/realtimefactualityassessmentfromadversarialfeedback/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3d107b8abee6e2279edb249849305223b9bd503122ce5241f43feb74a1440ad8 +size 1367212 diff --git a/realtimefactualityassessmentfromadversarialfeedback/layout.json b/realtimefactualityassessmentfromadversarialfeedback/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..a4eaa71c3594befb8339d02034e03334b0d85565 --- /dev/null +++ b/realtimefactualityassessmentfromadversarialfeedback/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1557d9466e25adea1b8dafc0bc7fcbebd8e4376d4e7b7ac85f6417d2ae027379 +size 532204 diff --git a/recentadvancesinspeechlanguagemodelsasurvey/f4a7148a-0172-4ff0-a81f-1c7dda53af8a_content_list.json b/recentadvancesinspeechlanguagemodelsasurvey/f4a7148a-0172-4ff0-a81f-1c7dda53af8a_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..85bf7b1328b4ac3e484e228be73192ee70999b5f --- /dev/null +++ b/recentadvancesinspeechlanguagemodelsasurvey/f4a7148a-0172-4ff0-a81f-1c7dda53af8a_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4152a47312aa994f1cb5938470188e37b40b4cc8b282450d077049a43f8f7b7c +size 185066 diff --git a/recentadvancesinspeechlanguagemodelsasurvey/f4a7148a-0172-4ff0-a81f-1c7dda53af8a_model.json b/recentadvancesinspeechlanguagemodelsasurvey/f4a7148a-0172-4ff0-a81f-1c7dda53af8a_model.json new file mode 100644 index 0000000000000000000000000000000000000000..4922ce9cdd78cb80eeb40a342a29c0a7ea28825a --- /dev/null +++ b/recentadvancesinspeechlanguagemodelsasurvey/f4a7148a-0172-4ff0-a81f-1c7dda53af8a_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:57eb32d5b49187b04efc75263c49ba15d968a76cd93616daa59787c964ee58ea +size 231585 diff --git a/recentadvancesinspeechlanguagemodelsasurvey/f4a7148a-0172-4ff0-a81f-1c7dda53af8a_origin.pdf b/recentadvancesinspeechlanguagemodelsasurvey/f4a7148a-0172-4ff0-a81f-1c7dda53af8a_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5202fc031e0c3fbcf331865a6fcab47268ed1cf7 --- /dev/null +++ b/recentadvancesinspeechlanguagemodelsasurvey/f4a7148a-0172-4ff0-a81f-1c7dda53af8a_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8d3f42c31efc07991bf765f42723abcaed3c811f9545435168d191e681677eff +size 720567 diff --git a/recentadvancesinspeechlanguagemodelsasurvey/full.md b/recentadvancesinspeechlanguagemodelsasurvey/full.md new file mode 100644 index 0000000000000000000000000000000000000000..2252bb18978732dbeb459c0f936b638601bbcd46 --- /dev/null +++ b/recentadvancesinspeechlanguagemodelsasurvey/full.md @@ -0,0 +1,637 @@ +# Recent Advances in Speech Language Models: A Survey + +Wenqian Cui $^{1*}$ , Dianzhi Yu $^{1}$ , Xiaqi Jiao $^{2}$ , Ziqiao Meng $^{3}$ , Guangyan Zhang $^{2}$ , Qichao Wang $^{4}$ , Yiwen Guo $^{5}$ , Irwin King $^{1\dagger}$ + +1The Chinese University of Hong Kong, 2LIGHTSPEED STUDIOS, + +$^{3}$ National University of Singapore, $^{4}$ Tencent, $^{5}$ Independent Researcher + +# Abstract + +Text-based Large Language Models (LLMs) have recently gained significant attention, primarily for their capabilities in text-based interactions. However, natural human interaction often relies on speech, highlighting the need for voice-based models. In this context, Speech Language Models (SpeechLMs)—foundation models designed to understand and generate speech—emerge as a promising solution for end-to-end speech interaction. This survey offers a comprehensive overview of recent approaches to building SpeechLMs, outlining their core architectural components, training methodologies, evaluation strategies, and the challenges and potential directions for future research in this rapidly advancing field. $^{1}$ + +# 1 Introduction + +Text-based Large Language Models (LLMs) have demonstrated remarkable capabilities in generating text and performing a wide array of natural language processing tasks (Zhao et al., 2023; Minaee et al., 2024), serving as powerful foundation models for AI language understanding and generation. Their success has also spurred numerous applications in other domains, yet the reliance solely on text-based modalities presents a significant limitation. This leads to the development of speech-based generative models, which allow to interact with humans more naturally and intuitively. + +Given the extensive mutual information between text and speech, it is natural to modify existing LLMs to enable speech interaction capabilities. A straightforward approach is to adopt an "Automatic Speech Recognition (ASR) + LLM + Text-to-Speech (TTS)" framework (Figure 1a) (Huang et al., 2024b; Shen et al., 2024). In this setup, + +the user's spoken input is first converted into text by the ASR module, the LLM then generates a text response based on this transcription, and the TTS module transforms the text response back into speech. However, this naive solution mainly suffers from the following three problems. 1) Information loss. Speech signals not only contain semantic information (i.e., the meaning of the speech) but also paralinguistic information (e.g., pitch, timbre, tonality, etc.). Putting a text-only LLM in the middle will cause the complete loss of paralinguistic information in the input speech (Zhang et al., 2023a). 2) Significant latency. Combining ASR, LLM, and TTS leads to considerable delays due to their complex structural designs. (Xie and Wu, 2024a; Defossez et al., 2024; Fang et al., 2024). For instance, ASR often includes an additional text decoder (Radford et al., 2023; Le et al., 2020), which increases computational demands. 3) Cumulative error. A staged approach like this can easily lead to cumulative errors throughout the pipeline, particularly during the transition between ASR and LLM (Fathullah et al., 2024; Tang et al., 2024). + +The limitations of this naive framework have led to the development of Speech Language Models (SpeechLMs, Figure 1b). Specifically, SpeechLMs encode speech waveforms directly into speech tokens (Section 3.1). This enables them to capture both semantic and paralinguistic information from audio, thereby minimizing information loss. SpeechLMs then model these tokens autoregressively (Section 3.2), without solely relying on text input. This allows them to use the additional paralinguistic information to generate more expressive and nuanced speech. Finally, the generated tokens are synthesized back to speech (Section 3.3). This integrated approach eliminates the need to chain three separate modules, significantly reducing latency. By working directly with the encoded speech tokens, SpeechLMs effectively mitigate the cumulative errors, as their training is integrated with + +![](images/ad4278bb90f1607afe572fc3468b6ec20f4c09437c87709db38015c7259f7f66.jpg) +(a) Illustration of the "ASR + LLM + TTS" framework. + +![](images/88cade917cb98311a52c0ad1acb0a7bf3fa9ef2c6310445c39e0e8a644948a0a.jpg) +(b) Illustration of the architecture of a SpeechLM. +Figure 1: Architectures of the "ASR + LLM + TTS" framework and a SpeechLM. SpeechLMs are designed with end-to-end speech interaction capabilities, complemented by optional cross-modality interaction capabilities. + +the speech encoding, whereas the training of the three modules is completely independent in the naive framework. Furthermore, SpeechLMs have the potential to enable real-time voice interactions, allowing the model to be interrupted by users or to speak simultaneously with them, mimicking natural human conversation patterns more closely. + +In this survey, we provide the first thorough overview of recent advancements in SpeechLMs and introduce a comprehensive taxonomy (Figure 2). We explore the various components that constitute their architecture (Section 3) and the training recipes (Section 4) involved in their development. We aim to elucidate the current state of the field by analyzing these models from the above perspectives. We then classify metrics to evaluate SpeechLMs (Section 5) and discuss the challenges and future directions in this area, hoping to provide valuable insights that could drive further advancements in SpeechLM technology (Section 6). + +# 2 Problem Formulation + +This section provides the formal definition of Speech Language Models (SpeechLMs). SpeechLMs are autoregressive foundation models that perform end-to-end speech interaction2. They leverage contextual understanding for coherent sequence generation, enabling various downstream tasks through speech modality. While SpeechLMs are required to perform speech inter + +actions (speech-in-speech-out), they can also integrate text, supporting cross-modal operations such as speech-in-text-out and vice versa. This distinguishes them from traditional text-based language models (TextLMs), where the only modality being processed within the model is text. + +We offer a unified framework in which SpeechLMs can process and generate speech data, text data, or even interleaved speech and text data. Specifically, an audio waveform $\mathbf{a} = (a_{1},a_{2},\ldots ,a_{Q})$ consists of a sequence of audio samples $a_i\in \mathbb{R}$ of length $Q$ , where $1\leq q\leq Q$ . Similarly, a text span $\mathbf{t} = (t_1,t_2,\dots ,t_K)$ consists of a sequence of text tokens $t_j$ (word, subword, character, etc.) of length $K$ . Let $\mathbf{M} = (M_1,M_2,\dots ,M_N)$ denote a multimodal sequence of length $N$ , where each element $M_{i}\in \{a_{i},t_{j}\}$ . We define $\mathbf{M}^{\mathrm{in}} = (M_1^{\mathrm{in}},M_2^{\mathrm{in}},\dots ,M_{N_{\mathrm{in}}}^{\mathrm{in}})$ as the input multimodal sequence and $\mathbf{M}^{\mathrm{out}} = (M_1^{\mathrm{out}},M_2^{\mathrm{out}},\dots ,M_{N_{\mathrm{out}}}^{\mathrm{out}})$ as the output multimodal sequence, where $N_{\mathrm{in}}\geq 0$ and $N_{\mathrm{out}}\geq 0$ . Then, A SpeechLM parameterized by $\theta$ can then be represented as: $\mathbf{M}^{\mathrm{out}} = SpeechLM(\mathbf{M}^{\mathrm{in}};\theta)$ . + +# 3 Components in SpeechLM + +SpeechLM consists of three key components: speech tokenizer, language model, and token-to-speech synthesizer (vocoder) (see Figure 1). The speech tokenizer converts audio waveforms into tokens, which the language model uses for next-token prediction. The vocoder then converts these predicted tokens back into audio waveforms. This three-stage architecture enables autoregressive speech modeling using traditional language model + +architectures like decoder-only transformers. Table 1 shows common choices for the three SpeechLM components in various SpeechLM papers. + +# 3.1 Speech Tokenizer + +Speech tokenizer is the first component in SpeechLMs, which converts audio waveforms into tokens. It processes audio segment by segment, producing either discrete tokens (using indices) or continuous tokens (using embeddings). Both token types can serve as input for language models in autoregressive modeling, with the main goal of capturing essential audio features while reducing dimensionality. This section classifies speech tokenizers by how they model raw audio. + +# 3.1.1 Semantic Understanding Objective + +Speech tokenizers with a semantic understanding objective convert speech waveforms into tokens that accurately capture the meaning of the speech. These tokenizers extract semantic features from the waveforms, which enhances tasks like ASR. + +A semantic understanding speech tokenizer typically comprises a speech encoder and a quantizer. The speech encoder $(f_{E}(\cdot))$ transforms waveform input into continuous embeddings $(\mathbf{v} = f_{E}(\mathbf{a};\theta_{f_{E}}))$ , where $\mathbf{v} = (v_{1},v_{2},\ldots ,v_{P})$ . A quantizer $(d(\cdot))$ can be added to convert these embeddings into discrete indexes. The speech tokens $\mathbf{s} = (s_1,s_2,\dots ,s_P)$ can be derived either from the original waveform or the embeddings: $\mathbf{s} = d(\mathbf{v};\theta_d)$ or $\mathbf{s} = d(\mathbf{a};\theta_d)$ for discrete tokens, or $\mathbf{s} = \mathbf{v}$ for continuous tokens. These tokens can then be used as target labels for training the tokenizer or subsequent language models. + +The key design choices lie in how to effectively encode (and quantize) speech into tokens. Wav2vec 2.0 (Baevski et al., 2020b) combines convolutional encoding with product quantization (Jegou et al., 2010) for waveform discretization, using masked contrastive learning. W2v-BERT (Chung et al., 2021) extends this by adding the Masked Language Modeling (MLM) loss (Devlin et al., 2019). HubERT (Hsu et al., 2021) uses k-means clustering to derive speech units and uses MLM loss in training. Google USM (Zhang et al., 2023b) incorporates text-injection loss (Chen et al., 2022b) to better align text and speech representations. WavLM (Chen et al., 2022a) introduces speech denoising during pre-training, proving beneficial for both semantic tasks (ASR, TTS) and non-semantic tasks (speaker verification, speech separation). + +# 3.1.2 Acoustic Generation Objective + +Speech tokenizers with an acoustic generation objective focus on preserving acoustic features for high-quality speech synthesis. Their architecture consists of an encoder $f_{E}(\cdot)$ , quantizer $d(\cdot)$ , and decoder $f_{D}(\cdot)$ . The encoder and quantizer convert waveforms into tokens, while the decoder reconstructs these tokens back into speech waveforms, expressed as $\hat{\mathbf{a}} = f_{D}(\mathbf{s};\theta_{f_{E}})$ . This approach prioritizes acoustic characteristics over semantic content, optimizing for speech (re)synthesis tasks. + +Neural audio codecs primarily serve as acoustic generation speech tokenizers (Zeghidour et al., 2021; Defossez et al., 2023). They use deep neural networks to compress audio into discrete tokens. Their encoder-quantizer-decoder structure works by: (1) encoding audio into latent representations, (2) discretizing these typically through Vector Quantization (VQ) (Van Den Oord et al., 2017) or Residual Vector Quantization (RVQ) (Zeghidour et al., 2021), and (3) decoding tokens back to audio. Therefore, the encoder and quantizer components function as the speech tokenizer. + +# 3.1.3 Mixed Objective + +Speech tokenizers with a mixed objective aim to balance both semantic understanding and acoustic generation. Rather than creating new architectures, most implementations modify acoustic tokenizers to incorporate semantic information. For example, SpeechTokenizer (Zhang et al., 2024e) uses RVQ-GAN (Défossez et al., 2023; Zeghidour et al., 2021) architecture and distills HuBERT's (Hsu et al., 2021) semantic tokens into its first RVQ layer, while Mimi (Défossez et al., 2024) distills WavLM tokens (Chen et al., 2022a) into a single VQ layer alongside the RVQ module. + +# 3.2 Language Model + +Following TextLMs' success (Achiam et al., 2023; Dubey et al., 2024), SpeechLMs typically adopt transformer or decoder-only architectures for autoregressive speech generation. Formally, a text-based decoder-only transformer language model comprises: (1) An embedding matrix $E_{t} \in \mathbb{R}^{|V_{t}| \times h}$ , where $|V_{t}|$ is vocabulary size and $h$ is hidden dimension. (2) $L$ transformer decoder blocks $\mathbf{D}\mathbf{e} = \{De_{1}, De_{2}, \ldots, De_{L}\}$ . (3) Output embedding matrix $E_{t}' \in \mathbb{R}^{h \times |V_{t}|}$ . Then, the language model can be expressed as $\mathbf{t}^{\mathrm{out}} \sim \mathrm{LM}(\mathbf{t}^{\mathrm{in}}, (E_{t}, \mathbf{D}\mathbf{e}, E_{t}')')$ . + +To adapt the language model for speech generation, the text tokenizer can be replaced with a + +speech tokenizer. For discrete tokens, the text embedding matrix $E_{t} \in \mathbb{R}^{|V_{t}| \times h}$ becomes speech embedding matrix $E_{s} \in \mathbb{R}^{|V_{s}| \times h}$ , where $|V_{s}|$ is the speech tokenizer vocabulary size. Similarly, output embedding changes from $E_{t}' \in \mathbb{R}^{h \times |V_{t}|}$ to $E_{s}' \in \mathbb{R}^{h \times |V_{s}|}$ . The language model is thus represented as $\mathbf{s}^{\mathrm{out}} \sim \mathrm{LM}(\mathbf{s}^{\mathrm{in}}, (E_{s}, \mathbf{D}\mathbf{e}, E_{s}')')$ . + +Since SpeechLMs inherit the language model architecture from TextLMs, it is possible for them to handle both text and speech modalities. The common approach is to expand the TextLM's vocabulary to include both text and speech tokens by appending the speech embedding matrix to the text embedding matrix, creating $E_{m} \in \mathbb{R}^{(|V_{t}| + |V_{s}|) \times h}$ . This allows the language model to process combined token sequences $\mathbf{m}$ as $\mathbf{m}^{\mathrm{out}} \sim \mathrm{LM}(\mathbf{m}^{\mathrm{in}}, (E_{j}, \mathbf{D}\mathbf{e}, E_{j}'))$ , enabling joint text-speech applications. Alternatively, when using continuous tokens, the speech embeddings are fed directly into the language model without changing the embedding layer architecture. + +Researchers predominantly favor the joint modeling approach for two main reasons. First, integrating both speech and text tokens enables the model to leverage pre-trained text language models, effectively transferring text-based knowledge and capabilities to speech-related tasks. Second, maintaining the ability to process text tokens ensures that the model can still perform text generation, which is crucial for developing omni-modal LLMs such as VITA (Fu et al., 2024) and EMOVA (Chen et al., 2024a). However, there are also motivations for developing models that solely include speech tokens. Such models aim to develop textless speech language models, which focus on building speech intelligence without relying on textual supervision or guidance. + +# 3.3 Token-to-Speech Synthesizer (Vocoder) + +The token-to-speech synthesizer (vocoder) converts generated speech tokens back into audible waveforms. This process reverses the speech tokenization and can be expressed as $\mathbf{a} = V_o(\mathbf{s};\theta_{V_o})$ , where $V_{o}$ is the vocoder model with parameters $\theta_{V_o}$ + +SpeechLM vocoder can operate through two pipelines: direct synthesis and input-enhanced synthesis. Direct synthesis converts speech tokens straight into audio waveforms. For example, (Polyak et al., 2021) adapts the HiFi-GAN (Kong et al., 2020) architecture and takes speech tokens as inputs. Input-enhanced synthesis uses an additional module to transform tokens into continu + +ous latent representations before vocoding (Anastassiou et al., 2024; Betker, 2023). For example, CosyVoice (Du et al., 2024b) uses Conditional Flow-Matching (CFM) to convert tokens to mel-spectrograms before HiFi-GAN vocoding. While direct synthesis offers simplicity and speed advantages, the choice between these pipelines largely depends on the input token type: acoustic tokens work well with direct synthesis due to their sufficient acoustic information, whereas semantic tokens, lacking fine acoustic details (especially in higher frequencies), benefit from being enhanced into acoustic-rich representations like mel-spectrograms before final synthesis. + +Vocoders can be categorized by architectural choice. Below, we summarize those commonly used in SpeechLM development. See Appendix B for additional types. + +# 3.3.1 GAN-based Vocoder + +Generative Adversarial Networks (GANs) are widely used as SpeechLM vocoders for their fast, high-quality speech synthesis (Kumar et al., 2019; Kong et al., 2020; Polyak et al., 2021). GANs consist of a generator that produces realistic audio from noise or input features and a discriminator that assesses the authenticity of the generated audio against real samples. GAN-based vocoders incorporate inductive biases for generating audio waveforms. MelGAN (Kumar et al., 2019) uses residual blocks with dilations in the generator to capture long-range correlations in audio and introduces a multi-scale discriminator to handle different audio frequency ranges. HiFi-GAN (Kong et al., 2020) extends this with a multi-period discriminator to model diverse periodic patterns in audio waveforms. Fre-GAN (Kim et al., 2021b) employs the Discrete Wavelet Transform (DWT) to downsample and learn spectral distributions across frequency bands, offering an efficient alternative to Average Pooling (AP) by decomposing signals into low-frequency and high-frequency sub-bands. BigVGAN (Lee et al., 2023) introduces a snake activation function and anti-aliased representation to minimize high-frequency artifacts in synthesized audio. For common loss functions for GAN-based Vocoders, readers can refer to Appendix A due to space limits. + +# 4 Training Recipes + +This section summarizes common training recipes in recent SpeechLM papers, covering the features + +modeled, techniques employed in each training stage, and different speech generation paradigms. + +# 4.1 Features Modeled + +This section discusses the different features outputted by speech tokenizers and modeled by SpeechLMs. These features represent different aspects of speech waveforms and determine the performance of SpeechLMs. + +# 4.1.1 Discrete Features + +Discrete features (or discrete tokens) are quantized speech representations in the form of distinct, countable tokens, derived through encoding and quantization. SpeechLMs commonly use these features because their modeling process is the same as that of text tokens in a TextLM. + +Most SpeechLMs use semantic tokens (generated by semantic understanding tokenizers, Section 3.1.1) to represent speech, as they capture crucial contextual information. GSLM (Lakhotia et al., 2021), the first SpeechLM, evaluates three tokenizers—CPC (Oord et al., 2018), wav2vec 2.0 (Baevski et al., 2020b), and HuBERT (Hsu et al., 2021)—and concludes HuBERT performs best on tasks like speech resynthesis and generation. Many works adopt HuBERT as the speech tokenizer (Hassid et al., 2024; Nguyen et al., 2024; Zhang et al., 2023a). AudioPaLM (Rubenstein et al., 2023) compares w2v-bert (Chung et al., 2021), USM-v1 (Zhang et al., 2023b), and USM-v2 (Rubenstein et al., 2023), concluding USM-v2 excels in ASR and Speech Translation (ST) tasks. + +While semantic tokens generate semantically meaningful speech, they lack expressive elements like prosody and timbre (Nguyen et al., 2023a, 2024). To address this, paralinguistic tokens can be added to capture expressive features. pGSLM (Kharitonov et al., 2022) integrates prosody features like fundamental frequency (F0) and unit duration along with HuBERT tokens, using a multistream transformer to predict all tokens. Similarly, SPIRIT-LM (Nguyen et al., 2024) complements HuBERT tokens with pitch and style tokens (Duquenne et al., 2023), improving expressiveness without compromising semantic understanding. + +Acoustic tokens, derived from neural audio codec models (Section 3.1.2), aim to capture acoustic features for high-fidelity speech reconstruction. For instance, Viola (Wang et al., 2024c) handles ASR, TTS, and Machine Translation using codec tokens, while Parrot (Meng et al., 2024) leverages + +VQ-VAE (Van Den Oord et al., 2017) tokens to model dual-channel spoken dialogue. $^3$ + +# 4.1.2 Continuous Features + +Continuous features are unquantized, real-valued speech representations on a continuous scale, such as spectral representations (e.g., mel-spectrograms) or latent representations from neural networks. Spectron (Nachmani et al., 2024) predicts spectrograms frame-by-frame for speech continuation. Mini-Omni (Xie and Wu, 2024a) and SLAM-Omni (Chen et al., 2024b) use intermediate representations from a frozen Whisper encoder, while LauraGPT (Du et al., 2023) employs a co-trained audio encoder and language model to extract latent speech representations. Continuous features capture fine-grained speech details often lost in discretization but require modifying traditional text-based language model pipelines. Additionally, they demand more storage than discrete features. + +# 4.2 Training Stages + +Training a SpeechLM involves three components: speech tokenizer, language model, and vocoder. This section focuses on the primary techniques used in training the language model, as the language model plays a crucial role in generating speech continuations, which are central to SpeechLM. We divide the SpeechLM language model training process into three stages: pretraining, instruction tuning, and post-alignment. + +# 4.2.1 Language Model Pre-training + +Pre-training in SpeechLMs is crucial for generating coherent and contextually relevant speech. It involves training the model to autoregressively predict the next token using a large corpus of speech data, thereby learning statistical patterns and dependencies to generate speech based on context. + +Training data. SpeechLMs pre-training utilizes large-scale open-source speech datasets, including those for ASR (Panayotov et al., 2015; Kahn et al., 2020; Wang et al., 2021a), TTS (Zen et al., 2019), ST (Jia et al., 2022; Wang et al., 2021a), podcasts (Clifton et al., 2020), and dialogues (Cieri et al., 2004). Some datasets contain only speech, while others include both speech and text transcripts, enabling models to learn the relationship between spoken and written language. Table 2 lists popular datasets used in SpeechLMs pre-training. + +Cold Initialization. Some SpeechLMs use cold initialization during pre-training, where model parameters are randomly initialized. The first SpeechLM, GSLM (Lakhotia et al., 2021) trained a transformer (Vaswani et al., 2017) from scratch as the language model and compared tokens from different speech tokenizers. They found that HuBERT (Hsu et al., 2021) outperformed CPC (Oord et al., 2018) and wav2vec 2.0 (Baevski et al., 2020b) in speech understanding and generation. SUTLM (Chou et al., 2023) also employed a transformer and explored joint modeling of speech and text using four methods: speech-only, text-only, concatenated speech-text, and alternating (interleaving) speech-text (Table 3). Alternating speech-text performs the best in their cross-modal evaluations. + +Some models use non-standard transformer architectures and are usually trained from scratch when they differ significantly from standard transformers or TextLM architectures. For instance, pGSLM (Kharitonov et al., 2022) introduces a multi-stream transformer language model (MS-TLM) to simultaneously generate speech units, duration, and pitch embeddings. dGSLM (Nguyen et al., 2023b) presents a dialogue transformer language model (DLM) for jointly modeling dialogue speech data from two speakers. LSLM (Ma et al., 2024) integrates a streaming self-supervised learning (SSL) encoder with an autoregressive token-based TTS model to enable SpeechLMs to listen while speaking. + +Continued Pre-Training. Continued pretraining starts with pre-trained TextLM weights, adapting them for speech modeling. This leverages linguistic knowledge in TextLMs for more efficient SpeechLM training. TWIST (Hassid et al., 2024) showed that TextLMs like OPT (Zhang et al., 2022b) and LLaMA (Touvron et al., 2023a) improve convergence and speech understanding, outperforming cold initialization. AudioPaLM (Rubenstein et al., 2023) demonstrated that larger TextLM checkpoints (e.g., PaLM, PaLM-2 (Chowdhery et al., 2023; Anil et al., 2023a)) and datasets further enhance SpeechLM performance. + +Aligning text and speech modality representations can further boost the performance of SpeechLMs. One approach aligns text and speech in a single sequence. SPIRIT-LM (Nguyen et al., 2024) demonstrated that interleaving text and speech tokens during pretraining improves performance on speech tasks and increases text-speech feature similarity. SpeechGPT (Nachmani + +et al., 2024) aligns representations by enabling the SpeechLM to answer step-by-step: transcribing input speech to text, predicting text responses, and synthesizing speech. Another method uses multi-sequence alignment, where text and speech sequences are generated simultaneously. MiniOmni (Xie and Wu, 2024a) produces one text token sequence and seven acoustic token sequences, aligned at the sentence level. Similarly, Moshi (Défossez et al., 2024) generates one text token sequence, one semantic token sequence, and seven acoustic token sequences, aligned at the word level. Further discussion on speech-text representation alignment is in Appendix D. + +# 4.2.2 Language Model Instruction-Tuning + +Instruction-tuning fine-tunes SpeechLMs to follow instructions for various tasks. This phase is crucial for enhancing the pre-trained model's generalization capabilities and making it more adaptable to diverse applications. + +Effective instruction-following datasets are crucial in instruction-tuning. SpeechGPT (Zhang et al., 2023a) and SpeechGPT-Gen (Zhang et al., 2024b) propose a two-stage instruction-tuning process: (1) cross-modal instruction fine-tuning, where instructions are appended to paired ASR data, asking the model to convert speech into text (or vice versa). (2) chain-of-modality fine-tuning, where text-based instruction datasets are synthesized into speech-in-speech-out datasets using TTS. To more closely resemble spoken language pattern, Llama-Omni (Fang et al., 2024) synthesizes text-based instruction data by reformating text prompts to mimic natural speech, generating responses via a TextLM, and synthesizing prompt-response pairs using TTS. + +# 4.2.3 Language Model Post-Alignment + +Post-alignment refines a language model's behavior to align with human preferences, ensuring safe and reliable outputs. As the final training phase, it often uses preference alignment algorithms like Reinforcement Learning from Human Feedback (RLHF) (e.g., Proximal Policy Optimization (PPO) (Schulman et al., 2017)) or Direct Preference Optimization (DPO) (Rafailov et al., 2023). + +Post-alignment in SpeechLMs addresses unique challenges in the speech interaction pipeline. Align-SLM (Lin et al., 2024) identifies that SpeechLMs often generate inconsistent semantic content. They propose to use a TextLM to select preferred responses from SpeechLMs (transcribed via ASR) + +and align preferences with DPO. SpeechAlign (Zhang et al., 2024a) argues that sub-optimal speech tokens generated by SpeechLM degrade the generated audio quality. They improve it by aligning model-generated tokens to the "golden" token distribution. Despite its importance, the postalignment of SpeechLMs remains under-explored. Future research should prioritize identifying and addressing the unique safety challenges posed by SpeechLMs (see Section 6.3). + +# 4.3 Speech Interaction Paradigm + +Most earlier SpeechLM approaches follow the traditional speech interaction paradigm, which involves taking a complete input sequence and generating a complete response. However, this approach does not mirror natural conversations, where participants may interrupt one another. Therefore, some studies attempt to equip SpeechLM with real-time interaction ability. + +Real-time interaction of SpeechLMs involves the advanced handling of conversation data from two or more people, and it can be understood through several progressive stages. The initial stage is the adoption of streaming tokenizers and vocoders, which eliminate the need for the language model to wait for complete speech encoding before processing. This architecture enables immediate, low-latency responses to user queries, marking a significant improvement over the traditional interaction paradigm. Nonetheless, while this streaming approach supports basic real-time interaction, it remains insufficient for capturing the more sophisticated interaction patterns observed in natural conversation. The next frontier is full-duplex modeling, which allows SpeechLMs to support simultaneous bidirectional communication—specifically, the ability to handle interruptions initiated by either the user or the model. It mainly includes two features: 1) User interruption, where models can be interrupted and respond appropriately to new instructions during a conversation, and 2) Simultaneous response, enabling models to process input and generate output concurrently. Achieving this requires the joint modeling of both user and model audio streams. dGSLM (Nguyen et al., 2023b) employs a separate transformer for each participant in two-speaker dialogues, with cross-attention layers capturing speaker interactions. Most methods, however, rely on a single language model. Parrot (Meng et al., 2024) employs a "next-token-pair prediction" approach with a decoder-only Transformer + +to predict tokens for both channels. Moshi (Défossez et al., 2024) concatenates user input and model response channels data, using an RQ-Transformer to process the data together. LSLM (Ma et al., 2024) focuses on modeling one speaker's speech using a decoder-only Transformer, integrating a streaming SSL encoder to fuse listening and speaking channel embeddings. + +# 5 Evaluations + +Similar to TextLMs, SpeechLMs possess diverse capabilities, making model comparisons difficult. Therefore, evaluating them from multiple perspectives is crucial. This section reviews common evaluation methods and benchmarks (Table 10) for SpeechLMs, categorized into automatic and human assessments with distinct aspects. + +# 5.1 Automatic (Objective) Evaluation + +Automatic evaluation methods are crucial for quick, consistent assessments of SpeechLMs, using quantitative metrics computed without needing humans. Common techniques are outlined below. + +Representation Evaluation. Representations (embeddings) are hidden vectors that represent input/output data in a lower-dimensional space. It lays a foundation for the understanding and generation abilities of the models. For SpeechLMs, representation evaluation measures how effectively the model converts speech features into meaningful vectors. The between-speaker ABX score, used by GSLM (Lakhotia et al., 2021), assesses phonetic category separation by comparing three sound samples: two from one category and one from another. Additionally, speech resynthesis evaluation (Lakhotia et al., 2021) involves encoding speech into tokens, reconstructing it back to speech, and measuring the word or character error rates between original and reconstructed versions. + +Linguistic Evaluation. Linguistic evaluation methods, covering lexical, syntactic, and semantic aspects, test a model's ability to understand and generate words, sentences, and meaningful content. Benchmark datasets include sWUGGY (Nguyen et al., 2020) for distinguishing real words from nonwords, sBLIMP (Nguyen et al., 2020) for identifying grammatically correct sentences, and Spoken StoryCloze (Hassid et al., 2024) for selecting the semantically-coherent story ending. + +Paralinguistic Evaluation. Paralinguistic evaluation examines non-verbal aspects of communi + +cation in speech. SpeechLMs that integrate paralinguistic tokens into their modeling can be evaluated at the token level. For instance, pGSLM (Kharitonov et al., 2022) assesses prosodic tokens based on accuracy (using minimum MAE), consistency (using Pearson correlation), and expressiveness (using standard deviation) by comparing the generated token to the reference token. At the perceptual level, SPIRIT-LM (Nguyen et al., 2024) introduced the STSP benchmark, which measures how well sentiment is preserved in generated speech or text based on the prompt. This approach could also be adapted to evaluate other paralinguistic features, such as timbre or prosody. + +Generation Quality and Diversity. Quality and diversity are two crucial aspects of model generation. Typically, there is a trade-off between these dimensions when sampling model responses at different temperatures, so GSLM (Lakhotia et al., 2021) suggests using the Area Under the Curve (AUC) with various temperature values. Specifically, AUC on perplexity and VERT are employed to assess these factors, where VERT represents the geometric mean of the ratio of k-grams in the generated speech that repeat at least once. Additionally, the ChatGPT score can be utilized to evaluate the quality of the generated speech. In this process, the generated speech is transcribed using state-of-the-art ASR models and then sent to ChatGPT for quality (and diversity) assessment. + +Real-time Interaction Evaluation. Real-time interaction evaluation assesses SpeechLMs' ability to interact in real-time, essential for full-duplex communication. Existing research focuses on assessing the naturalness and usefulness of the real-time interaction speech. dGSLM (Nguyen et al., 2023b) measures naturalness by analyzing turn-taking events (e.g., speech segments, pauses, gaps, overlaps), with speech being more natural if these statistics resemble human dialogues. Another approach evaluates speech continuation, where naturalness depends on alignment between turn-taking statistics of prompts and continuations. Usefulness is also critical in real-time interaction scenarios. The Parrot model (Meng et al., 2024) introduces reflective pauses (SpeechLM remains silent while the user speaks) and interruptions (SpeechLM stops when interrupted) to assess real-time interaction quality. Additionally, there are two benchmarks specifically designed for evaluating full duplex modeling of SpeechLMs. Arora et al. (Arora et al., 2025) introduce a predictive + +model-based evaluation where SpeechLM quality is determined by alignment between generated turn-taking events and those predicted by a specialized evaluation model. Full-Duplex-Bench (Lin et al., 2025) advances the field by evaluating four critical aspects of conversational dynamics: pause handling, backchanneling, turn-taking, and interruption management—each with dedicated metrics that provide nuanced assessment. + +Downstream Evaluation. Downstream evaluation assesses SpeechLMs' performance on specific tasks like ASR, TTS, and Speaker Identification, either through few-shot examples or direct instruction. Various benchmarks have emerged to provide comprehensive assessment: SUPERB (Yang et al., 2021) focuses on speech understanding, SD-Eval (Ao et al., 2024) tests paralinguistic comprehension, SALMON evaluates speech generation consistency, VoiceBench (Chen et al., 2024c) evaluates SpeechLM general capabilities, while DynamicSUPERB (Huang et al., 2024a), MMAU (Sakshi et al., 2024), AirBench (Yang et al., 2024c), and AudioBench (Wang et al., 2024a) incorporate speech, sound, and music-related tasks. However, these benchmarks primarily require text responses. To address this limitation, VoxEval (Cui et al., 2025) supports the evaluation of speech output, making it more suitable for end-to-end speech interaction evaluation. + +# 5.2 Human (Subjective) Evaluation. + +Human evaluation is vital for assessing SpeechLMs, as speech is meant to be heard and understood by humans. Below are common human evaluation methods for SpeechLMs. + +Mean Opinion Score (MOS) is a key metric in speech evaluation that measures perceived speech quality through human listener ratings on a 1-5 scale, with variations like MMOS, PMOS, and SMOS (Kharitonov et al., 2022; Zhang et al., 2024b) focusing on naturalness, prosody, and timbre similarity respectively. MOS is the averaged human-rated score for each audio sample. While human evaluation is crucial, the challenges in recruiting participants and gathering evaluations have led researchers to increasingly adopt machine-based evaluations. For example, a naturalness prediction model (Mittag et al., 2021) can assess the naturalness of generated outputs. + +# 6 Challenges and Future Directions + +Research on SpeechLMs shows promise but remains in the early stages. This section explores challenges and future directions in the field. + +# 6.1 Understanding Different Component Choices + +Current research on SpeechLMs encompasses key components such as speech tokenizers, language models, and vocoders, each offering a diverse range of options. While some studies have compared various component choices—primarily focusing on speech tokenizers—the comparisons tend to be limited in scope and depth (Lakhotia et al., 2021; Rubenstein et al., 2023). Consequently, there remains a significant gap in understanding the advantages and disadvantages of different component selections. Therefore, studies aimed at comprehensively comparing these choices are essential. Such an investigation would yield valuable insights and serve as a guide for selecting more efficient components when developing SpeechLMs. + +# 6.2 End-to-End Training + +Although SpeechLMs can generate speech directly without relying on text signals, some studies train the three components separately. This separate optimization may hinder the model's overall potential. Consequently, it would be worthwhile to investigate whether training can be conducted in an end-to-end manner, allowing gradients to be backpropagated from the vocoder's output to the tokenizer's input. By exploring this fully end-to-end approach, we could potentially enable SpeechLMs to produce more coherent, contextually relevant, and high-fidelity speech outputs. + +# 6.3 Safety Risks in SpeechLMs + +Safety is a crucial topic in Machine Learning, especially for large-scale generative AI models. Unlike TextLMs, the safety concerns in SpeechLMs remain underexplored. SpeechLMs share some safety challenges with TextLMs but also have unique issues, as noted in OpenAI's report on GPT-4o's voice mode (OpenAI, 2024). Future research must address vulnerabilities in SpeechLMs to enhance their safety. Key safety concerns in SpeechLMs include toxicity and privacy. Toxicity involves generating harmful content, such as dangerous instructions or inappropriate speech like erotic audio (OpenAI, 2024). Privacy risks include + +revealing personal information from speech input, such as inferring a speaker's identity, ethnicity, or beliefs, even when insufficient information is available (OpenAI, 2024). + +# 6.4 Performance on Rare Languages + +SpeechLMs directly model speech data, which allows them to more effectively handle "low-resource" languages compared to TextLMs. "Low-resource" languages are those that lack extensive textual data, making it challenging for TextLMs to model them efficiently. In contrast, SpeechLM provides a better solution by modeling the speech data of these "low-resource" languages, which often have more available audio data than text (Lakhotia et al., 2021). Therefore, future research could focus on training SpeechLMs in "low-resource" languages or dialects to expand their capabilities. + +# 7 Conclusions + +This survey provides a comprehensive overview of recent advancements in Speech Language Models (SpeechLMs). We begin by addressing the limitations of the naive framework that combines ASR, LLM, and TTS for speech interactions. Following this, we highlight the key advantages offered by SpeechLMs. We then explore the various components of SpeechLM architectures and outline their training methodologies, including the features they model and their distinct training stages. Lastly, we summarize the evaluation techniques used for SpeechLMs and discuss the primary challenges and promising future research directions in this field. We hope this survey will illuminate the field and assist the research community in creating more powerful Speech Language Models. + +# 8 Limitations + +Due to space constraints, several aspects of SpeechLMs could not be fully addressed in the main body of this survey. Firstly, the comprehensive taxonomy of SpeechLMs, which provides a detailed classification and organization of various models and approaches, has been placed in the appendix. Secondly, while the main text focuses on the most commonly used vocoders in SpeechLMs, the introduction of less frequently employed vocoder types had to be omitted. Lastly, some detailed discussions, such as the comparison of different features and the downstream tasks of SpeechLMs, have also been moved to the appendix. + +Readers are encouraged to consult the appendix for a more comprehensive treatment of these aspects of SpeechLM research and development. + +# Acknowledgments + +The research presented in this paper was partially funded by the Research Grants Council of the Hong Kong Special Administrative Region, China (CUHK 2410072, RGC R1015-23). + +# References + +Josh Achiam, Steven Adler, Sandhini Agarwal, Lama Ahmad, Ilge Akkaya, Florencia Leoni Aleman, Diogo Almeida, Janko Altenschmidt, Sam Altman, Shyamal Anadkat, et al. 2023. Gpt-4 technical report. arXiv preprint arXiv:2303.08774. +Ehab A AlBadawy, Andrew Gibiansky, Qing He, Ji-long Wu, Ming-Ching Chang, and Siwei Lyu. 2022. Vocbench: A neural vocoder benchmark for speech synthesis. In ICASSP 2022-2022 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 881-885. IEEE. +Robin Algayres, Yossi Adi, Tu Nguyen, Jade Copet, Gabriel Synnaeve, Benoit Sagot, and Emmanuel Dupoux. 2023. Generative spoken language model based on continuous word-sized audio tokens. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 3008-3028, Singapore. Association for Computational Linguistics. +Robin Algayres, Adel Nabli, Benoit Sagot, and Emmanuel Dupoux. 2022. Speech sequence embeddings using nearest neighbors contrastive learning. In *Interspeech* 2022, pages 2123-2127. +Philip Anastassiou, Jiawei Chen, Jitong Chen, Yanzhe Chen, Zhuo Chen, Ziyi Chen, Jian Cong, Lelai Deng, Chuang Ding, Lu Gao, et al. 2024. Seed-tts: A family of high-quality versatile speech generation models. arXiv preprint arXiv:2406.02430. +Rohan Anil, Andrew M Dai, Orhan Firat, Melvin Johnson, Dmitry Lepikhin, Alexandre Passos, Siamak Shakeri, Emanuel Taropa, Paige Bailey, Zhifeng Chen, et al. 2023a. Palm 2 technical report. arXiv preprint arXiv:2305.10403. +Rohan Anil, Andrew M Dai, Orhan Firat, Melvin Johnson, Dmitry Lepikhin, Alexandre Passos, Siamak Shakeri, Emanuel Taropa, Paige Bailey, Zhifeng Chen, et al. 2023b. Palm 2 technical report. arXiv preprint arXiv:2305.10403. +Junyi Ao, Yuancheng Wang, Xiaohai Tian, Dekun Chen, Jun Zhang, Lu Lu, Yuxuan Wang, Haizhou Li, and Zhizheng Wu. 2024. Sd-eval: A benchmark dataset for spoken dialogue understanding beyond words. arXiv preprint arXiv:2406.13340. + +Rosana Ardila, Megan Branson, Kelly Davis, Michael Kohler, Josh Meyer, Michael Henretty, Reuben Morais, Lindsay Saunders, Francis Tyers, and Gregor Weber. 2020. Common voice: A massively-multilingual speech corpus. In Proceedings of the Twelfth Language Resources and Evaluation Conference, pages 4218-4222, Marseille, France. European Language Resources Association. +Siddhant Arora, Zhiyun Lu, Chung-Cheng Chiu, Ruoming Pang, and Shinji Watanabe. 2025. Talking turns: Benchmarking audio foundation models on turn-taking dynamics. arXiv preprint arXiv:2503.01174. +Arun Babu, Changhan Wang, Andros Tjandra, Kushal Lakhotia, Qiantong Xu, Naman Goyal, Kritika Singh, Patrick Von Platen, Yatharth Saraf, Juan Pino, et al. 2021. Xls-r: Self-supervised cross-lingual speech representation learning at scale. arXiv preprint arXiv:2111.09296. +Alexei Baevski, Steffen Schneider, and Michael Auli. 2020a. vq-wav2vec: Self-supervised learning of discrete speech representations. In Proceedings of the 8th International Conference on Learning Representations (ICLR). +Alexei Baevski, Yuhao Zhou, Abdelrahman Mohamed, and Michael Auli. 2020b. wav2vec 2.0: A framework for self-supervised learning of speech representations. Advances in neural information processing systems, 33:12449-12460. +Jinze Bai, Shuai Bai, Yunfei Chu, Zeyu Cui, Kai Dang, Xiaodong Deng, Yang Fan, Wenbin Ge, Yu Han, Fei Huang, et al. 2023. Qwen technical report. arXiv preprint arXiv:2309.16609. +James Betker. 2023. Better speech synthesis through scaling. arXiv preprint arXiv:2305.07243. +Zalán Borsos, Raphaël Marinier, Damien Vincent, Eugene Kharitonov, Olivier Pietquin, Matt Sharifi, Dominik Roblek, Olivier Teboul, David Grangier, Marco Tagliasacchi, et al. 2023. Audiolm: a language modeling approach to audio generation. IEEE/ACM transactions on audio, speech, and language processing, 31:2523-2533. +Guoguo Chen, Shuzhou Chai, Guanbo Wang, Jiayu Du, Wei-Qiang Zhang, Chao Weng, Dan Su, Daniel Povey, Jan Trmal, Junbo Zhang, et al. 2021a. Gigaspeech: An evolving, multi-domain asr corpus with 10,000 hours of transcribed audio. In Proceedings of the Annual Conference of the International Speech Communication Association, INTERSPEECH, volume 6, pages 4376-4380. International Speech Communication Association. +Kai Chen, Yunhao Gou, Runhui Huang, Zhili Liu, Daxin Tan, Jing Xu, Chunwei Wang, Yi Zhu, Yihan Zeng, Kuo Yang, et al. 2024a. Emova: Empowering language models to see, hear and speak with vivid emotions. arXiv preprint arXiv:2409.18042. + +Nanxin Chen, Yu Zhang, Heiga Zen, Ron J Weiss, Mohammad Norouzi, and William Chan. 2021b. Wavegrad: Estimating gradients for waveform generation. In Proceedings of the 9th International Conference on Learning Representations (ICLR). +Qian Chen, Yafeng Chen, Yanni Chen, Mengzhe Chen, Yingda Chen, Chong Deng, Zhihao Du, Ruize Gao, Changfeng Gao, Zhifu Gao, et al. 2025. Minmo: A multimodal large language model for seamless voice interaction. arXiv preprint arXiv:2501.06282. +Sanyuan Chen, Chengyi Wang, Zhengyang Chen, Yu Wu, Shujie Liu, Zhuo Chen, Jinyu Li, Naoyuki Kanda, Takuya Yoshioka, Xiong Xiao, et al. 2022a. Wavlm: Large-scale self-supervised pre-training for full stack speech processing. IEEE Journal of Selected Topics in Signal Processing, 16(6):1505-1518. +Wenxi Chen, Ziyang Ma, Ruiqi Yan, Yuzhe Liang, Xiquan Li, Ruiyang Xu, Zhikang Niu, Yanqiao Zhu, Yifan Yang, Zhanxun Liu, et al. 2024b. Slamomni: Timbre-controllable voice interaction system with single-stage training. arXiv preprint arXiv:2412.15649. +Yiming Chen, Xianghu Yue, Chen Zhang, Xiaoxue Gao, Robby T. Tan, and Haizhou Li. 2024c. Voicebench: Benchmarking llm-based voice assistants. CoRR, abs/2410.17196. +Zhehuai Chen, Yu Zhang, Andrew Rosenberg, Bhuvana Ramabhadran, Pedro J. Moreno, Ankur Bapna, and Heiga Zen. 2022b. Maestro: Matched speech text representations through modality matching. In Proceedings of Interspeech, pages 4093-4097. +Ju-Chieh Chou, Chung-Ming Chien, Wei-Ning Hsu, Karen Livescu, Arun Babu, Alexis Conneau, Alexei Baevski, and Michael Auli. 2023. Toward joint language modeling for speech units and text. In *Findings of the Association for Computational Linguistics: EMNLP* 2023, pages 6582-6593, Singapore. Association for Computational Linguistics. +Aakanksha Chowdhery, Sharan Narang, Jacob Devlin, Maarten Bosma, Gaurav Mishra, Adam Roberts, Paul Barham, Hyung Won Chung, Charles Sutton, and Sebastian Gehrmann. 2023. Palm: Scaling language modeling with pathways. Journal of Machine Learning Research, 24(240):1-113. +Joon Son Chung, Arsha Nagrani, and Andrew Zisserman. 2018. Voxceleb2: Deep speaker recognition. In Interspeech 2018, pages 1086-1090. +Yu-An Chung, Yu Zhang, Wei Han, Chung-Cheng Chiu, James Qin, Ruoming Pang, and Yonghui Wu. 2021. W2v-bert: Combining contrastive learning and masked language modeling for self-supervised speech pre-training. In 2021 IEEE Automatic Speech Recognition and Understanding Workshop (ASRU), pages 244-250. IEEE. +Christopher Cieri, David Miller, and Kevin Walker. 2004. The fisher corpus: A resource for the next + +generations of speech-to-text. In LREC, volume 4, pages 69-71. +Ann Clifton, Aasish Pappu, Sravana Reddy, Yongze Yu, Jussi Karlgren, Ben Carterette, and Rosie Jones. 2020. The podcast dataset. arXiv preprint arXiv:2004.04270. +Wenqian Cui, Xiaoqi Jiao, Ziqiao Meng, and Irwin King. 2025. Voxeval: Benchmarking the knowledge understanding capabilities of end-to-end spoken language models. arXiv preprint arXiv:2501.04962. +Alexandre Defossez, Jade Copet, Gabriel Synnaeve, and Yossi Adi. 2023. High fidelity neural audio compression. Transactions on Machine Learning Research. +Alexandre Defossez, Laurent Mazaré, Manu Orsini, Amélie Royer, Patrick Pérez, Hervé Jégou, Edouard Grave, and Neil Zeghidour. 2024. Moshi: a speech-text foundation model for real-time dialogue. Technical report, Kyutai. +Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 4171-4186, Minneapolis, Minnesota. Association for Computational Linguistics. +Chenpeng Du, Yiwei Guo, Feiyu Shen, Zhijun Liu, Zheng Liang, Xie Chen, Shuai Wang, Hui Zhang, and Kai Yu. 2024a. Unicats: A unified context-aware text-to-speech framework with contextual vq-diffusion and vocoding. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 38, pages 17924-17932. +Zhihao Du, Qian Chen, Shiliang Zhang, Kai Hu, Heng Lu, Yexin Yang, Hangrui Hu, Siqi Zheng, Yue Gu, Ziyang Ma, et al. 2024b. Cosyvoice: A scalable multilingual zero-shot text-to-speech synthesizer based on supervised semantic tokens. arXiv preprint arXiv:2407.05407. +Zhihao Du, Jiaming Wang, Qian Chen, Yunfei Chu, Zhifu Gao, Zerui Li, Kai Hu, Xiaohuan Zhou, Jin Xu, Ziyang Ma, Wen Wang, Siqi Zheng, Chang Zhou, Zhijie Yan, and Shiliang Zhang. 2023. LauraGPT: Listen, Attend, Understand, and Regenerate Audio with GPT. https://arxiv.org/abs/2310.04673v4. +Zhihao Du, Yuxuan Wang, Qian Chen, Xian Shi, Xiang Lv, Tianyu Zhao, Zhifu Gao, Yexin Yang, Changfeng Gao, Hui Wang, et al. 2024c. Cosyvoice 2: Scalable streaming speech synthesis with large language models. arXiv preprint arXiv:2412.10117. +Abhimanyu Dubey, Abhinav Jauhri, Abhinav Pandey, Abhishek Kadian, Ahmad Al-Dahle, Aiesha Letman, Akhil Mathur, Alan Schelten, Amy Yang, Angela Fan, et al. 2024. The llama 3 herd of models. arXiv preprint arXiv:2407.21783. + +Ewan Dunbar, Robin Algayres, Julien Karadayi, Mathieu Bernard, Juan Benjumea, Xuan-Nga Cao, Lucie Miskic, Charlotte Dugrain, Lucas Ondel, Alan W. Black, Laurent Besacier, Sakriani Sakti, and Emmanuel Dupoux. 2019. The zero resource speech challenge 2019: Tts without t. In Interspeech 2019, pages 1088-1092. +Paul-Ambroise Duquenne, Kevin Heffernan, Alexandre Mourachko, Benoit Sagot, and Holger Schwenk. 2023. Sonar expressive: Zero-shot expressive speech-to-speech translation. Meta AI Research. +Qingkai Fang, Shoutao Guo, Yan Zhou, Zhengrui Ma, Shaolei Zhang, and Yang Feng. 2024. Llama-omni: Seamless speech interaction with large language models. arXiv preprint arXiv:2409.06666. +Yassir Fathullah, Chunyang Wu, Egor Lakomkin, Ke Li, Junteng Jia, Yuan Shangguan, Jay Mahadeokar, Ozlem Kalinli, Christian Fuegen, and Mike Seltzer. 2024. Audiochatllama: Towards general-purpose speech abilities for llms. In Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), pages 5522-5532. +Chaoyou Fu, Haojia Lin, Zuwei Long, Yunhang Shen, Meng Zhao, Yifan Zhang, Xiong Wang, Di Yin, Long Ma, Xiawu Zheng, et al. 2024. Vita: Towards open-source interactive omni multimodal llm. arXiv preprint arXiv:2408.05211. +Daniel Galvez, Greg Diamos, Juan Ciro, Juan Felipe Cerón, Keith Achorn, Anjali Gopi, David Kanter, Maximilian Lam, Mark Mazumder, and Vijay Janapa Reddi. 2021. The people's speech: A large-scale diverse english speech recognition dataset for commercial usage. In Proceedings of the 35th Annual Conference on Neural Information Processing Systems (NeurIPS). +Zhifu Gao, Shiliang Zhang, Ming Lei, and Ian McLoughlin. 2020. San-m: Memory equipped self-attention for end-to-end speech recognition. arXiv preprint arXiv:2006.01713. +Team GLM, Aohan Zeng, Bin Xu, Bowen Wang, Chenhui Zhang, Da Yin, Dan Zhang, Diego Rojas, Guanyu Feng, Hanlin Zhao, et al. 2024. Chatglm: A family of large language models from glm-130b to glm-4 all tools. arXiv preprint arXiv:2406.12793. +Daniel Griffin and Jae Lim. 1984. Signal estimation from modified short-time fourier transform. IEEE Transactions on acoustics, speech, and signal processing, 32(2):236-243. +Albert Gu and Tri Dao. 2024. Mamba: Linear-time sequence modeling with selective state spaces. In First Conference on Language Modeling. +Michael Hassid, Tal Remez, Tu Anh Nguyen, Itai Gat, Alexis Conneau, Felix Kreuk, Jade Copet, Alexandre Defossez, Gabriel Synnaeve, Emmanuel Dupoux, + +et al. 2024. Textually pretrained speech language models. Advances in Neural Information Processing Systems, 36. +Wei-Ning Hsu, Benjamin Bolte, Yao-Hung Hubert Tsai, Kushal Lakhotia, Ruslan Salakhutdinov, and Abdelrahman Mohamed. 2021. Hubert: Self-supervised speech representation learning by masked prediction of hidden units. IEEE/ACM transactions on audio, speech, and language processing, 29:3451-3460. +Chien-yu Huang, Wei-Chih Chen, Shu-wen Yang, Andy T Liu, Chen-An Li, Yu-Xiang Lin, Wei-Cheng Tseng, Anuj Diwan, Yi-Jen Shih, Jiatong Shi, et al. 2024a. Dynamic-superb phase-2: A collaboratively expanding benchmark for measuring the capabilities of spoken language models with 180 tasks. arXiv preprint arXiv:2411.05361. +Rongjie Huang, Mingze Li, Dongchao Yang, Jia-tong Shi, Xuankai Chang, Zhenhui Ye, Yuning Wu, Zhiqing Hong, Jiawei Huang, Jinglin Liu, et al. 2024b. Audiogpt: Understanding and generating speech, music, sound, and talking head. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 38, pages 23802-23804. +Wen-Chin Huang, Yi-Chiao Wu, Hsin-Te Hwang, Patrick Lumban Tobing, Tomoki Hayashi, Kazuhiro Kobayashi, Tomoki Toda, Yu Tsao, and Hsin-Min Wang. 2019. Refined wavenet vocoder for variational autoencoder based voice conversion. In 2019 27th European Signal Processing Conference (EUSIPCO), pages 1-5. IEEE. +Wenyong Huang, Zhenhe Zhang, Yu Ting Yeung, Xin Jiang, and Qun Liu. 2022. Spiral: Self-supervised perturbation-invariant representation learning for speech pre-training. arXiv preprint arXiv:2201.10207. +Herve Jegou, Matthijs Douze, and Cordelia Schmid. 2010. Product quantization for nearest neighbor search. IEEE transactions on pattern analysis and machine intelligence, 33(1):117-128. +Ye Jia, Michelle Tadmor Ramanovich, Quan Wang, and Heiga Zen. 2022. CVSS corpus and massively multilingual speech-to-speech translation. In Proceedings of the Thirteenth Language Resources and Evaluation Conference, pages 6691-6703, Marseille, France. European Language Resources Association. +Albert Q. Jiang, Alexandre Sablayrolles, Antoine Roux, Arthur Mensch, Blanche Savary, Chris Bamford, Devendra Singh Chaplot, Diego de las Casas, Emma Bou Hanna, Florian Bressand, Gianna Lengyel, Guillaume Bour, Guillaume Lample, Lélio Renard Lavaud, Lucile Saulnier, Marie-Anne Lachaux, Pierre Stock, Sandeep Subramanian, Sophia Yang, Szymon Antoniak, Teven Le Scao, Théophile Gervet, Thibaut Lavril, Thomas Wang, Timothée Lacroix, and William El Sayed. 2024. Mixtral of Experts. Preprint, arxiv:2401.04088. + +Jacob Kahn, Morgane Riviere, Weiyi Zheng, Evgeny Kharitonov, Qiantong Xu, Pierre-Emmanuel Mazaré, Julien Karadayi, Vitaliy Liptchinsky, Ronan Collobert, Christian Fuegen, et al. 2020. Libri-light: A benchmark for asr with limited or no supervision. In ICASSP 2020-2020 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 7669-7673. IEEE. +Eugene Kharitonov, Ann Lee, Adam Polyak, Yossi Adi, Jade Copet, Kushal Lakhotia, Tu Anh Nguyen, Morgane Riviere, Abdelrahman Mohamed, Emmanuel Dupoux, and Wei-Ning Hsu. 2022. Text-free prosody-aware generative spoken language modeling. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 8666-8681, Dublin, Ireland. Association for Computational Linguistics. +Heeseung Kim, Soonshin Seo, Kyeongseok Jeong, Ohsung Kwon, Soyoon Kim, Jungwhan Kim, Jaehong Lee, Eunwoo Song, Myungwoo Oh, Jung-Woo Ha, et al. 2024. Paralinguistics-aware speech-empowered large language models for natural conversation. arXiv preprint arXiv:2402.05706. +Jaehyeon Kim, Jungil Kong, and Juhee Son. 2021a. Conditional variational autoencoder with adversarial learning for end-to-end text-to-speech. In International Conference on Machine Learning, pages 5530-5540. PMLR. +Ji-Hoon Kim, Sang-Hoon Lee, Ji-Hyun Lee, and Seong-Whan Lee. 2021b. Fre-gan: Adversarial frequency-consistent audio synthesis. In Proceedings of Interspeech, pages 2197-2201. +Yuma Koizumi, Kohei Yatabe, Heiga Zen, and Michiel Bacchiani. 2023. Wavefit: An iterative and non-autoregressive neural vocoder based on fixed-point iteration. In 2022 IEEE Spoken Language Technology Workshop (SLT), pages 884-891. IEEE. +Jungil Kong, Jaehyeon Kim, and Jaekyoung Bae. 2020. Hifi-gan: Generative adversarial networks for efficient and high fidelity speech synthesis. Advances in neural information processing systems, 33:17022-17033. +Zhifeng Kong, Wei Ping, Jiaji Huang, Kexin Zhao, and Bryan Catanzaro. 2021. Diffwave: A versatile diffusion model for audio synthesis. In Proceedings of the 9th International Conference on Learning Representations (ICLR). +Kundan Kumar, Rithesh Kumar, Thibault De Boissiere, Lucas Gestin, Wei Zhen Teoh, Jose Sotelo, Alexandre De Brebisson, Yoshua Bengio, and Aaron C Courville. 2019. Melgan: Generative adversarial networks for conditional waveform synthesis. Advances in neural information processing systems, 32. +Rithesh Kumar, Prem Seetharaman, Alejandro Luebs, Ishaan Kumar, and Kundan Kumar. 2023. High-fidelity audio compression with improved RVQGAN. In Thirty-seventh Conference on Neural Information Processing Systems. + +Kushal Lakhotia, Eugene Kharitonov, Wei-Ning Hsu, Yossi Adi, Adam Polyak, Benjamin Bolte, Tu-Anh Nguyen, Jade Copet, Alexei Baevski, Abdelrahman Mohamed, et al. 2021. On generative spoken language modeling from raw audio. Transactions of the Association for Computational Linguistics, 9:1336-1354. +Hang Le, Juan Pino, Changhan Wang, Jiatao Gu, Didier Schwab, and Laurent Besacier. 2020. Dual-decoder transformer for joint automatic speech recognition and multilingual speech translation. In Proceedings of the 28th International Conference on Computational Linguistics, pages 3520-3533, Barcelona, Spain (Online). International Committee on Computational Linguistics. +Matthew Le, Apoorv Vyas, Bowen Shi, Brian Karrer, Leda Sari, Rashel Moritz, Mary Williamson, Vimal Manohar, Yossi Adi, and Jay Mahadeokar. 2024. Voicebox: Text-guided multilingual universal speech generation at scale. Advances in neural information processing systems, 36. +Matthew Le, Apoorv Vyas, Bowen Shi, Brian Karrer, Leda Sari, Rashel Moritz, Mary Williamson, Vimal Manohar, Yossi Adi, Jay Mahadeokar, et al. 2023. Voicebox: Text-guided multilingual universal speech generation at scale. Advances in neural information processing systems, 36:14005-14034. +Sang-gil Lee, Heeseung Kim, Chaehun Shin, Xu Tan, Chang Liu, Qi Meng, Tao Qin, Wei Chen, Sungroh Yoon, and Tie-Yan Liu. 2022. Priorgrad: Improving conditional denoising diffusion models with data-dependent adaptive prior. In Proceedings of the 10th International Conference on Learning Representations (ICLR). +Sang-gil Lee, Wei Ping, Boris Ginsburg, Bryan Catanzaro, and Sungroh Yoon. 2023. Bigvgan: A universal neural vocoder with large-scale training. In Proceedings of the 11th International Conference on Learning Representations (ICLR). +Jiaqi Li, Dongmei Wang, Xiaofei Wang, Yao Qian, Long Zhou, Shujie Liu, Mdia Yousefi, Canrun Li, Chung-Hsien Tsai, Zhen Xiao, et al. 2024. Investigating neural audio CODECs for speech language model-based speech generation. arXiv preprint arXiv:2409.04016. +Yinghao Aaron Li, Cong Han, Xilin Jiang, and Nima Mesgarani. 2023. Hiftnet: A fast high-quality neural vocoder with harmonic-plus-noise filter and inverse short time fourier transform. arXiv preprint arXiv:2309.09493. +Guan-Ting Lin, Jiachen Lian, Tingle Li, Qirui Wang, Gopala Anumanchipalli, Alexander H Liu, and Hung-yi Lee. 2025. Full-duplex-bench: A benchmark to evaluate full-duplex spoken dialogue models on turn-taking capabilities. arXiv preprint arXiv:2503.04721. +Guan-Ting Lin, Prashanth Gurunath Shivakumar, Aditya Gourav, Yile Gu, Ankur Gandhe, Hung-yi + +Lee, and Ivan Bulyko. 2024. Align-slm: Textless spoken language models with reinforcement learning from ai feedback. arXiv preprint arXiv:2411.01834. +Ziyang Ma, Yakun Song, Chenpeng Du, Jian Cong, Zhuo Chen, Yuping Wang, Yuxuan Wang, and Xie Chen. 2024. Language model can listen while speaking. arXiv preprint arXiv:2408.02622. +Gallil Maimon, Amit Roth, and Yossi Adi. 2024. A suite for acoustic language model evaluation. arXiv preprint arXiv:2409.07437. +Soumi Maiti, Yifan Peng, Shukjae Choi, Jee-weon Jung, Xuankai Chang, and Shinji Watanabe. 2024. Voxtlm: Unified decoder-only models for consolidating speech recognition, synthesis and speech, text continuation tasks. In ICASSP 2024-2024 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 13326-13330. IEEE. +Ziqiao Meng, Qichao Wang, Wenqian Cui, Yifei Zhang, Bingzhe Wu, Irwin King, Liang Chen, and Peilin Zhao. 2024. Parrot: Autoregressive spoken dialogue language modeling with decoder-only transformers. In Audio Imagination: NeurIPS 2024 Workshop AI-Driven Speech, Music, and Sound Generation. +Shervin Minaee, Tomas Mikolov, Narjes Nikzad, Meysam Chenaghlu, Richard Socher, Xavier Amatriain, and Jianfeng Gao. 2024. Large language models: A survey. arXiv preprint arXiv:2402.06196. +Kentaro Mitsui, Koh Mitsuda, Toshiaki Wakatsuki, Yukiya Hono, and Kei Sawada. 2024. Pslm: Parallel generation of text and speech with llms for low-latency spoken dialogue systems. arXiv preprint arXiv:2406.12428. +Gabriel Mittag, Babak Naderi, Assmaa Chehadi, and Sebastian Møller. 2021. Nisqa: A deep cnn-self-attention model for multidimensional speech quality prediction with crowdsourced datasets. In Proceedings of Interspeech 2021, pages 2127-2131. +Masanori Morise, Fumiya Yokomori, and Kenji Ozawa. 2016. World: a vocoder-based high-quality speech synthesis system for real-time applications. *IE-ICE TRANSACTIONS on Information and Systems*, 99(7):1877–1884. +Eliya Nachmani, Alon Levkovitch, Roy Hirsch, Julian Salazar, Chulayuth Asawaroengchai, Soroosh Mariooryad, Ehud Rivlin, RJ Skerry-Ryan, and Michelle Tadmor Ramanovich. 2024. Spoken question answering and speech continuation using spectrogram-powered llm. In Proceedings of the 12th International Conference on Learning Representations (ICLR). +Arsha Nagrani, Joon Son Chung, and Andrew Zisserman. 2017. Voxceleb: a large-scale speaker identification dataset. arXiv preprint arXiv:1706.08612. + +Tu Anh Nguyen, Maureen de Seyssel, Patricia Rozé, Morgane Rivière, Evgeny Kharitonov, Alexei Baevski, Ewan Dunbar, and Emmanuel Dupoux. 2020. The zero resource speech benchmark 2021: Metrics and baselines for unsupervised spoken language modeling. In Proceedings of the Workshop on Self-Supervised Learning for Speech and Audio Processing. NeurIPS. +Tu Anh Nguyen, Wei-Ning Hsu, Antony d'Avirro, Bowen Shi, Itai Gat, Maryam Fazel-Zarani, Tal Remez, Jade Copet, Gabriel Synnaeve, Michael Hassid, et al. 2023a. Expresso: A benchmark and analysis of discrete expressive speech resynthesis. In Proceedings of INTERSPEECH 2023, pages 4823-4827. +Tu Anh Nguyen, Eugene Kharitonov, Jade Copet, Yossi Adi, Wei-Ning Hsu, Ali Elkahky, Paden Tomasello, Robin Algayres, Benoit Sagot, Abdelrahman Mohamed, et al. 2023b. Generative spoken dialogue language modeling. Transactions of the Association for Computational Linguistics, 11:250-266. +Tu Anh Nguyen, Benjamin Muller, Bokai Yu, Marta R Costa-Jussa, Maha Elbayad, Sravya Popuri, Paul Ambroise Duquenne, Robin Algayres, Ruslan Mavlyutov, Itai Gat, et al. 2024. Spirit-lm: Interleaved spoken and written language model. arXiv preprint arXiv:2402.05755. +Aaron van den Oord, Sander Dieleman, Heiga Zen, Karen Simonyan, Oriol Vinyals, Alex Graves, Nal Kalchbrenner, Andrew Senior, and Koray Kavukcuoglu. 2016. Wavenet: A generative model for raw audio. In Proc. 9th ISCA Workshop on Speech Synthesis Workshop (SSW 9), page 125. +Aaron van den Oord, Yazhe Li, and Oriol Vinyals. 2018. Representation learning with contrastive predictive coding. arXiv preprint arXiv:1807.03748. +OpenAI. 2024. Gpt-4o system card. Online; Accessed on 6-September-2024. +OpenBMB. 2024. Minicpm-o 2.6: A gpt-4.0 level mllm for vision, speech, and multimodal live streaming on your phone. https://huggingface.co/openbmb/ MiniCPM-o-2_6-int4. +Jing Pan, Jian Wu, Yashesh Gaur, Sunit Sivasankaran, Zhuo Chen, Shujie Liu, and Jinyu Li. 2023. Cosmic: Data efficient instruction-tuning for speech in-context learning. arXiv preprint arXiv:2311.02248. +Vassil Panayotov, Guoguo Chen, Daniel Povey, and Sanjeev Khudanpur. 2015. Librispeech: an asr corpus based on public domain audio books. In 2015 IEEE international conference on acoustics, speech and signal processing (ICASSP), pages 5206-5210. IEEE. +Se Jin Park, Chae Won Kim, Hyeongseop Rha, Minsu Kim, Joanna Hong, Jeong Hun Yeo, and Yong Man Ro. 2024. Let's go real talk: Spoken dialogue model for face-to-face conversation. arXiv preprint arXiv:2406.07867. + +Puyuan Peng, Po-Yao Huang, Shang-Wen Li, Abdelrahman Mohamed, and David Harwath. 2024. Voice-Craft: Zero-shot speech editing and text-to-speech in the wild. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 12442-12462, Bangkok, Thailand. Association for Computational Linguistics. +Adam Polyak, Yossi Adi, Jade Copet, Eugene Kharitonov, Kushal Lakhotia, Wei-Ning Hsu, Abdelrahman Mohamed, and Emmanuel Dupoux. 2021. Speech resynthesis from discrete disentangled self-supervised representations. In Proc. Interspeech 2021, pages 3615-3619. +Vineel Pratap, Qiantong Xu, Anuroop Sriram, Gabriel Synnaeve, and Ronan Collobert. 2020. Mls: A largescale multilingual dataset for speech research. In Interspeech 2020, pages 2757-2761. +Ryan Prenger, Rafael Valle, and Bryan Catanzaro. 2019. Waveglow: A flow-based generative network for speech synthesis. In ICASSP 2019-2019 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 3617-3621. IEEE. +Alec Radford, Jong Wook Kim, Tao Xu, Greg Brockman, Christine McLeavey, and Ilya Sutskever. 2023. Robust speech recognition via large-scale weak supervision. In International Conference on Machine Learning, pages 28492-28518. PMLR. +Rafael Rafailov, Archit Sharma, Eric Mitchell, Christopher D. Manning, Stefano Ermon, and Chelsea Finn. 2023. Direct preference optimization: Your language model is secretly a reward model. In Advances in Neural Information Processing Systems 36: Annual Conference on Neural Information Processing Systems 2023, NeurIPS 2023, New Orleans, LA, USA, December 10 - 16, 2023. +Yong Ren, Tao Wang, Jiangyan Yi, Le Xu, Jianhua Tao, Chu Yuan Zhang, and Junzuo Zhou. 2024. Fewer token neural speech codec with time-invariant codes. In ICASSP 2024-2024 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 12737-12741. IEEE. +Paul K Rubenstein, Chulayuth Asawaroengchai, Duc Dung Nguyen, Ankur Bapna, Zalán Borsos, Félix de Chaumont Qutry, Peter Chen, Dalia El Badawy, Wei Han, Eugene Kharitonov, et al. 2023. Audiopalm: A large language model that can speak and listen. arXiv preprint arXiv:2306.12925. +S Sakshi, Utkarsh Tyagi, Sonal Kumar, Ashish Seth, Ramaneswaran Selvakumar, Oriol Nieto, Ramani Duraiswami, Sreyan Ghosh, and Dinesh Manocha. 2024. Mmau: A massive multi-task audio understanding and reasoning benchmark. arXiv preprint arXiv:2410.19168. +Kei Sawada, Tianyu Zhao, Makoto Shing, Kentaro Mitsui, Akio Kaga, Yukiya Hono, Toshiaki Wakatsuki, and Koh Mitsuda. 2024. Release of pre-trained models for the japanese language. arXiv preprint arXiv:2404.01657. + +John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. 2017. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347. +Jonathan Shen, Ruoming Pang, Ron J Weiss, Mike Schuster, Navdeep Jaitly, Zongheng Yang, Zhifeng Chen, Yu Zhang, Yuxuan Wang, Rj Skerrv-Ryan, et al. 2018. Natural tts synthesis by conditioning wavenet on mel spectrogram predictions. In 2018 IEEE international conference on acoustics, speech and signal processing (ICASSP), pages 4779-4783. IEEE. +Yongliang Shen, Kaitao Song, Xu Tan, Dongsheng Li, Weiming Lu, and Yueting Zhuang. 2024. Hugginggpt: Solving ai tasks with chatgpt and its friends in hugging face. Advances in Neural Information Processing Systems, 36. +Bowen Shi, Wei-Ning Hsu, Kushal Lakhotia, and Abdelrahman Mohamed. 2022. Learning audio-visual speech representation by masked multimodal cluster prediction. arXiv preprint arXiv:2201.02184. +Tongyi SpeechTeam. 2024. FunAudioLLM: Voice Understanding and Generation Foundation Models for Natural Interaction Between Humans and LLMs. arXiv preprint arXiv:2407.04051. +Changli Tang, Wenyi Yu, Guangzhi Sun, Xianzhao Chen, Tian Tan, Wei Li, Lu Lu, Zejun Ma, and Chao Zhang. 2024. SALMONN: Towards Generic Hearing Abilities for Large Language Models. In Proceedings of the 12th International Conference on Learning Representations (ICLR). +Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothee Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, et al. 2023a. Llama: Open and efficient foundation language models. arXiv preprint arXiv:2302.13971. +Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, et al. 2023b. Llama 2: Open foundation and fine-tuned chat models. arXiv preprint arXiv:2307.09288. +Aaron Van Den Oord, Oriol Vinyals, et al. 2017. Neural discrete representation learning. Advances in neural information processing systems, 30. +Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. In Advances in Neural Information Processing Systems, volume 30. Curran Associates, Inc. +Christophe Veaux, Junichi Yamagishi, and Simon King. 2013. The voice bank corpus: Design, collection and data analysis of a large regional accent speech database. In 2013 international conference oriental COCOSDA held jointly with 2013 conference on + +Asian spoken language research and evaluation (O-COCOSDA/CASLRE), pages 1-4. IEEE. +Bandhav Veluri, Benjamin N Peloquin, Bokai Yu, Hongyu Gong, and Shyamnath Gollakota. 2024. Beyond turn-based interfaces: Synchronous LLMs as full-duplex dialogue agents. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, pages 21390-21402, Miami, Florida, USA. Association for Computational Linguistics. +Maarten Versteegh, Xavier Anguera, Aren Jansen, and Emmanuel Dupoux. 2016. The zero resource speech challenge 2015: Proposed approaches and results. Procedia Computer Science, 81:67-72. SLTU-2016 5th Workshop on Spoken Language Technologies for Under-resourced languages 09-12 May 2016. Yokagarta, Indonesia. +Bin Wang, Xunlong Zou, Geyu Lin, Shuo Sun, Zhuohan Liu, Wenyu Zhang, Zhengyuan Liu, AiTi Aw, and Nancy F Chen. 2024a. Audiobench: A universal benchmark for audio large language models. arXiv preprint arXiv:2406.16020. +Changhan Wang, Morgane Riviere, Ann Lee, Anne Wu, Chaitanya Talnikar, Daniel Haziza, Mary Williamson, Juan Pino, and Emmanuel Dupoux. 2021a. VoxPopuli: A large-scale multilingual speech corpus for representation learning, semi-supervised learning and interpretation. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 993-1003, Online. Association for Computational Linguistics. +Changhan Wang, Anne Wu, and Juan Pino. 2021b. Covost 2 and massively multilingual speech-to-text translation. In Proc. Interspeech 2021, pages 2247-2251. +Peng Wang, Shuai Bai, Sinan Tan, Shijie Wang, Zhihao Fan, Jinze Bai, Keqin Chen, Xuejing Liu, Jialin Wang, Wenbin Ge, Yang Fan, Kai Dang, Mengfei Du, Xuancheng Ren, Rui Men, Dayiheng Liu, Chang Zhou, Jingren Zhou, and Junyang Lin. 2024b. Qwen2-vl: Enhancing vision-language model's perception of the world at any resolution. arXiv preprint arXiv:2409.12191. +Tianrui Wang, Long Zhou, Ziqiang Zhang, Yu Wu, Shujie Liu, Yashesh Gaur, Zhuo Chen, Jinyu Li, and Furu Wei. 2024c. Viola: Conditional language models for speech recognition, synthesis, and translation. IEEE/ACM Transactions on Audio, Speech, and Language Processing. +Xiong Wang, Yangze Li, Chaoyou Fu, Lei Xie, Ke Li, Xing Sun, and Long Ma. 2024d. Freezeomni: A smart and low latency speech-to-speech dialogue model with frozen llm. arXiv preprint arXiv:2411.00774. +Zhifei Xie and Changqiao Wu. 2024a. Mini-Omni: Language Models Can Hear, Talk While Thinking in Streaming. arXiv preprint arXiv:2408.16725. + +Zhifei Xie and Changqiao Wu. 2024b. Mini-omni2: Towards open-source gpt-4o with vision, speech and duplex capabilities. arXiv preprint arXiv:2410.11190. +An Yang, Baosong Yang, Binyuan Hui, Bo Zheng, Bowen Yu, Chang Zhou, Chengpeng Li, Chengyuan Li, Dayiheng Liu, Fei Huang, et al. 2024a. Qwen2 technical report. arXiv preprint arXiv:2407.10671. +An Yang, Baosong Yang, Beichen Zhang, Binyuan Hui, Bo Zheng, Bowen Yu, Chengyuan Li, Dayiheng Liu, Fei Huang, Haoran Wei, Huan Lin, Jian Yang, Jianhong Tu, Jianwei Zhang, Jianxin Yang, Jiaxi Yang, Jingren Zhou, Junyang Lin, Kai Dang, Keming Lu, Keqin Bao, Kexin Yang, Le Yu, Mei Li, Mingfeng Xue, Pei Zhang, Qin Zhu, Rui Men, Runji Lin, Tianhao Li, Tianyi Tang, Tingyu Xia, Xingzhang Ren, Xuancheng Ren, Yang Fan, Yang Su, Yichang Zhang, Yu Wan, Yuqiong Liu, Zeyu Cui, Zhenru Zhang, Zihan Qiu, et al. 2024b. Qwen2.5 technical report. arXiv preprint arXiv:2412.15115. Version 2, revised 3 Jan 2025. +Dongchao Yang, Songxiang Liu, Rongjie Huang, Jinchuan Tian, Chao Weng, and Yuexian Zou. 2023a. Hifi-codec: Group-residual vector quantization for high fidelity audio codec. arXiv preprint arXiv:2305.02765. +Dongchao Yang, Jinchuan Tian, Xu Tan, Rongjie Huang, Songxiang Liu, Xuankai Chang, Jiatong Shi, Sheng Zhao, Jiang Bian, and Xixin Wu. 2023b. Uniaudio: An audio foundation model toward universal audio generation. arXiv preprint arXiv:2310.00704. +Qian Yang, Jin Xu, Wenrui Liu, Yunfei Chu, Ziyue Jiang, Xiaohuan Zhou, Yichong Leng, Yuanjun Lv, Zhou Zhao, Chang Zhou, et al. 2024c. Airbench: Benchmarking large audio-language models via generative comprehension. arXiv preprint arXiv:2402.07729. +Shu-wen Yang, Po-Han Chi, Yung-Sung Chuang, Cheng-I Jeff Lai, Kushal Lakhotia, Yist Y Lin, Andy T Liu, Jiatong Shi, Xuankai Chang, Guan-Ting Lin, et al. 2021. Superb: Speech processing universal performance benchmark. In Proc. Interspeech, pages 1194-1198. +Wenyi Yu, Siyin Wang, Xiaoyu Yang, Xianzhao Chen, Xiaohai Tian, Jun Zhang, Guangzhi Sun, Lu Lu, Yuxuan Wang, and Chao Zhang. 2024. Salmonn-omni: A codec-free llm for full-duplex speech understanding and generation. arXiv preprint arXiv:2411.18138. +Ze Yuan, Yanqing Liu, Shujie Liu, and Sheng Zhao. 2024. Continuous speech tokens makes llms robust multi-modality learners. arXiv preprint arXiv:2412.04917. +Neil Zeghidour, Alejandro Luebs, Ahmed Omran, Jan Skoglund, and Marco Tagliasacchi. 2021. Soundstream: An end-to-end neural audio codec. IEEE/ACM Transactions on Audio, Speech, and Language Processing, 30:495-507. + +Heiga Zen, Viet Dang, Rob Clark, Yu Zhang, Ron J Weiss, Ye Jia, Zhifeng Chen, and Yonghui Wu. 2019. Libritts: A corpus derived from librispeech for text-to-speech. In Proc. Interspeech 2019, pages 1526-1530. +Aohan Zeng, Zhengxiao Du, Mingdao Liu, Kedong Wang, Shengmin Jiang, Lei Zhao, Yuxiao Dong, and Jie Tang. 2024a. Glm-4-voice: Towards intelligent and human-like end-to-end spoken chatbot. arXiv preprint arXiv:2412.02612. +Aohan Zeng, Zhengxiao Du, Mingdao Liu, Lei Zhang, Shengmin Jiang, Yuxiao Dong, and Jie Tang. 2024b. Scaling speech-text pre-training with synthetic interleaved data. arXiv preprint arXiv:2411.17607. +Jun Zhan, Junqi Dai, Jiasheng Ye, Yunhua Zhou, Dong Zhang, Zhigeng Liu, Xin Zhang, Ruibin Yuan, Ge Zhang, Linyang Li, et al. 2024. Anygpt: Unified multimodal llm with discrete sequence modeling. arXiv preprint arXiv:2402.12226. +Binbin Zhang, Hang Lv, Pengcheng Guo, Qijie Shao, Chao Yang, Lei Xie, Xin Xu, Hui Bu, Xiaoyu Chen, Chenchen Zeng, et al. 2022a. Wenetspeech: A $10000+$ hours multi-domain mandarin corpus for speech recognition. In ICASSP 2022-2022 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 6182-6186. IEEE. +Dong Zhang, Shimin Li, Xin Zhang, Jun Zhan, Pengyu Wang, Yaqian Zhou, and Xipeng Qiu. 2023a. SpeechGPT: Empowering large language models with intrinsic cross-modal conversational abilities. In Findings of the Association for Computational Linguistics: EMNLP 2023, pages 15757-15773, Singapore. Association for Computational Linguistics. +Dong Zhang, Zhaowei Li, Shimin Li, Xin Zhang, Pengyu Wang, Yaqian Zhou, and Xipeng Qiu. 2024a. Speechalign: Aligning speech generation to human preferences. In Proceedings of the 38th Conference on Neural Information Processing Systems (NeurIPS 2024). Poster presentation on December 11, 2024, from 11 a.m. to 2 p.m. PST. +Dong Zhang, Xin Zhang, Jun Zhan, Shimin Li, Yaqian Zhou, and Xipeng Qiu. 2024b. Speechgpt-gen: Scaling chain-of-information speech generation. arXiv preprint arXiv:2401.13527. +Qinglin Zhang, Luyao Cheng, Chong Deng, Qian Chen, Wen Wang, Siqi Zheng, Jiaqing Liu, Hai Yu, and Chaohong Tan. 2024c. Omniflatten: An end-to-end gpt model for seamless voice conversation. arXiv preprint arXiv:2410.17799. +Susan Zhang, Stephen Roller, Naman Goyal, Mikel Artetxe, Moya Chen, Shuohui Chen, Christopher Dewan, Mona Diab, Xian Li, Xi Victoria Lin, et al. 2022b. Opt: Open pre-trained transformer language models. arXiv preprint arXiv:2205.01068. +Xin Zhang, Xiang Lyu, Zhihao Du, Qian Chen, Dong Zhang, Hangrui Hu, Chaohong Tan, Tianyu Zhao, + +Yuxuan Wang, Bin Zhang, et al. 2024d. Intrinsicvoice: Empowering llms with intrinsic real-time voice interaction abilities. arXiv preprint arXiv:2410.08035. +Xin Zhang, Dong Zhang, Shimin Li, Yaqian Zhou, and Xipeng Qiu. 2024e. Speechtokenizer: Unified speech tokenizer for speech large language models. In Proceedings of the 12th International Conference on Learning Representations (ICLR). +Yu Zhang, Wei Han, James Qin, Yongqiang Wang, Ankur Bapna, Zhehuai Chen, Nanxin Chen, Bo Li, Vera Axelrod, Gary Wang, et al. 2023b. Google usm: Scaling automatic speech recognition beyond 100 languages. arXiv preprint arXiv:2303.01037. +Wayne Xin Zhao, Kun Zhou, Junyi Li, Tianyi Tang, Xiaolei Wang, Yupeng Hou, Yingqian Min, Beichen Zhang, Junjie Zhang, Zican Dong, et al. 2023. A survey of large language models. arXiv preprint arXiv:2303.18223. +Zhisheng Zhong, Chengyao Wang, Yuqi Liu, Senqiao Yang, Longxiang Tang, Yuechen Zhang, Jingyao Li, Tianyuan Qu, Yanwei Li, Yukang Chen, et al. 2024. Lyra: An efficient and speech-centric framework for omni-cognition. arXiv preprint arXiv:2412.09501. +Yongxin Zhu, Dan Su, Liqiang He, Linli Xu, and Dong Yu. 2024. Generative pre-trained speech language model with efficient hierarchical transformer. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1764-1775, Bangkok, Thailand. Association for Computational Linguistics. + +# A GAN-based Vocoder Loss Functions + +To utilize GAN to synthesize high-fidelity speech, various training objectives are designed, focusing on different aspects. First, GAN loss is utilized as the fundamental objective for the operation of the generator and the discriminator. Specifically, the typical choice of the GAN loss for the generator $(G)$ and discriminator $(D)$ is to use the least squares loss function. The GAN loss for the generator $(\mathcal{L}_{\mathrm{GAN}}(G))$ and the discriminator $(\mathcal{L}_{\mathrm{GAN}}(D))$ are + +$$ +\mathcal {L} _ {\mathrm {G A N}} (G) = \mathbb {E} _ {m s} \left[ \bigl (D (G (m s)) - 1 \bigr) ^ {2} \right] \qquad (1) +$$ + +and + +$$ +\mathcal {L} _ {\mathrm {G A N}} (D) = \mathbb {E} _ {(x, m s)} \left[ (D (x) - 1) ^ {2} + (D (G (m s))) ^ {2} \right], \tag {2} +$$ + +respectively. In these loss functions, $x$ represents the ground truth audio and $ms$ represents its mel-spectrogram. Second, most GAN-based vocoders synthesize speech waveform from mel-spectrograms, so mel-spectrogram loss is proposed to align the mel-spectrogram synthesized by the generator and the mel-spectrogram transformed from the ground-truth waveform, in order to improve the fidelity of the generated speech. Mel-spectrogram loss $(\mathcal{L}_{\mathrm{Mel}}(G))$ works by minimizing the L1 distance between the two versions of mel-spectrograms mentioned above. Its formula is shown below: + +$$ +\mathcal {L} _ {\mathrm {M e l}} (G) = \mathbb {E} _ {(x, m s)} \left[ \| \phi (x) - \phi (G (m s)) \| _ {1} \right], \tag {3} +$$ + +where $\phi (\cdot)$ is the function to transform a waveform into the corresponding mel-spectrogram. Third, to further enhance the generation fidelity, feature matching loss $(\mathcal{L}_{FM}(G))$ is proposed to align the discriminator-encoded features of the ground truth sample and the generated sample with L1 distance, which has the following formula: + +$$ +\mathcal {L} _ {F M} (G) = \mathbb {E} _ {(x, m s)} \left[ \sum_ {i = 1} ^ {T} \frac {1}{N _ {i}} \left\| D ^ {i} (x) - D ^ {i} (G (m s)) \right\| _ {1} \right], \tag {4} +$$ + +where $D^{i}(\cdot)$ and $N_{i}$ denote the features and the number of features in the $i$ -th layer of the discriminator, respectively. + +# B Other Vocoders + +The variety of vocoders is not restricted to the ones mentioned in Section 3.3, as those are the ones commonly employed in SpeechLMs. This section briefly outlines other potential vocoder + +types that are seldom explored as a component in SpeechLMs. + +GAN-based Neural Audio Codec. Given that many neural audio CODECs employ a GAN architecture, they can be effectively discussed within the context of GAN-based vocoders. Similar to its role as a tokenizer, although the primary objective of neural audio CODECs is for audio compression, the encoded compact token sequences capture the essential information buried in the audio waveforms and therefore the codec decoder can be leveraged as a vocoder in SpeechLMs to transform the tokens into speech waveforms. EnCodec (Défossez et al., 2023) uses a GAN architecture and proposes a novel generator including an encoder, a quantizer, and a decoder. The compressed audio representations are outputted by the quantizer by using Residual Vector Quantization (RVQ). Polyak et al. utilizes HiFi-GAN (Kong et al., 2020) as the vocoder backbone and proposes to disentangle the input features of a vocoder into distinct properties (Polyak et al., 2021), which include semantic tokens, pitch tokens, and speaker embeddings. Such a design choice enables the codec to better perform on pitch and speaker-related tasks such as voice conversion and $F_{0}$ manipulation. + +Pure Signal Processing Vocoder. Pure signal processing vocoders are traditional methods that rely on deterministic algorithms rather than deep learning models to synthesize speech (Griffin and Lim, 1984; Morise et al., 2016). However, this kind of vocoders introduces noticeable artifacts in the synthesized audio and is thus rarely used. + +Autoregressive Vocoder. Autoregressive vocoders generate audio waveforms one sample at a time, with each sample conditioned on the previously generated samples (Oord et al., 2016). This approach allows for high-quality audio synthesis due to its sequential nature and the ability to capture intricate temporal dependencies within the audio signal. However, the sequential generation process can be computationally expensive and time-consuming, making autoregressive models less efficient compared to parallelized methods like GAN-based vocoders. + +Flow-based VOCoder. Flow-based vocoder aims to establish a series of invertible transformations that map a simple distribution, such as a Gaussian, to the complex distribution of audio samples. This mechanism allows for efficient sampling and density evaluation, enabling the model to synthesize audio in parallel rather than sequentially, which sig- + +
ApproachSpeech TokenizerLanguage ModelVocoder
Minmo (Chen et al., 2025)SenseVoice (SpeechTeam, 2024)Qwen2.5 (Yang et al., 2024b)CosyVoice 2 (Du et al., 2024c)
Lyra (Zhong et al., 2024)Whisper (Radford et al., 2023)Qwen2-VL (Wang et al., 2024b)HuBERT + HiFi-GAN
Flow-Omni (Yuan et al., 2024)Whisper Encoder + Linear ProjectorQwen2 (Yang et al., 2024a)Flow Matching (Transformer + MLP) + HiFi-GAN
SLAM-Omni (Chen et al., 2024b)Whisper Encoder + Linear ProjectorQwen2-
OmniFlatten (Zhang et al., 2024c)CosyVoice Encoder (Du et al., 2024b)Qwen2CosyVoice Decoder (Du et al., 2024b)
SyncLLM (Veluri et al., 2024)HuBERT (Hsu et al., 2021)LLaMA-3 (Dubey et al., 2024)HiFi-GAN (Kong et al., 2020; Polyak et al., 2021)
EMOVA (Chen et al., 2024a)SPIRAL (Huang et al., 2022)LLaMA-3VITS (Kim et al., 2021a)
Freeze-Omni (Wang et al., 2024d)Transformer (Vaswani et al., 2017)Qwen2TiCodec (Ren et al., 2024)
IntrinsicVoice (Zhang et al., 2024d)HuBERTQwen2HiFi-GAN
Mini-Omni2 (Xie and Wu, 2024b)WhisperQwen2Mini-Omni (Xie and Wu, 2024a)
SALMONN-omni (Yu et al., 2024)Mamba Streaming Encoder (Gu and Dao, 2024)-VoiceCraft (Peng et al., 2024) + Codec Decoder
Zeng et al. (Zeng et al., 2024b)Whisper + VQGLM (GLM et al., 2024)CosyVoice
Parrot (Meng et al., 2024)VQ-VAELLaMA-3, Mistral, Gemma 2HiFi-GAN
GPST (Zhu et al., 2024)EnCodec (Défossez et al., 2023)TransformerCodec Decoder
GLM-4-Voice (Zeng et al., 2024a)Whisper + VQ (Défossez et al., 2024)GLM-4-9B-Base (GLM et al., 2024)CosyVoice
Moshi (Défossez et al., 2024)Mimi (Défossez et al., 2024)Transformer*Mimi
VITA (Fu et al., 2024)CNN + Transformer + MLP (Fu et al., 2024)Mixtral (Jiang et al., 2024)Text-to-Speech Toolkit (Fu et al., 2024)
LSLM (Ma et al., 2024)vq-vav2vec (Baevski et al., 2020a)Decoder-Only TransformerUniVATS (Du et al., 2024a)
SpiRIT-LM (Nguyen et al., 2024)HuBERT, VQ-VAE (Van Den Oord et al., 2017), speechpropLLaMA-2 (Touvron et al., 2023b)HiFi-GAN
TWIST (Hassid et al., 2024)HuBERTOPT (Zhang et al., 2022b), LLaMA (Touvron et al., 2023a)HiFi-GAN
PSLM (Mitsui et al., 2024)HuBERTNekoMata (Sawada et al., 2024)HiFi-GAN
VOXTLM (Maiti et al., 2024)HuBERTOPT (Zhang et al., 2022b)HiFi-GAN
Voicebox (Le et al., 2024)EnCodecTransformer* (Vaswani et al., 2017)HiFi-GAN
Park et al. (Park et al., 2024)AV-HuBERT (Shi et al., 2022)OPTHiFi-GAN
USDM (Kim et al., 2024)XLS-R (Babu et al., 2021)MistralVoicebox (Le et al., 2023)
VioLA (Wang et al., 2024c)EnCodecTransformer*Codec Decoder (Défossez et al., 2023)
FunAudioLLM (SpeechTeam, 2024)SAN-M (Gao et al., 2020)Transformer*HiFTNet (Li et al., 2023)
SpeechGPT-Gen (Zhang et al., 2024b)SpeechTokenizer (Zhang et al., 2024e)LLaMA-2SpeechTokenizer decoder (Zhang et al., 2024e)
ICoT (?)SpeechTokenizerLLaMA-2SoundStorm
AnyGPT (Zhan et al., 2024)SpeechTokenizerLLaMA-2SoundStorm
LauraGPT (Du et al., 2023)Conformer*Qwen (Bai et al., 2023)Transformer + Codec Decoder
Spectron (Nachmani et al., 2024)Conformer*PaLM 2* (Anil et al., 2023b)WaveFit (Koizumi et al., 2023)
AudioLM (Borsos et al., 2023)w2v-BERT (Chung et al., 2021)Decoder-Only Transformer*SoundStream* (Zeghidour et al., 2021)
UniAudio (Yang et al., 2023b)EnCodec, Hifi-codex (Yang et al., 2023a), Improved RVQGAN (Kumar et al., 2023)Transformer*Codec Decoder
Llama-Omni (Fang et al., 2024)WhisperLLaMA-3.1HiFi-GAN
Mini-Omni (Xie and Wu, 2024a)Whisper + ASR Adapter (Xie and Wu, 2024a)Qwen2TTS Adapter (Xie and Wu, 2024a)
tGSLM (Algayres et al., 2023)Segmentation + SSE (Algayres et al., 2022) + Lexical embedderTransformer*Tacotron-2 + Waveglow (Shen et al., 2018; Prenger et al., 2019)
SpeechGPT (Zhang et al., 2023a)HuBERTLLaMAHiFi-GAN
dGSLM (Nguyen et al., 2023b)HuBERTDialogue Transformer (Nguyen et al., 2023b)HiFi-GAN
SUTLM (Chou et al., 2023)HuBERTTransformer*-
pGSLM (Kharitonov et al., 2022)HuBERTMS-TLM (Kharitonov et al., 2022)HiFi-GAN
GSLM (Lakhotia et al., 2021)HuBERT, CPC (Oord et al., 2018), Wav2vec 2.0 (Baevski et al., 2020b)Transformer*Tacotron-2 + Waveglow
+ +Table 1: Summarization of the architectural choice of speech tokenizer, language model, and vocoder in popular SpeechLMs. “-” represents non-existence or not indicated, * means the architecture is mainly based on the written one, “A, B” means the authors experimented with both “A” and “B” as the component, and “A + B” means “A” and “B” are combined to serve as the component. + +nificantly enhances both speed and quality (Prenger et al., 2019). Compared to GAN-based vocoders, Flow-based vocoders typically need more parameters and memory to train the model, which hinders them from being effectively utilized (Kumar et al., 2019) in SpeechLMs. + +VAE-based Vocoders. Variational Autoencoders (VAEs) are powerful generative models that learn to encode input data into a compressed latent space while allowing for the reconstruction of the original data (Van Den Oord et al., 2017; Huang et al., 2019). However, VAE is seldom explored as the underlying architecture of vocoders. + +Diffusion-based Vocoder. Diffusion models have emerged in recent years as a powerful class of generative models that can be used for high-fidelity speech synthesis. They work by gradually adding noise to the input data (e.g. audio waveforms) to create a sequence of increasingly noisy representations, then learning to reverse this process to generate new samples (Kong et al., 2021; Chen et al., 2021b; Lee et al., 2022). For instance, DiffWave (Kong et al., 2021) uses Denoising Diffusion Probabilistic Models (DDPM) to synthesize audio. Additionally, CosyVoice (Du et al., 2024b) introduces a Conditional Flow-Matching (CFM) model that serves as a vocoder in TTS systems. + +# C Discussion on Different Discrete Features + +The choice of discrete feature types (see Section 4.1.1) used for training significantly affects the quality of speech generated by SpeechLMs, often resulting in trade-offs (Borsos et al., 2023). For example, while semantic tokens align well with text and excel in producing semantically coherent speech, the generated speech often lacks acoustic details, such as high-frequency information. Recovering and enhancing these details typically requires post-processing, like a diffusion model, which significantly increases the model's latency. Conversely, acoustic tokens can facilitate the generation of high-fidelity audio but often struggle with inaccuracies in content generation (Zhang et al., 2024e). Researchers have tried two ways to balance these trade-offs. The first involves combining semantic and acoustic tokens into a single sequence. AudioLM (Borsos et al., 2023) proposes a hierarchical modeling scheme that first models semantic tokens from w2v-bert (Chung et al., 2021) and then uses these tokens to predict acoustic to + +kens from SoundStream (Zeghidour et al., 2021), which ultimately generates speech. However, this kind of approach increases sequence length, which increases modeling complexity and latency. The second strategy leverages mixed tokens (Section 3.1.3) to jointly model semantic and acoustic information, showing promising results in Moshi (Défossez et al., 2024) and SpeechGPT-Gen (Zhang et al., 2024b). + +# D Discussion on Speech-Text Representation Alignment + +The primary goal of aligning text and speech representations is to leverage the strengths of text-based models to enhance speech-based models. Researchers have found that training a SpeechLM is significantly more challenging than training a TextLM. This difficulty arises because text serves as a concentrated form of knowledge, while speech requires models to independently learn the rules of spoken language. Aligning text and speech representations has demonstrated effectiveness, but it involves various trade-offs. First, text primarily conveys semantic information, which can improve a SpeechLM's semantic modeling capabilities but may compromise its ability to capture paralinguistic features, such as tone and emotion, during alignment. Second, there are two main inference approaches for the aligned models: text-present and text-independent. Text-present inference decodes text and speech simultaneously, which may increase latency but enhances the SpeechLM's reasoning abilities (Xie and Wu, 2024a) and reduces possible hallucinations (Défossez et al., 2024). Conversely, text-independent inference is more efficient but may lack stability. Furthermore, the question of whether to incorporate text modality to enhance SpeechLM performance remains an open question, especially considering that humans typically acquire spoken language skills before mastering written language. + +# E More on Speech Interaction Paradigm + +In addition to real-time interaction (see Section 4.3), another advanced interaction ability of SpeechLMs is Interactive Period Recognition (IPR), which refers to the ability to recognize whether the users are interacting with it or not. SpeechLMs should provide response during the interactive period and remain silent during the noninteractive period. IPR is essential for creating a + +
DatasetTypePhaseHoursYear
LibriSpeech (Panayotov et al., 2015)ASRPre-Training1k2015
Multilingual LibriSpeech (Pratap et al., 2020)ASRPre-Training50.5k2020
LibriLight (Kahn et al., 2020)ASRPre-Training60k2019
People dataset (Galvez et al., 2021)ASRPre-Training30k2021
VoxPopuli (Wang et al., 2021a)ASRPre-Training1.6k2021
Gigaspeech (Chen et al., 2021a)ASRPre-Training40k2021
Common Voice (Ardila et al., 2020)ASRPre-Training2.5k2019
VCTK (Veaux et al., 2013)ASRPre-Training0.3k2017
WenetSpeech (Zhang et al., 2022a)ASRPre-Training22k2022
LibriTTS (Zen et al., 2019)TTSPre-Training0.6k2019
CoVoST2 (Wang et al., 2021b)S2TTPre-Training2.8k2020
CVSS (Jia et al., 2022)S2STPre-Training1.9k2022
VoxCeleb (Nagrani et al., 2017)Speaker IdentificationPre-Training0.4k2017
VoxCeleb2 (Chung et al., 2018)Speaker IdentificationPre-Training2.4k2018
Spotify Podcasts (Clifton et al., 2020)PodcastPre-Training47k2020
Fisher (Cieri et al., 2004)Telephone conversationPre-Training2k2004
SpeechInstruct* (Zhang et al., 2023a)Instruction-followingInstruction-Tuning-2023
InstructS2S-200K* (Fang et al., 2024)Instruction-followingInstruction-Tuning-2024
VoiceAssistant-400K* (Xie and Wu, 2024a)Instruction-followingInstruction-Tuning-2024
+ +Table 2: A summary of popular datasets used in the pre-training and instruction-tuning phase of SpeechLMs. * means it is the speech version of the text dataset synthesized using TTS. S2ST and S2TT represent speech-to-speech translation and speech-to=text translation, respectively. + +
Modeling MethodExampleExplanation
Speech-only[SPEECH] S12 S34 S33 ... S11 S59Only the speech sequence is provided.
Text-only[TEXT] A quick brown fox jumps over a lazy dog.Only the text sequence is provided.
Concatenated speech-text[SPEECH] S12 S34 S33 ... S11 S59The speech sequence and text sequence are concatenated together.
[TEXT] A quick brown fox jumps over a lazy dog.
Alternating speech-text[SPEECH] S12 S34 S33 [TEXT] brown fox jumps over a lazy [SPEECH] S11 S59The sequence is interleaved with speech and text tokens.
+ +Table 3: Four different methods of jointly modeling speech and text tokens. + +natural conversational flow, allowing the model to avoid unnecessary interruptions. It is crucial for situations where a small group of users is having a discussion, as the SpeechLM needs to discern when to join in and when to stay silent. Additionally, it is important for the model to learn when to disregard instructions when users are not speaking at it. One approach to achieving IPR is through a Voice Activity Detection (VAD) module. MiniCPM-o 2.6 (OpenBMB, 2024) integrates a VAD module to ensure the model responds only when the input audio surpasses a predefined VAD threshold. Inputs below this threshold are considered noise and ignored. VITA (Fu et al., 2024) takes a different approach by training the SpeechLM to distinguish between query speech and non-query audio. The model learns to output an end-of-sequence token to terminate its response when non-query audio is detected. + +# F Empirical Analysis of SpeechLM Performance + +This section provides an overview of the empirical performance of SpeechLMs on widely used benchmarks. We begin by examining the overall performance of SpeechLM and then delve into the performance of the tokenizer and vocoder components of SpeechLMs. + +# F.1 Overall Performance + +The overall performance of SpeechLM is typically assessed based on its capability to model linguistic information (as shown in Table 4) and its success in achieving high performance in spoken QA tasks (Table 5). The results illustrate a clear improvement in SpeechLM's performance across various model architectures and the influence of training data size. GSLM, which is trained entirely from scratch, serves as the baseline for comparison. TWIST demonstrates notable enhancements by uti + +
ModelssWUGGYsBLIMPtTSCsSC
GSLM64.854.266.653.3
AudioLM71.564.7--
TWIST72.256.5--
SPIRIT-LM69.058.382.961.0
Moshi74.358.983.060.8
GLM-4-Voice--82.962.4
+ +Table 4: Evaluation accuracy $(\%)$ of different SpeechLMs on common linguistic evaluation benchmarks. sTSC and sSC represent sTopic-StoryCloze and sStoryCloze, respectively. The results are adapted from the corresponding SpeechLM papers. + +
ModelsWeb-QuestionsLlama-QuestionsTrivia QA
S→TS→SS→TS→SS→TS→S
GSLM-1.5-4.0--
AudioLM-2.3-7.0--
TWIST-2.2-0.5--
SpeechGPT6.5-21.6-14.8-
Spectron6.1-22.9---
Moshi26.69.262.321.022.87.3
GLM-4-Voice32.215.964.750.739.126.5
Freeze-Omni72.0-53.9-44.7-
MinMo55.039.978.964.148.337.5
+ +Table 5: Evaluation accuracy $(\%)$ of different SpeechLMs on common spoken QA benchmarks in speech-to-text and speech-to-speech modes. The results are adapted from the corresponding SpeechLM papers. + +lizing pre-trained TextLM checkpoints, showcasing the advantages of transfer learning from text-based models. SPIRIT-LM builds upon these improvements with its innovative interleaved speech-text alignment training strategy, enabling more effective cross-modal understanding. While SPIRIT-LM delivers impressive results through its alignment-based training, Moshi surpasses it by leveraging a much larger dataset comprising 7 million hours of speech data. Finally, GLM-4-Voice sets a new performance standard by pre-training on approximately 13 million hours of synthetic interleaved speech-text data. + +# F.2 Tokenizer Performance + +Table 6 presents a comparison among three types of tokenizers: a semantic tokenizer (HuBERT), an acoustic tokenizer (EnCodec), and a mixed tokenizer (SpeechTokenizer). The first two metrics assess semantic performance, while the last two evaluate acoustic performance. As discussed in Section 3.1, the semantic tokenizer demonstrates superior semantic modeling, the acoustic tokenizer excels in acoustic modeling, and the mixed tokenizer strikes a balance between the two. + +# F.3 Vocoder Performance + +The comparative analysis presented in Tables 7 and 8 demonstrates the trade-offs between different vocoder architectures across multiple evaluation dimensions. Table 7 reveals that autoregressive models (WaveNet and WaveRNN) achieve superior perceptual quality than the GAN-based vocoder (MelGAN) as measured by Mean Opinion Score (MOS). However, Table 8 illustrates the computational efficiency advantages of GAN-based vocoders. MelGAN demonstrates exceptional efficiency with only 3.05M parameters and 3.01 GFLOPS, achieving real-time factors of 0.001 on GPU and 0.029 on CPU—orders of magnitude faster than diffusion-based approaches. Parallel WaveGAN offers an optimal balance, maintaining competitive audio quality while requiring only 1.34M parameters and achieving RTF values of 0.002 (GPU) and 0.576 (CPU). + +The results indicate that while autoregressive vocoders (and diffusion-based vocoders) excel in audio fidelity, GAN-based architectures provide the computational efficiency essential for real-time speech synthesis. This efficiency-quality trade-off explains the prevalent adoption of GAN-based vocoders in SpeechLMs, where low-latency inference is critical for interactive applications while maintaining acceptable perceptual quality. + +# G Technical Specifications of Common SpeechLM Components + +This section expands on Section 3 by providing the technical notations and specifications for some of the commonly adopted components in SpeechLMs, including speech tokenizers and vocoders. + +# G.1 Speech Tokenizer + +This subsection presents the notation for three representative speech tokenizers, each exemplifying a distinct category. We examine HuBERT as a semantic objective tokenizer, Encodec as an acoustic objective tokenizer, and SpeechTokenizer as a mixed objective tokenizer. + +HuBERT. As a representative semantic objective tokenizer, HuBERT (Hsu et al., 2021) employs a feature encoder $f_{E}$ to transform raw audio waveforms $\mathbf{a}$ into continuous embeddings $\mathbf{v}$ , i.e., $f_{E}(\mathbf{a};\theta_{f_{E}}) = \mathbf{v}$ . These embeddings are then quantized into discrete speech tokens $\mathbf{s}$ via k-means clustering of MFCC features, denoted as $d(\mathrm{MFCC}(\mathbf{a});\theta_d) = \mathbf{s}$ . The model is trained with + +
TokenizerTeacherMI↑WER↓WER*↓SIM↑
GroundTruth---4.581.0
HuBERT (semantic)KM50031.29.8816.260.77
EnCodec (acoustic)RVQ-116.561.5238.340.92
EnCodec (acoustic)RVQ-1:823.630.915.110.98
SpeechTokenizer (mixed)RVQ-1 HuBERT avg30.915.589.570.74
SpeechTokenizer (mixed)RVQ-1:8 HuBERT avg29.716.035.040.97
+ +Table 6: Empirical Comparison results of different speech tokenizers (adapted from (Zhang et al., 2024e)). KM represents K-means. MI and WER represent Mutual Information and Word Error Rate. WER* and SIM represent word error rate and speaker similarity of resynthesized speech. + +
MetricCorpusWaveNetWaveRNNMelGANParallel WaveGANWaveGradDiffWaveGriffin-LimGround Truth
SSIM↑LJ Speech0.660.620.890.840.760.820.90-
LibriTTS0.0560.530.910.860.710.740.89-
VCTK0.460.430.880.790.590.640.86-
LS-MSE↓LJ Speech0.0060.0100.0010.0020.0060.0060.001-
LibriTTS0.0080.0080.0010.0010.0050.0060.001-
VCTK0.0090.0100.0010.0020.0070.0070.001-
PSNR↑LJ Speech23.2020.3628.5326.7022.5722.5128.77-
LibriTTS21.5421.1729.9828.6222.9422.1829.03-
VCTK21.3620.4030.4028.1721.5421.2228.77-
FAD↓LJ Speech1.053.431.510.923.123.622.690.31
LibriTTS1.552.602.951.413.103.744.271.23
VCTK0.993.591.761.224.105.593.920.61
MOS↑LJ Speech3.68±0.0373.96±0.0893.73±0.0753.99±0.0593.85±0.0684.07±0.0603.68±0.0824.10±0.059
LibriTTS3.75±0.1073.74±0.0993.50±0.0863.82±0.0693.48±0.0833.80±0.0733.36±0.0924.03±0.065
VCTK3.95±0.0323.94±0.0893.75±0.0743.87±0.0683.77±0.0743.86±0.0693.66±0.0793.98±0.064
+ +Table 7: Audio quality evaluation of vocoder models across three datasets (adapted from (AlBadawy et al., 2022)). SSIM, LS-MSE, PSNR, FAD, and MOS represent Structural Similarity Index Measure, Log-mel Spectrogram Mean Squared Error, Peak Signal-to-Noise Ratio, Fréchet Audio Distance, and Mean Opinion Score, respectively. + +
Model#Param (M)GFLOPSRTF (GPU)RTF (CPU)
WaveNet3.7989.65--
WaveRNN4.3594.98--
MelGAN3.053.010.0010.029
Parallel WaveGAN1.3431.260.0020.576
WaveGrad15.8133.750.3819.858
DiffWave2.6231.700.0704.452
+ +Table 8: Computational efficiency comparison of vocoder models (adapted from (AlBadawy et al., 2022)). It compares model complexity (parameters), computational requirements by Floating Point Operations per Second (GFLOPS), and inference speed measured by Real-Time Factor (RTF) on GPU and CPU platforms. + +a masked prediction objective, which seeks to maximize the likelihood of the correct token at masked positions: + +$$ +\mathcal {L} (\theta) = \mathbb {E} _ {\mathbf {a} \sim \mathcal {D}} \left[ \sum_ {i \in \mathcal {M}} - \log p (s _ {i} | \mathbf {v} _ {\backslash \mathcal {M}}; \theta) \right], (5) +$$ + +where $\mathcal{M}$ denotes the masked indices. HuBERT further refines its speech tokens iteratively, updating the encoder and discretizer parameters at each + +step as + +$$ +\mathbf {s} ^ {(n + 1)} = d \left(f _ {E} (\mathbf {a}; \theta_ {f _ {E}} ^ {(n)}); \theta_ {d} ^ {(n)}\right). \tag {6} +$$ + +This iterative process enables the learning of increasingly meaningful speech representations. + +Encodec. As a representative acoustic objective tokenizer, EnCodec (Défossez et al., 2023) employs a convolutional encoder-decoder architecture with residual vector quantization (RVQ). The encoder $f_{E}$ maps the raw audio waveform $\mathbf{a}$ to continuous embeddings $\mathbf{v}$ , i.e., $\mathbf{v} = f_{E}(\mathbf{a};\theta_{f_{E}})$ . These embeddings are then discretized using a multi-stage RVQ, where each stage $r$ quantizes the residual from the previous stage: + +$$ +\begin{array}{l} \mathbf {s} = d (\mathbf {v}; \theta_ {d}) = \big (d _ {1} (\mathbf {v}; \theta_ {d _ {1}}), d _ {2} (\mathbf {v} - \hat {\mathbf {v}} _ {1}; \theta_ {d _ {2}}), \\ \dots , d _ {R} \left(\mathbf {v} - \sum_ {r = 1} ^ {R - 1} \hat {\mathbf {v}} _ {r}; \theta_ {d _ {R}}\right)), \tag {7} \\ \end{array} +$$ + +with $\hat{\mathbf{v}}_r$ denoting the quantized embedding at stage $r$ . The decoder $f_{D}$ reconstructs the audio waveform from the quantized tokens, $\hat{\mathbf{a}} = f_{D}(\mathbf{s};\theta_{f_{D}})$ . + +This design enables EnCodec to produce discrete acoustic tokens that retain high-fidelity audio information suitable for downstream modeling. + +SpeechTokenizer. As a representative mixed objective tokenizer, SpeechTokenizer (Zhang et al., 2024e) combines semantic and acoustic objectives by leveraging both HuBERT and residual vector quantization (RVQ) mechanisms. The encoder $f_{E}$ first transforms the input audio waveform $\mathbf{a}$ into continuous embeddings $\mathbf{v}$ , i.e., $\mathbf{v} = f_{E}(\mathbf{a};\theta_{f_{E}})$ . Discretization is performed via a multi-stage RVQ. The discretization process uses a multi-stage RVQ, which operates similarly to Encodec, except that the first RVQ stage distills tokens derived from HuBERT, while the subsequent stages quantize the residuals. This hybrid approach enables SpeechTokenizer to capture both high-level semantic and low-level acoustic information for robust speech representation learning. + +# G.2 Vocoder + +We present the notation of HiFi-GAN (Kong et al., 2020) as it is the most used vocoder in SpeechLMs. HiFi-GAN synthesizes high-fidelity audio waveforms from mel-spectrograms or speech tokens using a generator-discriminator framework. The generator $G(\mathbf{s};\theta_G)$ maps a sequence of speech tokens s to an output audio waveform a, i.e., + +$$ +\mathbf {a} = V o (\mathbf {s}; \theta_ {V o}) = G (\mathbf {s}; \theta_ {G}), \tag {8} +$$ + +where $V_{o}$ denotes the vocoder function and $\theta_{Vo} = \theta_{G}$ are its parameters. HiFi-GAN employs multi-period and multi-scale discriminators, $D_{MPD}(\mathbf{a};\theta_{MPD})$ and $D_{MSD}(\mathbf{a};\theta_{MSD})$ , to distinguish real from generated audio during adversarial training. At inference, only the generator $G$ is used to efficiently reconstruct speech waveforms. + +# H Downstream Applications + +SpeechLMs, unlike traditional ASR and TTS systems that focus on specific tasks, are generative foundation models capable of handling a variety of speech-only, text-only, and multi-modal tasks. This section explores their primary downstream applications, which include both traditional speech tasks and unique SpeechLM tasks. Unlike TextLMs which generate only semantic information, SpeechLMs can also model paralinguistic features like pitch and timbre, enhancing their capabilities. The applications of SpeechLMs + +are categorized into three main classes: semantic-related, speaker-related, and paralinguistic applications. We give an example of all the downstream applications in Table 9. + +# H.1 Semantic-Related Applications + +Semantic-related applications involve key tasks that facilitate meaningful interactions between humans and machines. These applications require SpeechLMs to grasp the semantic meaning of input and generate responses that are contextually relevant and logically coherent. The primary Semantic-related applications of SpeechLMs are as follows. + +Spoken Dialogue. Spoken dialogue is the most natural application of SpeechLMs. Spoken dialogue systems are designed to facilitate natural conversations between humans and machines in spoken format. They can engage users in interactive exchanges, understanding and generating responses based on the context of the conversation. Unlike TextLMs, SpeechLMs are able to perform conversations with humans directly in speech, which is a more natural way of communication. Note that SpeechLMs can not only perform speech-only dialogues but also perform cross-modal dialogues, such as taking texts as input and responding in speech format. + +Speech Translation. Speech translation (ST) is the process of converting spoken language from one language to another. Similar to Spoken dialogue, SpeechLMs can perform ST in both single-modal and cross-modal settings. Specifically, the input and output of the ST task can be either in text or speech format. + +Automated Speech Recognition. Automatic speech recognition (ASR) enables systems to convert spoken language into text. The input of ASR is a speech waveform, and the system outputs the transcription in textual form. For SpeechLMs, the input would be a combination of the speech waveform and the instruction to tell the model to perform ASR on the given speech. + +Keyword Spotting. Keyword spotting can be considered a special type of ASR, where its primary objective is to identify specific words or phrases within continuous speech. While traditional ASR systems aim to transcribe entire spoken utterances into text, keyword spotting focuses specifically on identifying and extracting predefined keywords or phrases within continuous speech. The primary application of keyword spotting is to build voice-activated assistants in smart home devices. Those + +
TaskInputOutput
Semantic-related Applications
Spoken DialogueSpeech(I am so angry right now!)Speech(Sorry to hear that. What happened?)
Speech TranslationSpeech(Good morning my friend!) Please trans- lathe speech into French.Speech(Bonjour mon ami !)
Automatic Speech RecognitionSpeech(A river is on your left side.) Please perform automatic speech recognition to the speechThe transcribed speech is: A river is on your left side.
Keyword SpottingSpeech(How's your day? (Speaking to some- body else) Hey, Siri.) Please detect if the given speech contains any pre-defined keywords.Keyword detected: "Hey, Siri."
Text-to-Speech Syn-thesisPlease synthesize the following text into speech: "A river is on your left side."Sure. Here is the synthesized speech: Speech(A river is on your left side.)
Intent ClassificationSpeech(Can you help me book a flight?) Please detect the intent of the given speech.Intent detected: "Book a flight".
Slot FillingSpeech(I want to fly from New York to San Francisco on June 5th.) Please fill the following slots based on the given speech: departure city, destination city, and dateSure. Here are the filled slots. Departure city: New York. Destination city: San Francisco. Date: June 5th.
Query by Example Spoken Term Detec- tionSpeech(Can you retrieve the audio documents that contain the word "happy"? ) [A batch of audio documents]Sure. I have found documents 2 and 4 contain the word happy.
Speaker-related Applications
Speaker IdentificationThe following speech comes from Lucy: "[Lucy's speech)". The following speech comes from Bob: "Bob's speech". Question: Who is the speaker of the following speech [Unknown speech]The speaker of the following speech: "[Unknown speech]" is Bob.
Speaker VerificationHere are two speeches. Speech 1: [Speech 1]. Speech 2: [Speech 2]. Do they come from the same speaker?No, they do not come from the same speaker.
Speaker Diarization[An audio file of the meeting] Please provide the speaker diarization output in the following format: [Start Time] - [End Time]: Speaker [Speaker].Sure. Here is the speaker diarization result: 00:00 - 00:15: Alice, 00:16 - 00:40: Bob, 00:41 - 01:00: Carol, 01:01 - 01:20: Alice, 01:21 - 01:45: Bob and Carol (overlapping speech), 01:46 - 02:00: Carol.
Voice-Conditioned Speech GenerationCan you use a robotic voice to say "Hello world!" to me?Sure. Speech([In robotic voice] Hello world!)
Paralinguistic Applications
Emotion RecognitionSpeech(What are you doing) What emotion does the speech convey?It seems that the speaker is pretty shocked and angry about something.
Speech SeparationSpeech([Two overlapping speeches]) Can you separate the two speeches?Sure. Here is the speech separation result. Speech 1: Speech(Should I go for this one?). Speech 2: Speech(That one seems good.)
Paralinguistics-Enhanced GenerationSpeech(Please generate a speech that sounds happy.)Speech([In happy mood] My friend just gave me a candy!!)
+ +Table 9: Examples of the various capabilities of SpeechLMs. + +
NameEval Type#TasksAudio TypeI/O
ABX (Versteegh et al., 2016; Dunbar et al., 2019; Nguyen et al., 2020)Representation1SpeechA → -
sWUGGY (Nguyen et al., 2020)Linguistic1SpeechA → -
sBLIMP (Nguyen et al., 2020)Linguistic1SpeechA → -
sStoryCloze (Hassid et al., 2024)Linguistic1SpeechA/T → -
STSP (Nguyen et al., 2024)Paralinguistic1SpeechA/T → A/T
MMAU (Sakshi et al., 2024)Downstream27Speech, Sound, MusicA → T
Audiobench (Wang et al., 2024a)Downstream8Speech, SoundA → T
AIR-Bench (Yang et al., 2024c)Downstream20Speech, Sound, MusicA → T
SD-Eval (Ao et al., 2024)Downstream4SpeechA → T
SUPERB (Huang et al., 2024a)Downstream10SpeechA → T
Dynamic-SUPERB (Huang et al., 2024a)Downstream180Speech, Sound, MusicA → T
SALMON (Maimon et al., 2024)Downstream8SpeechA → -
VoiceBench (Chen et al., 2024c)Downstream8SpeechA → T
VoxEval (Cui et al., 2025)Downstream56SpeechA → A
+ +Table 10: A summary of popular benchmarks for the evaluation of SpeechLMs. I/O, $A$ , and $T$ represent input/output format, audio, and text, respectively. + +devices are activated when the specific keywords are triggered. Therefore, although SpeechLMs are capable of spotting and understanding more than just a couple of words, keyword spotting can be used to efficiently trigger SpeechLMs to respond to user inputs. + +Text-to-Speech Synthesis. Text-to-speech synthesis (TTS) enables systems to synthesize written text into spoken language. In contrast to ASR, TTS takes text as input and outputs the converted speech waveform. Similarly, the input of the SpeechLMs would be a combination of the text to synthesize and the instruction, and the output is the synthesized speech. + +Intent Classification. Intent classification is a critical task that identifies the underlying intention behind a user's input speech. The AI system can then perform certain actions based on the identified user intent (e.g., book a flight). Intent classification is particularly important in applications such as virtual assistants, customer service bots, and interactive voice response systems. To perform Intent Classification, it is more natural for SpeechLMs to take speech inputs and classify the results in text since it is easier to parse and classify the intent classification result in text than speech. + +Slot Filling. Slot filling is an important task in spoken language understanding that involves identifying and extracting specific pieces of information from user inputs into predefined classes, such as intents, entities, and parameters that are essential for completing a task. For example, slot filling extracts the phrase "I want to fly from New York to San Francisco on June 5th." into distinct slots like "departure city" (New York), "destination city" (San Francisco), and "date" (June 5th). Similar to Intent Classification, it is more natural for SpeechLMs to take speech inputs and extract the pieces in texts. + +Query by Example Spoken Term Detection. Another spoken term detection task is query by example spoken term detection (QbE-STD), which allows users to identify specific spoken terms or phrases within a larger audio stream by providing an example of the desired term. Unlike traditional keyword spotting methods that rely on predefined lists of keywords, QbE-STD leverages the flexibility of example-based querying, enabling users to specify their search terms through audio samples. + +# H.2 Speaker-Related Applications + +Speaker-related applications refer to the tasks that involve the processing of information related to + +speaker identity. It could involve classification tasks such as identifying, verifying, and distinguishing individual speakers based on their unique vocal characteristics, as well as generation tasks such as maintaining or modifying the timbre of a given speech. While we acknowledge that voice characteristics can be considered paralinguistic information, we believe that speaker-related applications are unique because they enable SpeechLMs to function in complex scenarios such as participating in multi-speaker conversations. In this section, we survey common speaker-related applications of SpeechLMs. + +Speaker Identification. Speaker identification is the process of recognizing a person's identity based on their voice characteristics. It is a multiclass classification of a given speech as input. SpeechLMs can perform this task by taking an input speech and outputting the classification result in text or speech format. Moreover, SpeechLMs can also identify different speakers implicitly. Specifically, it can chat with multiple speakers at the same time, distinguishing the words from different speakers and responding to each speaker appropriately. + +Speaker Verification. Speaker verification involves determining whether the speakers of a pair of speeches match with each other. Unlike speaker identification, which is a multi-class classification process, speaker verification is a binary classification process. + +Speaker Diarization. Speaker diarization is the process of partitioning an audio stream into segments according to the identity of the speakers. It predicts "who is speaking when" for each timestamp (Yang et al., 2021). A natural way to integrate speaker diarization into SpeechLMs is to have the model generate the transcript of each audio segment along with the identification of the speaker. + +Voice-Conditioned Speech Generation. Voice-conditioned speech generation involves synthesizing speech based on the vocal characteristics of a specific speaker. This could involve voice cloning and voice conversion. Voice cloning utilizes a sample of the speaker's voice as a reference, enabling the model to reproduce the speaker's timbre when generating speech from input text. Voice conversion, on the other hand, modifies an existing speech signal to sound like it was produced by a different speaker while retaining the original content. Additionally, instead of giving the target vocal characteristics, SpeechLMs should also be able to adapt their output timbre based on various speech or text + +instructions. + +# H.3 Paralinguistic Applications + +Paralinguistics refers to the non-verbal elements of communication that accompany spoken language, including vocal attributes that convey meaning beyond the words themselves. These elements, such as pitch, timbre, rate of speech, and pauses, significantly influence the message interpretation. Additionally, variations in these elements can evoke different emotions, so we include emotion-related tasks as part of paralinguistic applications. + +Emotion Recognition. Emotion recognition task involves identifying and classifying the emotion carried by a given speech into predefined classes. Similar to speaker identification, SpeechLMs are capable of not only directly performing this task but also implicitly recognizing users' emotions through their speech queries and responding accordingly. + +Speech Separation. Speech separation refers to the process of isolating individual speech signals from a mixture of sounds, such as when multiple speakers are talking simultaneously. When separating the input speech, SpeechLMs can not only output the contents of each person in speech but also in text format (i.e., transcriptions). + +# Paralinguistics-Enhanced Generation. + +Paralinguistics-enhanced generation refers to the process of instructing SpeechLMs to produce speech that exhibits specific paralinguistic characteristics. Users can define these characteristics in their prompts, allowing the model to generate speech that aligns with their specifications. Examples of paralinguistics-enhanced generation include synthesizing speech with a specific style, speaking at a fast pace, and even singing. This capability distinguishes SpeechLMs from TextLMs and facilitates a more engaging and interactive form of communication with the AI models. + +![](images/3206f729ce039e71f1cf6c65dfcef73730f4ce354c8a743c2edf436af065bc14.jpg) +Figure 2: Taxonomy of Speech Language Models. \ No newline at end of file diff --git a/recentadvancesinspeechlanguagemodelsasurvey/images.zip b/recentadvancesinspeechlanguagemodelsasurvey/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..1d587412e9fd0822bf1ec16b8183d2af36b4d021 --- /dev/null +++ b/recentadvancesinspeechlanguagemodelsasurvey/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:82a40ba9fe57466726ded97187d6c344850c14a96a8a8f72e90de7253dec3181 +size 1403190 diff --git a/recentadvancesinspeechlanguagemodelsasurvey/layout.json b/recentadvancesinspeechlanguagemodelsasurvey/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..c4e120b7f4678c33d14052b90b992d5f4bbcfe62 --- /dev/null +++ b/recentadvancesinspeechlanguagemodelsasurvey/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d3e238e46037274518f6bd824897d6c2fb21c54d4bde1cccdb0411b010149f47 +size 763104 diff --git a/reclmrecommendationinstructiontuning/80a893ca-7820-45c1-9836-ae7ce17b9a53_content_list.json b/reclmrecommendationinstructiontuning/80a893ca-7820-45c1-9836-ae7ce17b9a53_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..f812c798179d455a582ff49ff5e91c25b866a4aa --- /dev/null +++ b/reclmrecommendationinstructiontuning/80a893ca-7820-45c1-9836-ae7ce17b9a53_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d45af41156e9bdb794033e85461a6ad7950fc15eb8f5ff40f42b303a06e0abf6 +size 141753 diff --git a/reclmrecommendationinstructiontuning/80a893ca-7820-45c1-9836-ae7ce17b9a53_model.json b/reclmrecommendationinstructiontuning/80a893ca-7820-45c1-9836-ae7ce17b9a53_model.json new file mode 100644 index 0000000000000000000000000000000000000000..322793c41e35b6c9f9ca35d80ee62ad5687aa7b7 --- /dev/null +++ b/reclmrecommendationinstructiontuning/80a893ca-7820-45c1-9836-ae7ce17b9a53_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2bc55532d3467f3ff085eb69d73ebd5bf3e153a63b447cf069766922f7501e88 +size 165953 diff --git a/reclmrecommendationinstructiontuning/80a893ca-7820-45c1-9836-ae7ce17b9a53_origin.pdf b/reclmrecommendationinstructiontuning/80a893ca-7820-45c1-9836-ae7ce17b9a53_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5e55226badb5b877a5107763e572af190ad3470a --- /dev/null +++ b/reclmrecommendationinstructiontuning/80a893ca-7820-45c1-9836-ae7ce17b9a53_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b263dcde2db70f913172e6a53b3e3d95237edd8bb2ef39380cfcc0ac5812362e +size 1308104 diff --git a/reclmrecommendationinstructiontuning/full.md b/reclmrecommendationinstructiontuning/full.md new file mode 100644 index 0000000000000000000000000000000000000000..1fecd3d554757f9b6b98e369b39f760d6c49ae6a --- /dev/null +++ b/reclmrecommendationinstructiontuning/full.md @@ -0,0 +1,622 @@ +# RecLM: Recommendation Instruction Tuning + +Yangqin Jiang + +University of Hong Kong Hong Kong, China mrjiangyq99@gmail.com + +Yuhao Yang + +University of Hong Kong Hong Kong, China yuhao-yang@outlook.com + +Lianghao Xia + +University of Hong Kong Hong Kong, China aka_xia@foxmail.com + +Da Luo + +Wechat, Tencent Guang Zhou, China lodaluo@tencent.com + +Kangyi Lin + +Wechat, Tencent Guang Zhou, China plancklin@tencent.com + +Chao Huang* + +University of Hong Kong Hong Kong, China chaohuang75@gmail.com + +# Abstract + +Modern recommender systems aim to deeply understand users' complex preferences through their past interactions. While deep collaborative filtering approaches using Graph Neural Networks (GNNs) excel at capturing user-item relationships, their effectiveness is limited when handling sparse data or zero-shot scenarios, primarily due to constraints in ID-based embedding functions. To address these challenges, we propose a model-agnostic recommendation instruction-tuning paradigm that seamlessly integrates large language models with collaborative filtering. Our proposed Recommendation Language Model (RecLM) enhances the capture of user preference diversity through a carefully designed reinforcement learning reward function that facilitates self-augmentation of language models. Comprehensive evaluations demonstrate significant advantages of our approach across various settings, and its plug-and-play compatibility with state-of-the-art recommender systems results in notable performance enhancements. We have made our RecLM available anonymously at: https://github.com/HKUDS/RecLM. + +# 1 Introduction + +Recommendation systems serve as essential components of modern web applications, helping users navigate through the vast digital information landscape. These systems provide personalized suggestions across diverse platforms, including product recommendations on e-commerce platforms (Wang et al., 2020; Wu et al., 2018), content discovery on social networking sites (Jamali and Ester, 2010; Zhang et al., 2021), and viewer-tailored suggestions on video sharing platforms (Zhan et al., 2022; Jiang et al., 2024). At the core of these systems lies Collaborative Filtering (CF), a widely adopted approach that harnesses collective user preferences to generate personalized recommendations. + +Current recommender systems predominantly operate within the user/item ID paradigm, where training data consists primarily of mapped user and item indices. While this approach has driven significant advancements in recommendation technology, particularly in data-rich scenarios (Yao et al., 2021; Yuan et al., 2023), it faces several fundamental limitations. Most notably, these systems encounter substantial challenges in cold-start scenarios and struggle to generalize effectively in zero-shot learning situations. The inherent dependency on ID-based representations becomes particularly problematic in completely cold-start settings, where systems fail to generate meaningful representations for new items, ultimately compromising their ability to deliver accurate recommendations. + +Addressing the fundamental cold-start challenge in ID-based recommendation systems requires moving beyond traditional ID-based embeddings to leverage external features (e.g., textual or visual information) for generating user and item representations. However, this promising approach encounters significant practical challenges in real-world applications, primarily stemming from two critical issues: data incompleteness and quality concerns. On the incompleteness front, users frequently withhold personal information due to privacy concerns, leading to substantial gaps in external features. Simultaneously, existing data often suffers from quality issues, manifesting as misleading tags, irrelevant product specifications, or unreliable item descriptions. These challenges collectively underscore the critical need for robust methods to extract accurate, relevant, and high-quality features from inherently noisy and incomplete side information—a prerequisite for achieving effective recommendation generalization in data-scarce scenarios. + +The exceptional generalization and reasoning capabilities of Large Language Models (LLMs) motivate a novel solution to cold-start recommendation challenges through specialized profiling sys + +tems based on external side information. This approach centers on developing effective language models customized for recommendation tasks, addressing two critical challenges: (i) designing robust mechanisms for LLMs to generate accurate profile representations that capture essential recommendation characteristics, especially for users or items lacking historical interactions, and (ii) developing techniques for LLMs to distill high-quality profiles from noisy feature sets while preserving the integrity of user-item interaction patterns and behavioral context. While recent LLM-based recommenders leverage LLMs to enhance the performance of recommenders (Chen et al., 2024; Zhang et al., 2024; Lyu et al., 2023), they do not specifically address the challenges associated with cold-start scenarios and often concentrate solely on learning the preferences of individual users or improving the features of individual items, thereby neglecting the collaborative relationships inherent in traditional CF recommenders. + +Contribution. To address these challenges, we propose RecLM, a novel recommendation instruction tuning paradigm that revolutionizes how LLMs understand behavioral contexts in recommender systems. While LLMs demonstrate superior natural language processing capabilities, they fundamentally lack the ability to model complex user-item interactions and behavioral preferences. Our approach tackles this limitation through two key technical innovations: (1) a seamless integration mechanism that fuses external user-item features with collaborative interaction patterns through specialized instruction tuning, enabling effective cold-start profiling without direct supervision signals, and (2) a reinforcement learning-based personalized feature enhancement framework that systematically reduces noise and mitigates over-smoothing effects inherent in collaborative filtering. This model-agnostic framework can be plugged into existing recommenders to significantly enhance their generalization capacity, particularly in data-scarce scenarios. Our main contributions are as follows: + +- Model-Agnostic Framework. We introduce a model-agnostic instruction tuning framework RecLM. It can be seamlessly integrated into existing recommender systems as a plug-and-play component, significantly enhancing their generalization capacity in scenarios with data scarcity. +- Enhancing Profiling System. We integrate large language models with collaborative filtering to + +enhance user profiling and representation, particularly in cold-start scenarios, where current methods often struggle. Additionally, our approach employs reinforcement learning to refine profile quality, effectively addressing challenges associated with data noise and over-smoothing. + +- Comprehensive Evaluation. We integrate RecLM with several cutting-edge recommenders to assess the effectiveness of our method in various settings. This involves performing ablation studies and efficiency evaluations. Moreover, we conduct comprehensive experiments in real-world industrial recommendation scenarios, showcasing the practicality and scalability of RecLM. + +# 2 Related Work + +# 2.1 ID-based Recommender Systems + +In recommender systems, numerous collaborative filtering (CF) models have been proposed to map users and items into latent representations based on user/item IDs (Koren et al., 2021; Su and Khoshgoftaar, 2009). These methods have evolved significantly, from early matrix factorization techniques, such as BiasMF (Koren et al., 2009), to the introduction of Neural Collaborative Filtering with the advent of neural networks (He et al., 2017). Recently, advances in graph neural networks (GNNs) have opened promising avenues for constructing bipartite graphs based on user-item interaction history, allowing for the capture of high-order collaborative relationships. GNN-based methods, including NGCF (Wang et al., 2019), GCCF (Chen et al., 2020), and LightGCN (He et al., 2020), have demonstrated the performance of SOTA, increasing the effectiveness of the recommendation. + +In addition, researchers have incorporated self-supervised learning (SSL) techniques as supplementary learning objectives to improve the robustness of recommenders and address challenges related to data sparsity and noise (Yu et al., 2023). Contrastive learning (CL), a widely adopted SSL technique, has been effectively applied in CF research through approaches such as SGL (Wu et al., 2021), SimGCL (Yu et al., 2022), NCL (Lin et al., 2022), and AdaGCL (Jiang et al., 2023). Despite these advancements, ID-based recommenders still face significant limitations, particularly in completely cold-start scenarios and in terms of model transferability (Yuan et al., 2023). + +# 2.2 LLMs for Recommendation + +The integration of large language models (LLMs) into recommender systems has attracted considerable interest (Fan et al., 2023; Lin et al., 2023; Liu et al., 2023). Existing approaches fall into two primary categories. The first category, including methods like P5 (Geng et al., 2022), LLM-Rec (Lyu et al., 2023), Chat-REC (Gao et al., 2023), and RecRanker (Luo et al., 2024), focuses on designing task-aligned prompts or leveraging LLMs' reasoning capabilities, using LLMs directly as inference models. The second category enhances traditional collaborative filtering (CF) methods by integrating LLMs. For example, LEARN (Jia et al., 2024) aligns LLM semantic spaces with recommendation objectives via contrastive learning, HLLM (Chen et al., 2024) employs hierarchical LLM architectures for multi-granularity recommendations, LLM-Rec (Wei et al., 2024) augments user-item interaction graphs using LLMs, and RLMRec (Ren et al., 2023) combines LLM-enhanced text embeddings with GNN-based representations. However, these methods often lack task-specific fine-tuning and primarily target full-shot scenarios. + +In contrast, our work proposes a novel instruction-tuning technique for open-source LLMs, enabling adaptation to specific recommendation tasks and effective collaborative information capture for profile generation. While approaches like InstructRec (Zhang et al., 2023) and TALL-Rec (Bao et al., 2023) align LLMs with recommendation tasks, they face scalability issues due to instruction-question-answering prompts and exhibit limited generalization on sparse data. Our method improves generalization in data-scarce and noisy environments while maintaining efficiency for large-scale practical applications. + +# 3 Preliminaries + +ID-based Collaborative Filtering. In the ID-based collaborative filtering (CF) paradigm, the primary goal is to optimize the ID embeddings of users and items. This optimization aims to accurately capture and represent user preferences for items, while considering the interaction patterns of users and items that are similar. Formally, we have a set of users denoted as $\mathcal{U} = \{u_1,\dots ,u_I\}$ , and a set of items denoted as $\mathcal{V} = \{v_{1},\dots ,v_{J}\}$ . Each user and item is assigned initial ID embeddings, represented as $\mathbf{x}_u$ and $\mathbf{x}_v\in \mathbb{R}^d$ respectively. The objective is to obtain optimized user + +and item representations, denoted as $\mathbf{e}_u,\mathbf{e}_v\in \mathbb{R}^d$ through a recommender model $\mathcal{R}(\mathbf{x}_u,\mathbf{x}_v)$ . This model aims to maximize the posterior distribution $p(\mathbf{e}|\mathcal{X})\propto p(\mathcal{X}|\mathbf{e})p(\mathbf{e})$ . The predicted likelihood of user-item interaction, denoted as $\hat{y}_{u,v}$ , is derived by performing a dot product between the user and item representations, as follows: $\hat{y}_{u,v} = \mathbf{e}_u^\top \cdot \mathbf{e}_v$ + +While state-of-the-art (SOTA) recommenders operating within the ID-based collaborative filtering paradigm have exhibited remarkable performance, they face significant challenges when tasked with handling cold-start recommendation scenarios, especially in situations where data scarcity is prevalent. The primary obstacle that ID-based recommenders encounter in these situations stems from the lack of past interaction history for newly introduced items. This absence of accumulated user engagement data disrupts the optimization paradigm that these systems typically rely upon, thereby making it considerably more difficult to generate accurate and meaningful representations for these items. Consequently, ID-based recommenders may encounter difficulties in effectively modeling and understanding the inherent characteristics and preferences associated with these cold-start items, leading to a notable decline in the overall performance, particularly in zero-shot scenarios where no prior interaction data is available for certain items. + +# 4 Methodology + +# 4.1 Text-Enhanced Representations + +To address the challenge of cold-start items in zero-shot recommendation scenarios, we propose a novel approach that leverages textual side features for generalized and adaptable user and item representation learning. Specifically, we seek to replace the traditional ID-based embeddings with the side information associated with the items, namely their text descriptions, represented as $\mathbf{F} \in \mathbb{R}^{|\mathcal{V}| \times d_t}$ . To accomplish this, we utilize a project layer with a multi-layer perceptron $T_{raw}$ to map the raw textual features $\mathbf{f} \in \mathbb{R}^{d_t}$ into a lower-dimensional latent space $\mathbb{R}^d$ . The resulting representation $\hat{\mathbf{f}} \in \mathbb{R}^d$ is then used as the initial item representation: + +$$ +\hat {\mathbf {f}} _ {v} = T _ {\text {r a w}} (\mathbf {f}). \tag {1} +$$ + +This text-driven method seamlessly combines collaborative signals with textual semantics, allowing our recommender to accurately capture user preferences. By using rich textual features as item representations, we optimize user ID embeddings + +![](images/981b54bf35e252b0764e317f0fea51ebe4725c22bdc44ef9523d30cd1cfe7673.jpg) +Figure 1: Overall framework of the proposed RecLM. + +based on interactions, infusing valuable collaborative cues into user and item representations to adapt to changing preferences. This enables our model to understand users' affinities for text-based items and provides zero-shot prediction capabilities for cold-start items with no prior interaction data. + +LLM-enhanced User/Item Profiling. To further empower user representations with the rich textual semantics provided by large language models (LLMs), we propose generating user profile information that can reflect their interaction preferences. Specifically, item profiles can be derived from the profiles of users who frequently interact with them. This approach proves valuable in capturing user preferences and facilitating accurate recommendations for cold-start items. On the user side, the ID embedding $\mathbf{x}_u \in \mathbb{R}^d$ integrates with the user profile $\mathbf{p}_u \in \mathbb{R}^{d_t}$ , allowing the system to leverage the user's ID-based embedding and their generated profile, which can capture more nuanced preferences. On the item side, the raw text $\mathbf{x}_v$ combines with the item profile $\mathbf{p}_v \in \mathbb{R}^{d_t}$ , enabling the system to better understand the item's characteristics and how they align with user preferences. + +$$ +\hat {\mathbf {f}} _ {u} ^ {a u g} = \Psi (\mathbf {x} _ {u} \mid T _ {p r o} (\mathbf {p} _ {u})), \tag {2} +$$ + +$$ +\hat {\mathbf {f}} _ {v} ^ {a u g} = \Psi (\hat {\mathbf {f}} _ {v} \mid T _ {p r o} (\mathbf {p} _ {v})). +$$ + +Our framework employs a dual-MLP architecture for effective multi-modal fusion: an initial MLP encoder $\Psi(\cdot)$ consolidates heterogeneous features, followed by a profile transformation network $T_{pro}$ that projects the unified embeddings into the model's latent space. This hierarchical process generates enriched user and item representations $\hat{\mathbf{f}}_u^{aug} \in \mathbb{R}^d$ and $\hat{\mathbf{f}}_v^{aug} \in \mathbb{R}^d$ , capturing comprehensive behavioral patterns. To further enhance representation quality, we leverage SOTA LLMs as profile augmentation engines, generating supplemen + +tary semantic information that significantly boosts our recommender system's modeling capacity. + +# 4.2 Enhancing Collaborative Features via Recommendation Instruction Tuning + +Our RecLM framework aims to align collaborative relationships with textual semantic representations through an innovative recommendation instruction tuning paradigm that integrates user collaborations into the LLM-based profiling process. It employs a two-phase approach: first, it uses knowledge distillation and dialogue-based instruction tuning to maintain high-order collaborative similarities, creating informative user profiles. Then, it utilizes these refined user profiles to generate semantically aligned item profiles, resulting in a cohesive representation space that effectively captures both individual characteristics and collaborative patterns. + +# 4.2.1 LLM Tuning with Collaborative Signals + +Our approach utilizes open-source LLMs, such as llama2-7b-chat and llama3.1-8b-instruct, as the foundation, enhanced by a novel collaborative instruction tuning framework that captures both user-item interactions and profile generation capabilities. We specifically design specialized prompt templates that incorporate collaborative signals and create input-output pairs using ChatGPT to identify various user-item relationship patterns. In this context, ChatGPT serves as a powerful LLM with strong text summarization abilities, generating text profiles that characterize interaction patterns among users and items, as well as their collaborative relationships, ultimately resulting in textual instructions for collaborative instruction tuning. + +# 4.2.2 Collaborative Instruction Tuning + +In our recommendation instruction tuning paradigm, we introduce a two-turn collaborative + +instruction tuning approach to inject higher-order collaborative relational context. By incorporating collaborative signals that capture complex user-user and user-item relationships, this method overcomes the limitations of those relying only on direct interactions. Our framework empowers LLMs to create richer user profiles by leveraging collaborative network dynamics, while also tackling the fundamental challenge of insufficient direct supervision in profile generation tasks. + +Profile Generation with Two-turn Dialogue. A fundamental challenge in LLM-based profile generation lies in the absence of ground truth data for direct evaluation, forcing practitioners to rely on indirect assessment through downstream recommendation performance. To address this limitation, we propose a novel two-turn collaborative instruction tuning paradigm that provides explicit supervision signals. Unlike conventional approaches that struggle with profile quality assessment, our framework leverages collaborative user relationships to guide LLMs in generating high-quality profiles through structured dialogue interactions. + +- First Turn - Collaborative Profile Generation: The initial turn takes input query $\mathcal{Q}$ containing both the target user's historical item interactions and those of similar users identified from their collaborative neighborhood. Here, user similarities are measured by the encoded user embeddings from LightGCN model (He et al., 2020). The LLM generates output response $\mathcal{R}$ consisting of user profiles that capture collaborative patterns. + +$$ +\mathcal {Q} _ {f i r.} = \operatorname {P r o m p t} \left(u _ {t}, \left\{u _ {n} \right\}, \mathcal {V} _ {t}, \left\{\mathcal {V} _ {n} \right\}\right), \tag {3} +$$ + +$$ +\mathcal {R} _ {f i r.} = \operatorname {P r o m p t} \left(u _ {t}, \left\{u _ {n} \right\}, \mathcal {P} _ {t}, \left\{\mathcal {P} _ {n} \right\}\right). +$$ + +- Second Turn - Supervised Interaction Prediction: The second turn reformulates the instruction-tuning task as an interaction prediction problem, aiming to enhance profile generation by incorporating explicit user-item preference signals. Specifically, the input query $\mathcal{Q}$ prompts whether target user $u_{t}$ will interact with candidate item $v_{t}$ , while the output response $\mathcal{R}$ corresponds to the ground truth interaction status (i.e., yes or no) from the training dataset. To ensure balanced and informative training signals, we employ a systematic sampling strategy: For positive samples $(50\%)$ , we select $v^{+}$ from the user's interaction history $\mathcal{V}_{t}$ under the constraint that $v^{+}$ also appears in similar users' history $\mathcal{V}_{n}$ , while removing it from $\mathcal{V}_{t}$ in first-turn instructions to prevent information leakage. For negative samples $(50\%)$ , we select $v^{-}$ + +from similar users' history $\mathcal{V}_n$ while ensuring no historical interaction exists between $u_{t}$ and $v^{-}$ in the training data. This balanced sampling approach maintains unbiased training objectives while preserving crucial collaborative signals for effective profile generation. + +$$ +Q _ {s e c.} = \left\{ \begin{array}{l l} \text {P r o m p t} \left(u _ {t}, v ^ {+}\right), & \text {p o s . s a m p .} \\ \text {P r o m p t} \left(u _ {t}, v ^ {-}\right), & \text {n e g . s a m p .} \end{array} \right. \tag {4} +$$ + +$$ +\mathcal {R} _ {s e c.} = \left\{ \begin{array}{l l} \text {Y e s}, & p o s. s a m p. \\ \text {N o}, & n e g. s a m p. \end{array} \right. +$$ + +Tuning Strategy. For multi-turn dialogue instruction-tuning, our objective is to utilize LLM-generated responses $\mathcal{R}$ for weight updates while excluding queries $\mathcal{Q}$ . Traditional single-turn dialogue tuning, when applied to our paradigm, considers $\mathcal{Q}$ $fir$ , $\mathcal{R}_{fir}$ , and $\mathcal{Q}_{sec}$ as inputs, with only $\mathcal{R}_{sec}$ being predicted. This approach limits weight updates to losses from $\mathcal{R}_{sec}$ alone, failing to leverage the training data in multi-turn dialogues. Notably, $\mathcal{R}_{fir}$ contains rich textual information as multiple user profiles, which guides the generation of $\mathcal{R}_{sec}$ in subsequent turns. In contrast, $\mathcal{R}_{sec}$ consists of simpler binary responses (e.g., yes or no). Disregarding the valuable information in $\mathcal{R}_{fir}$ and relying on $\mathcal{R}_{sec}$ for fine-tuning would significantly limit the model's learning capacity. + +To address these limitations, we introduce a two-turn dialogue tuning approach. Specifically, we concatenate dialogues from both turns and apply masking techniques to differentiate between $\mathcal{Q}$ and $\mathcal{R}$ components. During training, the model computes losses exclusively from $\mathcal{R}$ -marked segments, enabling both $\mathcal{R}_{fir}$ and $\mathcal{R}_{sec}$ to contribute to parameter optimization. This unified training strategy maximizes information utilization while effectively capturing collaborative relationships. + +Inference Prompt. Following instruction-tuning, we design an inference prompt that integrates target user interactions $\mathcal{V}_t$ with neighbor histories $\mathcal{V}_n$ . This unified prompt guides LLMs to generate collaborative-aware user profiles by leveraging inter-user preference patterns. + +$$ +\mathcal {Q} _ {\text {i n f .}} = \operatorname {P r o m p t} \left(u _ {t}, \left\{u _ {n} \right\}, \mathcal {V} _ {t}, \left\{\mathcal {V} _ {n} \right\}\right). \tag {5} +$$ + +# 4.3 Refining Profile Generation through Reinforcement Learning + +We introduce a reinforcement learning framework aimed at improving the accuracy and personalization of user profiles generated by LLMs. Our + +approach tackles two key challenges: i) Prompt-Training Discrepancy—the inherent mismatch between the inference phase (single-profile generation) and the fine-tuning phase (multi-profile generation), which can lead to inconsistencies in profile generation, and ii) Personalization-Collaboration Trade-off—while leveraging collaborative information enhances overall performance, it risks diluting individual user characteristics, analogous to the over-smoothing phenomenon observed in our collaborative instruction-tuning paradigm. + +To address these challenges, we develop a reinforcement learning-based fine-tuning paradigm inspired by Reinforcement Learning from Human Feedback (RLHF) (Stiannon et al., 2020). Our approach includes two main components: a reward model that assesses the quality of LLM-generated profiles, and an optimization procedure utilizing Proximal Policy Optimization (PPO) (Schulman et al., 2017) to refine the LLM based on these reward signals. This iterative process gradually improves the LLM's capacity to generate more accurate and personalized user profiles. + +Reward model. We design a reward model to evaluate the quality of LLM-generated outputs from a human perspective. Specifically, given an input pair $[\mathcal{Q},\mathcal{R}]$ , the model produces a scalar value indicating the response quality. The reward model is optimized using the loss function $\mathcal{L}_{rm}$ : + +$$ +\mathcal {L} _ {r m} = - \sum_ {i = 0} ^ {\mathcal {I}} \mathbb {E} _ {\left(\mathcal {Q} _ {i}, \mathcal {R} _ {i} ^ {+}, \mathcal {R} _ {i} ^ {-}\right) \sim D} \tag {6} +$$ + +$$ +\left[ \log \left(\sigma \left(r _ {\theta} \left(\mathcal {Q} _ {i}, \mathcal {R} _ {i} ^ {+}\right) - r _ {\theta} \left(\mathcal {Q} _ {i}, \mathcal {R} _ {i} ^ {-}\right)\right)\right) \right], +$$ + +where $r_{\theta}(\cdot)$ denotes the reward model, $\sigma (\cdot)$ represents the sigmoid function, and $\mathcal{R}_i^+ /\mathcal{R}_i^-$ indicate true/false responses respectively. For our profiling task, we maintain a consistent query $\mathcal{Q}_{inf}$ while carefully constructing both positive responses $\mathcal{R}^{+}$ and negative responses $\mathcal{R}^{-}$ . We obtain $\mathcal{R}^{+}$ through ChatGPT and create $\mathcal{R}^{-}$ through two strategies: + +- Diverse Negative Sampling: Multiple prompt templates generate diverse low-quality responses, allowing the reward model to identify suboptimal outputs after instruction-tuning. +- Profile Substitution: Strategic replacement of profiles with those of similar users allows the model to identify subtle differences and prioritize personalized characteristics effectively. + +Proximal Policy Optimization. In our reinforcement learning framework, we treat the LLM $\mathcal{M}$ as + +the policy to be optimized, with the reward model approximating the true reward function. The core optimization objective is formulated as: + +$$ +\underset {\mathcal {M}} {\operatorname {a r g m a x}} \mathbb {E} _ {x _ {i} \sim \mathcal {D}, y _ {i} \sim \mathcal {M}} [ R (y _ {i} | x _ {i}) ]. \tag {7} +$$ + +To optimize $\mathcal{M}$ iteratively, we sample queries $\mathcal{Q}_i$ from the dataset $\mathcal{D}$ and generate corresponding responses $\mathcal{R}_i$ using $\mathcal{M}$ . We employ the Proximal Policy Optimization (PPO) algorithm and its associated loss function for optimization. Following (Schulman et al., 2017), we enhance the reward function with a KL divergence penalty term between the original LLM $\mathcal{M}_0$ and the optimized LLM $\mathcal{M}_{\theta}$ . This constraint effectively mitigates reward hacking—a phenomenon where models achieve high reward scores but poor human evaluation results. The final reward function $R(\cdot)$ for a given query-response pair $(\mathcal{Q}_i, \mathcal{R}_i)$ is defined as: + +$$ +R \left(\mathcal {R} _ {i} \mid \mathcal {Q} _ {i}\right) = \hat {r} \left(\mathcal {R} _ {i} \mid \mathcal {Q} _ {i}\right) - \tag {8} +$$ + +$$ +\beta D _ {K L} \left(\mathcal {M} _ {\theta} \left(\mathcal {Q} _ {i}\right) \mid \mid \mathcal {M} _ {0} \left(\mathcal {Q} _ {i}\right)\right) +$$ + +The comprehensive details of our instruction design across all fine-tuning stages, together with our methodology for constructing positive and negative training samples for the reinforcement learning-based reward model, are reported in Appendix A.9. + +# 5 Evaluation + +# 5.1 Experimental Setup + +(i) Datasets. To evaluate the effectiveness of the proposed RecLM, we conduct extensive experiments using two public datasets: $\mathbf{MIND}^1$ (Wu et al., 2020) and $\mathbf{Netflix}^2$ , along with a large-scale dataset derived from the real-world industrial data (referred to as Industrial for anonymity). (ii) Evaluation Settings. We follow previous recommendation works (Jiang et al., 2024) to set evaluation settings. We assess the accuracy of the top- $K$ recommendation results using two widely adopted metrics: Recall@ $K$ ( $R@K$ ) and NDCG@ $K$ ( $N@K$ ), with $K$ set to 20 by default. To reduce bias, we employ an all-rank evaluation strategy, where positive items in the test dataset are ranked alongside all non-interacted items for each user. The final metric is reported as the average result across all users in the test dataset. (iii) Baseline Methods. We evaluate the effectiveness of RecLM by integrating it with + +Table 1: Performance comparison on MIND, Netflix and Industrial data in terms of Recall and NDCG. The superscript * indicates the improvement is statistically significant where the p-value $< {0.05}$ . + +
DatasetMINDNetflixIndustrial
BackboneVariantsR@20R@40N@20N@40R@20R@40N@20N@40R@20R@40N@20N@40
Full-Shot Setting
BiasMFBase0.06830.10390.03110.03990.04490.07900.14510.13750.00780.01430.00460.0066
Augment.0.0719*0.1353*0.02720.0411*0.0531*0.0868*0.1761*0.1630*0.0121*0.0198*0.0074*0.0097*
Improve.5.27%↑30.22%↑12.54%↓3.01%↑18.26%↑9.87%↑21.36%↑18.55%↑55.13%↑38.46%↑60.87%↑46.97%↑
NCFBase0.07130.09850.03250.04450.05810.09360.18480.17210.01020.00760.01880.0091
Augment.0.0760*0.1233*0.02880.04140.0591*0.0968*0.1903*0.1785*0.0133*0.0087*0.0206*0.0108*
Improve.6.59%↑25.18%↑11.38%↓6.97%↓1.72%↑3.42%↑2.98%↑3.72%↑30.39%↑14.47%↑9.57%↑18.68%↑
LightGCNBase0.03890.07020.01500.02190.04670.08150.14880.14240.00960.01620.00590.0076
Augment.0.0788*0.0983*0.0337*0.0384*0.0652*0.1026*0.1703*0.1606*0.0143*0.0225*0.0087*0.0107*
Improve.102.57%↑40.03%↑124.67%↑75.34%↑39.61%↑25.89%↑14.45%↑12.78%↑48.96%↑38.89%↑47.46%↑40.79%↑
SGLBase0.03450.07080.01270.02100.02770.04160.08550.07620.00780.01380.00500.0068
Augment.0.0732*0.0967*0.0367*0.0421*0.0788*0.1204*0.1958*0.1831*0.0133*0.0221*0.0080*0.0106*
Improve.112.17%↑36.58%↑188.98%↑100.48%↑184.48%↑189.42%↑129.01%↑140.29%↑70.51%↑60.14%↑60%↑55.88%↑
SimGCLBase0.04210.06360.01550.02120.02310.04410.08100.08250.00420.00780.00260.0037
Augment.0.0576*0.0908*0.0232*0.0329*0.0567*0.0908*0.1782*0.1673*0.0128*0.0205*0.0080*0.0099*
Improve.36.82%↑42.77%↑49.68%↑55.19%↑145.45%↑105.90%↑120.00%↑102.79%↑204.76%↑162.82%↑207.69%↑167.57%↑
Zero-Shot Setting
BiasMFBase0.00960.01650.00310.00410.03110.07690.01670.02920.00380.00680.00200.0029
Augment.0.0246*0.0373*0.0107*0.0135*0.1381*0.1490*0.0828*0.0584*0.0056*0.0103*0.0026*0.0040*
Improve.156.25%↑126.06%↑245.16%↑229.27%↑344.05%↑93.76%↑395.81%↑100.00%↑47.37%↑51.47%↑30.00%↑37.93%↑
NCFBase0.03010.03830.00800.00970.04800.11580.01960.03840.00440.00220.00560.0026
Augment.0.0424*0.0469*0.0112*0.0122*0.1700*0.1774*0.0984*0.0974*0.0051*0.0031*0.0088*0.0041*
Improve.40.86%↑22.45%↑40.00%↑25.77%↑254.17%↑53.20%↑402.04%↑153.65%↑15.91%↑40.91%↑57.14%↑57.69%↑
LightGCNBase0.01380.02920.00460.00780.09740.12560.04460.04150.00920.01600.00510.0070
Augment.0.0196*0.0389*0.0064*0.0086*0.1371*0.1453*0.0697*0.0459*0.0133*0.0188*0.0090*0.0106*
Improve.42.03%↑33.22%↑39.13%↑10.26%↑40.76%↑15.68%↑56.28%↑10.60%↑44.57%↑17.50%↑76.47%↑51.43%↑
SGLBase0.01620.02640.00620.00740.03850.14410.02740.05790.00650.01140.00360.0050
Augment.0.0254*0.0450*0.0089*0.0107*0.1126*0.1756*0.0384*0.1066*0.0111*0.0176*0.0066*0.0084*
Improve.56.79%↑70.45%↑43.55%↑44.59%↑92.47%↑21.86%↑40.15%↑84.11%↑70.77%↑54.39%↑83.33%↑68.00%↑
SimGCLBase0.01640.03000.00550.00840.07930.12590.03360.04600.00780.01400.00420.0059
Augment.0.0312*0.0388*0.0098*0.0115*0.1508*0.1895*0.1550*0.1647*0.0084*0.01370.0044*0.0059
Improve.90.24%↑29.33%↑78.18%↑36.90%↑90.16%↑50.52%↑361.31%↑258.04%↑7.69%↑2.14%↓4.76%↑
+ +SOTA recommender systems, allowing us to assess performance improvements in a model-agnostic manner compared to baseline models. The selected CF recommenders include non-graph methods such as BiasMF (Koren et al., 2009) and NCF (He et al., 2017), the GNN-enhanced method LightGCN (He et al., 2020), and graph contrastive learning approaches SGL (Wu et al., 2021) and SimGCL (Yu et al., 2022). Details regarding the baselines and datasets are provided in Appendices A.1 and A.2. The experimental results for RecLM presented in the main text are based on llama2-7b-chat as the base LLM. Key results using llama3.1-8b-instruct as the base LLM are provided in Appendix A.7. + +# 5.2 Performance Comparison + +To demonstrate the effectiveness of our RecLM in enhancing performance, particularly in cold-start scenarios, we apply it to five common collaborative filtering methods. The "full-shot" setting corresponds to the complete dataset, while the "zero-shot" setting refers to the pure cold-start condition. The Base variant applies the cold-start recommendation paradigm to the baseline recommenders without any profiling enhancement via LLMs, whereas the Augment variant integrates RecLM into the base recommenders. Detailed settings and implementation information are provided + +in Appendices A.3 and A.5. The evaluation results in Tab. 1 reveal several interesting observations. + +(i) Performance Improvement in Integrated Recommenders. We consistently find that integrating RecLM with backbone recommenders leads to enhanced performance compared to the base variant, which relies on raw external item features and ID-based user embeddings in both supervised and zero-shot settings. This provides strong evidence for the effectiveness of RecLM. We attribute these improvements to two key factors: First, for supervised recommendation scenarios, RecLM leverages instruction-tuned LLMs to generate accurate user/item profiles as auxiliary information, effectively enhancing the semantic representation of user preferences. Second, our tuning paradigm guides the LLMs in capturing user collaborative relationships, allowing for the generation of high-quality, personalized profiles that demonstrate strong generalization in zero-shot scenarios. + +(ii) Outstanding Performance in Cold-Start Scenarios. This improvement arises from our innovative modifications to the ID-embedding paradigm employed in current recommenders. By incorporating external features specifically designed to address the challenges of interaction data scarcity, we have significantly enhanced the effectiveness of these systems. Remarkably, we observe substantial + +![](images/289871a6f48d510cfff669e84e138b8d38080331023fa8c39ba735375295c2d2.jpg) +(a): MIND data + +![](images/3e51aaff4e9eb600b819135290ab50c16e748cbeb774c1589e0ba0fca4be233c.jpg) + +![](images/9fa13462fad4da457f849a32a0612ea2f2fdfc94b4cb598608f96730cc48b44a.jpg) +(b): Netflix data +Figure 2: Ablation study on the LLM tuning techniques. + +performance improvements even in the relatively sparser MIND and Industrial datasets, where data limitations traditionally pose significant hurdles. By leveraging our RecLM for user and item profiling, we significantly enhance the generalization capabilities of existing recommenders. + +(iii) Practicality and Scalability for Real-World Deployment. The results from Industrial dataset demonstrate that RecLM consistently enhances the performance of recommenders in large-scale, highly sparse real-world scenarios. Furthermore, our profile generation methods can be efficiently executed as an offline profiling system to support online applications, making them highly practical for real-world recommendations. To facilitate online recommendation systems, user/item profiles can be updated at regular intervals, such as daily or weekly. The performance improvements observed across various backbone models indicate that RecLM can easily adapt to a range of business models, significantly enhancing their overall effectiveness. + +# 5.3 Ablation Study + +We conducted extensive experiments to validate the effectiveness of our proposed instruction tuning techniques by customizing three variants of RecLM: GPT_KD, Naive, and Mask. Detailed descriptions of these variants can be found in Appendix A.4. The results of our experiments are illustrated in Fig. 2 with following conclusions: + +(i) Advantage of Collaborative Instruction Tuning. The results in Fig. 2 show that using instruction tuning to capture collaborative relationships among users and items, along with the masking tuning strategy (i.e., the Mask variant), significantly enhances performance compared to the GPT_KD variant. This improvement suggests that our tuning solution generates more precise, high-quality profiles by leveraging collaborative information + +Table 2: Performance w.r.t. various aug. variants. + +
DatasetMINDNetflix
BackboneVariantsR@20N@20R@20N@20
LightGCNBase0.03890.01500.04670.1488
w/o User Aug.0.03020.01230.03840.1213
w/o Item Aug.0.07190.02870.05050.1621
RecLM0.07880.03370.06520.1703
SGLBase0.03450.01270.02770.0855
w/o User Aug.0.02530.00930.01730.0578
w/o Item Aug.0.07190.02890.05020.1546
RecLM0.07320.03670.07880.1958
+ +effectively. In contrast, profiling based solely on user interaction history has limitations, as it lacks the guidance from collaborative insights. Consequently, this approach often results in less accurate profiles that may include noisy interaction records. + +(ii) Effectiveness of the Masking-Based Tuning Strategy. Although the Naive variant also employs a two-round dialogue-based instruction tuning technique similar to the Mask variant, its improvement over the GPT_KD variant is limited. This underscores the advantages of the masking-based tuning strategy, which effectively utilizes responses from the two-round dialogue to update the weights of the LLM and guide its learning of collaborative relationships between users. + +(iii) Benefits of Reinforcement Learning-Based Profile Generation Refinement. The results indicate that the Mask variant performs significantly worse than RecLM. This finding suggests that the proposed reinforcement learning (RL)-based profile generation refinement technique effectively addresses the noise issues and over-smoothing problems associated with the collaborative instruction-tuning paradigm. As a result, it enables the LLM to generate more accurate and personalized profiles. To intuitively explore the contribution of reinforcement learning to the personalization of generated profiles, we further conducted a case study on the MIND dataset. Details are shown in Appendix A.6. + +# 5.4 Effectiveness of LLM-enhanced Profiling + +To evaluate the impact of our LLM-powered profiling system on user and item feature enhancements, we created two RecLM variants: one without user feature enhancement (i.e., w/o User Aug.) and another without item feature enhancement (i.e., w/o Item Aug.). Experiment results on the MIND and Netflix datasets using LightGCN and SGL as backbone models in the full-shot setting are summarized in Table 2, leading to two major insights: + +(i) User-Side Feature Enhancement. Removing user-side enhancements significantly reduces performance across datasets and models, highlighting + +![](images/46d933150559c28f938afe7873837215957c1b32828df6a36761cf2e2559c4f9.jpg) + +![](images/197846de3f0a61d18045835141f38755232e5f76c9e2442203bfa5a57ae3dcbd.jpg) +Figure 3: Comparison with LLM-based Recommenders. + +the importance of user profiling. Using only ID embeddings cannot effectively model user preferences, while our method excels by extracting text features and integrating graph-text information. + +(ii) Item-Side Feature Enhancement. Excluding item-side enhancements also degrades performance. Notably, retaining item enhancements without user enhancements can perform worse than the Base variant, due to the complex interaction between raw and enhanced item features. Sole reliance on ID embeddings for users fails to capture their preferences effectively. + +# 5.5 Comparison with LLM-based Methods + +We perform a comprehensive benchmarking of our RecLM against existing SOTA LLM-based recommendation systems using the MIND dataset to demonstrate the superiority of our proposed instruction-tuning technique. This comparison includes LLM-Rec (Lyu et al., 2023), LLMRec (Wei et al., 2024), NoteLLM (Zhang et al., 2024), and LEARN (Jia et al., 2024). Specifically, for NoteLLM and LEARN, our evaluation focused on integrating their generated item embeddings with conventional CF recommenders. + +The experimental results are presented in Fig. 3. Notably, both LLM-Rec and LLMRec yield suboptimal outcomes, primarily due to their methodology of generating user and item profiles through direct API calls to the LLM, without incorporating task-specific fine-tuning for profile generation. In contrast, NoteLLM and LEARN demonstrate the capability to produce high-quality item embeddings, effectively addressing the cold-start challenge in recommendation systems. However, they have a significant limitation in their ability to adequately capture and leverage the collaborative relationships among users. Therefore, RecLM exhibits substan + +Table 3: Training efficiency of RecLM. + +
DatasetRecommenderBaseRecLMCost
MINDBiasMF0.72s0.85s+18.06%
NCF0.76s0.85s+11.84%
LightGCN0.79s0.86s+8.86%
SGL1.93s2.01s+4.15%
SimGCL2.63s2.69s+2.28%
NetflixBiasMF14.38s16.42s+14.19%
NCF15.02s17.17s+14.31%
LightGCN20.47s20.95s+2.34%
SGL64.98s65.08s+0.15%
SimGCL44.02s44.61s+1.34%
IndustrialBiasMF7.07s8.85s+25.18%
NCF7.58s8.45s+11.48%
LightGCN9.33s10.25s+9.86%
SGL32.34s32.87s+1.64%
SimGCL85.41s86.52s+1.30%
+ +tial performance advantages, leading to significant improvements in the performance of base models. + +# 5.6 Training Efficiency Analysis of RecLM + +To assess the efficiency of our RecLM approach, we perform both a theoretical complexity analysis and an empirical running time test. Theoretical Analysis: The time complexity of the MLP for transferring textual features $\mathbf{f} \in \mathbb{R}^{d_t}$ into the model's latent space $\mathbb{R}^d$ is $\mathcal{O}(N \times (d_t \times d + d \times d))$ , where $N$ is the number of nodes, $d_t$ and $d$ are the dimensions of the text features and latent space, respectively. Empirical Evaluation: The per-epoch training time is shown in Tab. 3, conducted on a server with NVIDIA A100 GPUs. Results show that for larger models (e.g., GNN-based methods), RecLM costs less than $10\%$ extra time, and in dense datasets like Netflix, this can be reduced to under $5\%$ . For smaller recommenders, the maximum additional time is about $25\%$ . Given the significant improvements in recommendation performance, the incurred costs are considered acceptable. + +# 6 Conclusion + +This work introduces a novel instruction-tuning paradigm that integrates large language models with collaborative filtering, enhancing their ability to capture complex user-item interactions and preferences. This model-agnostic approach easily fits into existing recommender systems, improving generalization in data-scarce scenarios where traditional methods falter. Key innovations include combining external features with collaborative patterns and a reinforcement learning-based framework for personalized feature enhancement, tackling cold-start profiling and data noise challenges. Evaluations demonstrate the significant benefits and compatibility of our approach with state-of-the-art recommender systems. + +# 7 Limitations + +In real-world scenarios, items commonly have abundant modal information, including text, images, audio, and more. However, this work primarily focuses on exploring the collaborative feature enhancement paradigm based on textual features, and does not fully exploit the potential of multimodal information. While the proposed method can be extended to other modalities using distinct modal encoders, it is important to note that other modalities may introduce novel challenges and opportunities for feature enhancement. Thus, the exploration of these modalities represents a promising future direction for further investigation. + +# References + +Keqin Bao, Jizhi Zhang, Yang Zhang, Wenjie Wang, Fuli Feng, and Xiangnan He. 2023. Tallrec: An effective and efficient tuning framework to align large language model with recommendation. In RecSys, pages 1007-1014. +Junyi Chen, Lu Chi, Bingyue Peng, and Zehuan Yuan. 2024. Hllm: Enhancing sequential recommendations via hierarchical large language models for item and user modeling. arXiv preprint arXiv:2409.12740. +Lei Chen, Le Wu, Richang Hong, Kun Zhang, and Meng Wang. 2020. Revisiting graph based collaborative filtering: A linear residual graph convolutional network approach. In AAAI, volume 34, pages 27-34. +Abhimanyu Dubey, Abhinav Jauhri, Abhinav Pandey, Abhishek Kadian, Ahmad Al-Dahle, Aiesha Letman, Akhil Mathur, Alan Schelten, Amy Yang, Angela Fan, et al. 2024. The llama 3 herd of models. arXiv preprint arXiv:2407.21783. +Wenqi Fan, Zihuai Zhao, Jiatong Li, Yunqing Liu, Xiaowei Mei, Yiqi Wang, Jiliang Tang, and Qing Li. 2023. Recommender systems in the era of large language models (llms). arXiv preprint arXiv:2307.02046. +Yunfan Gao, Tao Sheng, Youlin Xiang, Yun Xiong, Haofen Wang, and Jiawei Zhang. 2023. Chatrec: Towards interactive and explainable llms-augmented recommender system. arXiv preprint arXiv:2303.14524. +Shijie Geng, Shuchang Liu, Zuohui Fu, Yingqiang Ge, and Yongfeng Zhang. 2022. Recommendation as language processing (rlp): A unified pretrain, personalized prompt & predict paradigm (p5). In RecSys, pages 299-315. +Xiangnan He, Kuan Deng, Xiang Wang, Yan Li, Yong-dong Zhang, and Meng Wang. 2020. Lightgcn: Simplifying and powering graph convolution network for recommendation. In SIGIR, pages 639-648. + +Xiangnan He, Lizi Liao, Hanwang Zhang, Liqiang Nie, Xia Hu, and Tat-Seng Chua. 2017. Neural collaborative filtering. In WWW, pages 173-182. +Edward J Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. 2021. Lora: Low-rank adaptation of large language models. arXiv preprint arXiv:2106.09685. +Mohsen Jamali and Martin Ester. 2010. A matrix factorization technique with trust propagation for recommendation in social networks. In RecSys, pages 135-142. +Jian Jia, Yipei Wang, Yan Li, Honggang Chen, Xuehan Bai, Zhaocheng Liu, Jian Liang, Quan Chen, Han Li, Peng Jiang, et al. 2024. Knowledge adaptation from large language model to recommendation for practical industrial application. arXiv preprint arXiv:2405.03988. +Yangqin Jiang, Chao Huang, and Lianghao Huang. 2023. Adaptive graph contrastive learning for recommendation. In SIGKDD, pages 4252-4261. +Yangqin Jiang, Lianghao Xia, Wei Wei, Da Luo, Kangyi Lin, and Chao Huang. 2024. Diffmm: Multi-modal diffusion model for recommendation. In Proceedings of the 32nd ACM International Conference on Multimedia, pages 7591-7599. +Yehuda Koren, Robert Bell, and Chris Volinsky. 2009. Matrix factorization techniques for recommender systems. Computer, 42(8):30-37. +Yehuda Koren, Steffen Rendle, and Robert Bell. 2021. Advances in collaborative filtering. Recommender systems handbook, pages 91-142. +Jianghao Lin, Xinyi Dai, Yunjia Xi, Weiwen Liu, Bo Chen, Xiangyang Li, Chenxu Zhu, Huifeng Guo, Yong Yu, Ruiming Tang, et al. 2023. How can recommender systems benefit from large language models: A survey. arXiv preprint arXiv:2306.05817. +Zihan Lin, Changxin Tian, Yupeng Hou, and Wayne Xin Zhao. 2022. Improving graph collaborative filtering with neighborhood-enriched contrastive learning. In WWW, pages 2320-2329. +Peng Liu, Lemei Zhang, and Jon Atle Gulla. 2023. Pretrain, prompt, and recommendation: A comprehensive survey of language modeling paradigm adaptations in recommender systems. Transactions of the Association for Computational Linguistics, 11:1553-1571. +Sichun Luo, Bowei He, Haohan Zhao, Wei Shao, Yanlin Qi, Yinya Huang, Aojun Zhou, Yuxuan Yao, Zongpeng Li, Yuanzhang Xiao, et al. 2024. Recranker: Instruction tuning large language model as ranker for top-k recommendation. ACM TOIS. + +Hanjia Lyu, Song Jiang, Hanqing Zeng, Yinglong Xia, Qifan Wang, Si Zhang, Ren Chen, Christopher Leung, Jiajie Tang, and Jiebo Luo. 2023. Llm-rec: Personalized recommendation via prompting large language models. arXiv preprint arXiv:2307.15780. +Xubin Ren, Wei Wei, Lianghao Xia, Lixin Su, Suqi Cheng, Junfeng Wang, Dawei Yin, and Chao Huang. 2023. Representation learning with large language models for recommendation. arXiv preprint arXiv:2310.15950. +John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. 2017. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347. +Nisan Stiannon, Long Ouyang, Jeffrey Wu, Daniel Ziegler, Ryan Lowe, Chelsea Voss, Alec Radford, Dario Amodei, and Paul F Christiano. 2020. Learning to summarize with human feedback. NIPS, 33:3008-3021. +Xiaoyuan Su and Taghi M Khoshgoftaar. 2009. A survey of collaborative filtering techniques. Advances in artificial intelligence, 2009. +Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, et al. 2023. Llama 2: Open foundation and fine-tuned chat models. arXiv preprint arXiv:2307.09288. +Jianling Wang, Raphael Louca, Diane Hu, Caitlin Cellier, James Caverlee, and Liangjie Hong. 2020. Time to shop for Valentine's day: Shopping occasions and sequential recommendation in e-commerce. In WSDM, pages 645-653. +Xiang Wang, Xiangnan He, Meng Wang, et al. 2019. Neural graph collaborative filtering. In SIGIR. +Wei Wei, Xubin Ren, Jiabin Tang, Qinyong Wang, Lixin Su, Suqi Cheng, Junfeng Wang, Dawei Yin, and Chao Huang. 2024. Llmrec: Large language models with graph augmentation for recommendation. In WSDM, pages 806-815. +Fangzhao Wu, Ying Qiao, Jiun-Hung Chen, Chuhan Wu, Tao Qi, Jianxun Lian, Danyang Liu, Xing Xie, Jianfeng Gao, Winnie Wu, et al. 2020. Mind: A large-scale dataset for news recommendation. In ACL, pages 3597-3606. +Jiancan Wu, Xiang Wang, Fuli Feng, Xiangnan He, Liang Chen, Jianxun Lian, and Xing Xie. 2021. Self-supervised graph learning for recommendation. In SIGIR, pages 726-735. +Liang Wu, Diane Hu, Liangjie Hong, and Huan Liu. 2018. Turning clicks into purchases: Revenue optimization for product search in e-commerce. In SIGIR, pages 365-374. + +Tiansheng Yao, Xinyang Yi, Derek Zhiyuan Cheng, Felix Yu, Ting Chen, Aditya Menon, Lichan Hong, Ed H Chi, Steve Tjoa, Jieqi Kang, et al. 2021. Self-supervised learning for large-scale item recommendations. In CIKM, pages 4321-4330. +Junliang Yu, Hongzhi Yin, Xin Xia, Tong Chen, Jundong Li, and Zi Huang. 2023. Self-supervised learning for recommender systems: A survey. TKDE. +Junliang Yu, Hongzhi Yin, Xin Xia, et al. 2022. Are graph augmentations necessary? simple graph contrastive learning for recommendation. In SIGIR'22. +Zheng Yuan, Fajie Yuan, Yu Song, Youhua Li, Junchen Fu, Fei Yang, Yunzhu Pan, and Yongxin Ni. 2023. Where to go next for recommender systems? id-vs. modality-based recommender models revisited. In SIGIR, pages 2639-2649. +Ruohan Zhan, Changhua Pei, Qiang Su, Jianfeng Wen, Xueliang Wang, Guanyu Mu, Dong Zheng, Peng Jiang, and Kun Gai. 2022. Deconfounding duration bias in watch-time prediction for video recommendation. In SIGKDD, pages 4472-4481. +Chao Zhang, Shiwei Wu, Haoxin Zhang, Tong Xu, Yan Gao, Yao Hu, and Enhong Chen. 2024. Notellm: A retrievable large language model for note recommendation. In WWW, pages 170-179. +Fanjin Zhang, Jie Tang, Xueyi Liu, Zhenyu Hou, Yuxiao Dong, Jing Zhang, Xiao Liu, Ruobing Xie, Kai Zhuang, Xu Zhang, et al. 2021. Understanding wechat user preferences and "wow" diffusion. TKDE, 34(12):6033-6046. +Junjie Zhang, Ruobing Xie, Yupeng Hou, Wayne Xin Zhao, Leyu Lin, and Ji-Rong Wen. 2023. Recommendation as instruction following: A large language model empowered recommendation approach. arXiv preprint arXiv:2305.07001. + +# A Appendix / supplemental material + +# A.1 Details of Dataset + +Table 4 provides a summary of the statistical information for the three datasets. The following sections outline the specific details for each dataset: + +- MIND: This large-scale dataset is designed for news recommendation research. We selected data from two consecutive days, assigning one day as the training set and the other as the test set. The raw text includes the news category, title, and abstract. +- Netflix: It is selected from a renowned video streaming platform, and we get the implicit feedback data from the Netflix Prize Data on Kaggle. We curated two consecutive years' worth of data based on time, utilizing one year as the training set and the other as the test set. The raw text information for the items was derived from the movie titles themselves. +- Industrial: It is a large-scale real dataset, which is collected from a prominent online content platform (name omitted for anonymity), serving millions of users. It comprises news articles. We sampled data from two consecutive dates, assigning them as the training set and test set, respectively. The raw text information for each item is represented by its title. + +Table 4: Statistics of the experimental datasets. + +
StatisticsMINDNetflixIndustrial
# User5712816835117433
# Overlap. Item1020623272417
# Snapshotdailyyearlydaily
Training Set
# Item23866532152069
# Interactions897341655395858087
# Sparsity99.934%98.495%99.995%
Test Set
# Item24618413158155
# Interactions879741307051876415
# Sparsity99.937%99.077%99.995%
+ +# A.2 Details of Selected Base Models + +This section gives a brief introduction of the selected base models in this work. + +- BiasMF (Koren et al., 2009): It is a matrix factorization method that aims to enhance user-specific + +preferences for recommendation by incorporating bias vectors for users and items. + +- NCF (He et al., 2017): It is a neural network-based method that replaces the dot-product operation in conventional matrix factorization with multi-layer neural networks. This allows the model to capture complex user-item interactions and provide recommendations. For our comparison, we utilize the NeuMF variant of NCF. +- LightGCN (He et al., 2020): This model leverages the power of neighborhood information in the user-item interaction graph by using a layer-wise propagation scheme that involves only linear transformations and element-wise additions. +- SGL (Wu et al., 2021): The model enhances LightGCN by integrating contrastive learning with self-supervision. It employs data augmentation strategies, including random walks and node/edge dropout, to corrupt graph structures. +- SimGCL (Yu et al., 2022): This work introduces a straightforward contrastive learning (CL) method that eliminates graph augmentations. Instead, it adds uniform noise to the embedding space to generate contrastive views. + +# A.3 Performance Comparison: Setting + +In the performance comparison experiments outlined in Sec. 5.2, we considered two distinct testing data settings: the full-shot setting and the zero-shot setting. The full-shot setting entailed using the original test set as the testing data, where certain items in the test set had appeared in the training set previously. Conversely, the zero-shot setting involved exclusively testing items that had not been encountered in the training set. This setting was specifically designed to assess the effectiveness of our proposed RecLM in addressing the item cold-start scenario, where limited or no prior information is available for certain items. + +In the conducted experiments, we explored two variants: Base and Augment. The Base variant demonstrates the application of our proposed cold-start recommendation paradigm by utilizing only user-side ID embeddings and item-side raw text embeddings, without incorporating the profiles generated by LLMs. On the other hand, the Augment + +variant involves fully integrating our proposed RecLM into traditional recommenders. The comparison between two variants enables us to assess the effectiveness of our approach in enhancing the performance of recommenders by leveraging LLMs to generate informative profiles. + +# A.4 Ablation Study: Setting + +In the case of $GPT\_KD$ variant, the approach involves exclusively fine-tuning the open-source LLM by utilizing user profile data generated solely through ChatGPT3.5, as discussed in Sec. 4.2.1. Conversely, for Naive variant, the two-turn dialogue-based instruction tuning technique (i.e., Sec. 4.2.2) is applied based on the variant $GPT\_KD$ , but with the tuning strategy limited to the conventional single-turn dialogue tuning approach. As for the variant Mask, a similar two-turn dialogue-based instruction tuning technique is employed based on the variant $GPT\_KD$ , with the additional application of a masking-based tuning strategy. As for Ours, it refers to RecLM, which employs RL-based personalized feature enhancement based on the variant Mask. + +# A.5 Implementation Details + +# A.5.1 Parameter-Efficient Fine-Tuning + +To achieve efficient fine-tuning of LLMs while preserving their inherent knowledge reasoning capabilities, we employed the Parameter-Efficient FineTuning (PEFT) method. Specifically, in this study, we chose Low-Rank Adaptation (LoRA) (Hu et al., 2021) as the fine-tuning technique for the open-source LLMs, specifically Llama2-7b-chat (Touvron et al., 2023) and Llama3-8b-instruct (Dubey et al., 2024). This approach allows us to strike a balance between retaining the valuable knowledge of the pre-trained models and adapting them to specific tasks effectively. + +# A.5.2 Integration of RecLM into Various Base Recommenders + +Following the integration of our method into various base recommenders, we meticulously conducted an extensive hyperparameter search, and also explored the optimal approach for incorporating profile features for each recommendation methods, ensuring a fair comparison. Specifically, each base model is implemented with PyTorch, using Adam optimizer and Xavier initializer with default parameters. Training batch size is set as 4096. The dimensionality of embedding vectors is + +![](images/2c20c58005a16b839fe3cd1621e1ca2977c4abf2d3a4b439f08c25086d02a685.jpg) +Figure 4: Generated profiles w/ and w/o RL. + +set as 32. The learning rate is set as $1e - 3$ . The coefficient for controlling $\mathcal{L}_2$ regularization term is searched in $\{1e - 3, 1e - 4, 1e - 5, 1e - 6, 1e - 7\}$ . For GNN-based models (e.g., LightGCN, SGL, and SimGCL), the number of GCN layers is set as 2. For SSL-based models (e.g., SGL and SimGCL), the temperature coefficient is searched in $\{0.1, 0.5, 1.0\}$ . + +# A.6 Case Study + +To intuitively explore the contribution of reinforcement learning to the personalization of generated profiles, we conducted a case study using the MIND dataset. In this study, as shown in Fig. 4, the target user for whom the profile is being generated is User 49. This user has interacted with two items: Item 472 and Item 1572. Additionally, we identified three similar users who provide collaborative information: User 11451, User 20522, and User 341. + +The user profile generated for User 49 after instruction tuning, but without RL tuning, contains several irrelevant keywords related to the interacted items, such as "Foodie," "Food and drink," and "Horoscope." Notably, these terms also appear in the profiles of User 11451 and User 20522, suggesting that the generated profile is overly influenced by too many collaborative users. In contrast, the profile generated for User 49 after RL tuning effectively preserves the preferences indicated in the interaction history while incorporating relevant implicit keywords from collaborative users. For example, the term "pop culture" is derived from User 341's profile. This approach provides precise and valuable additional information for modeling User 49's preferences. We attribute this improvement to our proposed RL-based personalized feature en + +![](images/d6a490c30e6f3af7a4b98aa6aec166de71012c951d959a3ba717b4dae2694305.jpg) +(a): MIND data + +![](images/3710ebdcb6152b7b3e29ffa03498b15bf7853214b6a148517c6315848862033b.jpg) + +![](images/0faffc9838323143798f9f462c22b3b790b2f24203cf964d5d5fcea5e2a2bd9e.jpg) +(b): Netflix data + +![](images/acd96b8a0c97a034c84af47d72efdf4d6e8d51c5f8e16f92704cb5e39d8dd886.jpg) +Figure 5: Ablation study on the LLM tuning techniques. + +hancement techniques, which effectively address the noise and over-smoothing issues that can arise during the instruction-tuning process. + +# A.7 key Experimental Results Obtained Using Llama3.1-8b-instruct as the Base LLM. + +# A.7.1 Performance Comparison + +To validate that our RecLM can achieve outstanding results on different open-source LLMs, we conduct relevant experiments on the latest open-source LLM, llama3.1-8b-instruct. The settings are consistent with the experimental settings in the main text. The relevant experimental results are shown in Table 5. + +The experimental results indicate that our RecLM can effectively enhance the performance of traditional collaborative filtering recommendation system models in cold-start scenarios, demonstrating the generalizability of the instruction fine-tuning approach we proposed, which can be applied to various open-source LLMs. Furthermore, when comparing the results based on llama2-7b-chat with those from llama3.1-8b-instruct, we observe improvements across most metrics. This suggests that as the performance of the base LLMs increases, our method can deliver even greater enhancements for recommendation systems. + +# A.7.2 Ablation Study + +We also conduct ablation experiments on the proposed instruction tuning technique based on llama3.1-8b-instruct, and the specific results are shown in Figure 5. The experimental results clearly demonstrate that the key tuning techniques we proposed are effective across various open-source LLMs, reinforcing the generalizability of our method. + +# A.8 Algorithmic Description + +Algorithm 1: Text-enhanced representations for ID-based recommendation framework. + +Input:User set U, item set V, item text features $F_{v}$ ,user interaction histories $F_{u}$ ,user id embeddings $E_{u}$ and item id embeddings $E_{v}$ + +Output: Augmented representations $\hat{e}_u^{aug}$ , $\hat{e}_v^{aug}$ . + +1 for each item $v\in \mathcal{V}$ do +$f_{v} = \mathbf{MLP}_{text}(F_{v}[v])$ +3 end +4 Generate user profiles + +$$ +P _ {u} = \operatorname {L L M} _ {\text {p r o f i l e}} \left(F _ {u}\right) +$$ + +5 Generate item profiles + +$$ +P _ {v} = \operatorname {L L M} _ {\text {p r o f i l e}} \left(F _ {v}\right) +$$ + +6 for each user $u\in \mathcal{U}$ do + +$$ +\begin{array}{c c} \text {\bf 7} & \hat {e} _ {u} ^ {a u g} = \\ & \mathrm {M L P} _ {f u s i o n} (E _ {u} [ u ] | | \mathrm {M L P} _ {p r o j} (P _ {u} [ u ])) \end{array} +$$ + +8 end + +9 for each item $v \in \mathcal{V}$ do + +$$ +\begin{array}{c c} \mathbf {1 0} & \hat {e} _ {v} ^ {a u g} = \\ & \mathrm {M L P} _ {f u s i o n} (f _ {v} [ v ] | | \mathrm {M L P} _ {p r o j} (P _ {v} [ v ])) \end{array} +$$ + +11 end + +12 Initialize recommender $\mathbf{R}$ with parameters $\theta$ +13 for epoch $= 1$ to $T$ do + +$$ +\begin{array}{l l} \text {f o r} (u, v) \text {i n i n t e r a c t i o n g r a p h G d o} \\ \hat {y} = \hat {e} _ {u} ^ {a u g} \cdot \hat {e} _ {v} ^ {a u g} \\ \mathcal {L} = \mathrm {B P R} _ {-} \mathrm {L o s s} (\hat {y}, D) \\ \text {U p d a t e} \theta \text {v i a} \end{array} +$$ + +18 end + +19 end +20 Return $\hat{e}_u^{\mathrm{aug}}$ , $\hat{e}_v^{\mathrm{aug}}$ + +# A.9 Instruction Designs + +In this section, we provide a comprehensive overview of the instructions utilized for fine-tuning at each stage of our process. We will also discuss the methodologies employed to construct both positive and negative training samples for the reinforcement learning reward model. + +Instruction designs for ChatGPT knowledge distillation. As shown in Figure 6(a), to facilitate the knowledge distillation process of ChatGPT, we leverage the textual information associated with each user and the items they interact with as inputs for the LLMs. The LLMs then generate user profiles, encompassing the user's identity along with + +Table 5: Performance comparison on MIND and Netflix data in terms of Recall and NDCG. The superscript * indicates the improvement is statistically significant where the p-value $< {0.05}$ . + +
DatasetMINDNetflix
BackboneVariantsR@20R@40N@20N@40R@20R@40N@20N@40
Full-Shot Setting
BiasMFBase Augment.0.06830.10390.03110.03990.04490.07900.14510.1375
0.0839*0.1402*0.0331*0.0479*0.0559*0.0871*0.1802*0.1689*
NCFBase Augment.0.07130.09850.03250.04450.05810.09360.18480.1721
0.0789*0.1291*0.03120.04420.0656*0.1031*0.1987*0.1823*
LightGCNBase Augment.0.03890.07020.01500.02190.04670.08150.14880.1424
0.0823*0.1021*0.0371*0.0424*0.0613*0.0978*0.1622*0.1496*
SGLBase Augment.0.03450.07080.01270.02100.02770.04160.08550.0762
0.0877*0.1123*0.0433*0.0539*0.0792*0.1287*0.1999*0.1871*
SimGCLBase Augment.0.04210.06360.01550.02120.02310.04410.08100.0825
0.0617*0.0994*0.0281*0.0343*0.0613*0.1013*0.1872*0.1730*
Zero-Shot Setting
BiasMFBase Augment.0.00960.01650.00310.00410.03110.07690.01670.0292
0.0310*0.0446*0.0169*0.0192*0.1211*0.1370*0.0797*0.0554*
NCFBase Augment.0.03010.03830.00800.00970.04800.11580.01960.0384
0.0437*0.0489*0.0136*0.0141*0.1813*0.1897*0.1037*0.0994*
LightGCNBase Augment.0.01380.02920.00460.00780.09740.12560.04460.0415
0.0211*0.0417*0.0071*0.0100*0.1425*0.1601*0.0749*0.0481*
SGLBase Augment.0.01620.02640.00620.00740.03850.14410.02740.0579
0.0278*0.0481*0.0103*0.0119*0.1210*0.1880*0.0515*0.0950*
SimGCLBase Augment.0.01640.03000.00550.00840.07930.12590.03360.0460
0.0297*0.0354*0.0088*0.0103*0.1654*0.2003*0.1668*0.1694*
+ +their respective interests. + +Instruction designs for two-turn dialogue instruction tuning. For the instruction-tuning based on two-round dialogues, meticulous attention has been given to designing corresponding instructions. As illustrated in Figure 6(b), we commence by providing specific system instructions to stimulate the LLMs' comprehension of collaborative filtering methods. Subsequently, in the first round of dialogue, the input instructions encompass the interaction history of several similar users, along with the relevant details of the items involved. To obtain those similar users, we employ a conventional ID-based collaborative filtering recommendation system, followed by similarity calculation based on these embeddings. The expected output from the LLMs should include user profiles for each mentioned user in the input. Moving on to the second round of dialogue, we explicitly prompt the LLMs to determine, based on the acquired user profiles and item information, whether a previously mentioned item is likely to be interacted with by a specific user using collaborative filtering methods. The expected response from the LLMs should be a binary "Yes" or "No" answer. + +Instruction designs for user profile generation. Once the instruction-tuning stage is complete, the LLMs are equipped with the capability to generate profiles while considering collaborative relation- + +ships. In line with Figure 6(c), we have meticulously designed instructions specifically for user profile generation. Consistent with the instruction-tuning stage, we provide explicit system instructions to stimulate the LLMs' comprehension of collaborative filtering methods. The input instructions encompass the interaction records of multiple similar users (including a target user for whom the LLMs are required to generate a profile) as well as detailed textual information pertaining to the involved items. The expected output from the LLMs is the target user profile. + +To ensure semantic alignment between user-side and item-side features, our next objective, after obtaining high-quality user profiles, is to generate item profiles based on the user's profile. Here, the item profile refers to the profile of the target user for that particular item. To accomplish this, we adopt a two-step approach. Firstly, for items that have user interactions, we generate item profiles by leveraging the profiles of the interacting users. This helps establish a connection between the users and the items they engage with. Secondly, using the raw embeddings of the items, we search for similar cold-start items and employ the LLM to infer their profiles based on semantic similarity. As depicted in Figure 6(d), the input instructions consist of a target item and several similar items. We provide the specific textual information of these items, along + +Algorithm 2: LLM Instruction Tuning with Collaborative Signals. +Input: Pretrained language model LLM, user-item interaction graph $G$ , and user collaborative neighborhoods $\mathcal{N}_u$ +Output: Fine-tuned LLM model. +1 # Two-phase Instruction Construction +2 for each user $u \in G$ .nodes do +3 # Phase 1: Collaborative Profile Generation +4 $Q^{(1)} =$ FormatPrompt(u, $\mathcal{N}_{\square}, \mathcal{V}_u, \mathcal{V}_{\mathcal{N}_u}$ ) +5 $R^{(1)} = LLM_{generate}(Q^{(1)})$ +6 # Phase 2: Interaction Prediction +7 $v^* = \text{SampleBalanced}(\mathcal{V}_u, \mathcal{V}_{\mathcal{N}_u})$ +8 $Q^{(2)} = \text{FormatPredPrompt}(u, v^*)$ +9 $R^{(2)} = \# [(u, v^*) \in G.\text{edges}]$ +10 # Masked Sequence Training +11 $X = [Q^{(1)}; R^{(1)}; Q^{(2)}]$ +12 Compute $\mathcal{L}_{CE} =$ $CE(LLM(X), \text{Mask}(R^{(1:2)}))$ +end +14 # RL-based Refinement +15 Initialize $R_\psi$ via contrastive learning +for $k = 1$ to $K$ do +17 Generate responses $\pi = LLM(Q^{infer})$ +18 Compute $r = R_\psi(Q^{infer}, \pi) - \beta KL(\pi || \pi_{ref})$ +19 Update LLM via PPO with $\mathcal{L}^{CLIP}(r)$ +end +21 Return $LLM_{fine-tuned}$ + +with the profiles of the similar items (selected from items that already have profiles). The expected output from the LLMs is the profile of the target item, further enhancing semantic alignment across the recommendation system. + +Positive/Negative responses construction for reward model training. In Sec 4.3, we propose personalized feature enhancement based on reinforcement learning as a means to address the noise introduced by instruction-tuning and the potential over-smoothing issue stemming from collaborative feature enhancement. The crux of reinforcement learning lies in training the reward model, and constructing high-quality positive and negative samples plays a pivotal role in this process. As shown in Figure 6(e), for positive samples, we leverage SOTA LLMs (e.g., ChatGPT) with a manual selection approach. For negative samples, they can be categorized into two distinct groups. The first category consists of profiles of similar users, which aim to train the reward model in distinguishing more nuanced profiles and mitigating the over-smoothing issue. The second category encompasses low-quality responses of various types, such as missing or repeated profiles, thereby providing negative examples for training the reward model effectively. + +![](images/9a54f986667073f2797266a9f6aa33728cf095c7e1e7491eb59114e21d270137.jpg) + +![](images/fc672a6c263726f7e651513cb112c28cbecdef2f3fb4d14a4410c40bb992b902.jpg) + +Now you are a user profile generator. I will provide you with a list of news articles that a user has clicked on in the past. Each news article contains four pieces of information: category, subcategory, title, and abstract. Based on this information, please generate the user's profile. Here is the list of previously clicked news articles: [Item Text Info.1], [Item Text Info.2], ..., [Item Text Info.N]. Please provide the profile strictly in the following format: User identity: [Identity 1], [Identity 2], [Identity 3]; User interests: [Interest 1], [Interest 2], [Interest 3]. Emphasize that only the most likely three identities and interests should be provided, and strictly adhere to the above format. + +User identity: [Identity 1], [Identity 2], [Identity 3]; User interests: [Interest 1], [Interest 2], [Interest 3]. + +Instruction Designs for GPT_KD + +(a) Instruction designs for ChatGPT knowledge distillation. + +System + +system + +You are a recommendation system capable of predicting user-item interactions based on the principles of collaborative filtering. Specifically, it can be divided into two stages. In the first stage, you will generate a user preference profile based on the user's historical behavior. In the second stage, using the preference profile generated in the first stage, you will find users with similar preferences and apply their historical interaction records to the target user. This allows you to determine whether the target user is likely to interact with a particular item in the future. + +![](images/a66f0aad1ffcd6e33ca938506aab8ffcda005afcbb2e75afb83ddb124644c3af.jpg) + +![](images/f838dcb7763828b363df62851761fb25082945bd45415569e875bbb9897cec72.jpg) + +Each user's historical item interaction list is as follows: [User ID, item interaction list:[Item ID, Item ID, Item ID, ...]]; [User ID, item interaction list:[Item ID, Item ID, Item ID, ...]] ... [User ID, item interaction list:[Item ID, Item ID, Item ID, ...]]. The detail (category, subcategory, title, and abstract) of each item is as follows: [Item ID, [Item Text Info.]]; [Item ID, [Item Text Info.]]... [Item ID, [Item Text Info.]]. Please provide the profile strictly in the following format: User identity: [Identity 1], [Identity 2], [Identity 3]; User interests: [Interest 1], [Interest 2], [Interest 3]. + +![](images/27bcbbb979f54fcdc98fb9cd82160528608bd1863ed9cfa124d931cbb5aa5b89.jpg) + +User ID, profile: User identity: [Identity 1], [Identity 2], [Identity 3]; User interests: [Interest 1], [Interest 2], [Interest 3]. +User ID, profile: User identity: [Identity 1], [Identity 2], [Identity 3]; User interests: [Interest 1], [Interest 2], [Interest 3]. + +![](images/45a4e0c2398eb0bce0d6bfbf45242144790cdd7c8e86e7d88641b0bf6b4fc5e3.jpg) + +User ID, profile: User identity: [Identity 1], [Identity 2], [Identity 3]; User interests: [Interest 1], [Interest 2], [Interest 3]. + +![](images/d9f985fee8c647fa95212922704c917affacca13bf1966059a3c6bcd778afeff.jpg) + +Based on the user preferences and item information mentioned above, using collaborative filtering method, please determine whether User ID will interact with Item ID. Just answer Yes or No. + +![](images/966c0e951495cc27db5c47c18537cf6534518b30efc6da98f6f9ebcc837d168e.jpg) + +Yes / No + +Instruction Designs for Two-Turn Dialogue Instruction Tuning + +(b) Instruction designs for two-turn dialogue instruction tuning. + +System + +Instruction + +You are a recommendation system capable of predicting user-item interactions based on the principles of collaborative filtering. Specifically, it can be divided into two stages. In the first stage, you will generate a user preference profile based on the user's historical behavior. In the second stage, using the preference profile generated in the first stage, you will find users with similar preferences and apply their historical interaction records to the target user. This allows you to determine whether the target user is likely to interact with a particular item in the future. + +![](images/fbaf5f340cb0808a36a5eafa81e905ab6c6418148a37364bdd12a77df28c8b22.jpg) +Figure 6: Instruction designs for RecLM + +Each user's historical item interaction list is as follows: [Target User ID, item interaction list:[Item ID, Item ID, Item ID, ...]]; [User ID, item interaction list:[Item ID, Item ID, Item ID, ...]]... [User ID, item interaction list:[Item ID, Item ID, Item ID, ...]]. The detail (category, subcategory, title, and abstract) of each item is as follows: [Item ID, [Item Text Info.]]; [Item ID, [Item Text Info.]]... [Item ID, [Item Text Info.]]. Please provide the profile of the target User ID strictly in the following format: User identity: [Identity 1], [Identity 2], [Identity 3]; User interests: [Interest 1], [Interest 2], [Interest 3]. Emphasize that only the most likely three identities and interests of the target user should be provided, and strictly adhere to the above format. + +![](images/4abed644e045aede4d488411396a0d8b33876e2023c9336110d4fbbf56803581.jpg) + +User identity: [Identity 1], [Identity 2], [Identity 3]; User interests: [Interest 1], [Interest 2], [Interest 3]. + +Instruction Designs for User Profile Generation + +(c) Instruction designs for user profile generation. + +![](images/da0b0c62e677d1a6b9127bba08b463e4dc113afc8a1616147499d10f8bd53ebc.jpg) + +Now you are a profile generator. I will provide you with textual information about one target item as well as a list of other items with their textual information and their targeting users' profiles. Based on this information, please generate the user profile of this target item. The target item text information: [Item Text Info]. Here is the list of item (text information and the profile of the users that the item is targeting): [Item ID: [Item Text Info], the profile of the users that the item is targeting: [Targeting Profile]]; [Item ID: [Item Text Info], the profile of the users that the item is targeting: [Targeting Profile]]... [Item ID: [Item Text Info], the profile of the users that the item is targeting: [Targeting Profile]]. Please provide the profile with 5 identities and 5 interests strictly in the following format: User identity: [Identity 1], [Identity 2], [Identity 3], [Identity 4], [Identity 5]; User interests: [Interest 1], [Interest 2], [Interest 3], [Interest 4], [Interest 5]. + +![](images/040be52cc5cf3668e9a4481d5cfd0944ec33c5bf66ba41810e1c805b72bdded7.jpg) + +User identity: [Identity 1], [Identity 2], [Identity 3]; User interests: [Interest 1], [Interest 2], [Interest 3]. + +Instruction Designs for Item Profile Generation + +(d) Instruction designs for item profile generation. + +![](images/6dd133ba541265877b0ad769da221d1c9d50bbf5f6aa86c9f8b99b00d5f2c55f.jpg) + +Each user's historical item interaction list is as follows: [Target User ID, item interaction list:[Item ID, Item ID, Item ID, ...]]; [User ID, item interaction list:[Item ID, Item ID, Item ID, ...]]... [User ID, item interaction list:[Item ID, Item ID, Item ID, ...]]. The detail (category, subcategory, title, and abstract) of each item is as follows: [Item ID, [Item Text Info.]]; [Item ID, [Item Text Info.]]... [Item ID, [Item Text Info.]]]. Please provide the profile of the target User ID strictly in the following format: User identity: [Identity 1], [Identity 2], [Identity 3]; User interests: [Interest 1], [Interest 2], [Interest 3]. Emphasize that only the most likely three identities and interests of the target user should be provided, and strictly adhere to the above format. + +![](images/83c771f6c4db3de91b0c659f833966b5fd6f3d7332e241ec7d04ee7100a677ed.jpg) + +Pos. User identity: [Identity 1], [Identity 2], [Identity 3]; User interests: [Interest 1], [Interest 2], [Interest 3]. + +Similar User identity: [Identity 1], [Identity 2], [Identity 3]; +User interests: [Interest 1], [Interest 2], [Interest 3]. + +Reward Model + +Neg. + +Over-Smoothing Issue + +Neg. User identity: [Identity 1], [Identity 2]; User interests: [Interest 1], [Interest 2]. + +Profile Missing Issue + +Neg. User identity: [Identity 1], [Identity 1], [Identity 1]; User interests: [Interest 1], [Interest 1], [Interest 1]. + +Profile Duplication Issue + +...More + +Positive / Negative Responses Construction for Reward Model Training + +(e) Positive/Negative responses construction for reward model training. \ No newline at end of file diff --git a/reclmrecommendationinstructiontuning/images.zip b/reclmrecommendationinstructiontuning/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..d0ce8ac856ca2d6faa43ea418886448862e2f1bf --- /dev/null +++ b/reclmrecommendationinstructiontuning/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:115c6235f304839ec080a477403d404808fbf8f1a443337f274977a01df0b796 +size 946286 diff --git a/reclmrecommendationinstructiontuning/layout.json b/reclmrecommendationinstructiontuning/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..d33555e08ab728d0ccceca057404189f405b38b5 --- /dev/null +++ b/reclmrecommendationinstructiontuning/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:12437026c4d03b7888d753e6e16be7fef17848c1eb199510bad5a4ab2d0bcdf1 +size 636603 diff --git a/reconsideringllmuncertaintyestimationmethodsinthewild/d2247728-f3c1-48db-af9f-31c4563fb925_content_list.json b/reconsideringllmuncertaintyestimationmethodsinthewild/d2247728-f3c1-48db-af9f-31c4563fb925_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..65f8aecca6181d389243377ba2129a4d50033e0e --- /dev/null +++ b/reconsideringllmuncertaintyestimationmethodsinthewild/d2247728-f3c1-48db-af9f-31c4563fb925_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dba89f2a29cce2dc7d9ccb04539a06c05260e2ea4cc554fd127b5ab05773adbb +size 168335 diff --git a/reconsideringllmuncertaintyestimationmethodsinthewild/d2247728-f3c1-48db-af9f-31c4563fb925_model.json b/reconsideringllmuncertaintyestimationmethodsinthewild/d2247728-f3c1-48db-af9f-31c4563fb925_model.json new file mode 100644 index 0000000000000000000000000000000000000000..a164a995e3693cd2458c154c1b21f37ed7c24d46 --- /dev/null +++ b/reconsideringllmuncertaintyestimationmethodsinthewild/d2247728-f3c1-48db-af9f-31c4563fb925_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b947ad90192437c4b9ee0a06e8f6024fbaa1a0af748abaefc2776056903cd45b +size 210799 diff --git a/reconsideringllmuncertaintyestimationmethodsinthewild/d2247728-f3c1-48db-af9f-31c4563fb925_origin.pdf b/reconsideringllmuncertaintyestimationmethodsinthewild/d2247728-f3c1-48db-af9f-31c4563fb925_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..bbc042e15dd20f035b762604f2f7906224a1601f --- /dev/null +++ b/reconsideringllmuncertaintyestimationmethodsinthewild/d2247728-f3c1-48db-af9f-31c4563fb925_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b4952aff38707f4dff7e3c7c62328589a8e496c47291363ff688fb67c36f15af +size 2351457 diff --git a/reconsideringllmuncertaintyestimationmethodsinthewild/full.md b/reconsideringllmuncertaintyestimationmethodsinthewild/full.md new file mode 100644 index 0000000000000000000000000000000000000000..db2f4ec2e38cc6211a615e92f021d83c0a4e6c7a --- /dev/null +++ b/reconsideringllmuncertaintyestimationmethodsinthewild/full.md @@ -0,0 +1,853 @@ +# Reconsidering LLM Uncertainty Estimation Methods in the Wild + +Yavuz Bakman $^{1*}$ Duygu Nur Yaldiz $^{1*}$ Sungmin Kang $^{1}$ Tuo Zhang $^{1}$ Baturalp Buyukates $^{2}$ Salman Avestimehr $^{1}$ Sai Praneeth Karimireddy $^{1}$ + +1University of Southern California 2University of Birmingham {ybakman, yaldiz}@usc.edu + +# Abstract + +Large Language Model (LLM) Uncertainty Estimation (UE) methods have become crucial tools for detecting hallucinations in recent years. While numerous UE methods have been proposed, most existing studies evaluate them in isolated short-form QA settings using threshold-independent metrics such as AUROC or PRR. However, real-world deployment of UE methods introduces several challenges. In this work, we systematically examine four key aspects of deploying UE methods in practical settings. Specifically, we assess (1) the sensitivity of UE methods to decision threshold selection, (2) their robustness to query transformations such as typos, adversarial prompts, and prior chat history, (3) their applicability to long-form generation, and (4) strategies for leveraging multiple UE scores for a single query. Our evaluations on 19 UE methods reveal that most of them are highly sensitive to threshold selection when there is a distribution shift in the calibration dataset. While these methods generally exhibit robustness against previous chat history and typos, they are significantly vulnerable to adversarial prompts. Additionally, while existing UE methods can be adapted for long-form generation through various strategies, there remains considerable room for improvement. Lastly, ensembling multiple UE scores at test time provides a notable performance boost which highlights its potential as a practical improvement strategy. Code is available at: https://github.com/duygunuryldz/uncertainty_in_the_wild. + +# 1 Introduction + +Generative Large Language Models (LLMs) have been deployed in various real-world applications, including code copilots, chatbots, and medical assistants (Sabouri et al., 2025; Ahrabian et al., 2025). Their widespread usage has raised significant safety considerations, particularly regarding reliability + +(Bengio et al., 2025; Tak et al., 2025). Despite advancements over the previous wave of language models, these models can still produce incorrect or misleading text, a problem commonly known as hallucination or confabulation (Ravi et al., 2024). + +Detecting hallucinations in LLM outputs is a fundamental challenge, with various approaches such as fact-checkers (Wang et al., 2024), tool-based detectors (Chern et al., 2023), LLM-collaboration-based methods (Feng et al., 2024), and Uncertainty Estimation (UE) methods. Among these, UE methods are particularly valuable as they only rely on the model itself and have shown promising performance across diverse datasets (Vashurin et al., 2025). + +Numerous UE methods have been proposed to detect hallucinations (Azaria and Mitchell, 2023; Zhao et al., 2024). However, these are typically tested in isolated short-form QA settings with simple prompts and evaluated using threshold-free metrics like AUROC and PRR (Malinin and Gales, 2021; Duan et al., 2024). Despite their value, the challenges of real-world deployment remain largely unexplored and are crucial for future research. + +Motivated by these concerns, we investigate four essential aspects of deploying a UE method in the real-world (wild), as also outlined in Figure 1: + +Sensitivity of Decision Threshold: Since the outputs of UE methods are typically continuous, selecting a threshold is necessary to make binary decisions (e.g., hallucination or not). This threshold is calibrated using a specific dataset to meet target performance levels. We explore whether the thresholds selected for UE methods achieve the desired performance in practice, evaluating their stability and effectiveness across different data distributions. + +Robustness to Input Transformations: We assess the resilience of UE methods to previously generated context, typos in the prompts, and adversarial prompts designed to confuse UE methods. + +Applicability to Long-Form Generations: While + +![](images/bb692e806bd0548631c7961adb0ff5c783d03a846e2e507c8f0b7bbf3954eeb2.jpg) +Existing Pipeline +Uncertainty in the Wild +Figure 1: Left: Existing pipeline for UE. The uncertainty score is calculated for short-form QA and evaluated using a threshold-free metric such as AUROC. Right: Reconsidering LLM uncertainty estimation methods in the wild. We ask four critical questions addressing challenges in deploying UE methods in real-world scenarios. + +many UE methods are proposed and tested for short-form QA, real-world questions often require extended answers containing multiple claims. We examine whether these methods designed for shortform QA can be adapted to long-form generations. Reconcilability of Diverse UE Scores: UE methods often produce varying judgments for the same input. Ensembling their outputs can enhance performance, potentially surpassing individual methods. + +With our comprehensive evaluation of 19 UE methods, our findings across the four investigated aspects can be summarized as follows: + +- Most UE methods are highly sensitive to decision threshold selection, particularly when the calibration data distribution differs from the test data distribution. +- The majority of the methods demonstrate resilience to previous context and typos in the prompt, but they exhibit significant performance drops with adversarial prompts. +- UE methods not originally designed for long-form generation can be adapted to this setting through additional steps. However, their effectiveness remains lower compared to their performance in short-form tasks. +- Ensembling multiple UE scores can yield meaningful performance improvements, even when using a very small set of data. Notably, simple ensembling strategies, such as averaging UE scores, can be very effective. + +Based on these findings, we encourage researchers to evaluate the sensitivity of their proposed UE methods to threshold selection and input transformations. There is also potential for developing advanced techniques to apply UE methods to long-form generation. Finally, we believe that further exploration of ensembling strategies may unlock even greater performance improvements. + +# 2 Preliminaries + +# 2.1 Uncertainty Estimation of LLMs + +Although various Uncertainty Estimation (UE) methods for LLMs have been proposed recently, there is no universally accepted definition of UE in the context of LLMs (Vashurin et al., 2025). Some research formalizes LLM uncertainty by decomposing into aleatoric (data) and epistemic (model) uncertainties, leveraging LLM sampling distributions (Aichberger et al., 2024; Abbasi-Yadkori et al., 2024). However, many heuristic-based UE methods in the literature do not conform to these theoretical frameworks. + +Therefore, we adopt a broad, practical definition of UE, following previous works (Jiang et al., 2024; Huang et al., 2024). Formally, an uncertainty estimation method $\mathrm{U}$ is defined as a function $\mathrm{U}: \mathcal{V}^* \times \mathcal{V}^* \to \mathbb{R}$ , where $\mathcal{V}$ represents the vocabulary, and $\mathcal{V}^*$ denotes all possible token sequences. For a given query $x$ and generated response $\hat{y}$ , an effective $\mathrm{U}$ should assign a low uncertainty score (indicating higher confidence) if $\hat{y}$ is reliable in the given context. In tasks such as factual QA or mathematical reasoning, common evaluation benchmarks for UE methods, reliability refers to the correctness of $\hat{y}$ with respect to the set of ground truth(s) $Y$ . Formally, a desirable $\mathrm{U}$ should maximize $\mathbb{E}\left[\mathbb{1}_{\mathrm{U}(x_1,\hat{y}_1) < \mathrm{U}(x_2,\hat{y}_2)} \cdot \mathbb{1}_{\hat{y}_1 \in Y_1 \wedge \hat{y}_2 \notin Y_2}\right]$ where $(x_1,y_1), (x_2,y_2) \sim \mathcal{D}$ , with $\mathcal{D}$ being a dataset, $\hat{y}_1 \sim p(\cdot | x_1)$ , $\hat{y}_2 \sim p(\cdot | x_2)$ representing the model's sampling distributions. + +# 2.2 Evaluation of UE Methods + +As discussed in the previous section, UE methods serve as proxies for predicting the correctness of model-generated responses, producing scores that typically lie within a continuous range. Conse + +sequently, their evaluation is commonly performed by setting the correctness of a generation as binary labels $(0$ or $1)^{*}$ , using UE scores as predictions, and computing threshold-free metrics such as AUROC and AUPRC (Kuhn et al., 2023; Vashurin et al., 2025). In addition to these, the Prediction Rejection Ratio (PRR) (Malinin and Gales, 2021) evaluates UE performance by constructing a rejection-precision curve, which measures the precision of the retained (non-rejected) samples at different rejection thresholds based on uncertainty scores. PRR is computed as the area under this curve and is further normalized by the areas under the curves of the best possible (oracle) and random rejection-precision strategies. This normalization makes PRR resilient to label imbalances in the dataset (Malinin and Gales, 2021). PRR ranges from 0.0 (random performance) to 1.0 (perfect performance). In this study, we primarily use PRR as our evaluation metric due to its robustness against variations in data distribution. + +# 2.3 Investigated UE Methods + +Throughout this paper, we examine 19 UE methods, categorizing each according to its primary conceptual approach. We identify four distinct categories for this classification: + +Probability-Based Methods utilize probabilities of tokens in the generated sequence. Length-Normalized Scoring (LNS) (Malinin and Gales, 2021) is the average of the log-probabilities of the generation, while MARS (Bakman et al., 2024) computes the weighted-average of that regarding the token importance in answering the question. LARS (Yaldiz et al., 2025) trains a small-scale transformer that takes the question, generation tokens, and token probabilities. Entropy (Malinin and Gales, 2021) calculates the average of length-normalized scores over a set of sampled generations for the same question. Semantic Entropy (SE) (Kuhn et al., 2023) clusters the semantically-similar generations while SentSAR and SAR (Duan et al., 2024) considers relevancy scores of the sampled generations during entropy calculation. + +Internal State-Based Methods make use of the internal states of the LLM, which are only applicable to white-box models. INSIDE (Chen et al., 2024) utilize the middle layer activations of the last tokens of multiple generations to the same question. + +Attention Score (Sriramanan et al., 2024) analyses the attention maps of the LLM. SAPLMA (Azaria and Mitchell, 2023) trains a classifier whose input is the activations of the last token of the generation. + +Output Consistency-Based Methods sample multiple generations to the query, then utilize their pair-wise similarity information, hence usable with black-box models. Degree Matrix Uncertainty, Eccentricity Uncertainty, SumEigV (Lin et al., 2024), and Kernel Language Entropy (KLE) (Nikitin et al., 2024) utilize different linear algebra techniques over the pair-wise similarity matrix of the sampled generations. Degree Matrix-C and Eccentricity-C (Lin et al., 2024) output a generation-specific score for each generation by using the similar ideas in Eccentricity Uncertainty and Degree Matrix Uncertainty. Self-Detection (Zhao et al., 2024) paraphrases the question and analyses the similarity of the responses to the paraphrased questions. + +Self-Checking Methods query the LLM itself about the uncertainty of the generation. $P(\text{true})$ (Kadavath et al., 2022) asks if the response is true by providing the question, sampled generations, and the answer. Verbalized Confidence (Tian et al., 2023) prompts the LLM to assign a confidence score to the response between 0 and 1. + +It is important to note that only LARS and SAPLMA are supervised techniques, requiring labeled QA data, whereas all other methods are unsupervised. For brevity, detailed explanations of these methods are provided in Appendix C. + +# 3 Sensitivity of Decision Threshold + +# 3.1 Problem Statement + +UE methods typically produce outputs in a continuous range. However, integrating a UE method into a real-world application requires making discrete decisions, such as whether to accept or reject a generated response. The sensitivity of this binary decision can vary depending on the application. Consequently, such scenarios require selecting an appropriate threshold to achieve the desired performance for decision-making. + +Determining a threshold $t$ for a target application requires a labeled calibration dataset $\mathcal{D}_{cal}$ . Using this dataset and a desired metric $M$ with a target performance level $m^{*}$ , a threshold $t$ is randomly picked from the set $\{t : M(U, \mathcal{D}_{cal}, t) = m^{*}\}$ . + +This threshold is then applied during testing. The key question is whether the desired performance $m^{*}$ is maintained at test time. If not, two main + +factors may contribute: (1) a distribution shift between the calibration and test data, or (2) the UE method itself being sensitive to such scenarios. To investigate this phenomenon, we examine 19 UE methods (listed in Section 2.3) across two tasks and varying levels of calibration-test distribution shifts. + +# 3.2 Experimental Design + +Models We evaluate UE methods on two recent models: Llama-3-8B (AI@Meta, 2024) and GPT-4o-mini (OpenAI, 2023). + +Datasets We use TriviaQA (Joshi et al., 2017) and NaturalQA (Kwiatkowski et al., 2019) as closed-book QA datasets and GSM8K (Cobbe et al., 2021) as mathematical reasoning dataset in the experiments. We use 1000 samples for the test set and 500 samples for the calibration dataset. All experiments are conducted 5 times with different seeds and the average performance is provided. + +Metric Different applications require varying precision-recall trade-offs, so we introduce a metric to assess threshold generalization at test time. For each target recall $r^* \in [0,1]$ , we determine an optimal threshold $t$ using a calibration set. Hallucinations (incorrect generations) are class 1, and correct answers are class 0 which makes recall the proportion of hallucinations correctly identified by the UE method. + +To assess threshold generalization, we measure the deviation $|r^{*} - r|$ , where $r$ is the recall achieved on the test set using threshold $t$ . By averaging these deviations over a set $\mathcal{R}$ of recall values of interest, Average Recall Error (ARE) is defined as: + +$$ +\mathrm {A R E} = \frac {1}{| \mathcal {R} |} \sum_ {r _ {i} \in \mathcal {R}} | r _ {i} ^ {*} - r _ {i} |. +$$ + +In our experiments, we set $\mathcal{R}$ to span the full recall range from 0 to 1.0., with increments of 0.001. + +Distribution Shift Simulation We systematically examine how distribution shifts between calibration and test data impact threshold selection performance through two experimental setups. First, we use TriviaQA as the test data, calibrating with TriviaQA for an in-domain setting, NaturalQA for a same-task distribution shift, and GSM8K for an out-of-domain scenario. Second, we test with GSM8K and calibrate separately with TriviaQA and GSM8K, where GSM8K is in-domain and TriviaQA is out-of-domain. + +# 3.3 Results and Discussion + +The ARE results for TriviaQA are presented in Table 1. The findings indicate that the majority of + +UE methods achieve a low ARE ( $< 0.05$ ) when the threshold is calibrated on a separate subset of TriviaQA, with the exception of Verbalized Confidence and Self-Detection. However, as expected, the error rate increases with greater data distribution shifts, making GSM8K calibration the most erroneous when UE methods are tested on TriviaQA. + +Probability-based and output consistency-based methods generally outperform internal state-based and self-checking methods. However, only MARS, Semantic Entropy, and Eccentricity consistently achieve low error across calibration datasets, while all others exceed 0.10 ARE in at least one setting. + +These results highlight the need to align the calibration data distribution with the test (deployment) environment to ensure reliable binary decision-making using UE methods. Furthermore, we encourage researchers to test their proposed UE methods under distribution shift conditions, particularly for threshold sensitivity. Robustness to such shifts is a highly desirable property, as it reduces reliance on an optimal calibration dataset. Lastly, the ARE results for GSM8K, provided in Appendix D.1, aligns with the findings observed in TriviaQA. + +
Calib. DatasetLlama3-8bGPT-4o-mini
TrivQANQAGSMTrivQANQAGSM
LNS0.0300.0930.1030.0550.0350.049
MARS0.0350.0250.0770.0500.0460.040
Entropy0.0320.1030.1010.0720.0480.066
SE0.0350.0650.0730.0600.0290.045
SentSAR0.0410.1050.1230.0740.0410.093
SAR0.0280.0590.1070.0680.0230.077
LARS0.0350.1170.1300.0480.1250.289
DegMat0.0410.0330.1690.0510.0510.142
DegMat-C0.0380.0300.1410.0580.0490.126
SumEigV0.0420.0350.1910.0510.0530.165
KLE0.0470.0620.1730.0760.0560.115
Eccent0.0400.0370.0690.0570.0490.050
Eccent-C0.0400.0390.0980.0630.0480.051
Self-D.0.0820.0860.1130.1100.1270.096
P(True)0.0350.0870.2550.1230.1630.200
Verb. C.0.1720.1820.2800.0840.1310.142
Atten. S.0.0270.0270.261---
INSIDE0.0400.0960.295---
SAPLMA0.0460.0290.142---
+ +Table 1: ARE of UE methods when the threshold is calibrated on various datasets and tested on TriviaQA. + +# 4 Robustness to Input Transformations + +# 4.1 Problem Statement + +Previous UE works primarily evaluate their methods in isolated environments, where a question is presented to the model using a simple benign prompt, and the model's response is directly sampled. However, in real-world applications, inputs can arrive in various forms. We expect a robust UE method's performance should not be affected much under these various input forms. + +![](images/6441ed2d327adb47a21fd71df4a8c3eb92740d0d4bd108b31b4741e2d6839e06.jpg) + +![](images/4af0c43efea101210721cf49b787b8ffee9fcda390f20dce7eee47ceefeff942.jpg) +Figure 2: PRR performance of UE methods with Llama-3 8b, evaluated under a regular prompt (no transformation) and various input transformations, including adding context, typos, and adversarial prompts. + +More formally, we apply a transformation function $\mathcal{T}$ to a query $x$ such that $\mathcal{T}(x)$ preserves the same ground truth set $Y$ as the original query. This ensures that the transformation does not alter the fundamental meaning of the query. Let $\mathcal{D}^* := \{(\mathcal{T}(x), Y) \mid (x, Y) \in \mathcal{D}\}$ represent the transformed version of the original dataset $\mathcal{D}$ . A robust UE method U should exhibit similar performance on both $\mathcal{D}$ and $\mathcal{D}^*$ . However, since input transformations can influence the model's internal computations, on which UE methods ultimately rely, a non-robust U may experience performance degradation under different transformations. + +We investigate the robustness of UE methods across three specific transformations: (1) Contextual: This transformation appends previous chat history (context) to the input. This scenario commonly occurs in chatbot applications, where users may ask multiple questions within the same session. To evaluate this case, we prepend previous chat $x_{\mathrm{prev}}$ to the original query $x$ in the dataset: $\mathcal{T}_{\mathrm{context}}(x) = x_{\mathrm{prev}} + x$ , where $+$ denotes the concatenation operation. (2) Typo: In real-world applications, input queries often contain noise, with typos being a common form of such noise. To evaluate how UE methods handle noisy inputs, we introduce synthetic typos into the query, defining the transformation as: $\mathcal{T}_{\mathrm{typo}}(x) = x_{\mathrm{typo}}$ . (3) Adversarial: We design an adversarial prompt that + +aims to confuse UE methods, causing their performance to degrade on $\mathcal{D}^*$ . This can be viewed as an adversarial prompt injection attack, targeting UE methods specifically. Formally, the transformation is expressed as: $\mathcal{T}_{\mathrm{adv}}(x) = p_{\mathrm{adv}} + x$ , where $p_{\mathrm{adv}}$ is the adversarial prompt. + +# 4.2 Experimental Design + +We use Llama-3-8B and GPT-4o-mini as the base models and evaluate them on 1,000 samples from the test sets of TriviaQA and GSM8K, as described in Section 3. We measure all methods' performance by PRR as described in Section 2.2. All experiments are conducted 5 times, and we plot both the mean and standard deviation of the results. + +Context Experiments To simulate chat history, we prepend three prior question-sampled response pairs to each query in two scenarios: 1. Similar-context: The prior questions are of the same type as the question (e.g., TriviaQA). 2. Dissimilar-context: The prior questions are from a different domain (e.g., GSM8K math before a TriviaQA question). + +Typo Experiments To simulate typos, we randomly replace, swap, erase, or insert a single character with uniform probability. We also test two-character perturbations to evaluate the effects of increased noise. + +![](images/17c9a95b3015492dd3aa02f3f4e1e8f70b866ea8effd3bc3635fd639109f0e06.jpg) + +![](images/c14d05f577d9654f29dbde6c3c889f08d46352690c01d645991a0c6468d42e12.jpg) +Figure 3: PRR performance of UE methods on the GSM8K and TriviaQA datasets with GPT-4o-mini. + +Adversarial Experiments Designing an adversarial prompt is non-trivial. We insert a confidence booster phrase (Sakib et al., 2025), hypothesizing it may induce overconfidence in model responses, impacting log probabilities, outputs, and internal states and potentially misleading UE methods. For Llama-3-8B experiments, we use the following prompt: + +"Be confident in your responses. Avoid hesitation or uncertainty. Provide clear and direct answers with conviction." + +For GPT-4o-mini, we generate a similar prompt using an automated search inspired by Zhou et al. (2023). The specific prompt used with the details of the search process, is provided in Appendix E.1. + +# 4.3 Results and Discussion + +The results, Figure 2 and 3, suggest that previous chat history has little to no negative effect on the performance of most UE methods, except for Attention Score, compared to standard prompting without context. In some cases, such as GSM8K with GPT-4o-mini, including similar chat history appears to induce an in context learning-like effect, boosting the performance of probability-based UE methods. + +The typo experiments indicate that most UE methods are highly resilient to this input noise. This robustness persists even when the number of + +typos in a single query is increased to two, as shown in Appendix D.2. + +Finally, results indicate that the confidence booster prompt injection acts as an adversarial prompt, reducing performance across various datasets, particularly affecting probability-based methods in GPT-4o-mini. However, output-consistency-based methods show more resilience to this adversarial prompt than other approaches. The instability of UE methods to prompt transformations is also observed in previous works (Mahaut et al., 2024). Although some performance variations are expected, a robust UE method should not suffer significant degradation due to prompt changes. Therefore, we recommend that future UE methods undergo systematic prompt variation testing to assess their robustness. + +# 5 Applicability to Long-Form Generations + +# 5.1 Problem Statement + +Most UE methods are evaluated on short-form, open-ended QA. For instance, questions such as "Who is the author of the novel 1984?" can be answered with a single sentence, and a single score suffices for an uncertainty assessment. However, in some real-world applications, questions like "Who is George Orwell?" often require long-form responses. These responses may contain multiple + +![](images/93107036f4db4ab1aa550aeac35f0d54bd0fe55f6768cdbe8b350145a81401fc.jpg) + +![](images/5e0bc85658e6e2087d70564dd8e72e0ba72b1404a325034a6e6d1fc3d045d7d1.jpg) +Figure 4: PRR scores for UE methods applied to long-form generation. 'QG-5' and 'QAG-5' indicate that five questions per claim are generated and then aggregated (averaged) to assess each claim's uncertainty. + +claims, some of which are correct while others may be hallucinated. Consequently, assigning a single uncertainty score to the entire response is both impractical and undesirable, as it fails to capture the correctness of individual claims within the text. + +To address this issue, long-form outputs are typically decomposed into sentences, each conveying a distinct claim (Farquhar et al., 2024; Wei et al., 2024b; Fadeeva et al., 2024; Zhang et al., 2024; Manakul et al., 2023; Min et al., 2023). Formally, the decomposition function can be defined as $\mathrm{D}:\mathcal{V}^{*}\to 2^{\mathcal{V}^{*}}$ , taking a long generation $\hat{y}$ and returning a set of claims $\mathbf{C} = \{c_i\}_{i = 1}^C$ . After decomposition, each claim $c_{i}$ is evaluated individually. Recently, several UE methods have been developed specifically for this claim-level uncertainty problem in long-form generations (Fadeeva et al., 2024; Farquhar et al., 2024; Zhang et al., 2024; Jiang et al., 2024), however, most existing UE methods are not directly applicable for assessing uncertainty at the claim level in long form generations(Vashurin et al., 2025). Consequently, effectively applying these methods to segmented claims continues to pose challenges. + +In this section, we propose a set of strategies designed to adapt existing UE methods to assess claim-level uncertainty. A strategy function takes the original query $x$ , a specific claim $c_{i}$ , and a UE function $U$ , and returns an uncertainty score for + +the claim $c_{i}$ . Formally, a strategy function can be defined as $\mathrm{S}:\mathcal{V}^{*}\times \mathcal{V}^{*}\times \mathrm{U}\to \mathbb{R}$ + +# 5.2 Experimental Design + +Decomposing the Long Generation Following previous research, we employ an LLM to decompose long text into claims (Farquhar et al., 2024; Fadeeva et al., 2024; Min et al., 2023). This decomposition can be applied at different levels of granularity. For instance, Wei et al. (2024b) segments the generation into paragraphs, whereas Fadeeva et al. (2024); Min et al. (2023) breaks down text into sentences prior to decomposition. We, similar to Farquhar et al. (2024), apply decomposition to the entire generation. However, we introduce an additional decomposition step for each claim produced in the initial phase, as the model often generates sentences that contain more than one claim during the first decomposition step. + +Proposed Strategies to Apply UE to Claims An uncertainty estimation method U requires two inputs: the query and the response. To effectively employ a UE method within a strategy function S, we need to define what constitutes the query and response. We introduce three strategies to enable the application of existing UE methods for claim-level uncertainty estimation: + +1. Naive Application: The primary input $x$ serves as the query, and the claim $c_{i}$ is used as the response + +for the UE method: $\mathrm{S}(x,c_i,\mathrm{U}) = \mathrm{U}(x,c_i)$ + +2. Question Generation (QG): For the given claim $c_{i}$ , a specific question for that claim $x'$ is generated, where the claim itself acts as the answer. Then, the generated question $x'$ and the claim $c_{i}$ are inputted to the UE method: $\mathrm{S}(x, c_{i}, \mathrm{U}) = \mathrm{U}(x', c_{i})$ . +3. Question Answer Generation (QAG): A question $x'$ is generated for the claim such that the claim serves as the answer. However, instead of using the claim directly, a new response $y'$ is generated by the model in response to $x'$ to make the claim come from the actual sampling distribution of the model to potentially estimate the uncertainty better. The UE method $\mathrm{U}(x', y')$ is called if $y'$ semantically equivalent with $c_i$ . If not, a high uncertainty score is assigned to the claim: + +$$ +\mathrm {S} (x, c _ {i}, \mathrm {U}) = \left\{ \begin{array}{l l} \mathrm {U} (x ^ {\prime}, y ^ {\prime}) & \text {i f c _ {i} a l i g n s w i t h y ^ {\prime}}, \\ \infty & \text {o t h e r w i s e}. \end{array} \right. +$$ + +To further improve the last two strategies, multiple questions can be generated for each claim. For each question, the processes outlined in the strategies are applied, resulting in a series of UE scores for the same claim. To combine these scores into a single assessment, we can aggregate them by taking the minimum, maximum, or average. + +Models, Datasets, and Metrics We employ GPT-4o-mini and Llama3-8B as our base models, using GPT-4o-mini consistently for text decomposition across all models. For question and answer generation, the same base model generating the main response is utilized. We use two long-form QA datasets: FactScore-Bio (Min et al., 2023), containing biography questions from Wikipedia, and LongFact-Objects (Wei et al., 2024b), covering 38 diverse topics. Experiments are conducted on a random sample of 50 questions from each dataset. For evaluation, we collect the UE scores from all claims as predictions and follow the SAFE (Wei et al., 2024b) algorithm to set ground truths, then calculate the PRR score. More details on this section are provided in Appendix E.3. + +# 5.3 Results and Discussion + +Our evaluation in LLama-3-8b (Figure 4) and GPT4o-mini (Figure 7 in Appendix D.3) shows that UE methods not designed for long-form generation can be adapted using decomposition and strategies from Section 5.2. Results suggest that QAG outperforms other strategies, while Naive Application is the least effective. Besides, generating claim-specific questions (QG, QAG) improves un + +certainty estimation over relying on the original query (Naive), and using model-generated answers (QAG) generally is more effective than assessing claims directly (QG). + +For both QG and QAG, generating multiple questions consistently enhances UE performance, with only a few exceptions. This may indicate that multiple inquiries can capture uncertainty more effectively, especially when there are various ways to form a question for a specific claim. Among the aggregation methods we evaluated (minimum, maximum, and average), averaging is consistently the most effective, as shown in Appendix D.3. + +When comparing different question domains, higher PRR scores are observed in FactScore-Bio compared to LongFact-Objects dataset which has broader subjects such as chemistry, gaming, and geography. Notably, we observe a non-negligible performance drop of UE methods in PRR in long-form generation compared to short-form QA such as TriviaQA. This highlights there is still significant room for improvement in applying these methods to long-form generation. + +# 6 Reconcilability of Diverse UE Scores + +# 6.1 Problem Statement + +UE methods use diverse algorithms to estimate uncertainty which leads to different outputs for the same input $(x, \hat{y})$ . We leverage this diversity by ensembling multiple UE methods during inference to improve performance. Formally, given $K$ UE methods $(\mathrm{U}_1, \mathrm{U}_2, \ldots, \mathrm{U}_K)$ , their outputs for $(x, \hat{y})$ form the score vector $\mathbf{s} = (s_1, s_2, \ldots, s_K)$ . We aggregate these scores using an ensemble function $\mathcal{E}: \mathbb{R}^K \to \mathbb{R}$ . Since UE methods output in different numerical ranges, we assume access to a small supervised calibration dataset $\mathcal{D}_{\mathrm{cal}}$ of 100 samples for normalization. + +# 6.2 Experimental Design + +We conduct experiments using LlaMA-3-8B and GPT-4o-mini, evaluating the PRR performance of both individual UE methods and ensembling strategies on TriviaQA and GSM8K. Given that we investigate $K = 19$ UE methods, the number of possible ensemble combinations is $2^{K} - K - 1$ , which is computationally infeasible. Therefore, instead of exhaustively evaluating all possible ensembles, we focus on ensembling all methods together and compare its performance against the most effective individual UE method. + +Ensembling Strategies We ensemble in two stages: preprocessing raw scores $s$ and combining them with $\mathcal{E}$ . For preprocessing, we use three strategies: (1) No processing, using raw scores. (2) Standard normalization, where $s_i' = \frac{s_i - \mu_i}{\sigma_i}$ , with mean $\mu_i$ and standard deviation $\sigma_i$ computed from the calibration set $\mathcal{D}_{cal}$ . (3) Isotonic Regression calibration (Han et al., 2017), which maps scores to probabilities in the range [0,1] which approximates correctness likelihood. Unlike normalization, which only requires inputs $x$ , calibration also requires ground truth $y$ in $\mathcal{D}_{cal}$ . + +For ensembling, we investigate 7 different strategies. The first two are simple aggregation methods: taking the minimum and maximum of $\mathbf{s}$ . We also consider averaging methods, including a simple mean $\frac{1}{K}\sum_{i=1}^{K}s_i$ and a weighted average $\sum_{i=1}^{K}w_{i}s_{i}$ . Here $w_{i}$ represents the PRR performance of uncertainty estimator $\mathrm{U}_i$ on $\mathcal{D}_{cal}$ . Another approach is a voting-based method, where we count the number of scores exceeding a threshold $t$ : $\sum_{i=1}^{K}\mathbb{1}_{s_i > t}$ . Finally, we explore supervised ensembling approaches by treating the vector $\mathbf{s}$ as a feature vector and training models such as a linear model and a decision tree using the calibration dataset $\mathcal{D}_{cal}$ . + +
TriviaQAGSM8K
LlamaGPTLlamaGPT
Best single0.780.770.720.69
RawMax0.090.66-0.020.49
Min0.560.640.280.35
Mean0.660.760.440.55
W-mean0.660.760.480.56
Linear0.820.720.730.68
NormalizedMax0.760.830.540.64
Min0.450.700.410.63
Mean0.780.830.620.67
W-mean0.790.830.660.69
Linear0.800.770.730.71
CalibratedMax0.770.790.650.64
Min0.630.590.560.63
Mean0.790.800.680.62
W-mean0.750.800.710.65
Linear0.820.770.750.72
Voting0.770.740.660.64
D.Tree0.460.470.440.43
+ +Table 2: PRR scores of different ensembling strategies over 19 UE methods. + +# 6.3 Results and Discussion + +The results of the ensembling experiments are presented in Table 2. Our findings suggest that even with 100 samples $D_{cal}$ , ensembling strategies can achieve gains of up to 0.06 average PRR score compared to the most performant individual UE method. + +As expected, directly combining raw UE scores without normalization or calibration is ineffective due to the varying scales of different UE methods. However, applying normalization and calibration significantly improves assembling performance, even with simple strategies such as averaging all UE scores. For supervised approaches, linear models with normalized or calibrated inputs consistently outperform the best individual UE method. In contrast, decision tree generally fails to provide competitive assembling performance. Also, we repeat the experiments using only unsupervised UE methods (see Appendix D.4), which further improves performance over the best unsupervised method. We argue that developing orthogonal UE methods to existing UE methods may be promising, as their combination with existing techniques may yield superior performance. Additionally, exploring novel assembling strategies specifically for UE methods could further improve results. + +# 7 Conclusion + +We conducted a comprehensive evaluation of 19 UE methods across four key challenges in real-world deployment. Our findings reveal that most UE methods are highly sensitive to decision threshold selection and, while resilient to typos and context, remain vulnerable to adversarial prompts. Additionally, existing UE methods can be adapted for long-form generation, though their effectiveness remains limited. Finally, ensembling multiple UE methods significantly enhances performance, even with simple strategies. Future research should focus on improving UE robustness to threshold selection and prompt variations, developing more effective strategies for long-form generation, and exploring advanced ensembling techniques to maximize the performance. + +# 8 Acknowledgments + +This work is supported in part by OpenAI Research funding and we thank to Robin Jia and Jieyu Zhao for their feedback to initial steps of the project. + +# 9 Limitations + +While this study highlights key vulnerabilities and future opportunities for UE methods, our experiments are limited to two models because of the computational limitations: LLaMA-3-8B and GPT4o-mini. Future work should verify these findings on other state-of-the-art models to assess broader + +applicability. Additionally, the experimental framework introduced in this paper can be extended to evaluate other UE methods beyond the 19 investigated in this study. + +# References + +Yasin Abbasi-Yadkori, Ilja Kuzborskij, András György, and Csaba Szepesvari. 2024. To believe or not to believe your LLM: Iterativeprompting for estimating epistemic uncertainty. In *The Thirty-eighth Annual Conference on Neural Information Processing Systems*. +Kian Ahrabian, Xihui Lin, Barun Patra, Vishrav Chaudhary, Alon Benhaim, Jay Pujara, and Xia Song. 2025. A practical analysis of human alignment with *PO. In Findings of the Association for Computational Linguistics: NAACL 2025, pages 8013-8021, Albuquerque, New Mexico. Association for Computational Linguistics. +Lukas Aichberger, Kajetan Schweighofer, and Sepp Hochreiter. 2024. Rethinking uncertainty estimation in natural language generation. Preprint, arXiv:2412.15176. +AI@Meta. 2024. Llama 3 model card. +Amos Azaria and Tom Mitchell. 2023. The internal state of an LLM knows when it's lying. In *Findings of the Association for Computational Linguistics: EMNLP* 2023, pages 967–976, Singapore. Association for Computational Linguistics. +Yavuz Faruk Bakman, Duygu Nur Yaldiz, Baturalp Buyukates, Chenyang Tao, Dimitrios Dimitriadis, and Salman Avestimehr. 2024. MARS: Meaning-aware response scoring for uncertainty estimation in generative LLMs. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 7752-7767, Bangkok, Thailand. Association for Computational Linguistics. +Yoshua Bengio, Soren Mindermann, Daniel Privitera, Tamay Besiroglu, Rishi Bommasani, Stephen Casper, Yejin Choi, Philip Fox, Ben Garfinkel, Danielle Goldfarb, Hoda Heidari, Anson Ho, Sayash Kapoor, Leila Khalatbari, Shayne Longpre, Sam Manning, Vasilios Mavroudis, Mantas Mazeika, Julian Michael, Jessica Newman, Kwan Yee Ng, Chinasasa T. Okolo, Deborah Raji, Girish Sastry, Elizabeth Seger, Theodora Skeadas, Tobin South, Emma Strubell, Florian Tramer, Lucia Velasco, Nicole Wheeler, Daron Acemoglu, Olubayo Adekanmbi, David Dalrymple, Thomas G. Dietterich, Edward W. Felten, Pascale Fung, Pierre-Olivier Gourinchas, Fredrik Heintz, Geoffrey Hinton, Nick Jennings, Andreas Krause, Susan Leavy, Percy Liang, Teresa Ludermir, Vidushi Marda, Helen Margetts, John McDermid, Jane Munga, Arvind Narayanan, Alondra Nelson, Clara Neppel, Alice Oh, Gopal Ramchurn, Stuart Russell, Marietje Schaake, Bernhard + +Scholkopf, Dawn Song, Alvaro Soto, Lee Tiedrich, Gael Varoquaux, Andrew Yao, Ya-Qin Zhang, Fahad Albalawi, Marwan Alserkal, Olubunmi Ajala, Guillaume Avrin, Christian Busch, André Carlos Ponce de Leon Ferreira de Carvalho, Bronwyn Fox, Amandep Singh Gill, Ahmet Halit Hatip, Juha Heikkila, Gill Jolly, Ziv Katzir, Hiroaki Kitano, Antonio Krüger, Chris Johnson, Saif M. Khan, Kyoung Mu Lee, Dominic Vincent Ligot, Oleksii Molchanovskyi, Andrea Monti, Nusu Mwamanzi, Mona Nemer, Nuria Oliver, José Ramón López Portillo, Balaraman Ravindran, Raquel Pezoa Rivera, Hammam Riza, Crystal Rugege, Ciarán Seoighe, Jerry Sheehan, Haroon Sheikh, Denise Wong, and Yi Zeng. 2025. International ai safety report. Preprint, arXiv:2501.17805. +Chao Chen, Kai Liu, Ze Chen, Yi Gu, Yue Wu, Mingyuan Tao, Zhihang Fu, and Jieping Ye. 2024. INSIDE: LLMs' internal states retain the power of hallucination detection. In The Twelfth International Conference on Learning Representations. +I Chern, Steffi Chern, Shiqi Chen, Weizhe Yuan, Kehua Feng, Chunting Zhou, Junxian He, Graham Neubig, Pengfei Liu, et al. 2023. Factool: Factuality detection in generative ai-a tool augmented framework for multi-task and multi-domain scenarios. arXiv preprint arXiv:2307.13528. +Karl Cobbe, Vineet Kosaraju, Mohammad Bavarian, Mark Chen, Heewoo Jun, Lukasz Kaiser, Matthias Plappert, Jerry Tworek, Jacob Hilton, Reiichiro Nakano, Christopher Hesse, and John Schulman. 2021. Training verifiers to solve math word problems. arXiv preprint arXiv:2110.14168. +Jinhao Duan, Hao Cheng, Shiqi Wang, Alex Zavalny, Chenan Wang, Renjing Xu, Bhavya Kailkhura, and Kaidi Xu. 2024. Shifting attention to relevance: Towards the predictive uncertainty quantification of free-form large language models. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 5050-5063, Bangkok, Thailand. Association for Computational Linguistics. +Ekaterina Fadeeva, Aleksandr Rubashevskii, Artem Shelmanov, Sergey Petrakov, Haonan Li, Hamdy Mubarak, Evgenii Tsymbalov, Gleb Kuzmin, Alexander Panchenko, Timothy Baldwin, Preslav Nakov, and Maxim Panov. 2024. Fact-checking the output of large language models via token-level uncertainty quantification. In Findings of the Association for Computational Linguistics: ACL 2024, pages 9367-9385, Bangkok, Thailand. Association for Computational Linguistics. +Sebastian Farquhar, Jannik Kossen, Lorenz Kuhn, and Yarin Gal. 2024. Detecting hallucinations in large language models using semantic entropy. Nature, 630(8017):625-630. +Shangbin Feng, Weijia Shi, Yike Wang, Wenxuan Ding, Vidhisha Balachandran, and Yulia Tsvetkov. 2024. + +Don't hallucinate, abstain: Identifying LLM knowledge gaps via multi-LLM collaboration. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 14664–14690, Bangkok, Thailand. Association for Computational Linguistics. +Qiyang Han, Tengyao Wang, Sabyasachi Chatterjee, and Richard J. Samworth. 2017. Isotonic regression in general dimensions. The Annals of Statistics. +Xinmeng Huang, Shuo Li, Mengxin Yu, Matteo Sesia, Hamed Hassani, Insup Lee, Osbert Bastani, and Edgar Dobriban. 2024. Uncertainty in language models: Assessment through rank-calibration. Preprint, arXiv:2404.03163. +Mingjian Jiang, Yangjun Ruan, Prasanna Sattigeri, Salim Roukos, and Tatsunori Hashimoto. 2024. Graph-based uncertainty metrics for long-form language model generations. In The Thirty-eighth Annual Conference on Neural Information Processing Systems. +Mandar Joshi, Eunsol Choi, Daniel Weld, and Luke Zettlemoyer. 2017. TriviaQA: A large scale distantly supervised challenge dataset for reading comprehension. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1601-1611, Vancouver, Canada. Association for Computational Linguistics. +Saurav Kadavath, Tom Conerly, Amanda Askell, Tom Henighan, Dawn Drain, Ethan Perez, Nicholas Schiefer, Zac Hatfield-Dodds, Nova DasSarma, Eli Tran-Johnson, Scott Johnston, Sheer El-Showk, Andy Jones, Nelson Elhage, Tristan Hume, Anna Chen, Yuntao Bai, Sam Bowman, Stanislav Fort, Deep Ganguli, Danny Hernandez, Josh Jacobson, Jackson Kernion, Shauna Kravec, Liane Lovitt, Kamal Ndousse, Catherine Olsson, Sam Ringer, Dario Amodei, Tom Brown, Jack Clark, Nicholas Joseph, Ben Mann, Sam McCandlish, Chris Olah, and Jared Kaplan. 2022. Language models (mostly) know what they know. Preprint, arXiv:2207.05221. +Lorenz Kuhn, Yarin Gal, and Sebastian Farquhar. 2023. Semantic uncertainty: Linguistic invariances for uncertainty estimation in natural language generation. In The Eleventh International Conference on Learning Representations. +Tom Kwiatkowski, Jennimaria Palomaki, Olivia Redfield, Michael Collins, Ankur Parikh, Chris Alberti, Danielle Epstein, Illia Polosukhin, Jacob Devlin, Kenton Lee, Kristina Toutanova, Llion Jones, Matthew Kelcey, Ming-Wei Chang, Andrew M. Dai, Jakob Uszkoreit, Quoc Le, and Slav Petrov. 2019. Natural questions: A benchmark for question answering research. Transactions of the Association for Computational Linguistics, 7:452-466. +Moxin Li, Wenjie Wang, Fuli Feng, Fengbin Zhu, Qifan Wang, and Tat-Seng Chua. 2024. Think twice before trusting: Self-detection for large language models + +through comprehensive answer reflection. Preprint, arXiv:2403.09972. +Zhen Lin, Shubhendu Trivedi, and Jimeng Sun. 2024. Generating with confidence: Uncertainty quantification for black-box large language models. Transactions on Machine Learning Research. +Mateo Mahaut, Laura Aina, Paula Czarnowska, Mom-chil Hardalov, Thomas Müller, and Lluis Marquez. 2024. Factual confidence of LLMs: on reliability and robustness of current estimators. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 4554-4570, Bangkok, Thailand. Association for Computational Linguistics. +Andrey Malinin and Mark Gales. 2021. Uncertainty estimation in autoregressive structured prediction. In International Conference on Learning Representations. +Potsawee Manakul, Adrian Liusie, and Mark Gales. 2023. SelfCheckGPT: Zero-resource black-box hallucination detection for generative large language models. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 9004-9017, Singapore. Association for Computational Linguistics. +Sewon Min, Kalpesh Krishna, Xinxi Lyu, Mike Lewis, Wen-tau Yih, Pang Koh, Mohit Iyyer, Luke Zettle-moyer, and Hannaneh Hajishirzi. 2023. FActScore: Fine-grained atomic evaluation of factual precision in long form text generation. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 12076-12100, Singapore. Association for Computational Linguistics. +Viktor Moskvoretskii, Maria Lysyuk, Mikhail Salnikov, Nikolay Ivanov, Sergey Pletenev, Daria Galimzianova, Nikita Krayko, Vasily Konovalov, Irina Nikishina, and Alexander Panchenko. 2025. Adaptive retrieval without self-knowledge? bringing uncertainty back home. Preprint, arXiv:2501.12835. +Alexander V Nikitin, Jannik Kossen, Yarin Gal, and Pekka Marttinen. 2024. Kernel language entropy: Fine-grained uncertainty quantification for LLMs from semantic similarities. In *The Thirty-eighth Annual Conference on Neural Information Processing Systems*. +OpenAI. 2023. GPT-4 Technical Report. Preprint, arXiv:2303.08774. +Selvan Sunitha Ravi, Bartosz Mielczarek, Anand Kannappan, Douwe Kiela, and Rebecca Qian. 2024. Lynx: An open source hallucination evaluation model. Preprint, arXiv:2407.08488. +Sadra Sabouri, Philipp Eibl, Xinyi Zhou, Morteza Ziyadi, Nenad Medvidovic, Lars Lindemann, and Souti Chattopadhyay. 2025. Trust dynamics in ai-assisted development: Definitions, factors, and implications. + +Shahnewaz Karim Sakib, Anindya Bijoy Das, and Shibir Ahmed. 2025. Battling misinformation: An empirical study on adversarial factuality in open-source large language models. In Proceedings of the 5th Workshop on Trustworthy NLP (TrustNLP 2025), pages 432-443, Albuquerque, New Mexico. Association for Computational Linguistics. +Gaurang Sriramanan, Siddhant Bharti, Vinu Sankar Sadasivan, Shoumik Saha, Priyatham Kattakinda, and Soheil Feizi. 2024. LLM-check: Investigating detection of hallucinations in large language models. In The Thirty-eighth Annual Conference on Neural Information Processing Systems. +Ala N. Tak, Amin Banayeeanzade, Anahita Bolourani, Mina Kian, Robin Jia, and Jonathan Gratch. 2025. Mechanistic interpretability of emotion inference in large language models. Preprint, arXiv:2502.05489. +Katherine Tian, Eric Mitchell, Allan Zhou, Archit Sharma, Rafael Rafailov, Huaxiu Yao, Chelsea Finn, and Christopher Manning. 2023. Just ask for calibration: Strategies for eliciting calibrated confidence scores from language models fine-tuned with human feedback. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 5433-5442, Singapore. Association for Computational Linguistics. +Roman Vashurin, Ekaterina Fadeeva, Artem Vazhentsev, Lyudmila Rvanova, Akim Tsvigun, Daniil Vasilev, Rui Xing, Abdelrahman Boda Sadallah, Kirill Grishchenkov, Sergey Petrakov, Alexander Panchenko, Timothy Baldwin, Preslav Nakov, Maxim Panov, and Artem Shelmanov. 2025. Benchmarking uncertainty quantification methods for large language models with lm-polygraph. Preprint, arXiv:2406.15627. +Artem Vazhentsev, Gleb Kuzmin, Akim Tsvigun, Alexander Panchenko, Maxim Panov, Mikhail Burtsev, and Artem Shelmanov. 2023. Hybrid uncertainty quantification for selective text classification in ambiguous tasks. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 11659-11681, Toronto, Canada. Association for Computational Linguistics. +Yuxia Wang, Revanth Gangi Reddy, Zain Muhammad Mujahid, Arnav Arora, Aleksandr Rubashevskii, Jiahui Geng, Osama Mohammed Afzal, Liangming Pan, Nadav Borenstein, Aditya Pillai, Isabelle Augenstein, Iryna Gurevych, and Preslav Nakov. 2024. Factcheck-bench: Fine-grained evaluation benchmark for automatic fact-checkers. Preprint, arXiv:2311.09000. +Jason Wei, Nguyen Karina, Hyung Won Chung, Yunxin Joy Jiao, Spencer Papay, Amelia Glaese, John Schulman, and William Fedus. 2024a. Measuring short-form factuality in large language models. Preprint, arXiv:2411.04368. +Jerry Wei, Chengrun Yang, Xinying Song, Yifeng Lu, Nathan Zixia Hu, Jie Huang, Dustin Tran, Daiyi Peng, + +Ruibo Liu, Da Huang, Cosmo Du, and Quoc V Le. 2024b. Long-form factuality in large language models. In The Thirty-eighth Annual Conference on Neural Information Processing Systems. +Duygu Nur Yaldiz, Yavuz Faruk Bakman, Baturalp Buyukates, Chenyang Tao, Anil Ramakrishna, Dimitrios Dimitriadis, Jieyu Zhao, and Salman Avestimehr. 2025. Do not design, learn: A trainable scoring function for uncertainty estimation in generative LLMs. In Findings of the Association for Computational Linguistics: NAACL 2025, pages 691-713, Albuquerque, New Mexico. Association for Computational Linguistics. +Caiqi Zhang, Fangyu Liu, Marco Basaldella, and Nigel Collier. 2024. LUQ: Long-text uncertainty quantification for LLMs. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, pages 5244-5262, Miami, Florida, USA. Association for Computational Linguistics. +Yukun Zhao, Lingyong Yan, Weiwei Sun, Guoliang Xing, Chong Meng, Shuaiqiang Wang, Zhicong Cheng, Zhaochun Ren, and Dawei Yin. 2024. Knowing what LLMs DO NOT know: A simple yet effective self-detection method. In Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), pages 7051-7063, Mexico City, Mexico. Association for Computational Linguistics. +Yongchao Zhou, Andrei Loan Muresanu, Ziwen Han, Keiran Paster, Silviu Pitis, Harris Chan, and Jimmy Ba. 2023. Large language models are human-level prompt engineers. In *The Eleventh International Conference on Learning Representations*. + +# A Related Works + +To the best of our knowledge, no prior work has explicitly investigated UE methods for generative LLMs in real-world, wild settings. The most similar work is Vashurin et al. (2025), which benchmarks various UE methods across multiple datasets. However, their evaluation setup follows the conventional framework used in prior studies (Lin et al., 2024; Kuhn et al., 2023) and does not investigate, reliability of threshold selection, input transformations, and ensembling. Although Vashurin et al. (2025) evaluate some UE methods on long-form generations, they only consider methods inherently designed for the long-form setting. In contrast, we introduce novel strategies to adapt UE methods that were originally designed for short-form settings to long-form generation. Another relevant study is Mahaut et al. (2024), which assesses the reliability of uncertainty estimation methods under specific input transformations, namely paraphrasing and translation into different languages. Their findings reveal performance inconsistencies similar to those observed in our input transformation experiments in Section 4. Lastly, Vazhentsev et al. (2023); Moskvoretskii et al. (2025) ensemble various UE scores for a better UE and RAG performance respectively. + +# B Further Discussions on the Definition of Uncertainty Estimation of LLMs + +In addition to the definition of UE methods in LLM at Section 2.1, an uncertainty method should rely on the model itself, utilizing elements such as the model's internals, log probabilities, or outputs. A hallucination detection method that relies on external sources, such as the Internet or external documents, does not fall within the category of uncertainty estimation (Chern et al., 2023). + +Furthermore, previous definitions often overlook the fact that $\hat{y}$ is not just any possible token sequence but rather the model's sampled generation. In the evaluation of UE methods, they generate $\hat{y}$ and estimate uncertainty $\mathrm{U}(x,\hat{y})$ (Lin et al., 2024; Kuhn et al., 2023). + +Lastly, some methods, such as Semantic Entropy (Kuhn et al., 2023), produce an uncertainty score for a given query $x$ without being specific to any particular sampled generation. These methods assign a query-level uncertainty score, which can still serve as a proxy for the uncertainty of the model's sampled generations. While some previ + +ous works (Lin et al., 2024) distinguish between methods that assign scores to individual sampled generations and those that provide query-level uncertainty scores, the latter still fits within the broad definition of UE we adopt, where $\mathrm{U}(x,\hat{y}_1) = \mathrm{U}(x,\hat{y}_2)\forall \hat{y}_1,\hat{y}_2$ . Therefore, we follow prior works (Duan et al., 2024; Vashurin et al., 2025; Yaldiz et al., 2025) and do not make this distinction in our experiments. + +# C Investigated Uncertainty Estimation Methods + +In this section, we explain the investigated UE methods with our implementation details. + +# C.1 Probability-Based Methods + +Probability-based methods assign uncertainty by analyzing the token probabilities in the model's generation. + +Length Normalized Scoring (LNS) (Malinin and Gales, 2021) computes the average log-probability of each token in the generated sequence: + +$$ +\log \tilde {P} (\mathbf {s} | \mathbf {x}, \theta) = \frac {1}{L} \sum_ {l = 1} ^ {L} \log P (s _ {l} | s _ {< l}, \mathbf {x}; \theta), \quad (1) +$$ + +where $P(\mathbf{s}|\mathbf{x},\theta)$ represents the probability of the generated sequence $\mathbf{s}$ (of length $L$ ), and $s_{