Bigram Knowledge Extraction from GPT-2

We propose a method to extract bigram knowledge from GPT-2 models. Based on the observation that the first layer in GPT-2 is useful to predict the tokens next to the given input tokens, we propose an algorithm to use self attention heads only from the first layer to predict the next tokens. We also propose an algorithm to find contextual words that are highly related to a given bigram by applying the backpropagation method to GPT-2 parameters for the next-token prediction. Experimental results showed that our proposed algorithms to predict next words and to induce context words showed the higher average precision values than the baseline methods.

Authors

Institutions

Publication Details

Journal
Transactions of the Japanese Society for Artificial Intelligence
Published
2025-05-01
DOI
https://doi.org/10.1527/tjsai.40-3_a-o65
Primary Topic
Topic Modeling
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Bigram Knowledge Extraction from GPT-2

Minoru Yoshida, Kazuyuki Matsumoto
Transactions of the Japanese Society for Artificial Intelligence
Topic Modeling
article

Bigram Knowledge Extraction from GPT-2

Minoru Yoshida, Kazuyuki Matsumoto
article en

Abstract

We propose a method to extract bigram knowledge from GPT-2 models. Based on the observation that the first layer in GPT-2 is useful to predict the tokens next to the given input tokens, we propose an algorithm to use self attention heads only from the first layer to predict the next tokens. We also propose an algorithm to find contextual words that are highly related to a given bigram by applying the backpropagation method to GPT-2 parameters for the next-token prediction. Experimental results showed that our proposed algorithms to predict next words and to induce context words showed the higher average precision values than the baseline methods.

Transactions of the Japanese Society for Artificial IntelligenceVol. 40(3)
Tokushima University (JP)
Openalex Percentile: Top 96%
Topic Modeling
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.