Add Batch 0e0703c5-06c5-43cc-aa92-61f4147f35ff
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- comicscene154ascenedatasetforcomicanalysis/08e0bf10-aca9-486c-a9e3-50ee4164e931_content_list.json +3 -0
- comicscene154ascenedatasetforcomicanalysis/08e0bf10-aca9-486c-a9e3-50ee4164e931_model.json +3 -0
- comicscene154ascenedatasetforcomicanalysis/08e0bf10-aca9-486c-a9e3-50ee4164e931_origin.pdf +3 -0
- comicscene154ascenedatasetforcomicanalysis/full.md +200 -0
- comicscene154ascenedatasetforcomicanalysis/images.zip +3 -0
- comicscene154ascenedatasetforcomicanalysis/layout.json +3 -0
- comparinghumanandllmpolitenessstrategiesinfreeproduction/1235cebc-b03f-4d1f-81f2-e5c85dd58b15_content_list.json +3 -0
- comparinghumanandllmpolitenessstrategiesinfreeproduction/1235cebc-b03f-4d1f-81f2-e5c85dd58b15_model.json +3 -0
- comparinghumanandllmpolitenessstrategiesinfreeproduction/1235cebc-b03f-4d1f-81f2-e5c85dd58b15_origin.pdf +3 -0
- comparinghumanandllmpolitenessstrategiesinfreeproduction/full.md +0 -0
- comparinghumanandllmpolitenessstrategiesinfreeproduction/images.zip +3 -0
- comparinghumanandllmpolitenessstrategiesinfreeproduction/layout.json +3 -0
- comparingspecialisedsmallandgenerallargelanguagemodelsontextclassification100labelledsamplestoachievebreakevenperformance/0151714c-f3e8-4b75-8cfa-36f4bca260b6_content_list.json +3 -0
- comparingspecialisedsmallandgenerallargelanguagemodelsontextclassification100labelledsamplestoachievebreakevenperformance/0151714c-f3e8-4b75-8cfa-36f4bca260b6_model.json +3 -0
- comparingspecialisedsmallandgenerallargelanguagemodelsontextclassification100labelledsamplestoachievebreakevenperformance/0151714c-f3e8-4b75-8cfa-36f4bca260b6_origin.pdf +3 -0
- comparingspecialisedsmallandgenerallargelanguagemodelsontextclassification100labelledsamplestoachievebreakevenperformance/full.md +382 -0
- comparingspecialisedsmallandgenerallargelanguagemodelsontextclassification100labelledsamplestoachievebreakevenperformance/images.zip +3 -0
- comparingspecialisedsmallandgenerallargelanguagemodelsontextclassification100labelledsamplestoachievebreakevenperformance/layout.json +3 -0
- compassverifieraunifiedandrobustverifierforllmsevaluationandoutcomereward/f10feb44-362d-4529-b375-4316927e36f0_content_list.json +3 -0
- compassverifieraunifiedandrobustverifierforllmsevaluationandoutcomereward/f10feb44-362d-4529-b375-4316927e36f0_model.json +3 -0
- compassverifieraunifiedandrobustverifierforllmsevaluationandoutcomereward/f10feb44-362d-4529-b375-4316927e36f0_origin.pdf +3 -0
- compassverifieraunifiedandrobustverifierforllmsevaluationandoutcomereward/full.md +0 -0
- compassverifieraunifiedandrobustverifierforllmsevaluationandoutcomereward/images.zip +3 -0
- compassverifieraunifiedandrobustverifierforllmsevaluationandoutcomereward/layout.json +3 -0
- compkbqacomponentwisetaskdecompositionforknowledgebasequestionanswering/f4d01b31-ad40-4ef7-8ec0-475affa6057f_content_list.json +3 -0
- compkbqacomponentwisetaskdecompositionforknowledgebasequestionanswering/f4d01b31-ad40-4ef7-8ec0-475affa6057f_model.json +3 -0
- compkbqacomponentwisetaskdecompositionforknowledgebasequestionanswering/f4d01b31-ad40-4ef7-8ec0-475affa6057f_origin.pdf +3 -0
- compkbqacomponentwisetaskdecompositionforknowledgebasequestionanswering/full.md +511 -0
- compkbqacomponentwisetaskdecompositionforknowledgebasequestionanswering/images.zip +3 -0
- compkbqacomponentwisetaskdecompositionforknowledgebasequestionanswering/layout.json +3 -0
- complexnumericalreasoningwithnumericalsemanticpretrainingframework/9b778c8e-f145-434d-b810-48dabfa71f2f_content_list.json +3 -0
- complexnumericalreasoningwithnumericalsemanticpretrainingframework/9b778c8e-f145-434d-b810-48dabfa71f2f_model.json +3 -0
- complexnumericalreasoningwithnumericalsemanticpretrainingframework/9b778c8e-f145-434d-b810-48dabfa71f2f_origin.pdf +3 -0
- complexnumericalreasoningwithnumericalsemanticpretrainingframework/full.md +0 -0
- complexnumericalreasoningwithnumericalsemanticpretrainingframework/images.zip +3 -0
- complexnumericalreasoningwithnumericalsemanticpretrainingframework/layout.json +3 -0
- complextempqaa100mdatasetforcomplextemporalquestionanswering/df6a55bb-f6fb-443c-97ce-152599f33aa1_content_list.json +3 -0
- complextempqaa100mdatasetforcomplextemporalquestionanswering/df6a55bb-f6fb-443c-97ce-152599f33aa1_model.json +3 -0
- complextempqaa100mdatasetforcomplextemporalquestionanswering/df6a55bb-f6fb-443c-97ce-152599f33aa1_origin.pdf +3 -0
- complextempqaa100mdatasetforcomplextemporalquestionanswering/full.md +428 -0
- complextempqaa100mdatasetforcomplextemporalquestionanswering/images.zip +3 -0
- complextempqaa100mdatasetforcomplextemporalquestionanswering/layout.json +3 -0
- composablecrosspromptessayscoringbymergingmodels/425ab752-e177-4da8-bb87-f7bd669db7ff_content_list.json +3 -0
- composablecrosspromptessayscoringbymergingmodels/425ab752-e177-4da8-bb87-f7bd669db7ff_model.json +3 -0
- composablecrosspromptessayscoringbymergingmodels/425ab752-e177-4da8-bb87-f7bd669db7ff_origin.pdf +3 -0
- composablecrosspromptessayscoringbymergingmodels/full.md +502 -0
- composablecrosspromptessayscoringbymergingmodels/images.zip +3 -0
- composablecrosspromptessayscoringbymergingmodels/layout.json +3 -0
- compositionalgeneralisationforexplainablehatespeechdetection/99b878d1-0664-42e4-a2be-84f8baf2c71b_content_list.json +3 -0
- compositionalgeneralisationforexplainablehatespeechdetection/99b878d1-0664-42e4-a2be-84f8baf2c71b_model.json +3 -0
comicscene154ascenedatasetforcomicanalysis/08e0bf10-aca9-486c-a9e3-50ee4164e931_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e9fa42707bf54a12ce0a22501d317f5e446a014db5eed4acdf334535b8ff2b55
|
| 3 |
+
size 47655
|
comicscene154ascenedatasetforcomicanalysis/08e0bf10-aca9-486c-a9e3-50ee4164e931_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1537974ec75be29d220110dc8bd151fa9025a8492975a91fc6225a6d2a3c5114
|
| 3 |
+
size 57323
|
comicscene154ascenedatasetforcomicanalysis/08e0bf10-aca9-486c-a9e3-50ee4164e931_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:beadbbc9c1375dcc2e414f702154b2944e4c479a3bc69f84e0e40c3c4d53f9fe
|
| 3 |
+
size 5586175
|
comicscene154ascenedatasetforcomicanalysis/full.md
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ComicScene154: A Scene Dataset for Comic Analysis
|
| 2 |
+
|
| 3 |
+
Sandro Paval, Ivan P. Yamshchikov, Pascal Meiβner
|
| 4 |
+
|
| 5 |
+
CAIRO, THWS, Technical University of Applied Sciences Würzburg-Schweinfurt sandro.paval@study.thws.de, ivan.yamshchikov@thws.de, pascal.meissner@thws.de
|
| 6 |
+
|
| 7 |
+
# Abstract
|
| 8 |
+
|
| 9 |
+
Comics offer a compelling yet under-explored domain for computational narrative analysis, combining text and imagery in ways distinct from purely textual or audiovisual media. We introduce ComicScene154, a manually annotated dataset of scene-level narrative arcs derived from public-domain comic books spanning diverse genres. By conceptualizing comics as an abstraction for narrative-driven, multimodal data, we highlight their potential to inform broader research on multi-modal storytelling. To demonstrate the utility of ComicScene154, we present a scene segmentation baseline, providing an initial benchmark for future studies to build upon. Our results indicate that ComicScene154 constitutes a valuable resource for advancing computational methods in multimodal narrative understanding and expanding the scope of comic analysis within the Natural Language Processing community.
|
| 10 |
+
|
| 11 |
+
# 1 Introduction
|
| 12 |
+
|
| 13 |
+
Advancements in Computer Vision (CV) and Natural Language Processing (NLP) have enabled the analysis and processing of diverse media types in both standalone and multimodal settings (Bayoudh et al., 2022). However, one medium that remains underexplored is comics, which uniquely interweaves text and images into panels, creating a sequence of discontinuous frames. The narrative link between these frames is implicit, requiring a cognitive process called closure to bridge the gaps. This characteristic makes comics particularly intriguing not only as a distinct medium, but also as a compact abstraction for more continuous, multimodal data such as videos or movies (Rao et al., 2020; Cohn, 2013). By sampling frames from data streams and compiling them in a comic-like structure, one can preserve narrative structure while reducing the data's overall complexity.
|
| 14 |
+
|
| 15 |
+
Progress in computational comic analysis largely falls into four categories: object detection
|
| 16 |
+
|
| 17 |
+
tasks (Ogawa et al., 2018; Yanagisawa et al., 2018), multi-modal understanding (Li et al., 2024; Rigaud et al., 2024), image generation (Proven-Bessel et al., 2021; Yang et al., 2021; Wang et al., 2012) and dataset proposals (Iyyer et al., 2017; Dunst et al., 2017). In comparison, the problem of narrative understanding (Pratt, 2009) in comics remains relatively underdeveloped.
|
| 18 |
+
|
| 19 |
+
Comic analysis tasks, such as character re-identification (Sachdeva and Zisserman, 2024) and closure inference (Iyyer et al., 2017), would rely on narrative context but have to resort to operating at broad levels (e.g., entire comics) or strict physical divisions (e.g., single pages). While page-wise processing may be practical from a layout point-of-view, the internal narrative structure is more nuanced (Zehe et al., 2021; Cohn, 2010). Segmenting comics according to narrative arcs could better support tasks like story summarization (Huang et al., 2016) and entity tracking (Kim and Schuster, 2023) by ensuring that only relevant information is included. Conversely, using an entire comic might introduce superfluous content, whereas strict physical divisions risk omitting key story details.
|
| 20 |
+
|
| 21 |
+
This take on segmentation could also serve as a simplified approach to scene segmentation in video data (Rao et al., 2020), where select frames are extracted to create a comic-like structure conducive to smaller-scale analysis. Beyond computational problems, our take on segmentation could benefit tasks in digital humanities: identifying recurring storytelling patterns, comparing artistic styles, or performing linguistic analyses on segmented narrative arcs (Cohn, 2013; Zehe et al., 2021).
|
| 22 |
+
|
| 23 |
+
In this paper, we aim to advance all these fields by introducing the scene-annotated dataset for comics ComicScene154. We devised a prototypical approach to display the limitations and challenges associated with such a task. This dataset can facilitate new segmentation methods while providing a benchmark for existing approaches. Addition
|
| 24 |
+
|
| 25 |
+
<table><tr><td>Dataset</td><td>Tasks</td><td>Years</td><td>Style</td><td>Books</td><td>Pages</td></tr><tr><td>eBDtheque</td><td>d,t</td><td>1905-2012</td><td>mix</td><td>28</td><td>100</td></tr><tr><td>COMICS</td><td>c</td><td>1938-1954</td><td>comics</td><td>3948</td><td>198000</td></tr><tr><td>GCN</td><td>d,t</td><td>1978-2013</td><td>comics</td><td>253</td><td>38000</td></tr><tr><td>DCM772</td><td>d</td><td>1938-1954</td><td>comics</td><td>27</td><td>772</td></tr><tr><td>Manga109</td><td>d,t,r</td><td>1970-2010</td><td>manga</td><td>109</td><td>10000</td></tr><tr><td>BCBId</td><td>-</td><td>-</td><td>bangla</td><td>64</td><td>3000</td></tr><tr><td>PopManga</td><td>d,t,r</td><td>2010-2023</td><td>manga</td><td>25</td><td>1800</td></tr><tr><td>CoMix</td><td>d,t,r,N,D</td><td>1938-2023</td><td>mix</td><td>100</td><td>3800</td></tr><tr><td>Ours</td><td>d,S</td><td>1942-1962</td><td>comics</td><td>4</td><td>154</td></tr></table>
|
| 26 |
+
|
| 27 |
+
Table 1: Overview of comic datasets including ours, adapted from (Vivoli et al., 2024). Tasks: Classification (c), Detection (d), Text-Character Association (t), Character Re-Identification (r), Character Naming (N), Dialog (D), and Scene Segmentation (S).
|
| 28 |
+
|
| 29 |
+
ally, it offers a consistent resource for tasks such as story summarization and character identification on a more fine-grained, narrative-based scale. Section 3 will detail the dataset construction and the evaluation, while Section 4 will present an example to illustrate the inherent challenges of the task.
|
| 30 |
+
|
| 31 |
+
# 2 Related Work
|
| 32 |
+
|
| 33 |
+
# 2.1 Scenes in Comics and Beyond
|
| 34 |
+
|
| 35 |
+
We follow the definition of scenes from (Rao et al., 2020), and describe a scene as a plot-based semantic unit, in which an overarching task is pursued by a certain cast of characters. In most cases, these semantic units maintain temporal and spatial coherence. Additionally, we treat a scene analogous to narrative arcs as defined by (Cohn, 2013)
|
| 36 |
+
|
| 37 |
+
In movies, different shots—sequences of images captured from the same viewpoint—form the visual narrative. Similarly, comics consists of panels that depict imagery from diverse viewpoints. By selecting a representative image from each shot, along with its corresponding narrative data (e.g., spoken text or script), the resulting sequence can be compacted. By recreating a comic-like structure via representative frames, image data can be significantly reduced beyond comics.
|
| 38 |
+
|
| 39 |
+
# 2.2 Analogy to Semantic Text Segmentation
|
| 40 |
+
|
| 41 |
+
In NLP, semantic text segmentation involves breaking text down into semantically coherent segments or representations, often focusing on higher-level logical forms<sup>1</sup>. This task shares conceptual parallels with scene segmentation in comics: both seek
|
| 42 |
+
|
| 43 |
+
to identify coherent boundaries within a data stream - be it textual sentences or visual-narrative frames.
|
| 44 |
+
|
| 45 |
+
To evaluate segmentation quality, text-based approaches often rely on the $p_k$ metric, which quantifies the proportion of sentences (or segments) that are incorrectly "cut" or "joined" (Glavaš et al., 2016) via segmentation. We adopt a similar perspective for evaluating scene segmentation: just as $p_k$ measures segmentation consistency in text, we devise and adapt an analogous metric for assessing how effectively consecutive frames (or panels) are grouped into scenes within comics and movies.
|
| 46 |
+
|
| 47 |
+
# 2.3 Comic Datasets
|
| 48 |
+
|
| 49 |
+
Obtaining ethically sourced data for comics is non-trivial due to the commercial nature of the medium. The diverse datasets for manga—most notably Manga109 (Fujimoto et al., 2016) and PopManga(Sachdeva and Zisserman, 2024)—are not a suitable replacement, as mangas often differ considerably from classic Western comics in terms of storytelling conventions, structural layout, and linguistic features (Cohn, 2011). These differences highlight the need for building datasets tailored to distinct comic traditions, enabling more targeted research in both CV and multimodal NLP tasks.
|
| 50 |
+
|
| 51 |
+
Western datasets on the other hand consist almost exclusively of public domain comics, which restricts them to older sources. Notable datasets compiled in Table 1 include DCM772(Nguyen et al., 2018), focusing on object detection and association, or the combined manga and comic dataset CoMix(Sachdeva and Zisserman, 2024) which draws from already existing datasets for benchmarking purposes. In terms of cultural diversity, eBDtheque (Guérin et al., 2013), offers not only a mix of manga and American comics, but
|
| 52 |
+
|
| 53 |
+
<table><tr><td>Comic, Volume</td><td>Pages</td><td>Panels</td><td>Scenes</td><td>Genre</td></tr><tr><td>Alley Oop,1</td><td>35</td><td>191</td><td>37</td><td>Humor</td></tr><tr><td>Champ Comics,24</td><td>38</td><td>263</td><td>55</td><td>Heroes</td></tr><tr><td>Treasure Comics,6</td><td>41</td><td>221</td><td>41</td><td>Fantasy</td></tr><tr><td>Western Love,4</td><td>40</td><td>279</td><td>52</td><td>Love</td></tr></table>
|
| 54 |
+
|
| 55 |
+
Table 2: Details on of our ComicScene154 dataset.
|
| 56 |
+
|
| 57 |
+
also French bande dessinée, while BCBId(Dutta et al., 2022) offers Bangladeshi comics.
|
| 58 |
+
|
| 59 |
+
# 3 The ComicScene154 Dataset
|
| 60 |
+
|
| 61 |
+
# 3.1 Data Source
|
| 62 |
+
|
| 63 |
+
For the sake of reproducibility, only freely available public-domain data were used in this study. While large-scale datasets exist for Japanese manga, we opted not to include them here due to the format discrepancies discussed in Section 2.3. All data was collected from Comic Book Plus $^2$ , a repository offering a diverse range of public-domain comics. The comics used skew toward older storytelling and artistic styles, reflecting their origins in the "Golden Age" of comics, roughly 1940-1960.
|
| 64 |
+
|
| 65 |
+
# 3.2 Dataset
|
| 66 |
+
|
| 67 |
+
Our dataset, ComicScene154, comprises four public-domain comic magazines containing 34 distinct stories that span a total of 154 pages across various genres and publication years<sup>3</sup>. These magazines were selected to ensure diversity in storytelling, thus covering multiple narrative styles. Table 2 outlines the chosen comics and their associated metadata. Due to the focus on narrative, none of the existing datasets in Table 1 were used, as their data is not categorized by genre or consist of samples of comics. The latter is particularly important because being able to segment the dataset at the level of full stories is crucial, as scene construction relies on the broader comic narrative. Randomly sampled panels or pages are therefore not suitable for the task of scene segmentation, we address.
|
| 68 |
+
|
| 69 |
+
Before distributing the dataset to the annotators, all panels were extracted from comic pages along with their coordinates, and then numbered in reading order. Annotating suchlike ensures the consistency of the dataset, as any discrepancies in panel numbering (e.g., missing or extra panels) would corrupt the reading order. Additionally, each panel was tagged with a Boolean value indicating
|
| 70 |
+
|
| 71 |
+

|
| 72 |
+
|
| 73 |
+

|
| 74 |
+
Figure 1: Panels with 2 scenes visualized as intervals.
|
| 75 |
+
|
| 76 |
+
whether it marks the start of a new scene. An example for visualization can be seen at Figure 1, where the scene boundaries are marked blue.
|
| 77 |
+
|
| 78 |
+
# 3.3 Reliability
|
| 79 |
+
|
| 80 |
+
Given the inherently subjective nature of scene segmentation, evaluating the reliability of our annotations is critical. To this end, one-third of the dataset was independently labeled by three different groups of two annotators (Tester 1 & Tester 2), and their annotations were compared against our own. This triple annotation process not only ensures data consistency but also gauges whether different annotators share a conceptual understanding of scene boundaries. Annotators were tasked with marking each panel that signals the start of a new narrative arc. Following the definition in Section 2.1, they received a brief introduction to the task and a sample annotated example for guidance.
|
| 81 |
+
|
| 82 |
+
To quantify agreement, we employed the $p_k$ metric from the semantic text segmentation literature (Glavaš et al., 2016). This measure compares two segmentations by assessing the proportion of sliding windows that are inconsistently segmented. In our context, $p_k = 0$ indicates perfect alignment of scene boundaries, while $p_k = 1$ indicates total misalignment. The choice of window size $k$ is typically informed by half of the average length of segments. Lacking an external reference for segment length, we computed $k$ by averaging the scene lengths from our own annotations and those produced by the other annotators, yielding $k = 3$ .
|
| 83 |
+
|
| 84 |
+
With an average tester $p_k$ score of $0.17 = 0.15 + 0.19 / 2$ , there is some notable agreement in the interpretation of what a scene is yet as with other narrative related tasks there is certain noise associated with the subjectivity of a given assessor. This suggests that though the overall concepts align rea
|
| 85 |
+
|
| 86 |
+
<table><tr><td>Excerpts</td><td>Tester 1</td><td>Tester 2</td><td>In-between</td></tr><tr><td>Alley Oop (1)</td><td>0.07</td><td>0.00</td><td>0.07</td></tr><tr><td>Champs (1)</td><td>0.27</td><td>0.16</td><td>0.22</td></tr><tr><td>Champs (2)</td><td>0.21</td><td>0.07</td><td>0.28</td></tr><tr><td>Treasure C. (1)</td><td>0.06</td><td>0.19</td><td>0.14</td></tr><tr><td>Treasure C. (2)</td><td>0.17</td><td>0.33</td><td>0.26</td></tr><tr><td>Western L. (1)</td><td>0.12</td><td>0.37</td><td>0.29</td></tr><tr><td>Average</td><td>0.15</td><td>0.19</td><td>0.21</td></tr></table>
|
| 87 |
+
|
| 88 |
+
sonably well in Table 3, a major challenge in scene segmentation remains the lack of an intersubjective definition of a scene. The varying scores illustrate this issue—most notably in the excerpt extracted from Western Love, where Tester 2 exhibited the highest disagreement with a score of 0.37. When analyzing the annotation data, it became clear that Tester 2 segmented the comic into much shorter scenes. This behavior can be attributed to the inherent subjectivity of the interpretation of narratives.
|
| 89 |
+
|
| 90 |
+
# 4 Scene Segmentation Benchmark
|
| 91 |
+
|
| 92 |
+
For benchmarking the dataset, a two step scene segmentation pipeline was developed: First, utilizing a multi-modal model to predict scene boundaries and then refining the predictions using a reasoning-based large language model (LLM).
|
| 93 |
+
|
| 94 |
+
For both steps, Gemini's reasoning model, gemini-2.0-flash-thinking-exp, was used. In the initial iteration, each comic page, along with the coordinates of the panels and their reading order, was provided as context alongside a prompt. The model's task was to generate descriptions of narrative arcs and identify the panel where each arc begins, and hence scenes. While these outputs were useful, their quality remained limited.
|
| 95 |
+
|
| 96 |
+
Due to the non-deterministic nature of LLM, the performance was evaluated using the $p_k$ metric, based on ten iterations per comic. Table 4 presents the average scores in these ten iterations, compared to scenes we defined randomly. The results indicate that the performance of the multi-modal model is only marginally better than random definition, highlighting the current limitations. Additionally, the agreement between the ten iterations was analyzed, revealing high consistency. This suggests that while the model struggles to fully align with human-annotated scenes, it does capture some underlying patterns. It also highlights the present challenge of subjectiveness in scene segmentation.
|
| 97 |
+
|
| 98 |
+
Table 3: Agreement scores $(p_k)$ for 6 randomly chosen excerpts. Each excerpt was tested by 2 of 6 tester.
|
| 99 |
+
|
| 100 |
+
<table><tr><td>Comic</td><td>Dataset</td><td>Random</td><td>In-between</td></tr><tr><td>Alley Oop</td><td>0.43</td><td>0.47</td><td>0.10</td></tr><tr><td>Champs</td><td>0.40</td><td>0.43</td><td>0.09</td></tr><tr><td>Treasure Comics</td><td>0.43</td><td>0.46</td><td>0.05</td></tr><tr><td>Western Love</td><td>0.43</td><td>0.46</td><td>0.07</td></tr><tr><td>Average</td><td>0.42</td><td>0.46</td><td>0.06</td></tr></table>
|
| 101 |
+
|
| 102 |
+
To further refine the results, the initial model outputs were processed using a reasoning-based LLM. Since this refinement step depends on the output of the multi-modal model, each of the ten iterations was further benchmarked ten times, resulting in a total of 100 evaluations per comic. Table 5 compares the average score across all 100 iterations to the best average score from a single multi-modal output (based on ten iterations).
|
| 103 |
+
|
| 104 |
+
While the overall output still exhibits a relatively high $p_k$ score, and the improvement from averaging 100 iterations is marginal, the best-performing iterations for each comic show noticeable gains. Although these best results represent the most favorable outcomes, it is important to note that they still consist of ten independent iterations based on the same multi-modal model output. These large performance variations further illustrate the inherent challenges and subjectivity in scene segmentation.
|
| 105 |
+
|
| 106 |
+
Table 4: Agreement scores $(p_k)$ of multi-modal, random and in-between different multi-modal iterations
|
| 107 |
+
|
| 108 |
+
<table><tr><td>Comic</td><td>All Iter.</td><td>Best Iter.</td><td>In-between</td></tr><tr><td>Alley Oop</td><td>0.36</td><td>0.27</td><td>0.04</td></tr><tr><td>Champs</td><td>0.40</td><td>0.37</td><td>0.05</td></tr><tr><td>Treasure Comics</td><td>0.41</td><td>0.34</td><td>0.05</td></tr><tr><td>Western Love</td><td>0.39</td><td>0.36</td><td>0.04</td></tr><tr><td>Average</td><td>0.39</td><td>0.34</td><td>0.05</td></tr></table>
|
| 109 |
+
|
| 110 |
+
Table 5: Refined agreement scores $\left( {p}_{k}\right)$
|
| 111 |
+
|
| 112 |
+
# 5 Discussion
|
| 113 |
+
|
| 114 |
+
Comparing the results of both human (Table 3) and AI (Tables 4, 5) benchmarks reveals a significant difference. While the human benchmark showed notable improvement compared to randomly defined scenes, the multi-modal approach demonstrated almost no improvement. The refined method did improve results, but the largest performance gains were observed only in specific iterations rather than across all outputs. This highlights the present challenge of defining scenes, as even human annotators disagree. Nevertheless, while the refined performance relied on the multi-modal output, the annotations themselves showed low differences in between, demonstrating the model's ability to detect certain patterns—though not the
|
| 115 |
+
|
| 116 |
+
semantic units we aimed to capture, i.e., the scenes.
|
| 117 |
+
|
| 118 |
+
# 6 Conclusion
|
| 119 |
+
|
| 120 |
+
We introduce ComicScene154, a novel dataset designed to facilitate the study of scene segmentation in comics. By addressing the unique challenges (e.g. closure, narrative segmentation) of this medium, ComicScene154 provides a robust foundation for developing algorithms capable of understanding complex narrative structures like scenes (narrative arcs). Furthermore we propose the leveraging of comic analysis techniques on formats other than comics, like movies, to reduce the data scale and complexity of tasks such as narrative summarizations or object clustering.
|
| 121 |
+
|
| 122 |
+
# Limitations
|
| 123 |
+
|
| 124 |
+
Despite its contributions, ComicScene154 has certain limitations. The primary challenge remains the subjectivity of scene segmentation, as interpretations can vary across annotators. This was also seen in the performance of scene segmentation, where the average annotations of the models displayed lacking results. Additionally, the dataset is largely composed of "Golden Age" comics, which may limit its applicability to modern comics due to differences in artistic style, storytelling techniques, and narrative complexity.
|
| 125 |
+
|
| 126 |
+
# Ethics Statement
|
| 127 |
+
|
| 128 |
+
This paper complies with the ACL Ethics Policy. The comics included in ComicScene154 are in the public domain, ensuring compliance with copyright regulations. However, we acknowledge the potential for annotator bias, which could impact dataset consistency. To mitigate this, we implemented a standardized annotation framework and conducted inter-annotator agreement evaluations to enhance reliability.
|
| 129 |
+
|
| 130 |
+
# Acknowledgments
|
| 131 |
+
|
| 132 |
+
We extend our gratitude to the annotators for their meticulous work and to the reviewers for their valuable feedback.
|
| 133 |
+
|
| 134 |
+
# References
|
| 135 |
+
|
| 136 |
+
Khaled Bayoudh, Raja Knani, Fayçal Hamdaoui, and Abdellatif Mtibaa. 2022. A survey on deep multimodal learning for computer vision: advances, trends, applications, and datasets. The Visual Computer, 38(8):2939-2970.
|
| 137 |
+
|
| 138 |
+
Neil Cohn. 2010. The limits of time and transitions: Challenges to theories of sequential image comprehension. Studies in Comics, 1(1):127-147.
|
| 139 |
+
Neil Cohn. 2011. A different kind of cultural frame: An analysis of panels in american comics and japanese manga. *Image & Narrative*, 12(1):120-134.
|
| 140 |
+
Neil Cohn. 2013. The Visual Language of Comics: Introduction to the Structure and Cognition of Sequential Images. Bloomsbury Academic, New York.
|
| 141 |
+
Alexander Dunst, Rita Hartel, and Jochen Laubrock. 2017. The graphic narrative corpus (gnc): design, annotation, and analysis for the digital humanities. In 2017 14th IAPR international conference on document analysis and recognition (ICDAR), volume 3, pages 15-20. IEEE.
|
| 142 |
+
Arpita Dutta, Samit Biswas, and Amit Kumar Das. 2022. Bcbid: first bangla comic dataset and its applications. International Journal on Document Analysis and Recognition (IJDAR), 25(4):265-279.
|
| 143 |
+
Azuma Fujimoto, Toru Ogawa, Kazuyoshi Yamamoto, Yusuke Matsui, Toshihiko Yamasaki, and Kiyoharu Aizawa. 2016. Manga109 dataset and creation of metadata. In Proceedings of the 1st international workshop on comics analysis, processing and understanding, pages 1-5.
|
| 144 |
+
Goran Glavaš, Federico Nanni, and Simone Paolo Ponzetto. 2016. Unsupervised text segmentation using semantic relatedness graphs. In Proceedings of the Fifth Joint Conference on Lexical and Computational Semantics, pages 125-130. Association for Computational Linguistics.
|
| 145 |
+
Clément Guérin, Christophe Rigaud, Antoine Mercier, Farid Ammar-Boudjelal, Karell Bertet, Alain Bouju, Jean-Christophe Burie, Georges Louis, Jean-Marc Ogier, and Arnaud Revel. 2013. ebdtheque: a representative database of comics. In 2013 12th International Conference on Document Analysis and Recognition, pages 1145-1149. IEEE.
|
| 146 |
+
Ting-Hao Huang, Francis Ferraro, Nasrin Mostafazadeh, Ishan Misra, Aishwarya Agrawal, Jacob Devlin, Ross Girshick, Xiaodong He, Pushmeet Kohli, Dhruv Batra, et al. 2016. Visual storytelling. In Proceedings of the 2016 conference of the North American chapter of the association for computational linguistics: Human language technologies, pages 1233-1239.
|
| 147 |
+
Mohit Iyyer, Varun Manjunatha, Anupam Guha, Yogarshi Vyas, Jordan Boyd-Graber, Hal Daume, and Larry S Davis. 2017. The amazing mysteries of the gutter: Drawing inferences between panels in comic book narratives. In Proceedings of the IEEE Conference on Computer Vision and Pattern recognition, pages 7186-7195.
|
| 148 |
+
Apurva Kamath, Rishiraj Das, et al. 2019. A survey on semantic parsing. ACM Computing Surveys.
|
| 149 |
+
|
| 150 |
+
Najoung Kim and Sebastian Schuster. 2023. Entity tracking in language models. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 3835-3855.
|
| 151 |
+
Yingxuan Li, Ryota Hinami, Kiyoharu Aizawa, and Yusuke Matsui. 2024. Zero-shot character identification and speaker prediction in comics via iterative multimodal fusion. arXiv preprint arXiv:2404.13993.
|
| 152 |
+
Nhu-Van Nguyen, Christophe Rigaud, and Jean-Christophe Burie. 2018. Digital comics image indexing based on deep learning. Journal of Imaging, 4(7):89.
|
| 153 |
+
Toru Ogawa, Atsushi Otsubo, Rei Narita, Yusuke Matsui, Toshihiko Yamasaki, and Kiyoharu Aizawa. 2018. Object detection for comics using manga109 annotations. arXiv preprint arXiv:1803.08670.
|
| 154 |
+
Henry John Pratt. 2009. Narrative in comics. The Journal of Aesthetics and Art Criticism, 67(1):107-117.
|
| 155 |
+
Ben Proven-Bessel, Zilong Zhao, and Lydia Chen. 2021. Comicgan: Text-to-comic generative adversarial network. arXiv preprint arXiv:2109.09120.
|
| 156 |
+
Anyi Rao, Linning Xu, Yu Xiong, Guodong Xu, Qingqiu Huang, Bolei Zhou, and Dahua Lin. 2020. A local-to-global approach to multi-modal movie scene segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).
|
| 157 |
+
Christophe Rigaud, Jean-Christophe Burie, and Samuel Petit. 2024. Toward accessible comics for blind and low vision readers. In International Conference on Document Analysis and Recognition, pages 198-215. Springer.
|
| 158 |
+
Ragav Sachdeva and Andrew Zisserman. 2024. The manga whisperer: Automatically generating transcriptions for comics. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 12967-12976.
|
| 159 |
+
Emanuele Vivoli, Marco Bertini, and Dimosthenis Karatzas. 2024. Comix: A comprehensive benchmark for multi-task comic understanding. In *The Thirty-eight Conference on Neural Information Processing Systems Datasets and Benchmarks Track*.
|
| 160 |
+
Meng Wang, Richang Hong, Xiao-Tong Yuan, Shuicheng Yan, and Tat-Seng Chua. 2012. Movie2comics: Towards a lively video content presentation. IEEE Transactions on Multimedia, 14(3):858-870.
|
| 161 |
+
Hideaki Yanagisawa, Takuro Yamashita, and Hiroshi Watanabe. 2018. A study on object detection method from manga images using cnn. In 2018 International Workshop on Advanced Image Technology (IWAIT), pages 1-4. IEEE.
|
| 162 |
+
|
| 163 |
+
Xin Yang, Zongliang Ma, Letian Yu, Ying Cao, Baocai Yin, Xiaopeng Wei, Qiang Zhang, and Rynson WH Lau. 2021. Automatic comic generation with stylistic multi-page layouts and emotion-driven text balloon generation. ACM Transactions on Multimedia Computing, Communications, and Applications (TOMM), 17(2):1-19.
|
| 164 |
+
Albin Zehe, Leonard Konle, Lea Katharina Dümpe-lmann, Evelyn Gius, Andreas Hotho, Fotis Jannidis, Lucas Kaufmann, Markus Krug, Frank Puppe, Nils Reiter, et al. 2021. Detecting scenes in fiction: A new segmentation task. In Proceedings of the 16th conference of the European chapter of the association for computational linguistics: Main volume, pages 3167-3177.
|
| 165 |
+
|
| 166 |
+
# 7 Appendix
|
| 167 |
+
|
| 168 |
+
# 7.1 Annotators
|
| 169 |
+
|
| 170 |
+
The annotators were friends or colleagues of the authors who followed the provided guidelines without any additional input from the authors. They volunteered without compensation.
|
| 171 |
+
|
| 172 |
+
# 7.2 Guideline
|
| 173 |
+
|
| 174 |
+
# Dear Participant,
|
| 175 |
+
|
| 176 |
+
I warmly invite you to participate in a survey designed to evaluate the accuracy of a dataset I have developed. The focus of this survey is to assess how effectively the dataset can identify the start and end points of scenes in comics.
|
| 177 |
+
|
| 178 |
+
# Purpose of the Survey:
|
| 179 |
+
|
| 180 |
+
The segmentation of comic scenes is often subjective and can vary from reader to reader. Sometimes, it is difficult to pinpoint exactly where one scene ends and the next begins. In such cases, deviations are completely acceptable. What is most important is whether there is significant agreement on the core panels of a scene—the key panels that form the heart of the storyline.
|
| 181 |
+
|
| 182 |
+
# Instructions:
|
| 183 |
+
|
| 184 |
+
1. Review the comic images: You will be provided with a selection of comic images representing different scenes.
|
| 185 |
+
2. Mark the start and end points: Indicate or describe where you perceive the transition from one scene to the next.
|
| 186 |
+
3. Reference example: A sample comic is attached for your orientation, but please note that it is merely a reference—you do not need to strictly follow it.
|
| 187 |
+
|
| 188 |
+
# Important Note:
|
| 189 |
+
|
| 190 |
+
Comics are a visual art form, and often, there is no definitive answer to where a scene begins or ends. Your feedback will help me identify patterns and commonalities that will be valuable in improving the dataset.
|
| 191 |
+
|
| 192 |
+
# 7.3 Additional Statistics
|
| 193 |
+
|
| 194 |
+

|
| 195 |
+
|
| 196 |
+

|
| 197 |
+
|
| 198 |
+

|
| 199 |
+
|
| 200 |
+

|
comicscene154ascenedatasetforcomicanalysis/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a74197b0a6ba39a7437d174c4300bd75299817c86a608a9151e7d11bc25db2a5
|
| 3 |
+
size 301779
|
comicscene154ascenedatasetforcomicanalysis/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7da477c32979b334264e95a013146de8311235a0d887ce47fc0a1d4f76eccce8
|
| 3 |
+
size 202020
|
comparinghumanandllmpolitenessstrategiesinfreeproduction/1235cebc-b03f-4d1f-81f2-e5c85dd58b15_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d4aeadabb7749453ce6c1983aa28763d740ebac3f7ce188588e0fb58ee3db1c3
|
| 3 |
+
size 175579
|
comparinghumanandllmpolitenessstrategiesinfreeproduction/1235cebc-b03f-4d1f-81f2-e5c85dd58b15_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f74a7c840dfa95698e2d594d460997936186ae94e2c20d1d278800a89bc28c76
|
| 3 |
+
size 225124
|
comparinghumanandllmpolitenessstrategiesinfreeproduction/1235cebc-b03f-4d1f-81f2-e5c85dd58b15_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:508b23ec75f64f282f597a48bef16cd1590e6aaf31e9036ff385425415f18799
|
| 3 |
+
size 4833713
|
comparinghumanandllmpolitenessstrategiesinfreeproduction/full.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
comparinghumanandllmpolitenessstrategiesinfreeproduction/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7fe8d0753b39b30291778535fa0338451ea24664b9614168c3e627dbf1ba98ea
|
| 3 |
+
size 1470609
|
comparinghumanandllmpolitenessstrategiesinfreeproduction/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:91b8490d878a17d97fbfcfe1625a70d5669ab3b20efcb8ddfaef24c10a6ce526
|
| 3 |
+
size 786050
|
comparingspecialisedsmallandgenerallargelanguagemodelsontextclassification100labelledsamplestoachievebreakevenperformance/0151714c-f3e8-4b75-8cfa-36f4bca260b6_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:64908fb5918d59f7a67780220771eab660583bb4c4978f3c6ee86fba9f54938f
|
| 3 |
+
size 118764
|
comparingspecialisedsmallandgenerallargelanguagemodelsontextclassification100labelledsamplestoachievebreakevenperformance/0151714c-f3e8-4b75-8cfa-36f4bca260b6_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b188f963c416cc0d55d469fc5e82e474f696c1336f1ae2aecf97d1ea3f30889e
|
| 3 |
+
size 139234
|
comparingspecialisedsmallandgenerallargelanguagemodelsontextclassification100labelledsamplestoachievebreakevenperformance/0151714c-f3e8-4b75-8cfa-36f4bca260b6_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:69eea177f7b1a0679abdaed310766e8a1c5dc040370dbfbef5f4dfa5d911bad8
|
| 3 |
+
size 578387
|
comparingspecialisedsmallandgenerallargelanguagemodelsontextclassification100labelledsamplestoachievebreakevenperformance/full.md
ADDED
|
@@ -0,0 +1,382 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Comparing Specialised Small and General Large Language Models on Text Classification: 100 Labelled Samples to Achieve Break-Even Performance
|
| 2 |
+
|
| 3 |
+
Branislav Pecher\*, Ivan Srba†, Maria Bielikova†
|
| 4 |
+
|
| 5 |
+
$\spadesuit$ Faculty of Information Technology, Brno University of Technology, Brno, Czechia
|
| 6 |
+
$\dagger$ Kempelen Institute of Intelligent Technologies, Bratislava, Slovakia
|
| 7 |
+
{branislav.pecher, ivan.srba, maria.bielikova} @kinit.sk
|
| 8 |
+
|
| 9 |
+
# Abstract
|
| 10 |
+
|
| 11 |
+
When solving NLP tasks with limited labelled data, researchers typically either use a general large language model without further update, or use a small number of labelled samples to tune a specialised smaller model. In this work, we answer an important question – how many labelled samples are required for the specialised small models to outperform general large models, while taking the performance variance into consideration. By observing the behaviour of fine-tuning, instruction-tuning, prompting and in-context learning on 8 language models, we identify such performance break-even points across 8 representative text classification tasks of varying characteristics. We show that the specialised models often need only few samples (on average 100) to be on par or better than the general ones. At the same time, the number of required labels strongly depends on the dataset or task characteristics, with fine-tuning on binary datasets requiring significantly more samples. When performance variance is taken into consideration, the number of required labels increases on average by $100 - 200\%$ . Finally, larger models do not consistently lead to better performance and lower variance, with 4-bit quantisation having negligible impact.
|
| 12 |
+
|
| 13 |
+
# 1 Introduction
|
| 14 |
+
|
| 15 |
+
With the introduction of the GPT-3 model (Brown et al., 2020), large language models have been shown to be an effective generalist models for learning with limited labelled data. They are able to perform well across many NLP tasks with no (using prompting) or only few (using in-context learning) labelled samples and without any parameter update (Qin et al., 2023; Sun et al., 2023; Liu et al., 2023). This performance is achieved by conditioning the model on an appropriate text input (prompt) containing instructions for the given task, a test sample for which to generate output and optionally a set of few in-context examples showcasing the task (Sun et al., 2023; Dong et al., 2022).
|
| 16 |
+
|
| 17 |
+

|
| 18 |
+
Figure 1: Comparison between the performance of specialised small and general large language models. The break-even points are identified by observing the impact of changing the number of available labelled samples and taking performance variance into consideration. Specialised models outperform general ones with only few labelled samples (up to 100), with performance variance showing strong impact on the comparison, increasing the number significantly.
|
| 19 |
+
|
| 20 |
+
Many enhancements were proposed to improve the overall few-shot behaviour. For example prompting and automatic prompt-engineering, where the effective prompts are designed automatically, or instruction-tuning, where language models are tuned to better follow the task instructions (Gao et al., 2021; Logan IV et al., 2022).
|
| 21 |
+
|
| 22 |
+
With enough labelled samples, the specialised smaller models, obtained through fine-tuning or instruction tuning, can achieve performance on par or better than the general large language models used with prompting or in-context learning without further parameter update (Schick and Schütze, 2021; Qin et al., 2023). From practical perspective (e.g., to decide how many labelled samples are needed or to choose the best approach when the number of labels is fixed), it is valuable to know (at least approximately) the number of labelled samples needed to achieve such superior performance, i.e., to identify performance break-even points.
|
| 23 |
+
|
| 24 |
+
So far, most of the studies comparing the perfor
|
| 25 |
+
|
| 26 |
+
mance of specialised and general language models from the data-efficiency perspective have been done using different (often non-representative and incomplete) settings and methodologies, leading to divergent findings (Pecher et al., 2024b). The specialised language models are tuned either on the whole labelled set (where they achieve higher performance than general language models) (Schick and Schütze, 2021; Qin et al., 2023), or using the same set of few samples (e.g., $4 - 32$ ) used for general models (where they achieve significantly worse performance than general models) (Ma et al., 2023). Only few works study the behaviour of models between the few samples and the whole set, and observe the performance break-even points where specialised language models outperform general ones. Moreover, they often focus only on specific approaches or ignore the performance variance (caused by various sources of randomness, such as random seeds) (Le Scao and Rush, 2021; Hongjin et al., 2022; Hernandez et al., 2023; Gupta et al., 2023; Pecher et al., 2024b).
|
| 27 |
+
|
| 28 |
+
In addition, almost no work considers the compute-efficiency of the different approaches in the comparisons, even though it is an important aspect when the approaches achieve comparable results (Mosbach et al., 2023). Although some works investigate the impact of quantisation on model performance (Liu et al., 2024; Jin et al., 2024), the impact on the performance variance (i.e., sensitivity) or the overall comparison is not explored.
|
| 29 |
+
|
| 30 |
+
Our goal is to remedy these shortcomings and answer the following question: "How many labelled samples do the specialised smaller models need to outperform more general larger models?" To achieve this, we investigate and observe how the performance of different approaches changes when increasing the number of labelled training samples (data-efficiency). We identify the break-even points between performance of specialised models and more general models of different sizes (compute-efficiency), while taking the performance variance into consideration (sensitivity to randomness). The aggregated results are presented in Figure 1. Our main contributions and findings are<sup>1</sup>:
|
| 31 |
+
|
| 32 |
+
- We perform a comprehensive and fair investigation of the impact of increasing the number of labelled training samples on performance
|
| 33 |
+
|
| 34 |
+
and its variance of fine-tuning, prompting, in-context learning and instruction-tuning approaches across 8 language models and 8 representative text classification datasets of various characteristics, such as number of classes, text length or task type.
|
| 35 |
+
|
| 36 |
+
- By identifying break-even points between the specialised and general models, we find that the smaller specialised models (obtained through fine-tuning or instruction-tuning), require only a small number of labelled training examples (100 on average) to achieve performance on par or even better than general large language models used in zero/few-shot settings. In addition, we find significant impact of performance variance, especially originating from in-context learning or fine-tuning on few samples, increasing the number of required labelled samples by up to $500 - 3000\%$ , with average increase of $100\% - 200\%$ .
|
| 37 |
+
|
| 38 |
+
- Based on further analysis we find following key insights: 1) the required number of labelled samples is dependent on the dataset characteristics, with binary datasets and datasets that require better language understanding (e.g., question answering) requiring more labelled samples; 2) larger models do not necessarily lead to better model performance, data-efficiency or lower performance variance for general models; and 3) 4-bit quantisation has negligible impact on the overall behaviour of general models.
|
| 39 |
+
|
| 40 |
+
- Based on the observed findings, we provide practical recommendations on how to choose the best approach, model or to decide how many additional data to label considering the available annotation and computation budget.
|
| 41 |
+
|
| 42 |
+
# 2 Related Work
|
| 43 |
+
|
| 44 |
+
Extensive focus is dedicated to the evaluation and comparison between different data efficient approaches utilising large language models, such as prompting, in-context learning, fine-tuning, prompt-tuning or prompt-based/instruction tuning on text classification tasks (Dong et al., 2022; Liu et al., 2023). In some comparisons, the performance of specialised small models is compared with significantly larger general models (Schick and Schütze, 2021; Ma et al., 2023; Liu et al., 2022; Hernandez et al., 2023; Hongjin et al., 2022), while
|
| 45 |
+
|
| 46 |
+
in others the setting is kept as similar as possible (i.e., comparing specialised and general models of the same sizes) (Mosbach et al., 2023; Qin et al., 2023; Logan IV et al., 2022; Gao et al., 2021; Le Scao and Rush, 2021; Gupta et al., 2023).
|
| 47 |
+
|
| 48 |
+
Majority of the comparisons focus on comparing fine-tuned models with in-context learning (Ma et al., 2023; Hongjin et al., 2022; Hernandez et al., 2023; Qin et al., 2023), or on comparing prompt-based/instruction-tuned models on the specific tasks with their general counterparts (Liu et al., 2022; Mosbach et al., 2023; Schick and Schütze, 2021). Only few papers compare fine-tuning with instruction-tuning (Gupta et al., 2023; Le Scao and Rush, 2021) or multiple approaches at the same time (i.e., fine-tuning, instruction-tuning, prompting and in-context learning at the same time) (Logan IV et al., 2022; Gao et al., 2021).
|
| 49 |
+
|
| 50 |
+
If enough labelled samples are used, the smaller specialised models can achieve performance on par with, or in many cases even better than the performance of the larger general models (Schick and Schütze, 2021; Qin et al., 2023; Hernandez et al., 2023). At the same time, in the extremely limited settings, where the models are fine-tuned using the same low number of samples as it is used for in-context learning, the general large language models excel over the small specialised models (Ma et al., 2023; Hongjin et al., 2022). Other papers study the impact of varying the training data sizes on the performance of specialised models and their comparison with general models. However, they often either perform a comprehensive comparison across multiple approaches, but focus only on few samples and vary the data sizes only to up 32 samples (Logan IV et al., 2022; Gao et al., 2021), or focus on small subset of approaches while using a larger part or the whole dataset, but often in specific domains (Le Scao and Rush, 2021; Gupta et al., 2023; Hongjin et al., 2022; Hernandez et al., 2023; Ma et al., 2023). Only few papers consider (to a certain extent) effects of different systematic choices (e.g., number of samples, or prompt format) or sensitivity to sources of randomness (e.g., choice or order of samples) on comparison (Ma et al., 2023; Pecher et al., 2024a; Sclar et al., 2023; Weber et al., 2023).
|
| 51 |
+
|
| 52 |
+
Compared to these works, we focus on more comprehensive comparisons across: 1) full training dataset, increasing the size from 10 samples to full dataset in exponential fashion; 2) multiple approaches for obtaining specialised models (finetuning, prompt-based/instruction-tuning) and for
|
| 53 |
+
|
| 54 |
+
using the general models (prompting, in-context learning); 3) multiple runs to carefully take into consideration the sensitivity of different approaches and the performance variance this sensitivity introduces; and 4) models of different sizes.
|
| 55 |
+
|
| 56 |
+
# 3 Comparison Methodology: Identifying Performance Break-Even Points
|
| 57 |
+
|
| 58 |
+
Our main focus is on comparing the specialised and general models from the perspective of their data- and compute-efficiency and sensitivity to the effects of randomness, as illustrated by Figure 1.
|
| 59 |
+
|
| 60 |
+
Data-efficiency. To compare the approaches from the perspective of the data-efficiency, we observe and compare how their performance changes when increasing the number of available labelled samples from low number of samples up until the full dataset is used (where each approach is presented with the same set of samples). As we change the number of available samples, we identify the first break-even point between the performance of the specialised and general models. The first break-even point (average performance) specifies the point after which the performance of the specialised models is better on average, but may still be lower in many cases due to the performance variance and the randomness sensitivity, such as when the randomness is not sufficiently addressed (low number of runs is used or the runs are cherry-picked). At each point, we report the mean F1 macro and standard deviation.
|
| 61 |
+
|
| 62 |
+
Compute-efficiency. We compare models of different sizes (e.g., using significantly smaller specialised models) while specifically focusing on models that require a comparable amount of computation. For example, full training and evaluation of the smallest model should require the same amount of compute as using the smallest LLM through prompting. More information are provided in Appendix A.3. In addition, for selected general models, we explore the impact of quantisation on the performance and its variance.
|
| 63 |
+
|
| 64 |
+
Sensitivity to the effects of randomness. To further explore the impact of the sensitivity to the effects of randomness on the comparison, we identify the second break-even points (average+variance). This break-even point denotes the "worst-case size" or the point after which the specialised models show better performance even when the variance is taken into consideration. In other words, there
|
| 65 |
+
|
| 66 |
+
is low probability that the performance of the specialised models will be lower even when using low number of runs or cherry-picking them. To identify this break-even point, we repeat the training and evaluation multiple times and then compare the worst case performance of the better performing model (obtained by subtracting the standard deviation from the mean) with the best case performance of the worse performing model (obtained by adding the standard deviation to the mean). Each repeat uses the same fixed random seed for all models to guarantee deterministic and replicable results. The random seed covers all sources of randomness (Gundersen et al., 2022a; Pecher et al., 2024b) – the split of data, selection of labelled samples, initialisation of models, order of data in training, non-deterministic operations (e.g., dropout), and selection of samples for in-context learning.
|
| 67 |
+
|
| 68 |
+
Datasets. The investigation covers 8 classification datasets composed of tasks with different number of classes and characteristics. We focus on 4 binary datasets from GLUE (Wang et al., 2018) and SuperGLUE (Wang et al., 2019) benchmarks: SST2 (Socher et al., 2013) for sentiment classification, MRPC (Dolan and Brockett, 2005) for determining semantic equivalence relationship between two sentences, CoLA (Warstadt et al., 2019) for determining the grammatical acceptability of a sentence, and BoolQ (Clark et al., 2019) for question answering. In addition, we use 4 multi-class text datasets: AG News (Zhang et al., 2015) for news classification (4 classes), TREC (Voorhees and Tice, 2000) for question classification (6 classes), SNIPS (Coucke et al., 2018) for intent classification (7 classes) and DB Pedia (Lehmann et al., 2015) for topic classification (14 classes).
|
| 69 |
+
|
| 70 |
+
Approaches and models. We investigate the impact of training dataset size across a set of currently popular approaches for dealing with limited labelled data in NLP: 1) fine-tuning; 2) instruction-tuning; 3) prompting; and 4) in-context learning. For fine-tuning, we use the BERT (Devlin et al., 2019a) and RoBERTa (Liu et al., 2019) base models. For prompting and in-context learning the Flan-T5 (Chung et al., 2024) base, GPT-4 (4o-mini-2024-07-18 version) (Brown et al., 2020; Ouyang et al., 2022), LLaMA-2 (Touvron et al., 2023) 13B chat optimised model, LLaMA-3 (Dubey et al., 2024) 8B instruction optimised model, Mistral-7B (Jiang et al., 2023) and Zephyr-7B (Tunstall et al., 2023) models.
|
| 71 |
+
|
| 72 |
+
For instruction-tuning we use the Flan-T5 (full instruction-tuning), Mistral-7B and Zephyr-7B models (both instruction-tuned using LoRA (Hu et al., 2021)). Due to the significant costs, we use 4-bit quantisation for the LLaMA-2 model. In case of Mistral-7B and Zephyr-7B, we use both the full-precision and the 4-bit quantised versions, reporting only the best performance.
|
| 73 |
+
|
| 74 |
+
Experimental setup. Each experiment is repeated 100 times for fine-tuning and 20 times for the remaining approaches (due to the significant costs of inference or training of the larger language models). For in-context learning, we use as many samples per class as the context-size of the models allow. As increasing this number after a certain point results in degraded performance, we always report the best performance achieved up until the dataset subset. For further details see Appendix A.
|
| 75 |
+
|
| 76 |
+
# 3.1 Comparison of Specialised and General Models
|
| 77 |
+
|
| 78 |
+
In this section, our goal is to answer the following main research question: RQ1: How do the specialised models compare to general models on average as the number of labelled samples increases? To achieve this, we identify the first break-even point, i.e., the point after which the specialised models outperform the general ones on average. As such, it will allow us to draw findings about the data efficiency and compute efficiency that are then used for the recommendations in Section 4. The aggregated results for all the models and datasets are presented in Figure 1 and for the best model for each approach across datasets in Figure 2.
|
| 79 |
+
|
| 80 |
+
Specialised models can outperform the general ones using only a relatively small number of labelled examples. To outperform zero-shot setting (prompting), fine-tuning approaches require on average between $10 - 500$ labelled samples. In case of few-shot setting (in-context learning), the number of required labelled samples is higher, on average between $100 - 2000$ samples.
|
| 81 |
+
|
| 82 |
+
The instruction-tuned models provide even larger benefit, representing a good balance between the generality of the models and the samples required for specialisation. To outperform these models, fine-tuning approaches often require a large fraction of the labelled dataset (on average up to 5000 samples). In addition, we observe a consistent performance of instruction-tuned models, regardless of how many labelled samples are
|
| 83 |
+
|
| 84 |
+

|
| 85 |
+
Figure 2: The impact of varying size of available labelled samples (in logarithmic scale) on the performance of fine-tuning, prompting, in-context learning and instruction-tuning approaches, reported using F1 macro and its standard deviation. For each approach, we select only the best performing model. We can observe that specialised models can often outperform general models with only a relatively small number of labelled samples (10 - 1000).
|
| 86 |
+
|
| 87 |
+
used. The performance achieved by instruction-tuned models with only 10 labelled samples is close to the one achieved with the full labelled dataset. The difference in performance across dataset subsets is mainly the effect of in-context examples and not the training samples. Furthermore, the instruction-tuned models consistently outperform all the general larger counterparts with small number of samples. As such, instruction-tuned models achieve the almost-best performance with only a fraction of labelled samples required by fine-tuning, making them an ideal specialised models with highest data-efficiency in many cases.
|
| 88 |
+
|
| 89 |
+
However, the comparison between models and the number of required labelled samples is strongly affected by the dataset and task characteristics. This includes characteristics like 1) how many classes are used (binary vs. multi-class setting); 2) length of sentences (e.g., SST2 vs. CoLA); 3) whether the task requires working with a single sentence or a paired/multiple inputs (e.g., SST2/CoLA vs. MRPC/BoolQ); or 4) the overall type of the task (e.g., simple sentiment classification vs. question answering) that is defined by these characteristics. The largest difference can be observed between binary and multi-class datasets. On multi-class datasets, fine-tuning requires only up to $100 - 200$ labelled samples to outperform the larger models (even instruction-tuned ones in many cases). On binary datasets the required samples are as high as 4000 to outperform zero-shot setting (prompting), up to 9000 to outperform few-shot setting (in-context learning), or up to 20000
|
| 90 |
+
|
| 91 |
+
to outperform the instruction-tuned models. The remaining characteristics have lower impact that is mostly dependent on the model size (more information is provided in Appendix B).
|
| 92 |
+
|
| 93 |
+
An additional significant factor that affects the comparison is whether the dataset was used as part of the larger models pre-training. As illustrated in Figure 3, in such a case, the general larger model are significantly more competitive with the specialised models. For example, the in-context learning with LLaMA-3 model on the SNIPS (and TREC to a certain extent) dataset achieves similar performance to the fine-tuning, and increasing the number of samples also leads to increase in performance of both approaches. However, the LLaMA-3 performance is not consistent across datasets as we observe significant drop in performance on the other datasets, such as AG News or SST2. Similar behaviour can be observed for other models and approaches as well, such as Flan-T5 on SST2 or AG News datasets as compared to TREC and SNIPS, or prompting with LLaMA-3. In these cases (when the model is pretrained on the dataset and/or achieves comparable performance), it is important to consider the compute-efficiency of the approaches as well, as it is especially important in the long run (i.e., using the model in practice).
|
| 94 |
+
|
| 95 |
+
# 3.2 Impact of Performance Variance on Comparison
|
| 96 |
+
|
| 97 |
+
In this section, we answer following research question: RQ2: How does the variance from repeated runs affect the comparison between specialised and
|
| 98 |
+
|
| 99 |
+

|
| 100 |
+
Figure 3: A showcase of the dataset dependence of the break-even points for specific models. The models that perform well on one dataset may perform significantly worse on others, due to the different characteristics, such as the number of classes, sentence length, task type or whether the dataset was used as part of the model pre-training.
|
| 101 |
+
|
| 102 |
+
<table><tr><td></td><td></td><td>Prompting</td><td>In-Context Learning</td><td>Instruction-Tuning</td></tr><tr><td rowspan="8">Fine-Tuning</td><td>SST2</td><td>350 | 900+157%</td><td>9000 | 20000+122%</td><td>20000 | NA</td></tr><tr><td>MRPC</td><td>350 | 500+43%</td><td>375 | 700+87%</td><td>750 | 1750+133%</td></tr><tr><td>CoLA</td><td>350 | 700+100%</td><td>500 | NA</td><td>1800 | NA</td></tr><tr><td>BoolQ</td><td>4250 | 6000+41%</td><td>5000 | NA</td><td>5000 | 7500+50%</td></tr><tr><td>AGNews</td><td>40 | 60+50%</td><td>300 | 800+167%</td><td>2500 | NA</td></tr><tr><td>TREC</td><td>30 | 50+67%</td><td>250 | 600+140%</td><td>200 | 900+350%</td></tr><tr><td>SNIPS</td><td>30 | 40+33%</td><td>50 | NA</td><td>40 | NA</td></tr><tr><td>DBPedia</td><td>40 | 40+0%</td><td>50 | 100+100%</td><td>100 | 500+500%</td></tr></table>
|
| 103 |
+
|
| 104 |
+
Table 1: Break-even points between the best performing models of different approaches across all investigated datasets. The first break-even point (average performance) and the second one (average and variance) are separated with the "l" symbol, with superscript indicating the percentual increase and "NA" indicating no break-even point exists. We observe a significant influence of the performance variance on the number of required labelled samples.
|
| 105 |
+
|
| 106 |
+
general models? Our goal is to determine how the number of required samples increases when the performance variance is taken into consideration. To accomplish this, we identify the second break-even point (average+variance) denoting "worst-case sizes" of training sets. Identifying this point will allow us to determine how the sensitivity of the different approaches affect the comparisons. The aggregated results for all the models and datasets are presented in Figure 1 and for the best model for each approach across datasets in Figure 2. In addition, the comparison of first and second break-even points for the best performing models from each group are in Table 1.
|
| 107 |
+
|
| 108 |
+
Sensitivity to the effects of randomness, and the performance variance it causes, has a significant effect on the break-even points between models, increasing the number of required labelled samples by a significant margin. On average, fine-tuning requires 2 - 3 times more labelled samples (increase of $100 - 200\%$ ) to outperform the remaining approaches when taking the variance
|
| 109 |
+
|
| 110 |
+
into consideration. In specific cases, the impact of variance is negligible, as we observe a $0\%$ increase in the number of required samples (e.g., prompting on DB Media dataset). At the same time, the impact of variance is significantly higher in other cases, leading to an increase of up to $500\%$ , or an increase where even with the full labelled dataset the second break-even point is not achieved (e.g., in-context learning on CoLA, BoolQ or SNIPS datasets).
|
| 111 |
+
|
| 112 |
+
The impact of the performance variance strongly depends on the dataset and the overall number of labelled samples required for the first break-even point. Looking at the increase in absolute numbers, an increase of $100 - 200\%$ represents the need to annotate only between $10 - 600$ more samples in some cases (e.g., most multiclass datasets), while representing an increase of $2000 - 11000$ or more labelled samples in other cases (e.g., binary datasets, mainly SST2). However, the impact is most significant in cases where the second break-even point does not exist, but can be obscured. For example on the SNIPS datasets, the first break-even point with in-context learning is achieved at 50 labelled samples, but the second is not observed even when using all the 15000 labelled samples of the dataset (corresponding to an increase larger than $3000\%$ ).
|
| 113 |
+
|
| 114 |
+
The second break-even point heavily depends on the variance of the approaches and models used. In case of prompting, which shows the lowest performance variance, the highest observed increase is $157\%$ (SST2 dataset) in relative numbers or 1750 (BoolQ dataset) in absolute numbers. On the other hand, the increase is significantly higher for in-context learning approaches (which show the highest variance across the runs) or specific cases in the instruction-tuning approaches (where the variance is more dependent on the model, with larger models showing higher variance), with the high
|
| 115 |
+
|
| 116 |
+
est observed increase of $500\%$ (DB Media dataset and instruction-tuning) in relative numbers or increase of 11000 labelled samples (SST2 dataset and in-context learning) in absolute number. The variance in the fine-tuning approaches does not have as much of an effect, as it is strongly affected by the number of labelled samples – the variance is higher with low number of labelled samples and almost non-existent (lower than prompting) with majority of the dataset (more than $\sim 60\%$ of the labelled samples in the dataset).
|
| 117 |
+
|
| 118 |
+
# 3.3 Additional Analysis: Effects of Model Size and Quantisation
|
| 119 |
+
|
| 120 |
+
In this section, we provide a high-level summary of findings from analysing how the size of the model and the quantisation affect the comparison in terms of overall performance and variance.
|
| 121 |
+
|
| 122 |
+
Larger models do not consistently lead to better performance or lower performance variance. The impact of model size is most explicit for fine-tuning, considerably increasing the performance and reducing variance. For prompting and in-context learning, we often observe smaller models outperforming their larger counterparts in both the performance and its variance. At the same time, larger general models often benefit more from using larger number of in-context examples. However, this is mainly effect of their larger context size (i.e., can handle more samples before observing drop in performance) and not size of the model. In addition, for prompting and in-context learning, we do not observe that using larger models leads to lower performance variance. For more details see Appendix B.
|
| 123 |
+
|
| 124 |
+
Using 4-bit quantisation has minimal impact on the overall sensitivity and performance of the general models. The quantised versions of the models often outperform their full-precision counterparts when used for in-context learning (as can be seen in Figure 4). On the other hand, for prompting, the full-precision models perform slightly better, even though the difference in performance is minimal in almost all cases. Finally, 4-bit quantised models show the same level of performance variance and benefit the same from using more in-context examples as the full-precision models. In addition, we observe negligible impact of quantisation on the performance variance. Finally, quantisation has not impact on how much the models benefit from increasing the number of in-context examples or their context length. Therefore, we can
|
| 125 |
+
|
| 126 |
+
conclude that the use of quantised models has minimal impact on the comparison between different approaches. As such, considering compute-efficiency and performance trade-off in the comparison, the quantised models should be preferred for the general large language models whenever possible. For more details, see Appendix C.
|
| 127 |
+
|
| 128 |
+
# 4 Discussion: Recommendations Based on the Findings
|
| 129 |
+
|
| 130 |
+
In this section, we provide recommendations and suggestions that should allow for better decision making regarding what approach would provide the most efficient solution for different settings. The recommendations are based on the findings of our experiments, taking into consideration the data-efficiency (or annotation budget required for using the effective use), compute-efficiency (or the number of parameters and how it affects the whole training and inference process), the sensitivity to the effects of randomness (or how the results change when introducing small perturbation to the input data and parameters) and task characteristics.
|
| 131 |
+
|
| 132 |
+
Using general large language models in a zero or few shot setting is a preferable solution only in specific cases. First, when the task does not have well defined classes or requires some kind of generation (e.g., translation, summarisation). The general models excel at generation tasks (as they are designed for them) and further tuning would require an extensive dataset. Prompting is a more efficient option as providing in-context examples often requires significant human effort (e.g., preparing longer texts instead of a single label). Second, when faced with a limited annotation and computation budget, we do not have a large enough dataset to achieve superior fine-tuning or we do not have enough computational resources to instruction-tune the general models. However, the inference cost may be problematic in this case. Third, when we are interested in quick prototyping and approximation of the overall performance, before deciding whether to dedicate more time and budget for specialising the models. This recommendation is based on our main finding (specialised models require only small number of labelled samples to outperform general models) and is in contrast to the common practice of evaluating prompting and in-context learning on classification tasks (Liu et al., 2023).
|
| 133 |
+
|
| 134 |
+
Fine-tuning is preferable if we have large an-
|
| 135 |
+
|
| 136 |
+

|
| 137 |
+
Figure 4: The comparison between 4-bit quantised and non-quantised Mistral-7B and Zephyr-7B models used for in-context learning across all datasets. The impact of quantisation is not consistent across datasets. The quantised models often achieve better performance than non-quantised ones, with the difference being often small. In addition, the impact on the variance is negligible.
|
| 138 |
+
|
| 139 |
+
notation budget, but small computation budget, or if faced with task not well designed for generation, requiring additional modifications (e.g., multi-label classification). With enough samples, even small models (BERT) can outperform all the general models. Training the largest possible model (allowed by the computation budget) should be opted for, to reduce the number of required samples as much as possible, and to prevent any shortcomings on tasks that require better language understanding. Based on our findings, we need to annotate on average 100 samples, even for smaller models. Obtaining such a number of labelled samples is not problematic in many domains.
|
| 140 |
+
|
| 141 |
+
Instruction-tuning of the larger language models is the optimal solution as it provides consistent benefits for all the other cases (large computation budget with either small or large annotation budget). Instruction tuning provides the best trade-off for the performance and the required resources - increasing the number of labelled samples does not have a significant impact on the performance, while increasing the size of the instruction-tuned model has only low performance impact. However, if interested in best overall performance on the task, using the largest general model and using as many labelled samples for instruction-tuning (and in-context examples) should provide the most benefit at the cost of increase in effort (and strong diminishing returns). In addition, it requires significantly larger computation budget than fine-tuning, due to the inference costs, which should be considered in the long run.
|
| 142 |
+
|
| 143 |
+
Using 4-bit quantisation can lead to higher compute-efficiency with minimal impact on the performance. The impact of quantisation on the performance in text classification is minimal (achieving similar or higher performance). The impact on sensitivity is negligible. As such, the tradeoff between significantly lower training/inference costs and similar performance favours the quantised models for prompting, in-context learning and instruction-tuning.
|
| 144 |
+
|
| 145 |
+
When comparing between different approaches and models, the performance variance should be taken into consideration, as it has a strong impact on the comparison. If only a single run (or low number of runs) is used, one of the models can be incorrectly denoted as better only based on a random chance. The use of multiple runs is especially important when using in-context learning, instruction-tuning or fine-tuning on low number of labelled samples.
|
| 146 |
+
|
| 147 |
+
Finally, when using general models, a specific focus should be on the prompt format and the set of in-context examples to maximise their benefits. The prompt format was identified as the most significant contributor to the performance and variance in the results. To achieve fair comparison and robustness of the models, the comparison should be done using prompt optimised for each model or an ensemble of multiple prompts for instruction tuning and evaluation. In addition, choosing the optimal number of in-context examples is important to achieve fair comparison. Using all the available samples may not always be pos
|
| 148 |
+
|
| 149 |
+
sible or beneficial due to the limited context size. As illustrated in our experiments, the performance drops significantly after this limit is reached (or sometimes even beforehand). Furthermore, the quality of the samples is as important (if not more) than the quantity of the samples. Majority of the observed variance in the performance in our experiments is the result of the random choice of examples. Previous studies have also observed that the quality of the samples is paramount, even though identifying the samples of "highest quality" may not be as straightforward (Pecher et al., 2024c; Agrawal et al., 2023; Chang and Jia, 2023). As such, both quality and quantity of the in-context examples should be considered in the comparisons, introducing further human labour that should be considered when choosing the most effective and efficient approach and model.
|
| 150 |
+
|
| 151 |
+
# 5 Conclusion
|
| 152 |
+
|
| 153 |
+
In this paper, we perform a comprehensive and fair comparison of currently popular approaches for data-efficient learning in NLP, from the perspective of their data-efficiency and sensitivity to the effects of randomness. The main focus of the investigation is to determine how many labelled training samples are needed for the specialised small language models (obtained through fine-tuning or instruction-tuning) to outperform their general larger counterparts used in zero and few-shot settings. Based on the break-even points from 8 representative text classification datasets of various characteristics, we find that the number of required training samples is quite small, but strongly dependent on the dataset and task characteristics, with more labelled samples needed for binary datasets and tasks that require better language understanding. In addition, we identify a significant influence of the performance variance, stemming from the sensitivity of the different approaches, especially in-context learning and fine-tuning with few labelled samples, on the overall comparison and the number of required labelled samples. We can conclude that the specialised smaller models are a strong contender on the text classification tasks, with the general language models showing their benefits for specific cases, such as quick prototyping or when faced with extremely limited annotation. Finally, based on our findings, we provide recommendations that allow for better decision making regarding what approach to use for different settings.
|
| 154 |
+
|
| 155 |
+
# Acknowledgements
|
| 156 |
+
|
| 157 |
+
This work was partially supported by the projects funded by the European Union under the Horizon Europe: DisAI, GA No. 101079164, AI-CODE, GA No. 101135437; by Moderned, a project funded by the Slovak Research and Development Agency, GA No. APVV-22-0414; and by the European Union NextGenerationEU through the Recovery and Resilience Plan for Slovakia under the project No. 09I03-03-V03-00020.
|
| 158 |
+
|
| 159 |
+
Part of the research results was obtained using the computational resources procured in the national project National competence centre for high performance computing (project code: 311070AKF2) funded by European Regional Development Fund, EU Structural Funds Informatization of Society, Operational Program Integrated Infrastructure.
|
| 160 |
+
|
| 161 |
+
# Limitations
|
| 162 |
+
|
| 163 |
+
The investigation is done on a set of English classification datasets with various characteristics (number of classes, input size, task type, etc.). This choice may limit the generalisation of our findings to other datasets, tasks and languages, such as the generation tasks, which are more representative for the general models and on which the fine-tuning cannot be used as easily (e.g., question answering, summarisation, translation). However, we explicitly discuss this in Section 4.
|
| 164 |
+
|
| 165 |
+
Due to the significant computation costs incurred by the inference of larger language models (namely LLaMA-2, LLaMA-3, Mistral-7B and Zephyr-7B), instruction-tuning of the medium sized models (Mistral/Zephyr) and the additional other costs of the GPT-4 model, we evaluate the models in a limited setting. The evaluation is done on a randomly selected set of 1000 samples (following the practice in prior works (Gao et al., 2021; Chang and Jia, 2023; Sclar et al., 2024; Li and Qiu, 2023; Koksal et al., 2023)). As the datasets are smaller (e.g., MRPC, BoolQ, CoLA, SNIPS, TREC) in many cases, this decision may not be as problematic, as the used 60:20:20 split leads to approximately the 1000 test samples. However, on the larger datasets (SST2, AG News and DB Media) this decision may skew the results. In addition, we run the GPT-4 prompting and in-context learning only 10 times instead of 20 due to its costs.
|
| 166 |
+
|
| 167 |
+
We use the same prompt for all the models, which is a result of a prompt engineering on the
|
| 168 |
+
|
| 169 |
+
Mistral-7B model. The prompt was created based on dataset description, the prompts used in related works and the formats recommended for different models (e.g., taking inspiration from (Sun et al., 2023)). As such, this may not represent the optimal format for all the models (as identified in previous works (Sclar et al., 2023; Weber et al., 2023; Pecher et al., 2024b)) and performing the investigation on multiple different prompts may improve the overall model performance and affect the findings. However, we opted for using only a single optimised prompt format to reduce the computation costs and provide more in-depth analysis on larger number of models.
|
| 170 |
+
|
| 171 |
+
Finally, we are not sure whether the datasets we use in our experiments have been used to pre-train the models we use for prompting and in-context learning. As such, the comparison and findings of our study may be affected by this possible data leak, leading to larger benefit of general models over the specialised ones (as already indicated in Section 3.1). We limit this effect by using a diverse set of datasets and our own optimised prompt across the majority of the experiments. However, we cannot guarantee it is enough to provide unbiased results as this limitation is part of the recently recognised LLM validation crisis (Li and Flanigan, 2024) and we would need to train the model from scratch to address it properly, which is out of scope for this paper.
|
| 172 |
+
|
| 173 |
+
# Ethical Considerations
|
| 174 |
+
|
| 175 |
+
The experiments in this paper work with publicly available benchmark datasets GLUE and SuperGLUE and other publicly available datasets (AG News, TREC, SNIPS and DB Media), citing the original authors. As we were not able to determine the license for the tasks used, we opted to use them in as limited form as possible, adhering to the terms of use (no annotation of the test set) defined by the GLUE and SuperGLUE and applying it to other datasets as well. We do not work with any personally identifiable information or offensive content and perform no crowdsourcing for further data annotation. In addition, we are not aware of any potential ethical harms or negative societal impacts of our work, apart from the ones related to the advancement of the field of machine learning. Finally, we follow the license terms for all the models we use (such as the one required for the use of the LLaMA-2 and LLaMA-3 models).
|
| 176 |
+
|
| 177 |
+
It is possible the large language models we use contain biases and potentially offensive or harmful content. However, the original authors of these models reduce this bias as much as possible. At the same time, we do not release any output of the models which should further reduce the potential bias and negative impact.
|
| 178 |
+
|
| 179 |
+
# References
|
| 180 |
+
|
| 181 |
+
Sweta Agrawal, Chunting Zhou, Mike Lewis, Luke Zettlemoyer, and Marjan Ghazvininejad. 2023. Incontext examples selection for machine translation. In Findings of the Association for Computational Linguistics: ACL 2023, pages 8857-8873, Toronto, Canada. Association for Computational Linguistics.
|
| 182 |
+
Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. 2020. Language models are few-shot learners. Advances in Neural Information Processing Systems, 33:1877-1901.
|
| 183 |
+
Ting-Yun Chang and Robin Jia. 2023. Data curation alone can stabilize in-context learning. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 8123-8144. ACL.
|
| 184 |
+
Hyung Won Chung, Le Hou, Shayne Longpre, Barret Zoph, Yi Tay, William Fedus, Yunxuan Li, Xuezhi Wang, Mostafa Dehghani, Siddhartha Brahma, et al. 2024. Scaling instruction-finetuned language models. Journal of Machine Learning Research, 25(70):1-53.
|
| 185 |
+
Christopher Clark, Kenton Lee, Ming-Wei Chang, Tom Kwiatkowski, Michael Collins, and Kristina Toutanova. 2019. BoolQ: Exploring the surprising difficulty of natural yes/no questions. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 2924–2936, Minneapolis, Minnesota. ACL.
|
| 186 |
+
Alice Coucke, Alaa Saade, Adrien Ball, Theodore Bluche, Alexandre Caulier, David Leroy, Clément Doumouro, Thibault Gisselbrecht, Francesco Caltagirone, Thibaut Lavril, et al. 2018. Snips voice platform: an embedded spoken language understanding system for private-by-design voice interfaces. arXiv preprint arXiv:1805.10190.
|
| 187 |
+
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019a. Bert: Pre-training of deep bidirectional transformers for language understanding. Preprint, arXiv:1810.04805.
|
| 188 |
+
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019b. BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of
|
| 189 |
+
|
| 190 |
+
the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 4171-4186, Minneapolis, Minnesota. Association for Computational Linguistics.
|
| 191 |
+
Jesse Dodge, Gabriel Ilharco, Roy Schwartz, Ali Farhadi, Hannaneh Hajishirzi, and Noah Smith. 2020. Fine-tuning pretrained language models: Weight initializations, data orders, and early stopping. arXiv preprint arXiv:2002.06305.
|
| 192 |
+
William B. Dolan and Chris Brockett. 2005. Automatically constructing a corpus of sentential paraphrases. In Proceedings of the Third International Workshop on Paraphrasing.
|
| 193 |
+
Qingxiu Dong, Lei Li, Damai Dai, Ce Zheng, Zhiyong Wu, Baobao Chang, Xu Sun, Jingjing Xu, and Zhifang Sui. 2022. A survey for in-context learning. arXiv preprint arXiv:2301.00234.
|
| 194 |
+
Abhimanyu Dubey, Abhinav Jauhri, Abhinav Pandey, Abhishek Kadian, Ahmad Al-Dahle, Aiesha Letman, Akhil Mathur, Alan Schelten, Amy Yang, Angela Fan, et al. 2024. The llama 3 herd of models. arXiv preprint arXiv:2407.21783.
|
| 195 |
+
Tianyu Gao, Adam Fisch, and Danqi Chen. 2021. Making pre-trained language models better few-shot learners. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 3816-3830, Online. ACL.
|
| 196 |
+
Odd Erik Gundersen, Kevin Coakley, and Christine Kirkpatrick. 2022a. Sources of irreproducibility in machine learning: A review. arXiv preprint arXiv:2204.07610.
|
| 197 |
+
Odd Erik Gundersen, Kevin Coakley, Christine Kirkpatrick, and Yolanda Gil. 2022b. Sources of irreproducibility in machine learning: A review. arXiv preprint arXiv:2204.07610.
|
| 198 |
+
Odd Erik Gundersen, Saeid Shamsaliei, Håkon Sletten Kjærnli, and Helge Langseth. 2023. On reporting robust and trustworthy conclusions from model comparison studies involving neural networks and randomness. In Proceedings of the 2023 ACM Conference on Reproducibility and Replicability, pages 37-61.
|
| 199 |
+
Himanshu Gupta, Saurabh Arjun Sawant, Swaroop Mishra, Mutsumi Nakamura, Arindam Mitra, Santosh Mashetty, and Chitta Baral. 2023. Instruction tuned models are quick learners. arXiv preprint arXiv:2306.05539.
|
| 200 |
+
Evan Hernandez, Diwakar Mahajan, Jonas Wulff, Micah J Smith, Zachary Ziegler, Daniel Nadler, Peter Szolovits, Alistair Johnson, Emily Alsentzer, et al. 2023. Do we still need clinical language models? In Conference on Health, Inference, and Learning, pages 578-597. PMLR.
|
| 201 |
+
|
| 202 |
+
SU Hongjin, Jungo Kasai, Chen Henry Wu, Weijia Shi, Tianlu Wang, Jiayi Xin, Rui Zhang, Mari Ostendorf, Luke Zettlemoyer, Noah A Smith, et al. 2022. Selective annotation makes language models better few-shot learners. In The Eleventh International Conference on Learning Representations.
|
| 203 |
+
Edward J Hu, Phillip Wallis, Zeyuan Allen-Zhu, Yanzhi Li, Shean Wang, Lu Wang, Weizhu Chen, et al. 2021. Lora: Low-rank adaptation of large language models. In International Conference on Learning Representations.
|
| 204 |
+
Edward J Hu, yelong shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. 2022. LoRA: Low-rank adaptation of large language models. In International Conference on Learning Representations.
|
| 205 |
+
Albert Q Jiang, Alexandre Sablayrolles, Arthur Mensch, Chris Bamford, Devendra Singh Chaplot, Diego de las Casas, Florian Bressand, Gianna Lengyel, Guillaume Lample, Lucile Saulnier, et al. 2023. Mistral 7b. arXiv preprint arXiv:2310.06825.
|
| 206 |
+
Renren Jin, Jiangcun Du, Wuwei Huang, Wei Liu, Jian Luan, Bin Wang, and Deyi Xiong. 2024. A comprehensive evaluation of quantization strategies for large language models. In *Findings of the Association for Computational Linguistics ACL* 2024, pages 12186-12215, Bangkok, Thailand and virtual meeting. Association for Computational Linguistics.
|
| 207 |
+
Abdullatif Köksal, Timo Schick, and Hinrich Schuetze. 2023. MEAL: Stable and active learning for few-shot prompting. In Findings of the Association for Computational Linguistics: EMNLP 2023, pages 506-517, Singapore. ACL.
|
| 208 |
+
Alexandre Lacoste, Alexandra Luccioni, Victor Schmidt, and Thomas Dandres. 2019. Quantifying the carbon emissions of machine learning. arXiv preprint arXiv:1910.09700.
|
| 209 |
+
Teven Le Scao and Alexander Rush. 2021. How many data points is a prompt worth? In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 2627-2636, Online. ACL.
|
| 210 |
+
Jens Lehmann, Robert Isele, Max Jakob, Anja Jentzsch, Dimitris Kontokostas, Pablo N Mendes, Sebastian Hellmann, Mohamed Morsey, Patrick van Kleef, Soren Auer, and Christian Bizer. 2015. DBpedia - a large-scale, multilingual knowledge base extracted from wikipedia. Semant. Web, 6(2):167-195.
|
| 211 |
+
Changmao Li and Jeffrey Flanigan. 2024. Task contamination: Language models may not be few-shot anymore. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 38, pages 18471-18480.
|
| 212 |
+
Xiaonan Li and Xipeng Qiu. 2023. Finding support examples for in-context learning. In Findings of the
|
| 213 |
+
|
| 214 |
+
Association for Computational Linguistics: EMNLP 2023, pages 6219-6235, Singapore. ACL.
|
| 215 |
+
Haokun Liu, Derek Tam, Mohammed Muqeeth, Jay Mohta, Tenghao Huang, Mohit Bansal, and Colin A Raffel. 2022. Few-shot parameter-efficient fine-tuning is better and cheaper than in-context learning. Advances in Neural Information Processing Systems, 35:1950-1965.
|
| 216 |
+
Peiyu Liu, Zikang Liu, Ze-Feng Gao, Dawei Gao, Wayne Xin Zhao, Yaliang Li, Bolin Ding, and Ji-Rong Wen. 2024. Do emergent abilities exist in quantized large language models: An empirical study. In Proceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation (LREC-COLING 2024), pages 5174-5190, Torino, Italia. ELRA and ICCL.
|
| 217 |
+
Pengfei Liu, Weizhe Yuan, Jinlan Fu, Zhengbao Jiang, Hiroaki Hayashi, and Graham Neubig. 2023. Pretrain, prompt, and predict: A systematic survey of prompting methods in natural language processing. ACM Comput. Surv., 55(9).
|
| 218 |
+
Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2019. Roberta: A robustly optimized bert pretraining approach. arXiv preprint arXiv:1907.11692.
|
| 219 |
+
Robert Logan IV, Ivana Balazevic, Eric Wallace, Fabio Petroni, Sameer Singh, and Sebastian Riedel. 2022. Cutting down on prompts and parameters: Simple few-shot learning with language models. In *Findings of the Association for Computational Linguistics: ACL* 2022, pages 2824–2835, Dublin, Ireland. ACL.
|
| 220 |
+
Yao Lu, Max Bartolo, Alastair Moore, Sebastian Riedel, and Pontus Stenetorp. 2022. Fantastically ordered prompts and where to find them: Overcoming few-shot prompt order sensitivity. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 8086-8098, Dublin, Ireland. ACL.
|
| 221 |
+
Yubo Ma, Yixin Cao, Yong Hong, and Aixin Sun. 2023. Large language model is not a good few-shot information extractor, but a good reranker for hard samples! In Findings of the Association for Computational Linguistics: EMNLP 2023, pages 10572-10601, Singapore. ACL.
|
| 222 |
+
Marius Mosbach, Maksym Andriushchenko, and Dietrich Klakow. 2021. On the Stability of Fine-tuning BERT: Misconceptions, Explanations, and Strong Baselines. In International Conference on Learning Representations.
|
| 223 |
+
Marius Mosbach, Tiago Pimentel, Shauli Ravfogel, Dietrich Klakow, and Yanai Elazar. 2023. Few-shot fine-tuning vs. in-context learning: A fair comparison and evaluation. In Findings of the Association for Computational Linguistics: ACL 2023, pages 12284-12314, Toronto, Canada. ACL.
|
| 224 |
+
|
| 225 |
+
Long Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida, Carroll Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, et al. 2022. Training language models to follow instructions with human feedback. Advances in Neural Information Processing Systems, 35:27730-27744.
|
| 226 |
+
Branislav Pecher, Ivan Srba, and Maria Bielikova. 2024a. On sensitivity of learning with limited labelled data to the effects of randomness: Impact of interactions and systematic choices. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, pages 522-556, Miami, Florida, USA. Association for Computational Linguistics.
|
| 227 |
+
Branislav Pecher, Ivan Srba, and Maria Bielikova. 2024b. A survey on stability of learning with limited labelled data and its sensitivity to the effects of randomness. ACM Computing Surveys, 57(1).
|
| 228 |
+
Branislav Pecher, Ivan Srba, Maria Bielikova, and Joaquin Vanschoren. 2024c. Automatic combination of sample selection strategies for few-shot learning. arXiv preprint arXiv:2402.03038.
|
| 229 |
+
Chengwei Qin, Aston Zhang, Zhuosheng Zhang, Jiao Chen, Michihiro Yasunaga, and Diyi Yang. 2023. Is ChatGPT a general-purpose natural language processing task solver? In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 1339-1384, Singapore. ACL.
|
| 230 |
+
Timo Schick and Hinrich Schütze. 2021. It's not just size that matters: Small language models are also few-shot learners. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 2339-2352, Online. ACL.
|
| 231 |
+
Melanie Sclar, Yejin Choi, Yulia Tsvetkov, and Alane Suhr. 2023. Quantifying Language Models' Sensitivity to Spurious Features in Prompt Design or: How I learned to start worrying about prompt formatting.
|
| 232 |
+
Melanie Sclar, Yejin Choi, Yulia Tsvetkov, and Alane Suhr. 2024. Quantifying language models' sensitivity to spurious features in prompt design or: How i learned to start worrying about prompt formatting. In The Twelfth International Conference on Learning Representations.
|
| 233 |
+
Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D. Manning, Andrew Ng, and Christopher Potts. 2013. Recursive deep models for semantic compositionality over a sentiment treebank. In Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing, pages 1631-1642, Seattle, Washington, USA. ACL.
|
| 234 |
+
Xiaofei Sun, Linfeng Dong, Xiaoya Li, Zhen Wan, Shuhe Wang, Tianwei Zhang, Jiwei Li, Fei Cheng, Lingjuan Lyu, Fei Wu, et al. 2023. Pushing the limits of chatgpt on nlp tasks. arXiv preprint arXiv:2306.09719.
|
| 235 |
+
|
| 236 |
+
Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, et al. 2023. Llama 2: Open foundation and fine-tuned chat models. arXiv preprint arXiv:2307.09288.
|
| 237 |
+
|
| 238 |
+
Lewis Tunstall, Edward Beeching, Nathan Lambert, Nazteen Rajani, Kashif Rasul, Younes Belkada, Shengyi Huang, Leandro von Werra, Clémentine Fourrier, Nathan Habib, et al. 2023. Zephyr: Direct distillation of lm alignment. arXiv preprint arXiv:2310.16944.
|
| 239 |
+
|
| 240 |
+
Ellen M. Voorhees and Dawn M. Tice. 2000. Building a question answering test collection. In Proceedings of the 23rd Annual International ACM SIGIR Conference on Research and Development in Information Retrieval, SIGIR '00, page 200-207, New York, NY, USA. ACM.
|
| 241 |
+
|
| 242 |
+
Alex Wang, Yada Pruksachatkun, Nikita Nangia, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel Bowman. 2019. Superglue: A stickier benchmark for general-purpose language understanding systems. Advances in Neural Information Processing Systems, 32.
|
| 243 |
+
|
| 244 |
+
Alex Wang, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel Bowman. 2018. GLUE: A multi-task benchmark and analysis platform for natural language understanding. In Proceedings of the 2018 EMNLP Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP, pages 353-355, Brussels, Belgium. ACL.
|
| 245 |
+
|
| 246 |
+
Alex Warstadt, Amanpreet Singh, and Samuel R. Bowman. 2019. Neural network acceptability judgments. Transactions of the Association for Computational Linguistics, 7:625-641.
|
| 247 |
+
|
| 248 |
+
Lucas Weber, Elia Bruni, and Dieuwke Hupkes. 2023. Mind the instructions: a holistic evaluation of consistency and interactions in prompt-based learning. In Proc. of the 27th Conference on Computational Natural Language Learning (CoNLL), pages 294-313, Singapore. Association for Computational Linguistics.
|
| 249 |
+
|
| 250 |
+
Xiang Zhang, Junbo Zhao, and Yann LeCun. 2015. Character-level convolutional networks for text classification. In Advances in Neural Information Processing Systems, volume 28. Curran Associates, Inc.
|
| 251 |
+
|
| 252 |
+
Yiming Zhang, Shi Feng, and Chenhao Tan. 2022. Active example selection for in-context learning. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 9134-9148, Abu Dhabi, United Arab Emirates. ACL.
|
| 253 |
+
|
| 254 |
+
Zihao Zhao, Eric Wallace, Shi Feng, Dan Klein, and Sameer Singh. 2021. Calibrate before use: Improving few-shot performance of language models. In International Conference on Machine Learning, pages 12697-12706. PMLR.
|
| 255 |
+
|
| 256 |
+
# A Experimental Setup: Additional Details
|
| 257 |
+
|
| 258 |
+
Each experiment is repeated 100 times for finetuning and 20 times for the remaining approaches (due to the significant costs of inference or training of the larger language models) in order to observe and reduce the performance variance (as recommended by Gundersen et al. (Gundersen et al., 2023) and Pecher et al. (Pecher et al., 2024b)), since particularly in-context learning and finetuning with few samples were identified to produce results with significant variance due to effects of randomness (Lu et al., 2022; Zhao et al., 2021; Zhang et al., 2022; Mosbach et al., 2021; Dodge et al., 2020). Each repeat uses the same fixed random seed for all models to guarantee deterministic and replicable results. The random seed covers all sources of randomness (Gundersen et al., 2022b) – the split of data, selection of labelled samples, initialisation of models, order of data in training, non-deterministic operations (e.g., dropout), and selection of samples for in-context learning. At each point, we report the mean F1 macro and standard deviation.
|
| 259 |
+
|
| 260 |
+
# A.1 Dataset Details
|
| 261 |
+
|
| 262 |
+
All experiments in this paper use English-only datasets. We focus on 8 datasets composed of diverse tasks with different number of classes and characteristics. We focus on 4 binary datasets from GLUE (Wang et al., 2018) and SuperGLUE (Wang et al., 2019) benchmarks: SST2 (Socher et al., 2013) for sentiment classification, MRPC (Dolan and Brockett, 2005) for determining semantic equivalence relationship between two sentences, CoLA (Warstadt et al., 2019) for determining the grammatical acceptability of a sentence, and BoolQ (Clark et al., 2019) for question answering. In addition, we use 4 multi-class text datasets: AG News (Zhang et al., 2015) for news classification (4 classes), TREC (Voorhees and Tice, 2000) for question classification (6 classes), SNIPS (Coucke et al., 2018) for intent classification (7 classes) and DB Pedia (Lehmann et al., 2015) for topic classification (14 classes).
|
| 263 |
+
|
| 264 |
+
For each dataset, we split all the available labelled samples into training, validation and test set using 60/20/20 split. In addition, we subsample each dataset, starting with 1 labelled sample per class and then increasing this number exponentially up to the full dataset (or a dataset frac
|
| 265 |
+
|
| 266 |
+
tion where fine-tuning outperforms all other approaches). Both the data split and subsampling is determined by the random seed. We choose this setup (i.e., creating new split of samples instead of using the pre-defined dataset splits), as some of the datasets do not release labels for test sets and the validation splits contain quite low number of sample, possibly leading to unreliable results. In addition, this guarantees that the setup is as similar as possible across all the datasets.
|
| 267 |
+
|
| 268 |
+
# A.2 Approaches and Models Setup
|
| 269 |
+
|
| 270 |
+
# Prompt Format
|
| 271 |
+
|
| 272 |
+
Determine { sentiment | grammatical acceptability | semantic equivalence | whether the passage contains answer | topic | intent} of the { sentence | sentence pair | question } using following options: 1) [Class 1] 2) [Class 2] ... N) [Class N].
|
| 273 |
+
|
| 274 |
+
[Input]
|
| 275 |
+
|
| 276 |
+
[Output]
|
| 277 |
+
|
| 278 |
+
Dataset Verbaliser
|
| 279 |
+
|
| 280 |
+
<table><tr><td>SST2</td><td>{Negative, Positive}</td></tr><tr><td>CoLA</td><td>{No, Yes}</td></tr><tr><td>MRPC</td><td>{No, Yes}</td></tr><tr><td>BoolQ</td><td>{No, Yes}</td></tr><tr><td>AG</td><td>{World, Sports, Business, Science and News Technology}</td></tr><tr><td>TREC</td><td>{Expression, Entity, Description, Human, Location, Number}</td></tr><tr><td>SNIPS</td><td>{ Playlist, Weather, Event, Musing, Creative Work, Rate Book, Book Restaurant}</td></tr><tr><td>DB Pe-dia</td><td>{Company, Educational Institution, Artist, Athlete, Office Holder, Transportation, Building, Natural Place, Village, Animal, Plant, Album, Film, Written Work}</td></tr></table>
|
| 281 |
+
|
| 282 |
+
Table 2: Prompt formats and verbalisers used for prompting, in-context learning and instruction-tuning across different datasets. The [Class 1-N] and the [Output] are replaced with the names of the classes defined by the verbaliser. The [Input] is replaced by the sentence of the samples. The [Input] and [Output] are repeated for each in-context sample, while the final [Output] is used to determine the predicted class.
|
| 283 |
+
|
| 284 |
+
For fine-tuning, we use the BERT (Devlin et al., 2019b) and RoBERTa (Liu et al., 2019) base models. We follow the typical setup and recommendations from related work (such as Mosbach et al. (2021); Dodge et al. (2020)), adding dropout layer
|
| 285 |
+
|
| 286 |
+
with drop rate of 0.3 followed by a classification layer. We use learning rate of 1e-5 with AdamW optimiser with warmup and train the model until convergence using a maximum of 10 epochs, with variable batch size across different dataset subsets (starting at 4 and ending at 32 for the full dataset).
|
| 287 |
+
|
| 288 |
+
For prompting and in-context learning the Flant5 (Chung et al., 2024) base, GPT-4 (4o-mini2024-07-18 version) (Brown et al., 2020; Ouyang et al., 2022), LLaMA-2 (Touvron et al., 2023) 13B chat optimised model, LLaMA-3 (Dubey et al., 2024) 8B instruction optimised model, Mistral7B (Jiang et al., 2023) and Zephyr-7B (Tunstall et al., 2023) models. For instruction-tuning we use the Flant-T5 (with full instruction-tuning), Mistral7B and Zephyr-7B models (both instruction-tuned using LoRA (Hu et al., 2022)).
|
| 289 |
+
|
| 290 |
+
The prompt format used for prompting, in-context learning and instruction tuning is included in Table 2. It is a result of a simple prompt engineering based on prompt formats used in related work and their recommendations (Sun et al., 2023).
|
| 291 |
+
|
| 292 |
+
For in-context learning, we use as many samples per class as the context-size of the models allow. As increasing this number after a certain point results in degraded performance, we always report the best performance achieved up until the dataset subset. As such, in some cases, we report the performance using 2-shot in-context learning classification even on full datasets, while in others, we report 100-shot. This is often the case with GPT-4 model as it does not appear to benefit from increasing the number of in-context examples as much.
|
| 293 |
+
|
| 294 |
+
Instruction tuning is done using the Hugging-Face SFT trainer, with a learning rate of 1e-5 for 5 epochs using AdamW optimiser with warmup, batch size of 4 and early stopping, with a maximum of 250 steps per epoch for the Flan-T5 model (as we observed severe overfitting of Flan-T5 without this constraint on larger dataset sizes) and no maximum steps for the remaining models. For this tuning, we preprocess the dataset using the data collator in order to train only on the completions (as described in the documentation).
|
| 295 |
+
|
| 296 |
+
All of the general models (Flan-T5, LLaMA-2, LLaMA-3, GPT-4, Mistral-7B and Zephyr-7B) are set to be deterministic (e.g., using no sampling, no beam search and using deterministic temperature) and set maximum number of tokens for generation
|
| 297 |
+
|
| 298 |
+
to 10. In addition, due to the significant costs, we use 4-bit quantisation for the LLaMA-2 model. In case of Mistral-7B and Zephyr-7B, we use both the non-quantised version and the 4-bit quantised versions. For instruction-tuning we use only the 4-bit quantised versions of Mistral-7B and Zephyr-7B models due to the significant cost of training the models. The Flan-T5 model, the LLaMA-3 model and the GPT-4 model are always used with full-precision.
|
| 299 |
+
|
| 300 |
+
Finally, for better results and comparison presentation, we group the individual models by size. We define the following 3 sizes: 1) small, which includes the Flan-T5 model; 2) medium, which includes the Mistral-7B and Zephyr-7B models; and 3) large, which includes the LLaMA-2, LLaMA-3 and GPT-4 models.
|
| 301 |
+
|
| 302 |
+
Using subsets of different sizes. The way the different subsets of labelled training samples are used is dependent on the approach for learning with limited labelled data. In case of prompting, no training samples are utilised and as such the performance remains the same across regardless of the dataset size. In case of in-context learning, either all of the samples are used as in-context examples or, in case when the context-size of the model is not enough to use all samples, a subset of samples is randomly chosen. In case of fine-tuning, all the labelled samples are used for training. Finally, for instruction-tuning we combine the fine-tuning and prompting/in-context learning methodology, i.e., all of the samples are first used to tune the model and afterwards it is used through prompting and in-context learning the same as the models without parameter updates.
|
| 303 |
+
|
| 304 |
+
In-context learning results reported for the main experiments. As we observe that the 4-bit quantised models outperform the full-precision versions on some dataset, to make the results more understandable, we report them only for the best performing models. The results are reported in the following way (which can be determined from Figure 4):
|
| 305 |
+
|
| 306 |
+
- For in-context learning we report the results from 4-bit quantised Mistral and Zephyr on the SST2, BoolQ, and SNIPS datasets; from the 4-bit quantised Mistral on the MRPC and AG News datasets; and from the full-precision version for all the remaining combination.
|
| 307 |
+
- For prompting, we report the results from the
|
| 308 |
+
|
| 309 |
+
4-bit quantised version of Mistral and Zephyr only for the SST2 and DB Media datasets; from the 4-bit quantised Mistral for AG News datasets; from the 4-bit quantised Zephyr for the MRPC dataset; and from the full-precision version for all the remaining combinations.
|
| 310 |
+
|
| 311 |
+
# A.3 Model Computation Requirements
|
| 312 |
+
|
| 313 |
+
To allow for a fair comparison, the models and approaches used in this study were specifically chosen to require comparable computation for their whole use. For example, the full fine-tuning and evaluation of the smallest model (BERT) takes approximately the same amount of compute as using the smallest LLM (Flan-T5) through prompting. Similarly, instruction-tuning and further evaluation with the smallest LLM takes approximately the same amount of compute as using the larger LLMs through in-context learning. However, it is important to note that this holds true only when using a low number of shots for in-context learning (up to 2). Using more in-context examples leads to significantly larger computation costs. In Table 3 we provide an approximation of FLOPs for the approaches we use following the methodology from related papers, such as Brown et al. (2020); Dubey et al. (2024).
|
| 314 |
+
|
| 315 |
+
# B Effect of Model Size on Comparison and Dataset Dependence
|
| 316 |
+
|
| 317 |
+
Previous studies have observed that the size of the model significantly affects its ability to perform prompting and in-context learning. As such, in this section, we are interested in how the size of the model and other factors affect the comparisons, both in term of overall performance and variance, but also other properties as well. Instead of reporting results only for the best performing model for each approach, we group the models based on their size into small (Flan-T5), medium (Mistral/Zephyr) and large (LLaMA/GPT) and report the best performing model for each group. The results are included in Figure 5. In addition, we provide the results for the individual models for each approach and dataset in Figure 6.
|
| 318 |
+
|
| 319 |
+
First of all, larger models do not consistently lead to better performance across different approaches. With the fine-tuning, we observe the expected behaviour. On lower number of labelled samples (up to 20 - 100 depending on the dataset) the smaller BERT model is able to outperform the larger RoBERTa model. However, the larger model
|
| 320 |
+
|
| 321 |
+
<table><tr><td>Model</td><td>Approximate FLOPs</td></tr><tr><td>Fine-Tuning (BERT, RoBERTa)</td><td>270 T</td></tr><tr><td>Small general LM (Flan-T5) - Prompting</td><td>300 T</td></tr><tr><td>Medium general LM (Mistral/Zephyr) - Prompting</td><td>710 T</td></tr><tr><td>Large general LM (LLaMA2) - Prompting</td><td>1285 T</td></tr><tr><td>Small general LM (Flan-T5) - ICL</td><td>804 T</td></tr><tr><td>Medium general LM (Mistral/Zephyr) - ICL</td><td>1900 T</td></tr><tr><td>Large general LM (LLaMA2) - ICL</td><td>3400 T</td></tr><tr><td>Instruction-Tuning Small (Flan-T5)</td><td>1200 T</td></tr><tr><td>Instruction-Tuning Medium (Mistral/Zephyr)</td><td>2800 T</td></tr><tr><td>Quantised medium LM (Mistral/Zephyr) - Prompting</td><td>710 T (308 T)</td></tr><tr><td>Quantised medium LM (Mistral/Zephyr) - ICL</td><td>1900 T (826 T)</td></tr></table>
|
| 322 |
+
|
| 323 |
+
Table 3: Approximate FLOPs for different models and approaches we use that are required for their full use. As full use, we understand the full tuning and evaluation in the case of fine-tuning and instruction-tuning or only the evaluation in the case of prompting and in-context learning. For the quantised models, we report the effective FLOPs in parenthesis that are normalised by the bit-width.
|
| 324 |
+
|
| 325 |
+
can achieve the highest performance on the different datasets using fewer labelled samples. As such, the individual break-even points appear earlier for the larger fine-tuning models. On the other hand, in case of prompting, in-context learning and instruction-tuning, the smaller models are often able to achieve better or similar performance than the larger counterparts even though the different in the number of parameters is large. For example, in-context learning with small models (Flan-T5) on the AG News and SST2 dataset outperforms in-context learning with medium (Mistral-7B and Zephyr-7B) or large (LLaMA and GPT) models, while on the BoolQ dataset the situation is opposite. Similarly, instruction-tuning with medium models (Mistral-7B and Zephyr-7B) models often leads to similar or lower performance than the instruction-tuning of the small (Flan-T5) model.
|
| 326 |
+
|
| 327 |
+
This behaviour does not necessarily depend on the dataset characteristics. On some datasets that can be considered harder (longer inputs, more classes, harder tasks that require better language understanding), the Flan-T5 model in zero/few shot setting still outperforms the larger models, while on other datasets it underperforms them. The main impact of dataset characteristics is causing a 'failure mode' for specific models, where the smaller model does not perform at all at the task. For example, using in-context learning with small (Flan-T5) model on the DB-Pedia dataset always leads to prediction of a single class for all of the samples, with this behaviour disappearing when reducing
|
| 328 |
+
|
| 329 |
+
the number of classes, or using prompting. Similarly, in-context learning with the smaller (Flan-T5) model on the BoolQ dataset (which is characteristic with its longer input) shows a significantly higher variance. We believe the main culprit for this is the limited context size of the smaller model.
|
| 330 |
+
|
| 331 |
+
The impact of the model size is the most explicit for fine-tuning. On specific datasets that can be considered harder, the smaller BERT model performs significantly worse. For example, the BERT model on the BoolQ fails to outperform majority of the remaining approaches even when using the full dataset. However, this impact is minimal on the multi-class datasets.
|
| 332 |
+
|
| 333 |
+
Overall the number of required labelled samples is not consistently dependent on the size of the general models. For prompting and in-context learning, we observe many cases when the break-even point for the smaller model requires similar or even larger number of labelled samples than the medium or large models. For example, on the AG News dataset the number of required labelled samples for RoBERTa to outperform Flan-T5 in context learning is 300 (or 800 when taking the variance into consideration), while for the medium models it is only 100 and for large models it is 50. Similar observations are present in instruction tuning as well. Curiously, fine-tuning can often outperform the medium sized models (Mistral/Zephyr) with lower number of samples than the smallest Flan-T5 model. In addition, on the binary datasets, fine-tuning consistently requires the highest num
|
| 334 |
+
|
| 335 |
+

|
| 336 |
+
Figure 5: The impact of varying size of available labelled training samples (in logarithmic scale) on the performance of fine-tuning, prompting, in-context learning and instruction-tuning approaches across the binary (SST2, MRPC, CoLA, BoolQ) and multi-class datasets (AG News, TREC, SNIPS, DB Pedia), reported using F1 macro and its standard deviation. For each approach, we group the models based on their size into small (Flan-T5), medium (Mistral/Zephyr) and large (LLaMA/GPT) and report the best performing model for each group. Even though the effect of model size is often significant, it does not follow common assumption. The smaller models, especially in prompting, in-context learning and instruction-tuning, often achieve better performance than the medium or large general models.
|
| 337 |
+
|
| 338 |
+
ber of samples to outperform the largest models (LLaMA and GPT).
|
| 339 |
+
|
| 340 |
+
The benefit of increasing the number of in-context examples for in-context learning is affected by the size of the models as well. However, this benefit is, again, dataset dependent and is closely tied to the context length and the dataset characteristics. For example, on the binary datasets with shorter sentences (SST2/CoLA), the benefit of more samples is significantly higher than on the datasets with multiple classes or with longer sentences (BoolQ/DB Media). This also directly affects the benefit of instruction-tuning. Although the benefit is larger for the medium and large models, in many cases increasing the number of in-context samples only leads to these models to achieve performance similar to the one achieved by the smaller
|
| 341 |
+
|
| 342 |
+
model - i.e., for in-context learning with medium models, we require up to 100 samples to achieve performance comparable to small models that use only 10 labelled samples.
|
| 343 |
+
|
| 344 |
+
In addition, we do not observe consistent improvement of in-context learning (few-shot setting) over prompting (zero-shot setting). Instead, the performance difference is more dataset dependent. On the multi-class datasets, in-context learning is beneficial over prompting in majority of the cases. On the binary datasets, the benefit of in-context learning strongly depends on the models. At the same time, the improvement of in-context learning over prompting is minor in some cases (such as the increase in Flan-T5 on the SNIPS dataset from $42.5\%$ to $44.5\%$ ).
|
| 345 |
+
|
| 346 |
+
Finally, using larger models does not neces
|
| 347 |
+
|
| 348 |
+

|
| 349 |
+
Figure 6: The impact of varying size of available labelled training samples (in logarithmic scale) on the performance of fine-tuning, prompting, in-context learning and instruction-tuning approaches, reported using F1 macro and its standard deviation. All the models are presented for each approach.
|
| 350 |
+
|
| 351 |
+
sarily lead to lower performance variance. With the fine-tuning models, we observe the expected behaviour again. Larger model shows lower variance when using enough labelled data, but shows larger variance than the smaller model when dealing with limited data. The performance variance in prompting is similar across all the models, as there are almost no sources of randomness that could affect it. On the other hand, the variance in in-context learning is not as consistent. Comparing the smallest model (Flan-T5) and the largest models (LLaMA and GPT), we observe similar performance variance on majority of the datasets. Only on specific datasets the variance of FlanT5 is significantly higher (e.g., BoolQ) or significantly lower (AG News). At the same time, the variance of the medium sized models (Mistral-7B and Zephyr-7B) is often significantly higher than their smaller or larger counterparts. Finally, with instruction-tuning, we observe that the medium models (Mistral-7B and Zephyr-7B) often show
|
| 352 |
+
|
| 353 |
+
larger variance when compared to Flan-T5. Although this may be due to the different type of instruction-tuning (full tuning in Flan-T5 vs. LoRA tuning in Mistral/Zephyr), we observe similar behaviour of these models in the zero/few shot setting as well.
|
| 354 |
+
|
| 355 |
+
# C Effect of Quantisation on General Models
|
| 356 |
+
|
| 357 |
+
As the general large language models contain high number of parameters, it is a common practice to use their quantised versions instead to reduce the computation costs. Although some paper research focuses on observing how this affects the performance, the impact of quantisation on the comparison between models and the sensitivity to the effects of randomness is not well understood. Therefore, in this section, our aim is to determine how the use of quantised models affect the comparison and the overall sensitivity to the effects of randomness. To achieve this, we run the same ex
|
| 358 |
+
|
| 359 |
+

|
| 360 |
+
Figure 7: The comparison between 4-bit quantised and non-quantised Mistral-7B and Zephyr-7B models used for prompting across all datasets. Even though the non-quantised models achieve better performance, the difference in performance is minimal in almost all cases. In addition, the impact on the variance is negligible.
|
| 361 |
+
|
| 362 |
+
periment with 4-bit quantised and non-quantised versions of the Mistral-7B and Zephyr-7B models using the prompting and in-context learning and compare their average performance and variance. The results of this comparison are presented in Figure 7 for prompting and in Figure 4 for in-context learning.
|
| 363 |
+
|
| 364 |
+
The non-quantised models perform slightly better than 4-bit quantised models when it comes to prompting. The difference in performance between the 4-bit quantised and non-quantised models is minimal in almost all the cases, with non-quantised models achieving slightly higher performance. Only exception is the MRPC dataset, where the Zephyr 4-bit quantised model achieves better performance, and DB Media where both Mistral and Zephyr achieve higher performance. On the other hand, the non-quantised version of the Zephyr model achieves significantly higher performance on the BoolQ, CoLA and AG News datasets.
|
| 365 |
+
|
| 366 |
+
The impact of quantisation is less consistent for in-context learning. In contrast to prompting, the 4-bit quantised models used for in-context learning outperform their non-quantised versions more often. In addition, the difference in performance in such cases is often significantly higher. At the same time, when the quantised models do not outperform the non-quantised versions, the difference in performance is often small (only exception is the Zephyr model on the CoLA dataset).
|
| 367 |
+
|
| 368 |
+
Furthermore, the impact of quantisation on
|
| 369 |
+
|
| 370 |
+
the sensitivity to the effects of randomness and the performance variance it causes is negligible. In almost all cases, the observed standard deviation is similar regardless of the model version. In case the performance variance is different, the nonquantised models achieve higher performance. For example, the prompting of Zephyr model on the MRPC, BoolQ or AG News datasets. In case of in-context learning, the difference in performance variance is even less significant.
|
| 371 |
+
|
| 372 |
+
Finally, quantisation has no impact on how much the models benefit from increasing the number of in-context examples or their context length. In all cases, we observe similar increase in performance (and decrease in standard deviation) when increasing the number of examples. At the same time, we observe that both quantised and non-quantised versions of the models achieve the 'failure state' at the same number of samples. We believe this failure state corresponds to reaching the context size of the models, as on the datasets with longer sentences (BoolQ/DB Media), it is encountered sooner than on datasets with shorter sentences (SST2/CoLA). However, in many cases, the best performance of the model is achieved well before using the whole context size of the models.
|
| 373 |
+
|
| 374 |
+
We can conclude that the use of quantised models has minimal impact on the comparison between different approaches. As such, considering compute-efficiency and performance trade-off in the comparison, the quantised models should be preferred for the general large language models
|
| 375 |
+
|
| 376 |
+
whenever possible.
|
| 377 |
+
|
| 378 |
+
# D Impact Statement: CO2 Emissions Related to Experiments
|
| 379 |
+
|
| 380 |
+
The experiments presented in this paper used significant compute resources as they required multiple training and evaluation runs of multiple models (to deal with variance in results), as well as using large language models that requires a lot of computation even just for the inference. Overall, the experiments were conducted using a private infrastructure, which has a carbon efficiency of 0.432 $\mathrm{kgCO_2eq / kWh}$ (default value used as the actual efficiency of our HW instance was not measured). A cumulative of 4000 hours of computation was performed on hardware of type A100 PCIe 40GB (TDP of 250W). Total emissions are estimated to be $432\mathrm{kgCO_2eq}$ of which 0 percents were directly offset. This does not include the compute used by the GPT model behind API as we are not able to estimate these resources. These estimations were conducted using the MachineLearning Impact calculator presented in (Lacoste et al., 2019).
|
| 381 |
+
|
| 382 |
+
Whenever possible, we tried to reduce the compute resources used as much as possible. The most compute resources were used by the large language models – LLaMA-2, LLaMA-3, GPT-4, Mistral-7B and Zephyr-7B. As the prompting and in-context learning with these models resulted in quite stable results, we decided to evaluate them only on a single setting (using 1000 labelled training samples) and using a fraction of the whole test set (1000 test samples). In addition, for the GPT model, we evaluate only on 10 runs. Even in their reduced evaluation, these experiments used large fraction of the GPU hours. The most significant contributor was the instruction-tuning, especially with the medium sized models (Mistral/Zephyr), where we opted to reduce the number of steps and epochs used for the training.
|
comparingspecialisedsmallandgenerallargelanguagemodelsontextclassification100labelledsamplestoachievebreakevenperformance/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8446ce8367fedc10c54f4af84735d76e5be0fa264bc2539af0043038f31ea4d6
|
| 3 |
+
size 744381
|
comparingspecialisedsmallandgenerallargelanguagemodelsontextclassification100labelledsamplestoachievebreakevenperformance/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:09c203a5e5c6d2de99dc70c7e80d45c110a4288c3e6d2eaecdaf5ca601019f76
|
| 3 |
+
size 403464
|
compassverifieraunifiedandrobustverifierforllmsevaluationandoutcomereward/f10feb44-362d-4529-b375-4316927e36f0_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d0ba1fed67f1dc190e5466e407a599e0d8b26c9a7f92f94c37b842fa92b36e5c
|
| 3 |
+
size 175798
|
compassverifieraunifiedandrobustverifierforllmsevaluationandoutcomereward/f10feb44-362d-4529-b375-4316927e36f0_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b145ac5abc6e98c27468b68f0425791dc81b6e4ad746c9e39f086611f0155541
|
| 3 |
+
size 225624
|
compassverifieraunifiedandrobustverifierforllmsevaluationandoutcomereward/f10feb44-362d-4529-b375-4316927e36f0_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:71fa3c1e7cd66ba786de322afc3993c39a6c78ddc60fd8fa24ca6e94dbca4fc9
|
| 3 |
+
size 1119557
|
compassverifieraunifiedandrobustverifierforllmsevaluationandoutcomereward/full.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
compassverifieraunifiedandrobustverifierforllmsevaluationandoutcomereward/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:09992eaf9747a206f4e261394f8ea79adc2747db3a0bd55b39ae6b4be9da065e
|
| 3 |
+
size 1382079
|
compassverifieraunifiedandrobustverifierforllmsevaluationandoutcomereward/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f009aea722af8db08dabe8db9feb7de3db47f89c8b30564edaf68997c2e3c598
|
| 3 |
+
size 828798
|
compkbqacomponentwisetaskdecompositionforknowledgebasequestionanswering/f4d01b31-ad40-4ef7-8ec0-475affa6057f_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:55484e77e00e92a56d2f5231ba3f4312f85341816df3b0cd1cce00398cf32e7e
|
| 3 |
+
size 116587
|
compkbqacomponentwisetaskdecompositionforknowledgebasequestionanswering/f4d01b31-ad40-4ef7-8ec0-475affa6057f_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d81ada9bff203ebd0c86140692b54d2bb1fc7e1b3df7daf7daf992c1681dac44
|
| 3 |
+
size 138505
|
compkbqacomponentwisetaskdecompositionforknowledgebasequestionanswering/f4d01b31-ad40-4ef7-8ec0-475affa6057f_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2df1739836eac816fbd98bf90d0115040d4951878ce7bf677a1b8cd0954efe69
|
| 3 |
+
size 1795036
|
compkbqacomponentwisetaskdecompositionforknowledgebasequestionanswering/full.md
ADDED
|
@@ -0,0 +1,511 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# CompKBQA: Component-wise Task Decomposition for Knowledge Base Question Answering
|
| 2 |
+
|
| 3 |
+
Yuhang Tian $^{1}$ , Dandan Song $^{1*}$ , Zhijing Wu $^{1}$ , Pan Yang $^{1}$ , Changzhi Zhou $^{1}$ , Jun Yang $^{1}$ , Hao Wang $^{1}$ , Huipeng Ma $^{1}$ , Chenhao Li $^{1}$ , Luan Zhang $^{1}$
|
| 4 |
+
|
| 5 |
+
$^{1}$ School of Computer Science and Technology, Beijing Institute of Technology, China {tianyuhang,sdd}@bit.edu.cn
|
| 6 |
+
|
| 7 |
+
# Abstract
|
| 8 |
+
|
| 9 |
+
Knowledge Base Question Answering (KBQA) aims to extract accurate answers from the Knowledge Base (KB). Traditional Semantic Parsing (SP)-based methods are widely used but struggle with complex queries. Recently, large language models (LLMs) have shown promise in improving KBQA performance. However, the challenge of generating error-free logical forms remains, as skeleton, topic Entity, and relation Errors still frequently occur. To address these challenges, we propose CompKBQA (Component-wise Task Decomposition for Knowledge Base Question Answering), a novel framework that optimizes the process of fine-tuning a LLM for generating logical forms by enabling the LLM to progressively learn relevant sub-tasks like skeleton generation, topic entity generation, and relevant relations generation. Additionally, we propose $\mathbf{R}^3$ , which retrieves and incorporates KB information into the process of logical form generation. Experimental evaluations on two benchmark KBQA datasets, WebQSP and CWQ, demonstrate that CompKBQA achieves state-of-the-art performance, highlighting the importance of task decomposition and KB-aware learning.
|
| 10 |
+
|
| 11 |
+
# 1 Introduction
|
| 12 |
+
|
| 13 |
+
Knowledge Base Question Answering (KBQA) is a long-standing and pivotal problem in the field of natural language processing (NLP) (Chowdhary and Chowdhary, 2020). Its primary objective is to extract accurate or relevant answers to natural language questions by leveraging structured information stored in a Knowledge Base (KB), such as Freebase (Bollacker et al., 2008) and DBPedia (Auer et al., 2007). A traditional and widely used method for KBQA is Semantic Parsing based methods (SP-based methods) (Berant et al., 2013), which transform natural language questions into structured queries like SPARQL (Pérez et al., 2009)
|
| 14 |
+
|
| 15 |
+
or S-Expression (Gu et al., 2021) for direct execution on the KB. This process involves multiple stages: syntactic and semantic analysis, entity and relation linking, and query generation.
|
| 16 |
+
|
| 17 |
+
In the era of large language models (LLMs) (Zhao et al., 2023), the remarkable generative capabilities of these models have led to new progress in KBQA. Compared to traditional SP-based methods, LLM-based methods demonstrate superior performance and stronger generalization capabilities, particularly in handling complex and diverse queries. Recent methods like KB-BINDER (Li et al., 2023a), KB-Coder (Nie et al., 2024), QueryAgent (Huang et al., 2024), and ARG-KBQA (Tian et al., 2024) use LLMs to generate executable logical forms for KB queries. Another emerging approach, exemplified by ChatKBQA (Luo et al., 2024a), relies on fine-tuned LLMs to generate logical forms from input questions. Fine-tuning LLMs on labeled question-query pairs enables more effective learning of domain-specific query structures, compared to prompt-based methods that rely on in-context learning.
|
| 18 |
+
|
| 19 |
+
Despite advances in the field, current methods still struggle to generate completely accurate logical forms, with persistent errors in the output. We analyze the logical forms generated by ChatKBQA (Luo et al., 2024a) on the WebQSP dataset and find that, out of 1,639 questions in the test set, 624 corresponding Logical Forms contain errors, which mainly fall into three types, as illustrated in Figure 1: (1) Skeleton Errors occur when query components are incorrectly nested, misaligned with the KB schema, or when the overall structure of the query is inconsistent with the intended logical framework, appearing 276 times. (2) Entity Errors result from mismatches in surface forms, or the hallucination of non-existent entities, appearing 364 times. (3) Relation Errors arise when the model either misidentifies relations between enti
|
| 20 |
+
|
| 21 |
+

|
| 22 |
+
Figure 1: Examples of Errors in Logical Form Generation.
|
| 23 |
+
|
| 24 |
+
ties or generates non-existent relations, appearing 528 times.
|
| 25 |
+
|
| 26 |
+
These errors arise from the task's intrinsic complexities, the absence of structured intermediate reasoning steps, and the unavailability of explicit KB information during generation. The primary sources of error are as follows: (1) Coarse-Grained Task Formulation: Directly generating a complete logical form based on a natural language question is a coarse-grained task. Without prior learning through more fine-grained tasks, such as generating the skeleton of a logical form or identifying the topic entities, it is challenging for a LLM to generate the correct logical form in a single step. (2) Lack of KB-Aware Information During Generation: LLMs, which are predominantly trained on unstructured text, lack direct access to KB-specific information during the generation of logical forms. As a result, LLMs frequently produce hallucinated entities, relations, or query structures that do not exist in the KB, as demonstrated by the errors shown in Figure 1.
|
| 27 |
+
|
| 28 |
+
To address these challenges, we introduce a framework named CompKBQA: (Componentwise Task Decomposition for Knowledge Base Question Answering). Our framework is specifically designed to optimize the process of finetuning a large language model (LLM) for generating logical forms by enabling the LLM to progressively learn relevant sub-tasks and collect necessary information from KB to assist generation. For the Coarse-Grained Task Formulation, we propose CompKBQA framework. Specifically, we train the LLM to learn sequentially: first generating the skeleton of the logical form for a given question,
|
| 29 |
+
|
| 30 |
+
followed by the question's topic entity and relevant relations, and finally generating the full logical form based on these intermediate outputs. For the Lack of KB-Aware Information During Generation, we propose $\mathbf{R}^3$ : Relevant Relations Retriever. $\mathbf{R}^3$ retrieves relevant information from the KB and incorporates it into the process of logical form generation by the LLM, thereby guiding the LLM's generation process with KB knowledge.
|
| 31 |
+
|
| 32 |
+
We conduct experiments on two widely used datasets in the KBQA domain, WebQuestion-sSP (WebQSP) (Yih et al., 2016) and Complex WebQuestions (CWQ) (Talmor and Berant, 2018). The experimental results demonstrate that CompKBQA achieves state-of-the-art (SOTA) performance on both datasets, highlighting the effectiveness of providing LLMs with relevant KB information and decomposing the direct generation task into multiple training processes, which significantly enhances generation accuracy. Besides, we compare the time consumption of CompKBQA and ChatKBQA and find their efficiencies to be similar.
|
| 33 |
+
|
| 34 |
+
In summary, the contributions of our paper are as follows:
|
| 35 |
+
|
| 36 |
+
- We propose a novel KBQA framework: CompKBQA. In contrast to directly generating logical forms, our framework optimizes the process by enabling the LLM to learn subtasks step-wise, thereby reducing errors in logical form generation.
|
| 37 |
+
- We propose $\mathbf{R}^3$ , which collects question-related information from the KB. By incorporating KB information, the LLM becomes KB-aware during generation.
|
| 38 |
+
|
| 39 |
+
- We conduct experiments on two widely used KBQA datasets, WebQSP and ComplexWebQuestions (CWQ), and experimental results demonstrate that CompKBQA outperforms strong baselines, achieving state-of-the-art (SOTA) performance on both datasets.
|
| 40 |
+
|
| 41 |
+
# 2 Related Work
|
| 42 |
+
|
| 43 |
+
# 2.1 Traditional Semantic Parsing-Based KBQA
|
| 44 |
+
|
| 45 |
+
SP-based methods aim to convert natural language questions into query statements for KB, such as SPARQL or S-expressions. RnG-KBQA (Ye et al., 2022), TIARA (Shu et al., 2022), and DECAF (Yu et al., 2023a) leverage sequence-to-sequence models to fully generate S-expressions, introducing several enhancements to the semantic parsing process. FC-KBQA (Zhang et al., 2023) focuses on extracting fine-grained knowledge components from KB and reformulating them into intermediate knowledge pairs, which are then used to generate the final logical expressions. GMT-KBQA (Hu et al., 2022) introduces a multi-task generation-based approach that jointly learns entity disambiguation, relation classification, and logical form generation with dense retrieval.
|
| 46 |
+
|
| 47 |
+
# 2.2 LLM-Based KBQA
|
| 48 |
+
|
| 49 |
+
In the era of large language models (LLMs), many approaches leverage LLMs to generate logical forms for solving KBQA tasks. For example, Tan et al. (2023) utilize GPT-3.5 to directly generate answers to natural language questions, incorporating an answer matching strategy to improve prediction accuracy. Due to the remarkable few-shot learning and in-context learning capabilities of LLMs, some approaches (Gu et al., 2023; Li et al., 2023b; Nie et al., 2024; Jiang et al., 2023a; Xiong et al., 2024; Sun et al., 2023) leverage few-shot in-context learning to prompt LLMs to generate logical forms for given questions.
|
| 50 |
+
|
| 51 |
+
However, LLMs which are not specifically trained struggle to generate correct logical forms. ChatKBQA (Luo et al., 2024a) introduces a framework which fine-tunes the LLM to directly generate the logical form and retrieves information from KB during the execution. Triad (Zong et al., 2024) proposes a unified framework that utilizes an LLM-based agent with three roles (generalist, decision maker, and advisor) to collaboratively handle the four phases of KBQA: question parsing, URI
|
| 52 |
+
|
| 53 |
+
linking, query construction, and answer generation. KBQA-o1 (Luo et al., 2025) further advances agentic KBQA by introducing a ReAct-based process for stepwise logical form generation combined with Monte Carlo Tree Search (MCTS), which balances exploration performance and search space. By leveraging heuristic exploration and incremental fine-tuning, KBQA-o1 achieves strong performance in low-resource settings, substantially improving GrailQA results over prior methods.
|
| 54 |
+
|
| 55 |
+
Unlike ChatKBQA (Luo et al., 2024a), which fine-tunes the LLM to directly generate the logical form without referencing the KB during generation, and Triad (Zong et al., 2024), which utilizes multiple LLMs to collaboratively generate SPARQL queries, our proposed method fine-tunes a single LLM to progressively learn and generate sub-tasks related to the logical form. Additionally, KB information is incorporated during the generation process, effectively mitigating three types of errors in the generated logical form.
|
| 56 |
+
|
| 57 |
+
# 3 Preliminaries
|
| 58 |
+
|
| 59 |
+
In this section, we will introduce the two key components of KBQA: Knowledge Base (KB) and the Logical Form.
|
| 60 |
+
|
| 61 |
+
Knowledge Base (KB) The Knowledge Base stores knowledge as triples $(s, r, o)$ , where $s$ is an entity, $r$ is a relation, and $o$ is an entity or literal. Each entity has a unique mid, but the same friendly name can correspond to multiple mids. For example, Lebron James can refer to several entities, such as m.01jz6d, m.0gg7874, and m.03126m.
|
| 62 |
+
|
| 63 |
+
Logical Form A Logical Form is a query that can be executed on the KB to retrieve results for a natural language question. Common forms include SPARQL and S-Expressions. For example, an S-Expression aggregates various operators, such as JOIN, AND, ARGMAX, ARGMIN, and others. The JOIN operator represents a one-hop query of a triple $(s,r,o)$ on either $s$ or $o$ . Specifically, $(?,r,o)$ is denoted as (JOIN $r o$ ), while $(s,r,?)$ is denoted as (JOIN $(R r)s$ ). The AND operator computes the intersection of two entity sets. Besides, other operators like ARGMAX and ARGMIN filter results from entity set. In this paper, we represent the entities using their friendly names.
|
| 64 |
+
|
| 65 |
+
# 4 Methodology
|
| 66 |
+
|
| 67 |
+
Our approach, as illustrated in Figure 2, consists of two main modules: Logical Form Generation
|
| 68 |
+
|
| 69 |
+
and Logical Form Execution for answer retrieval. The logical form generation process is carried out through four stages: (1) Skeleton Generation, where the structural template of the logical form is produced, (2) Topic Entity Generation, which identifies the key entity in the question, (3) Relevant Relations Generation, including relation retrieval and question-specific relation prediction, and (4) Logical Form Generation, where entities and relations are integrated into a complete logical form. To accomplish these tasks, we progressively fine-tune a Large Language Model (LLM) through instruction tuning, as shown in the left of Figure 2. In the execution phase, the generated logical form is matched with the knowledge base (KB), and candidate entities and relations are scored to retrieve the final answer.
|
| 70 |
+
|
| 71 |
+
# 4.1 Skeleton Generation
|
| 72 |
+
|
| 73 |
+
The primary objective of this part is to generate the logical form skeleton, where entities and relations are replaced with placeholders. Specifically, for the questions in the training set, we replace the relations in logical forms with [REL] and the entities with [ENT], thereby constructing training data from questions to skeletons. As shown in Figure 2, for the question "what did nicolas cage name his son?", the corresponding logical form is:
|
| 74 |
+
|
| 75 |
+
(AND (JOIN (R people.person.children) m.01vvb4m)
|
| 76 |
+
(JOIN people.person.gender m.05zppz)),
|
| 77 |
+
|
| 78 |
+
while its corresponding skeleton is:
|
| 79 |
+
|
| 80 |
+
(AND (JOIN (R [REL]) [ENT]) (JOIN [REL] [ENT]))
|
| 81 |
+
|
| 82 |
+
By extracting the skeletons of logical forms, we eliminate specific entity and relation details, allowing the model to focus on structural patterns. We then apply Instruction Tuning to the LLM, and the fine-tuned LLM is denoted as $M_{\text{skeleton}}$ .
|
| 83 |
+
|
| 84 |
+
# 4.2 Topic Entity Generation
|
| 85 |
+
|
| 86 |
+
Previous work, such as ChatKBQA (Luo et al., 2024a), has highlighted entity errors as a common challenge when fine-tuning LLMs for logical form generation. To address this, we introduce a task where the LLM learns to generate the Topic Entity from the input question. For each training question, we extract the entities in its logical form as Topic Entities, which are then used for training. We fine-tune $M_{\text{skeleton}}$ with question-entity pairs, resulting in the model $M_{te}$ . The Topic Entity is represented by its surface name rather than the mid identifier. For example, in the question "What did
|
| 87 |
+
|
| 88 |
+
Nicolas Cage name his son?”, the Topic Entities are “Nicolas Cage” and “male”, key components of the corresponding logical form. Notably, the Topic Entity may not always be explicitly mentioned in the question. This task also enables the model to identify latent entities, those not directly stated but implied or inferred from the context, improving its robustness in handling such cases.
|
| 89 |
+
|
| 90 |
+
# 4.3 Relevant Relations Generation
|
| 91 |
+
|
| 92 |
+
In this section, the primary task is to retrieve and then generate the most relevant relation from the KB for a given question. The process is broken down into the following stages: Stage 1: Relevant Relations Retrieval: We propose a novel retriever named $\mathbf{R}^3$ , which is used to retrieve more relevant relations from the KB for questions. The training of $\mathbf{R}^3$ will be explained in detail in this section.
|
| 93 |
+
|
| 94 |
+
Stage 2: Question-Specific Relations Generation: In this stage, the LLM learns to generate the relations necessary to solve the problem based on the question and the relations retrieved by $\mathbf{R}^3$ .
|
| 95 |
+
|
| 96 |
+
# 4.3.1 Stage 1: Relevant Relations Retrieval
|
| 97 |
+
|
| 98 |
+
The primary goal of this stage is to train a retriever denoted as $\mathbf{R}^3$ , involving identifying hard negative examples, fine-tuning the embedding model to differentiate relevant relations from irrelevant ones. And then we use $\mathbf{R}^3$ to retrieve more relevant relations from the KB.
|
| 99 |
+
|
| 100 |
+
Mining Hard Negative Examples In this stage, we aim to identify hard negative examples, which are relations similar to the golden relations but irrelevant to the question. For each question $q$ , we perform an initial retrieval to identify these hard negatives. We define an embedding model $M$ that encodes both $q$ and all the relations $r \in R$ from the KB. The relations are ranked based on the cosine similarity between their vector representations, and the top $k$ relations as selected as candidate relations for further processing. The cosine similarity between the question embedding $\mathbf{v_q}$ and the relation embedding $\mathbf{v_r}$ is computed as
|
| 101 |
+
|
| 102 |
+
$$
|
| 103 |
+
\operatorname {c o s i n e \_ s i m i l a r i t y} (\mathbf {v _ {q}}, \mathbf {v _ {r}}) = \frac {\mathbf {v _ {q}} \cdot \mathbf {v _ {r}}}{\| \mathbf {v _ {q}} \| \| \mathbf {v _ {r}} \|}. \tag {1}
|
| 104 |
+
$$
|
| 105 |
+
|
| 106 |
+
The top-ranked relations obtained from this similarity computation, denoted as $Relini$ , serve as the basis for the subsequent fine-tuning of the embedding model.
|
| 107 |
+
|
| 108 |
+
Once the initial set of candidate relations $Rel_{ini}$ is obtained, the corresponding golden relations
|
| 109 |
+
|
| 110 |
+

|
| 111 |
+
Figure 2: Overview of CompKBQA. CompKBQA is composed of two main components: Logical Form Generation and Logical Form Execution. The Logical Form Generation component is further divided into four distinct stages.
|
| 112 |
+
|
| 113 |
+
$Rel_{golden}$ for each question $q$ are acquired from the training data, which means relations in $q$ 's logical form. For each question, the relations in $Rel_{ini}$ but not in $Rel_{golden}$ are treated as negative samples, denoted as $Rel_{neg}$ , while the relations in $Rel_{golden}$ are considered as positive samples, denoted as $Rel_{pos}$ . Formally, we define:
|
| 114 |
+
|
| 115 |
+
$$
|
| 116 |
+
R e l _ {n e g} = \left\{r \in R e l _ {1 s t} \mid r \notin R e l _ {g o l d e n} \right\}
|
| 117 |
+
$$
|
| 118 |
+
|
| 119 |
+
$$
|
| 120 |
+
R e l _ {p o s} = R e l _ {g o l d e n}
|
| 121 |
+
$$
|
| 122 |
+
|
| 123 |
+
Fine-tuning the Embedding Model We then fine-tune the embedding model $M$ (BAAI/bgelarge-en-v1.5) by optimizing a contrastive learning loss to distinguish between positive and negative samples. The loss function is defined as:
|
| 124 |
+
|
| 125 |
+
$$
|
| 126 |
+
L = - \sum_ {i} \log \frac {e ^ {\operatorname {s i m} \left(\mathbf {v} _ {\mathbf {q}} , \mathbf {v} _ {\mathrm {r e l} _ {\mathbf {i}}}\right) / \tau}}{\sum_ {j} e ^ {\operatorname {s i m} \left(\mathbf {v} _ {\mathbf {q}} , \mathbf {v} _ {\mathrm {r e l} _ {\mathbf {j}}}\right) / \tau}}, \tag {2}
|
| 127 |
+
$$
|
| 128 |
+
|
| 129 |
+
where $\mathrm{sim}(\mathbf{v_q},\mathbf{v}_{\mathrm{rel}})$ represents the cosine similarity between the question embedding $\mathbf{v_q}$ and relation embedding $\mathbf{v}_{\mathrm{rel}}$ , and $\tau$ is a temperature scaling parameter.
|
| 130 |
+
|
| 131 |
+
This fine-tuning process enhances the model's ability to correctly differentiate between relevant and irrelevant relations, resulting in the fine-tuned embedding model $\mathbf{R}^3$ .
|
| 132 |
+
|
| 133 |
+
Retrieving Candidate Relations In this final stage, the fine-tuned embedding model $\mathbf{R}^3$ is employed to retrieve relevant candidate relations. For each question $q$ , similarly, we encode both the question and all the relations $r \in R$ from the KB using $\mathbf{R}^3$ to obtain their vector representations $\mathbf{v1_q}$ and $\mathbf{v1_r}$ . The cosine similarity between these vectors is calculated, and the top $k$ most relevant relations are selected as $Rel_{new}$ . It is important to note that $Rel_{new}$ is retrieved directly from the KB, rather than being based on the initial set $Rel_{ini}$ . These candidate relations are then forwarded to the next stage for final selection and generation.
|
| 134 |
+
|
| 135 |
+
# 4.3.2 Stage 2: Question-Specific Relations Generation
|
| 136 |
+
|
| 137 |
+
Although $\mathbf{R}^3$ retrieves highly relevant relations for the query, the retrieved results inevitably contain some noise (irrelevant relations). Therefore, it is essential for LLMs to select or generate truly relevant relations from noisy candidate relations set.
|
| 138 |
+
|
| 139 |
+
Specifically, we train the model $M_{te}$ using a dataset where each instance consists of a question paired with candidate relations as input and the corresponding golden relations as output. In the prompt, we specify that the model should generate the correct question-relevant relations based on the candidate relations. It is allowed to select relations from the candidate set, and if necessary relations
|
| 140 |
+
|
| 141 |
+
are missing, it can generate new ones. The specific prompt can be found in the Case Study I. This finetuning process results in the model $M_{rg}$ (relation generation), which enhances the model's ability to accurately generate the correct relation based on the retrieved candidates, addressing the issue of noisy or irrelevant relations.
|
| 142 |
+
|
| 143 |
+
# 4.4 Logical Form Generation
|
| 144 |
+
|
| 145 |
+
In this stage of training, starting with $M_{rg}$ , we finetune the model to generate the final logical form, resulting in the model $M_{lf}$ . The input consists of the question, the topic entity produced by $M_{te}$ , and the relations generated by $M_{rg}$ . The objective of fine-tuning is to enable the model to generate the correct logical form based on the provided question and content.
|
| 146 |
+
|
| 147 |
+
During inference, we apply $M_{lf}$ with inputs consistent with those used in training and apply beam search to generate the logical forms.
|
| 148 |
+
|
| 149 |
+
# 4.5 Logical Form Execution
|
| 150 |
+
|
| 151 |
+
After generating the logical form candidates, we need to address potential misalignments between the entities (represented by their surface names) and the relations, which may not necessarily match those in the KB. Thus, it is crucial to map the entities in the logical form to their corresponding mid-identifiers and align the relations with the actual relations in the KB before execution.
|
| 152 |
+
|
| 153 |
+
Entity Alignment In this phase, for a given surface name $N_{ent}$ , we first check for exact matches in the KB. If any entities share the same name, we assign the $N_{ent}$ to $E_{same}$ and select the top- $k_{ent}$ entities, $E_{cand}$ , based on their popularity score, FACC1 (Gabrilovich et al., 2013). If no exact match exists, we apply the BM25 (Robertson et al., 2009) algorithm to select the most similar entities from the KB using $N_{ent}$ . We then apply the FACC1 score again to select the $top_{k_{ent}}$ entities as $E_{cand}$ .
|
| 154 |
+
|
| 155 |
+
Relation Alignment In the relation alignment phase, for each $N_{rel}$ , if an identical relation exists in the KB, no replacement is made. If no exact match is found, we use SimCSE (Gao et al., 2021) to identify the $top_{k_{rel}}$ relations, denoted as $R_{cand}$ , that are most similar to $N_{rel}$ .
|
| 156 |
+
|
| 157 |
+
After completing both alignment stages, we generate combinations of entities and relations from the $E_{cand}$ and $R_{cand}$ sets, selecting the top $-k_{lf}$ combinations for execution. The execution stops as soon as a non-empty result is obtained, and this
|
| 158 |
+
|
| 159 |
+
result is taken as the final answer, denoted as the answer set. If no valid answer is found, an empty set is returned.
|
| 160 |
+
|
| 161 |
+
# 5 Experiments
|
| 162 |
+
|
| 163 |
+
In this section, we present the experimental validation of CompKBQA, which includes dataset descriptions, implementation details, results, and a comprehensive analysis. Our analysis is organized around the following four research questions (RQs): RQ1: How does CompKBQA perform in comparison to other approaches, and does it mitigate errors in the generated Logical Forms? RQ2: How effective is the approach of decomposing direct logical form generation into progressively learned sub-tasks? RQ3: Does $\mathbf{R}^3$ enhance relation retrieval? RQ4: Can CompKBQA achieve high efficiency and be plug-and-play?
|
| 164 |
+
|
| 165 |
+
Besides, we provide a case study in Appendix I to illustrate the reasoning process of our framework. In addition, Appendix F presents an efficiency analysis of our method, and Appendix G reports the experimental results obtained with the T5 model, which further verify the necessity of leveraging LLMs in our approach.
|
| 166 |
+
|
| 167 |
+
# 5.1 Datasets
|
| 168 |
+
|
| 169 |
+
We conduct experiments using two widely used KBQA datasets: WebQuestionsSP (WebQSP) (Yih et al., 2016), a well-known KBQA dataset based on Freebase, containing 4,737 natural language questions and their corresponding SPARQL queries, and Complex WebQuestions (CWQ) (Talmor and Berant, 2018), also based on Freebase, which includes 34,689 natural language questions and their corresponding SPARQL queries. The details of these datasets are provided in Appendix A.
|
| 170 |
+
|
| 171 |
+
# 5.2 Baselines
|
| 172 |
+
|
| 173 |
+
We compare CompKBQA against 25 methods, which are categorized into five major groups: 1) IR-based KBQA Methods, 2) SP-based KBQA Methods, 3) LLM-based KBQA Methods (Prompting), where we employ the same setup as RoG (Luo et al., 2024b), in which the LLM is directly used to generate answers for the given questions; 4) LLMs + KGs-based KBQA Methods (Prompting), where it is important to note that GPT-4o (1-shot) and DeepSeek-V3 (1-shot) involve inputting the skeleton, topic entities, and relevant relations generated
|
| 174 |
+
|
| 175 |
+
by our model into the LLM to generate the logical form; and 5) LLMs + KGs-based KBQA Methods (Fine-tuning). Detailed descriptions of each baseline method can be found in Appendix B.
|
| 176 |
+
|
| 177 |
+
# 5.3 Evaluation Metric
|
| 178 |
+
|
| 179 |
+
Consistent with prior work, we use F1 score, Hits@1, and Accuracy (Acc) to measure the coverage of all answers, the top-ranked answer, and the strict exact-match accuracy, respectively.
|
| 180 |
+
|
| 181 |
+
# 5.4 Implementation Details
|
| 182 |
+
|
| 183 |
+
During LLM fine-tuning, we use LLaMA-2-7B for WebQSP and LLaMA-2-13B for CWQ as the base model, following the setup of ChatKBQA (Luo et al., 2024a). For the Relevant Relations Retrieval stage, we fine-tune the embedding model with BAAI/bge-large-en-v1.5. All experiments are run on two NVIDIA A6000 GPUs. Implementation details are provided in Appendix H.
|
| 184 |
+
|
| 185 |
+
# 5.5 Main Results (RQ1)
|
| 186 |
+
|
| 187 |
+
As shown in Table 1, we compare CompKBQA with other baselines on the WebQSP and CWQ datasets. Consistent with ChatKBQA (Luo et al., 2024a), we use beam search during the inference phase: a beam size of 15 on LLaMA-2-7B for WebQSP and a beam size of 8 on LLaMA-2-13B for CWQ. Compared to the best baseline model, our method achieves a $0.6\%$ increase in F1 and a $2.1\%$ improvement in ACC on WebQSP. On CWQ, CompKBQA outperforms the best baseline with a $1.6\%$ increase in F1, a $1.1\%$ improvement in Hits@1, and a $2.8\%$ improvement in ACC. These results demonstrate that, through our component-wise task decomposition, the LLM gains a better understanding of the logical structure of questions, while also narrowing the gap between the question and the KB schema (relations and entities) from the LLM's perspective.
|
| 188 |
+
|
| 189 |
+
At the same time, as shown in Table 1, even powerful models like GPT-4o and DeepSeek-V3 struggle to generate the correct logical form, despite being provided with the skeleton, topic entities, and relevant relations. Detailed analysis is shown in Appendix D.
|
| 190 |
+
|
| 191 |
+
Furthermore, we conduct a comparative analysis of the number of distinct error types in the Logical Forms generated by CompKBQA and ChatKBQA on the WebQSP dataset, as detailed in the Table 2. As shown in the table, the three types of errors, including Skeleton Errors, Topic Entity Errors,
|
| 192 |
+
|
| 193 |
+
<table><tr><td rowspan="2">Model</td><td colspan="3">WebQSP</td><td colspan="3">CWQ</td></tr><tr><td>F1</td><td>Hits@1</td><td>Acc</td><td>F1</td><td>Hits@1</td><td>Acc</td></tr><tr><td colspan="7">IR-based KBQA Methods</td></tr><tr><td>NSM</td><td>62.8</td><td>68.7</td><td>-</td><td>42.4</td><td>47.6</td><td>-</td></tr><tr><td>KGT5</td><td>-</td><td>56.1</td><td>-</td><td>-</td><td>36.5</td><td>-</td></tr><tr><td>Subgraph Retrieval*</td><td>64.1</td><td>69.5</td><td>-</td><td>47.1</td><td>50.2</td><td>-</td></tr><tr><td colspan="7">SP-based KBQA Methods</td></tr><tr><td>ArcaneQA</td><td>75.6</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td></tr><tr><td>RnG-KBQA</td><td>75.6</td><td>-</td><td>71.1</td><td>-</td><td>-</td><td>-</td></tr><tr><td>DecAF</td><td>78.8</td><td>82.1</td><td>-</td><td>-</td><td>70.4</td><td>-</td></tr><tr><td>FC-KBQA</td><td>76.9</td><td>-</td><td>-</td><td>56.4</td><td>-</td><td>-</td></tr><tr><td>TIARA*</td><td>78.9</td><td>75.2</td><td>-</td><td>-</td><td>-</td><td>-</td></tr><tr><td colspan="7">LLMs-based Methods (Prompting)</td></tr><tr><td>GPT-3.5-Turbo</td><td>-</td><td>67.8</td><td>-</td><td>-</td><td>39.8</td><td>-</td></tr><tr><td>GPT-3.5-Turbo+CoT</td><td>-</td><td>69.0</td><td>-</td><td>-</td><td>-</td><td>-</td></tr><tr><td>GPT-4o</td><td>-</td><td>71.2</td><td>-</td><td>-</td><td>50.6</td><td>-</td></tr><tr><td>GPT-4o+CoT</td><td>-</td><td>71.4</td><td>-</td><td>-</td><td>53.2</td><td>-</td></tr><tr><td>DeepSeek-V3</td><td>-</td><td>72.1</td><td>-</td><td>-</td><td>53.0</td><td>-</td></tr><tr><td>DeepSeek-V3+CoT</td><td>-</td><td>73.3</td><td>-</td><td>-</td><td>55.9</td><td>-</td></tr><tr><td colspan="7">LLMs+KGs-based Methods (Prompting)</td></tr><tr><td>GPT-4o (1-shot)</td><td>11.5</td><td>11.0</td><td>10.3</td><td>-</td><td>-</td><td>-</td></tr><tr><td>DeepSeek-V3(1-shot)</td><td>13.7</td><td>14.3</td><td>12.4</td><td>-</td><td>-</td><td>-</td></tr><tr><td>KB-Binder</td><td>74.4</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td></tr><tr><td>KB-Coder</td><td>75.2</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td></tr><tr><td>QueryAgent*</td><td>63.9</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td></tr><tr><td>ARG-KBQA</td><td>75.6</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td></tr><tr><td>KELDaR</td><td>76.7</td><td>-</td><td>-</td><td>44.2</td><td>-</td><td>-</td></tr><tr><td>FIDELIS</td><td>78.3</td><td>84.4</td><td>-</td><td>64.3</td><td>71.5</td><td>-</td></tr><tr><td colspan="7">LLMs+KGs-based Methods (Fine-tuning)</td></tr><tr><td>RoG</td><td>70.8</td><td>85.7</td><td>-</td><td>56.2</td><td>62.6</td><td>-</td></tr><tr><td>ReasoningLM</td><td>71.0</td><td>78.5</td><td>-</td><td>64.0</td><td>69.0</td><td>-</td></tr><tr><td>ChatKBQA</td><td>79.8</td><td>83.2</td><td>73.8</td><td>77.8</td><td>82.7</td><td>73.3</td></tr><tr><td>RGR-KBQA</td><td>80.7</td><td>84.5</td><td>72.1</td><td>76.6</td><td>82.0</td><td>72.2</td></tr><tr><td>CompKBQA(ours)</td><td>81.3</td><td>84.2</td><td>75.9</td><td>79.4</td><td>83.6</td><td>76.1</td></tr></table>
|
| 194 |
+
|
| 195 |
+
Table 1: KBQA comparison of CompKBQA with other baselines on WebQSP and CWQ datasets. The results of the models are mainly taken from their original paper. * denotes using oracle entity linking annotations. Bold numbers indicate the best performance. GPT-4o (1-shot) and DeepSeek-V3 (1-shot) means that we input skeleton, topic entities, and relevant relations to LLM to directly generate the logical form.
|
| 196 |
+
|
| 197 |
+
<table><tr><td>Model</td><td>Skeleton</td><td>Entity</td><td>Relation</td></tr><tr><td>ChatKBQA</td><td>276</td><td>364</td><td>528</td></tr><tr><td>CompKBQA</td><td>262</td><td>232</td><td>451</td></tr><tr><td>Δ</td><td>↓5.1%</td><td>↓36.3%</td><td>↓14.6%</td></tr></table>
|
| 198 |
+
|
| 199 |
+
Table 2: Comparison of Skeleton, Entity, and Relation Error Counts in Logical Forms by ChatKBQA and CompKBQA on WebQSP
|
| 200 |
+
|
| 201 |
+
and Relation Errors, have been mitigated, which demonstrates the effectiveness of CompKBQA.
|
| 202 |
+
|
| 203 |
+
# 5.6 Ablation Study (RQ2)
|
| 204 |
+
|
| 205 |
+
To validate the effectiveness of each component of CompKBQA, we conduct the following ablation experiments on the WebQSP dataset.
|
| 206 |
+
|
| 207 |
+
Comparison with Direct Generation of All
|
| 208 |
+
|
| 209 |
+
<table><tr><td>Model</td><td>F1</td><td>Hits@1</td><td>Acc</td></tr><tr><td>CompKBQA</td><td>81.3</td><td>84.2</td><td>75.9</td></tr><tr><td>all_in_output</td><td>79.6</td><td>82.6</td><td>72.4</td></tr><tr><td>all_from_base</td><td>80.3</td><td>83.3</td><td>74.2</td></tr><tr><td>w/o ske_gen</td><td>77.7</td><td>80.7</td><td>72.4</td></tr><tr><td>w/o topic-entity_gen</td><td>78.6</td><td>82.1</td><td>72.7</td></tr><tr><td>w/o rrg & rr</td><td>78.6</td><td>81.6</td><td>73.2</td></tr><tr><td>w/o rrg & w gr</td><td>90.5</td><td>91.9</td><td>87.4</td></tr></table>
|
| 210 |
+
|
| 211 |
+
Table 3: Ablation study results of CompKBQA components. "all_in_output" refers to generating all content in one step. "all_from_base" refers to $M_{te}$ , $M_{rg}$ , and $M_{skeleton}$ were trained independently from the same base model. "w/o ske_gen" removes the skeleton generation module, "w/o topic_structure_gen" removes the topic entity generation module, "w/o rrg & rr" removes relevant relations generation and relations, and "w/o rrg & w_gr" removes relevant relations generation and uses golden relations.
|
| 212 |
+
|
| 213 |
+
Content We use the question as input and generate the Logical Form Skeleton, Topic Entity, Candidate Relations, and Logical Form as outputs, finetuning the LLM using instruction tuning. This model, called "all_in_output", shows a significant performance drop compared to the multi-stage finetuning approach, as seen in Table 3. This highlights that even with a Chain-of-Thought (COT) (Wei et al., 2022) reasoning process, the LLM struggles to generate the correct Logical Form in one step, underscoring the need for task decomposition in CompKBQA.
|
| 214 |
+
|
| 215 |
+
Effectiveness of Skeleton and Topic Entity Generation We experiment by removing Skeleton Generation, referred to as 'w/o ske_gen (skeleton generation)', and Topic Entity Generation, referred to as 'w/o topic_ent_gen (Topic Entity Generation)', and compare their performance with the CompKBQA model. The detailed results are presented in Table 3. The results demonstrate the necessity of training for skeleton generation and topic entity generation. In Appendix E, we analyze the transferability of the training in these two stages.
|
| 216 |
+
|
| 217 |
+
Effectiveness of the chained fine-tuning strategy To validate the effectiveness of the chained fine-tuning strategy, we conduct experiments on WebQSP with a model variant referred to as all_from_base. In this setting, $M_{te}$ , $M_{rg}$ , and $M_{skeleton}$ are trained independently from the same base model, while the generation of Logical Forms is fine-tuned by using the outputs of $M_{te}$ and $M_{rg}$ as inputs for $M_{skeleton}$ . The results, reported in Table 3 under the all_from_base row, show that training models independently from a base model
|
| 218 |
+
|
| 219 |
+
leads to a noticeable performance drop compared to our chained fine-tuning approach. This finding confirms that knowledge transfer indeed occurs throughout the chained training process.
|
| 220 |
+
|
| 221 |
+
Effectiveness of Relevant Relations Selection We conduct two ablation study experiments. The first, "w/o rele.Rel_gen (relevant relations generation) & rele.Rel (relevant relations)", removes the Relevant Relations Generation module, omitting relevant relations during the Logical Form Generation stage. The second, "w/o rele.Rel_gen & w gold.Rel (golden relations)", removes the module and inputs the golden relations directly. As shown in Table 3, the first experiment performs significantly worse than the CompKBQA model, while the second yields better results. These findings suggest that providing relevant relations helps the LLM generate more accurate logical forms.
|
| 222 |
+
|
| 223 |
+
5.7 Effectiveness of $\mathbf{R}^3$ (RQ3)
|
| 224 |
+
|
| 225 |
+
<table><tr><td>Model</td><td>Top-3</td><td>Top-5</td><td>Top-10</td><td>Top-20</td></tr><tr><td>BM25</td><td>5.00%</td><td>5.67%</td><td>6.47%</td><td>14.03%</td></tr><tr><td>SimCSE</td><td>15.62%</td><td>21.23%</td><td>28.74%</td><td>36.24%</td></tr><tr><td>Contriever</td><td>14.21%</td><td>19.71%</td><td>25.87%</td><td>32.52%</td></tr><tr><td>IEM</td><td>22.76%</td><td>29.47%</td><td>38.87%</td><td>47.53%</td></tr><tr><td>R³</td><td>69.74%</td><td>77.12%</td><td>83.10%</td><td>86.03%</td></tr></table>
|
| 226 |
+
|
| 227 |
+
Table 4: Comparison of relation retrieval performance on WebQSP
|
| 228 |
+
|
| 229 |
+
To evaluate the effectiveness of $\mathbf{R}^3$ , we compare its retrieval accuracy on the WebQSP dataset against BM25, SimCSE, Contriever, and the initial embedding model (denoted by IEM) by calculating the proportion of retrieved relations that match the ground-truth relations for each question. As shown in Table 4, the original BAAI/bgelarge-en-v1.5 model achieves only a $22.76\%$ top-3 hit rate, while $\mathbf{R}^3$ substantially improves this to $69.74\%$ and consistently achieves superior performance across all retrieval metrics, obtaining $69.74\%$ , $77.12\%$ , $83.10\%$ , and $86.03\%$ on Top-3, Top-5, Top-10, and Top-20 hit rates, respectively, significantly outperforming all baselines.
|
| 230 |
+
|
| 231 |
+
# 5.8 Can CompKBQA achieve high efficiency and be plug-and-play? (RQ4)
|
| 232 |
+
|
| 233 |
+
Efficiency analysis To ensure a fair comparison, we evaluate the training and inference times for both ChatKBQA and CompKBQA on the WebQSP dataset, using a single NVIDIA A6000 GPU. The total training time for ChatKBQA was 14 hours
|
| 234 |
+
|
| 235 |
+
<table><tr><td>Model</td><td>F1</td><td>Hits@1</td><td>Acc</td></tr><tr><td>Flan-T5-XL</td><td>76.8</td><td>75.1</td><td>67.7</td></tr><tr><td>LLama2-7B</td><td>81.3</td><td>84.2</td><td>75.9</td></tr><tr><td>LLaMA-3.1-8B</td><td>81.7</td><td>84.5</td><td>75.8</td></tr><tr><td>Qwen-2.5-7B</td><td>81.8</td><td>84.3</td><td>75.4</td></tr><tr><td>LLaMA-3-8B</td><td>82.0</td><td>84.4</td><td>76.1</td></tr></table>
|
| 236 |
+
|
| 237 |
+
Table 5: Comparison of results between other models and LLaMA2-7B
|
| 238 |
+
|
| 239 |
+
and 16 minutes, while the total training time for CompKBQA was 19 hours and 46 minutes, with CompKBQA taking slightly longer. The average inference time for ChatKBQA was 3.43 seconds, and the average inference time for CompKBQA was 4.20 seconds, with both having similar speeds. The detailed results are presented in Table 8 and Table 9, respectively.
|
| 240 |
+
|
| 241 |
+
The plug-and-play characteristics To evaluate the adaptability of CompKBQA with different base models, we conduct experiments employing Flant5-XL, LLaMA-3-8B, LLaMA-3.1-8B, and Qwen2.5-7B within the CompKBQA pipeline on the WebQSP dataset. The results of these experiments are presented in Table 5. As evidenced by the results, CompKBQA consistently achieves promising performance across these diverse base models, thereby highlighting its plug-and-play characteristics.
|
| 242 |
+
|
| 243 |
+
# 6 Conclusion
|
| 244 |
+
|
| 245 |
+
In this work, we propose CompKBQA, a novel framework that decomposes the task of fine-tuning large language models (LLMs) for KBQA into four core components: Skeleton Generation, Topic Entity Generation, Relevant Relations Selection, and Logical Form Generation. By breaking down the process into these subtasks, we address key challenges including the lack of KB-aware information and coarse-grained task formulation. Experimental results on WebQSP and CWQ demonstrate that CompKBQA achieves state-of-the-art performance, highlighting the effectiveness of task decomposition and providing LLMs with relevant KB information.
|
| 246 |
+
|
| 247 |
+
# Limitations
|
| 248 |
+
|
| 249 |
+
In this paper, we introduce CompKBQA, a novel framework that decomposes the task of fine-tuning large language models (LLMs) for Knowledge Base Question Answering (KBQA) into four core components. While CompKBQA demonstrates sig-
|
| 250 |
+
|
| 251 |
+
nificant improvements in LLMs' ability to generate accurate logical forms, there are several limitations worth noting. First, the performance of CompKBQA is highly dependent on the quality and completeness of the underlying Knowledge Base (KB). If the KB is incomplete, outdated, or inaccurate, errors in entity identification and relation generation are likely to arise. Second, fine-tuning large language models across multiple subtasks can be resource-intensive, posing scalability challenges. Finally, as analyzed in Appendix C, CompKBQA still suffers from errors such as incorrect entity disambiguation, relation matching, and structural issues in logical forms. We leave addressing these error types as an important direction for future work.
|
| 252 |
+
|
| 253 |
+
# Ethics Statement
|
| 254 |
+
|
| 255 |
+
In this work, we use publicly available datasets and do not collect any personally identifiable information. All datasets and models are utilized in full compliance with their intended purposes and respective licenses. The primary goal of this work is to mitigate the three types of errors in the logical form generation of the LLM; we condemn any potential misuse.
|
| 256 |
+
|
| 257 |
+
# Acknowledgements
|
| 258 |
+
|
| 259 |
+
This work was supported by the National Key Research and Development Program of China (Grant No. 2022YFC3302100) and the National Natural Science Foundation of China (Grant No. 62476025). We would like to express our sincere gratitude to Prof. Jing Jiang of the Australian National University for her insightful guidance and generous help on this work.
|
| 260 |
+
|
| 261 |
+
# References
|
| 262 |
+
|
| 263 |
+
Soren Auer, Christian Bizer, Georgi Kobilarov, Jens Lehmann, Richard Cyganiak, and Zachary Ives. 2007. Dbumedia: A nucleus for a web of open data. In international semantic web conference, pages 722-735. Springer.
|
| 264 |
+
Jonathan Berant, Andrew Chou, Roy Frostig, and Percy Liang. 2013. Semantic parsing on freebase from question-answer pairs. In Proceedings of the 2013 conference on empirical methods in natural language processing, pages 1533-1544.
|
| 265 |
+
Kurt Bollacker, Colin Evans, Praveen Paritosh, Tim Sturge, and Jamie Taylor. 2008. Freebase: a collaboratively created graph database for structuring human
|
| 266 |
+
|
| 267 |
+
knowledge. In Proceedings of the 2008 ACM SIGMOD international conference on Management of data, pages 1247-1250.
|
| 268 |
+
KR1442 Chowdhary and KR Chowdhary. 2020. Natural language processing. Fundamentals of artificial intelligence, pages 603-649.
|
| 269 |
+
Tengfei Feng and Liang He. 2025. Rgr-kbqa: Generating logical forms for question answering using knowledge-graph-enhanced large language model. In Proceedings of the 31st International Conference on Computational Linguistics, pages 3057-3070.
|
| 270 |
+
Evgeniy Gabrilovich, Michael Ringgaard, and Amarnag Subramanya. 2013. Facc1: Freebase annotation of clueweb corpora, version 1 (release date 2013-06-26, format version 1, correction level 0).
|
| 271 |
+
Tianyu Gao, Xingcheng Yao, and Danqi Chen. 2021. SimCSE: Simple contrastive learning of sentence embeddings. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 6894-6910, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics.
|
| 272 |
+
Yu Gu, Xiang Deng, and Yu Su. 2023. Don't generate, discriminate: A proposal for grounding language models to real-world environments. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 4928-4949, Toronto, Canada. Association for Computational Linguistics.
|
| 273 |
+
Yu Gu, Sue Kase, Michelle Vanni, Brian Sadler, Percy Liang, Xifeng Yan, and Yu Su. 2021. Beyond iid: three levels of generalization for question answering on knowledge bases. In Proceedings of the Web Conference 2021, pages 3477-3488.
|
| 274 |
+
Yu Gu and Yu Su. 2022. Arcaneqa: Dynamic program induction and contextualized encoding for knowledge base question answering. arXiv preprint arXiv:2204.08109.
|
| 275 |
+
Gaole He, Yunshi Lan, Jing Jiang, Wayne Xin Zhao, and Ji-Rong Wen. 2021. Improving multi-hop knowledge base question answering by learning intermediate supervision signals. In Proceedings of the 14th ACM International Conference on Web Search and Data Mining, WSDM '21, page 553-561, New York, NY, USA. Association for Computing Machinery.
|
| 276 |
+
Xixin Hu, Xuan Wu, Yiheng Shu, and Yuzhong Qu. 2022. Logical form generation via multi-task learning for complex question answering over knowledge bases. In Proceedings of the 29th International Conference on Computational Linguistics, pages 1687-1696, Gyeongju, Republic of Korea. International Committee on Computational Linguistics.
|
| 277 |
+
Xiang Huang, Sitao Cheng, Shanshan Huang, Jiayu Shen, Yong Xu, Chaoyun Zhang, and Yuzhong Qu. 2024. Queryagent: A reliable and efficient reasoning framework with environmental feedback based self-correction. arXiv preprint arXiv:2403.11886.
|
| 278 |
+
|
| 279 |
+
Jinhao Jiang, Kun Zhou, Zican Dong, Keming Ye, Xin Zhao, and Ji-Rong Wen. 2023a. StructGPT: A general framework for large language model to reason over structured data. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 9237-9251, Singapore. Association for Computational Linguistics.
|
| 280 |
+
Jinhao Jiang, Kun Zhou, Wayne Xin Zhao, Yaliang Li, and Ji-Rong Wen. 2023b. Reasoninglm: Enabling structural subgraph reasoning in pre-trained language models for question answering over knowledge graph. arXiv preprint arXiv:2401.00158.
|
| 281 |
+
Jinhao Jiang, Kun Zhou, Xin Zhao, and Ji-Rong Wen. 2023c. Unikgqa: Unified retrieval and reasoning for solving multi-hop question answering over knowledge graph. In The Eleventh International Conference on Learning Representations, ICLR 2023, Kigali, Rwanda, May 1-5, 2023. OpenReview.net.
|
| 282 |
+
Tianle Li, Xueguang Ma, Alex Zhuang, Yu Gu, Yu Su, and Wenhu Chen. 2023a. Few-shot in-context learning for knowledge base question answering. arXiv preprint arXiv:2305.01750.
|
| 283 |
+
Tianle Li, Xueguang Ma, Alex Zhuang, Yu Gu, Yu Su, and Wenhu Chen. 2023b. Few-shot in-context learning on knowledge base question answering. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 6966-6980, Toronto, Canada. Association for Computational Linguistics.
|
| 284 |
+
Yading Li, Dandan Song, Changzhi Zhou, Yuhang Tian, Hao Wang, Ziyi Yang, and Shuhao Zhang. 2024. A framework of knowledge graph-enhanced large language model based on question decomposition and atomic retrieval. In *Findings of the Association for Computational Linguistics: EMNLP* 2024, pages 11472-11485, Miami, Florida, USA. Association for Computational Linguistics.
|
| 285 |
+
Haoran Luo, Haihong E, Yikai Guo, Qika Lin, Xiaobao Wu, Xinyu Mu, Wenhao Liu, Meina Song, Yifan Zhu, and Luu Anh Tuan. 2025. Kbqa-o1: Agentic knowledge base question answering with monte carlo tree search. CoRR, abs/2501.18922.
|
| 286 |
+
Haoran Luo, Haihong E, Zichen Tang, Shiyao Peng, Yikai Guo, Wentai Zhang, Chenghao Ma, Guanting Dong, Meina Song, Wei Lin, Yifan Zhu, and Anh Tuan Luu. 2024a. Chatkbqa: A generate-then-retrieve framework for knowledge base question answering with fine-tuned large language models. In Findings of the Association for Computational Linguistics, ACL 2024, Bangkok, Thailand and virtual meeting, August 11-16, 2024, pages 2039-2056. Association for Computational Linguistics.
|
| 287 |
+
Linhao Luo, Yuan-Fang Li, Gholamreza Haffari, and Shirui Pan. 2024b. Reasoning on graphs: Faithful and interpretable large language model reasoning. In The Twelfth International Conference on Learning Representations, ICLR 2024, Vienna, Austria, May 7-11, 2024. OpenReview.net.
|
| 288 |
+
|
| 289 |
+
Zhijie Nie, Richong Zhang, Zhongyuan Wang, and Xudong Liu. 2024. Code-style in-context learning for knowledge-based question answering. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 38, pages 18833-18841.
|
| 290 |
+
Jorge Pérez, Marcelo Arenas, and Claudio Gutierrez. 2009. Semantics and complexity of sparql. ACM Transactions on Database Systems (TODS), 34(3):1-45.
|
| 291 |
+
Stephen Robertson, Hugo Zaragoza, et al. 2009. The probabilistic relevance framework: Bm25 and beyond. Foundations and Trends® in Information Retrieval, 3(4):333-389.
|
| 292 |
+
Apoory Saxena, Adrian Kochsiek, and Rainer Gemulla. 2022. Sequence-to-sequence knowledge graph completion and question answering. arXiv preprint arXiv:2203.10321.
|
| 293 |
+
Yiheng Shu, Zhiwei Yu, Yuhan Li, Borje F Karlsson, Tingting Ma, Yuzhong Qu, and Chin-Yew Lin. 2022. Tiara: Multi-grained retrieval for robust question answering over large knowledge bases. arXiv preprint arXiv:2210.12925.
|
| 294 |
+
Yuan Sui, Yufei He, Nian Liu, Xiaoxin He, Kun Wang, and Bryan Hooi. 2024. Fidelis: Faithful reasoning in large language model for knowledge graph question answering. Preprint, arXiv:2405.13873.
|
| 295 |
+
Jiashuo Sun, Chengjin Xu, Lumingyuan Tang, Saizhuo Wang, Chen Lin, Yeyun Gong, Heung-Yeung Shum, and Jian Guo. 2023. Think-on-graph: Deep and responsible reasoning of large language model with knowledge graph. arXiv preprint arXiv:2307.07697.
|
| 296 |
+
Alon Talmor and Jonathan Berant. 2018. The web as a knowledge-base for answering complex questions. arXiv preprint arXiv:1803.06643.
|
| 297 |
+
Yiming Tan, Dehai Min, Yu Li, Wenbo Li, Nan Hu, Yongrui Chen, and Guilin Qi. 2023. Can chatgpt replace traditional KBQA models? an in-depth analysis of the question answering performance of the GPT LLM family. In The Semantic Web - ISWC 2023 - 22nd International Semantic Web Conference, Athens, Greece, November 6-10, 2023, Proceedings, Part I, volume 14265 of Lecture Notes in Computer Science, pages 348-367. Springer.
|
| 298 |
+
Yuhang Tian, Dandan Song, Zhijing Wu, Changzhi Zhou, Hao Wang, Jun Yang, Jing Xu, Ruanmin Cao, and Haoyu Wang. 2024. Augmenting reasoning capabilities of llms with graph structures in knowledge base question answering. In *Findings of the Association for Computational Linguistics: EMNLP* 2024, pages 11967-11977.
|
| 299 |
+
Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Fei Xia, Ed Chi, Quoc V Le, Denny Zhou, et al. 2022. Chain-of-thought prompting elicits reasoning in large language models. Advances in neural information processing systems, 35:24824-24837.
|
| 300 |
+
|
| 301 |
+
Guanming Xiong, Junwei Bao, and Wen Zhao. 2024. Interactive-kbqa: Multi-turn interactions for knowledge base question answering with large language models. Preprint, arXiv:2402.15131.
|
| 302 |
+
Xi Ye, Semih Yavuz, Kazuma Hashimoto, Yingbo Zhou, and Caiming Xiong. 2022. RNG-KBQA: generation augmented iterative ranking for knowledge base question answering. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), ACL 2022, Dublin, Ireland, May 22-27, 2022, pages 6032-6043. Association for Computational Linguistics.
|
| 303 |
+
Wen-tau Yih, Matthew Richardson, Christopher Meek, Ming-Wei Chang, and Jina Suh. 2016. The value of semantic parse labeling for knowledge base question answering. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 201-206.
|
| 304 |
+
Donghan Yu, Sheng Zhang, Patrick Ng, Henghui Zhu, Alexander Hanbo Li, Jun Wang, Yiqun Hu, William Yang Wang, Zhiguo Wang, and Bing Xiang. 2023a. Decaf: Joint decoding of answers and logical forms for question answering over knowledge bases. In The Eleventh International Conference on Learning Representations, ICLR 2023, Kigali, Rwanda, May 1-5, 2023. OpenReview.net.
|
| 305 |
+
Donghan Yu, Sheng Zhang, Patrick Ng, Henghui Zhu, Alexander Hanbo Li, Jun Wang, Yiqun Hu, William Yang Wang, Zhiguo Wang, and Bing Xiang. 2023b. DecAF: Joint decoding of answers and logical forms for question answering over knowledge bases. In The Eleventh International Conference on Learning Representations.
|
| 306 |
+
Jing Zhang, Xiaokang Zhang, Jifan Yu, Jian Tang, Jie Tang, Cuiping Li, and Hong Chen. 2022. Subgraph retrieval enhanced model for multi-hop knowledge base question answering. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), ACL 2022, Dublin, Ireland, May 22-27, 2022, pages 5773-5784. Association for Computational Linguistics.
|
| 307 |
+
Lingxi Zhang, Jing Zhang, Yanling Wang, Shulin Cao, Xinmei Huang, Cuiping Li, Hong Chen, and Juanzi Li. 2023. FC-KBQA: A fine-to-coarse composition framework for knowledge base question answering. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1002-1017, Toronto, Canada. Association for Computational Linguistics.
|
| 308 |
+
Wayne Xin Zhao, Kun Zhou, Junyi Li, Tianyi Tang, Xiaolei Wang, Yupeng Hou, Yingqian Min, Beichen Zhang, Junjie Zhang, Zican Dong, et al. 2023. A survey of large language models. arXiv preprint arXiv:2303.18223.
|
| 309 |
+
Chang Zong, Yuchen Yan, Weiming Lu, Jian Shao, Yongfeng Huang, Heng Chang, and Yueting Zhuang. 2024. Triad: A framework leveraging a multi-role
|
| 310 |
+
|
| 311 |
+
llm-based agent to solve knowledge base question answering. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, EMNLP 2024, Miami, FL, USA, November 12-16, 2024, pages 1698-1710. Association for Computational Linguistics.
|
| 312 |
+
|
| 313 |
+
# Appendix
|
| 314 |
+
|
| 315 |
+
# A Datasets
|
| 316 |
+
|
| 317 |
+
In this work, we use two mainstream KBQA datasets: WebQuestionSP (WebQSP) (Yih et al., 2016)<sup>2</sup> and Complex WebQuestions (CWQ) (Talmor and Berant, 2018)<sup>3</sup>.
|
| 318 |
+
|
| 319 |
+
WebQSP is a well-known KBQA dataset based on Freebase, containing 4,737 natural language questions and their corresponding SPARQL queries. The primary goal of this dataset is to assess the generalization ability of models in an i.i.d. setting, as both the training and testing data involve the same entities and relations.
|
| 320 |
+
|
| 321 |
+
CWQ is another prominent KBQA dataset, also based on Freebase, with 34,689 natural language questions and corresponding SPARQL queries. The questions in CWQ are more complex, with up to 4-hop queries.
|
| 322 |
+
|
| 323 |
+
The statistics of the datasets are given in Table 6. The statistics on the number of relations involved in the Logical Forms of questions in the dataset are shown in Table 7.
|
| 324 |
+
|
| 325 |
+
For both WebQSP and CWQ datasets, reasoning can be performed using Freebase knowledge graphs $^{4}$ (Bollacker et al., 2008). To make the knowledge graphs more manageable in size, we created a Freebase subgraph, following the approach of previous studies (Jiang et al., 2023c; Luo et al., 2024b; Sui et al., 2024). This subgraph was constructed by selecting all triples that fall within the maximum reasoning hop distance from the question entities in WebQSP and CWQ.
|
| 326 |
+
|
| 327 |
+
# B Baselines
|
| 328 |
+
|
| 329 |
+
We compare CompKBQA with the following baselines divided into five classes: 1) IR-based KBQA Methods, 2) SP-based KBQA Methods, 3) LLM-based KBQA Methods (Prompting), 4) LLMs + KGs-based KBQA Methods (Prompting), and 5) LLMs + KGs-based KBQA Methods (Fine-tuning).
|
| 330 |
+
|
| 331 |
+
# B.1 IR-based KBQA Methods
|
| 332 |
+
|
| 333 |
+
NSM (He et al., 2021) proposes a teacher-student approach for multi-hop KBQA, where the teacher network uses bidirectional reasoning to generate reliable intermediate supervision signals, improving the student network's reasoning capacity.
|
| 334 |
+
|
| 335 |
+
<table><tr><td>Datasets</td><td>#Train</td><td>#Test</td><td>Max #hop</td><td>#Entity</td><td>#Relation</td><td>1hop</td><td>2hop</td><td>3hop</td></tr><tr><td>WebQSP</td><td>3,098</td><td>1,639</td><td>2</td><td>2461</td><td>628</td><td>65.49%</td><td>34.51%</td><td>0.00%</td></tr><tr><td>CWQ</td><td>27,639</td><td>3,519</td><td>4</td><td>11422</td><td>845</td><td>40.91%</td><td>38.34%</td><td>20.75%</td></tr></table>
|
| 336 |
+
|
| 337 |
+
Table 6: The statistics of WebQSP and CWQ
|
| 338 |
+
|
| 339 |
+
<table><tr><td colspan="6">Number of relations used</td></tr><tr><td>Datasets</td><td>1</td><td>2</td><td>3</td><td>4</td><td>>=5</td></tr><tr><td>WebQSP</td><td>55.44%</td><td>23.14%</td><td>16.89%</td><td>3.85%</td><td>0.69%</td></tr><tr><td>CWQ</td><td>0.00%</td><td>32.88%</td><td>34.04%</td><td>20.51%</td><td>12.28%</td></tr></table>
|
| 340 |
+
|
| 341 |
+
Table 7: The statistics of number of relations in Logical Forms
|
| 342 |
+
|
| 343 |
+
KGT5 (Saxena et al., 2022) demonstrates that an off-the-shelf encoder-decoder Transformer model, when applied as a sequence-to-sequence task for knowledge graph link prediction and question answering.
|
| 344 |
+
|
| 345 |
+
SubgraphRetrieval (Zhang et al., 2022) introduces a trainable subgraph retriever (SR) decoupled from reasoning, enabling a plug-and-play framework to enhance subgraph-oriented KBQA models.
|
| 346 |
+
|
| 347 |
+
# B.2 SP-based KBQA Methods
|
| 348 |
+
|
| 349 |
+
ArcaneQA (Gu and Su, 2022) dynamically generates the query based on results from previous steps.
|
| 350 |
+
|
| 351 |
+
Rng-KBQA (Ye et al., 2022) first enumerates all possible queries and then finetune T5 model to get the final output.
|
| 352 |
+
|
| 353 |
+
DecAF (Yu et al., 2023b) proposes a framework that jointly generates logical forms and direct answers for KBQA, combining their strengths to improve accuracy.
|
| 354 |
+
|
| 355 |
+
FC-KBQA (Zhang et al., 2023) introduces FCKBQA, a Fine-to-Coarse Composition framework that extracts fine-grained knowledge components from KBs and reformulates them into middlegrained pairs to ensure generalization and excitability.
|
| 356 |
+
|
| 357 |
+
TIARA (Shu et al., 2022) enhances PLM-based KBQA by incorporating multi-grained retrieval to provide relevant KB context and constrained decoding to improve logical form generation.
|
| 358 |
+
|
| 359 |
+
# B.3 LLM-based KBQA Methods
|
| 360 |
+
|
| 361 |
+
In this type of method, we use the same setup as RoG (Luo et al., 2024b) and directly prompt the LLM to generate the answer.
|
| 362 |
+
|
| 363 |
+
GPT-3.5-Turbo, GPT-4o, and DeepSeek-V3 are powerful closed-source LLMs that could follow instructions to conduct complex tasks.
|
| 364 |
+
|
| 365 |
+
CoT uses the Chain-of-thought prompt (Wei et al., 2022) to improve the reason ability of ChatGPT.
|
| 366 |
+
|
| 367 |
+
# B.4 LLMs + KGs-based KBQA Methods (Prompting)
|
| 368 |
+
|
| 369 |
+
GPT-4o (1-shot) and DeepSeek-V3 (1-shot) means inputting the skeleton, topic entities, and relevant relations generated by our model into the LLM to generate the logical form.
|
| 370 |
+
|
| 371 |
+
KB-Binder (Li et al., 2023b) enables few-shot KBQA using large language models and BM25 matching, achieving strong performance across datasets without training.
|
| 372 |
+
|
| 373 |
+
KB-Coder (Nie et al., 2024) proposes a code-style in-context learning method for KBQA, converting logical form generation into code generation for LLMs, reducing format errors.
|
| 374 |
+
|
| 375 |
+
QuertAgent (Huang et al., 2024) introduces a framework with ERASER, a step-wise self-correction method using environmental feedback, significantly improving reliability and efficiency in semantic parsing.
|
| 376 |
+
|
| 377 |
+
ARG-KBQA (Tian et al., 2024) proposes a framework that enhances LLMs for KBQA by retrieving question-related graph structures using a two-stage ranker.
|
| 378 |
+
|
| 379 |
+
KELDaR (Li et al., 2024) enhances LLMs for KGQA by introducing question decomposition and atomic retrieval, using a decomposition tree to guide atomic-level KG subgraph retrieval for answering complex questions.
|
| 380 |
+
|
| 381 |
+
FIDELIS (Sui et al., 2024) introduces a retrieval-augmented reasoning method that enhances KGQA by anchoring responses to verifiable reasoning paths, using keyword-enhanced retrieval and stepwise beam search to ensure accuracy.
|
| 382 |
+
|
| 383 |
+
# B.5 LLMs + KGs-based KBQA Methods (Fine-tuning)
|
| 384 |
+
|
| 385 |
+
RoG (Luo et al., 2024b) proposes a method that integrates LLMs with KGs using a planning-retrieval-reasoning framework to generate faithful and interpretable reasoning paths.
|
| 386 |
+
|
| 387 |
+
ReasoningLM (Jiang et al., 2023b) introduces a PLM enhanced with subgraph-aware self-attention and adaptation tuning, enabling direct subgraph reasoning for KGQA.
|
| 388 |
+
|
| 389 |
+
ChatKBQA (Luo et al., 2024a) presents a generate-then-retrieve KBQA framework that uses fine-tuned LLMs to generate logical forms and unsupervised retrieval to replace entities and relations.
|
| 390 |
+
|
| 391 |
+
RGR-KBQA (Feng and He, 2025) proposes a semantic parsing method that enhances knowledge base question answering by using a two-step retrieval process to reduce hallucination issues in large language models.
|
| 392 |
+
|
| 393 |
+
# C Error Analysis
|
| 394 |
+
|
| 395 |
+
To better understand the remaining limitations of CompKBQA, we conduct a detailed error analysis on its incorrect predictions over the WebQSP test set. We analyze all incorrect cases and categorize them as follows:
|
| 396 |
+
|
| 397 |
+
- Skeleton correct, but entity/relation errors $(42.5\%)$ : The logical structure is correct, but incorrect entities or relations are generated.
|
| 398 |
+
- Skeleton errors (24.6%): Fundamental structural issues occur in the generated logical forms.
|
| 399 |
+
- Correct LF in beam search, but wrong final answer (17.5%): The correct logical form appears in the beam search results but is not selected as the final output.
|
| 400 |
+
- Generated LF correct, but execution failed (7.9%): The logical form is correct, but execution errors arise during entity/relation alignment.
|
| 401 |
+
- No answer retrieved (6.0%): The system fails to retrieve any answer from the KB.
|
| 402 |
+
- LF completely correct but parsing failed (1.4%): The logical form and alignment are correct, but technical parsing issues prevent successful execution.
|
| 403 |
+
|
| 404 |
+
This analysis reveals that most errors stem from incorrect entity disambiguation or relation matching during the alignment phase, even when the
|
| 405 |
+
|
| 406 |
+
logical structure itself is correct. Future work will therefore focus on improving the entity linking process, for example by performing entity linking prior to logical form generation.
|
| 407 |
+
|
| 408 |
+
# D Comparison with GPT-4o and DeepSeek-V3
|
| 409 |
+
|
| 410 |
+
Our objective is to investigate the capability of commercial large language models, such as GPT-4o and DeepSeek-V3, to generate correct Logical Forms directly from a given question, the associated subject entity, and relevant relations, without any fine-tuning. Specifically, we feed LLM the question, topic entity, and relevant relations as input, with the expected output being the correct logical form. A sample prompt is shown in Figure 3. In the zero-shot setting, GPT-4o and DeepSeek-V3 fails to generate a valid form in the expected format. We then conduct a one-shot experiment, providing a fixed example for all queries to guide the model. A sample prompt is shown in Figure 4.
|
| 411 |
+
|
| 412 |
+
In the one-shot experiment, GPT-4o generates syntactically correct logical forms, but accuracy remains limited. Specifically, only 642 out of 1639 forms have correct skeleton structures, and only 194 are fully correct, the detailed results are shown in Table 5. These results suggest that, despite improvements in formatting, commercial large language models like GPT-4o or DeepSeek-V3 struggle with accuracy due to a limited understanding of question structures and the structure of KB. Even with the topic entity and candidate relations provided, models like GPT-4o, unfamiliar with the KB query structure, continue to make errors.
|
| 413 |
+
|
| 414 |
+
# E Analysis on the transferability of Stage 1 and Stage 2 Training
|
| 415 |
+
|
| 416 |
+
We find that Stage 1: Skeleton Generation and Stage 2: Topic Entity Generation are KB-independent. To investigate the necessity of retraining these stages across different datasets, We use the models trained through Stage 1 and Stage 2 on CWQ to continue with Stage 3 and Stage 4 on WebQSP. For comparison, we also train Stage 3 and Stage 4 directly on the base model without the prior training of Stage 1 and Stage 2. The experimental results are presented in Table 10.
|
| 417 |
+
|
| 418 |
+
As seen from the table, continuing training Stage 3 and Stage 4 using the models that completed Stage 1 and Stage 2 training on CWQ results in better performance compared to directly applying
|
| 419 |
+
|
| 420 |
+
<table><tr><td>Model</td><td>Skeleton</td><td>Topic Entity</td><td>Relevant Relations</td><td>Logic Form</td><td>Total Time</td></tr><tr><td>ChatKBQA</td><td>-</td><td>-</td><td>-</td><td>14h16min</td><td>14h16min</td></tr><tr><td>CompKBQA</td><td>4h13min</td><td>5h8min</td><td>4h23min</td><td>6h2min</td><td>19h46min</td></tr></table>
|
| 421 |
+
|
| 422 |
+
Table 8: Comparison of training time
|
| 423 |
+
|
| 424 |
+
<table><tr><td>Model</td><td>Topic Entity</td><td>Relevant Relations</td><td>Logic Form</td><td>Total Time</td><td>Average Time per question</td></tr><tr><td>ChatKBQA</td><td>-</td><td>-</td><td>1h33min</td><td>1h33min</td><td>3.42s</td></tr><tr><td>CompKBQA</td><td>2min</td><td>5min</td><td>1h48min</td><td>1h55min</td><td>4.20s</td></tr></table>
|
| 425 |
+
|
| 426 |
+
Table 9: Comparison of inference time
|
| 427 |
+
|
| 428 |
+

|
| 429 |
+
Figure 4: Prompt for one-shot GPT-4o experiment
|
| 430 |
+
|
| 431 |
+
Figure 3: Prompt for zero-shot GPT-4o experiment
|
| 432 |
+
|
| 433 |
+
<table><tr><td>Model</td><td>F1</td><td>Hits@1</td><td>Acc</td></tr><tr><td>CompKBQA</td><td>81.3</td><td>84.2</td><td>75.9</td></tr><tr><td>w/o S1 && S2</td><td>78.1</td><td>79.8</td><td>71.2</td></tr><tr><td>w S1 && S2 from CWQ</td><td>80.2</td><td>82.8</td><td>73.4</td></tr></table>
|
| 434 |
+
|
| 435 |
+
Table 10: The experimental results of the reusability of Stage 1 and Stage 2 Training
|
| 436 |
+
|
| 437 |
+
Stage 3 and Stage 4 to the base model. This demonstrates the transferability of the training results from Stage 1 and Stage 2. However, there is still a slight gap when compared to full training on the WebQSP dataset. This is because each dataset has different question structures, such as varying hop counts, which lead to differences in the skeleton of the logical query statements.
|
| 438 |
+
|
| 439 |
+
# F Comparison of Time Complexity with Baseline
|
| 440 |
+
|
| 441 |
+
In this section, we compare the training and inference times of CompKBQA and ChatKBQA (Luo et al., 2024a).
|
| 442 |
+
|
| 443 |
+
# One-shot Prompt
|
| 444 |
+
|
| 445 |
+
Given a KBQA question, generate only the Logic Form query that retrieves the relevant in formation from the knowledge base. You will be provided with entities and relations to assist in creating the query. Do not include any explanations or additional text in the output only provide the Logical Form. And I will show you a example.
|
| 446 |
+
|
| 447 |
+
Example:
|
| 448 |
+
|
| 449 |
+
Question: {what is the name of justin bieber brother}
|
| 450 |
+
|
| 451 |
+
Entities:justin bieber
|
| 452 |
+
|
| 453 |
+
Relations:
|
| 454 |
+
|
| 455 |
+
people.sibling人际关系.sibling
|
| 456 |
+
people.person.sibling_s
|
| 457 |
+
people.person. gender
|
| 458 |
+
|
| 459 |
+
Logic Form: ( AND ( JOIN ( R [ people , sibling relationship , sibling ]) ) ( JOIN ( R [ people , person , sibling ] ) ) ( JOIN [ people , person , gender ] [ Male ] ))
|
| 460 |
+
|
| 461 |
+
Question: {what does jamaican people speak k}
|
| 462 |
+
|
| 463 |
+
Entities: jamaican
|
| 464 |
+
|
| 465 |
+
Relations:
|
| 466 |
+
|
| 467 |
+
location countrylanguages spoken location country.official language people.ethnicitylanguagespoken
|
| 468 |
+
|
| 469 |
+
Logic Form:
|
| 470 |
+
|
| 471 |
+
# F.1 Training Time
|
| 472 |
+
|
| 473 |
+
we compare the training times of CompKBQA with ChatKBQA, and the results are shown in Table 8. To ensure a fair comparison, we tested the training times for both ChatKBQA and CompKBQA on the WebQSP dataset using a single NVIDIA A6000 GPU. It can be observed that CompKBQA takes longer to train than ChatKBQA.
|
| 474 |
+
|
| 475 |
+
# F.2 Inference Time
|
| 476 |
+
|
| 477 |
+
We compared the inference time of CompKBQA with that of ChatKBQA on the WebQSP dataset using a single NVIDIA A6000 GPU, and the results are shown in Table 9. It can be observed that the inference time of our model is similar to that of ChatKBQA. This is because the additional two components, which generate the Topic Entity and Relevant Relations for each question, use greedy decoding during inference and employ multithreading, making the process very fast. As a result, the efficiency of the inference phase is minimally impacted.
|
| 478 |
+
|
| 479 |
+
# G Comparison with T5 model
|
| 480 |
+
|
| 481 |
+
We use the Flan-T5-XL, following the same training pipeline, which includes skeleton generation, topic entity generation, relevant relations generation, and logical form generation. Their performance is compared with CompKBQA, as shown in Table 5. The results show that larger models generate more accurate logical forms after training, highlighting the importance of using models like Llama2-7B for improved performance.
|
| 482 |
+
|
| 483 |
+
# H Implementation Details
|
| 484 |
+
|
| 485 |
+
In this section, we introduce the implementation details of each module.
|
| 486 |
+
|
| 487 |
+
The hyperparameters for each stage of CompKBQA are summarized in Table 11.
|
| 488 |
+
|
| 489 |
+
# I Case Study
|
| 490 |
+
|
| 491 |
+
To provide a comprehensive understanding of the CompKBQA framework, we present a case study in Table 12, which demonstrates that when faced with the same question, ChatKBQA generated an incorrect Logical Form, while CompKBQA, through step-by-step decomposition, was able to generate the correct Logical Form.
|
| 492 |
+
|
| 493 |
+
<table><tr><td>Hyperparameter</td><td>WebQSP</td><td>CWQ</td></tr><tr><td colspan="3">Logical Form Generation</td></tr><tr><td>LLM</td><td>LLaMA-2-7B</td><td>LLaMA-2-13B</td></tr><tr><td>Fine-tuning Type</td><td>LoRA</td><td>LoRA</td></tr><tr><td>Train Batch Size</td><td>{1,2,3,4}</td><td>{1,2,3,4}</td></tr><tr><td>Learning Rate</td><td>{5e-5,1e-4,4e-4}</td><td>{5e-5,1e-4,4e-4}</td></tr><tr><td>Train Epoch</td><td>{10,50,100}</td><td>{10,50,100}</td></tr><tr><td>Test Batch Size</td><td>{1,2,3,4}</td><td>{1,2,3,4}</td></tr><tr><td>Beam Size</td><td>{1,2,5,8,15}</td><td>{1,2,5,8}</td></tr><tr><td colspan="3">R3</td></tr><tr><td>top_k for Hard Negative Examples</td><td>20</td><td>20</td></tr><tr><td>Train Epoch</td><td>20</td><td>10</td></tr><tr><td>Learning Rate</td><td>1e-5</td><td>1e-5</td></tr><tr><td>top-k for Retrieving Candidate Relations</td><td>1,3,5,10</td><td>1,3,8,10</td></tr><tr><td colspan="3">Logical Form Execution</td></tr><tr><td>Retrieval Type</td><td>SimCSE</td><td>SimCSE</td></tr><tr><td>top - kent</td><td>50</td><td>50</td></tr><tr><td>top - krel</td><td>15</td><td>15</td></tr></table>
|
| 494 |
+
|
| 495 |
+
Table 11: Hyperparameter in CompKBQA's each stage
|
| 496 |
+
|
| 497 |
+
<table><tr><td>Question</td><td colspan="2">where did rick santorum attend high school?</td></tr><tr><td colspan="3">ChatKBQA</td></tr><tr><td rowspan="2">Skeleton Generation</td><td>Input</td><td>Generate a Logical Form query that retrieves the information corresponding to the given question.
|
| 498 |
+
Question: where did rick santorum attend high school</td></tr><tr><td>Output</td><td>Logical Form: ( AND ( JOIN [ common, topic, notable types ] [ School ]) ( JOIN ( R [ education, education, institution ]) ( JOIN ( R [ people, person, education ] ) [ Rick Santorum ] ))</td></tr><tr><td colspan="3">CompKBQA</td></tr><tr><td rowspan="2">Skeleton Generation</td><td>Input</td><td>Given a KBQA question, you should generate a skeleton of the Logical Form query that retrieves the information corresponding to the given question.
|
| 499 |
+
Question: where did rick santorum attend high school</td></tr><tr><td>Output</td><td>Skeleton: ( AND [REL] ( JOIN ( R [REL] ) ( JOIN ( R [REL] ) [ENT] ))</td></tr><tr><td rowspan="2">Topic Entity Generation</td><td>Input</td><td>Given a KBQA question, you should generate the topic entity of this question, which will be used to generate the Logical Form query.
|
| 500 |
+
Question: where did rick santorum attend high school</td></tr><tr><td>Output</td><td>Entities: rick santorum</td></tr><tr><td rowspan="2">Relevant Relations Selection</td><td>Input</td><td>Given a KBQA question, I will provide you with some relations that might be helpful for generating the Logic Form query. You need to select the most relevant relations to use, and if necessary, you can create relations.
|
| 501 |
+
Question: where did rick santorum attend high school
|
| 502 |
+
Candidate relations:
|
| 503 |
+
education.education.institution, people.person.education, education.educationdegree</td></tr><tr><td>Output</td><td>Relations:
|
| 504 |
+
education_school
|
| 505 |
+
people.person.education
|
| 506 |
+
education.education.institution</td></tr><tr><td rowspan="2">Logic Form Generation</td><td>Input</td><td>Given a KBQA question, you should generate a Logical Form query that retrieves the information corresponding to the given question. And I will provide you with entities and relations that might be helpful for generating the Logical Form query.
|
| 507 |
+
Question: where did rick santorum attend high school
|
| 508 |
+
Entities: rick santorum
|
| 509 |
+
Relations: education_school, people.person.education, education.education.institution</td></tr><tr><td>Output</td><td>Logical Form: ( AND [ education, school ] ( JOIN ( R [ education, education, institution ] ) ( JOIN ( R [ people, person, education ] ) [ Rick Santorum ] ))</td></tr></table>
|
| 510 |
+
|
| 511 |
+
Table 12: Case Study of CompKBQA vs. ChatKBQA on Logical Form Generation
|
compkbqacomponentwisetaskdecompositionforknowledgebasequestionanswering/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:652d13812546630021f22b1cdc70adc0fa15f34f3c6f56e5b1e6afa3456aab79
|
| 3 |
+
size 858228
|
compkbqacomponentwisetaskdecompositionforknowledgebasequestionanswering/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8941c54bfb52b3973134879a31210cc1d1bf0f12732b2a267f4768f24d0c46b7
|
| 3 |
+
size 532801
|
complexnumericalreasoningwithnumericalsemanticpretrainingframework/9b778c8e-f145-434d-b810-48dabfa71f2f_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:30171c69bc9f942dad67e827347f405d0d06f27ca1683503946afd2d81fc5331
|
| 3 |
+
size 250087
|
complexnumericalreasoningwithnumericalsemanticpretrainingframework/9b778c8e-f145-434d-b810-48dabfa71f2f_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:366d8c5da2296d3c2a0e7214829d0d44336ea694743020e9a2f406d861ca276f
|
| 3 |
+
size 298201
|
complexnumericalreasoningwithnumericalsemanticpretrainingframework/9b778c8e-f145-434d-b810-48dabfa71f2f_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9d62b5de3a981857626e22ec50704a76563df888ca338cc4fa17ae413205c396
|
| 3 |
+
size 8375850
|
complexnumericalreasoningwithnumericalsemanticpretrainingframework/full.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
complexnumericalreasoningwithnumericalsemanticpretrainingframework/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:71d1a00e1c6a6831ae7e4058dedaa49af495c06d258bae22bd2dfa7ff7e8bb64
|
| 3 |
+
size 4070720
|
complexnumericalreasoningwithnumericalsemanticpretrainingframework/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:50d8eb673f21cee376e4c9d94e70418670716072be8d626fad36ddc46f5398a4
|
| 3 |
+
size 1092905
|
complextempqaa100mdatasetforcomplextemporalquestionanswering/df6a55bb-f6fb-443c-97ce-152599f33aa1_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c9344f87497ee8aa91a18281312726ece5786ff4a69d7b7a29b37a1e08c07b1a
|
| 3 |
+
size 100866
|
complextempqaa100mdatasetforcomplextemporalquestionanswering/df6a55bb-f6fb-443c-97ce-152599f33aa1_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e989cc82a56570d68ba2bca11e0addb4e35bf53c86cba980f03b2f7410534e43
|
| 3 |
+
size 123848
|
complextempqaa100mdatasetforcomplextemporalquestionanswering/df6a55bb-f6fb-443c-97ce-152599f33aa1_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5c7429268983dee15eb52f59e8f4a2feb28e9f21e0c8c0d4093d512cfb25d498
|
| 3 |
+
size 1175490
|
complextempqaa100mdatasetforcomplextemporalquestionanswering/full.md
ADDED
|
@@ -0,0 +1,428 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# COMPLEXTEMPQA: A 100m Dataset for Complex Temporal Question Answering
|
| 2 |
+
|
| 3 |
+
Raphael Gruber<sup>1</sup>, Abdelrahman Abdallah<sup>1</sup>, Michael Färber<sup>2</sup>, Adam Jatowt<sup>1</sup>
|
| 4 |
+
|
| 5 |
+
<sup>1</sup>University of Innsbruck, <sup>2</sup>Technical University Dresden
|
| 6 |
+
|
| 7 |
+
{ra.gruber, abdelrahman.abdallah, adam.jatowt}@uibk.ac.at,
|
| 8 |
+
michael.faerber@tu-dresden.de
|
| 9 |
+
|
| 10 |
+
# Abstract
|
| 11 |
+
|
| 12 |
+
We introduce COMPLEXTEMPQA, a large-scale dataset consisting of over 100 million question-answer pairs designed to tackle the challenges in temporal question answering. COMPLEXTEMPQA significantly surpasses existing benchmarks in scale and scope. Utilizing Wikipedia and Wikidata, the dataset covers questions spanning over two decades and offers an unmatched scale. We introduce a new taxonomy that categorizes questions as attributes, comparisons, and counting questions, revolving around events, entities, and time periods, respectively. A standout feature of COMPLEXTEMPQA is the high complexity of its questions, which demand reasoning capabilities for answering such as across-time comparison, temporal aggregation, and multi-hop reasoning involving temporal event ordering and entity recognition. Additionally, each question is accompanied by detailed metadata, including specific time scopes, allowing for comprehensive evaluation of temporal reasoning abilities of large language models.
|
| 13 |
+
|
| 14 |
+
# 1 Introduction
|
| 15 |
+
|
| 16 |
+
Temporal Question Answering (TQA) refers to answering questions that require both understanding of and reasoning about temporal knowledge (Jatowt, 2022; Jia et al., 2018b, 2019; Ning et al., 2020). This sets TQA apart from traditional Question Answering (QA). Developing effective TQA solutions naturally requires effective and challenging datasets. Existing TQA datasets, such as TORQUE (Ning et al., 2020), TEQUILA (Jia et al., 2019), ArchivalQA (Wang et al., 2021), and ChroniclengAmericaQA (Piryani et al., 2024), fall however short in several respects: First, they are limited in size, typically containing only a few thousand questions. This poses significant challenges for
|
| 17 |
+
|
| 18 |
+

|
| 19 |
+
Figure 1: Example types of temporal reasoning in questions sampled from COMPLEXTEMPQA (left) with the required inference steps (right) and timeline-based visualization (above).
|
| 20 |
+
|
| 21 |
+
effectively training LLMs, as illustrated in (Ning et al., 2020; Jia et al., 2018a; Llorens et al., 2015; Ong et al., 2023; Wei et al., 2023; Naik et al., 2019). Second, while these datasets predominantly focus on specific question categories related to entities or time periods, they lack comprehensive coverage of a wide variety of question types. Third, they generally include only straightforward questions and omit complex inquiries that require multi-step inference to generate accurate responses, thereby limiting the ability of trained models to handle temporal reasoning tasks (Ning et al., 2020; Ong et al., 2023; Wei et al., 2023; Naik et al., 2019). Fourth, the prior datasets lack features such as popularity scores, which could indicate the relative ease of answering questions. They also do not allow filtering by specific time periods, a capability essential for detailed and customized temporal studies.
|
| 22 |
+
|
| 23 |
+
To address these challenges, we introduce COMPLEXTEMPQA, a novel dataset that surpasses existing resources in both scale and complexity. It is particularly suitable for the analysis, training, and evaluation of LLMs and QA systems on com
|
| 24 |
+
|
| 25 |
+
plex temporal knowledge. Our dataset offers four key contributions:
|
| 26 |
+
|
| 27 |
+
1. Scale: COMPLEXTEMPQA comprises over 100 million question-answer pairs, making it by far the largest dataset available for Temporal QA.
|
| 28 |
+
2. Question Types and Taxonomy: The dataset includes diverse categories of questions, such as attribute-, comparison-, and counting-type questions, each pertaining to events, entities, or time periods. Questions are generated at scale based on facts from Wikidata and representative question patterns identified from Wikipedia, ensuring broad coverage of domains and question types. Moreover, we employ the IPTC Media Topics taxonomy to diversify thematic scope.
|
| 29 |
+
3. Complexity and Temporal Scope: Questions in COMPLEXTEMPQA require advanced reasoning skills, including event/entity matching, multi-hop inference, cross-time comparisons, and temporal ordering.
|
| 30 |
+
4. Metadata and Evaluation: Each question is enriched with detailed metadata, including the relevant time period within the overall dataset's time span from 1987 to 2023 and a popularity score that categorizes questions as popular or unpopular based on the type of question and the anticipated familiarity with the entities involved. This metadata allows for precise training and evaluation of language models, specifically concerning their ability to adapt to varying temporal contexts over time.
|
| 31 |
+
|
| 32 |
+
COMPLEXTEMPQA serves multiple purposes in advancing the study and application of LLMs in reasoning over temporal factual knowledge. Primarily, it enables a thorough analysis of LLM performance by addressing the need to understand temporal factual knowledge, identify temporal blind spots, and assess temporal reasoning capabilities (Wallat et al., 2024; Wenzel and Jatowt, 2023). Beyond performance evaluation, the dataset provides a foundational platform for the development of advanced question-generation tools. Our structured taxonomy facilitates the refinement and creation of specialized taxonomies for targeted tasks and datasets. Moreover, specific subsets of COMPLEXTEMPQA can be filtered to focus on particular types of temporal questions or particular desired time frames, supporting targeted research.
|
| 33 |
+
|
| 34 |
+
A key component of our work is evaluating how state-of-the-art LLMs handle the complex temporal questions posed by COMPLEXTEMPQA. In Section 6, we benchmark a range of models using various approaches, including zero-shot, few-shot, and retrieval-augmented generation (RAG). These evaluations offer insights into the current capabilities and limitations of LLMs in processing temporal information.
|
| 35 |
+
|
| 36 |
+
Overall, we make the following contributions:
|
| 37 |
+
|
| 38 |
+
1. We introduce and publicly release COMPLEX-TEMPQA<sup>1</sup>, a large-scale dataset comprising over 100 million question-answer pairs for temporal question answering, structured around a novel taxonomy of temporal question types.
|
| 39 |
+
2. We detail our methodology for dataset creation, which includes data retrieval from Wikidata, event extraction from Wikipedia, rigorous complexity assessment and rating, as well as filtering based on temporal ambiguity. Moreover, the dataset can be easily extended to cover additional time periods.
|
| 40 |
+
3. We benchmark diverse LLMs on COMPLEX-TEMPQA using zero-shot, few-shot prompting, and retrieval-augmented generation (RAG) approaches, providing insights into their performance on temporal question answering tasks of varying complexity.
|
| 41 |
+
|
| 42 |
+
# 2 Related Work
|
| 43 |
+
|
| 44 |
+
Table 1 gives an overview of question answering datasets showing a notable discrepancy in question volume, with our dataset substantially surpassing others. While several TQA datasets contain complex temporal questions, they largely revolve around TimeAttr (time attribute) inquiries, which focus on relatively simple questions such as ones about the duration and order of events or entities. TORQUE (Ning et al., 2020) introduces questions that emphasize temporal relations such as "before," "after," and "start." The authors trained a model to evaluate questions specifically based on these temporal constraints. QA TempEval dataset (Llorens et al., 2015) has been designed with a focus on temporal entities and relations, which are easier to generate automatically. TEQUILA (Jia et al., 2019) uses temporal expressions like dates or implicit temporal signals such as "before" or "after."
|
| 45 |
+
|
| 46 |
+
In addition to these works, TempQuestions (Jia et al., 2018b) has been released as a benchmark for
|
| 47 |
+
|
| 48 |
+
<table><tr><td>Dataset</td><td>Temporal Questions</td><td>#Questions</td><td>Creation Method</td><td>Source</td><td>Answer Type</td><td>Complex Question Types</td><td>Question Type</td><td>Time Frame</td><td>Temporal Metadata</td><td>Multi-Hop</td></tr><tr><td>NewsQuizQA (Lelkes et al., 2021)</td><td>No</td><td>20K</td><td>Crowd sourced</td><td>News</td><td>Multiple choice</td><td>-</td><td>Attr</td><td>2018–2022</td><td>No</td><td>No</td></tr><tr><td>NewsQA (Trischler et al., 2016)</td><td>Partially</td><td>119K</td><td>Crowd sourced</td><td>News</td><td>Extractive</td><td>TimeAttr</td><td>Attr</td><td>2007–2015</td><td>No</td><td>No</td></tr><tr><td>HOTPOTQA (Yang et al., 2018)</td><td>No</td><td>113K</td><td>Crowd sourced</td><td>Wikipedia</td><td>Extractive</td><td>-</td><td>Attr, Comp</td><td>Unspecified</td><td>No</td><td>2 hops</td></tr><tr><td>LC-QuAD 2.0 (Dubey et al., 2019)</td><td>Partially</td><td>30K</td><td>Crowd sourced</td><td>Wikipedia</td><td>Extractive</td><td>TimeAttr</td><td>Attr, Count</td><td>Unspecified</td><td>No</td><td>No</td></tr><tr><td>TORQUE (Ning et al., 2020)</td><td>Yes</td><td>21K</td><td>Crowd sourced</td><td>News</td><td>Generative</td><td>TimeAttr</td><td>Attr</td><td>Unspecified (short)</td><td>No</td><td>No</td></tr><tr><td>Time-Sensitive-QA (Chen et al., 2021)</td><td>Yes</td><td>41K</td><td>Aut. Generated</td><td>Wikipedia</td><td>Extractive</td><td>TimeAttr</td><td>Attr</td><td>Unspecified (long)</td><td>No</td><td>No</td></tr><tr><td>TempQuestions (Jia et al., 2018a)</td><td>Yes</td><td>1K</td><td>Aut. Generated</td><td>Freebase</td><td>Extractive</td><td>TimeAttr, TimeComp, TimeCount</td><td>Attr, Comp, Count</td><td>History</td><td>No</td><td>No</td></tr><tr><td>TKGQA (Ong et al., 2023)</td><td>Yes</td><td>5K</td><td>Aut. Generated</td><td>News</td><td>Extractive</td><td>TimeAttr</td><td>Attr</td><td>2022</td><td>No</td><td>No</td></tr><tr><td>MenatQA (Wei et al., 2023)</td><td>Yes</td><td>2K</td><td>Aut. Generated</td><td>Wikipedia</td><td>Extractive</td><td>TimeAttr</td><td>Attr</td><td>Unspecified (long)</td><td>No</td><td>No</td></tr><tr><td>TDDiscourse (Naik et al., 2019)</td><td>Yes</td><td>6K</td><td>Aut. Generated</td><td>News</td><td>Extractive</td><td>TimeAttr</td><td>Attr</td><td>Unspecified (short)</td><td>No</td><td>No</td></tr><tr><td>ArchivalQA (Wang et al., 2021)</td><td>Partially</td><td>532K</td><td>Aut. Generated</td><td>News</td><td>Extractive</td><td>TimeAttr</td><td>Attr, Count</td><td>1987–2007</td><td>No</td><td>No</td></tr><tr><td>COMPLEXTEMPQA</td><td>Yes</td><td>100,228K</td><td>Aut. Generated</td><td>Wikipedia</td><td>Extractive, Boolean</td><td>TimeAttr, TimeComp, TimeCount, Unnamed questions</td><td>Attr, Comp, Count</td><td>1987–2023</td><td>Yes</td><td>≤ 2 hops</td></tr></table>
|
| 49 |
+
|
| 50 |
+
temporal questions, containing 1,271 questions that are all temporal in nature, paired with their answers. That work provides a simple definition for temporal questions and demonstrates the need for further research on complex queries. Stricker (Stricker, 2023) applies answer extraction techniques from general question answering to retrieve temporal answers by identifying and processing time expressions. Their approach focuses on structured temporal information and distinguishes between absolute and relative time expressions.
|
| 51 |
+
|
| 52 |
+
Unlike other datasets, ours stands out due to its unique characteristics: (a) it comprises a number of question-answer pairs that is orders of magnitude larger than those in other datasets, (b) it categorizes these questions into specific types, (c) it includes complex questions, and (d) the questions are temporal in nature, with each strictly assigned to a specific time span.
|
| 53 |
+
|
| 54 |
+
# 3 Dataset Characteristics
|
| 55 |
+
|
| 56 |
+
We describe the COMPLEXTEMPQA characteristics along the four dimensions.
|
| 57 |
+
|
| 58 |
+
Size: COMPLEXTEMPQA comprises 100 million question-answer pairs and covers the period from 1987 to 2023. The dataset has been curated to probe the understanding of temporal knowledge within this 36-year span, encapsulating events, entity milestones, and other time-sensitive data.
|
| 59 |
+
|
| 60 |
+
Question Types and Taxonomy: The primary objective when constructing COMPLEXTEMPQA was to incorporate a broad spectrum of temporal
|
| 61 |
+
|
| 62 |
+
Table 1: Comparison of COMPLEXTEMPQA with existing datasets highlighting the key aspects of question creation methodologies, answer types, complexity, temporal scope, and structure. Attr means attribute-type question, Comp denotes comparison-type questions and Count are counting-type questions.
|
| 63 |
+
|
| 64 |
+
<table><tr><td>Name</td><td>Total</td></tr><tr><td>Attribute Event</td><td>83,798</td></tr><tr><td>Attribute Entity</td><td>84,079</td></tr><tr><td>Attribute Time</td><td>9,454</td></tr><tr><td>Comparison Event</td><td>25,353,340</td></tr><tr><td>Comparison Entity</td><td>74,678,117</td></tr><tr><td>Comparison Time</td><td>54,022,952</td></tr><tr><td>Counting Event</td><td>18,325</td></tr><tr><td>Counting Entity</td><td>10,798</td></tr><tr><td>Counting Time</td><td>12,732</td></tr><tr><td>Multi-Hop:</td><td>76,933</td></tr><tr><td>Unnamed Event:</td><td>8,707,123</td></tr><tr><td>Total:</td><td>100,228,457</td></tr></table>
|
| 65 |
+
|
| 66 |
+
Table 2: Dataset distribution (time questions are integrated within events or entities).
|
| 67 |
+
|
| 68 |
+

|
| 69 |
+
Figure 2: Taxonomy of temporal question types.
|
| 70 |
+
|
| 71 |
+
questions. Our dataset offers extensive coverage across diverse subjects by aligning with IPTC MediaTopic standards<sup>2</sup>, ensuring a broad range of relevant topics. The questions are also organized using a taxonomy that categorizes them by the questioned entity or event and the nature of the knowledge they probe, divided into attribute, comparison, and counting questions (see Figure 2). The numbers for each question type are shown in Table 2. Below we provide description of each type, while specific examples are given in Appendix A.
|
| 72 |
+
|
| 73 |
+
Attribute-type questions ask about the properties of events or entities, or relate to a specific time (e.g., "When was the fall of the Berlin Wall?"). Answers usually consist of events, entities, dates (or lists of dates), or real numbers. For numerical answers involving units, we convert all measurements to the International System of Units (SI units) to ensure
|
| 74 |
+
|
| 75 |
+
consistency.
|
| 76 |
+
|
| 77 |
+
Comparison-type questions involve the comparison of up to three events, entities, or time periods. The comparison aspect can be either numerical or temporal. For example, we compare two temporal attributes in the question: "Did Halabja chemical attack happen after John F. Kennedy Jr. plane crash?" The answer to these questions can be either true, false, an entity, or an event. Due to the large number of possible questions that can be created based on comparison, this type is the most frequent in our dataset. We note that comparative questions require more reasoning than relatively simpler attribute type questions.
|
| 78 |
+
|
| 79 |
+
Counting-type questions—asking about a form of aggregation—record the frequency of a particular event type or the occurrence of an attribute for an entity. An example is "How often did an aviation accident with more than 38 deaths occur in Thailand between 1987 and 2023?" To make the answering of counting-type questions more precise, we always consider a specific time period and, in some cases, an attribute threshold. The threshold is determined by calculating the average value of the attribute across all comparable instances. For example, in the given example, the threshold refers to the number of deaths associated with the event. The answer to these questions is always a natural number.
|
| 80 |
+
|
| 81 |
+
Popularity of Questions. Questions are categorized as either popular or unpopular based on a popularity score derived from the English Wikipedia's page view statistics and the intrinsic complexity of the questions (see Sec. 4.1). A question is considered popular if all of its constituent entities or events are rated as common—that is, they have high page view counts that reflect broad public familiarity. We use the standard deviation for thresholds since page views follow a long-tail distribution. An average-based threshold would misclassify low-view questions as well-known. This approach helps ensure that notable events and entities are classified as popular. For example, a popular time attribute-type question is: "When was the death of Diana, Princess of Wales?"
|
| 82 |
+
|
| 83 |
+
Questions that require advanced reasoning—such as counting-type questions, multi-hop queries, or modified versions of standard questions that implicitly reference an event without explicitly naming it (which we refer to as unnamed event questions; see Sec. 4.2 for details)—are inherently more challenging and are automatically classified
|
| 84 |
+
|
| 85 |
+
as unpopular.
|
| 86 |
+
|
| 87 |
+
# Metadata and Evaluation. COMPLEX-
|
| 88 |
+
|
| 89 |
+
TEMPQA includes several metadata fields for each question, serving multiple purposes such as facilitating the retrieval of entities and events from the question or answer, enabling in-depth analysis of the dataset, and supporting segmentation based on attributes such as type, year, or popularity score. Specifically, the metadata comprises the following:
|
| 90 |
+
|
| 91 |
+
- Type of Question: The question type is specified based on the taxonomy shown in Figure 2.
|
| 92 |
+
|
| 93 |
+
- Identifiers: All corresponding Wikidata item identifiers for the entities or events that are either the subject of the question or part of the answer are included.
|
| 94 |
+
|
| 95 |
+
- Country: The country associated with the questioned entities or events and their answers is provided, if applicable.
|
| 96 |
+
|
| 97 |
+
- Complexity Indicators: These indicate properties used for generating multi-hop questions and whether the question is an unnamed event question.
|
| 98 |
+
|
| 99 |
+
- Popularity Rating: The popularity of the question is rated based on whether it concerns popular or unpopular entities or events.
|
| 100 |
+
|
| 101 |
+
- Time Span: A temporal range is specified for each question.
|
| 102 |
+
|
| 103 |
+
Appendix B provides further details on each metadata field together with an illustrative example.
|
| 104 |
+
|
| 105 |
+
# 4 Dataset Creation Pipeline
|
| 106 |
+
|
| 107 |
+
In this section, we present our methodology for constructing the dataset. We first describe the data acquisition process from Wikipedia and Wikidata, followed by the procedure for generating multi-hop questions. Finally, we detail the formation of question-answer pairs. An overview of the entire pipeline is illustrated in Figure 3.
|
| 108 |
+
|
| 109 |
+
# 4.1 Dataset Source Extraction
|
| 110 |
+
|
| 111 |
+
Different question types call for distinct data sources to best capture the required information while ensuring reliability. For the event attribute-type questions, we extracted every entry from "single year" Wikipedia pages (see, for example, year $1987^{3}$ ), collecting information on significant events
|
| 112 |
+
|
| 113 |
+

|
| 114 |
+
Figure 3: A simplified view of the dataset creation pipeline, showing how events and entities from Wikipedia and Wikidata are processed into final question-answer pairs with metadata and popularity scores.
|
| 115 |
+
|
| 116 |
+
occurring over a 36-year span (1987-2023). We then applied a filtering step to discard entries lacking a clear timestamp or falling outside our time frame.
|
| 117 |
+
|
| 118 |
+
We used the same Wikipedia sources to generate comparison-type questions, comparing up to three events (or entities) by examining attributes such as date, location, or other numerical values. These questions typically include terms like "higher/lower," "before/after," or "happened first."
|
| 119 |
+
|
| 120 |
+
To construct entity attribute-type questions, we compiled a list of entities by querying Wikidata through SPARQL, focusing on items such as "movies" and "heads of state." These predefined items were derived from the IPTC MediaTopic standards and manually curated. Because each item can yield an extensive list of possible entities, we filtered results based on the Wikipedia page views of those entities. For example, a raw list of over 100,000 "movie" entities was reduced to 35,991 by applying a page-view threshold.
|
| 121 |
+
|
| 122 |
+
Lastly, for counting-type questions, we used a distinct approach, as these questions enumerate sets of events or entities instead of focusing on a single event or entity. We began by creating SPARQL query templates tailored to specific counting tasks. For instance, by querying the Wikidata item "Presidents of the United States" within a specific time range, we obtained a list of all relevant individuals for potential counting-type questions. In some cases, we could directly use the resulting list; however, certain lists might be incomplete if Wikidata omits minor events (e.g. earthquakes). To mitigate such omissions, we introduced a threshold. For example, for "number of deaths in some calamity," we used the average values of corresponding at
|
| 123 |
+
|
| 124 |
+
attributes from Wikidata to define the cutoff.
|
| 125 |
+
|
| 126 |
+
# 4.2 Dataset Complexity Enhancement
|
| 127 |
+
|
| 128 |
+
We next increased the complexity of the dataset by introducing a module to create multi-hop questions. The idea is to leverage shared properties across the events and entities extracted in the previous step, requiring a multi-step reasoning processes to answer a question.
|
| 129 |
+
|
| 130 |
+
# Example of Multi-Hop Question. Consider the question:
|
| 131 |
+
|
| 132 |
+
"What was the highest point of the country where the 1988 Summer Olympics happened, in meters?"
|
| 133 |
+
|
| 134 |
+
1. Select a specific event (the 1988 Summer Olympics) as the initial anchor.
|
| 135 |
+
2. Retrieve a property from that event (country).
|
| 136 |
+
3. Formulate a further query about that country by selecting an additional attribute (the highest point, in this case).
|
| 137 |
+
|
| 138 |
+
This multi-hop process requires multiple pieces of information across different domains—first about an event (location, date), then about a geographical feature related to that location. Multiple hops necessitate more complex computation which can be especially challenging in temporal settings when asking about more obscure events or entities from the past.
|
| 139 |
+
|
| 140 |
+
As another complexity enhancement, we created additional event references with implicit naming to expand the range of questions. For instance, "Lauda Air Flight 004 accident" was rephrased as "the aviation accident in 1991 which resulted in 223 deaths." We formed such references by combining the event's year with a property (e.g., number of fatalities), then confirming via a SPARQL query that no other events shared these attributes to ensure the lack of temporal ambiguity.
|
| 141 |
+
|
| 142 |
+
# 4.3 Dataset Formation and Enrichment
|
| 143 |
+
|
| 144 |
+
The final step involved constructing the actual question-answer pairs by integrating events, entities, and counting results into predefined question templates (see Appendix A). Designing the templates for generating question-answer pairs presented several challenges. The templates needed to be general enough to cover a broad range of temporal reasoning tasks while remaining structured enough to maintain coherence and logical validity.
|
| 145 |
+
|
| 146 |
+
The dataset had to support diverse temporal expressions, such as absolute dates, relative references, and temporal signals, requiring precise formatting and adaptability. Ensuring the generated questions were grammatically correct and naturally phrased was crucial, necessitating careful design to avoid awkward sentence constructions. Some questions required multiple reasoning steps involving different events and entities, making it challenging to construct templates that preserved logical consistency while maintaining clarity.
|
| 147 |
+
|
| 148 |
+
Below is an overview:
|
| 149 |
+
|
| 150 |
+
- Attribute-type questions: Query specific attributes of an event or entity. Following (Chen et al., 2021), we also included additional relations to enhance the comprehensiveness of these queries.
|
| 151 |
+
- Comparison-type questions: Select up to three events or entities to compare, using terms such as "higher/lower," "smallest/largest," "before/after," or "happened first."
|
| 152 |
+
- Counting-type questions: Specify a time frame (e.g. five years) and query the relevant category (e.g. earthquakes, Nobel Peace Prize recipients) to count the number of matching events or entities.
|
| 153 |
+
|
| 154 |
+
Once the QA pairs were generated, we enriched them with metadata such as corresponding Wiki-data IDs, the relevant country, and the specific time frame of the question. We additionally assigned popularity scores as described in Section 3.
|
| 155 |
+
|
| 156 |
+
# 5 Dataset Quality Assessment
|
| 157 |
+
|
| 158 |
+
The quality assessment by human raters is essential to ensure that COMPLEXTEMPQA meets the high standards of clarity and readability required for advanced research. Expert evaluation allows us to detect and address potential errors, ambiguities, or biases, thereby reinforcing the dataset's reliability.
|
| 159 |
+
|
| 160 |
+
To evaluate COMPLEXTEMPQA, we conducted a user study with 11 volunteers (4 females, 7 males; 4 with secondary education and 7 with postgraduate degrees; ages 26-56, predominantly in their 20s and 30s). Participants assessed 450 randomly selected questions, evenly distributed across all types, using a 5-point Likert scale across four dimensions: (1) readability; (2) ease of answering prior to using a web search engine; (3) ease of answering
|
| 161 |
+
|
| 162 |
+

|
| 163 |
+
|
| 164 |
+
Figure 4: Result of the quality check.
|
| 165 |
+
|
| 166 |
+
<table><tr><td>Method</td><td>Parameters</td><td>Precision</td><td>Recall</td><td>F1</td><td>Con</td></tr><tr><td>Zephyr</td><td>7B</td><td>3.76</td><td>33.50</td><td>4.90</td><td>55.97</td></tr><tr><td>Falcon</td><td>7B</td><td>0.31</td><td>34.22</td><td>0.62</td><td>64.21</td></tr><tr><td>Llama-chat 7B</td><td>7B</td><td>3.68</td><td>33.94</td><td>6.09</td><td>50.32</td></tr><tr><td>Mistral</td><td>7B</td><td>3.73</td><td>48.34</td><td>6.33</td><td>58.31</td></tr><tr><td>LLama-chat 13B</td><td>13B</td><td>3.61</td><td>32.77</td><td>6.05</td><td>53.27</td></tr><tr><td>Vicuna</td><td>33B</td><td>2.02</td><td>37.27</td><td>3.63</td><td>58.26</td></tr><tr><td>Mixtral</td><td>8x7B</td><td>3.34</td><td>40.41</td><td>5.65</td><td>60.21</td></tr><tr><td>LLama-chat 70B</td><td>70B</td><td>5.19</td><td>39.30</td><td>8.31</td><td>57.33</td></tr><tr><td>Wizardlm</td><td>70b</td><td>1.63</td><td>27.63</td><td>2.80</td><td>50.44</td></tr><tr><td>GPT-3.5</td><td>-</td><td>2.68</td><td>29.12</td><td>4.56</td><td>46.79</td></tr><tr><td>GPT-4-o</td><td>-</td><td>8.30</td><td>29.90</td><td>10.47</td><td>46.55</td></tr></table>
|
| 167 |
+
|
| 168 |
+
Table 3: Performance of zero-shot LLMs.
|
| 169 |
+
|
| 170 |
+
after conducting a web search; and (4) overall clarity (including lack of ambiguity). For dimensions (2) and (3), participants first rated the questions based solely on their own knowledge (2), and then again after performing web search (3) with explicit instructions not to use any large language models.
|
| 171 |
+
|
| 172 |
+
Figure 4 shows that questions generally received high ratings for readability and clarity. However, participants reported that answering questions without a search engine was challenging, while the access to web search results significantly improved answerability. Notably, counting-type questions remained the most difficult to answer even after web searches, as they often require special type of inference. Additionally, some counting- and comparison-type questions received lower clarity scores, suggesting opportunities for further refinement. Overall, the expected familiarity of the questions significantly influenced the ratings, with questions classified as unpopular proving more challenging both before and after web search.
|
| 173 |
+
|
| 174 |
+
# 6 Experiments
|
| 175 |
+
|
| 176 |
+
We evaluate multiple Large Language Models (LLMs), including Llama, Mistral, Mixtral, Falcon, Vicuna, Zephyr, WizardLM, GPT-3.5, and GPT-4-o, each selected for its unique strengths. We discuss the models in Appendix C, while Appendix D lists the prompts used in experiments.
|
| 177 |
+
|
| 178 |
+
Evaluating LLMs (Guo et al., 2023; Abdallah et al., 2023), especially for question answering, is challenging due to the verbose nature of the re
|
| 179 |
+
|
| 180 |
+
<table><tr><td>Method</td><td>Parameters</td><td>Shots</td><td>Precision</td><td>Recall</td><td>F1</td><td>Con</td><td>EM</td></tr><tr><td rowspan="4">Llama-2</td><td rowspan="4">7B</td><td>0</td><td>3.675</td><td>33.935</td><td>6.09</td><td>50.315</td><td>0.035</td></tr><tr><td>1</td><td>7.08</td><td>27.21</td><td>9.00</td><td>43.09</td><td>3.57</td></tr><tr><td>2</td><td>23.05</td><td>30.65</td><td>23.655</td><td>33.06</td><td>21.49</td></tr><tr><td>3</td><td>23.67</td><td>30.38</td><td>24.22</td><td>31.78</td><td>22.25</td></tr><tr><td rowspan="4">Llama-2</td><td rowspan="4">13B</td><td>0</td><td>3.605</td><td>32.76</td><td>6.05</td><td>53.27</td><td>0.0085</td></tr><tr><td>1</td><td>22.865</td><td>27.91</td><td>23.345</td><td>38.11</td><td>21.525</td></tr><tr><td>2</td><td>31.645</td><td>32.35</td><td>31.56</td><td>31.465</td><td>30.37</td></tr><tr><td>3</td><td>30.37</td><td>32.03</td><td>30.495</td><td>32.46</td><td>29.00</td></tr><tr><td rowspan="4">Llama-2</td><td rowspan="4">70B</td><td>0</td><td>5.191</td><td>39.30</td><td>8.31</td><td>57.32</td><td>0.138</td></tr><tr><td>1</td><td>25.74</td><td>32.61</td><td>18.8</td><td>49.60</td><td>13.61</td></tr><tr><td>2</td><td>34.01</td><td>44.21</td><td>35.26</td><td>43.27</td><td>31.78</td></tr><tr><td>3</td><td>37.09</td><td>46.57</td><td>38.44</td><td>42.77</td><td>34.59</td></tr><tr><td rowspan="4">Mistral-Instruct</td><td rowspan="4">7B</td><td>0</td><td>3.73</td><td>48.33</td><td>6.325</td><td>58.30</td><td>0.034</td></tr><tr><td>1</td><td>24.68</td><td>35.33</td><td>25.87</td><td>41.81</td><td>21.83</td></tr><tr><td>2</td><td>32.74</td><td>35.91</td><td>33.145</td><td>34.82</td><td>30.55</td></tr><tr><td>3</td><td>35.28</td><td>37.91</td><td>35.68</td><td>36.26</td><td>32.93</td></tr><tr><td rowspan="4">Mixtral</td><td rowspan="4">8x7B</td><td>0</td><td>3.34</td><td>40.41</td><td>5.65</td><td>60.20</td><td>0.156</td></tr><tr><td>1</td><td>6.76</td><td>39.06</td><td>9.17</td><td>52.87</td><td>2.75</td></tr><tr><td>2</td><td>14.27</td><td>41.89</td><td>16.44</td><td>52.64</td><td>10.22</td></tr><tr><td>3</td><td>15.49</td><td>44.03</td><td>17.83</td><td>51.57</td><td>11.25</td></tr><tr><td rowspan="4">GPT-3.5</td><td rowspan="4">-</td><td>0</td><td>2.68</td><td>29.12</td><td>4.56</td><td>46.79</td><td>0.008</td></tr><tr><td>1</td><td>21.12</td><td>45.58</td><td>23.95</td><td>52.77</td><td>15.80</td></tr><tr><td>2</td><td>30.88</td><td>41.17</td><td>32.71</td><td>37.79</td><td>26.01</td></tr><tr><td>3</td><td>31.68</td><td>42.37</td><td>33.40</td><td>38.85</td><td>26.53</td></tr><tr><td rowspan="4">GPT-4o</td><td rowspan="4">-</td><td>0</td><td>8.30</td><td>29.90</td><td>10.47</td><td>46.55</td><td>3.45</td></tr><tr><td>1</td><td>21.12</td><td>45.58</td><td>23.95</td><td>52.77</td><td>15.80</td></tr><tr><td>2</td><td>40.82</td><td>53.83</td><td>42.92</td><td>48.12</td><td>35.62</td></tr><tr><td>3</td><td>43.91</td><td>56.08</td><td>45.72</td><td>47.62</td><td>39.07</td></tr></table>
|
| 181 |
+
|
| 182 |
+
Table 4: Performance of few-shot LLM Models.
|
| 183 |
+
|
| 184 |
+
<table><tr><td>Method</td><td>Parameters</td><td>Context</td><td>Precision</td><td>Recall</td><td>F1</td><td>Con</td></tr><tr><td rowspan="3">Llama-2</td><td rowspan="3">7B</td><td>No Context</td><td>3.67</td><td>33.93</td><td>6.09</td><td>50.31</td></tr><tr><td>Retriever</td><td>3.59</td><td>33.67</td><td>5.97</td><td>53.48</td></tr><tr><td>True Context</td><td>3.92</td><td>37.40</td><td>6.49</td><td>56.03</td></tr><tr><td rowspan="3">Llama-2</td><td rowspan="3">13B</td><td>No Context</td><td>3.60</td><td>32.76</td><td>6.05</td><td>53.27</td></tr><tr><td>Retriever</td><td>3.50</td><td>34.22</td><td>5.84</td><td>55.38</td></tr><tr><td>True Context</td><td>3.75</td><td>37.09</td><td>6.28</td><td>57.42</td></tr><tr><td rowspan="3">Llama-2</td><td rowspan="3">70B</td><td>No Context</td><td>5.19</td><td>39.30</td><td>8.31</td><td>57.32</td></tr><tr><td>Retriever</td><td>5.27</td><td>36.16</td><td>8.12</td><td>56.45</td></tr><tr><td>True Context</td><td>5.82</td><td>38.59</td><td>8.82</td><td>58.26</td></tr><tr><td rowspan="3">Mistral-Instruct</td><td rowspan="3">7B</td><td>No Context</td><td>3.73</td><td>48.33</td><td>6.32</td><td>58.30</td></tr><tr><td>Retriever</td><td>3.86</td><td>33.32</td><td>6.31</td><td>55.90</td></tr><tr><td>True Context</td><td>5.13</td><td>35.26</td><td>8.08</td><td>54.14</td></tr><tr><td rowspan="3">Mixtral</td><td rowspan="3">8x7B</td><td>No Context</td><td>3.34</td><td>40.41</td><td>5.65</td><td>60.20</td></tr><tr><td>Retriever</td><td>4.23</td><td>35.93</td><td>6.62</td><td>56.30</td></tr><tr><td>True Context</td><td>3.65</td><td>38.02</td><td>5.88</td><td>60.54</td></tr></table>
|
| 185 |
+
|
| 186 |
+
Table 5: Performance of LLMs in RAG QA setting.
|
| 187 |
+
|
| 188 |
+
sponses. Traditional metrics like Exact Match and F1 score may not be suitable. To address this, we use model-agnostic metrics like Token Recall and Answer String Containment<sup>4</sup>. Token Recall measures how well the model's response covers the ground truth. Answer String Containment assesses if the model's response captures the core answer.
|
| 189 |
+
|
| 190 |
+
# 6.1 Zero-shot Results
|
| 191 |
+
|
| 192 |
+
We conducted zero-shot QA experiments to evaluate different Large Language Models (LLMs). The models generate responses based solely on their pre-training. The results, presented in Table 3, show varying performance across different metrics. Notably, model size is not the sole determinant of performance. For instance, Llama-chat models, with fewer parameters, perform comparably
|
| 193 |
+
|
| 194 |
+
to GPT-3.5. Some models, like GPT-4o, Vicuna and Mistral, suggest a trade-off between precision and comprehensiveness. Models like Zephyr and Falcon, despite lower precision and F1 scores, have high recall and containment scores, indicating their ability to capture significant portions of the ground truth. Lastly, the WizardLM model was found to have lower scores across all metrics.
|
| 195 |
+
|
| 196 |
+
# 6.2 Few-shot Results
|
| 197 |
+
|
| 198 |
+
In the few-shot learning setting (Chada and Natarajan, 2021), models improve as they are provided with more examples, as seen in Table 4. Across all models, performance increases with additional shots, but the rate of improvement plateaus after two shots, indicating diminishing returns. The Llama-2 7B, 13B, and 70B models exhibit steady gains, with the 70B variant achieving the highest performance among them. Similarly, Mistral-Instruct and Mixtral models follow the same trend, though with smaller absolute gains. Notably, GPT-4o outperforms all models, showing a significant improvement in F1 score from 10.47 (zero-shot) to 45.72 (three-shot), along with the highest recall and containment scores, demonstrating its superior ability to adapt with few-shot examples. Finally, as expected, GPT-3.5's performance is much worse than the one of GPT-4o.
|
| 199 |
+
|
| 200 |
+
# 6.3 RAG Results
|
| 201 |
+
|
| 202 |
+
Retrieval-augmented generation (RAG) (Lewis et al., 2020; Abdallah and Jatowt, 2023) combines the strengths of pre-trained language models and information retrieval systems to generate responses in a question-answering setting. In RAG, when a question is posed, relevant documents are first retrieved from a large corpus. These retrieved documents are then provided as additional context to a language model, which generates a response based on both the original question and the retrieved documents. Following (Karpukhin et al., 2020), we use the English Wikipedia dump from Dec. 20, 2018 as the source documents for answering questions, which contains 21,015,324 passages in total. Each passage is prepended with the title of the Wikipedia article from which it originates, along with an [SEP] token.
|
| 203 |
+
|
| 204 |
+
In this experiment, we aimed to evaluate the efficiency of appending the retrieved context to LLMs retrieved by Dense Passage Retriever (DPR) (Karpukhin et al., 2020) for question answering. We tested three different settings for each
|
| 205 |
+
|
| 206 |
+
<table><tr><td rowspan="2">Method</td><td rowspan="2">Parameters</td><td colspan="4">Attribute-type</td><td colspan="4">Comparison-type</td><td colspan="4">Counting-type</td></tr><tr><td>Precision</td><td>Recall</td><td>F1</td><td>Con</td><td>Precision</td><td>Recall</td><td>F1</td><td>Con</td><td>Precision</td><td>Recall</td><td>F1</td><td>Con</td></tr><tr><td>Llama-2</td><td>7B</td><td>6.55</td><td>60.70</td><td>9.52</td><td>96.86</td><td>5.30</td><td>58.05</td><td>8.83</td><td>63.20</td><td>0.34</td><td>10.50</td><td>0.66</td><td>80.24</td></tr><tr><td>Llama-2</td><td>13B</td><td>6.17</td><td>61.26</td><td>10.67</td><td>96.77</td><td>5.22</td><td>59.53</td><td>8.75</td><td>63.30</td><td>0.16</td><td>5.86</td><td>0.30</td><td>86.13</td></tr><tr><td>Llama-2</td><td>70B</td><td>8.21</td><td>65.85</td><td>13.71</td><td>97.63</td><td>7.06</td><td>61.41</td><td>11.25</td><td>64.76</td><td>0.43</td><td>16.42</td><td>0.84</td><td>48.99</td></tr><tr><td>Mistral-Instruct</td><td>7B</td><td>5.87</td><td>54.00</td><td>9.96</td><td>96.52</td><td>8.33</td><td>57.79</td><td>12.73</td><td>62.18</td><td>0.68</td><td>20.80</td><td>1.31</td><td>87.45</td></tr><tr><td>Mixtral</td><td>8*7B</td><td>4.04</td><td>75.80</td><td>7.21</td><td>97.25</td><td>5.18</td><td>63.50</td><td>8.86</td><td>72.10</td><td>0.60</td><td>27.44</td><td>1.17</td><td>90.10</td></tr><tr><td>GPT-3.5</td><td>-</td><td>9.48</td><td>73.16</td><td>15.87</td><td>70.02</td><td>6.51</td><td>55.07</td><td>10.41</td><td>43.50</td><td>0.20</td><td>4.84</td><td>0.39</td><td>77.38</td></tr><tr><td>GPT-4o</td><td>-</td><td>23.94</td><td>75.56</td><td>30.05</td><td>72.66</td><td>12.38</td><td>71.63</td><td>17.77</td><td>57.17</td><td>2.16</td><td>20.67</td><td>3.46</td><td>78.61</td></tr></table>
|
| 207 |
+
|
| 208 |
+
Table 6: Performance on Attribute-, Comparison-, and Counting-type questions.
|
| 209 |
+
|
| 210 |
+
<table><tr><td rowspan="2">Method</td><td rowspan="2">Parameters</td><td colspan="4">Entity</td><td colspan="4">Event</td><td colspan="4">Time</td></tr><tr><td>Precision</td><td>Recall</td><td>F1</td><td>Con</td><td>Precision</td><td>Recall</td><td>F1</td><td>Con</td><td>Precision</td><td>Recall</td><td>F1</td><td>Con</td></tr><tr><td>Llama-2</td><td>7B</td><td>4.26</td><td>40.86</td><td>6.95</td><td>75.80</td><td>4.75</td><td>53.25</td><td>7.87</td><td>82.00</td><td>3.38</td><td>41.86</td><td>5.84</td><td>76.09</td></tr><tr><td>Llama-2</td><td>13B</td><td>3.79</td><td>40.70</td><td>6.52</td><td>80.95</td><td>4.96</td><td>49.72</td><td>8.31</td><td>81.80</td><td>3.14</td><td>38.27</td><td>5.45</td><td>81.28</td></tr><tr><td>Llama-2</td><td>70B</td><td>5.07</td><td>47.55</td><td>8.45</td><td>82.31</td><td>7.23</td><td>60.18</td><td>11.28</td><td>85.10</td><td>4.50</td><td>53.50</td><td>7.67</td><td>84.02</td></tr><tr><td>Mistral-Instruct</td><td>7B</td><td>3.91</td><td>35.43</td><td>6.53</td><td>79.20</td><td>7.49</td><td>62.28</td><td>11.64</td><td>84.60</td><td>4.31</td><td>39.85</td><td>6.95</td><td>81.55</td></tr><tr><td>Mixtral</td><td>8*7B</td><td>2.82</td><td>50.95</td><td>4.85</td><td>84.76</td><td>4.91</td><td>60.06</td><td>8.29</td><td>86.60</td><td>2.62</td><td>54.78</td><td>4.77</td><td>85.85</td></tr><tr><td>GPT-3.5</td><td>-</td><td>5.59</td><td>43.64</td><td>9.32</td><td>64.47</td><td>6.80</td><td>52.17</td><td>10.73</td><td>58.63</td><td>4.33</td><td>39.23</td><td>7.32</td><td>64.63</td></tr><tr><td>GPT-4o</td><td>-</td><td>14.10</td><td>51.55</td><td>17.10</td><td>72.03</td><td>13.77</td><td>57.17</td><td>18.02</td><td>59.76</td><td>11.00</td><td>57.12</td><td>15.85</td><td>72.78</td></tr></table>
|
| 211 |
+
|
| 212 |
+
Table 7: Performance on Entity, Event, and Time questions.
|
| 213 |
+
|
| 214 |
+
model: without context, with the first top retrieved passage as context, and with the true context. The true context is determined by retrieving 1,000 passages using DPR and conducting a simple search within these passages. If the answer was found within a passage, we selected the first passage that contains the answer as the true context. If the answer was not found in any of the retrieved passages, we selected a random passage.
|
| 215 |
+
|
| 216 |
+
Table 5 presents the results. The performance of the models usually improves when context is provided, with the true context generally leading to the best performance. This suggests that providing relevant context can help guide the models in generating more accurate and relevant responses. However, the performance varies across different models and settings, indicating that the effectiveness of RAG depends on both the specific model and the quality of the retrieved context.
|
| 217 |
+
|
| 218 |
+
# 6.4 Results on Different Question Types
|
| 219 |
+
|
| 220 |
+
Across different question types—attribute, comparison, counting, entity, event, and time—the performance of LLMs varies significantly, as shown in Tables 6 and 7. Counting type questions are most challenging followed by the comparison questions and then the attribute type questions.
|
| 221 |
+
|
| 222 |
+
Llama models exhibit a steady improvement with increasing parameters, with Llama-2 70B outperforming its smaller variants across most metrics. However, Mistral-Instruct and Mixtral, despite having fewer parameters, achieve comparable or better results in certain cases, particularly in recall and containment scores. GPT-4o consistently delivers the highest performance across all categories,
|
| 223 |
+
|
| 224 |
+
achieving the best precision, recall, and F1 scores, particularly excelling in attribute and comparison-type questions. It also dominates in entity, event, and time-based questions, highlighting its strong generalization ability. GPT-3.5 performs well but falls behind GPT-4o, particularly in recall and containment, indicating a weaker ability to retrieve and structure temporal knowledge.
|
| 225 |
+
|
| 226 |
+
# 7 Conclusions
|
| 227 |
+
|
| 228 |
+
We introduced COMPLEXTEMPQA, a large-scale dataset comprising over 100 million temporal question-answer pairs, surpassing existing benchmarks in scope, coverage, and complexity. Built on Wikipedia and Wikidata, it spans more than 30 years and covers a wide range of domains, including history, politics, sports, and science. We introduced a taxonomy categorizing questions into three key types: attributes, comparisons, and count, each requiring advanced temporal knowledge and temporal reasoning skills such as multi-hop inference, temporal aggregation, and event ordering. To support targeted evaluation, each question is enriched with structured metadata, enabling precise assessment of LLMs' ability to process and reason over temporal information. In Appendix E we discuss the different use cases of our dataset.
|
| 229 |
+
|
| 230 |
+
Finally, we evaluated several LLMs, revealing significant gaps in their capabilities. While state-of-the-art models performed relatively well on simpler questions, their performance on more complex temporal questions decreased significantly, highlighting the challenging character of our dataset.
|
| 231 |
+
|
| 232 |
+
# Limitations
|
| 233 |
+
|
| 234 |
+
Despite its advantages, COMPLEXTEMPQA has several limitations. The dataset is built upon Wikipedia and Wikidata, which are characterized by relatively high precision but may suffer from lower recall, meaning that while available facts are generally accurate, relevant historical or domain-specific facts might be missing. The dataset is also constrained by its timeframe, as it primarily covers the period of 1987 until 2023, limiting its applicability to broader historical analysis. Additionally, the temporal scope of questions may not always align perfectly with evolving real-world knowledge, as both Wikipedia and Wikidata are continuously updated. This is also a challenge in our RAG analysis for which we employ the Wikipedia dump from 2018 which is however commonly used as a retrieval corpus in RAG studies; thus we have adapted the same setting in our experiments. Moreover, the dataset contains a significant proportion of comparative questions, which, while valuable for evaluating comparative reasoning over historical knowledge, may introduce a bias towards one form of temporal inference. Addressing these challenges could improve the dataset's utility in future iterations.
|
| 235 |
+
|
| 236 |
+
# Acknowledgments
|
| 237 |
+
|
| 238 |
+
The computational results presented here have been achieved (in part) using the LEO HPC infrastructure of the University of Innsbruck.
|
| 239 |
+
|
| 240 |
+
# References
|
| 241 |
+
|
| 242 |
+
Abdelrahman Abdallah and Adam Jatowt. 2023. Generator-retriever-generator: A novel approach to open-domain question answering. arXiv preprint arXiv:2307.11278.
|
| 243 |
+
Abdelrahman Abdallah, Bhawna Piryani, and Adam Jatowt. 2023. Exploring the state of the art in legal qa systems. arXiv preprint arXiv:2304.06623.
|
| 244 |
+
Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, and 1 others. 2020. Language models are few-shot learners. Advances in neural information processing systems, 33:1877-1901.
|
| 245 |
+
Ricardo Campos, Gael Dias, Alipio M Jorge, and Adam Jatowt. 2014. Survey of temporal information retrieval and related applications. ACM Computing Surveys (CSUR), 47(2):1-41.
|
| 246 |
+
|
| 247 |
+
Rakesh Chada and Pradeep Natarajan. 2021. *Few-shot tasks: A simple framework for few-shot learning of question answering tasks using pre-trained text-to-text models.* arXiv preprint arXiv:2109.01951.
|
| 248 |
+
Wenhu Chen, Xinyi Wang, and William Yang Wang. 2021. A dataset for answering time-sensitive questions. CoRR, abs/2108.06314.
|
| 249 |
+
Tarcisio Souza Costa, Simon Gottschalk, and Elena Demidova. 2020. Event-qa: A dataset for event-centric question answering over knowledge graphs. CoRR, abs/2004.11861.
|
| 250 |
+
Tri Dao, Dan Fu, Stefano Ermon, Atri Rudra, and Christopher Ré. 2022. Flashattention: Fast and memory-efficient exact attention with io-awareness. Advances in Neural Information Processing Systems, 35:16344-16359.
|
| 251 |
+
Mohnish Dubey, Debayan Banerjee, Abdelrahman Abdelkawi, and Jens Lehmann. 2019. Lc-quad 2.0: A large dataset for complex question answering over wikidata and dbpedia. In Proceedings of the 18th International Semantic Web Conference, ISWC'19, pages 69-78.
|
| 252 |
+
Michael Farber, David Lamprecht, Johan Krause, Linn Aung, and Peter Haase. 2023. Semopenalex: The scientific landscape in 26 billion RDF triples. CoRR, abs/2308.03671.
|
| 253 |
+
Zishan Guo, Renren Jin, Chuang Liu, Yufei Huang, Dan Shi, Linhao Yu, Yan Liu, Jiaxuan Li, Bojian Xiong, Deyi Xiong, and 1 others. 2023. Evaluating large language models: A comprehensive survey. arXiv preprint arXiv:2310.19736.
|
| 254 |
+
Kelvin Han and Claire Gardent. 2023. Generating and answering simple and complex questions from text and from knowledge graphs. In Proceedings of the 13th International Joint Conference on Natural Language Processing and the 3rd Conference of the Asia-Pacific Chapter of the Association for Computational Linguistics (Volume 1: Long Papers), pages 285-304.
|
| 255 |
+
Nathan Hu, Eric Mitchell, Christopher D Manning, and Chelsea Finn. 2023. Meta-learning online adaptation of language models. arXiv preprint arXiv:2305.15076.
|
| 256 |
+
Adam Jatowt. 2022. Temporal question answering in news article collections. In Companion of The Web Conference 2022, Virtual Event / Lyon, France, April 25 - 29, 2022, page 895. ACM.
|
| 257 |
+
Zhen Jia, Abdalghani Abujabal, Rishiraj Saha Roy, Jannik Strötgen, and Gerhard Weikum. 2018a. Tempquestions: A benchmark for temporal question answering. In Companion of the The Web Conference 2018 on The Web Conference 2018, WWW 2018, Lyon, France, April 23-27, 2018, pages 1057-1062. ACM.
|
| 258 |
+
|
| 259 |
+
Zhen Jia, Abdalghani Abujabal, Rishiraj Saha Roy, Jannik Strötgen, and Gerhard Weikum. 2019. TEQUILA: temporal question answering over knowledge bases. CoRR, abs/1908.03650.
|
| 260 |
+
Zhen Jia, Abdalghani Abujabal, Rishiraj Saha Roy, Jannik Strötgen, and Gerhard Weikum. 2018b. Tempquestions: A benchmark for temporal question answering. In Companion Proceedings of the The Web Conference 2018, pages 1057-1062.
|
| 261 |
+
Albert Q Jiang, Alexandre Sablayrolles, Arthur Mensch, Chris Bamford, Devendra Singh Chaplot, Diego de las Casas, Florian Bressand, Gianna Lengyel, Guillaume Lample, Lucile Saulnier, and 1 others. 2023. Mistral 7b. arXiv preprint arXiv:2310.06825.
|
| 262 |
+
Vladimir Karpukhin, Barlas Oğuz, Sewon Min, Patrick Lewis, Ledell Wu, Sergey Edunov, Danqi Chen, and Wen-tau Yih. 2020. Dense passage retrieval for open-domain question answering. arXiv preprint arXiv:2004.04906.
|
| 263 |
+
Ádám D. Lelkes, Vinh Q. Tran, and Cong Yu. 2021. Quiz-style question generation for news stories. CoRR, abs/2102.09094.
|
| 264 |
+
Patrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich Kuttler, Mike Lewis, Wen-tau Yih, Tim Rocktäschel, and 1 others. 2020. Retrieval-augmented generation for knowledge-intensive nlp tasks. Advances in Neural Information Processing Systems, 33:9459-9474.
|
| 265 |
+
Hector Llorens, Nathanael Chambers, Naushad Uzzaman, Nasrin Mostafazadeh, James F. Allen, and James Pustejovsky. 2015. Semeval-2015 task 5: QA tempeval - evaluating temporal information understanding with question answering. In Proceedings of the 9th International Workshop on Semantic Evaluation, SemEval@NAACL-HLT 2015, Denver, Colorado, USA, June 4-5, 2015, pages 792-800.
|
| 266 |
+
Aakanksha Naik, Luke Breitbartler, and Carolyn P. Rosé. 2019. Tddiscourse: A dataset for discourse-level temporal ordering of events. In Proceedings of the 20th Annual SIGdial Meeting on Discourse and Dialogue, SIGdial 2019, Stockholm, Sweden, September 11-13, 2019, pages 239-249. Association for Computational Linguistics.
|
| 267 |
+
Qiang Ning, Hao Wu, Rujun Han, Nanyun Peng, Matt Gardner, and Dan Roth. 2020. TORQUE: A reading comprehension dataset of temporal ordering questions. CoRR, abs/2005.00242.
|
| 268 |
+
Ryan Ong, Jiahao Sun, Ovidiu Serban, and Yi-Ke Guo. 2023. TKGQA dataset: Using question answering to guide and validate the evolution of temporal knowledge graph. Data, 8(3):61.
|
| 269 |
+
Bhawna Piryani, Jamshid Mozafari, and Adam Jatowt. 2024. Chroniclingamericacaq: A large-scale question answering dataset based on historical american
|
| 270 |
+
|
| 271 |
+
newspaper pages. In Proceedings of the 47th International ACM SIGIR Conference on Research and Development in Information Retrieval, SIGIR 2024, Washington DC, USA, July 14-18, 2024, pages 2038-2048. ACM.
|
| 272 |
+
Evan Sandhaus. 2008. The new york times annotated corpus. Linguistic Data Consortium, Philadelphia, 6(12):e26752.
|
| 273 |
+
Tarcásio Souza Costa, Simon Gottschalk, and Elena Demidova. 2020. Event-qa: A dataset for event-centric question answering over knowledge graphs. In Proceedings of the 29th ACM international conference on information & knowledge management, pages 3157-3164.
|
| 274 |
+
Armand Stricker. 2023. Question answering in natural language: the special case of temporal expressions. arXiv preprint arXiv:2311.14087.
|
| 275 |
+
Jihoon Tack, Jaehyung Kim, Eric Mitchell, Jinwoo Shin, Yee Whye Teh, and Jonathan Richard Schwarz. 2024. Online adaptation of language models with a memory of amortized contexts. arXiv preprint arXiv:2403.04317.
|
| 276 |
+
Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, and 1 others. 2023. Llama 2: Open foundation and fine-tuned chat models. arXiv preprint arXiv:2307.09288.
|
| 277 |
+
Adam Trischler, Tong Wang, Xingdi Yuan, Justin Harris, Alessandro Sordoni, Philip Bachman, and Kaheer Suleman. 2016. Newsqa: A machine comprehension dataset. CoRR, abs/1611.09830.
|
| 278 |
+
Lewis Tunstall, Edward Beeching, Nathan Lambert, Nazneen Rajani, Kashif Rasul, Younes Belkada, Shengyi Huang, Leandro von Werra, Clémentine Fourrier, Nathan Habib, and 1 others. 2023. Zephyr: Direct distillation of lm alignment. arXiv preprint arXiv:2310.16944.
|
| 279 |
+
Ricardo Usbeck, Axel-Cyrille Ngonga Ngomo, Bastian Haarmann, Anastasia Krithara, Michael Röder, and Giulio Napolitano. 2017. 7th open challenge on question answering over linked data (qald-7). In Semantic Web Challenges: 4th SemWebEval Challenge at ESWC 2017, Porto Roz, Slovenia, May 28-June 1, 2017, Revised Selected Papers, pages 59-69. Springer.
|
| 280 |
+
Jonas Wallat, Adam Jatowt, and Avishek Anand. 2024. Temporal blind spots in large language models. CoRR, abs/2401.12078.
|
| 281 |
+
Jiexin Wang, Adam Jatowt, and Masatoshi Yoshikawa. 2021. Archivalqa: A large-scale benchmark dataset for open domain question answering over archival news collections. CoRR, abs/2109.03438.
|
| 282 |
+
|
| 283 |
+
Jiexin Wang, Adam Jatowt, Masatoshi Yoshikawa, and Yi Cai. 2023. Bitimebert: Extending pre-trained language representations with bi-temporal information. In Proceedings of the 46th International ACM SIGIR Conference on Research and Development in Information Retrieval, SIGIR 2023, Taipei, Taiwan, July 23-27, 2023, pages 812-821. ACM.
|
| 284 |
+
Yifan Wei, Yisong Su, Huanhuan Ma, Xiaoyan Yu, Fangyu Lei, Yuanzhe Zhang, Jun Zhao, and Kang Liu. 2023. Menatqa: A new dataset for testing the temporal comprehension and reasoning abilities of large language models. In Findings of the Association for Computational Linguistics: EMNLP 2023, Singapore, December 6-10, 2023, pages 1434-1447.
|
| 285 |
+
Georg Wenzel and Adam Jatowt. 2023. An overview of temporal commonsense reasoning and acquisition. CoRR, abs/2308.00002.
|
| 286 |
+
Can Xu, Qingfeng Sun, Kai Zheng, Xiubo Geng, Pu Zhao, Jiazhan Feng, Chongyang Tao, and Daxin Jiang. 2023. Wizardlm: Empowering large language models to follow complex instructions. arXiv preprint arXiv:2304.12244.
|
| 287 |
+
Zhilin Yang, Peng Qi, Saizheng Zhang, Yoshua Bengio, William W. Cohen, Ruslan Salakhutdinov, and Christopher D. Manning. 2018. Hotpotq: A dataset for diverse, explainable multi-hop question answering. CoRR, abs/1809.09600.
|
| 288 |
+
|
| 289 |
+
# A Example Questions and Templates
|
| 290 |
+
|
| 291 |
+
In our question generation process, we employed a range of templates, each tailored to different contexts and requirements. Below, we present several selected question templates showcasing the diversity of data:
|
| 292 |
+
|
| 293 |
+
# Attribute Queries
|
| 294 |
+
|
| 295 |
+
- What was [ATTR] of [ENTITY]?
|
| 296 |
+
|
| 297 |
+
Example: What was the genre of the movie Border?
|
| 298 |
+
|
| 299 |
+
- When was [PERSON] [ENTITY]?
|
| 300 |
+
|
| 301 |
+
Example: When was Girija Prasad Koirala President of Nepal?
|
| 302 |
+
|
| 303 |
+
- When [V1] [V2] [ENTITY]?
|
| 304 |
+
|
| 305 |
+
Example: When was the publication date of the movie in which Lou Diamond Phillips and Esai Morales acted?
|
| 306 |
+
|
| 307 |
+
# Comparison Queries
|
| 308 |
+
|
| 309 |
+
- Comparing [P1] of [ENTITY1] and [ENTITY2], which one has a [COMPARE] [P2]?
|
| 310 |
+
|
| 311 |
+
Example: Comparing the country of the company Google and the company Yandex, which one has a lower highest point?
|
| 312 |
+
|
| 313 |
+
- Did [EVENT1] have a [COMPARE] [ATTR] than [EVENT2]?
|
| 314 |
+
|
| 315 |
+
Example: Did the car bombing in 1993 (6 deaths) have a higher death toll than the train wreck in 1989 (645 deaths)?
|
| 316 |
+
|
| 317 |
+
- Did [EVENT1] or [EVENT2] happen first?
|
| 318 |
+
|
| 319 |
+
Example: Did Helios Airways Flight 522 accident or the 27th G8 summit happen first?
|
| 320 |
+
|
| 321 |
+
- Which one happened first, [EVENT1], [EVENT2], or [EVENT3]?
|
| 322 |
+
|
| 323 |
+
Example: Which happened first, the 69th Academy Awards, the USS Cole bombing, or the Daegu subway fire?
|
| 324 |
+
|
| 325 |
+
- Did [EVENT1] happen [SIGNAL] [EVENT2]?
|
| 326 |
+
|
| 327 |
+
Example: Did the Gulf War happen after Hurricane Hugo?
|
| 328 |
+
|
| 329 |
+
# Counting Queries
|
| 330 |
+
|
| 331 |
+
- How many times did [PERSON] win [ENTITY] [TIME]?
|
| 332 |
+
|
| 333 |
+
Example: How many times did Robert Richardson win the Academy Award for Best Cinematography between 1987 and 2007?
|
| 334 |
+
|
| 335 |
+
- How often did [EVENT] happen [TIME]?
|
| 336 |
+
|
| 337 |
+
Example: How often did an aviation accident with more than 54 participants in Argentina happen in 1999?
|
| 338 |
+
|
| 339 |
+
- In how many years did [EVENT] [YEAR] happen?
|
| 340 |
+
|
| 341 |
+
Example: In how many years did a aviation accident with more than 28 survivors between 2008 and 2023 by Xiamen Airlines happen?
|
| 342 |
+
|
| 343 |
+
# Multi-hop Queries
|
| 344 |
+
|
| 345 |
+
- Did [V] [ENTITY1] [SIGNAL] [V] [ENTITY2]?
|
| 346 |
+
|
| 347 |
+
Example: Did the publication of the movie with Lou Diamond Phillips and Esai Morales happen before the publication of Resident Evil: Extinction?
|
| 348 |
+
|
| 349 |
+
- What was the [P2] of the [P1] of [ENTITY] in meters?
|
| 350 |
+
|
| 351 |
+
Example: What was the highest point (in meters) of the country where the Moscow theater hostage crisis happened?
|
| 352 |
+
|
| 353 |
+
We employ placeholders to convey specific elements within the question templates. The placeholder [SIGNAL] denotes temporal relationships, such as "before" or "after," indicating the sequence of events or entities. [ATTR] stands for attributes like the number of injured people, providing context or additional information related to the events or entities. [YEAR] referring either to a specific year or between two years e.g. "in 1987" or "between 1987 and 2007". [COMPARE] signifies comparison relationships, such as "higher" or "lower," enabling the comparison of attributes or characteristics between events, entities, or their attributes. Then we have [V] to denote various verbs like "was" or "happened". [P] stands for properties used to create multi hop questions. Furthermore, we make a clear distinction between questions involving persons and those involving other entities, as the question structure may vary accordingly. Despite these differences, some question templates are versatile enough to accommodate both event and entity questions, ensuring flexibility and adaptability in our approach to question generation.
|
| 354 |
+
|
| 355 |
+
# B Metadata
|
| 356 |
+
|
| 357 |
+
We provide the following metadata:5
|
| 358 |
+
|
| 359 |
+
Entity in question: A list of Wikidata IDs of the question.
|
| 360 |
+
|
| 361 |
+
Entity in answer: A list of Wikidata IDs of the answer if it contains an entity.
|
| 362 |
+
|
| 363 |
+
Country in question: A list of country Wikidata IDs of the countries of the questioned entities.
|
| 364 |
+
|
| 365 |
+
Country in answer: A list of country Wikidata IDs of the countries of the entities in the answer.
|
| 366 |
+
|
| 367 |
+
Hop property: A list of Wikidata properties of the question if it contains a hop. If there are multiple hops, they are listed in the order of use.
|
| 368 |
+
|
| 369 |
+
Rating: A numerical rating where $O$ is considered a popular (or easy) question, and $I$ is considered a less popular or harder question according to the rating as described in Section 3.
|
| 370 |
+
|
| 371 |
+
Is unnamed: A numerical which is $I$ if the question contains an implicitly described event and $O$ otherwise.
|
| 372 |
+
|
| 373 |
+
Type: The type based on the taxonomy given in Figure 2.
|
| 374 |
+
|
| 375 |
+
Time span: The time frame to which the question relates to. For example, for the entity questions, the time frame ranges from born/creation to
|
| 376 |
+
|
| 377 |
+
death/destruction. The start is always the earlier date, and the end is the latter.
|
| 378 |
+
|
| 379 |
+
Below is an example for a question including the metadata:
|
| 380 |
+
|
| 381 |
+
- Question: What was the highest point of the country where the 1988 Summer Olympics happened, in meters?
|
| 382 |
+
Answer: [1950]
|
| 383 |
+
- Entity in question: [8470]
|
| 384 |
+
- Entity in answer: []
|
| 385 |
+
- Country in question: [884]
|
| 386 |
+
- Country in answer: []
|
| 387 |
+
- Hop property: [17, 610]
|
| 388 |
+
Rating: 1
|
| 389 |
+
- Is unnamed: 0
|
| 390 |
+
Time span: [1988-09-17, 1988-10-02]
|
| 391 |
+
|
| 392 |
+
# C Models used in Experiments
|
| 393 |
+
|
| 394 |
+
In experiments we test multiple Large Language Models, including Llama, Mistral, Mixtral, Falcon, Vicuna, Zephyr, WizardLM, GPT-3.5, and GPT-4-o, each selected for its unique strengths. Llama models, developed by Meta (Touvron et al., 2023), leverage reinforcement learning with human feedback (RLHF) for dialogue optimization. Mistral7B and Mixtral (Sparse Mixture of Experts) outperform Llama-2 13B and 70B, respectively, in various benchmarks (Jiang et al., 2023). GPT-3.5 improves upon GPT-3 by reducing toxicity and enhancing contextual understanding (Brown et al., 2020). Falcon, optimized for inference, utilizes multi-query attention and FlashAttention (Dao et al., 2022). Vicuna fine-tunes Llama-2 using ShareGPT data, enhancing conversational capabilities, while Zephyr employs distilled supervised fine-tuning (dSFT) for improved task accuracy (Tunstall et al., 2023). Finally, WizardLM, based on Llama-2 13B, refines instruction-following abilities using an EvolInstruct method (Xu et al., 2023).
|
| 395 |
+
|
| 396 |
+
# D Experiment Prompts
|
| 397 |
+
|
| 398 |
+
In all experiments, each LLM was prompted to function as a helpful assistant and deliver direct, concise answers. For models employing the Retrieval Augmented Generation (RAG) approach,
|
| 399 |
+
|
| 400 |
+
the prompt included additional context from retrieved documents to enhance the response quality. This modification ensured that responses were informed by relevant background information.
|
| 401 |
+
|
| 402 |
+
For all the experiments involving LLMs, we used the following prompt:
|
| 403 |
+
|
| 404 |
+
You are a helpful assistant. Provide direct and concise answer to the following question.
|
| 405 |
+
|
| 406 |
+
Question: <question>.
|
| 407 |
+
|
| 408 |
+
In the case of RAG, the prompt is slightly modified to incorporate the additional context provided by the retrieved documents. The prompt used for RAG is:
|
| 409 |
+
|
| 410 |
+
You are a helpful assistant. Using the context, provide direct and concise answers to the following question.
|
| 411 |
+
|
| 412 |
+
Question: <question>.
|
| 413 |
+
|
| 414 |
+
Context: <context>.
|
| 415 |
+
|
| 416 |
+
# E Dataset Use
|
| 417 |
+
|
| 418 |
+
We briefly list below the intended use cases of our dataset.
|
| 419 |
+
|
| 420 |
+
LLM Evaluation and Training. COMPLEX-TEMPQA is an effective resource for evaluating LLMs, as demonstrated in our preliminary study (Sec. 6). As the largest QA dataset currently available, it provides an unparalleled foundation for analyzing LLM performance. It supports fine-tuning, prompt engineering, and the assessment of temporal question answering capabilities (Wallat et al., 2024). Notably, the dataset facilitates rigorous evaluation of truthfulness by offering unprecedented diversity and scale—critical factors for mitigating hallucinations. Moreover, its rich temporal metadata expands the scope of time-based QA research (Costa et al., 2020).
|
| 421 |
+
|
| 422 |
+
Continual Learning and Adaptation of LLMs. The detailed temporal annotations and extensive scale of COMPLEXTEMPQA make it useful for online adaptation and continual training approaches (Hu et al., 2023; Tack et al., 2024). With approximately 280k questions per year on average, it enables targeted experiments on temporal adaptation—vastly outperforming benchmarks like ArchivalQA (Wang et al., 2021), which offers only around 22k questions per year.
|
| 423 |
+
|
| 424 |
+
RAG Systems. COMPLEXTEMPQA can be used to train and evaluate Open Domain Question Answering models with historical news archives,
|
| 425 |
+
|
| 426 |
+
such as the NYT Annotated Archive (Sandhaus, 2008) (1.8 million articles from 1987 to 2007). Given the NYT's international coverage and our focus on US events, most questions can be answered using this archive, making our dataset a complementary resource for temporal IR research (Wang et al., 2021; Campos et al., 2014; Wang et al., 2023).
|
| 427 |
+
|
| 428 |
+
KGQA Systems. Built from Wikidata and Wikipedia, COMPLEXTEMPQA is well-suited for Knowledge Graph Question Answering (Usbeck et al., 2017; Souza Costa et al., 2020). Its integration with large-scale knowledge graphs such as Wikidata and SemOpenAlex (Färber et al., 2023)—which contain billions of facts—enhances QA models' ability to explore complex temporal relationships and evaluate multi-hop reasoning (Han and Gardent, 2023).
|
complextempqaa100mdatasetforcomplextemporalquestionanswering/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:98b18716f741c4d2e7d9d4c5b18bce69b51ed41ce5b545099d417656ff57d6f9
|
| 3 |
+
size 473597
|
complextempqaa100mdatasetforcomplextemporalquestionanswering/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2de86e8d969e17def55bb3550acede5e29cf64b9fbd51f7aba13e9fa01a328c5
|
| 3 |
+
size 396405
|
composablecrosspromptessayscoringbymergingmodels/425ab752-e177-4da8-bb87-f7bd669db7ff_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6dfc246e684ab984300730132dd7f28b06a3b19176628745baac21e7b77340b5
|
| 3 |
+
size 117827
|
composablecrosspromptessayscoringbymergingmodels/425ab752-e177-4da8-bb87-f7bd669db7ff_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:099c4f0b68d92f8f4a29ba5ec2d37d2765ad35695f14cc8e42e6b6aada54cb28
|
| 3 |
+
size 139784
|
composablecrosspromptessayscoringbymergingmodels/425ab752-e177-4da8-bb87-f7bd669db7ff_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:555fe7cb1c9d424710d2edfae4fc3a8d712c97721197c98ca5356634715f445a
|
| 3 |
+
size 757545
|
composablecrosspromptessayscoringbymergingmodels/full.md
ADDED
|
@@ -0,0 +1,502 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Composable Cross-prompt Essay Scoring by Merging Models
|
| 2 |
+
|
| 3 |
+
Sanwoo Lee Kun Liang Yunfang Wu*
|
| 4 |
+
|
| 5 |
+
School of Computer Science, Peking University
|
| 6 |
+
|
| 7 |
+
National Key Laboratory for Multimedia Information Processing, Peking University
|
| 8 |
+
|
| 9 |
+
MOE Key Laboratory of Computational Linguistics, Peking University
|
| 10 |
+
|
| 11 |
+
{sanwoo, wuyf}@pku.edu.cn kliang25@stu.pku.edu.cn
|
| 12 |
+
|
| 13 |
+
# Abstract
|
| 14 |
+
|
| 15 |
+
Recent advances in cross-prompt automated essay scoring typically train models jointly on all available source domains, often requiring simultaneous access to unlabeled target domain samples. However, using all sources can lead to suboptimal transfer and high computational cost. Moreover, repeatedly accessing the source essays for continual adaptation raises privacy concerns. We propose a source-free adaptation approach that selectively merges the parameters of individually trained source models without further access to the source datasets. In particular, we mix the task vectors—the parameter updates from finetuning—via a weighted sum to efficiently simulate selective joint-training. We use Bayesian optimization to determine the mixing weights using our proposed Prior-encoded Information Maximization (PIM), an unsupervised objective which promotes score discriminability by leveraging useful priors pre-computed from the sources. Experimental results with LLMs on in-dataset and cross-dataset adaptation show that our method (1) consistently outperforms joint-training on all sources, (2) maintains superior robustness compared to other merging methods, (3) excels under severe distribution shifts where recent leading cross-prompt methods struggle, all while retaining computational efficiency. $^{1}$
|
| 16 |
+
|
| 17 |
+
# 1 Introduction
|
| 18 |
+
|
| 19 |
+
Automated essay scoring (AES) is a machine learning task of developing a system that scores essays written in response to a given prompt (i.e., writing instructions). A prompt represents a domain as different prompts may have distinct topics. Early works had achieved success in prompt-specific AES (Chen and He, 2013; Taghipour and Ng, 2016; Dong et al., 2017; Farag et al., 2018)
|
| 20 |
+
|
| 21 |
+
<table><tr><td>Method</td><td>multi-source adaptation</td><td>leverages unlabeled target essays</td><td>no source essays for adaptation</td><td>supports source selection</td></tr><tr><td>Phandi et al. (2015)</td><td>X</td><td>X</td><td>X</td><td>X</td></tr><tr><td>Cao et al. (2020)</td><td>X</td><td>✓</td><td>X</td><td>X</td></tr><tr><td>Ridley et al. (2020)</td><td>✓</td><td>X</td><td>✓</td><td>X</td></tr><tr><td>Chen and Li (2023)</td><td>✓</td><td>✓</td><td>X</td><td>X</td></tr><tr><td>Ours</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td></tr></table>
|
| 22 |
+
|
| 23 |
+
Table 1: Comparison of adaptation settings among holistic cross-prompt AES methods based on key criteria. Our proposed setting satisfies all listed criteria.
|
| 24 |
+
|
| 25 |
+
where test samples were assumed to belong to the same prompt as training samples. Yet prompt-specific models were found to struggle when tested on new prompts (Phandi et al., 2015), accelerating efforts on cross-prompt AES with domain adaptation or generalization techniques (Zesch et al., 2015; Jin et al., 2018; Chen and Li, 2023; Jiang et al., 2023).
|
| 26 |
+
|
| 27 |
+
Despite the adaptability to the data-scarce target prompt, current cross-prompt methods typically assume simultaneous access to the data from both the source and target prompts when the target samples are leveraged for adaptation (Cao et al., 2020; Chen and Li, 2023). Yet this assumption is often violated due to privacy concerns in releasing the source essays. Instead, models trained from the source prompts are safer to distribute. Hence adapting without source datasets holds great practical implications, which aligns with the unsupervised source-free domain adaptation (SFDA) paradigm (Liang et al., 2020; Wang et al., 2021; Huang et al., 2021).
|
| 28 |
+
|
| 29 |
+
On the other hand, selecting the most relevant source domains remains a crucial yet underexplored aspect in cross-prompt AES. Most works either adopt single-source adaptation setting (Phandi et al., 2015; Dong and Zhang, 2016; Cozma et al., 2018), or train the model jointly on all source domain datasets for multi-source adaptation (Jin et al., 2018; Ridley et al., 2021; Do et al., 2023; Chen and Li, 2024), the latter likely motivated by the belief
|
| 30 |
+
|
| 31 |
+

|
| 32 |
+
|
| 33 |
+

|
| 34 |
+
|
| 35 |
+

|
| 36 |
+
|
| 37 |
+

|
| 38 |
+
|
| 39 |
+

|
| 40 |
+
Figure 1: Agreement with human raters (QWK) on the target prompts of ASAP dataset, evaluated using BERT (Devlin et al., 2019) trained jointly on varying number of source prompt datasets. For each target prompt, the remaining prompts serve as source prompts. Training details are provided in Appendix A.
|
| 41 |
+
|
| 42 |
+

|
| 43 |
+
|
| 44 |
+

|
| 45 |
+
|
| 46 |
+

|
| 47 |
+
|
| 48 |
+
that more sources yield better performance. However, our pilot study in Figure 1 suggests that carefully selecting a subset of source prompts clearly outperforms training on all sources. Nevertheless, the high cost of joint training makes exhaustive search for the optimal subset impractical.
|
| 49 |
+
|
| 50 |
+
In this work, we explore merging models (Wortsman et al., 2022; Matena and Raffel, 2022; Ainsworth et al., 2023) as a scalable alternative to joint training for source-free domain adaptation in cross-prompt AES. That is, we combine models fine-tuned on individual source prompts without re-training. In particular, the weighted sum of the models' task vectors (Ilharco et al., 2023)—parameter updates after fine-tuning—is added back to the pre-trained model (Eq. 2), which effectively mimics joint training in a post-hoc fashion. It then allows for fast and iterative search over the mixing coefficients that (soft-) select the task vectors.
|
| 51 |
+
|
| 52 |
+
To guide this search in the absence of the target labels and source datasets, we propose Priore-encoded Information Maximization (PIM), an information-theoretic objective that leverages useful priors pre-computed from the labeled source domains, to enhance scoring performance (Sec. 3.1). The objective is coupled with Bayesian optimization for an efficient optimization of PIM (Sec. 3.2).
|
| 53 |
+
|
| 54 |
+
We merge lightweight LoRA adapters (Hu et al., 2022) of large language models (LLMs), motivated by LLMs' extensibility to generate rationales (Chu et al., 2025) and the surging efforts
|
| 55 |
+
|
| 56 |
+
to build ever-stronger LLMs. Experiments on in- and cross-dataset settings show that: our method (1) outperforms training jointly on all sources, (2) surpasses other merging methods in a majority of cases, (3) remains robust under severe shifts (i.e., cross-dataset) where recent cross-prompt AES methods struggle, and (4) is time-saving than adaptation methods training jointly on all sources.
|
| 57 |
+
|
| 58 |
+
In summary, our contributions are as follows:
|
| 59 |
+
|
| 60 |
+
- We propose a domain-adaptive model merging approach for source-free cross-prompt AES. See Table 1 for the comparison of settings.
|
| 61 |
+
- We design an unsupervised objective which promotes model's score discriminability regularized by priors derived from the sources.
|
| 62 |
+
- Beyond in-dataset, we validate our method in cross-dataset adaptation, under which our method remains more robust than recent cross-prompt methods.
|
| 63 |
+
|
| 64 |
+
# 2 Preliminary
|
| 65 |
+
|
| 66 |
+
Problem Statement. This paper uses "prompt" and "domain" interchangeably. We consider the unsupervised source-free domain adaptation problem (Liang et al., 2020; Wang et al., 2021; Yang et al., 2022) with multiple source domains for cross-prompt AES, where the input $x \in \mathcal{V}^*$ is a sequence of tokens and the output $y \in \mathbb{Z}$ is an integer score. A pre-trained model $\mathcal{M}(\theta_{pre})$ is fine-tuned
|
| 67 |
+
|
| 68 |
+

|
| 69 |
+
Figure 2: An illustration of our method for source-free cross-prompt AES. Left: Source models and statistics are pre-trained before adaptation. Right: During source-free adaptation, merging coefficients are optimized via Bayesian optimization to optimize the prior-encoded information maximization (PIM) criterion (Eq. 9).
|
| 70 |
+
|
| 71 |
+
on each one of the source datasets separately, and additional statistics $S_{j}$ may be computed for each source, after which the source datasets become no longer available (Adachi et al., 2025). We denote $\mathcal{M}(\theta_j)$ as the model fine-tuned on $j$ -the source dataset $\mathcal{D}_{S_j} = \{(x_{S_j}^{(i)},y_{S_j}^{(i)})\}_{i = 1}^{N_j}$ , parameterized by $\theta_{j}\in \mathbb{R}^{d}$ . Note that separating each source domain apart is not a requirement for source-free adaptation, but is a stricter setting we aim to address via model merging.
|
| 72 |
+
|
| 73 |
+
During the adaptation phase, we have access to the fine-tuned models $\{f(\theta_j)\}_{j = 1}^M$ , an unlabeled target dataset $\mathcal{D}_T = \{(x_T^{(i)})\}_{i = 1}^{N_T}$ and optionally, the pre-computed statistics $\{S_j\}_{j = 1}^M$ . We note that the score range may vary across domains (e.g., Table 2). During inference, we require the model to adapt to potentially novel score ranges, different from the common approach that normalizes all score ranges to a shared scale (Taghipour and Ng, 2016; Cozma et al., 2018; Wang and Liu, 2025).
|
| 74 |
+
|
| 75 |
+
LLM Ordinal Regression. We employ LLMs for scoring essays—an ordinal regression task implemented by autoregressive generation. Following Lukasik et al. (2025), we assume each score $y$ corresponds to a unique string representation $\mathrm{str}(y) \in \mathcal{V}^*$ (e.g., $2 \rightarrow "2"$ ). Each input-output pair $(x, y)$ is transformed into a formatted pair $(x', y')$ using an instruction template (e.g., see Appendix C.1). The pre-trained model $\mathcal{M}(\theta_{pre})$ is then instruction-tuned on the source dataset $\mathcal{D}_j$ to maximize the likelihood of generating the answer:
|
| 76 |
+
|
| 77 |
+
$$
|
| 78 |
+
\theta_ {j} = \arg \max _ {\theta} \mathbb {E} _ {x, y} [ p (y ^ {\prime} | x ^ {\prime}, \theta) ] \tag {1}
|
| 79 |
+
$$
|
| 80 |
+
|
| 81 |
+
Model Merging. The seminal work of Ilharco et al. (2023) introduced the concept of a task vector $\tau_{j} := \theta_{j} - \theta_{pre}$ defined as the parameter updates obtained through fine-tuning. Interestingly, adding task vectors from multiple tasks to the pre-trained model has been shown to effectively approximate multi-task training with a performance drop, a finding further verified by follow-up studies (Yadav et al., 2023; Yu et al., 2024; Deep et al., 2024). We follow this merging framework and simulate selective joint-training through a weighted sum of the task vectors:
|
| 82 |
+
|
| 83 |
+
$$
|
| 84 |
+
\theta_ {m r g} = \theta_ {p r e} + \sum_ {j = 1} ^ {M} \lambda_ {i} \tau_ {j} \tag {2}
|
| 85 |
+
$$
|
| 86 |
+
|
| 87 |
+
where $\{\lambda_j\in \mathbb{R}\}_{j = 1}^M$ are the mixing coefficients.
|
| 88 |
+
|
| 89 |
+
Updating the entire parameters results in large task vectors, making merging less efficient. We instead adopt low-rank adaptation (LoRA) (Hu et al., 2022) and merge lightweight adapters. LoRA fine-tunes models by learning low-rank updates: for a weight matrix $W \in \mathbb{R}^{m \times n}$ , the update is $W + \Delta W = W + BA$ , where $B \in \mathbb{R}^{m \times r}$ and $A \in \mathbb{R}^{r \times n}$ are learnable low-rank matrices ( $r \ll \min(m, n)$ ). Accordingly, we define task vectors in terms of LoRA adapters:
|
| 90 |
+
|
| 91 |
+
$$
|
| 92 |
+
\tau_ {j} = \theta_ {j} - \theta_ {p r e} = \underset {l = 1} {\left| \right|} \text {f l a t t e n} \left(B _ {j} ^ {(l)} A _ {j} ^ {(l)}\right) \tag {3}
|
| 93 |
+
$$
|
| 94 |
+
|
| 95 |
+
where $||$ denotes concatenation of the flattened vectors (flatten $(B_j^{(l)}A_j^{(l)})$ ) across layers. Layers without adapters contribute zeros.
|
| 96 |
+
|
| 97 |
+
Given this setup, merging models via a linear combination of LoRA adapters (Eq. 2, 3) reduces
|
| 98 |
+
|
| 99 |
+
our objective to selecting the mixing coefficients $\lambda_1, \ldots, \lambda_M$ that lead to an optimal performance on the target prompt.
|
| 100 |
+
|
| 101 |
+
# 3 Method
|
| 102 |
+
|
| 103 |
+
Given the absence of target labels in cross-prompt essay scoring, we establish an objective that promotes the model's scoring performance from an information-theoretic view (Sec. 3.1), and employ Bayesian optimization to maximize this objective without costly backpropagation (Sec. 3.2). Figure 2 illustrates an overview of our method.
|
| 104 |
+
|
| 105 |
+
# 3.1 Prior-encoded Information Maximization
|
| 106 |
+
|
| 107 |
+
In essay scoring where target labels are ordinal scores, a plausible scoring model would assign unambiguous labels for individual essays, while retaining the discriminability across different essays. In standard classification setup, this idea has been formalized as maximizing the mutual information (MI) between the input $x$ and the output $y$ (Bridle et al., 1991; Krause et al., 2010; Liang et al., 2020). In what follows, we revisit this principle, study which of its properties can be modified to be better applied in essay scoring, and propose our final objective.
|
| 108 |
+
|
| 109 |
+
The MI between input $x$ and output $y$ under a discriminative model $p(y|x,\theta)$ is given by:
|
| 110 |
+
|
| 111 |
+
$$
|
| 112 |
+
\mathcal {I} (y; x) = \mathcal {H} (p (y | \theta)) - \mathcal {H} (p (y | x, \theta)) \quad (4)
|
| 113 |
+
$$
|
| 114 |
+
|
| 115 |
+
where $\mathcal{H}(\cdot)$ denotes entropy. In classification, $\mathcal{I}(y;x)$ is empirically estimated as
|
| 116 |
+
|
| 117 |
+
$$
|
| 118 |
+
\begin{array}{l} \mathcal {I} (y; x) = \mathcal {H} \left(\frac {1}{N} \sum_ {i = 1} ^ {N} p (y | x ^ {(i)}, \theta)\right) \\ - \frac {1}{N} \sum_ {i = 1} ^ {N} \mathcal {H} (p (y | x ^ {(i)}, \theta)) \quad (5) \\ \end{array}
|
| 119 |
+
$$
|
| 120 |
+
|
| 121 |
+
in which $p(y|x^{(i)},\theta)\in \mathbb{R}^C$ denotes the output probability of a sample $x^{(i)}$ . Essentially, maximizing $\mathcal{I}(y;x)$ balances between sample-wise sharpness and global discriminability in predictions.
|
| 122 |
+
|
| 123 |
+
However, directly applying this criterion to ordinal regression can be problematic. Note that maximizing $\mathcal{H}(p(y|\theta)) = \log C - KL(p(y|\theta)||U)$ is equivalent to minimizing KL-divergence between $p(y|\theta)$ and a uniform distribution $U$ . Given the classes are assumed to be sorted discrete scores, $U$ is unlikely to be the true target prompt score distribution $p(y)$ , since assigning extreme scores are less likely than the mid-range ones.
|
| 124 |
+
|
| 125 |
+
Based on this insight, we propose Prior-encoded Information Maximization (PIM), where we extract an informative prior $q(y)$ from the labeled source domains, and use it in place of $U$ for MI maximization. To suit source-free adaptation, we pre-compute the marginal distribution over the scores for each source domain before removing the dataset. In what follows, we denote the subscript $S_{j}$ as $j$ for brevity. For $j$ -th source domain, we first scale the scores $\{y_{j}^{(i)}\}_{i = 1}^{N_{j}}$ to the [0, 1] interval:
|
| 126 |
+
|
| 127 |
+
$$
|
| 128 |
+
\tilde {y} _ {j} ^ {(i)} = \left(y _ {j} ^ {(i)} - a _ {j} + 0. 5\right) / \left(b _ {j} - a _ {j} + 1\right) \quad \forall i \tag {6}
|
| 129 |
+
$$
|
| 130 |
+
|
| 131 |
+
where $y_{j}$ is assumed to be an integer ranging from $a_{j}$ to $b_{j}$ . Next, we fit a Beta distribution $\mathbf{Beta}(\alpha_j,\beta_j)$ with the scaled scores via maximum likelihood estimation:
|
| 132 |
+
|
| 133 |
+
$$
|
| 134 |
+
\left(\alpha_ {j}, \beta_ {j}\right) = \underset {\left(\alpha_ {j}, \beta_ {j}\right)} {\arg \max } \mathbb {E} _ {\tilde {y} _ {j}} \left[ \mathbf {B e t a} \left(\tilde {y} _ {j}; \alpha_ {j}, \beta_ {j}\right) \right] \tag {7}
|
| 135 |
+
$$
|
| 136 |
+
|
| 137 |
+
where $\mathbf{Beta}(\tilde{y}_j;\alpha_j,\beta_j)$ is the probability density at $\tilde{y}_j$ . $\mathbf{Beta}(\alpha ,\beta)$ is a suitable abstraction of a set of noisy (scaled) scores, given that it is unimodal when $\alpha >1,\beta >1$ and flexible in modeling the skewness of the distribution bounded by [0, 1], just as essay scores being bounded and roughly unimodal.
|
| 138 |
+
|
| 139 |
+
During the adaptation stage, we unify all source Beta distributions into a single $\mathbf{Beta}(\alpha_{\mathcal{S}},\beta_{\mathcal{S}})$ to further reduce domain-specific noise. Essentially, we consider the mean $\mu$ and variance $\sigma^2$ of the mixture $1 / M\sum_{j = 1}^{M}\mathbf{Beta}(\alpha_{j},\beta_{j})$ and set $\mathbf{Beta}(\alpha_{\mathcal{S}},\beta_{\mathcal{S}})$ such that its mean and variance equal to $\mu$ and $\sigma^2$ (derivations in Appendix B.1). This unified distribution is then discretized into a categorical distribution $q(y)\in \mathbb{R}^{C_T}$ over the target prompt (sorted) score classes:
|
| 140 |
+
|
| 141 |
+
$$
|
| 142 |
+
q _ {c} (y) = \int_ {\frac {c - 1}{C _ {T}}} ^ {\frac {c}{C _ {T}}} \mathbf {B e t a} (y; \alpha_ {S}, \beta_ {S}) d y, \text {f o r} c \in 1: C _ {T} \tag {8}
|
| 143 |
+
$$
|
| 144 |
+
|
| 145 |
+
yielding source-informed prior probabilities over $C_T$ evenly spaced bins. Our intuition is that $q(y)$ offers better approximation to the true distribution $p(y)$ than $U$ in general.
|
| 146 |
+
|
| 147 |
+
Finally, we define our PIM objective $f(\lambda)$ as maximizing the prior-encoded mutual information by inserting $q(y)$ in place of $U$ :
|
| 148 |
+
|
| 149 |
+
$$
|
| 150 |
+
f (\lambda) = - K L (p (y | \lambda) | | q (y)) - \mathcal {H} (p (y | x, \lambda)) \tag {9}
|
| 151 |
+
$$
|
| 152 |
+
|
| 153 |
+
Here, the objective is written in terms of the merging coefficients $\lambda = [\lambda_1,\dots ,\lambda_M]^\top \in \mathbb{R}^M$ to
|
| 154 |
+
|
| 155 |
+
explicitly state that the parameter $\theta$ is solely determined by $\lambda$ in our chosen merging framework (Eq. 2). In the context of using LLMs, we obtain $p(y|x^{(i)},\lambda)\in \mathbb{R}^{C_T}$ by truncating the next-token probabilities of the score-predicting token (the <assistant> token in our case) to $C_T$ score tokens (e.g., "1", "2", "3"). The truncated probabilities are then normalized to form a valid distribution which sum to 1.
|
| 156 |
+
|
| 157 |
+
# 3.2 Bayesian Optimization
|
| 158 |
+
|
| 159 |
+
In determining the mixing coefficients $\lambda$ , recent studies have shown success in using Bayesian optimization (Jang et al., 2024; Liu et al., 2024) which is computationally less demanding than training the coefficients (Wortsman et al., 2022). Following this approach, we leverage Bayesian optimization to maximize $f(\lambda)$ (Eq. 9) in terms of $\lambda \in \mathbb{R}^{M}$ without costly backpropagation.
|
| 160 |
+
|
| 161 |
+
Essentially, the algorithm treats $f(\lambda)$ as a black-box function and constructs a surrogate of $f(\lambda)$ as a sample from a Gaussian Process—a distribution over functions (Williams and Rasmussen, 2006). Given the prior mean function $\mu_0$ , covariance function $\Sigma_0$ and $k$ observations $f(\lambda^{(1:k)}) \coloneqq \{f(\lambda^{(i)})\}_{i=1}^k$ , it updates the posterior distribution over the function value at the current $(k+1)$ -th iteration, i.e., $f(\lambda^{(k+1)})|f(\lambda^{(1:k)})$ . Next, the acquisition function determines where to sample $\lambda^{(k+1)}$ based on the posterior. In particular, we use Expected Improvement (EI) which maximizes the expected gain over the current best value $f^*(k) \coloneqq \max_{\lambda^{(i)}}\{f(\lambda^{(i)})\}_{i=1}^k$ :
|
| 162 |
+
|
| 163 |
+
$$
|
| 164 |
+
\underset {\lambda^ {(k + 1)}} {\arg \max } _ {f (\lambda^ {(k + 1)})} \mathbb {E} \left[ \max \left(f \left(\lambda^ {(k + 1)}\right) - f ^ {*} (k), 0\right) \right] \tag {10}
|
| 165 |
+
$$
|
| 166 |
+
|
| 167 |
+
This process of posterior estimation and next point sampling is repeated until convergence. The final solution is $\arg \max_{\lambda^{(i)}}\{f(\lambda^{(i)})\}_{i = 1}^{N}$ for $N$ total iterations. See Appendix B.2 for additional details.
|
| 168 |
+
|
| 169 |
+
# 4 Experiment
|
| 170 |
+
|
| 171 |
+
# 4.1 Experimental Setup
|
| 172 |
+
|
| 173 |
+
Datasets. We validate our approach on two scenarios: (1) in-dataset cross-prompt scoring and (2) cross-dataset cross-prompt scoring. All samples are formatted using a simple instruction template, as in Appendix C.1.
|
| 174 |
+
|
| 175 |
+
In-dataset cross-prompt scoring follows the standard setup (Jin et al., 2018; Ridley et al., 2020; Li and Ng, 2024) where each prompt in a dataset
|
| 176 |
+
|
| 177 |
+
<table><tr><td>Dataset</td><td>Prompt</td><td>#Essay</td><td>Genre</td><td>Avg Len</td><td>Range</td></tr><tr><td rowspan="8">ASAP</td><td>1</td><td>1783</td><td>ARG</td><td>427</td><td>2-12</td></tr><tr><td>2</td><td>1800</td><td>ARG</td><td>432</td><td>1-6</td></tr><tr><td>3</td><td>1726</td><td>RES</td><td>124</td><td>0-3</td></tr><tr><td>4</td><td>1772</td><td>RES</td><td>106</td><td>0-3</td></tr><tr><td>5</td><td>1805</td><td>RES</td><td>142</td><td>0-4</td></tr><tr><td>6</td><td>1800</td><td>RES</td><td>173</td><td>0-4</td></tr><tr><td>7</td><td>1569</td><td>NAR</td><td>206</td><td>0-30</td></tr><tr><td>8</td><td>723</td><td>NAR</td><td>725</td><td>0-60</td></tr><tr><td rowspan="8">PERSUADE2.0</td><td>1</td><td>1656</td><td>ARG</td><td>339</td><td>1-6</td></tr><tr><td>2</td><td>2157</td><td>ARG</td><td>641</td><td>1-6</td></tr><tr><td>3</td><td>1670</td><td>ARG</td><td>552</td><td>1-6</td></tr><tr><td>4</td><td>1552</td><td>ARG</td><td>573</td><td>1-6</td></tr><tr><td>5</td><td>1372</td><td>RES</td><td>330</td><td>1-6</td></tr><tr><td>6</td><td>2046</td><td>RES</td><td>455</td><td>1-6</td></tr><tr><td>7</td><td>1862</td><td>RES</td><td>399</td><td>1-6</td></tr><tr><td>8</td><td>1583</td><td>RES</td><td>381</td><td>1-6</td></tr></table>
|
| 178 |
+
|
| 179 |
+
Table 2: Dataset Statistics. Genre: ARG (argumentative), RES (source-dependent), NAR (narrative). Avg Len: Average essay length in words. Range: Score range.
|
| 180 |
+
|
| 181 |
+
is held out as a target domain and the remaining prompts serve as source domains. We use $\mathrm{ASAP}^2$ (Hamner et al., 2012) dataset, which includes essays written by students from grade 7 to 10 in response to 8 prompts across various genres and score ranges. We adopt the same dataset splits from Ridley et al. (2021) where each prompt is split into training and validation sets approximately by $5.6:1$ . When a prompt serves as the target domain, its two splits are combined into the test set. Dataset statistics are shown in Table 2.
|
| 182 |
+
|
| 183 |
+
Cross-dataset cross-prompt scoring is a new setting we introduce to validate our approach and the baselines under severer distribution shifts. In particular, we use all prompts from ASAP as source domains and treat each prompt from PERSUADE2.0 (Crossley et al., 2024) as the target domain. PERSUADE2.0 contains essays written by U.S. students in response to 15 prompts, among which we choose 4 from independent writing and another 4 from source-based writing during evaluation. Essay topics of the prompts are listed in Appendix C.2.
|
| 184 |
+
|
| 185 |
+
Models & Adapters. We conduct supervised fine-tuning on Llama-3.1-8B-Instruct (Grattafori et al., 2024) (8 billion parameters) and Phi-4-mini-instruct (4 billion parameters) (Microsoft et al., 2025), for each prompt from the source domains independently. Details of LoRA fine-tuning are in Appendix C.3. At inference, we use greedy decoding and parse the score from the model's response.
|
| 186 |
+
|
| 187 |
+
<table><tr><td>Model</td><td>Scheme</td><td>Method</td><td>P1</td><td>P2</td><td>P3</td><td>P4</td><td>P5</td><td>P6</td><td>P7</td><td>P8</td><td>Avg.</td></tr><tr><td>gpt-4.1-mini</td><td>zero-shot</td><td>-</td><td>0.063</td><td>0.423</td><td>0.459</td><td>0.672</td><td>0.480</td><td>0.624</td><td>0.321</td><td>0.390</td><td>0.429</td></tr><tr><td rowspan="9">llama-3.1-8b-it</td><td>zero-shot</td><td>-</td><td>0.109</td><td>0.246</td><td>0.239</td><td>0.240</td><td>0.361</td><td>0.407</td><td>0.321</td><td>0.484</td><td>0.301</td></tr><tr><td rowspan="7">merge</td><td>Averaging</td><td>0.526</td><td>0.465</td><td>0.527</td><td>0.593</td><td>0.720</td><td>0.738</td><td>0.608</td><td>0.163</td><td>0.542*</td></tr><tr><td>Fisher Merging</td><td>0.437</td><td>0.541</td><td>0.521</td><td>0.590</td><td>0.670</td><td>0.724</td><td>0.562</td><td>0.167</td><td>0.526*</td></tr><tr><td>RegMean</td><td>0.482</td><td>0.461</td><td>0.526</td><td>0.580</td><td>0.724</td><td>0.731</td><td>0.580</td><td>0.135</td><td>0.527*</td></tr><tr><td>Task Arithmetic</td><td>0.787</td><td>0.368</td><td>0.604</td><td>0.632</td><td>0.772</td><td>0.741</td><td>0.627</td><td>0.120</td><td>0.581*</td></tr><tr><td>TIES-Merging</td><td>0.582</td><td>0.527</td><td>0.532</td><td>0.619</td><td>0.711</td><td>0.752</td><td>0.595</td><td>0.155</td><td>0.559*</td></tr><tr><td>AdaMerging</td><td>0.756</td><td>0.285</td><td>0.577</td><td>0.619</td><td>0.767</td><td>0.664</td><td>0.661</td><td>0.059</td><td>0.548*</td></tr><tr><td>PIM (Ours)</td><td>0.682</td><td>0.562</td><td>0.612</td><td>0.647</td><td>0.762</td><td>0.690</td><td>0.711</td><td>0.152</td><td>0.602</td></tr><tr><td>joint-train</td><td>-</td><td>0.606</td><td>0.512</td><td>0.611</td><td>0.656</td><td>0.743</td><td>0.760</td><td>0.666</td><td>0.257</td><td>0.601</td></tr><tr><td rowspan="9">phi-4-mini-it</td><td>zero-shot</td><td>-</td><td>0.084</td><td>0.305</td><td>0.238</td><td>0.479</td><td>0.367</td><td>0.350</td><td>0.131</td><td>0.184</td><td>0.267</td></tr><tr><td rowspan="7">merge</td><td>Averaging</td><td>0.383</td><td>0.613</td><td>0.494</td><td>0.625</td><td>0.528</td><td>0.652</td><td>0.396</td><td>0.334</td><td>0.503*</td></tr><tr><td>Fisher Merging</td><td>0.348</td><td>0.625</td><td>0.490</td><td>0.617</td><td>0.503</td><td>0.637</td><td>0.389</td><td>0.299</td><td>0.489*</td></tr><tr><td>RegMean</td><td>0.348</td><td>0.607</td><td>0.507</td><td>0.619</td><td>0.577</td><td>0.666</td><td>0.378</td><td>0.286</td><td>0.498*</td></tr><tr><td>Task Arithmetic</td><td>0.772</td><td>0.334</td><td>0.618</td><td>0.654</td><td>0.690</td><td>0.684</td><td>0.683</td><td>0.211</td><td>0.581*</td></tr><tr><td>TIES-Merging</td><td>0.532</td><td>0.568</td><td>0.512</td><td>0.625</td><td>0.542</td><td>0.681</td><td>0.448</td><td>0.291</td><td>0.525*</td></tr><tr><td>AdaMerging</td><td>0.742</td><td>0.316</td><td>0.569</td><td>0.618</td><td>0.645</td><td>0.650</td><td>0.608</td><td>0.227</td><td>0.547*</td></tr><tr><td>PIM (Ours)</td><td>0.737</td><td>0.585</td><td>0.637</td><td>0.612</td><td>0.731</td><td>0.654</td><td>0.692</td><td>0.387</td><td>0.629</td></tr><tr><td>joint-train</td><td>-</td><td>0.578</td><td>0.469</td><td>0.622</td><td>0.655</td><td>0.668</td><td>0.740</td><td>0.590</td><td>0.376</td><td>0.587*</td></tr></table>
|
| 188 |
+
|
| 189 |
+
Table 3: In-dataset cross-prompt evaluation results on ASAP $\rightarrow$ ASAP, measured by QWK. P1-8 denotes Prompt 1-8. For each held-out target prompt, other 7 prompts constitute the source domains. \*: Significant improvement $(p < 0.05)$ of our method over a merging baseline/joint-training in Avg. QWK. The best average QWK is boldfaced.
|
| 190 |
+
|
| 191 |
+
Baselines. We compare our approach against recent merging methods which we apply to source-free adaptation setting: Averaging (Wortsman et al., 2022), Fisher Merging (Matena and Raffel, 2022), RegMean (Jin et al., 2023), Task Arithmetic (Ilharco et al., 2023), TIES-Merging (Yadav et al., 2023) and AdaMerging (Yang et al., 2024c).
|
| 192 |
+
|
| 193 |
+
In addition, we report performance of jointtraining on all sources, and top-performing cross-prompt methods—PAES(Ridley et al., 2020) and PMAES (Chen and Li, 2023), both of which train the model jointly on all source domains. Particularly, PMAES requires unlabeled target samples simultaneously. See Appendix C.4 for the descriptions and implementation details of the baselines.
|
| 194 |
+
|
| 195 |
+
Evaluation Metric. Following the standard evaluation protocol (Phandi et al., 2015; Cao et al., 2020; Chen and Li, 2023), we use the Quadratic Weighted Kappa (QWK) to measure the agreement between human-rated scores and predicted scores.
|
| 196 |
+
|
| 197 |
+
Implementation Details. We use Bayesian Optimization toolkit (Nogueira, 2014-), with the Expected Improvement $(\xi = 0.01)$ acquisition function. We initially let the algorithm probe 10 random points, and iterate through 30 subsequent steps. Each coefficient $\lambda_{j}$ is bounded by [0, 1]. We randomly select 64 unlabeled target prompt samples fixed across all iterations, and compute $p(y|x^{(i)},\lambda)$ on those samples. If not otherwise stated, experi
|
| 198 |
+
|
| 199 |
+
mental results are averaged over 5 random seeds. Our method is robust to the choice of the number of iterations and unlabeled target prompt samples, as detailed in Appendix C.5.
|
| 200 |
+
|
| 201 |
+
# 4.2 Main Results
|
| 202 |
+
|
| 203 |
+
In-dataset Cross-prompt. Results are shown in Table 3. First, our merging approach matches or surpasses joint training on all sources, validating the effectiveness of selecting beneficial source domains for adaptation. In general, linear combination of task vectors underperforms its joint-training counterpart (Ilharco et al., 2023), which renders the progress of our method over joint-training impressive. Second, our method exceeds all merging baselines in average QWK, with the improvements observed to be statistically significant, highlighting the importance of merging strategy specifically designed for domain adaptation. Third, our method brings a notable improvement over zero-shot baselines, with average gains of 0.301 on Llama-3.1-8B-it and 0.362 on Phi-4-mini-it. It also outperforms zero-shot GPT-4.1-mini by 0.200, demonstrating the effectiveness of our method against an advanced LLM.
|
| 204 |
+
|
| 205 |
+
Cross-dataset Cross-prompt. Table 4 reports results on ASAP $\rightarrow$ PERSUADE2.0 transfer. Consistent with the in-dataset setting, our method shows improvements over joint training, e.g., by
|
| 206 |
+
|
| 207 |
+
<table><tr><td>Model</td><td>Scheme</td><td>Method</td><td>P1</td><td>P2</td><td>P3</td><td>P4</td><td>P5</td><td>P6</td><td>P7</td><td>P8</td><td>Avg.</td></tr><tr><td rowspan="9">llama-3.1-8b-it</td><td>zero-shot</td><td>-</td><td>0.136</td><td>0.363</td><td>0.278</td><td>0.309</td><td>0.043</td><td>0.120</td><td>0.166</td><td>0.139</td><td>0.194</td></tr><tr><td rowspan="7">merge</td><td>Averaging</td><td>0.365</td><td>0.529</td><td>0.407</td><td>0.397</td><td>0.222</td><td>0.463</td><td>0.342</td><td>0.296</td><td>0.378*</td></tr><tr><td>Fisher Merging</td><td>0.420</td><td>0.599</td><td>0.472</td><td>0.479</td><td>0.248</td><td>0.497</td><td>0.392</td><td>0.348</td><td>0.432*</td></tr><tr><td>RegMean</td><td>0.340</td><td>0.513</td><td>0.391</td><td>0.399</td><td>0.208</td><td>0.441</td><td>0.322</td><td>0.291</td><td>0.363*</td></tr><tr><td>Task Arithmetic</td><td>0.412</td><td>0.377</td><td>0.310</td><td>0.311</td><td>0.164</td><td>0.294</td><td>0.264</td><td>0.340</td><td>0.309*</td></tr><tr><td>TIES-Merging</td><td>0.474</td><td>0.551</td><td>0.438</td><td>0.427</td><td>0.275</td><td>0.511</td><td>0.368</td><td>0.343</td><td>0.423*</td></tr><tr><td>AdaMerging</td><td>0.396</td><td>0.122</td><td>0.116</td><td>0.151</td><td>0.153</td><td>0.216</td><td>0.206</td><td>0.270</td><td>0.204*</td></tr><tr><td>PIM (Ours)</td><td>0.504</td><td>0.734</td><td>0.674</td><td>0.652</td><td>0.197</td><td>0.464</td><td>0.420</td><td>0.449</td><td>0.512</td></tr><tr><td>joint-train</td><td>-</td><td>0.515</td><td>0.406</td><td>0.438</td><td>0.448</td><td>0.243</td><td>0.367</td><td>0.342</td><td>0.454</td><td>0.401*</td></tr><tr><td rowspan="9">phi-4-mini-it</td><td>zero-shot</td><td>-</td><td>0.181</td><td>0.216</td><td>0.397</td><td>0.515</td><td>0.341</td><td>0.345</td><td>0.352</td><td>0.386</td><td>0.342</td></tr><tr><td rowspan="7">merge</td><td>Averaging</td><td>0.520</td><td>0.581</td><td>0.547</td><td>0.572</td><td>0.214</td><td>0.567</td><td>0.522</td><td>0.489</td><td>0.502</td></tr><tr><td>Fisher Merging</td><td>0.533</td><td>0.594</td><td>0.564</td><td>0.579</td><td>0.224</td><td>0.577</td><td>0.529</td><td>0.500</td><td>0.512</td></tr><tr><td>RegMean</td><td>0.502</td><td>0.557</td><td>0.530</td><td>0.567</td><td>0.206</td><td>0.568</td><td>0.508</td><td>0.488</td><td>0.491</td></tr><tr><td>Task Arithmetic</td><td>0.337</td><td>0.353</td><td>0.347</td><td>0.295</td><td>0.110</td><td>0.330</td><td>0.274</td><td>0.278</td><td>0.291*</td></tr><tr><td>TIES-Merging</td><td>0.513</td><td>0.613</td><td>0.543</td><td>0.518</td><td>0.199</td><td>0.565</td><td>0.505</td><td>0.490</td><td>0.493</td></tr><tr><td>AdaMerging</td><td>0.474</td><td>0.149</td><td>0.200</td><td>0.156</td><td>0.162</td><td>0.360</td><td>0.407</td><td>0.365</td><td>0.284*</td></tr><tr><td>PIM (Ours)</td><td>0.438</td><td>0.581</td><td>0.671</td><td>0.668</td><td>0.186</td><td>0.480</td><td>0.407</td><td>0.434</td><td>0.483</td></tr><tr><td>joint-train</td><td>-</td><td>0.545</td><td>0.439</td><td>0.509</td><td>0.564</td><td>0.217</td><td>0.447</td><td>0.422</td><td>0.480</td><td>0.453*</td></tr></table>
|
| 208 |
+
|
| 209 |
+
Table 4: Cross-dataset cross-prompt evaluation results on ASAP $\rightarrow$ PERSUADE2.0, measured by QWK. For each target prompt in PERSUADE2.0, all 8 prompts in ASAP constitute the source domains.
|
| 210 |
+
|
| 211 |
+
0.111 on Llama3.1-8B-it and 0.030 on Phi-4-mini-it. Compared to the merging baselines, our method achieves the highest average QWK on Llama-3.1-8B-it and falls slightly short of some baselines on Phi-4-mini-it. Nevertheless, these baselines show limited generalizability, as they underperform on the other 3 settings (Table 3, 4) with larger drops, while our method maintains the best results. Overall, our approach shows robust adaptation on different types of domain shifts and LLMs.
|
| 212 |
+
|
| 213 |
+
Comparison with Leading Cross-prompt Methods. Figure 3 presents a comparison between our method against PAES (Ridley et al., 2020) and PMAES (Chen and Li, 2023), two strong baselines on ASAP $\rightarrow$ ASAP. PAES is a regression model that combines hand-crafted features and CNN+LSTM representations, while PMAES extends PAES with a domain adaptation strategy. We highlight that LLM-based autoregressive scoring does not inherently outperform PAES despite the larger parameter size, as seen when comparing the joint-train baseline (Table 3) with PAES (Figure 3 top). Similarly, we found that even a competitive encoder model, DeBERTaV3-base (He et al., 2021), underperforms PAES in the in-dataset setting with an average QWK of 0.528. This is largely due to the carefully designed hand-crafted features which alone achieves 0.641 average QWK (Ridley et al., 2020).
|
| 214 |
+
|
| 215 |
+
Under the in-dataset setting (Figure 3 top), our method achieves QWKs close to those of both base
|
| 216 |
+
|
| 217 |
+

|
| 218 |
+
|
| 219 |
+

|
| 220 |
+
Figure 3: Comparison of PIM (phi-4-mini-it) with top-performing cross-prompt methods (PAES and PMAES). Similar trends for llama-3.1-8b-it (Appendix D).
|
| 221 |
+
|
| 222 |
+
lines across most prompts, though it falls slightly short on average. In the more challenging cross-dataset setting (Figure 3 bottom), however, our method notably outperforms PAES and PMAES with larger margins than the in-dataset's case. This change in relative performance under larger distribution shifts may stem from the reliance of PAES and PMAES on the domain-sensitive feature engineering and all-source joint-training, which are potentially prone to negative transfer. By contrast, our method adaptively selects source domains to mitigate negative transfer.
|
| 223 |
+
|
| 224 |
+
# 4.3 Ablation Study
|
| 225 |
+
|
| 226 |
+
We conduct an ablation study of the components of our method, as in Table 5. First, reverting the useful prior back to the uniform distribution $(q(y) \to U)$
|
| 227 |
+
|
| 228 |
+
<table><tr><td>Method</td><td>Phi4-mini</td><td>L3.1-8B</td></tr><tr><td>PIM</td><td>0.629</td><td>0.602</td></tr><tr><td>q(y) → U</td><td>0.594</td><td>0.590</td></tr><tr><td>w/o - H(p(y|x,λ))</td><td>0.620</td><td>0.617</td></tr><tr><td>w/o - KL(p(y|λ)||q(y))</td><td>0.542</td><td>0.552</td></tr><tr><td>BayesOpt → Random</td><td>0.611</td><td>0.595</td></tr><tr><td>joint-train</td><td>0.587</td><td>0.601</td></tr></table>
|
| 229 |
+
|
| 230 |
+
Table 5: Ablation study of PIM (Eq. 9), evaluated on ASAP $\rightarrow$ ASAP, measured by average QWK. w/o: without; BayesOpt $\rightarrow$ Random: same number of iterations with random search.
|
| 231 |
+
|
| 232 |
+

|
| 233 |
+
Figure 4: Log-scale time (y-axis) for pre-training source models on ASAP (top), followed by adaptation and inference on PERSUADE2.0 (middle), along with the time ratios between adaptation and inference (bottom). Results are from a single run on an NVIDIA A40 GPU.
|
| 234 |
+
|
| 235 |
+
leads to a notable drop in performance, which aligns with our motivation that $U$ may not appropriately represent the target's marginal distribution $p(y)$ in essay scoring. The prior $q(y)$ derived from the source prompts serves as a transferrable supervision signal, without any expert knowledge. Second, we challenge the MI maximization principle (Krause et al., 2010), either by removing the sharpness term (i.e., $\mathrm{w / o} - \mathcal{H}(p(y|x,\lambda))$ ) or the separation term (i.e., $\mathrm{w / o} - KL(p(y|\lambda)||q(y)))$ . Interestingly, the former does not necessarily lead to performance drop, with Llama-3.1-8B-it in fact achieving some gains. One hypothesis is that each source model (LoRA adapter) yield sufficiently sharp predictions on the target samples, and that merging the source models via linear combination
|
| 236 |
+
|
| 237 |
+
preserves this property. In contrast, removing separation term leads to a significant drop, possibly due to its tendency to favor an overconfident model which lacks diversity in predictions. Third, given the same number of iterations, Bayesian optimization yields higher QWK than random search, confirming guided exploration.
|
| 238 |
+
|
| 239 |
+
# 4.4 Cost Analysis
|
| 240 |
+
|
| 241 |
+
In Figure 4, we analyze the wall-clock time of PIM compared with PMAES, throughout the entire course of ASAP $\rightarrow$ PERSUADE2.0 adaptation. We note that PMAES joint-trains the model for all available sources for each target prompt. Notably, PIM requires substantially less time for adaptation and inference combined than PMAES, once all source models are pre-trained. When accounting for the accumulated time from pre-training, PIM begins to outperform PMAES from the second target prompt, with the gap widening as more target prompts are introduced. This highlights PIM's scalability to new prompts, despite using considerably larger models (LLMs) than PMAES (CNN+LSTM). The efficiency arises from the constant reuse of individual source models and efficient merging. On the other hand, PMAES retransmits the entire model for each target, leading to relatively high time cost for adaptation.
|
| 242 |
+
|
| 243 |
+
# 5 Related Work
|
| 244 |
+
|
| 245 |
+
Cross-prompt Essay Scoring. Cross-prompt AES transfers models trained on source prompts to unseen ones (Dong and Zhang, 2016; Ridley et al., 2021). Early work used manual features and domain adaptation with a few labeled target samples (Phandi et al., 2015; Cummins et al., 2016). Later neural methods improved generalization by incorporating prompt-agnostic objectives (Ridley et al., 2020) or learning multi-prompt joint representations (Cao et al., 2020; Chen and Li, 2023), but rely on static data fusion and full retraining, which limits the scalability. Our approach differs by enabling dynamic and selective utilization of source-domain knowledge without joint-training.
|
| 246 |
+
|
| 247 |
+
Model Merging. Model merging linearly combines parameters from same-architecture networks while preserving properties (Neyshabur et al., 2020; Zhou et al., 2023). Current methods include magnitude pruning (Yadav et al., 2023; Yu et al., 2024; Deep et al., 2024; Gargiulo et al., 2025; Marczak et al., 2025) to reduce parameter conflicts; activa
|
| 248 |
+
|
| 249 |
+
tion merging (Yang et al., 2024a,b; Xu et al., 2025) to align features; optimization merging (Matena and Raffel, 2022; Jin et al., 2023; Yang et al., 2024c) to adjust weights via optimization. Emerging studies (Team et al., 2025; Sun et al., 2025) have demonstrated the effectiveness of model merging on LLMs, presenting a potential pathway for enhancing out-of-distribution performance.
|
| 250 |
+
|
| 251 |
+
Source-free Domain Adaptation. SFDA transfers models pretrained on labeled source domain(s) to unlabeled target domain without source data (Sun et al., 2020). One approach includes compensating for the absence of source data by generating virtual samples (Tian et al., 2022; Ding et al., 2022) or computing summary statistics (Adachi et al., 2025). Another approach is adapting solely with unlabeled target data by minimizing entropy (Wang et al., 2021; Niu et al., 2022), prompting prediction diversity (Liang et al., 2020; Dong et al., 2021), or Bayesian calibration (Zhou and Levine, 2021). Applications of SFDA in NLP are few, but growing (Zhang et al., 2021; Yin et al., 2024). This paper addresses SFDA for essay scoring by leveraging source statistics, with model merging as a scalable alternative to training for adaptation.
|
| 252 |
+
|
| 253 |
+
# 6 Conclusion
|
| 254 |
+
|
| 255 |
+
In this paper, we propose a domain-adaptive model merging approach for source-free cross-prompt AES. Our pilot study suggests suboptimality of training on all source domains. Inspired by this, we shift to selecting beneficial source domains, and approximate costly joint training by merging task vectors through a linear combination. In optimizing the combination's coefficients, we resort to our proposed prior-encoded information maximization (PIM), an unsupervised objective which encourages score discriminability regularized by priors pre-computed from the sources. Experimental results with LLMs on in- and cross-dataset settings show that our method consistently outperforms joint training on all sources, surpasses other merging methods in numerous cases, maintains robustness under severe distribution shifts where leading cross-prompt methods struggle, all while remaining computationally efficient.
|
| 256 |
+
|
| 257 |
+
# Limitations
|
| 258 |
+
|
| 259 |
+
We elucidate the limitations of this work as follows: First, both mutual information maximization and our improved PIM rely on the assumption that at
|
| 260 |
+
|
| 261 |
+
least one source model provides reasonable predictions (e.g., with sufficient diversity) for the target prompt. If all source models fail to capture the semantics of the target prompt, optimizing the PIM objective may degrade performance arbitrarily, as encouraging discriminability and sharpness becomes meaningless without meaningful initial predictions. Second, while our adaptation process remains efficient (using a fixed small sample of target essays, e.g., 64), PIM is designed for LLMs, which incur significantly higher inference latency compared to conventional encoder-based AES models. This may limit scalability when each target prompt contains a very large volume of essays to be tested, despite the adaptation itself being sample-efficient. Third, although LLMs enable adaptation to novel score ranges, extreme deviations between source and target ranges can lead to suboptimal predictions. For instance, on P8 of ASAP with score range of [0, 60], some source models lacked diverse predictions.
|
| 262 |
+
|
| 263 |
+
# Ethics Statement
|
| 264 |
+
|
| 265 |
+
Potential Risks This work aims to improve cross-prompt AES performance of LLMs. However, our method does not guarantee the model's fairness of scoring. For instance, it is possible that the adapted model assigns the scores in favor of a certain social group, such as the essay writer's first language background, gender, etc. In addition, since the source datasets may disproportionately represent certain social groups, models trained on these datasets could reproduce the biases embedded in the datasets in their predictions. There are ongoing works analyzing the fairness of AES systems (Loukina et al., 2019; Schaller et al., 2024), and it is recommended to refer to this field before the deployment of the system.
|
| 266 |
+
|
| 267 |
+
Use of Scientific Artifacts For the datasets, we used ASAP (Hamner et al., 2012)'s publicly available text corpora, and used PERSUADE2.0 (Crossley et al., 2024) which is an open source corpus under CC BY-NC-SA 4.0 license. Both ASAP and PERSUADE2.0 have anonymized personally identifying information from the essays. For the models, Llama-3.1-8B-Instruct (Grattafori et al., 2024) is under Llama3.1 Community License, and Phi-4-mini-instruct (Microsoft et al., 2025) is under MIT license. In addition, Bayesian Optimization (Nogueira, 2014-) toolkit is under MIT license. All of these artifacts is applicable for research use.
|
| 268 |
+
|
| 269 |
+
# Acknowledgments
|
| 270 |
+
|
| 271 |
+
This work is supported by the National Natural Science Foundation of China (62076008).
|
| 272 |
+
|
| 273 |
+
# References
|
| 274 |
+
|
| 275 |
+
Kazuki Adachi, Shin'ya Yamaguchi, Atsutoshi Kumagai, and Tomoki Hamagami. 2025. Test-time adaptation for regression by subspace alignment. In The Thirteenth International Conference on Learning Representations.
|
| 276 |
+
Samuel Ainsworth, Jonathan Hayase, and Siddhartha Srinivasa. 2023. Git re-basin: Merging models modulo permutation symmetries. In *The Eleventh International Conference on Learning Representations*.
|
| 277 |
+
John Bridle, Anthony Heading, and David MacKay. 1991. Unsupervised classifiers, mutual information and 'phantom targets. In Advances in Neural Information Processing Systems, volume 4. Morgan-Kaufmann.
|
| 278 |
+
Yue Cao, Hanqi Jin, Xiaojun Wan, and Zhiwei Yu. 2020. Domain-adaptive neural automated essay scoring. In Proceedings of the 43rd international ACM SIGIR conference on research and development in information retrieval, pages 1011-1020.
|
| 279 |
+
Hongbo Chen and Ben He. 2013. Automated essay scoring by maximizing human-machine agreement. In Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing, pages 1741-1752, Seattle, Washington, USA. Association for Computational Linguistics.
|
| 280 |
+
Yuan Chen and Xia Li. 2023. PMAES: Prompt-mapping contrastive learning for cross-prompt automated essay scoring. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1489-1503, Toronto, Canada. Association for Computational Linguistics.
|
| 281 |
+
Yuan Chen and Xia Li. 2024. PLAES: Promptgeneralized and level-aware learning framework for cross-prompt automated essay scoring. In Proceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation (LREC-COLING 2024), pages 12775-12786, Torino, Italia. ELRA and ICCL.
|
| 282 |
+
SeongYeub Chu, Jong Woo Kim, Bryan Wong, and Mun Yong Yi. 2025. Rationale behind essay scores: Enhancing S-LLM's multi-trait essay scoring with rationale generated by LLMs. In *Findings of the Association for Computational Linguistics: NAACL* 2025, pages 5796–5814, Albuquerque, New Mexico. Association for Computational Linguistics.
|
| 283 |
+
Mădalina Cozma, Andrei Butnaru, and Radu Tudor Ionescu. 2018. Automated essay scoring with string kernels and word embeddings. In Proceedings of the
|
| 284 |
+
|
| 285 |
+
56th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 503-509, Melbourne, Australia. Association for Computational Linguistics.
|
| 286 |
+
S.A. Crossley, Y. Tian, P. Baffour, A. Franklin, M. Benner, and U. Boser. 2024. A large-scale corpus for assessing written argumentation: Persuade 2.0. Assessing Writing, 61:100865.
|
| 287 |
+
Ronan Cummins, Meng Zhang, and Ted Briscoe. 2016. Constrained Multi-Task Learning for Automated Essay Scoring. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 789–799, Berlin, Germany. Association for Computational Linguistics.
|
| 288 |
+
Pala Tej Deep, Rishabh Bhardwaj, and Soujanya Poria. 2024. Della-merging: Reducing interference in model merging through magnitude-based sampling. CoRR, abs/2406.11617.
|
| 289 |
+
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 4171-4186, Minneapolis, Minnesota. Association for Computational Linguistics.
|
| 290 |
+
Ning Ding, Yixing Xu, Yehui Tang, Chao Xu, Yunhe Wang, and Dacheng Tao. 2022. Source-free domain adaptation via distribution estimation. In 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 7202-7212.
|
| 291 |
+
Heejin Do, Yunsu Kim, and Gary Geunbae Lee. 2023. Prompt- and trait relation-aware cross-prompt essay trait scoring. In Findings of the Association for Computational Linguistics: ACL 2023, pages 1538-1551, Toronto, Canada. Association for Computational Linguistics.
|
| 292 |
+
Fei Dong and Yue Zhang. 2016. Automatic features for essay scoring – an empirical study. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pages 1072–1077, Austin, Texas. Association for Computational Linguistics.
|
| 293 |
+
Fei Dong, Yue Zhang, and Jie Yang. 2017. Attention-based recurrent convolutional neural network for automatic essay scoring. In Proceedings of the 21st Conference on Computational Natural Language Learning (CoNLL 2017), pages 153-162, Vancouver, Canada. Association for Computational Linguistics.
|
| 294 |
+
Jiahua Dong, Zhen Fang, Anjin Liu, Gan Sun, and Tongliang Liu. 2021. Confident anchor-induced multi-source free domain adaptation. In Advances in Neural Information Processing Systems, volume 34, pages 2848-2860. Curran Associates, Inc.
|
| 295 |
+
|
| 296 |
+
Youmna Farag, Helen Yannakoudakis, and Ted Briscoe. 2018. Neural automated essay scoring and coherence modeling for adversarially crafted input. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers), pages 263-271, New Orleans, Louisiana. Association for Computational Linguistics.
|
| 297 |
+
Peter I Frazier. 2018. A tutorial on bayesian optimization. arXiv preprint arXiv:1807.02811.
|
| 298 |
+
Antonio Andrea Gargiulo, Donato Crisostomi, Maria Sofia Bucarelli, Simone Scardapane, and Emanuele Rodola. 2025. Task Singular Vectors: Reducing Task Interference in Model Merging. Preprint, arXiv:2412.00081.
|
| 299 |
+
Aaron Grattafori, Abhimanyu Dubey, Abhinav Jauhri, Abhinav Pandey, Abhishek Kadian, Ahmad Al-Dahle, Aiesha Letman, Akhil Mathur, Alan Schelten, Alex Vaughan, and 1 others. 2024. The llama 3 herd of models. arXiv preprint arXiv:2407.21783.
|
| 300 |
+
Ben Hamner, Jaison Morgan, lynnvandev, Mark Sermis, and Tom Vander Ark. 2012. The hewlett foundation: Automated essay scoring.
|
| 301 |
+
Pengcheng He, Jianfeng Gao, and Weizhu Chen. 2021. Debertav3: Improving deberta using electra-style pretraining with gradient-disentangled embedding sharing. arXiv preprint arXiv:2111.09543.
|
| 302 |
+
Edward J Hu, yelong shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. 2022. LoRA: Low-rank adaptation of large language models. In International Conference on Learning Representations.
|
| 303 |
+
Jiaxing Huang, Dayan Guan, Aoran Xiao, and Shijian Lu. 2021. Model adaptation: Historical contrastive learning for unsupervised domain adaptation without source data. In Advances in Neural Information Processing Systems, volume 34, pages 3635-3649. Curran Associates, Inc.
|
| 304 |
+
Gabriel Ilharco, Marco Tulio Ribeiro, Mitchell Wortsman, Ludwig Schmidt, Hannaneh Hajishirzi, and Ali Farhadi. 2023. Editing models with task arithmetic. In The Eleventh International Conference on Learning Representations.
|
| 305 |
+
Chaeyun Jang, Hyungi Lee, Jungtaek Kim, and Juho Lee. 2024. Model fusion through bayesian optimization in language model fine-tuning. In Advances in Neural Information Processing Systems, volume 37, pages 29878-29912. Curran Associates, Inc.
|
| 306 |
+
Zhiwei Jiang, Tianyi Gao, Yafeng Yin, Meng Liu, Hua Yu, Zifeng Cheng, and Qing Gu. 2023. Improving domain generalization for prompt-aware essay scoring via disentangled representation learning. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 12456-12470, Toronto, Canada. Association for Computational Linguistics.
|
| 307 |
+
|
| 308 |
+
Cancan Jin, Ben He, Kai Hui, and Le Sun. 2018. TDNN: A two-stage deep neural network for prompt-independent automated essay scoring. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1088-1097, Melbourne, Australia. Association for Computational Linguistics.
|
| 309 |
+
Xisen Jin, Xiang Ren, Daniel Preotiuc-Pietro, and Pengxiang Cheng. 2023. Dataless knowledge fusion by merging weights of language models. In The Eleventh International Conference on Learning Representations.
|
| 310 |
+
Andreas Krause, Pietro Perona, and Ryan Gomes. 2010. Discriminative clustering by regularized information maximization. In Advances in Neural Information Processing Systems, volume 23. Curran Associates, Inc.
|
| 311 |
+
Shengjie Li and Vincent Ng. 2024. Conundrums in cross-prompt automated essay scoring: Making sense of the state of the art. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 7661-7681, Bangkok, Thailand. Association for Computational Linguistics.
|
| 312 |
+
Jian Liang, Dapeng Hu, and Jiashi Feng. 2020. Do we really need to access the source data? Source hypothesis transfer for unsupervised domain adaptation. In Proceedings of the 37th International Conference on Machine Learning, volume 119 of Proceedings of Machine Learning Research, pages 6028-6039. PMLR.
|
| 313 |
+
Deyuan Liu, Zecheng Wang, Bingning Wang, Weipeng Chen, Chunshan Li, Zhiying Tu, Dianhui Chu, Bo Li, and Dianbo Sui. 2024. Checkpoint merging via bayesian optimization in llm pretraining. arXiv preprint arXiv:2403.19390.
|
| 314 |
+
Ilya Loshchilov and Frank Hutter. 2019. Decoupled weight decay regularization. In International Conference on Learning Representations.
|
| 315 |
+
Anastassia Loukina, Nitin Madnani, and Klaus Zechner. 2019. The many dimensions of algorithmic fairness in educational applications. In Proceedings of the Fourteenth Workshop on Innovative Use of NLP for Building Educational Applications, pages 1-10, Florence, Italy. Association for Computational Linguistics.
|
| 316 |
+
Michal Lukasik, Zhao Meng, Harikrishna Narasimhan, Yin-Wen Chang, Aditya Krishna Menon, Felix Yu, and Sanjiv Kumar. 2025. Better autoregressive regression with LLMs via regression-aware fine-tuning. In The Thirteenth International Conference on Learning Representations.
|
| 317 |
+
Daniel Marczak, Simone Magistri, Sebastian Cygert, Bartlomiej Twardowski, Andrew D. Bagdanov, and Joost van de Weijer. 2025. No Task Left Behind: Isotropic Model Merging with Common and Task-Specific Subspaces. Preprint, arXiv:2502.04959.
|
| 318 |
+
|
| 319 |
+
Michael S Matena and Colin A Raffel. 2022. Merging models with fisher-weighted averaging. In Advances in Neural Information Processing Systems, volume 35, pages 17703-17716. Curran Associates, Inc.
|
| 320 |
+
Microsoft, :, Abdelrahman Abouelenin, Atabak Ashfaq, Adam Atkinson, Hany Awadalla, Nguyen Bach, Jianmin Bao, Alon Benhaim, Martin Cai, Vishrav Chaudhary, Congcong Chen, Dong Chen, Dong-dong Chen, Junkun Chen, Weizhu Chen, Yen-Chun Chen, Yi ling Chen, Qi Dai, and 57 others. 2025. Phi-4-mini technical report: Compact yet powerful multimodal language models via mixture-of-loras. Preprint, arXiv:2503.01743.
|
| 321 |
+
Behnam Neyshabur, Hanie Sedghi, and Chiyuan Zhang. 2020. What is being transferred in transfer learning? Advances in neural information processing systems, 33:512-523.
|
| 322 |
+
Shuaicheng Niu, Jiaxiang Wu, Yifan Zhang, Yaofo Chen, Shijian Zheng, Peilin Zhao, and Mingkui Tan. 2022. Efficient test-time model adaptation without forgetting. In Proceedings of the 39th International Conference on Machine Learning, volume 162 of Proceedings of Machine Learning Research, pages 16888-16905. PMLR.
|
| 323 |
+
Fernando Nogueira. 2014--. Bayesian Optimization: Open source constrained global optimization tool for Python.
|
| 324 |
+
Peter Phandi, Kian Ming A. Chai, and Hwee Tou Ng. 2015. Flexible Domain Adaptation for Automated Essay Scoring Using Correlated Linear Regression. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, pages 431-439, Lisbon, Portugal. Association for Computational Linguistics.
|
| 325 |
+
Robert Ridley, Liang He, Xin-yu Dai, Shujian Huang, and Jiajun Chen. 2021. Automated cross-prompt scoring of essay traits. In Proceedings of the AAAI conference on artificial intelligence, volume 35, pages 13745-13753.
|
| 326 |
+
Robert Ridley, Liang He, Xinyu Dai, Shujian Huang, and Jiajun Chen. 2020. Prompt agnostic essay scorer: a domain generalization approach to cross-prompt automated essay scoring. arXiv preprint arXiv:2008.01441.
|
| 327 |
+
Nils-Jonathan Schaller, Yuning Ding, Andrea Horbach, Jennifer Meyer, and Thorben Jansen. 2024. Fairness in automated essay scoring: A comparative analysis of algorithms on German learner essays from secondary education. In Proceedings of the 19th Workshop on Innovative Use of NLP for Building Educational Applications (BEA 2024), pages 210-221, Mexico City, Mexico. Association for Computational Linguistics.
|
| 328 |
+
Lin Sun, Guangxiang Zhao, Xiaqi Jian, Yuhan Wu, Weihong Lin, Yongfu Zhu, Change Jia, Linglin Zhang, Jinzhu Wu, Junfeng Ran, Sai-er Hu, Zihan
|
| 329 |
+
|
| 330 |
+
Jiang, Junting Zhou, Wenrui Liu, Bin Cui, Tong Yang, and Xiangzheng Zhang. 2025. TinyR1-32B-Preview: Boosting Accuracy with Branch-Merge Distillation. Preprint, arXiv:2503.04872.
|
| 331 |
+
Yu Sun, Xiaolong Wang, Zhuang Liu, John Miller, Alexei Efros, and Moritz Hardt. 2020. Test-time training with self-supervision for generalization under distribution shifts. In Proceedings of the 37th International Conference on Machine Learning, volume 119 of Proceedings of Machine Learning Research, pages 9229-9248. PMLR.
|
| 332 |
+
Kaveh Taghipour and Hwee Tou Ng. 2016. A neural approach to automated essay scoring. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pages 1882-1891, Austin, Texas. Association for Computational Linguistics.
|
| 333 |
+
Kimi Team, Angang Du, Bofei Gao, Bowei Xing, Changjiu Jiang, Cheng Chen, Cheng Li, Chenjun Xiao, Chenzhuang Du, Chonghua Liao, Chuning Tang, Congcong Wang, Dehao Zhang, Enming Yuan, Enzhe Lu, Fengxiang Tang, Flood Sung, Guangda Wei, Guokun Lai, and 75 others. 2025. Kimi k1.5: Scaling Reinforcement Learning with LLMs. Preprint, arXiv:2501.12599.
|
| 334 |
+
Jiayi Tian, Jing Zhang, Wen Li, and Dong Xu. 2022. Vdm-da: Virtual domain modeling for source data-free domain adaptation. IEEE Transactions on Circuits and Systems for Video Technology, 32(6):3749-3760.
|
| 335 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. In Advances in Neural Information Processing Systems, volume 30. Curran Associates, Inc.
|
| 336 |
+
Dequan Wang, Evan Shelhamer, Shaoteng Liu, Bruno Olshausen, and Trevor Darrell. 2021. Tent: Fully test-time adaptation by entropy minimization. In International Conference on Learning Representations.
|
| 337 |
+
Jiong Wang and Jie Liu. 2025. T-MES: Trait-aware mix-of-experts representation learning for multi-trait essay scoring. In Proceedings of the 31st International Conference on Computational Linguistics, pages 1224-1236, Abu Dhabi, UAE. Association for Computational Linguistics.
|
| 338 |
+
Christopher KI Williams and Carl Edward Rasmussen. 2006. Gaussian processes for machine learning, volume 2. MIT press Cambridge, MA.
|
| 339 |
+
Mitchell Wortsman, Gabriel Ilharco, Samir Ya Gadre, Rebecca Roelofs, Raphael Gontijo-Lopes, Ari S Morcos, Hongseok Namkoong, Ali Farhadi, Yair Carmon, Simon Kornblith, and 1 others. 2022. Model soups: averaging weights of multiple fine-tuned models improves accuracy without increasing inference time. In International conference on machine learning, pages 23965-23998. PMLR.
|
| 340 |
+
|
| 341 |
+
Jing Xu, Jiazheng Li, and Jingzhao Zhang. 2025. Scalable Model Merging with Progressive Layer-wise Distillation. Preprint, arXiv:2502.12706.
|
| 342 |
+
|
| 343 |
+
Prateek Yadav, Derek Tam, Leshem Choshen, Colin A Raffel, and Mohit Bansal. 2023. Ties-merging: Resolving interference when merging models. In Advances in Neural Information Processing Systems, volume 36, pages 7093-7115. Curran Associates, Inc.
|
| 344 |
+
|
| 345 |
+
Enneng Yang, Li Shen, Zhenyi Wang, Guibing Guo, Xiaojun Chen, Xingwei Wang, and Dacheng Tao. 2024a. Representation surgery for multi-task model merging. In International Conference on Machine Learning, pages 56332-56356. PMLR.
|
| 346 |
+
|
| 347 |
+
Enneng Yang, Li Shen, Zhenyi Wang, Guibing Guo, Xingwei Wang, Xiaocun Cao, Jie Zhang, and Dacheng Tao. 2024b. SurgeryV2: Bridging the Gap Between Model Merging and Multi-Task Learning with Deep Representation Surgery. Preprint, arXiv:2410.14389.
|
| 348 |
+
|
| 349 |
+
Enneng Yang, Zhenyi Wang, Li Shen, Shiwei Liu, Guibing Guo, Xingwei Wang, and Dacheng Tao. 2024c. Adamerging: Adaptive model merging for multi-task learning. In The Twelfth International Conference on Learning Representations.
|
| 350 |
+
|
| 351 |
+
Shiqi Yang, yaxing wang, kai wang, Shangling Jui, and Joost van de Weijer. 2022. Attracting and dispersing: A simple approach for source-free domain adaptation. In Advances in Neural Information Processing Systems, volume 35, pages 5802-5815. Curran Associates, Inc.
|
| 352 |
+
|
| 353 |
+
Maxwell Yin, Boyu Wang, and Charles Ling. 2024. Source-free unsupervised domain adaptation for question answering via prompt-assisted self-learning. In Findings of the Association for Computational Linguistics: NAACL 2024, pages 700-713, Mexico City, Mexico. Association for Computational Linguistics.
|
| 354 |
+
|
| 355 |
+
Le Yu, Bowen Yu, Haiyang Yu, Fei Huang, and Yongbin Li. 2024. Language models are super mario: Absorbing abilities from homologous models as a free lunch. In International Conference on Machine Learning, pages 57755-57775. PMLR.
|
| 356 |
+
|
| 357 |
+
Torsten Zesch, Michael Wojatzki, and Dirk Scholten-Akoun. 2015. Task-independent features for automated essay grading. In Proceedings of the Tenth Workshop on Innovative Use of NLP for Building Educational Applications, pages 224-232, Denver, Colorado. Association for Computational Linguistics.
|
| 358 |
+
|
| 359 |
+
Bo Zhang, Xiaoming Zhang, Yun Liu, Lei Cheng, and Zhoujun Li. 2021. Matching distributions between model and data: Cross-domain knowledge distillation for unsupervised domain adaptation. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 5423-5433, Online. Association for Computational Linguistics.
|
| 360 |
+
|
| 361 |
+
Aurick Zhou and Sergey Levine. 2021. Bayesian adaptation for covariate shift. In Advances in Neural Information Processing Systems, volume 34, pages 914-927. Curran Associates, Inc.
|
| 362 |
+
|
| 363 |
+
Zhanpeng Zhou, Yongyi Yang, Xiaojiang Yang, Junchi Yan, and Wei Hu. 2023. Going beyond linear mode connectivity: The layerwise linear feature connectivity. Advances in neural information processing systems, 36:60853-60877.
|
| 364 |
+
|
| 365 |
+
# A Details of Pilot Study
|
| 366 |
+
|
| 367 |
+
In the pilot study (Figure 1), we investigate the effect of jointly training on varying number of source datasets on the transfer performance. In this experiment, we train BERT with the following configurations: a regression head is placed on top of BERT encoder, which consists of a linear layer and a sigmoid activation; We train 30 epochs with a batch size of 128, a learning rate of $2 \cdot 10^{-5}$ with constant learning schedule; We choose the best checkpoint on the validation set among the epochs, with early stopping of 10 epochs.
|
| 368 |
+
|
| 369 |
+
# B Supplementary Details of Method
|
| 370 |
+
|
| 371 |
+
# B.1 Matching Mean and Variance of Beta Mixture
|
| 372 |
+
|
| 373 |
+
We describe how the unified $\mathbf{Beta}(\alpha_{\mathcal{S}},\beta_{\mathcal{S}})$ is derived by matching its mean and variance to the Beta mixture $1 / M\sum_{j = 1}^{M}\mathbf{Beta}(\alpha_{j},\beta_{j})$ . For each source distribution $\mathbf{Beta}(\alpha_j,\beta_j)$ , the mean $\mu_{j}$ and variance $\sigma_j^2$ are
|
| 374 |
+
|
| 375 |
+
$$
|
| 376 |
+
\mu_ {j} = \frac {\alpha_ {j}}{\alpha_ {j} + \beta_ {j}}, \sigma_ {j} ^ {2} = \frac {\alpha_ {j} \beta_ {j}}{(\alpha_ {j} + \beta_ {j}) ^ {2} (\alpha_ {j} + \beta_ {j} + 1)}.
|
| 377 |
+
$$
|
| 378 |
+
|
| 379 |
+
The mean $\mu$ and variance $\sigma^2$ of the mixture is then given by
|
| 380 |
+
|
| 381 |
+
$$
|
| 382 |
+
\mu = M ^ {- 1} \sum_ {j = 1} ^ {M} \mu_ {j}
|
| 383 |
+
$$
|
| 384 |
+
|
| 385 |
+
$$
|
| 386 |
+
\sigma^ {2} = M ^ {- 1} \sum_ {j = 1} ^ {M} (\sigma_ {j} ^ {2} + \mu_ {j} ^ {2}) - \mu^ {2}.
|
| 387 |
+
$$
|
| 388 |
+
|
| 389 |
+
Finally, we let $\mathbf{Beta}(\alpha_{\mathcal{S}},\beta_{\mathcal{S}})$ have $\mu$ and $\sigma^2$ as its mean and variance, which is:
|
| 390 |
+
|
| 391 |
+
$$
|
| 392 |
+
\alpha_ {\mathcal {S}} = \mu \left(\frac {\mu (1 - \mu)}{\sigma^ {2}} - 1\right)
|
| 393 |
+
$$
|
| 394 |
+
|
| 395 |
+
$$
|
| 396 |
+
\beta_ {\mathcal {S}} = (1 - \mu) \left(\frac {\mu (1 - \mu)}{\sigma^ {2}} - 1\right).
|
| 397 |
+
$$
|
| 398 |
+
|
| 399 |
+
# B.2 Details of Bayesian Optimization
|
| 400 |
+
|
| 401 |
+
Bayesian optimization (Williams and Rasmussen, 2006) constructs a surrogate model of the black-box function $f(\lambda)$ as a sample from a Gaussian Process—a distribution over functions, and updates the posterior on $f$ given observations $\{f(\lambda^{(i)})\}_{i=1}^k$ . It then uses an acquisition function to determine where to sample $\lambda^{(k+1)}$ next. When the iteration terminates, $\lambda^* = \arg \max_{\lambda^{(i)}} f(\lambda^{(i)})$ is chosen as the final solution.
|
| 402 |
+
|
| 403 |
+
In detail, for $(k + 1)$ -iteration, the Gaussian prior is placed on the observations:
|
| 404 |
+
|
| 405 |
+
$$
|
| 406 |
+
f (\lambda^ {(1: k)}) \sim \mathcal {N} (\mu_ {0} (\lambda^ {(1: k)}), \Sigma_ {0} (\lambda^ {(1: k)}, \lambda^ {(1: k)}))
|
| 407 |
+
$$
|
| 408 |
+
|
| 409 |
+
where $\lambda^{(1:k)}$ is a compact notation for $k$ points $\{f(\lambda^{(i)})\}_{i=1}^k$ , and $\mu_0$ and $\Sigma_0$ are the mean and covariance function of the Gaussian Process. We choose the commonly used $\mathbf{0}$ for $\mu_0$ and Matern 2.5 kernel (Williams and Rasmussen, 2006) for $\Sigma_0$ . Then the posterior on a new function value $f(\lambda^{(k+1)})$ given previous observations $f(\lambda^{(1:k)})$ is updated by the Bayes' rule (Frazier, 2018):
|
| 410 |
+
|
| 411 |
+
$$
|
| 412 |
+
\begin{array}{l} f (\lambda^ {(k + 1)}) | f (\lambda^ {(1: k)}) \\ \sim \mathcal {N} (\mu_ {k + 1} (\lambda^ {(k + 1)}), \sigma_ {k + 1} ^ {2} (\lambda^ {(k + 1)})) \\ \end{array}
|
| 413 |
+
$$
|
| 414 |
+
|
| 415 |
+
where
|
| 416 |
+
|
| 417 |
+
$$
|
| 418 |
+
\begin{array}{l} \mu_ {k + 1} (\lambda^ {(k + 1)}) = \Sigma_ {0} (\lambda^ {(k + 1)}, \lambda^ {(1: k)}) \\ \cdot \Sigma_ {0} (\lambda^ {(1: k)}, \lambda^ {(1: k)}) ^ {- 1} \\ \cdot \left(f \left(\lambda^ {(1: k)}\right) - \mu_ {0} \left(\lambda^ {(1: k)}\right)\right) + \mu_ {0} \left(\lambda^ {(k + 1)}\right) \\ \end{array}
|
| 419 |
+
$$
|
| 420 |
+
|
| 421 |
+
$$
|
| 422 |
+
\begin{array}{l} \sigma_ {k + 1} ^ {2} (\lambda^ {(k + 1)}) = \Sigma_ {0} (\lambda^ {(k + 1)}, \lambda^ {(k + 1)}) \\ - \Sigma_ {0} (\lambda^ {(k + 1)}, \lambda^ {(1: k)}) \\ \cdot \Sigma_ {0} (\lambda^ {(1: k)}, \lambda^ {(1: k)}) ^ {- 1} \Sigma_ {0} (\lambda^ {(1: k)}, \lambda^ {(k + 1)}). \\ \end{array}
|
| 423 |
+
$$
|
| 424 |
+
|
| 425 |
+
Intuitively, the posterior mean $\mu_{k + 1}(\lambda^{(k + 1)})$ is a weighted sum between the prior $\mu_0(\lambda^{(k + 1)})$ and a calibration term based on the data $f(\lambda^{(1:k)})$ , and the posterior variance $\sigma_{k + 1}^2 (\lambda^{(k + 1)})$ is given as the prior variance $\Sigma_0(\lambda^{(k + 1)},\lambda^{(k + 1)})$ subtracted by the reduction in variance (uncertainty) after observing the data $f(\lambda^{(1:k)})$ (Frazier, 2018).
|
| 426 |
+
|
| 427 |
+
Next, the acquisition function specifies where to sample $\lambda^{(k + 1)}$ based on the posterior. We use Expected Improvement (EI) which finds $\lambda^{(k + 1)}$ such that the expected gain over the current best value $f^{*}(k)\coloneqq \max_{\lambda^{(i)}}\{f(\lambda^{(i)})\}_{i = 1}^{k}$ is maximized:
|
| 428 |
+
|
| 429 |
+
$$
|
| 430 |
+
\operatorname *{arg max}_{\lambda^{(k + 1)}}\underset {f(\lambda^{(k + 1)})}{\mathbb{E}}\left[\max (f(\lambda^{(k + 1)}) - f^{*}(k),0)\right]
|
| 431 |
+
$$
|
| 432 |
+
|
| 433 |
+
This process of posterior estimation and next point sampling is repeated until convergence.
|
| 434 |
+
|
| 435 |
+
# C Additional Details of Experimental Setup
|
| 436 |
+
|
| 437 |
+
# C.1 Instruction Template
|
| 438 |
+
|
| 439 |
+
We use the instruction template below throughout the experiments.
|
| 440 |
+
|
| 441 |
+
# User Message
|
| 442 |
+
|
| 443 |
+
## Prompt:
|
| 444 |
+
|
| 445 |
+
{prompt}
|
| 446 |
+
|
| 447 |
+
Student Essay:
|
| 448 |
+
|
| 449 |
+
{essay}
|
| 450 |
+
|
| 451 |
+
Instruction:
|
| 452 |
+
|
| 453 |
+
Given the student's essay written in response to the prompt, assign a score within the range of {min_score} to {max_score}. Respond with only an integer score and no additional text.
|
| 454 |
+
|
| 455 |
+
# Assistant Message
|
| 456 |
+
|
| 457 |
+
{score}
|
| 458 |
+
|
| 459 |
+
# C.2 Prompt Topics
|
| 460 |
+
|
| 461 |
+
In Table 6, we specify the correspondence between the prompt IDs (Table. 2) and the prompt topics.
|
| 462 |
+
|
| 463 |
+
<table><tr><td>Dataset</td><td>Prompt</td><td>Topic</td></tr><tr><td rowspan="8">ASAP</td><td>1</td><td>Effects computers have on people</td></tr><tr><td>2</td><td>Censorship in the libraries</td></tr><tr><td>3</td><td>Impact of setting on the cyclist's experience</td></tr><tr><td>4</td><td>The meaning of the ending in Winter Hibiscus</td></tr><tr><td>5</td><td>The mood created in Narciso Rodriguez's memoir</td></tr><tr><td>6</td><td>Obstacles to docking dirigibles</td></tr><tr><td>7</td><td>A story about patience</td></tr><tr><td>8</td><td>A story about laughter</td></tr><tr><td rowspan="8">PERSUADE2.0</td><td>1</td><td>Cell phones at school</td></tr><tr><td>2</td><td>Distance learning</td></tr><tr><td>3</td><td>Mandatory extracurricular activities</td></tr><tr><td>4</td><td>Seeking multiple opinions</td></tr><tr><td>5</td><td>"A Cowboy Who rode the Waves"</td></tr><tr><td>6</td><td>Does the electoral college work?</td></tr><tr><td>7</td><td>Exploring Venus</td></tr><tr><td>8</td><td>The Face on Mars</td></tr></table>
|
| 464 |
+
|
| 465 |
+
Table 6: Prompt Topics of ASAP and PERSUADE2.0.
|
| 466 |
+
|
| 467 |
+
# C.3 Details of LoRA Fine-tuning
|
| 468 |
+
|
| 469 |
+
We use LoRA with $r = 16$ , $\alpha = 32$ , dropout $= 0.1$ , targeting all linear layers in the transformer block (Vaswani et al., 2017). During fine-tuning we use the AdamW optimizer (Loshchilov and Hutter, 2019) with a batch size of 16, a learning rate of $10^{-4}$ and a cosine scheduler. The best checkpoint on the validation set is selected, with evaluation steps of 30 and early stopping patience of 3.
|
| 470 |
+
|
| 471 |
+
# C.4 Descriptions and Implementation Details of Baselines
|
| 472 |
+
|
| 473 |
+
Averaging (Wortsman et al., 2022) simply averages the models' parameters. Task Arithmetic (Ilharco et al., 2023) adds a scaled sum of task vectors to the pre-trained model, and TIES-Merging (Yadav et al., 2023) pre-processes task vectors to resolve their interferences prior to merging. Following the recommended hyperparameters, we set the scaling factor of TA to $\lambda = 0.4$ and of TIES to $\lambda = 1.0$ .
|
| 474 |
+
|
| 475 |
+
Fisher Merging (Matena and Raffel, 2022) improves Averaging by accounting for parameter-wise importance using Fisher information. Fisher information is estimated by sampling from the label distribution of samples from the validation set. RegMean (Jin et al., 2023) aims to minimize the layer-wise distance in activation between the merged model and all fine-tuned models. Following the original implementation on T5 models, we set the non-diagonal multiplier to $\alpha = 0.1$ .
|
| 476 |
+
|
| 477 |
+
AdaMerging (Yang et al., 2024c) is a test time adaptation method which trains layer-wise coefficients for merging task vectors in order to minimize entropy on test samples. In our domain adaptation setting, test samples are the samples from the target domain. In contrast to other baselines, AdaMerging exploits the information of the target domain samples.
|
| 478 |
+
|
| 479 |
+
As for Joint-train baseline, we use the same configuration as C.3 except for batch size $= 64$ and early stopping patience $= 10$ . For another joint-training baselines, PAES (Ridley et al., 2020) and PMAES (Chen and Li, 2023), we follow the original settings for model architecture and training hyperparameters. As the original implementation of PMAES does not specify the batch size, we set the combined batch size for the source and target domains data to 32, and allocate it proportionally based on the data ratio between the source and target domains.
|
| 480 |
+
|
| 481 |
+
# C.5 Impact of Hyperparameter Choices
|
| 482 |
+
|
| 483 |
+
We examine the impact of hyperparameter choices on the performance of PIM. Specifically, we present results for varying the number of iterations in Table 7 and varying the number of unlabeled target prompt samples in Table 8. Table 7 shows that reducing half of the number of iterations $(40\to 20)$ yields a comparable average QWK, suggesting that convergence may occur as early as the 20th iteration. Table 8 indicates that PIM's performance is
|
| 484 |
+
|
| 485 |
+
<table><tr><td>Setting</td><td>Method</td><td># of iterations</td><td>Avg. QWK</td></tr><tr><td rowspan="4">ASAP → ASAP</td><td>PIM</td><td>40 (10+30)</td><td>0.602</td></tr><tr><td>(llama3.1-8b-it)</td><td>20 (5+15)</td><td>0.600</td></tr><tr><td>PIM</td><td>40 (10+30)</td><td>0.629</td></tr><tr><td>(phi-4-mini-it)</td><td>20 (5+15)</td><td>0.632</td></tr><tr><td rowspan="4">ASAP → PERSUADE2.0</td><td>PIM</td><td>40 (10+30)</td><td>0.512</td></tr><tr><td>(llama3.1-8b-it)</td><td>20 (5+15)</td><td>0.498</td></tr><tr><td>PIM</td><td>40 (10+30)</td><td>0.483</td></tr><tr><td>phi-4-mini-it)</td><td>20 (5+15)</td><td>0.486</td></tr></table>
|
| 486 |
+
|
| 487 |
+
Table 7: Impact of varying the number of iterations for on performance. The iterations consist of the initial random steps plus the optimization steps.
|
| 488 |
+
|
| 489 |
+
<table><tr><td>Setting</td><td>Method</td><td># of samples</td><td>Avg. QWK</td></tr><tr><td rowspan="8">ASAP → ASAP</td><td rowspan="4">PIM (llama3.1-8b-it)</td><td>16</td><td>0.593</td></tr><tr><td>32</td><td>0.603</td></tr><tr><td>64</td><td>0.602</td></tr><tr><td>128</td><td>0.603</td></tr><tr><td rowspan="4">PIM (phi-4-mini-it)</td><td>16</td><td>0.629</td></tr><tr><td>32</td><td>0.633</td></tr><tr><td>64</td><td>0.629</td></tr><tr><td>128</td><td>0.625</td></tr><tr><td rowspan="8">ASAP → PERSUADE2.0</td><td rowspan="4">PIM (llama3.1-8b-it)</td><td>16</td><td>0.528</td></tr><tr><td>32</td><td>0.514</td></tr><tr><td>64</td><td>0.512</td></tr><tr><td>128</td><td>0.513</td></tr><tr><td rowspan="4">PIM (phi-4-mini-it)</td><td>16</td><td>0.497</td></tr><tr><td>32</td><td>0.483</td></tr><tr><td>64</td><td>0.483</td></tr><tr><td>128</td><td>0.489</td></tr></table>
|
| 490 |
+
|
| 491 |
+
Table 8: Impact of varying the number of (unlabeled) test samples on performance.
|
| 492 |
+
|
| 493 |
+
robust to the choice of the number of target prompt samples leveraged during Bayesian optimization.
|
| 494 |
+
|
| 495 |
+

|
| 496 |
+
|
| 497 |
+

|
| 498 |
+
Figure 5: Comparison of PIM (llama-3.1-8b-it) with top-performing cross-prompt methods (PAES and PMAES).
|
| 499 |
+
|
| 500 |
+
# D Additional Comparison with Leading Cross-prompt Methods
|
| 501 |
+
|
| 502 |
+
In Figure 5, we show additional comparison results between PIM (llama-3.1-8b-it) and leading cross-prompt AES methods—PAES (Ridley et al., 2020) and PMAES (Chen and Li, 2023). The overall trend is consistent with PIM (phi-4-mini-it).
|
composablecrosspromptessayscoringbymergingmodels/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f98a22484ecc8bb75df9152a81227679e1fdf36ad9dc17d08be04afe9d5056bc
|
| 3 |
+
size 849244
|
composablecrosspromptessayscoringbymergingmodels/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:95d7f81224c87d831ca7a690948a007b5f1a3fed768a188ff31816b8ed73034f
|
| 3 |
+
size 570257
|
compositionalgeneralisationforexplainablehatespeechdetection/99b878d1-0664-42e4-a2be-84f8baf2c71b_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:18cd4ebef8c96a80fabb232e3ebc663edb37a2160d64c6bdbe9a2ec8bed86ffd
|
| 3 |
+
size 141164
|
compositionalgeneralisationforexplainablehatespeechdetection/99b878d1-0664-42e4-a2be-84f8baf2c71b_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ece177251b114558fcc806b8b7fad64311578cb62f660b787cef22fd0f95d4c4
|
| 3 |
+
size 162446
|