Auto-GDA: Automatic Domain Adaptation for Efficient Grounding Verification in Retrieval Augmented Generation

## Abstract

Abstract While retrieval augmented generation (RAG) has been shown to enhance factuality of large language model (LLM) outputs, LLMs still suffer from hallucination, generating incorrect or irrelevant information. One common detection strategy involves prompting the LLM again to assess whether its response is grounded in the retrieved evidence, but this approach is costly. Alternatively, lightweight natural language inference (NLI) models for efficient grounding verification can be used at inference time. While existing pre-trained NLI models offer potential solutions, their performance remains subpar compared to larger models on realistic RAG inputs.
RAG inputs are more complex than most datasets used for training NLI models and have characteristics specific to the underlying knowledge base, requiring adaptation of the NLI models to a specific target domain.
Additionally, the lack of labeled instances in the target domain makes supervised domain adaptation, e.g., through fine-tuning, infeasible.
To address these challenges, we introduce Automatic Generative Domain Adaptation (Auto-GDA). Our framework enables unsupervised domain adaptation through synthetic data generation.
Unlike previous methods that rely on handcrafted filtering and augmentation strategies, Auto-GDA employs an iterative process to continuously improve the quality of generated samples using weak labels from less efficient teacher models and discrete optimization to select the most promising augmented samples.
Experimental results demonstrate the effectiveness of our approach, with models fine-tuned on synthetic data using Auto-GDA often surpassing the performance of the teacher model and reaching the performance level of LLMs at 10 % of their computational cost.

## 1 Introduction

Large Language Models (LLMs) are increasingly used in consequential applications. Despite their versatility, LLMs often produce hallucinations, in which the generated information is inaccurate or fabricated and require costly retraining to integrate new knowledge. One promising method to mitigate these issues is retrieval augmented generation (RAG, Lewis et al., ). RAG enhances text generation by adding information from external knowledge sources to the prompt and has been shown to reduce hallucinations in practice (Shuster et al., ). Nevertheless, even when the most capable LLMs are used with RAG, hallucination rates of 20 – 30% persist (Santhanam et al., ).

To prevent hallucinated output from being delivered to end-users, natural language inference (NLI) models can be used to verify grounding of the generated output in the documents retrieved (Chen et al., ; Es et al., ; Tang et al., ) before the output is relayed to the end-user: the generated response must be fully *grounded* in the documents, i.e., it must be logically inferrable from the documents; otherwise, it is considered ungrounded.
However, as we need

Figure: Figure 1: Landscape of current grounding verification models for RAG. While LLMs have the best performance, they incur about 10$\times$ higher latency than lightweight models. In this work, we are interested in obtaining lightweight models with LLM-level performance for grounding verification through domain adaptation.

to check the outputs at inference time, we require lightweight NLI models with very low latency.
The current landscape of available NLI models for verifying grounding in RAG is illustrated in Figure 1 based on results obtained in our
evaluation of correctness and inference time (see Table 3 for full numeric results): Some recent works such as Mini-Check (Tang et al., ) have developed lightweight models for NLI, e.g., based on RoBERTa (Liu, ). These models have shown good performance on academic benchmarks. However, our results indicate that their performance
in verifying grounding for realistic RAG inputs lags behind LLMs by about 20% (in ROC-AUC scores). Other recent methods use pre- and post-processesing techniques such as sentence tokenization or LLM prompting to decompose long prompts (Zha et al., ; Es et al., ) into several chunks or facts. Each of these chunks needs to be processed in a separate forward pass, resulting in high latency as well. While some studies (e.g., Manakul et al., ; Tang et al., ) have also explored directly using LLMs like GPT-4 for text entailment detection, their latency is about an order of magnitude above the lightweight models. Taken together, these characteristics make it hard to deploy the existing approaches in real-time industry use-cases.

The performance gap observed for realistic RAG inputs with the lightweight models may point to a substantial domain mismatch between the NLI datasets used to train these models and the challenging, real-world data encountered at test time.
We observe that inputs of NLI models in RAG are more challenging as they comprise longer segments with multiple statements and contain more subtle ungrounded information as the output is LLM-generated. While these characteristics are common to RAG systems in general, each implementation still has a very individual input distribution: First, inputs may follow a specific format due to the RAG prompt template e.g., question: $<$question$>$. evidence: Passage 1 $<$evidence1$>$, Passage 2 $<$evidence2$>$ …. Second, the documents are retrieved from knowledge bases from a variety of different domains, which may not be represented in training data.
Prior work (Williams et al., ) confirms difficulties when NLI models are applied to data from an unseen domain and Hosseini et al. () shows a generalization gap of up to 20%. This suggests that NLI models need to be adapted to their target domain for optimal performance.

Bridging this domain gap poses a significant challenge due to the inherent difficulty of adapting models to unseen domains that is further amplified by the prohibitive costs of obtaining labeled data from the target domain. This prevents supervised domain adaptation, e.g., through fine-tuning on target domain data. To address this issue, we propose Automatic Generative Domain Adaptation (Auto-GDA). Our unsupervised domain adaptation framework produces high-quality synthetic data, which is then used to fine-tune a lightweight NLI model, adapting it to a specific domain of RAG inputs. While training data generation by simply prompting LLMs has been repeatedly explored in the literature (e.g., Saad-Falcon et al. (); Hosseini et al. ()), data quality might be further improved through filtering and incorporating background knowledge through label-preserving data augmentation strategies, such as round-trip translation (Chen et al., ). However, specifying good filters and heuristic augmentation strategies require significant manual effort. As data augmentations can further be applied iteratively, the space of potential samples grows exponentially, necessitating efficient search strategies. During this offline training phase, less efficient teacher models can provide additional guidance using weak labels. Auto-GDA offers a unified way to leverage all these available tools. We thus make the following contributions:

- 1.
We formalize the unsupervised domain adaptation problem under the availability of practical tools such as data generators, data augmentation routines, and weak teacher models.
- 2.
We propose Automatic Generative Domain Adaptation (Auto-GDA), a principled framework for unsupervised domain adaptation through synthetic data that can be instantiated with different implementations of generation, augmentation, and weak labeling steps and which automatically selects high-quality samples.
- 3.
We show that our objective corresponds to an *enhanced distribution matching objective* but is highly efficient to optimize.
- 4.
Our experiments on realistic RAG inputs highlight that our fine-tuned models using Auto-GDA (1) often outperform their weak teacher models (2) perform almost as well as reference models fine-tuned with human-labeled data and (3) reach the level of performance exhibited by LLMs while having almost 10x lower latency. (4) Our method further outperforms more classical training-based unsupervised domain adaptation techniques.

## 2 Related Work

The problem of domain adaptation is concerned with adapting existing models to different domains. We introduce the most closely related approaches in this section and refer the reader to Ramponi & Plank () for further references.

Synthetic NLI Data. Related works explore synthetic data generation for NLI models. Hosseini et al. () generate the diverse, cross-domain GNLI (General NLI) dataset synthetically in two steps: first prompting an LLM to generate target domains, then using a prompt-tuned LLM to generate training statements. Tang et al. () generate synthetic training data for their MiniCheck models using document-to-claim generation and claim-to-document generation. We compare to their model in our experimental section and show that it can be further improved through domain adaptation. Saad-Falcon et al. () use synthetic data to specifically improve RAG system evaluation. They generate synthetic in-domain data with a few-shot prompt. However, their method is compared within RAG evaluation frameworks and not tested for NLI performance.

Synthetic Data for Domain Adaptation in NLP.
While synthetic QA data generation is well-explored (Shakeri et al., ; Ushio et al., ; Yue et al., ; Lee et al., ), synthetic data for NLI domain adaptation has received less attention, potentially due to the difficulty of generating realistic and difficult samples.
Wang et al. () propose an iterative synthetic data generation scheme requiring partially labeled data. They generate initial seed data using an LLM prompt that is iteratively refined based on errors from a model trained on human-labeled reference set. Unlike this work, we assume very limited access to labeled data from the target domain.

Classical Unsupervised Domain Adaptation.
Beyond synthetic data approaches, classical unsupervised domain adaptation (UDA) techniques have also been applied in NLP. Chen et al. (); Li et al. (); Choudhry et al. () have explored Domain Adversarial Neural Networks (DANN) (Ganin et al., ), which incorporate domain discriminators during pretraining to learn domain-invariant features. He et al. () introduce Scale-invariant-Fine-Tuning (SiFT) which extends the Virtual Adversarial Training (VAT) framework of Miyato et al. () and Jiang et al. () to improve model robustness and generalizability. Techniques like CORAL (Sun & Saenko, ) align feature distributions between source and target domains by matching their second-order statistics. Finally, domain-adaptive pretraining (DAPT) and task-adaptive pretraining (TAPT) (Gururangan et al., ; Han & Eisenstein, ) involve pretraining on target domain text before fine-tuning on labeled source data. Although these methods have shown success in tasks like sentiment analysis and text classification, they have not been comprehensively studied in NLI.

Knowledge Distillation.
We borrow the term “teacher model” from the knowledge distillation literature (Gou et al., ; Yang et al., ). However, our problem differs from distillation problems because our target dataset is unlabeled.

In this paper, we focus on the problem of systematically generating and selecting the most beneficial synthetic samples that can be created through initial generation and iterative augmentation steps. We do so using an efficient objective that can be interpreted as a form of distribution matching.

## 3 Preliminaries

*Domain adaptation* is concerned with adapting an ML model pretrained on a source domain to make predictions on a target domain when the underlying data distributions differ across the two domains.
The *unsupervised* domain adaptation problem is further complicated due to the lack of labeled data in the target domain. This means that while features are available, there is no direct information about the correct class labels for the target domain samples. This poses a significant challenge as the model must learn to adapt to the new distribution without explicit guidance.

### 3.1 Unsupervised Domain Adaptation for NLI

Data Domains. Following the common natural language inference setup, we assume data from a *source domain* is available as a set of triples $\mathcal{D}_{s}=\left\{({\bm{e}}_{n},{\bm{c}}_{n},y_{n})\right\}_{n=1,...,N}
\overset{\text{i.i.d.}}{\sim}p_{s}$ containing evidence ${\bm{e}}\in\mathcal{X}$, corresponding claims ${\bm{c}}\in\mathcal{X}$ where $\mathcal{X}$ denotes a space of text sequences, and labels $y\in\mathcal{Y}$. This data is used to train an initial model $f:\mathcal{X}\times\mathcal{X}\rightarrow\mathcal{Y}$. We use $\mathcal{D}_{s}$ to denote sets of samples and $p_{s}$ to denote the data density of the source distribution. Note that in a RAG use-case, the evidence ${\bm{e}}$ will contain the user prompt as well as the retrieved documents.
Additionally, we are provided with a set of $J$ unlabeled samples $\mathcal{D}_{t}=\left\{({\bm{e}}_{j},{\bm{c}}_{j})\right\}_{j=1,...,J}$ from the target domain.
They are sampled from $p_{t}$, the data distribution faced at test time (e.g., the realistic RAG inputs). Our goal is to adapt a model pretrained on $p_{s}$ to perform well on $p_{t}$. In this work, we are focusing on problems where $J$ is small. This scarcity makes it challenging to accurately estimate the underlying distribution of the target domain, which can hinder the effectiveness of traditional domain adaptation methods that rely on a substantial amount of target data.
We study the binary NLI task where $\mathcal{Y}\in\{0,1\}$. A positive label ($y{=}1$) is only assigned if all information in the claim can be inferred directly from the evidence; claims that are contradictory to the evidence or cannot be inferred from the evidence are considered non-entailed ($y{=}0$).

In this work, we focus on covariate shift between the two domains: While the prior $p({\bm{e}},{\bm{c}})$ is subject to change across domains, the true relation between specific features and labels, $p(y|{\bm{e}},{\bm{c}})$ is consistent for the source and the target domain. For the NLI task considered here, this assumption is sensible because the entailment relation itself does not change for different domains.
Following prior work Saad-Falcon et al. (), we slightly deviate from the fully unsupervised setup by supposing that a very small portion of the target domain can be manually labeled and used as a validation set for hyperparameter tuning only, as is commonly done in NLI literature (Laban et al., ; Tang et al., ; Zha et al., ). We show that our method works with validation sets as small as $30$ samples.

Helper Tools. We extend this common setup to incorporate three additional tools that are readily available in practice: First, we have powerful generative LLMs that we can use to generate new samples based on the unlabeled examples using techniques such as prompt-tuning (Lester et al., ), or few-shot prompting. The *generator* $G$ can be formally described as (randomized) function $G:\mathcal{X}\times\left(\mathcal{X}\right)^{F}\times\mathcal{Y}\rightarrow
\mathcal{X}$, meaning that $G$ takes as input a piece of evidence and a set of $F\geq 1$ example claims (e.g., for few-shot prompting) and a desired target label. The generator $G$ is then tasked with producing a new claim sample that reflects the style of the provided claims and has the specified target label. Note that we provide the $F$ claims without a known label, so they can either be entailed or non-entailed w.r.t. ${\bm{e}}$. Second, we can use some background knowledge of the task to define some approximately label-preserving *augmentation* strategies to increase diversity, e.g., using paraphrasing models, round-trip translation or synonym replacements (Chen et al., ). This step can be formalized as a mutation function $M:\mathcal{X}\rightarrow\mathcal{X}$ which takes a claim as an input and modifies it while trying to preserve its label. The label-preserving characteristics of these strategies are imperfect, i.e., with a small probability the entailment relation will be affected by the augmentation. Finally, we suppose a teacher model $T:\mathcal{X}\times\mathcal{X}\rightarrow[0,1]$, which can be applied to the data from the source and the target domain and provides an entailment score. The teacher model performs reliably within the source domain, but only provides a weak estimate of $T({\bm{e}},{\bm{c}})$. The performance of this model may be noisy because the target domain is out-of-domain for this model, and the model may be too inefficient to be deployed in practice. We will use this model to obtain weak estimates of the samples’ labels. We now present our framework Auto-GDA, which incorporates the three tools $G,M,T$ named above in a principled algorithm.

## 4 A Principled Framework for Unsupervised Domain Adaptation

### 4.1 Outline of the framework

In this work, we present Auto-GDA, a framework for *Automatic Generative Domain Adaptation*, that generates synthetic data points that are useful for fine-tuning a pretrained model $f$ for the target domain.

Figure: Figure 2: Overview of Auto-GDA. We generate initial data using the generator $G$, which are assigned entailment certainty scores using teacher model $T$. The synthetic data is iteratively augmented using $M$, whereas label-preservation is confirmed with $T$ and entailment certainties are updated. We finally select the top-$K$ samples that minimize an objective function $L_{\text{tot}}$. These steps can be applied iteratively until the final data is used to fine-tune the model $f$ for the target domain.
Refer to caption: extracted/5901998/figures/gears.png

For the data generation process to result in high fine-tuning utility it must meet several criteria: (1) The data must be realistic and non-trivial, (2) must have high diversity, (3) the assigned labels must be of high quality.

Auto-GDA is specifically designed to tackle these three challenges. As RAG outputs stem from LLMs, we also generate realistic initial samples using LLMs. We leverage few-shot prompting to transfer patterns in the output to the generated samples.
To preserve the *diversity* of the evidence (which contains the relevant documents in the knowledge base), we generate synthetic claims sequentially for each unique piece of evidence ${\bm{e}}$ available in the unlabeled target dataset $\mathcal{D}_{t}$. This has the advantage that a broad diversity of documents in the knowledge base is represented. We propose to apply augmentations on the synthetic data to increase diversity further.
As the augmentation strategies are only approximately label-preserving, we have to keep track of increasing label uncertainty to *detect samples with low-quality labels* when several data augmentation steps are applied. We therefore equip each sample with an *entailment certainty score* $r$, an estimate of the probability of the sample having an entailed label ($y{=}1)$ which can be used to remove samples with low-quality labels. Auto-GDA applies these steps iteratively to successively increase data quality. In summary our framework consists of the following steps, which we describe in more detail in the next sections:

- 1.
Initial Generation. Generate an initial sample population $\mathcal{D}^{(0)}_{\bm{e}}=\{(\hat{{\bm{c}}}_{k},\hat{y}_{k},r_{k}^{(0)})\}_{k
=1}^{K}$ of claims $\hat{{\bm{c}}}$ and labels $\hat{y}$ for the evidence ${\bm{e}}$ using the generator $G$. Use the teacher model $T$ to assign initial entailment certainty $r^{(0)}$ scores to each sample of synthetic data. This results in each sample having a hard label $\hat{y}$ and a “soft” confindence score $r^{(0)}$ for the hard label.
- 2.
Sample Augmentation. Apply augmentations $M$ on claims in the population $\mathcal{D}^{(i)}_{\bm{e}}$ to obtain new claims with the same hard labels. Update their entailment certainties using the teacher model again. Merge mutated samples and samples from previous iteration to form updated population $\bar{\mathcal{D}}^{(i+1)}_{\bm{e}}=\{(\hat{{\bm{c}}}_{l},\hat{y}_{l},r_{l}^{(i
+1)})\}_{l=1}^{L}$ that is of larger size $L\gg K$.
- 3.
Sample Selection. Select the subset of samples of size $K$ from $\bar{\mathcal{D}}^{(i+1)}_{\bm{e}}$ that minimize our proposed *enhanced distribution matching objective* $\mathcal{L}_{\text{tot}}$ formally introduced in Eqn. (4). The objective includes the unlabeled target samples $\mathcal{D}_{t}$ and the certainty scores. The selected subset becomes the next generation dataset $\mathcal{D}^{(i+1)}_{\bm{e}}$.
- 4.
Repeat steps 2 and 3 for a fixed number of iterations or until objective $\mathcal{L}_{\text{tot}}$ converges.

We illustrate these steps in Figure 2 and will detail out implementation choices for each step below.

### 4.2 Generating Realistic Initial Data

LLMs have been repeatedly used to generate synthetic data for various domains, including NLI (Saad-Falcon et al., ; Hosseini et al., ). In this work, we generate initial data using few-shot prompting with the prompts provided in Section E.1. The prompt instructs the LLM to generate synthetic claims $\hat{{\bm{c}}}=G({\bm{e}},\text{claim}(\mathcal{D}_{t,{\bm{e}}}),\hat{y})$ for the evidence ${\bm{e}}$, reflecting the style of example claims from $\mathcal{D}_{t}$ ($\text{claim}(\mathcal{D}_{t,{\bm{e}}})$ denoting claims from target data for the evidence ${\bm{e}}$) and target label $\hat{y}\in 0,1$. For label $\hat{y}=1$, the LLM is instructed to include only grounded facts, for $\hat{y}=0$, some ungrounded information should be introduced. We assign labels $\hat{y}$ according to the prompt used, resulting in complete initial generated tuples $(\hat{{\bm{c}}},\hat{y})$. We follow some related works (Puri et al., ; Vu et al., ), which have suggested generating many samples and only keeping the most confident. To do so, the samples can be equipped with a weak estimate of the label probability using the teacher model, e.g., another LLM or an NLI model with sophisticated pre- and postprocessing. In the binary classification setup, we can compute initial entailment certainties as $r^{(0)}=T({\bm{e}},\hat{{\bm{c}}})$, which can be interpreded as an uncalibrated and potentially noisy estimate of $p(y=1|{\bm{e}},\hat{{\bm{c}}})$. We explore LLMs for data generation and use state-of-the-art NLI models and also LLMs as teacher models $T$ for providing initial entailment certainties. Adding the entailment certainty scores $r^{(0)}$ to the respective tuples we obtain a set of triples $\mathcal{D}^{(0)}_{\bm{e}}=\{(\hat{{\bm{c}}}_{k},\hat{y}_{k},r_{k}^{(0)})\}_{k
=1}^{K}$ after this step.

### 4.3 Increasing Diversity through Label-Preserving Data Augmentations

In this section, we demonstrate how to augment the initial synthetic dataset (generated using the few-shot prompting strategy) for additional diversity, while maintaining a high degree of label certainty for the augmented synthetic data points.
We exploit a certain degree of background knowledge to derive data augmentation strategies (Chen et al., ). For instance, we know that paraphrasing the claims while preserving their semantic meaning should not change their entailment label. However, when iteratively applying paraphrasing operations, we have to account for an increasing probability of accidentally flipping the label.
\sidecaptionvposfigure[t]

Figure: Figure 3: Intuition for our update rule for entailment certainties: If a parent claim ${\bm{c}}$ is entailed by ${\bm{e}}$ and a mutated claim ${\bm{c}}\textdegree\prime$ is entailed by its parent ${\bm{c}}$, the mutated claim ${\bm{c}}^{\prime}$ will be entailed by ${\bm{e}}$ as well.

Obtaining High-Quality Entailment Certainties. We can combine the generative models with discriminative teacher models again to obtain weak estimates $r^{(i)}$ of the entailment certainty of the augmented samples. Instead of directly computing the entailment probability using $T$, we exploit logical invariances, which allow for better estimates depicted in Figure 3: If the original claim is entailed by the evidence, and if the modified claim is entailed by the original claim, the modified claim will also be entailed by the evidence. Suppose we have obtained $\hat{{\bm{c}}}^{\prime}=M(\hat{{\bm{c}}})$ as a modification of the synthetic claim $\hat{{\bm{c}}}$. As we already have an estimate of the entailment probability for $({\bm{e}},\hat{{\bm{c}}})$, we can reuse it and only need to compute another entailment probability for $(\hat{{\bm{c}}},\hat{{\bm{c}}}^{\prime})$. We argue that computing this entailment probability is easier for the teacher model than directly computing $T({\bm{e}},\hat{{\bm{c}}}^{\prime})$, as the claim and the modified claim should be semantically and syntactically more similar. Paraphrasing datasets like PAWS (Zhang et al., ) are common pretraining datasets, and standard NLI datasets like MNLI (Williams et al., ) contain many similar samples due to their construction through edits, so NLI predictions are expected to be more reliable on these pairs. Querying the teacher model on $T(\hat{{\bm{c}}},\hat{{\bm{c}}}^{\prime})$ allows us to use the following update rule for the augmented sample (${\bm{e}},\hat{{\bm{c}}}^{\prime})$:

$$ $\displaystyle r^{(i+1)}({\bm{e}},\hat{{\bm{c}}}^{\prime})=r^{(i)}({\bm{e}}, \hat{{\bm{c}}})\cdot T(\hat{{\bm{c}}},\hat{{\bm{c}}}^{\prime})+(1-r^{(i)}({\bm {e}},\hat{{\bm{c}}}))\cdot(1-T(\hat{{\bm{c}}},\hat{{\bm{c}}}^{\prime})).$ (1) $$

using the entailment certainty $r^{(i)}$ of the original tuple $({\bm{e}},\hat{{\bm{c}}})$ as a base. Note that some teacher models may be particularly reliable with claim-claim pairs than with evidence-claim pairs so it can be useful to choose a different teacher model for this update than for computing initial certainty scores.

Label Invariant Augmentation Strategies:
In this work, we consider three augmentation strategies that will likely preserve entailment labels (see Appendix Section C.1 for additional details):

- •
Partial Rephrasing with LLMs. Our first augmentation is an LLM-based rephrasing step. Specifically, we randomly mask 20% of the words of the input sequence by replacing the corresponding words by “_" and ask an LLM (Claude3 Haiku) to impute the gaps while preserving the meaning.
- •
Complete Paraphrasing. We use a T5-based paraphrasing model Vorobev & Kuznetsov (). We generate paraphrases for the claims using enforcing diversity using a constraint that prevents $n$-grams of length greater than 5 from being regenerated.
- •
Sentence Deletion. We chunk the claim into sentences and randomly delete one of them. This should preserve the entailment relation as it only removes information. However, we note that this augmentation may remove some of the context necessary to understand the entire claim.

We generate several augmentations for each sample using these strategies along with an estimate of their entailment probabilities, resulting in an enlarged sample set. Unfortunately, not all of these samples may be of high quality. Therefore, it is crucial to select only the most promising samples.

### 4.4 Automatic Selection of High-Quality Samples

A key component of our work involves automatically selecting the most promising samples. Intuitively, we are interested in finding samples that resemble target data. This includes both having realistic features and correctly assigned labels. The data should also have a high chance of improving the final model. Provided with an augmented dataset $\bar{\mathcal{D}}^{(i)}_{\bm{e}}=\left\{\hat{{\bm{c}}_{l}},\hat{y}_{l},r_{l}
\right\}_{l=1}^{L}$ at iteration $i$, we are interested in selecting a subset $\mathcal{Q}_{\bm{e}}\subset\bar{\mathcal{D}}^{(i)}_{\bm{e}}$ of a smaller size $|\mathcal{Q}_{\bm{e}}|=K$ that only contains the most promising samples. We propose the following objective function to assign a loss to a selected subset $\mathcal{Q}_{\bm{e}}$ which contains three terms for each selected sample:

$$ $\displaystyle\mathcal{L}_{tot}(\mathcal{Q}_{\bm{e}},f)=\sum_{\hat{{\bm{c}}_{i} },\hat{y}_{i},r_{i}\in\mathcal{Q}_{\bm{e}}}\left[\underset{\text{distance}}{ \underbrace{d(\hat{{\bm{c}}}_{i},{\bm{c}}_{\min,i})^{2}}}+\lambda_{d}\underset {\text{label correctness}}{\underbrace{\text{LDiv}(r_{i},\hat{y_{i}})}}- \lambda_{u}\underset{\text{utility term}}{\underbrace{U_{f}(\hat{{\bm{c}}}_{i} ,\hat{y}_{i})}}\right],$ (2) $$

where $d({\bm{x}},{\bm{x}}^{\prime})=\lVert\psi({\bm{x}})-\psi({\bm{x}})^{\prime}\rVert$ is a distance function over inputs in $\mathcal{X}$ defined via textual embeddings $\psi$, ${\bm{c}}_{\min,i}\coloneqq\operatorname*{arg\,min}_{{\bm{c}}^{\prime}\in\text{
claim}(\mathcal{D}_{t,{\bm{e}}})}d({\bm{c}}^{\prime},\hat{{\bm{c}}}_{i})$ is the closest claim for evidence ${\bm{e}}$ from the target dataset, and $\lambda_{d},\lambda_{u}$ are hyperparameters. $\text{LDiv}:[0,1]\times\{0,1\}\rightarrow\mathbb{R}_{+}$ is a function that penalizes uncertain labels taking the certainty scores $r$ and the hard labels $\hat{y}$ as inputs as plotted in Figure 4. We derive the exact form of the LDiv function as a divergence estimate of the conditional distributions in Section B.2. The distance term encourages samples to be close to claims

Figure: Figure 4: Modeling the label correctness term in Eqn. 2 as function of $r$. When the estimated entailment certainty $r$ does not match the assigned hard label $\hat{y}$ this term takes high values discouraging selection.
Refer to caption: x1.png

from the target data set for the given evidence. The label correctness term penalizes samples where the entailment certainties are too far apart from the target labels and is used to discourage selection of samples where the labels are likely to be incorrect. Additionally, we encourage generation of samples where the pretrained model $f$ is not performing well yet by including the cross-entropy loss of the model as a utility term, $U_{f}=\text{CE}[f({\bm{e}},\hat{{\bm{c}}}),\hat{y}]$ where $\hat{y}$ is the assigned hard label of a synthetic sample.

Theoretical Properties.
Notably, Equation 2 can be derived from first principles as an enhanced distribution matching objective.
By defining parametric distributions $p_{\mathcal{Q},{\bm{e}}}({\bm{c}},y)$ (representing the selected synthetic data for evidence ${\bm{e}}$) and $p_{\text{cov},{\bm{e}}}({\bm{c}},y)$ (representing the target distribution for ${\bm{e}}$ we aim to imitate) the objective corresponds to the divergence between these distributions plus the expected utility of the synthetic data. Formally,

$$ $\displaystyle\mathcal{L}_{tot}(\mathcal{Q}_{\bm{e}},f)=D_{KL}\left(p_{\mathcal {Q},{\bm{e}}}({\bm{c}},y)\middle|\middle|p_{\text{cov},{\bm{e}}}({\bm{c}},y) \right)-\mathbb{E}_{({\bm{c}},y)\sim p_{\mathcal{Q},{\bm{e}}}}\left[U_{f}({\bm {c}},y)\right].$ (3) $$

We derive a proposition to formalize this connection in Appendix B.

Optimizing the objective. Optimizing the objective for a subset $\mathcal{Q}$ of size $K$ with minimal loss can be done highly efficiently in three steps: (1) Computing each samples’ contribution to the sum in $\mathcal{L}_{tot}$, (2) ranking the samples by this contribution, and (3) greedily
selecting the top-$K$ subset of samples with the lowest contributions. Pseudocode of our complete framework is provided in Algorithm 1 (Appendix).

**Table 1: Performance comparison to baselines (ROC scores). Grouped by off-the-shelf base models trained on standard data, domain-adapted versions of the best base models using DAPT, SIFT, and DeepCORAL, complex state-of-the-art models trained using custom datasets (Vectara, MiniCheck) or using postprocessing (AlignScore), proprietary LLMs, and versions of the base models fine-tuned with Auto-GDA. We highlight the teacher model that was used to assign initial label certainties $r^{(0)}$ in a box and make three observations: (1) the Auto-GDA version of the base models always improves over the vanilla versions and the versions trained with SIFT, Deep CORAL, and DAPT, (2) our best-performing model DeBERTaV2 (Auto-GDA) outperforms its teacher model in three out of four cases, and (3) BART and DeBERTa with Auto-GDA reach LLM-level performance.**
|  | Dataset | RAGTruth | LFQA-Verif. | SummEdits | Avg., | Rank |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
|  | RAG-Task | Summary | QA | QA | Summary |  |  |  |  |  |  |
| base models | FLAN-T5 | 0.734 |  | 0.708 |  | 0.655 |  | 0.700 |  | 0.699 |  |
| BART-large | 0.696 |  | 0.670 |  | 0.821 |  | 0.769 |  | 0.739 |  |  |
| DeBERTaV2 | 0.782 |  | 0.530 |  | 0.645 |  | 0.876 |  | 0.708 |  |  |
| robustness | $\text{DAPT}_{\text{DeBERTaV2}}$ | 0.746 | $\pm$ 0.005 | 0.703 | $\pm$ 0.016 | 0.813 | $\pm$ 0.094 | 0.837 | $\pm$ 0.004 | 0.775 |  |
| $\text{SiFT}_{{\text{DeBERTaV2}}}$ | 0.785 | $\pm$ 0.008 | 0.566 | $\pm$ 0.005 | 0.880 | $\pm$ 0.032 | 0.845 | $\pm$ 0.003 | 0.769 |  |  |
|  | $\text{CORAL}_{{\text{DeBERTaV2}}}$ | 0.718 | $\pm$ 0.001 | 0.677 | $\pm$ 0.001 | 0.822 | $\pm$ 0.001 | 0.853 | $\pm$ 0.001 | 0.768 |  |
| complex | MiniCheck-T5 | 0.754 |  | 0.640 |  | 0.741 |  | 0.791 |  | 0.732 |  |
| AlignScore | 0.729 |  | 0.822 |  | 0.904 |  | 0.894 |  | 0.837 |  |  |
| Vectara-2.1 | 0.805 |  | 0.854 |  | 0.648 |  | 0.590 |  | 0.725 |  |  |
| Auto-GDA | Flan-T5 (Auto-GDA) | 0.756 | $\pm$ 0.004 | 0.783 | $\pm$ 0.013 | 0.687 | $\pm$ 0.002 | 0.824 | $\pm$ 0.010 | 0.762 |  |
| BART (Auto-GDA) | 0.813 | $\pm$ 0.009 | 0.867 | $\pm$ 0.011 | 0.867 | $\pm$ 0.026 | 0.860 | $\pm$ 0.010 | 0.852 | 3 |  |
| DeBERTaV2 (Auto-GDA) | 0.837 | $\pm$ 0.007 | 0.867 | $\pm$ 0.007 | 0.925 | $\pm$ 0.009 | 0.883 | $\pm$ 0.005 | 0.878 | 2 |  |
| LLMs | GPT-3.5 | 0.706 |  | 0.648 |  | 0.749 |  | 0.814 |  | 0.729 |  |
| GPT-4o-mini | 0.884 |  | 0.833 |  | 0.812 |  | 0.878 |  | 0.852 | 3 |  |
| GPT-4o | 0.892 |  | 0.865 |  | 0.896 |  | 0.880 |  | 0.883 | 1 |  |

## 5 Experimental Evaluation

We run experiments with realistic datasets and baseline models to confirm the efficacy of Auto-GDA.

Datasets. We evaluate our approach on three datasets for document-grounded summarization and question answering (QA). We select datasets which include documents, realistic LLM-generated long-form answers, and human labels that can be used for testing. The SummEdits (Laban et al., ) dataset contains GPT-3.5-generated and manual summaries of documents from different domains, e.g., judicial, sales emails, podcasts. We further use both the summary and the QA portion of the RAGTruth (Wu et al., ) dataset. The RAGTruth dataset contains summaries and answers to questions created by LLMs (GPT-3.5/4, Mistral, Llama2). Finally, we use the LFQA-Verification dataset (Chen et al., ), which retrieved documents for questions from the “Explain me Like I am five”-dataset and generated corresponding long-form answers with GPT-3.5 and Alpaca. We selected the datasets to feature characteristics of realistic RAG systems including specific prompt templates (present in RAGTruth, LFQA-Verification) and various domains (present in all datasets, specifically in SummEdits). Details and links to the datasets can be found in Table 4.

Base models. As NLI models, we use three pretrained model architectures that are able to handle NLI queries with the longer context required for RAG inputs. We investigate a BART-Large (Lewis et al., ) model pretrained only on the MNLI dataset (Williams et al., ). This can be considered a lightly pretrained model. Additionally, we study DeBERTa-V2 pretrained with datasets from the tasksource collection (Sileo, ).
We additionally study a FLAN-T5-based model (Raffel et al., ) pretrained on MNLI. The all models possess context lengths of at least 1024 tokens.

Baselines. We use state-of-the-art baselines: AlignScore (Zha et al., ) (RoBERTa-based with pre- and postprocessing), MiniCheck (Tang et al., ), and Vectara-2.1(^1^11[https://docs.vectara.com/docs](https://docs.vectara.com/docs)) (both T5-based). As a teacher model to assign initial score, we use the best-performing model from the “complex” category, which allow easy access to uncertainty scores and have good performance. We employ optuna(^2^22[https://optuna.org/](https://optuna.org/)) to tune the remaining hyperparameters $\lambda_{u}^{\prime}$, $\lambda_{d}$, and the other teacher model used to estimate entailment probabilities for augmentations in Eqn. 1 performing 50 trials per dataset. Auto-GDA is run for two iterations on RAGTruth and one iteration on the other datasets, generating synthetic datasets between $1.3\times$ and $2\times$ the original dataset size. We found no improvements through further increasing dataset size.
We also compare against several common UDA methods, including robustness-based approaches. Specifically, we implement DAPT (Gururangan et al., ), SiFT (He et al., ), and Deep-CORAL (Sun & Saenko, ) for further pretraining of the DeBERTa-V2 model. Additional implementation details for all methods can be found in Appendix C.

### 5.1 Synthetic Data for NLI Model Fine-Tuning

We present the main results obtained with Auto-GDA in Table 1. Our results show that Auto-GDA is highly effective and improves performance in ROC-AUC scores of all tested models on all our datasets. Additional metrics confirm our findings (balanced accuracy, f1-scores in Section D.1).

Comparison to Teacher Models.
Auto-GDA is highly effective, not only incorporating the knowledge of the stronger teacher model (indicated by box) but often even surpassing it, as the optimization enhances data quality over the teacher in three out of four datasets.

Comparison to Classical UDA Methods.
Traditional UDA methods (DAPT, SiFT, and Deep-CORAL) did not yield significant improvements in our NLI domain adaptation setting
and Auto-GDA consistently outperforms them across all datasets. This also indicates that synthetic data generation is more effective for NLI tasks.

Comparison to LLMs.
Finally, our fine-tuned models reach performance levels between state-of-the-art LLMs such as GPT-4o and GPT4o-mini while maintaining significantly lower computational requirements. This shows that our approach results in models with superior NLI performance, in particular when compared to the non-fine-tuned or non-LLM baselines.

Other Teacher Models. We investigate using LLMs and other teacher models in Table 9 (Appendix) but observe that LLMs do not generally outperform other teacher models, possibly due to unreliable uncertainty scores. However, the table also shows that the DeBERTa model can improve its own performance through self-supervision by an average of 0.15 AUC when applied as the teacher model.

**Table 2: Ablation: Fine-tuning with synthetic data obtained by few-shot prompting and random selection of augmentations as opposed to using our framework Auto-GDA. We also report performance relative to the hypothetical upper baseline of fine-tuning on labeled target data and observe that we can almost close this domain-adaptation gap (ROC, DeBERTa model, avg. over 5 runs).**
| Dataset | RAGTruth | LFQA-Verif. | SummEdits | Mean (Gap closed) |  |
| --- | --- | --- | --- | --- | --- |
| RAG-Task | Summary | QA | QA | Summary |  |
| non-fine-tuned | 0.782 | 0.530 | 0.645 | 0.876 | 0.708 (0%) |
| +ft. on Few-Shot Data | 0.799 | 0.826 | 0.934 | 0.872 | 0.858 (84%) |
| +ft. on Augmented w/ Random Selection | 0.777 | 0.783 | 0.919 | 0.862 | 0.835 (71%) |
| +ft. on Augmented w/ Objective (Auto-GDA) | 0.837 | 0.867 | 0.925 | 0.883 | 0.878 (96%) |
| fine-tuned on labeled | 0.842 | 0.890 | 0.909 | 0.898 | 0.885 (100%) |

### 5.2 Ablation Investigations

Components of the algorithm. We add the components of our algorithm individually and show how they successively increase performance in Table 2. In all ablations
we keep dataset size and other parameters constant. The biggest gain is achieved by fine-tuning on data created by few-shot prompting. We subsequently add data augmentations without applying our selection criterion, but instead selecting few-shot and augmented samples randomly. We observe that this decreases data quality, highlighting that data augmentation is only beneficial together with our filtering criterion. When we do so and apply data augmentation with our filtering step (corresponding to full Auto-GDA), this increases performance overall with one exception on the LFQA-Verification dataset (note however that performance here is already above the labeled data, so selection based on target data may draw the results toward the labeled data scores as well).
As an upper baseline we are interested in the hypothetical performance reachable by fine-tuning on human-labeled samples and include it in Table 2. Considering the difference between the no fine-tuning models and the models fine-tuned on human-labeled data as the domain adaptation gap, expressing our results relative to these baselines indicates that we manage to close an impressive 96% of this gap.

**Table 3: Inference times of the models on the datasets as well es average performance taken from Table 1. Our DeBERTa model combines LLM-level performance with substantially lower latency.**
| Model | RAGTruth | LFQA-Verification | SummEdits | Inference time (relative) | Performance |  |
| --- | --- | --- | --- | --- | --- | --- |
|  | Summary | QA | QA | Summary | sec/(50 samples) | AUC-ROC*100 |
| Vectara | 1.57 $\pm$ 0.02 | 1.13 $\pm$ 0.03 | 1.35 $\pm$ 0.03 | 1.03 $\pm$ 0.01 | 1.27 (59%) | 72.5 |
| FLAN-T5 | 1.71 $\pm$ 0.07 | 1.71 $\pm$ 0.07 | 1.72 $\pm$ 0.07 | 1.71 $\pm$ 0.07 | 1.71 (80%) | 69.9 |
| DeBERTaV2 | 2.56 $\pm$ 0.03 | 1.88 $\pm$ 0.04 | 2.15 $\pm$ 0.06 | 1.88 $\pm$ 0.09 | 2.12 (100%) | 70.8 |
| MiniCheck-T5 | 4.50 $\pm$ 0.20 | 3.16 $\pm$ 0.06 | 3.90 $\pm$ 0.14 | 3.22 $\pm$ 0.10 | 3.69 (174%) | 73.2 |
| BART-large | 4.33 $\pm$ 0.01 | 3.62 $\pm$ 0.06 | 3.95 $\pm$ 0.09 | 3.76 $\pm$ 0.20 | 3.92 (184%) | 73.9 |
| AlignScore | 5.88 $\pm$ 0.12 | 7.55 $\pm$ 0.28 | 7.55 $\pm$ 0.35 | 1.81 $\pm$ 0.06 | 5.70 (269%) | 83.7 |
| GPT-4o | 19.80 $\pm$ 0.51 | 19.11 $\pm$ 0.44 | 21.09 $\pm$ 2.97 | 21.89 $\pm$ 1.26 | 20.47 (967%) | 88.3 |
| Auto-GDA DebertaV2 | Same as DeBERTaV2 | 2.12 (100%) | 87.8 |  |  |  |

Selection from Several Augmentation Routines. We report the effect of single versus several augmentations in Figure 6(a) and Figure 6(b) in Section D.2, quantitatively and qualitatively demonstrating that Auto-GDA succeeds to the most promising samples from different augmentations.

### 5.3 Inference Efficiency

Linking to our motivational Figure 1, we study the efficiency of our models in Table 3. We compute NLI scores for 50 random samples from the respective datasets. We observe models in three categories: The most efficient models (Vectara to BART-large) have medium performance on the RAG datasets used in this work indicated by their ROC. On the other hand, models using sophisticated post-processing (AlignScore) perform better, but require about 2.5 times more inference time than our most successful DeBERTa model. Finally, LLMs via APIs require about 10-fold inference time, but result in highest performance. When we compare models trained with our approach, we observe LLM-level performance at about 10% of the inference time.

## 6 Disussion and Conclusion

In this work, we show that synthetic data can successfully tackle the domain generalization gap for NLI models. We present Auto-GDA, an automatic approach for synthetic sample generation and selection overcoming the need for tedious heuristic or manual filtering and augmentation selection. Our results show that we can obtain models that perform on par with most powerful LLMs while having around 90% less inference time using our method.
Our findings further demonstrate the superiority of synthetic data generation over unsupervised domain adaptation (UDA) methods. Even with synthetic data obtained only through few-shot prompting, we can obtain better results than the UDA baselines (Table 1 vs. Table 2). We attribute this to the inherent limitations of UDA methods that usually operate in vectorial embedding spaces and fail to capture semantics of the target domain. By generating synthetic data, we can provide a more comprehensive and tailored representation, allowing for greater control over the desired features. Our results also confirm the common intuition that generalization is increasingly hard with smaller models (Bhargava et al., ). This highlights that domain adaptation is particularly important when low latency at inference time is required, whereas general purpose models can be preferable when quick inference is no hard requirement.

Limitations. In our study we assume that the distribution of evidence samples including the retrieved documents is readily available. In many real-world applications, this may not be the case. To address this, techniques like passage clustering and summarization, as explored in Sarthi et al. (), could be employed on the knowledge base to cover the diversity of evidence passages as a surrogate of this distribution. In addition, domain adaptation requires a model for each individual domain. Future work is required to further study if it is possible to adapt efficient models for multiple domains without performance degradation.

## Appendix A Additional Related Work

Automatic Data Selection.
A related stream of research is concerned with automatically selecting subsets from large datasets for training. For instance, AutoAugment (Cubuk et al., ) searches for optimal image augmentations through reinforcement learning, but can be computationally intensive. In contrast, Xie et al. () propose an efficient importance-weighting criterion based on hashed $n$-gram distributions using Kullback Leibler Divergence (KLD). Data selection is linked to works on data valuation, e.g., Wang & Jia (), as data valuation scores can be used to select training data, often resulting in improved performance.

## Appendix B Theoretical Considerations

### B.1 Deriving our Objective from a Distribution Matching Criterion

In this section, we present an more formal derivation of our objective $\mathcal{L}_{\text{tot}}$ from an *enhanced distribution-matching* objective.
We decrease a statistical divergence between a parametric distribution represented by the selected synthetic data samples $p_{\mathcal{Q}}$ (for instance, their Parzen-Window estimator or MLE estimate of a parametric family) and a target data distribution providing the regions in feature space that we would like to cover, denoted by $p_{\text{cov}}$. We now consider ${\bm{c}}$ to be a vector in a continuous vector space. Such a mapping can be realized through stochastic encoders / decoders. As we consider each evidence ${\bm{e}}$ independently, we write $p_{\mathcal{Q},{\bm{e}}}({\bm{c}},y)$ as a shorthand for $p_{\mathcal{Q}}({\bm{c}},y|{\bm{e}})$.
Additionally, we encourage generation of samples where the pretrained model $f$ is not performing well yet by including the cross-entropy loss of the model as a utility term, $U_{f}=\text{CE}[f({\bm{e}},\hat{{\bm{c}}}),\hat{y}]$ where $\hat{y}$ is the assigned hard label of a synthetic sample. In summary, we propose optimizing the distribution parameters $\mathcal{Q}$ to minimize the objective $\mathcal{L}_{tot}$,

$$ $\displaystyle\min_{\mathcal{Q}}D_{KL}\left(p_{\mathcal{Q},{\bm{e}}}({\bm{c}},y )\middle|\middle|p_{\text{cov},{\bm{e}}}({\bm{c}},y)\right)-\mathbb{E}_{({\bm{ c}},y)\sim p_{\mathcal{Q},{\bm{e}}}}\left[U_{f}({\bm{c}},y)\right]\coloneqq \min_{\theta}\mathcal{L}_{tot}(p_{\mathcal{Q},{\bm{e}}},p_{\text{cov},{\bm{e}} },f)$ (4) $$

where $U_{f}$ is an additional per-sample utility term that depends on the model $f$. We omit ${\bm{e}}$ from the subscript to shorten notation, but still consider a fixed evidence ${\bm{e}}$.
Since we do not have labels for the target samples, we can’t estimate the target distribution term $p_{\text{cov}}({\bm{x}},y)$ in the distribution objective $\mathcal{L}_{tot}$. However, we can decompose the divergence using the “chain-rule” of the KLD (Thomas & Joy, ) into a marginal matching term and a label correctness term:

$$ $\displaystyle D_{KL}\left(p_{\mathcal{Q}}\middle|\middle|p_{\text{cov}}\right) =\underset{\text{marginal matching}}{\underbrace{D_{KL}\left(p_{\mathcal{Q}}({ \bm{c}})\middle|\middle|p_{\text{cov}}({\bm{c}})\right)}}+\underset{\text{ label correctness}}{\underbrace{\mathbb{E}_{{\bm{c}}\sim D_{\theta}}\left[D_{ KL}\left(p_{\mathcal{Q}}(y|{\bm{c}})\middle|\middle|p_{\text{cov}}(y|{\bm{c}}) \right)\right]}}.$ (5) $$

Intuitively, the *marginal matching* term requires the synthetic samples’ features to be close to the range we are interested in covering. We can compute this term by introducing tractable parametric densities. The *label correctness* term penalizes divergence between the conditional label distributions. Intuitively, it enforces that the samples’ labels correspond to their true labels and penalizes uncertainty in the label. We propose to model this label uncertainty using our weak entailment certainty estimates $r$ and provide details on how we model both terms in the following paragraphs.

Parametrizing densities. We need to insert a suitable and tractable parametrizations of $p_{\text{cov}}$ and $p_{\theta}$. We start by modeling their marginals.
To model $p_{\text{cov}}$ we chose an efficiently tractable density $p_{\text{cov}}({\bm{x}})$ can be defined via the nearest target feature vector in $\text{claim}(\mathcal{D}_{t,{\bm{e}}})$ by(^3^33we now assume ${\bm{x}}\in\mathcal{X}$ to be in a metric space. This can be achieved using an encoder mapping the textual input to real vectors.)

$$ $\displaystyle p_{\text{cov},\sigma_{q}}({\bm{c}})=\frac{1}{Z}\exp\left(-\frac{ \lVert{\bm{c}}-\operatorname*{arg\,min}_{{\bm{c}}_{i}\in\mathcal{D}_{t}}d({\bm {c}}_{i},{\bm{c}})\rVert^{2}_{2}}{\sigma^{2}_{q}}\right),$ (6) $$

where $Z>0$ is a normalization constant. We show that a finite $Z$ always exists in the Section B.6. The constant $\sigma_{q}>0$ will be treated as a hyperparameter in our framework. Let $\mathcal{Q}\subset\mathcal{X}$ denote a finite set of selected samples. For $p_{\theta}$, we chose a standard kernel density estimator with kernel width $\sigma_{r}\geq 0$:

$$ $\displaystyle p_{\theta(\mathcal{Q}),\sigma_{r}}({\bm{c}})=\frac{1}{|\mathcal{ Q}|}\sum_{\hat{{\bm{c}}_{i}}\in\mathcal{Q}}\mathcal{N}({\bm{c}};\hat{{\bm{c}}} _{i},\sigma^{2}_{r}{\bm{I}}).$ (7) $$

Modeling label correctness.
We propose to model to label correctness term using the entailment certainty scores, which provides us with an estimate of how well the true and the assigned labels are aligned at a certain point.
If a positively labeled sample has very high entailment certainty or a negatively labeled sample has very low entailment certainty, the assigned labels likely match the ground truth and divergence between true conditional label distribution and assumed distribution is expected to be minimal at the sample ${\bm{x}}$. We derive a relation between the label correctness term and our entailment certainty score in form of a function $D_{KL}\left(p_{\theta}(y|{\bm{c}})\middle|\middle|p_{\text{cov}}(y|{\bm{c}})
\right)\coloneqq\text{LDiv}(r^{(i)},\hat{y})$, relying on the current entailment certainty $r^{(i)}$ and the assigned hard label $\hat{y}$ in Section B.2 that is depicted in Figure 4. The resulting relation fulfills certain natural axioms including that the label correctness term is 0, when we have perfect certainty, i.e., $\text{LDiv}(0,0)=0$, $\text{LDiv}(1,1)=0$.

### B.2 Modeling and Tracking Label Uncertainty

In this section we provide a strategy to estimate the label correctness term in Equation 5 which is given by $D_{KL}\left(p_{\mathcal{Q}}(y|{\bm{c}})\middle|\middle|p_{\text{cov}}(y|{\bm{c
}})\right)$ (see Section B.1 for why we need to model this term).
We need to model both $p_{\mathcal{Q}}(y|{\bm{c}})$ and $p_{\text{cov}}(y|{\bm{c}})$ to estimate this term. As they are binary, we choose Bernoulli distributions. Our estimated conditional $p_{\mathcal{Q}}(y=1|{\bm{c}})=\phi_{0}$ is modeled through a Bernoulli distribution with parameter $\phi_{0}$. This conditional distribution is assumed not to change through the augmentation once initialized (because we also do not change the hard labels during augmentations). Reasonable choices for $\phi_{0}$ involve setting hard probabilities, i.e., $\phi_{0}=\hat{y}$ or using the initial label certainty score $\phi_{0}=r^{(0)}$ as a softer version.

Unfortunately, we do not directly have access to the true label distribution $p_{cov}(y|{\bm{c}})$, but we can follow the following intuition: When we arrive at $r\approx 0.5$ due to many augmentations, this indicates no knowledge about the ground truth label of ${\bm{c}}$. However, this does not mean that the ground truth distribution $p_{\text{cov}}(y=1|{\bm{c}})=0.5$, for instance the sample can still have a certain label that annotators would agree on. Instead there is uncertainty about this distribution’s parameter $p_{\text{cov}}(y=1|{\bm{c}})=\varphi$. There are different options to model the uncertainty over the true label distribution in this work.

Figure: (a) High Certainty
Refer to caption: extracted/5901998/figures/beta1.png

We choose the Beta distribution, which is commonly used as a hyperprior for Benoulli distributions. We chose impose two constraints on the distribution and show that they uniquely define the hyperparameter distribution and have some intuitive properties.

###### Proposition 1

Let $\phi\sim\text{Beta}(\alpha,\beta)$ denote a Beta distribution. Let $\phi_{0}$ be the parameter of the (certain) initial label distribution (usually corresponding to $\hat{y}$) and let $r$ denote the probability of the mutated sample having label $y=1$ (entailment certainty).

- 1.
If $r\in[\text{min}(0.5,\phi_{0}),\text{max}(\phi_{0},0.5)]$, there exist unique values for $\alpha^{\prime},\beta^{\prime}$ such that $\mathbb{E}[p(y=1|{\bm{c}};\varphi)]=\mathbb{E}[\phi]=r$ with a mode at $\phi=\phi_{0}$.
- 2.
For $r\rightarrow 0.5$, the distribution $\text{Beta}(\alpha^{\prime},\beta^{\prime})$ with the values from statement 1 converges to a unit distribution on [0,1] in distribution.
- 3.
Using $p_{\text{cov}}(y=1|{\bm{c}})=\varphi$, $\varphi\sim\text{Beta}(\alpha^{\prime},\beta^{\prime})$, $p_{\mathcal{Q}}(y=1|{\bm{c}})=\varphi_{0}$ and the expected KLD over the prior has the closed-form solution
$\displaystyle\mathbb{E}_{\varphi}\left[{D_{KL}}\left[p_{\mathcal{Q}}(y|{\bm{c}
})\middle|\middle|p_{\text{cov}}(y|{\bm{c}};\varphi)\right]\right]=$
(8)
$\displaystyle-$
$\displaystyle H(p_{\mathcal{Q}}(y|{\bm{c}}))-p_{\mathcal{Q}}(y=0|{\bm{c}})\psi
(\beta^{\prime})-p_{\mathcal{Q}}(y=1|{\bm{c}})\psi(\alpha^{\prime})+\psi(
\alpha^{\prime}+\beta^{\prime}).$
(9)

In the last statement, $\psi$ denotes the digamma-function and $p_{\mathcal{Q}}(y|{\bm{c}})=\text{Bernoulli}(\phi_{0})$ is the initially assumed label distribution for synthetic samples.

See Section B.5 for a derivation. The convergence behavior of this scheme to a unit distribution is visualized in Figure 5. Using the above update rule and the uncertainty estimation, we can compute the label correctness term for $r=\mathbb{E}\left[p_{\mathcal{Q}}(y=1|{\bm{c}})\right]$

$$ $\displaystyle\text{LDiv}({\bm{r}},\phi_{0})=H(\text{Bernoulli}(\phi_{0}))-(1- \phi_{0})\psi(\beta^{\prime}(r))-\phi_{0}\psi(\alpha^{\prime}(r))+\psi(\alpha^ {\prime}(r)+\beta^{\prime}(r))$ (10) $$

where $\alpha^{\prime}(r)$ and $\beta^{\prime}(r)$ are the numerical solutions of Proposition 2. To arrive at the formulation in the main paper, we can plug in $\phi_{0}=\hat{y}$, which is the term visualized in Figure 4.

###### Proposition 1

### B.3 Optimizing the objective

With models for the terms in the objective at hand, we can select a set of most promising samples $\mathcal{Q}$ by solving the discrete sample selection problem

$$ $\displaystyle\min_{\mathcal{Q}\subset\mathcal{D}_{\theta}^{(i)},|\mathcal{Q}|= K}\mathcal{L}_{tot}(p_{\theta(\mathcal{Q}),\sigma_{r}},p_{\text{cov},\sigma_{q }},f).$ (11) $$

To make the problem computationally tractable, we are particularly interested in estimators that decompose over the individuals samples present in the set $\mathcal{Q}$. With such a decomposition at hand, each sample is assigned an individual contribution and we simply select $K$ samples with lowest individual to contributions to minimize the objective. We derive the following proposition for decomposing our objective using the parametrized distributions with parameters $\sigma_{r},\sigma_{q},\mathcal{D}_{t},\mathcal{Q}$ for $p_{\theta}$ and $p_{\text{cov}}$ introduced earlier.

###### Proposition 2

As $\sigma_{r}^{2}\rightarrow 0$ while $\sigma_{q}^{2}>0$ is constant, the objective converges to

$$ $\displaystyle\lim_{\sigma_{r}\rightarrow 0}\mathcal{L}_{tot}(p_{\theta( \mathcal{Q}),\sigma_{r}},p_{\text{cov},\sigma_{q}},f)=C+\sum_{\hat{{\bm{c}}}_{ i},\hat{y}_{i},r_{i}\in\mathcal{Q}}\left[d(\hat{{\bm{c}}}_{i},{\bm{c}}_{\min,i })^{2}+\lambda_{d}\text{LDiv}(r_{i},\hat{y}_{i})-\lambda_{u}^{\prime}U_{f}( \hat{{\bm{c}}}_{i},\hat{y}_{i})\right]$ (12) $$

$C$ is a constant, and $\lambda_{d}(\sigma_{q})$, $\lambda_{u}^{\prime}$,
hyperparameters,

$$ $\displaystyle{\bm{c}}_{\min,i}\coloneqq\operatorname*{arg\,min}_{{\bm{c}}^{ \prime}\in\text{claim}(\mathcal{D}_{t,{\bm{e}}})}d({\bm{c}}^{\prime},\hat{{\bm {c}}}_{i}),$ (13) $$

and LDiv denotes the expected KLD of the conditional distribution (label correctness term) of the objective that can be modeled as a continuous function from the entailment certainty scores $r$.

We derive this proposition in Section B.4.
In summary, we show that for small $\sigma_{r}$ the contribution of a sample to the objective approaches a sum of three parts: The distance to the closest sample from the target claim set for evidence ${\bm{e}},\text{claim}(\mathcal{D}_{t,{\bm{e}}})$ to the claim $\hat{{\bm{c}}}$, the label correctness term, and the negative utility.
We use the above decomposition in our algorithm, ensuring the objective can be solved highly efficiently in three steps: (1) Computing each samples contribution to $\mathcal{L}_{tot}$, (2) ranking the samples by this contribution, and (3) finally selecting the top-$K$ subset of samples with the lowest contributions.

###### Proposition 2

### B.4 Derivation of Proposition 2

To reduce computational complexity, we use an approximation of our objective that does not feature dependencies between the points in the subset. Then the objective is given by a sum of values for the individual points.
To derive this objective, we consider the behavior of the objective for $\sigma_{r}\rightarrow 0$ while keeping a fixed $\sigma_{q}>0$. First we note that the normal density $p_{\mathcal{Q},\sigma_{r}}({\bm{c}})$ with center ${\bm{c}}$ and covariance $\sigma^{2}_{r}{\bm{I}}$ converges to a Dirac distribution and for a continuous function $f:\mathbb{R}^{d}\rightarrow\mathbb{R}$ with the filter property:

$$ $\displaystyle\lim_{\sigma_{r}\rightarrow 0}\int_{\mathbb{R}^{N}}f({\bm{c}})p_{ \mathcal{Q},\sigma_{r}}({\bm{c}})d{\bm{c}}=f({\bm{c}}).$ (14) $$

We now consider the individual terms of the objective.

Marginal Matching. Let us start with the marginal matching term of the objective.

$$ $\displaystyle p_{\mathcal{Q}}({\bm{x}})=\frac{1}{|\mathcal{Q}|}\sum_{\hat{{\bm {c}}_{i}}\in\mathcal{Q}}\mathcal{N}({\bm{c}};\hat{{\bm{c}}}_{i},\sigma^{2}_{r} {\bm{I}})\coloneqq\sum_{\hat{{\bm{c}}_{i}}\in\mathcal{Q}}\bar{p}_{i}({\bm{c}})$ (15) $$

where $\bar{p}_{i}({\bm{c}})$ corresponds to the density of the $i$th mixture component.

$$ $\displaystyle D_{KL}\left(p_{\mathcal{Q}}({\bm{c}})\middle|\middle|p_{\text{ cov}}({\bm{c}})\right)=\mathbb{E}_{{\bm{c}}\sim p_{\mathcal{Q}}}\left[\log p_{ \mathcal{Q}}({\bm{c}})-\log p_{\text{cov}}({\bm{c}})\right]$ (16) $\displaystyle=\frac{1}{|\mathcal{Q}|}\sum_{\hat{{\bm{c}}}_{i}\in\mathcal{Q}} \mathbb{E}_{{\bm{c}}\sim\bar{p}_{i}}\left[\log p_{\mathcal{Q}}({\bm{c}})-\log p _{\text{cov}}({\bm{c}})\right]=\frac{1}{|\mathcal{Q}|}\sum_{\hat{{\bm{c}}}_{i} \in\mathcal{Q}}\mathbb{E}_{{\bm{c}}\sim\bar{p}_{i}}\left[\log p_{\mathcal{Q}}( {\bm{c}})\right]-\mathbb{E}_{{\bm{c}}\sim\bar{p}_{i}}\left[\log p_{\text{cov}} ({\bm{c}})\right]$ (17) $$

We need to find good and tractable approximations of both terms.
For small $\sigma_{r}\rightarrow 0$, $p_{i}$ approaches a dirac distribution $\delta_{{\bm{\theta}}_{i}}$ with all mass at the center ${\bm{\theta}}_{i}$. This simplifies the objective to

$$ $\displaystyle\mathbb{E}_{{\bm{c}}\sim\bar{p}_{i}}\left[\log p_{\mathcal{Q}}({ \bm{x}})\right]\rightarrow\mathbb{E}_{{\bm{c}}\sim\bar{p}_{i}}\left[\log\bar{p }_{i}({\bm{c}})\right]\rightarrow\frac{1}{2}d\log\left((2\pi e)+\sigma_{r}^{2} \right)\rightarrow\frac{1}{2}d\log(2\pi e)$ (18) $$

where $d$ is the dimension of ${\bm{c}}$. The second part converges to

$$ $\displaystyle\mathbb{E}_{{\bm{c}}\sim\bar{p}_{i}}\left[\log p_{\text{cov}}({ \bm{c}})\right]\rightarrow\frac{1}{Z}\left[\frac{-\lVert\hat{{\bm{c}}}_{i}-{ \bm{c}}_{\min,i}\rVert^{2}}{\sigma_{q}^{2}}\right]$ (19) $$

where

$$ $\displaystyle{\bm{c}}_{\min,i}\coloneqq\operatorname*{arg\,min}_{{\bm{c}}^{ \prime}\in\text{claim}\mathcal{D}_{t,{\bm{e}}}}d({\bm{c}}^{\prime},\hat{{\bm{c }}}_{i}).$ (20) $$

Label Correctness Term. We model the uncertainty propagation as in Equation 10. Approaching $\sigma_{r}\rightarrow 0$, we have

$$ $\displaystyle\mathbb{E}_{{\bm{c}}\sim p_{\mathcal{Q}}}\left[D_{KL}\left(p_{ \theta}(y|{\bm{x}})\middle|\middle|p_{\text{cov}}(y|{\bm{c}})\right)\right]= \mathbb{E}_{{\bm{c}}\sim p_{\theta}}[\text{LDiv}(r,y)]$ (21) $\displaystyle\rightarrow\frac{1}{|\mathcal{Q}|}\sum_{\hat{{\bm{c}}}_{i},y_{i}, r_{i}\in\mathcal{Q}}\left[\text{LDiv}(r_{i},\hat{y}_{i})\right]$ (22) $$

Utility Term
Finally, the same can be done for the utility term:

$$ $\displaystyle\lambda_{u}\mathbb{E}_{({\bm{c}},y)\sim p_{\mathcal{Q}}}\left[U_{ f}({\bm{c}},y)\right]\rightarrow\frac{1}{|\mathcal{Q}|}\sum_{\hat{{\bm{c}}}_{i },\hat{y}_{i},r_{i}\in\mathcal{Q}}\lambda_{u}\left[U_{f}(\hat{{\bm{c}}}_{i}, \hat{y}_{i})\right]$ (23) $$

Assembling all terms. In summary, we arrive at

$$ $\displaystyle\mathcal{L}_{tot}\rightarrow\frac{1}{|\mathcal{Q}|}\sum_{\hat{{ \bm{c}}}_{i},\hat{y}_{i},r_{i}\in\mathcal{Q}}\frac{d}{2}\log(2\pi e)+\frac{1}{ Z}\left[\frac{\lVert\hat{{\bm{c}}}_{i}-{\bm{c}}_{\min,i}\rVert^{2}}{\sigma_{q} ^{2}}\right]+\text{LDiv}(r_{i},\hat{y}_{i})-\lambda_{u}U_{f}(\hat{{\bm{c}}}_{i },\hat{y}_{i})$ (24) $\displaystyle=\frac{d}{2}\log(2\pi e)\sum_{\hat{{\bm{c}}}_{i},\hat{y}_{i},r_{i }\in\mathcal{Q}}\frac{1}{|\mathcal{Q}|Z\sigma_{q}^{2}}\lVert\hat{{\bm{c}}}_{i} -{\bm{c}}_{\min,i}\rVert^{2}+\frac{1}{|\mathcal{Q}|}\text{LDiv}(r_{i},\hat{y}_ {i})-\frac{\lambda_{u}}{|\mathcal{Q}|}U_{f}(\hat{{\bm{c}}}_{i},\hat{y}_{i})$ (25) $\displaystyle\propto C+\sum_{\hat{{\bm{c}}}_{i},\hat{y}_{i},r_{i}\in\mathcal{Q }}\lVert\hat{{\bm{c}}}_{i}-{\bm{c}}_{\min,i}\rVert^{2}+\lambda_{d}\text{LDiv}( r_{i},\hat{y}_{i})+\lambda_{u}^{\prime}U_{f}(\hat{{\bm{c}}}_{i},\hat{y}_{i})$ (26) $$

where in the last step, we multiply all terms be $|\mathcal{Q}|Z\sigma_{q}^{2}$ to normalize the first constant to 1. This completes our derivation.

### B.5 Derivation of Proposition 1

Statement 1:
We know that the mean of the beta distribution $\varphi\sim\text{Beta}(\alpha,\beta)$ is given by

$$ $\displaystyle\mathbb{E}[\varphi]=\frac{\alpha}{\alpha+\beta}$ (27) $$

and the mode is given by

$$ $\displaystyle\text{mode}[\varphi]=\frac{\alpha-1}{\alpha+\beta-2}$ (28) $$

for $\alpha,\beta>1$ (for $\alpha=\beta=1$, we obtain the uniform distribution and any value is a mode).
Constraining the mode to be $\text{mode}[\varphi]=\phi_{0}$ yields

$$ $\displaystyle\alpha=q\phi_{0}+1,\beta=q(1-\phi_{0})+1,q\in[0,\infty)$ (29) $$

For the mean, we obtain

$$ $\displaystyle\mathbb{E}[\varphi]=\frac{q\varphi_{0}+1}{q+2}$ (30) $$

Setting $\mathbb{E}[\varphi]=r$ yields

$$ $\displaystyle(q+2)r=q\varphi_{0}+1\Leftrightarrow q(r-\varphi_{0})=1-2r \Leftrightarrow q=\frac{1-2r}{r-\varphi_{0}}$ (31) $$

The solution of $q$ is non-negative if
$r\neq\varphi_{0}$ and if $\varphi_{0}>r$
in case $r>0.5$ and if $\varphi_{0}<r$ in case $r<0.5$.
Under these conditions, we obtain the unique parameters

$$ $\displaystyle\alpha=\frac{1-2r}{r-\varphi_{0}}\varphi_{0}+1,\beta=\frac{1-2r}{ r-\varphi_{0}}(1-\varphi_{0})+1$ (32) $$

Statement 2. We prove this statement using the *Method of Moments* showing that each moment of the distribution converges to the moment of the uniform distribution. If this is the case, the method of moments asserts that the sequence will converge in distribution.
Note that both distributions are uniquely determined by their moments because they reside on the interval [0,1].
We see that as $r\rightarrow 0.5$ we have that $q\rightarrow 0$. We will show that

$$ $\displaystyle\text{Beta}(q\varphi_{0},q(1-\varphi_{0}))\overset{q\rightarrow 0 }{\longrightarrow}=\text{Unif}[0,1]$ (33) $$

We therefore compute the $n$th moments of the Unit distribution for $n\in\mathbb{N}$ with $X\sim\text{Unif}[0,1]$

$$ $\displaystyle\mathbb{E}[X^{N}]=\frac{1}{n+1}$ (34) $$

For the Beta distribution with with $\phi\sim\text{Beta}(q\varphi_{0},q(1-\varphi_{0}))$ we have

$$ $\displaystyle\mathbb{E}[\varphi^{N}]=\prod_{k=0}^{n-1}\frac{q\varphi_{0}+1+k}{ q+2+k}$ (35) $$

Taking the limit results in

$$ $\displaystyle\lim_{q\rightarrow 0}\mathbb{E}[\varphi^{N}]=\lim_{q\rightarrow 0 }\prod_{k=0}^{n-1}\frac{q\varphi_{0}+1+k}{q+2+k}=\prod_{k=0}^{n-1}\frac{1+k}{2 +k}=\frac{1}{n+1}$ (36) $$

Statement 3:
We calculate

$$ $\displaystyle\mathbb{E}_{\varphi}\left[{D_{KL}}\left[p_{\mathcal{Q}}(y|{\bm{c} })\middle|\middle|p_{\text{cov}}(y|{\bm{c}};\varphi)\right]\right]=$ (37) $\displaystyle p_{\mathcal{Q}}(y=0|{\bm{c}})(\log p_{\mathcal{Q}}(y=0|{\bm{c}}) -\mathbb{E}_{\varphi}[\log 1-\varphi])$ (38) $\displaystyle+p_{\mathcal{Q}}(y=1|{\bm{c}})(\log p_{\mathcal{Q}}(y=1|{\bm{c}}) -\mathbb{E}_{\varphi}[\log\varphi])$ (39) $\displaystyle=-$ $\displaystyle H(p_{\mathcal{Q}}(y|{\bm{c}}))-p_{\mathcal{Q}}(y=0|{\bm{c}})( \psi(\beta)-\psi(\alpha+\beta))-p_{\theta}(y=1|{\bm{c}})(\psi(\alpha)-\psi( \alpha+\beta))$ (40) $\displaystyle=-$ $\displaystyle H(p_{\mathcal{Q}}(y|{\bm{c}}))-p_{\mathcal{Q}}(y=0|{\bm{c}})\psi (\beta)-p_{\theta}(y=1|{\bm{c}})\psi(\alpha)+\psi(\alpha+\beta)$ (41) $$

We use the identities:

$$ $\displaystyle\mathbb{E}_{\varphi\sim\text{Beta}(\alpha,\beta)}[\log\varphi]= \psi(\alpha)-\psi(\alpha+\beta)$ (42) $\displaystyle\mathbb{E}_{\varphi\sim\text{Beta}(\alpha,\beta)}[\log 1-\varphi] =\psi(\beta)-\psi(\alpha+\beta)$ (43) $$

###### Definition 1 (Probabilistically Correct Data Augmentation, PCDA)

A probabilistically correct data augmentation is a (potentially randomized) mapping $M:\mathcal{X}\times\mathcal{Y}\rightarrow\mathcal{X}\times[0,1]$. Applying $({\bm{x}}_{k+1},r_{\text{miss}})=M({\bm{x}}_{k},y)$ generates a modified sample ${\bm{x}}_{k+1}$ and additionally returns a probability $r_{\text{miss}}\in[0,1]$ of flipping the assigned label during the augmentation step when keeping the mechanism $g$ and the annotator $\eta$ fixed, i.e., $p(g({\bm{x}}_{k+1},\eta)\neq g({\bm{x}}_{k},\eta))=r_{miss}^{(k)}$, where the randomness is over the data augmentation output ${\bm{x}}_{k+1}$. Setting the initial agreement $p_{\text{agree}}^{(0)}=1.0$, we can perform the following update rule

$$ $\displaystyle p_{\text{agree}}^{(k+1)}=(1-r_{\text{miss}}^{(k)})p_{\text{agree }}^{(k)}+r_{\text{miss}}^{(k)}(1-p_{\text{agree}}^{(k)}).$ (44) $$

###### Definition 1 (Probabilistically Correct Data Augmentation, PCDA)

### B.6 Existence of Normalization Constant

We consider the density

$$ $\displaystyle p_{\text{cov}}({\bm{x}})=\frac{1}{Z}\exp\left(-\frac{\lVert{\bm{ x}}-\operatorname*{arg\,min}_{{\bm{x}}_{i}\in\mathcal{D}_{t}}d({\bm{x}}_{i},{ \bm{x}})\rVert^{2}_{2}}{\sigma^{2}_{q}}\right),$ (45) $$

where $D_{t}$ is a finite set. We show that the normalization constant exists by proving that the integral of the non-normalized density over the feature space $\mathcal{X}=\mathbb{R}^{d}$ is bounded. To do so, we perform the following derivation:

$$ $\displaystyle\int_{\mathbb{R}^{d}}\exp\left(-\frac{\lVert{\bm{x}}- \operatorname*{arg\,min}_{{\bm{x}}_{i}\in\mathcal{D}_{t}}d({\bm{x}}_{t},{\bm{x }})\rVert^{2}_{2}}{\sigma^{2}_{q}}\right)d$ $\displaystyle{\bm{x}}\leq\int_{\mathbb{R}^{d}}\sum_{x_{i}\in D_{t}}\exp\left(- \frac{\lVert{\bm{x}}-{\bm{x}}_{i}\rVert^{2}_{2}}{\sigma^{2}_{q}}\right)d{\bm{x}}$ (46) $\displaystyle\leq\sum_{x_{i}\in D_{t}}\frac{1}{\sqrt{\sigma_{q}^{2}\pi}}\leq \frac{|D_{t}|}{\sqrt{\sigma_{q}^{2}\pi}}$ (47) $$

The first step uses the insight that the argmin will always be any point in $D_{t}$ so if we add up the contributions for all possible points, we will arrive at an upper bound. This completes the proof.

## Appendix C Implementation Details

### C.1 Implementation Details for Augmentation Strategies

In this section we provide additional details regarding the data augmentation strategies that we deploy in this work.

Partial Rephrasing with LLM. We use the prompt given in Section E.3 to instruct the LLM (Claude3-Haiku) to create different versions of a document where some parts are masked. We decide to mask a random 20% of consecutive words in the document. We let the LLM generate 3 outputs each for 2 different masks, resulting in a total of 6 rephrased versions for each claim. Sampling temperature is set to 1.0.

Complete Paraphrasing. We use the T5-based model obtained here(^4^44[https://huggingface.co/humarin/chatgpt_paraphraser_on_T5_base](https://huggingface.co/humarin/chatgpt_paraphraser_on_T5_base)) as a paraphraser to generate 3 rephrased versions of each claim. To ensure no duplicates are produced, we set parameters repetition_penalty=10.0, and no_repeat_ngram_size=5.

Drop Sentences. For this augmentation, we sentence tokenize the claim using spacy with en_core_web_sm tokenizer. We postprocess the outputs slightly to better handle statements in quotes. We then randomly drop a sentence from the claim.

### C.2 Datasets

We apply the following preprocessing to the datasets: We filter out all samples, that have more than 1022 BART tokens (filling out the 1024 context length with an additional SEP and CLS token). The sizes and source links of the resulting datasets are provided in Table 4. We note that this reduces the number of usable SummEdits domains from 10 to 5 (due to some domains only containing overlength evidence documents).

Splits. We either use the available train/test splits (RAGTruth) or create splits making sure that summaries / answers derived from the same evidence are either only present in the train or the test split. The validation split is derived from the train split.

Processing of QA datasets. The QA datasets require integrating the question and the retrieved documents into a single prompt. The RAG-Truth dataset already provides integrated prompts which we use. For the LFQA-Verification questions and documents are provided seperately. We use the integration template *"You are given the question: " + <QUESTION> Here is some information related to the question: <EVIDENCE DOCUMENTS>*.

**Table 4: Dataset sizes.**
| Dataset | Train | Val | Test | Link |
| --- | --- | --- | --- | --- |
| ragtruth-Summary | 2578 | 125 | 636 | [https://github.com/ParticleMedia/RAGTruth](https://github.com/ParticleMedia/RAGTruth) |
| ragtruth-QA | 3661 | 143 | 875 | [https://github.com/ParticleMedia/RAGTruth](https://github.com/ParticleMedia/RAGTruth) |
| summedits | 2671 | 60 | 733 | [https://huggingface.co/datasets/Salesforce/summedits](https://huggingface.co/datasets/Salesforce/summedits) |
| lfqa-verification | 171 | 35 | 65 | [https://github.com/timchen0618/LFQA-Verification/](https://github.com/timchen0618/LFQA-Verification/) |

### C.3 Auto-GDA Details and Hyperparameters

We implement the algorithm outlined in Algorithm 1. We emphasize that we fix the teacher model to assign the initial scores. Here we can compute estimates of the model performance using the validation set of evidence-claim pairs to which we have access, allowing us to chose the best performing one as teacher. However, we do not know the performance of the models on claim-claim pairs, so we treat the teacher model used in the augmentation step as a hyperparameter, that will be optimized.

Fixed Hyperparameters.
We additinally keep the following hyperparameters fixed across datasets:

- •
Finetuning: 1 Epoch, learning rate $10^{-5}$ for DeBERTA, BART, $2\times 10^{-4}$ for FLAN-T5, batch size 2
- •
To compute the distance function $d$ we use embeddings from a sentence-t5-base model(^5^55[https://huggingface.co/sentence-transformers/sentence-t5-base](https://huggingface.co/sentence-transformers/sentence-t5-base)).
- •
Number of offspring per sample ($l$ in pseudocode): $l=12$, with 6 child samples from LLM Partial rephrasing, 3 each from Drop Sentence and Complete Paraphrasing

We set the number of evidences used per claim which determines size of the synthetic dataset according to the different datasets as given in Table 5. Setting our chosen values results in the synthetic dataset being between 1.3-times and 2 times as large as the original dataset based on the oberservations in Section D.5, suggesting that this is the optimal range.

Optimized Hyperparameters. As outlined in the main text, we apply optuna for 50 configuration trial as an hyperparameter optimizer to find the remaining hyperparameters. We set the ranges $\lambda_{u}\in[0.1,100],\lambda_{u}\in[0.01,5000]$ and let the augmentation teacher model be selected from {vectara, alignscore, deberta}. We don’t allow LLMs as teacher models for augmentations because it would be too expensive as a lot of augmented samples are created in the course of the algorithm. The final hyperparameters found through optimization are given in Table 6.

Base models.
As a basis for finetuning we use huggingface checkpoints for DeBERTaV2(^6^66[https://huggingface.co/tasksource/deberta-base-long-nli](https://huggingface.co/tasksource/deberta-base-long-nli)), BART-large(^7^77[https://huggingface.co/facebook/bart-large-mnli](https://huggingface.co/facebook/bart-large-mnli)) and FLAN-T5(^8^88[https://huggingface.co/sjrhuschlee/flan-t5-base-mnli](https://huggingface.co/sjrhuschlee/flan-t5-base-mnli)).

Hardware. Our experiments (including runtime) were run on a system with 16-core Intel(R) Xeon(R) CPU E5-2686 processors (2.30GHz) and a single Nvidia Tesla V100 GPU with 32GB of RAM.

**Table 5: Fixed hyperparameters dependent on dataset. Note that we set only “Samples per evidence” which determines synthetic dataset size together with the number of evidences.**
| Dataset | RAGTruth | LFQA-Verification | SummEdits |  |
| --- | --- | --- | --- | --- |
| Parameter / RAG-Task | Summary | QA | QA | Summary |
| # Samples per evidence | 12 | 12 | 4 | 32 |
| # Synth. Dataset size (Org. Size) | 3544 (2578) | 5032 (3662) | 336 (171) | 3552 (2671) |
| # Augmentation Iterations | 2 | 2 | 1 | 1 |

**Table 6: Tuned hyperparameters. Bold parameters were fixed for the runs, while the remainder was tuned using the hyperparameter optimizer.**
| Dataset/Task | Initial Teacher Model | Augment. Teacher Model | $\lambda_{d}$ | $\lambda_{u}$ |
| --- | --- | --- | --- | --- |
|  | Main Results, Table 1 best NLI model as initial teacher) |  |  |  |
| RAGTruth-QA | vectara | debertav2 | 32.67 | 20.57 |
| RAGTruth-Summ | vectara | debertav2 | 198.85 | 19.51 |
| LFQA-QA | alignscore | vectara | 25.27 | 6.83 |
| Summedits-Summ | alignscore | bart-large | 0.02 | 92.11 |
|  | GPT-4o teacher results, Table 9 (GPT-4o as initial teacher) |  |  |  |
| RAGTruth-Summ | gpt-4o | vectara | 0.06 | 7.58 |
| RAGTruth-QA | gpt-4o | bart-large | 47.26 | 0.15 |
| LFQA-QA | gpt-4o | debertav2 | 3940.60 | 7.28 |
| Summedits-Summ | gpt-4o | debertav2 | 0.01 | 29.42 |
|  | Self-supervised results, Table 9 (DeBERTa as initial, augmentation teacher) |  |  |  |
| RAGTruth-Summ | debertav2 | debertav2 | 296.13 | 1.03 |
| RAGTruth-QA | debertav2 | debertav2 | 4591.98 | 0.24 |
| LFQA-QA | debertav2 | debertav2 | 890.45 | 17.29 |
| Summedits-Summ | debertav2 | debertav2 | 871.77 | 19.23 |

### C.4 Algorithm

Figure: Algorithm 1 Automatic Generative Domain Adaptation (Auto-GDA)

We provide pseudocode for our algorithm in Algorithm 1.

### C.5 Baseline NLI Models

For the complex NLI model baselines, we use Vectara HHEM-2.1(^9^99[https://huggingface.co/vectara/hallucination_evaluation_model](https://huggingface.co/vectara/hallucination_evaluation_model)). The model cannot be easily fine-tuned because it uses custom code. Additionally we use Alignscore-base with the checkpoint found in this repository(^10^1010[https://github.com/yuh-zha/AlignScore](https://github.com/yuh-zha/AlignScore)) with the recommended “split” (pre- and postprocessing) nli_sp option. We neglect the larger version as its runtime was comparable to LLMs at a usually lower performance, making the smaller model a better trade-off. Finally we use the best-performing Minicheck flan-t5-large model by Tang et al. () from the official huggingface page(^11^1111[https://huggingface.co/lytang/MiniCheck-Flan-T5-Large](https://huggingface.co/lytang/MiniCheck-Flan-T5-Large)).

### C.6 Robust Pre-training and Fine-tuning for Unsupervised Domain Adaptation

To address domain shift in NLI, we experimented with multiple classical unsupervised domain adaptation (UDA) techniques, which aim to improve the model’s generalization for out-of-domain data by adding robustness during training and by using unlabeled target-domain data. Specifically, we implemented Domain-Adaptive Pretraining (DAPT), Virtual Adversarial Training (VAT), Deep CORrelation ALignment (CORAL), and Domain Adversarial Neural Networks (DANN) combined with conditional entropy minimization.

Notation
We refer to source domain data $\{(x_{i},y_{i})\}_{i=1:n}\in(X_{S},Y_{S})^{n}$, where $x_{i}$ denotes the input text and $y_{i}\in\{0,1\}$ the corresponding entailment label, and target domain data $\{(x_{i})\}_{i=1:m}\in(X_{T})^{m}$. The labels $y\in\{0,1\}$ correspond to whether a claim is entailed or hallucinated (contradictory or neutral).
Our goal is to train a feature extractor $f_{\theta}$, parameterized by $\theta$, that performs well on the target domain.

Domain-Adaptive Pretraining (DAPT)
Our first approach, Domain-Adaptive Pretraining (DAPT) (Gururangan et al., ), performs Masked Language Modeling (MLM) on (unlabeled) data from the target domain before finetuning on the labeled source-domain data for NLI. This way, it learns the representations of both source and target domain, before finetuning on the source domain to relearn classification for the NLI task.

Virtual Adversarial Training (VAT)
Our second approach is Virtual Adversarial Training (Miyato et al., ), which increases model robustness by introducing adversarial perturbations to the input data during training. Specifically, we add an adversarial regularization term to the classification objective, which becomes:

$$ $\min_{\theta}\mathbb{E}_{(x,y)\sim D_{S}}[\ell(f_{\theta}(x),y)]+\lambda\cdot \mathbb{E}_{x\sim D_{S}}\left[\max_{\delta\in S}\ell_{\text{KL}}(f_{\theta}(x+ \delta),f_{\theta}(x))\right],$ (48) $$

where $\ell$ is the classification loss (e.g., cross-entropy) on the source domain, $\ell_{\text{KL}}$ is the KL divergence between the output distributions, $\delta$ is a small perturbation constrained within a a ball $S$, and $\lambda$ is the regularization weight. According to (Jiang et al., ), VAT induces Lipschitz-continuity, which means that small changes in the input do not cause disproportionately large changes in the output, improving robustness and generalization for out-of-domain data.

Deep CORAL
The objective of CORrelation ALignment (CORAL) (Sun et al., ) is to align the second-order statistics (covariances) of the source and target embedding distributions by minimnizing the Frobenius norm between their covariance matrices. Specifically,
denoting $\mathbf{C}_{S}$ and $\mathbf{C}_{T}$ the covariance matrices of the embeddings of the source and target samples as extracted from the last encoding layer, respectively, and as $d$ the dimension of the features, the regularization loss is:

$$ $L_{\text{CORAL}}(\theta)=\frac{1}{4d^{2}}\left\|\mathbf{C}_{S}-\mathbf{C}_{T} \right\|_{F}^{2},$ (49) $$

Domain Discriminator and Conditional Entropy Minimization
Finally, we also implement a domain discriminator inspired by domain adversarial training (Ganin et al., ) and other related works in NLP.
The discriminator $D$ is trained to classify source and target domain features correctly, whereas the feature extractor (classifier) $f_{\theta}$ is trying to minimize the discriminator’s accuracy, which should amplify the learning of domain-invariant features from the classifier. The domain adversarial loss is:

$$ $L_{d}(\theta)=\mathbb{E}_{x\sim D_{S}}[\ln D(f_{\theta}(x))]+\mathbb{E}_{x\sim D _{T}}[\ln(1-D(f_{\theta}(x)))].$ (50) $$

We also experiment with adding a conditional entropy loss to ensure the model makes confident predictions on the target domain and improve the placement of the initial boundaries, as outlined in Shu et al. () and Reed et al. ():

$$ $L_{c}(\theta)=-\mathbb{E}_{x\sim D_{T}}\left[f_{\theta}(x)^{\top}\ln f_{\theta }(x)\right],$ (51) $$

Implementation Details
For our robust optimization experiments we used the DeBERTaV2 based NLI model, and limited maximum tokenization length at 1024 tokens across all benchmarks. For DAPT we extracted the DeBERTaV2 backbone and trained on the target domain for 1 full epoch, using 10% masking probability. At the fine-tuning stage of both methods we ran 1 full epoch on the MNLI dataset.
At the masked pretraining and fine-tuning stages of the experiments, we used the AdamW optimizer with learning rate $10^{-5}$ and weight decay $10^{-3}$, enabling 100 warmup steps over the supervised fine-tuning. For SiFT and CORAL we set the coefficient of the respective regualarization terms to 0.5, after running hyperparameter optimization with a coarse grid search. Batch size used for covariance estimation in CORAL was set at 64. Each experiment was repeated over 3 random trials.

## Appendix D Additional Results

### D.1 Additional Metrics

We chose the Area under Curve for Receiver-Operator-Characteristic (AUC-ROC) as our main metric, as it is less dependent on threshold calibration and also works for imbalanced datasets. We report our results in other metrics such as balanced accuracy without threshold calibration (using 0.5. as a threshold as suggested in Tang et al. ()) in Table 7 and F1-Scores in Table 8. The results highlight not only that our main results are valid across different metrics – in uncalibrated balanced accuracy, our models trained with Auto-GDA data even outperform LLMs by an average 3.4 accuracy percent points.

**Table 7: Performance comparison to baselines (uncalibrated balanced accuracy). In this metrics, our models even outperform LLM baselines.**
|  | Dataset | RAGTruth | LFQA-Verif. | SummEdits | Avg. |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
|  | RAG-Task | Summary | QA | QA | Summary |  |  |  |  |  |  |
| base models | FLAN-T5 | 0.666 |  | 0.636 |  | 0.618 |  | 0.646 |  | 0.641 |  |
| DeVERTaV2 | 0.727 |  | 0.505 |  | 0.588 |  | 0.810 |  | 0.658 |  |  |
| BART-large | 0.604 |  | 0.633 |  | 0.782 |  | 0.625 |  | 0.661 |  |  |
| robustness | $\text{DAPT}_{\text{DeBERTaV2}}$ | 0.677 | $\pm$ 0.004 | 0.654 | $\pm$ 0.003 | 0.748 | $\pm$ 0.076 | 0.792 | $\pm$ 0.005 | 0.718 | $\pm$ 0.022 |
| $\text{SiFT}_{\text{DeBERTaV2}}$ | 0.716 | $\pm$ 0.009 | 0.562 | $\pm$ 0.006 | 0.810 | $\pm$ 0.035 | 0.806 | $\pm$ 0.015 | 0.724 | $\pm$ 0.016 |  |
|  | $\text{CORAL}_{\text{DeBERTaV2}}$ | 0.657 | $\pm$ 0.001 | 0.637 | $\pm$ 0.002 | 0.815 | $\pm$ 0.001 | 0.792 | $\pm$ 0.001 | 0.725 | $\pm$ 0.001 |
| complex | MiniCheck-T5 | 0.675 |  | 0.600 |  | 0.564 |  | 0.679 |  | 0.630 |  |
| AlignScore | 0.572 |  | 0.650 |  | 0.594 |  | 0.770 |  | 0.646 |  |  |
| Vectara-2.1 | 0.662 |  | 0.744 |  | 0.618 |  | 0.581 |  | 0.651 |  |  |
| Auto-GDA | Flan-T5 (Auto-GDA) | 0.650 | $\pm$ 0.005 | 0.703 | $\pm$ 0.019 | 0.669 | $\pm$ 0.016 | 0.761 | $\pm$ 0.020 | 0.696 |  |
| BART (Auto-GDA) | 0.710 | $\pm$ 0.028 | 0.794 | $\pm$ 0.011 | 0.772 | $\pm$ 0.023 | 0.798 | $\pm$ 0.014 | 0.769 |  |  |
| DeBERTaV2 (Auto-GDA) | 0.737 | $\pm$ 0.009 | 0.784 | $\pm$ 0.011 | 0.776 | $\pm$ 0.012 | 0.817 | $\pm$ 0.009 | 0.778 |  |  |
| LLMs | GPT-4o | 0.691 |  | 0.764 |  | 0.688 |  | 0.835 |  | 0.744 |  |
| GPT-4o-mini | 0.666 |  | 0.684 |  | 0.625 |  | 0.832 |  | 0.702 |  |  |
| GPT-3.5 | 0.593 |  | 0.586 |  | 0.611 |  | 0.723 |  | 0.629 |  |  |

**Table 8: Performance comparison to baselines (Binary F1-Scores).**
|  | Dataset | RAGTruth | LFQA-Verif. | SummEdits | Avg. |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
|  | RAG-Task | Summary | QA | QA | Summary |  |  |  |  |  |  |
| base models | FLAN-T5 | 0.890 |  | 0.900 |  | 0.705 |  | 0.550 |  | 0.761 |  |
| DeVERTaV2 | 0.897 |  | 0.899 |  | 0.705 |  | 0.748 |  | 0.812 |  |  |
| BART-large | 0.893 |  | 0.900 |  | 0.846 |  | 0.641 |  | 0.820 |  |  |
| robustness | $\text{DAPT}_{\text{DeBERTaV2}}$ | 0.655 | $\pm$ 0.001 | 0.489 | $\pm$ 0.016 | 0.748 | $\pm$ 0.076 | 0.762 | $\pm$ 0.004 | 0.664 | $\pm$ 0.027 |
| $\text{SiFT}_{\text{DeBERTaV2}}$ | 0.704 | $\pm$ 0.019 | 0.362 | $\pm$ 0.055 | 0.810 | $\pm$ 0.036 | 0.762 | $\pm$ 0.007 | 0.660 | $\pm$ 0.029 |  |
|  | $\text{CORAL}_{\text{DeBERTaV2}}$ | 0.556 | $\pm$ 0.001 | 0.487 | $\pm$ 0.022 | 0.815 | $\pm$ 0.001 | 0.752 | $\pm$ 0.001 | 0.653 | $\pm$ 0.006 |
| complex | MiniCheck-T5 | 0.897 |  | 0.901 |  | 0.743 |  | 0.682 |  | 0.806 |  |
| AlignScore | 0.888 |  | 0.903 |  | 0.847 |  | 0.744 |  | 0.846 |  |  |
| Vectara-2.1 | 0.910 |  | 0.921 |  | 0.702 |  | 0.498 |  | 0.758 |  |  |
| Auto-GDA | Flan-T5 (Auto-GDA) | 0.901 | $\pm$ 0.001 | 0.905 | $\pm$ 0.002 | 0.699 | $\pm$ 0.006 | 0.693 | $\pm$ 0.015 | 0.800 |  |
| BART (Auto-GDA) | 0.910 | $\pm$ 0.003 | 0.923 | $\pm$ 0.005 | 0.857 | $\pm$ 0.017 | 0.725 | $\pm$ 0.010 | 0.854 |  |  |
| DeBERTaV2 (Auto-GDA) | 0.912 | $\pm$ 0.002 | 0.930 | $\pm$ 0.004 | 0.854 | $\pm$ 0.014 | 0.750 | $\pm$ 0.007 | 0.861 |  |  |
| LLMs | GPT-4o | 0.929 |  | 0.914 |  | 0.848 |  | 0.782 |  | 0.869 |  |
| GPT-4o-mini | 0.918 |  | 0.909 |  | 0.767 |  | 0.764 |  | 0.840 |  |  |
| GPT-3.5 | 0.887 |  | 0.899 |  | 0.746 |  | 0.687 |  | 0.805 |  |  |

### D.2 Additional Qualitative Results

Estimating the mislabeling probability.
An integral part of our algorithm in the estimation of the agreement probability in Equation 44. To investigate the effect of implementing this choice, we run an ablation study to better understand how the quality of the agreement probabilities affects the score. We provide results average over 3 runs in Figure 7(a). The results indicate that the choice of the model used to estimate $r$ the label certainty score has substantial effect on the quality of the results. While the utility (in terms of ROC scores) drops when noise is added, it increases again when high levels of noise are applied. We attribute this behavior to the algorithm neglecting the mutated samples almost entirely when the noise level is too high and mainly selecting the few shot generate samples. As shown in Table 2
these have fair utility already.

Using one vs. several augmentation routines. A key design goal of our algorithm was the ability to automatically select the most promising augmented samples. We investigate the effect of using only single or several augmentations in Figure 6(a). The results highlight that the Partial Rephrasing augmentation with LLMs as well as the sentence deletion augmentation seems to be most successful. The Complete Paraphrasing augmentation leads to substantially lower data quality on its own. However, the best utility is achieved when all three augmentations are combined. We study the origin of the samples eventually selected by our algorithm and find that the usefulness of the augmentations on their own is reflected by the share samples selected from each of the augmentations as depicted in Figure 6(b). Together, this highlights that Auto-GDA succeeds in selecting the most promising samples generated from the augmentations automatically.

Figure: (a) Testing the effect of using one vs. several augmentations. On average the best results are obtained when combining several augmentations.
Refer to caption: x2.png

### D.3 Different teacher models

**Table 9: Using different teacher models in Auto-GDA to fine-tune DeBERTaV2. In the upper part we add best results from Table 1 for comparison. In the center part, we highlight that using GPT-4o as a teacher model to assign intial probabilities does not yield substantial improvement. However the lower part shows that it is possible to do self-improvement using only DeBERTa as teacher model for both initial scores and augmentation scoring.**
| Dataset | RAGTruth | LFQA-Verif. | SummEdits | Average |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| RAG-Task | Summary | QA | QA | Summary |  |  |  |  |  |
| Teacher Model Used | Vectara-2.1 | Vectara-2.1 | AlignScore | AlignScore |  |  |  |  |  |
| Teacher Performance | 0.805 |  | 0.854 |  | 0.904 |  | 0.894 |  | 0.864 |
| DeBERTaV2 (Auto-GDA) | 0.837 | $\pm$ 0.007 | 0.867 | $\pm$ 0.007 | 0.925 | $\pm$ 0.009 | 0.883 | $\pm$ 0.005 | 0.878 |
| Teacher Model Used | GPT-4o | GPT-4o | GPT-4o | GPT-4o |  |  |  |  |  |
| GPT-4o Performance | 0.892 |  | 0.865 |  | 0.896 |  | 0.880 |  | 0.883 |
| DeBERTaV2 (Auto-GDA) | 0.808 | $\pm$ 0.017 | 0.855 | $\pm$ 0.003 | 0.910 | $\pm$ 0.019 | 0.887 | $\pm$ 0.004 | 0.865 |
| Techer Model Used | DeBERTaV2 | DeBERTaV2 | DeBERTaV2 | DeBERTaV2 |  |  |  |  |  |
| DeBERTaV2 Performance | 0.782 |  | 0.530 |  | 0.645 |  | 0.876 |  | 0.708 |
| DeBERTaV2 (Auto-GDA) | 0.830 | $\pm$ 0.009 | 0.807 | $\pm$ 0.010 | 0.923 | $\pm$ 0.012 | 0.890 | $\pm$ 0.007 | 0.863 |

We investigate the application of different teacher models in Table 9. Our results indicate the learning from GPT models works in general, but does not results in better performance that using the best non-LLM teacher. We additionall study self-improvement, using DeBERTa as both a teacher model for initial scoring and augmentation scoring. This shows that improvements thought self-supervision are possible.

Figure: (a) Effect of computing $r$ using different models and noise levels inserted in the scores. While noisy, the results point to different trends for the teacher models: For the best teacher model, noise hurts performance, whereas for the other ones, it does not hurt or might even boost performance as more few-shot samples are selected.
Refer to caption: x3.png

### D.4 Simple Baselines

We compare our results to model trained on pseudo-labels in for the original datasets in Table 10. The results inicate that this is a surprisingly strong baseline, which is however surpassed by Auto-GDA in 3 out of 4 cases.

Results when the models are fine-tuned on the validations set directly are shown in Table 12.

**Table 10: Comparing our approach to the naive baseline of pseudo-labeling the training data and fine-tuning the DeBERTa V2 model on the pseudo-labeled data.**
| Dataset | RAGTruth | LFQA-Verification | SummEdits |  |
| --- | --- | --- | --- | --- |
| RAG-Task | Summary | QA | QA | Summary |
| AlignScore | 0.737 | 0.836 | 0.870 | 0.874 |
| Vectara-2.1 | 0.814 | 0.879 | 0.879 | 0.805 |
| GPT-4o | 0.828 | 0.866 | 0.876 | 0.878 |
| Our Data | 0.837 $\pm$ 0.007 | 0.867 $\pm$ 0.007 | 0.925 $\pm$ 0.009 | 0.883 $\pm$ 0.005 |

**Table 11: Direct comparision of improvements**
| Dataset | RAGTruth | LFQA-Verif. | SummEdits | Average |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| RAG-Task | Summary | QA | QA | Summary |  |  |  |  |  |
| FLAN-T5 | 0.734 |  | 0.708 |  | 0.655 |  | 0.700 |  | 0.699 |
| Flan-T5 (Auto-GDA) | 0.756 | $\pm$ 0.004 | 0.783 | $\pm$ 0.013 | 0.687 | $\pm$ 0.002 | 0.824 | $\pm$ 0.010 | 0.762 (+0.063) |
| BART-large | 0.696 |  | 0.670 |  | 0.821 |  | 0.769 |  | 0.739 |
| BART (Auto-GDA) | 0.813 | $\pm$ 0.009 | 0.867 | $\pm$ 0.011 | 0.867 | $\pm$ 0.026 | 0.860 | $\pm$ 0.010 | 0.852 (+0.113) |
| DeBERTaV2 | 0.782 |  | 0.530 |  | 0.645 |  | 0.876 |  | 0.708 |
| DeBERTaV2 (Auto-GDA) | 0.837 | $\pm$ 0.007 | 0.867 | $\pm$ 0.007 | 0.925 | $\pm$ 0.009 | 0.883 | $\pm$ 0.005 | 0.878 (+0.170) |

**Table 12: fine-tuning on validation set.**
| Dataset | RAGTruth | LFQA-Verif. | SummEdits | Mean (Gap closed) |  |
| --- | --- | --- | --- | --- | --- |
| RAG-Task | Summary | QA | QA | Summary |  |
| Non-Fintuned | 0.782 | 0.530 | 0.645 | 0.876 | 0.708 |
| Few-Shot Data | 0.799 | 0.826 | 0.934 | 0.872 | 0.858 |
| FT on validation | 0.784 | 0.750 | 0.899 | 0.890 | 0.833 |
| DeBERTaV2 (Auto-GDA, best teacher) | 0.837 | 0.867 | 0.925 | 0.890 | 0.878 |

### D.5 Effect of Dataset Size

When choosing the dataset size we used the data size slightly larger that that of the original dataset as an orientation. We experiment with different dataset sizes and learning rates as shown in Figure 8 When keeping training fixed to one epoch, we find that with higher learning rates, smaller dataset sizes lead to higher performance, and with lower learning rate, more data is required which seems natural. Globally, we observe that a learning rate of $10^{-5}$ is near optimal, but the performance is rather insensitive This is based on a prior observation that significant oversampling of the dataset size had seemingly little effect.

Figure: Figure 8: Testing different synthetic dataset sizes and learning rates for fine-tuning. While the original dataset size is at about 3 claim examples per evidence (dashed line) we test a wide range of dataset sizes ranging from 1/50 examples per evidence (100x smaller than original) to larger datasets with 30 claims per evidence, (10x larger than original). While larger We observe relatively stable optimum from about a 1/3 of original size to twice the original size using learning rates around $10^{-5}$.
Refer to caption: extracted/5901998/figures/datasize_ablation.png

### D.6 Effect of Source Data on UDA effectivenss

Table 13 compares the performance (ROC-AUC scores) of various Unsupervised Domain Adaptation (UDA) methods and synthetic data approaches across different source datasets. All results are evaluated on the RAGTRUTH target dataset, using a DeBERTaV3 model trained on the PAWS, VitaminC, and Fever data.
The table illustrates the effectiveness of different UDA methods and synthetic data approaches when applied to various source datasets (MNLI, Summedits, and Ragtruth-synth). More specifically, we see that except for the synthetically generated version of RAGTruth, the choice of the source domain data does not seem to alter results significantly. We also see that vanilla finetuning on the synthetic RAGTruth data outperforms all other variations, indicating that synthetic data is more appropraite for NLI than traditional UDA methods. This is perhaps due to the fact that very small changes in the generated claim can flip the label from entailed to non-entailed and vice-versa.

**Table 13: ROC-AUC scores for different UDA methods and synthetic data approaches.**
| Method | Fever+PAWS+VitaminC | Summedits | Synthetic RAGTRUTH |
| --- | --- | --- | --- |
| No fine-tuning | 0.735 | 0.735 | 0.735 |
| Vanilla fine-tuning | 0.735 | 0.737 | 0.844 |
| CORAL | 0.682 | 0.683 | 0.728 |
| SMART | 0.743 | 0.721 | 0.833 |
| MLM | 0.680 | 0.577 | 0.731 |
| Domain Discriminator | 0.603 | 0.712 | 0.746 |

### D.7 Effect of Regularization Constants on UDA Methods and on Fine-tuning Performance

This appendix presents a comparative analysis of THE UDA methods and their impact on the fine-tuning performance of our model. Figure 9 shows the ROC-AUC scores for different UDA methods as we increase the percentage of target domain data used for fine-tuning.
We see two things: i) No configuration of the UDA methods improves the model’s performance significantly, and ii) the robustly trained models also do not benefit from faster finetuning with fewer samples, as their performance when further finetuned with target-data samples is similar to the original model after finetuned on the same splits. In short, we believe that traditional UDA methods do not show promise for the NLI task.

Figure: (a) Masked Language Modeling (MLM)
Refer to caption: x5.png

## Appendix E Prompts

### E.1 Initial Generation Prompts

We use two prompts to generate intitial samples that differ according to the respective target labels. In practice we use a maximum of $4$ few shot samples, or the number of samples available in the train dataset for a given evidence ${\bm{e}}$.

Positive (entailed) prompt:

Human: You are given the following document wrapped in <document> </document> tags:
<document>DOCUMENT</document>
Your task is to generate summaries from a document. Here are some examples of how the summaries could look like:
Note however that some of the samples contain incorrect information that is not part of the document!
Here are the examples:
<example 0>EXAMPLE0</example 0>
<example 1>EXAMPLE1</example 1>
Now your task is to generate N summaries from the document. However, unlike some of the examples
given above, the summaries must be entirely supported by the document. Only include information that is
directly inferrable from the document. It is also important that the summaries reflect the style, length and wording of examples.
If there are common patterns or sentence structures in the examples summaries, the created summaries should reflect those. Each summary is identified with an integer from 0 to N-1.
The summaries must be wrapped in <summary #></summary #> tags, where # is replaced with the summary id. Assistant:

To generate non-entailed samples, the following modified prompt is used:

Human: You are given the following document wrapped in <document> </document> tags:
<document>EVIDENCE DOCUMENT</document>
Your task is to generate summaries from a document. Here are some examples of how the summaries could look like:
Note however that some of the samples contain incorrect information that is not part of the document!
Here are the examples:
<example 0>CLAIM EXAMPLE0</example 0>
<example 1>CLAIM EXAMPLE1</example 1>
Your task is to generate N summaries from the document. However, now all of the summaries must contain at least one piece of non-factual information. This
can be some information that is not present in the document or some information that is contradictory to the information in the document, but intuitively appears to make sense.
Otherwise they reflect the style, length and wording of examples. If there are common patterns or sentence structures in the examples summaries, the created summaries should reflect those.
Modify different pieces of information at different places in the document.
Each summary is identified with an integer from 0 to N-1.
The summaries must be wrapped in <summary #></summary #> tags, where # is replaced with the summary id. Assistant:

### E.2 Entailment Prediction Prompt

We use the following prompt to compute entailments with the LLMs. It stems from Tang et al. (), however instead of answering Yes/No the LLM is prompted to anser with “0”/“1”, which has the advantage that the token probabilities can be used to compute an uncertainty score.
Determine whether the provided claim is consistent with the corresponding document.  Consistency in this context implies that all information presented in the claim is substantiated by the document. If not, it should be considered inconsistent.
Document: EVIDENCE DOCUMENT
Claim: CLAIM
Please assess the claim’s consistency with the document by responding with either "1" (consistent) or "0" (inconsistent). Do not output anything else.
Answer:

### E.3 LLM Partial Rephrasing Prompt

We use the following prompt to instruct the LLM to only rephrase specific parts of a sentence that are masked out with “_”.
Your task is to fill in the gaps in a document indicated with “_” with additional details.
If there is no gaps, please output the input text. The number of “_” indicates the approximate number of words
that should be filled into each gap. While slight deviations (e.g., one word more or less) are permissible,
the filled in text should respect the length indicated through the number of "_". **Do not change the text outside the gaps and do not include gaps in the final output.**
You will generate N different completions of the document. Each completed document is identified with an integer from 0 to N-1.
The document with the blanks filled must be wrapped in <answer #></answer #> tags, where # is replaced with the id of the filled-in document. You will now see the original document, but you will have to generate different versions that preserve the meaning by filling the gaps.
Here is the original:
<document>EVIDENCE DOCUMENT</document>
The document including the gaps is:
<document>DOCUMENT WITH WORDS MASKED</document>
Assistant:

## Peer Reviews

confidence: 2
contribution: 3
initial_rating: 8
presentation: 3
questions: See the weaknesses
soundness: 3
strengths: - The proposed method is novel and practical in RAG scenarios.
- This manuscript is clearly written and easy to follow.
- The experimental results are well conducted, showing advantages in terms of accuracy and efficiency.
summary: This paper introduces a novel framework to enhance the performance of NLI models in verifying retrieved evidence within retrieval-augmented generation settings. The paper addresses the issue of performance drop in out-of-domain inputs. To alleviate this problem, the authors propose an automatic generative domain adaptation method to fine-tune NLI models in an unsupervised manner. In the proposed method, this framework considers both diversity and quality by using a sequential augmentation technique and optimizing a distribution-matching objective in the data generation process. Experimental results demonstrate that the NLI model fine-tuned with the proposed method achieves performance closer to that of LLM models without sacrificing efficiency.
weaknesses: - The paper would benefit from a more detailed analysis to clearly demonstrate the robustness of the proposed method across various domains. In real-world scenarios, domain boundaries are often ambiguous, and it’s common to encounter mixed or overlapping domain data. By evaluating the model in a multi-domain or domain-mixing setting, the authors could provide stronger evidence of its robustness and practical applicability in complex, realistic cases.

- It would be valuable to include an analysis of how the model performance depends on the quality of the initial synthetic data generation. If initial data is inaccurately generated, it might negatively influence the model’s performance. An examination of whether the model can correct or adapt to potential errors in this initial phase would clarify the method’s resilience to suboptimal synthetic data.

- The paper’s selective objective function appears complex, suggesting that the model could be highly sensitive to hyperparameter choices. Observing large variations in hyperparameter values for each dataset implies that tuning these parameters may be challenging. Providing further insights into the model’s hyperparameter sensitivity and offering guidelines for tuning could improve the approach's usability and reliability in diverse settings.

---

confidence: 3
contribution: 3
initial_rating: 6
presentation: 3
questions: Refer to weaknesses.
soundness: 3
strengths: - The proposed Automatic Generative Domain Adaptation (Auto-GDA) offers a novel approach to unsupervised domain adaptation, effectively generating high-quality synthetic data to fine-tune NLI models tailored for specific RAG contexts.
- Empirical results demonstrate that models fine-tuned with Auto-GDA significantly outperform weak teacher models and achieve performance levels comparable to those using human-labeled data, indicating its effectiveness in improving NLI model accuracy.
- The paper is well written and easy to understand.
summary: This paper tackles the issue of hallucinations in Large Language Models (LLMs) used in retrieval augmented generation (RAG) applications, where verification of generated outputs through natural language inference (NLI) models is essential. The authors propose Automatic Generative Domain Adaptation (Auto-GDA), an unsupervised framework that generates high-quality synthetic data to fine-tune lightweight NLI models for specific RAG domains. Key contributions include formalizing the unsupervised domain adaptation problem, developing the Auto-GDA framework for efficient sample selection, and demonstrating that models fine-tuned with Auto-GDA outperform weak teacher models and approach the performance of human-labeled references, all while achieving significantly lower latency than LLMs. This work presents a promising solution to enhance NLI model performance in real-time RAG applications.
weaknesses: - The effectiveness of the Auto-GDA framework relies heavily on the quality of the synthetic data generated. Poorly generated data could lead to suboptimal fine-tuning and negatively impact NLI model performance.
- Although the framework aims to address domain mismatches, (in my own opinion) there may still be challenges in generalizing to highly diverse or previously unseen domains, potentially reducing the model's effectiveness in broader applications. I'm curious how well the proposed method performs under such extreme conditions?

---

confidence: 4
contribution: 2
initial_rating: 3
presentation: 3
questions: 1. What is the time of running each step in Auto-GDA (steps 1-2-3 and NLI model training), for different datasets (with their sizes)?
2. One of the arguments for the necessity of domain adaptation in the introduction is that “inputs may follow a specific format due to the RAG prompt template” (line 79). Why not pass evidence and claims to NLI models without this template, if it reduces domain shift and hence improves performance?
3. What criteria is used to select optimal hyperparameters using optuna? Is it performance on some dataset (which one)?
4. How do you tune hyperparameters of unsupervised domain adaptation baselines?
5. Are there particular reasons why Vectara-2.1 outperforms AlignScore on RAGTruth and vice versa on other datasets? E.g. due to some specific training data or algorithm specifics.
6. Do you plan to release open-source code for the proposed approach?
[Update during discussion: all questions answered]


Comments
* Due to the high amount of notations, it may be hard to follow the method sometimes, e.g. trying to remember what a particular notation means. 
* Line 43: “even when the most capable LLMs are used with RAG, hallucination rates of 20 – 30% persist (Santhanam et al., 2021).”  too old reference
* Figure 1: “RAG task performance (ROC-AUC).” Unclear x label: it seems that it is RAG performance (unclear how measured with ROC-AUC), but it is NLI performance for RAG as far as I understand
* Line 233: “we also generate realistic initial samples using LLMs”. Use a more specific term than “samples”
* Line 384: “Optimizing the objective for a subset Q”. What does Q refer to here?
* Line 429: better define “complex” category
soundness: 3
strengths: * A relevant research direction of adapting RAG components to user domains
* Comprehensive related work section
* Detailed description of the proposed approach, used datasets, baselines, and experimental details
* The proposed method is compared to a series of existing NLI solutions on several datasets, and inference time is also compared for various methods
summary: The paper considers the problem of domain adaptation of the natural language inference models (NLI) which are often used in retrieval-augmented generation (RAG) to judge the entailment of the generated response from the retrieved context. The paper proposes Auto-GDA, a method for generating synthetic data for a given domain, that can be used for finetuning an NLI model to improve its performance in this domain. The proposed method is iterative and consists of three steps: (1) seed data generation using an LLM; (2) data augmentation e.g. using paraphrasing or sentence deletion; and (3) data filtering, to minimize their proposed enhanced distribution matching objective; steps 2 and 3 can be repeated iteratively. The method is tested on several datasets that provide human labels for NLI, and compared versus existing off-the-shelf systems and several ablations.
weaknesses: 1. The presented Auto-GDA method is rather complex (involving multiple steps and components, including heuristic augmentation techniques) and has several important hyperparameters, such as $\lambda_d$ and $\lambda_u$ in eq. (2), population sizes M and K, or the number of iterations. Hyperparameter tuning requires running the proposed approach 50 times (line 446), including training of the NLI model on the generated data (from my understanding). At the same time, improvements over simply using LLM-generated data are quite modest (row 4 vs 2 in Table 2). 
    - Furthermore, the high cost of running hyperparameter optimization, augmentation, and data selection in the proposed approach, motivates the substantial increase of data points in the simple baseline of using LLM-generated data, to make their computational costs similar. This would make the baseline stronger and reduce its difference versus the proposed approach even further. [Update during discussion: addressed in the authors' response]
    - Performance gains versus out-of-the-box NLI models are also rather small, e.g. comparing the best performing (domain-adapted) Auto-GDA versus the best performing “complex” method out-of-the-box (83.7 vs 80.5, 86.7 vs 85.4, 92.5 vs 90.4, 88.3 < 89.4), or Auto-GDA (Flan-T5) vs MiniCheck-T5 (75.6 \approx 75.4, 68.7 < 74.1, 82.4 vs 79.1; only one high improvement 78.3 vs 64.0). 
2. I would expect more ablations of the proposed approach, e.g. testing the removal of each of the terms in eq. (2), or on the contrary using only one of these terms for filtering. [Update during discussion: the ablation was provided, showing that the proposed enhanced distribution matching objective seems to be mostly reducible to a single term]
3. The motivation for the proposed approach is to improve RAG pipelines in domain-specific scenarios, however no experiments with domain-specific RAG are presented to demonstrate these improvements. For example, domain-specific RAG scenarios considered in [1] could act as potential testbeds, e.g. RobustQA [2]. [Update during discussion: addressed in the authors' response]

[1] Dongyu Ru et al. RAGChecker: A Fine-grained Framework for Diagnosing Retrieval-Augmented Generation. NeurIPS 2024

[2] Rujun Han et al.  RobustQA: Benchmarking the Robustness of Domain Adaptation for Open-Domain Question Answering. Findings of ACL 2023

Meta-review: This submission aims to address the hallucination problem in RAG systems by enhancing a lightweight NLI model to verify whether the generated outputs are grounded in the retrieved documents. The authors provided a comprehensive rebuttal, effectively addressing most of the reviewers' concerns. Consequently, all reviewers are in agreement on the acceptance of this paper.

However, two major concerns remain after rebuttal:

- Limited technical contribution: The work essentially benefits from the usage of data augmentation, which is a well-known technique for improving domain transfer performance. Also related to this, one reviewer noted that the proposed objective can largely be reduced to a single term; and the approach involves tuning several hyperparameters. This limits the technical novelty of the contribution.

- Generaliability across domains: Since the proposed approach optimizes the NLI model for a specific data distribution, its generalizability to highly diverse or previously unseen domains may be limited. This constraint could impact its effectiveness in broader applications.

Considering the overall contributions and the addressed concerns, we recommend accepting this submission as a poster presentation.

Decision: Accept (Poster)