Quantifying Semantic Emergence in Language Models

Hang Chen, Xinyu Yang, Jiaying Zhu, Wenya Wang
5/21/2024
cs.CLcs.AI

No official code found. Best implementation: Zodiark-ch/Emergence-of-LLMs (7 stars, MIT, last commit 2024-05-27).

Abstract

Large language models (LLMs) are widely recognized for their exceptional capacity to capture semantics meaning. Yet, there remains no established metric to quantify this capability. In this work, we introduce a quantitative metric, Information Emergence (IE), designed to measure LLMs' ability to extract semantics from input tokens. We formalize ``semantics'' as the meaningful information abstracted from a sequence of tokens and quantify this by comparing the entropy reduction observed for a sequence of tokens (macro-level) and individual tokens (micro-level). To achieve this, we design a lightweight estimator to compute the mutual information at each transformer layer, which is agnostic to different tasks and language model architectures. We apply IE in both synthetic in-context learning (ICL) scenarios and natural sentence contexts. Experiments demonstrate informativeness and patterns about semantics. While some of these patterns confirm the conventional prior linguistic knowledge, the rest are relatively unexpected, which may provide new insights.

View on arXivView PDF

Code Implementations(1)

MIT
72PythonMay 13, 20242 years agoMIT

Similar Papers

Cite this paper

@article{chen2024quantifying,
  title  = {Quantifying Semantic Emergence in Language Models},
  author = {Hang Chen and Xinyu Yang and Jiaying Zhu and Wenya Wang},
  year   = {2024},
  eprint = {2405.12617},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2405.12617v2}
}

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.12617.svg)](https://codeofpaper.com/paper/2405.12617)

Discussion