Temporally Consistent Factuality Probing for Large Language Models (2024)

Abstract: The prolific use of Large Language Models (LLMs) as an alternate knowledge base requires them to be factually consistent, necessitating both correctness and consistency traits for paraphrased queries. Recently, significant attempts have been made to benchmark datasets and metrics to evaluate LLMs for these traits. However, structural simplicity (subject-relation-object) and contemporary association in their query formulation limit the broader definition of factuality and consistency. In this study, we introduce TeCFaP, a novel Temporally Consistent Factuality Probe task to expand the consistent factuality probe in the temporal dimension. To this end, we propose TEMP-COFAC, a high-quality dataset of prefix-style English query paraphrases. Subsequently, we extend the definitions of existing metrics to represent consistent factuality across temporal dimension. We experiment with a diverse set of LLMs and find most of them performing poorly on TeCFaP. Next, we propose a novel solution CoTSeLF (Consistent-Time-Sensitive Learning Framework) combining multi-task instruction tuning (MT-IT) with consistent-time-sensitive reinforcement learning (CTSRL) to improve temporally consistent factuality in LLMs. Our experiments demonstrate the efficacy of CoTSeLF over several baselines.

## introduction large language models (llms) are pivotal in propelling the advancement of artificial general intelligence (agi) by acquiring self-learning capabilities for complex tasks @xcite . a key development within llms is the ability for temporal reasoning -comprehending, processing, and reasoning about time-related concepts, temporal dependencies, chronological sequences, and the nuanced, consistent temporal relationship of events. this ability is vital for a myriad of domain-specific * equal contribution tasks, including but not limited to summarizing timelines, tracking disease progression (medical), scheduling events (planning), managing contracts (legal), historical analysis (archaeology), and identifying tasks dependencies (project management). why is consistent factuality important? knowledge bases (kbs) were the foremost choice in factual knowledge retrieval tasks before the appearance of llms. a kb is a structured database containing a collection of facts (subject, relation, object) @xcite . there has been a surge of interest in using pre-trained llms as kbs. @xcite presented an extensive review on significant developments @xcite @xcite in this direction. one of the biggest appeals of using llms as kbs is that a query can be written in natural language instead of relying on a specific kb schema @xcite . due to the complex nature of language, the semantic meaning can be expressed in multiple surface forms. accurate and consistent retrievals, despite a change in surface form, are two fundamental traits required from llms to replace kbs. built on a manually engineered schema that dictates the possible set of entities and relations, kbs ensure factual and consistent answers @xcite . on the contrary, inconsistent factuality is reported as a widespread problem in llms, especially in autoregressive setting @xcite . probing consistent factuality. usually, factuality (accuracy) is used as a widespread metric in probing llms to check linguistic capabilities such as commonsense @xcite and reasoning @xcite . on the other hand, an increase in public access of llms requires them to consistently respond to user-specific diversities in surface forms of a query. @xcite measured consistency through paired probes. @xcite extended the work by investigating and improving the consistency of llms behavior across different factual knowledge types. our novel task and dataset. so far, the consistent factuality probing in llms has been predominantly contemporary -the existence of a subject and an object associated via a relation is coeval, i.e., a typical query from pararel dataset @xcite is -x was born in y in which subject x (person) and object y (location) are connected via relation born-in. note that the subject and object are contemporaneous; both exist simultaneously. as information keeps on getting generated, maintained and lost over time, the above formulation is insufficient in capturing the temporal association between the queried entity (subject) and expected value entity (object), therefore providing a poor representation of the overall consistent factuality of llms. to address this, we present temporally consistent factuality probe (tecfap), a novel task accompanied by a new dataset, temp-cofac. tecfap seeks to exploit the temporal association among entities via a subject-relation pair to represent temporally consistent factuality of llms. it defines the query structure in the form of @xcite . the proposed formulation expands the probe in the temporal dimension. as we observe in figure 1 , the space is three-dimensional -subject, relation, and time. since time has a directional attribute, we expect temporal association to be either in a forward or backward direction. for example, the query hybrid theory was released by linkin park just before @xcite is a forward direction probe where a key_object (hybrid theory) placed at time t is temporally associated with a value_object (meteora) in time-space at (t + 1) via a subject (linkin park) and a relation (release-by). at present, our probe is limited to only strict associations where the expected value_object is either located at (t+1) or (t -1) step in temporal space w.r.t key_object at time t. inspired by @xcite , strict association is achieved via trigger words such as immediately before, right after, soon after, etc. we observe the destitute performance of llms on tecfap metrics (defined in section 3) -temporal factuality, temporal consistency, and temporally consistent factuality are in [0.95% -3.63%], [13.28% -64.87%] and [0% to 2%] range, respectively in zero-shot setting. our proposed model. we present cotself, a temporal association of entities via a 'subject & relation' time subject relation linkin park release (t): meteora (t-1): hybrid theory (t+1): minutes to midnight (key-object) (value-object) (value-object) forward temporal association backward temporal association [linkin park released meteora just after hybrid theory] consistent-time-sensitive learning framework, built on a multi-task instruction-tuned (mt-it) framework followed by consistent-time-sensitive reinforcement learning (ctsrl) to improve temporally consistent factuality in llms. we compare cotself with several baselines and show it outperforming the best baseline @xcite by 12.7%, 10.9% and 90.4%, respectively, for temporal factuality, temporal consistency, and temporally consistent factuality. contributions. in short, we make the following contributions through this study * : • we establish the need for temporally consistent factuality in llms and propose tecfap, a novel task (section 3). we further analyze how the probabilistic space evolves under cotself (appendix a.2.4). ## the temp-cofac dataset here, we present a novel english prefix-style temp-cofac dataset with a temporal range of 1526-2022. inspired by @xcite , we semi- pi2: linkin park released mateora immediately after [___]* pi1: meteora was released by linkin park immediately after [___]* (key-obj, subject-relation(i), value-obj) pi1: linkin park released hybrid theory just before [___]* pi2: hybrid theory was released by linkin park just before [___]* forward temporal association backward temporal association entities (e) • sub-rel (1) • … • … • sub-rel (i) • t0-hybrid theory • t1-meteora • t2-minutes to midnight • t3-……………… • t4-……………… • t5-the hunting party • tj-one more light • sub-rel (m) • … • … patterns (p) • sub-rel (1) • … • … • sub-rel (i) • forward • pi1 • .. • pir • backward • pi1 • .. • pis • sub-rel (m) • … • … candidates (c) { sub-rel (1) [c1, c2,… ck] …. sub-rel (i) [a, hybrid,…, light] …. sub-rel (m) [c1, c2 … ck] } temporal association of entities via a 'subject & relation' 1 2 3 4 { linkin park, release-by } figure 2: the architectural framework of temp-cofac -(1) a set of diverse subject-relation pairs, (2) a sequence of entities which are temporally connected via a given subject-relation pair, (3) a set of paraphrase templates with a placeholder for key_object and value_object developed from subject-relation pairs, and (4) a closed vocabulary candidate set developed from possible entity space for a given subject-relation pair. automatically * curate a diverse set of base subject and relations pairs subject-relation. next, we define e i , a strict temporally ordered set of entities associated with i th subject-relation pair. an entity can act as a key_object or a value_object relative to the role of another entity positioned right next/before it. we then create base_patterns for both forward and backward directions following petroni et al. (2019). afterwards, a set of patterns p i is constructed by employing paraphrasing techniques (bhagat and hovy, 2013) on base_patterns in forward and backward directions followed by a candidate set c i . construction approach. the temp-cofac resource is constructed by three nlp experts * with a mean cross-annotator agreement of 4.84 ± 0.39 and 4.86 ± 0.49 out of 5 maximum on likert scale @xcite for factuality and consistency, respectively (refer appendix a.1 for more details). following @xcite , our construction process broadly follows a four-step procedure described in figure 2 . we pose tecfap as a sentence completion task that aligns with the general objective of an lm. with prefix style, paraphrase templates for a sub-ject_relation pair are filled with only key_object, and we expect the model to generate value_object. next, we define tecfap metrics to evaluate llms. temporal factuality and temporal consistency. we extend the metrics defined by @xcite to tecfap. the first metric, temporalfactuality, captures the accuracy of a model across the temporal direction. in contrast with their definition of exact-match accuracy, we define factuality as soft accuracy, a ratio of the number of continuous matches of words in actual and generated value_object for a sample. it helps capture the partially correct generation as well. next, we define its sub-classification across temporal directions. the forward temporal-factuality measures the accuracy in the forward temporal direction where value_object is located at t+1 time step for a given key_object at t. in backward temporal-factuality, the value_object is located at t -1 time step for a given key_object at t. the second metric is temporal-consistency. given a pair of prefix-style paraphrases for a sub-ject_relation filled with an identical key_object, an identical value_object should be generated. the metric estimate is binary (one or zero) for a given pair of such paraphrases if the model's responses are identical or different. forward and backward directions paraphrases contribute to forward and backward temporal-consistency, respectively. temporally consistent factuality. the third composite metric, temporally-consistent-factuality, is a stricter version of temporal-factuality, requiring a model to be consistent and factual across the temporal direction. it reports the temporal-factuality only if the responses are identical from all prefix-style paraphrases for a given subject_relation and key_object in a particular temporal direction. paraphrases in forward and backward directions contribute to forward and backward temporally-consistent-factuality, respectively. other metrics. the quality of patterns is measured using temporal-succ_patt, indicating the percentage of patterns yielding a correct value_object at least once during the probe. furthermore, temporal-succ_objs is introduced to measure the model's temporal knowledge by reporting the percentage of value_objects accurately generated at least once. further, we define temporal-know_cons and temporal-unk_cons as metrics to measure temporal-consistency of the fraction of patterns which generated correct value_object at least once and the fraction of patterns which never responded with a correct value_object for a subject_relation, respectively. all four metrics are then classified into forward and backward temporal directions. ## consistent-time-sensitive learning framework (cotself) equipped with the advancements in model finetuning combined with the recent baseline in temporal reasoning, we begin with a base pre-trained llm and apply supervised multi-task instructiontuning to develop a multi-task instruction-tuned (mt-it) model. subsequently, we apply time and consistency-sensitive reinforcement learning to the mt-it model to enhance its temporally consistent factuality capabilities. motivation. instruction tuning (it) @xcite is a cost-effective, efficient technique for developing specialized models, as evidenced by the parameter-efficient fine-tuning (peft) @xcite approach such as low-rank adaptation (lora) @xcite , which offers significant benefits for instruction tuning in llms within low-cost infrastructures. additionally, the combination of rl and supervised finetuning enhances model performance in several domain-specific tasks, notably temporal reasoning @xcite . furthermore, advances in multitask learning led to several breakthroughs in modeling multiple objectives simultaneously @xcite . ## experimental results experimental setup. the families of gpt-j * , falcon @xcite , and llama (touvron et al., 2023) are considered for evaluation on tecfap. primarily, we evaluate llms in an open vocabulary setting where the next token is sampled from the entire vocabulary. next, we conduct experiments in an in-context learning setup, followed by a closed vocabulary setting. finally, the cotself efficacy evaluation is conducted. figure 5 presents temporal-factuality across the temporal distribution of entities. findings reveal that temporal-factuality for entities belonging to the historical period (1500-1800) is significantly temporal-unk_cons temporal-know_cons llama [7b] llama [13b] llama2 [7b] llama2 [13b] higher, with an average of 25.27% compared to 9.08% for the entities in the contemporary period (after 1800). at the same time, the presence of multiple sources of the same information in llms pre-trained dataset for the contemporary period leads to better temporally-consistent-factuality. additionally, in figure 6 , qualitative analysis reveals that llama[7b] attains best temporal-know_cons at 43.29% with a divergence of 10.00 percentage points between known and unknown temporal consistencies across llama variants. on the other hand, 35.04% patterns yield a correct value_object at least once in contrast to only 16.18% value_objects, which were predicted correctly once in the entire probe for a model. ## error analysis a causal analysis is conducted to determine any correlation between data characteristics and failure cases. figure 8 shows a strong correlation between entity-type and temporally-consistent-factuality. entity types not exclusively attached to a subjectrelation pair, such as movie names and geographical locations, perform poorly compared to other entities, such as satellite, person, and software movie location game album person satellite software entity types 0.0 10.0 20.0 30.0 40.0 temp-fact (in %) mean [temp-fact] 0.0 5.0 10.0 15.0 temp-cons-fact (in %) mean [temp-cons-fact] names. it would be interesting to enhance both temp-cofac and ctsrl formulation to include such data characteristics explicitly. for more detail on this, readers can refer to appendix a.2.3. ## related work a noteworthy advancement in temporal factuality involves analyzing and updating llms to address the obsolescence of their factual knowledge over time @xcite . these approaches concentrate on amending the factuality of evolving temporal relationships without rectifying the current inaccuracies and inconsistencies. on the other hand, consistency in kbs was extensively studied, with developments around data and methods to benchmark the degree of inconsistencies @xcite @xcite across several tasks; qa @xcite , reading comprehension @xcite @xcite , summarizing @xcite and nli @xcite . notable works in temporal information extraction include timebank @xcite and timeeval @xcite . the annotations defined in these datasets are primarily for time-event and events relationships such as before/after. the remarkable advancement in study-ing temporal reasoning over kgs led to the development of datasets such as tequila @xcite , timequestions @xcite , and cron-quesions @xcite , probing kg's response in ranking entities for a given temporal query. subsequently, datasets like templama @xcite and streamingqa @xcite were curated for temporal reasoning in lms. the tsqa @xcite ## conclusion this paper presented a new task tecfap with a novel resource, temp-cofac, to evaluate temporally consistent factuality in large language models. the contribution continued to present a novel solution cotself based on multi-task instruction tuning (mt-it) combined with consistent-timesensitive reinforcement learning (ctsrl) to improve llms temporally consistent factuality. we observed that cotself outperforms the baselines to improve temporally-consistent-factuality in llms. the contribution and findings in this paper would help better understand and enhance llms' underlying capabilities around the tasks which require consistent temporal reasoning and deductions.