Is Next Token Prediction Sufficient for GPT? Exploration on Code Logic Comprehension
Not on the map. Why?
Abstract (arXiv)
Large language models (LLMs) has experienced exponential growth, they demonstrate remarkable performance across various tasks. Notwithstanding, contemporary research primarily centers on enhancing the size and quality of pretraining data, still utilizing the next token prediction task on autoregressive transformer model structure. The efficacy of this task in truly facilitating the model's comprehension of code logic remains questionable, we speculate that it still interprets code as mere text, while human emphasizes the underlying logical knowledge. In order to prove it, we introduce a new task, "Logically Equivalent Code Selection," which necessitates the selection of logically equivalent code from a candidate set, given a query code. Our experimental findings indicate that current LLMs underperform in this task, since they understand code by unordered bag of keywords. To ameliorate their performance, we propose an advanced pretraining task, "Next Token Prediction+". This task aims to modify the sentence embedding distribution of the LLM without sacrificing its generative capabilities. Our experimental results reveal that following this pretraining, both Code Llama and StarCoder, the prevalent code domain pretraining models, display significant improvements on our logically equivalent code selection task and the code completion task.
Key facts. Cited by 6 papers in the map (data through 14 Oct 2026). Builds on 21 of its 30 references that are in the map. First posted on arXiv 13 Apr 2024.
Builds on
21 of 30 references.
References · 21
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2019BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehensioncited by 5,893
- 2023Code Llama: Open Foundation Models for Codecited by 2,139
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
- 2021GLM: General Language Model Pretraining with Autoregressive Blank Infillingcited by 1,031
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 906
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 744
- 2023WizardCoder: Empowering Code Large Language Models with Evol-Instructcited by 733
- 2022GPT-NeoX-20B: An Open-Source Autoregressive Language Modelcited by 713
- 2021Unified Pre-training for Program Understanding and Generationcited by 366
9 more
- 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 361
- 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 333
- 2022Efficient Training of Language Models to Fill in the Middlecited by 255
- 2020IntelliCode Compose: Code Generation Using Transformercited by 227
- 2021CodeNet: A Large-Scale AI for Code Dataset for Learning a Diversity of Coding Taskscited by 200
- 2023InferFix: End-to-End Program Repair with LLMscited by 114
- 2021DOBF: A Deobfuscation Pre-Training Objective for Programming Languagescited by 68
- 2019Learning and Evaluating Contextual Embedding of Source Codecited by 33
- 2022Syntax-Aware On-the-Fly Code Completioncited by 10
Built on by
Citing papers per year: 2024: 2; 2025: 3; 2026: 1.
6 papers.
- 2024How Far Are We From AGI: Are LLMs All We Need?cited by 31
- 2025The Hidden Cost of Readability: How Code Formatting Silently Consumes Your LLM Budgetcited by 12
- 2024Learning to Play Atari in a World of Tokenscited by 6
- 2025Thinking Beyond Tokens: From Brain-Inspired Intelligence to Cognitive Foundations for Artificial General Intelligence and its Societal Impactcited by 6
- 2026LLM Agents Predict Social Media Reactions but Do Not Outperform Text Classifiers: Benchmarking Simulation Accuracy Using 120K+ Personas of 1511 Humanscited by 1
- 2025Structure-Aware Corpus Construction and User-Perception-Aligned Metrics for Large-Language-Model Code Completioncited by 0
- 2026LLM Agents Predict Social Media Reactions but Do Not Outperform Text Classifiers: Benchmarking Simulation Accuracy Using 120K+ Personas of 1511 Humans31 Mar 2026
- 2025The Hidden Cost of Readability: How Code Formatting Silently Consumes Your LLM Budget19 Aug 2025
- 2025Thinking Beyond Tokens: From Brain-Inspired Intelligence to Cognitive Foundations for Artificial General Intelligence and its Societal Impact1 Jul 2025
- 2025Structure-Aware Corpus Construction and User-Perception-Aligned Metrics for Large-Language-Model Code Completion19 May 2025
- 2024Learning to Play Atari in a World of Tokens3 Jun 2024
- 2024How Far Are We From AGI: Are LLMs All We Need?16 May 2024