Quantifying In-Context Reasoning Effects and Memorization Effects in LLMs

Siyu Lou, Yuntian Chen, Xiaodan Liang, Liang Lin, Quanshi Zhang
5/20/2024
cs.LGcs.AIcs.CL

No confident code implementation found for this paper.

Abstract

In this study, we propose an axiomatic system to define and quantify the precise memorization and in-context reasoning effects used by the large language model (LLM) for language generation. These effects are formulated as non-linear interactions between tokens/words encoded by the LLM. Specifically, the axiomatic system enables us to categorize the memorization effects into foundational memorization effects and chaotic memorization effects, and further classify in-context reasoning effects into enhanced inference patterns, eliminated inference patterns, and reversed inference patterns. Besides, the decomposed effects satisfy the sparsity property and the universal matching property, which mathematically guarantee that the LLM's confidence score can be faithfully decomposed into the memorization effects and in-context reasoning effects. Experiments show that the clear disentanglement of memorization effects and in-context reasoning effects enables a straightforward examination of detailed inference patterns encoded by LLMs.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{lou2024quantifying,
  title  = {Quantifying In-Context Reasoning Effects and Memorization Effects in LLMs},
  author = {Siyu Lou and Yuntian Chen and Xiaodan Liang and Liang Lin and Quanshi Zhang},
  year   = {2024},
  eprint = {2405.11880},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2405.11880v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2405.11880.svg)](https://codeofpaper.com/paper/2405.11880)

Discussion