SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2310.08256 · 2023

Impact of Co-occurrence on Factual Knowledge of Large Language Models

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 5 functions out of this paper's own repositories and ran 3 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
cheongwoong/impact_of_cooccurrence canonical 3 of 5
FunctionStatusWhere it lives
get_masks_for_baseline Ran cheongwoong/impact_of_cooccurrence/src/utils/evaluation.py
code served (permissive licence) · get_code("6b674ce8cc2cbafd")
is_pure_alphanumeric Ran cheongwoong/impact_of_cooccurrence/src/data_statistics/precompute/extract_entity_set.py
code served (permissive licence) · get_code("1b79f5ed386cf90e")
postprocess_single_prediction_for_baseline Ran cheongwoong/impact_of_cooccurrence/src/utils/evaluation.py
code served (permissive licence) · get_code("c3a69f7597cbf30f")
filtering Not yet run cheongwoong/impact_of_cooccurrence/src/utils/text_processing.py
code served (permissive licence) · get_code("91161371fcb17d46")
text_normalization_without_lemmatization Not yet run cheongwoong/impact_of_cooccurrence/src/utils/text_processing.py
code served (permissive licence) · get_code("bf4d06c6c913353a")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Large language models (LLMs) often make factually incorrect responses despite their success in various applications. In this paper, we hypothesize that relying heavily on simple co-occurrence statistics of the pre-training corpora is one of the main factors that cause factual errors. Our results reveal that LLMs are vulnerable to the co-occurrence bias, defined as preferring frequently co-occurred words over the correct answer. Consequently, LLMs struggle to recall facts whose subject and object rarely co-occur in the pre-training dataset although they are seen during finetuning. We show that co-occurrence bias remains despite scaling up model sizes or finetuning. Therefore, we suggest finetuning on a debiased dataset to mitigate the bias by filtering out biased samples whose subject-object co-occurrence count is high. Although debiased finetuning allows LLMs to memorize rare facts in the training set, it is not effective in recalling rare facts unseen during finetuning. Further research in mitigation will help build reliable language models by preventing potential errors. The code is available at \url{https://github.com/CheongWoong/impact_of_cooccurrence}.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2310.08256")
get_code_for_paper("2310.08256")
have("2310.08256")

Connect an agent — have() is free.