Skip to main content
QUICK REVIEW

[論文レビュー] Large Language Models (GPT) Struggle to Answer Multiple-Choice Questions about Code

Jaromír Šavelka, Arav Agarwal|arXiv (Cornell University)|Mar 9, 2023
Software Engineering Research被引用数 4
ひとこと要約

本研究では、入門的および中級的なPythonコースからのコードスニペットを含む選択肢式問題(MCQ)におけるGPTモデルのパフォーマンスを評価している。自然言語MCQでは高いパフォーマンスを示すが(正答率77.9%)、コード関連の推論タスクでは著しく困難を示し、コードを含むMCQでは正答率が59.5%にとどまり、実行トレースや論理的分析を要する問題では最も低い正答率(56.6%)を記録した。

ABSTRACT

We analyzed effectiveness of three generative pre-trained transformer (GPT) models in answering multiple-choice question (MCQ) assessments, often involving short snippets of code, from introductory and intermediate programming courses at the postsecondary level. This emerging technology stirs countless discussions of its potential uses (e.g., exercise generation, code explanation) as well as misuses in programming education (e.g., cheating). However, the capabilities of GPT models and their limitations to reason about and/or analyze code in educational settings have been under-explored. We evaluated several OpenAI's GPT models on formative and summative MCQ assessments from three Python courses (530 questions). We found that MCQs containing code snippets are not answered as successfully as those that only contain natural language. While questions requiring to fill-in a blank in the code or completing a natural language statement about the snippet are handled rather successfully, MCQs that require analysis and/or reasoning about the code (e.g., what is true/false about the snippet, or what is its output) appear to be the most challenging. These findings can be leveraged by educators to adapt their instructional practices and assessments in programming courses, so that GPT becomes a valuable assistant for a learner as opposed to a source of confusion and/or potential hindrance in the learning process.

研究の動機と目的

  • プログラミング教育におけるコードスニペットを含む選択肢式問題(MCQ)に対するGPTモデルの有効性を調査すること。
  • 特にコードの振る舞いの推論や実行を要する問題において、GPTモデルが最も困難に感じるMCQの種別を特定すること。
  • テキスト・デヴァンチーノ・001、テキスト・デヴァンチーノ・002、テキスト・デヴァンチーノ・003といった異なるGPTバージョンのコード関連の評価におけるパフォーマンスを比較すること。
  • 教育者によるGPTツールをプログラミング指導および評価に責任を持って統合するための実証的知見を提供すること。
  • 特に実行トレースや論理的性質に関するプログラム意味論の推論における大規模言語モデル(LLM)の限界を理解する基盤を構築すること。

提案手法

  • 3つの大学レベルのPythonコースから530問のMCQを収集し、手作業で分類・整理した。
  • 問題の認知的要請に基づき、真偽、出力予測、穴埋めなど、種別に分類した。
  • ゼロショットプロンプティングを用いて、同じMCQセットに対して3つのGPTモデル(text-davinci-001, text-davinci-002, text-davinci-003)を評価した。
  • 正確一致とジャカード類似度を測定指標とし、ランダムな推測のベースラインとして23.4%のジャカード類似度を設定した。
  • 一貫性のあるラベル付けと信頼性の高いパフォーマンス測定を確保するため、パターンマッチングと手動による検証を実施した。
  • 実行シミュレーションや意図の推論といった認知的課題を特定するため、問題種別ごとのパフォーマンス差を分析した。
Figure 1: The upper-left screenshot depicts a conversation with ChatGPT when asked to explain a code snippet line by line. It correctly explains the bahavior (1). The lower-right shows a conversation with ChatGPT when asked to generate the code snippet with the same behavior. The generated code is c
Figure 1: The upper-left screenshot depicts a conversation with ChatGPT when asked to explain a code snippet line by line. It correctly explains the bahavior (1). The lower-right shows a conversation with ChatGPT when asked to generate the code snippet with the same behavior. The generated code is c

実験結果

リサーチクエスチョン

  • RQ1コードスニペットを含むMCQと自然言語のみのMCQとの間で、GPTモデルのパフォーマンスに有意差があるか?
  • RQ2出力予測、真偽、穴埋めなど、コードの振る舞いに関する推論を要するMCQのうち、どの種別がGPTモデルにとって最も困難か?
  • RQ3新しいGPTモデル(例:text-davinci-003)は、古いバージョン(例:text-davinci-001)と比較して、コード関連の推論タスクでどのようにパフォーマンスを発揮するか?
  • RQ4GPTモデルがコード実行のシミュレーションやプログラム振るまいの推論をどれほど正しく行えないか、その影響が正答率にどのように現れるか?

主な発見

  • 最も能力の高いGPTモデル、text-davinci-003は、530問のMCQに対して全体で65.5%の正答率を達成し、23.4%のジャカード類似度というランダム推測のベースラインを著しく上回った。
  • コードスニペットを含むMCQは59.5%の正答率で、自然言語のみのMCQの77.9%に比べて著しく低い水準であった。
  • 穴埋めや文の完成問題は最も成功しやすく(正答率87.1%)、強力なパターンマッチングおよび文の完成能力を示した。
  • 出力の予測や実行に関する真偽判断を要するコードの振るまいに関する推論を要するMCQは、わずか56.6%の正答率にとどまり、実行シミュレーションにおける根本的な限界を示した。
  • コードと非コードMCQの間のパフォーマンス格差は、GPTモデルが制御構造やデータフローの精神的シミュレーションに困難を示している可能性を示しており、コードの説明や生成は正しくできても、実行トレースに基づく推論には失敗することが明らかになった。
  • コードの説明や生成では高いパフォーマンスを示すが、トレースに基づく推論を要するタスクでは失敗するため、GPTモデルはコードの機能的意味論に対する理解に深刻なギャップを有していることが浮き彫りになった。
Figure 2: Distribution of MCQs into categories. Note that the MCQs asking about the output of a code snippet as well as MCQs focused on filling-in the blanks in a snippet are not present in the MCQs with no code. This is to be expected given the nature of those questions. The MCQs with code are quit
Figure 2: Distribution of MCQs into categories. Note that the MCQs asking about the output of a code snippet as well as MCQs focused on filling-in the blanks in a snippet are not present in the MCQs with no code. This is to be expected given the nature of those questions. The MCQs with code are quit

より良い研究を、今すぐ始めましょう

論文の読解から最終レビューまで、研究時間を劇的に削減しましょう。

クレジットカード登録不要

このレビューはAIが作成し、人間の編集者が確認しました。