Saved in:
Bibliographic Details
Main Authors: Wang, Zijian, Xu, Chang
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2504.14496
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866910915223355392
author Wang, Zijian
Xu, Chang
author_facet Wang, Zijian
Xu, Chang
contents Pre-trained transformer large language models (LLMs) demonstrate strong knowledge recall capabilities. This paper investigates the knowledge recall mechanism in LLMs by abstracting it into a functional structure. We propose that during knowledge recall, the model's hidden activation space implicitly entails a function execution process where specific activation vectors align with functional components (Input argument, Function body, and Return values). Specifically, activation vectors of relation-related tokens define a mapping function from subjects to objects, with subject-related token activations serving as input arguments and object-related token activations as return values. For experimental verification, we first design a patching-based knowledge-scoring algorithm to identify knowledge-aware activation vectors as independent functional components. Then, we conduct counter-knowledge testing to examine the independent functional effects of each component on knowledge recall outcomes. From this functional perspective, we improve the contextual knowledge editing approach augmented by activation patching. By rewriting incoherent activations in context, we enable improved short-term memory retention for new knowledge prompting.
format Preprint
id arxiv_https___arxiv_org_abs_2504_14496
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Functional Abstraction of Knowledge Recall in Large Language Models
Wang, Zijian
Xu, Chang
Computation and Language
Pre-trained transformer large language models (LLMs) demonstrate strong knowledge recall capabilities. This paper investigates the knowledge recall mechanism in LLMs by abstracting it into a functional structure. We propose that during knowledge recall, the model's hidden activation space implicitly entails a function execution process where specific activation vectors align with functional components (Input argument, Function body, and Return values). Specifically, activation vectors of relation-related tokens define a mapping function from subjects to objects, with subject-related token activations serving as input arguments and object-related token activations as return values. For experimental verification, we first design a patching-based knowledge-scoring algorithm to identify knowledge-aware activation vectors as independent functional components. Then, we conduct counter-knowledge testing to examine the independent functional effects of each component on knowledge recall outcomes. From this functional perspective, we improve the contextual knowledge editing approach augmented by activation patching. By rewriting incoherent activations in context, we enable improved short-term memory retention for new knowledge prompting.
title Functional Abstraction of Knowledge Recall in Large Language Models
topic Computation and Language
url https://arxiv.org/abs/2504.14496