Transactions of the Japanese Society for Artificial Intelligence
Online ISSN : 1346-8030
Print ISSN : 1346-0714
ISSN-L : 1346-0714
Original Paper
Bigram Knowledge Extraction from GPT-2
Minoru YoshidaKazuyuki Matsumoto
Author information
JOURNAL FREE ACCESS

2025 Volume 40 Issue 3 Pages A-O65_1-23

Details
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.

Content from these authors
© JSAI (The Japanese Society for Artificial Intelligence)
Next article
feedback
Top