mlsanityData to 14 Oct 2026

A new approach for encoding code and assisting code understanding

arXiv 2408.00521 ↗First posted 1 Aug 2024cs.AIcited by 0

On the map: LLM reasoning → Reasoning for agents, planning and code

Abstract (arXiv)

Some companies (e.g., Microsoft Research and Google DeepMind) have discovered some of the limitations of GPTs' autoregressive paradigm next-word prediction, manifested in the model's lack of planning, working memory, backtracking, and reasoning skills. GPTs rely on a local and greedy process of generating the next word, without a global understanding of the task or the output. We have confirmed the above limitations through specialized empirical studies of code comprehension. Although GPT-4 is good at producing fluent and coherent text, it cannot handle complex logic and generate new code that hasn't been seen, and it relies too much on the formatting of the prompt to generate the correct code. We propose a new paradigm for code understanding that goes beyond the next-word prediction paradigm, inspired by the successful application of diffusion techniques to image generation (Dalle-2, Sora) and protein structure generation (AlphaFold-3), which have no autoregressive constraints. Instead of encoding the code in a form that mimics natural language, we encode the code as a heterogeneous image paradigm with a memory of global information that mimics both images and protein structures. We then refer to Sora's CLIP upstream text-to-image encoder model to design a text-to-code encoder model that can be applied to various downstream code understanding tasks. The model learns the global understanding of code under the new paradigm heterogeneous image, connects the encoding space of text and code, and encodes the input of text into the vector of code most similar to it. Using self-supervised comparative learning on 456,360 text-code pairs, the model achieved a zero-shot prediction of new data. This work is the basis for future work on code generation using diffusion techniques under a new paradigm to avoid autoregressive limitations.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. Builds on 17 of its 26 references that are in the map. First posted on arXiv 1 Aug 2024.

Builds on

17 of 26 references.

References · 17

  1. 2017Attention Is All You Needcited by 60,361
  2. 2015Deep Residual Learning for Image Recognitioncited by 52,096
  3. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  4. 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,744
  5. 2020Language Models are Few-Shot Learnerscited by 32,419
  6. 2020Denoising Diffusion Probabilistic Modelscited by 21,076
  7. 2022Training language models to follow instructions with human feedbackcited by 15,971
  8. 2015Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shiftcited by 7,005
  9. 2022Hierarchical Text-Conditional Image Generation with CLIP Latentscited by 6,585
  10. 2022Scalable Diffusion Models with Transformerscited by 6,054
  11. 2015Delving Deep into Rectifiers: Surpassing Human-Level Performance on ImageNet Classificationcited by 3,611
  12. 2023Sparks of Artificial General Intelligence: Early experiments with GPT-4cited by 2,592
5 more
  1. 2020Contrastive Learning of Medical Visual Representations from Paired Images and Textcited by 641
  2. 2020VirTex: Learning Visual Representations from Textual Annotationscited by 339
  3. 2020Learning Visual Representations with Caption Annotationscited by 123
  4. 2016Learning Visual N-Grams from Web Datacited by 95
  5. 2024Premise Order Matters in Reasoning with Large Language Modelscited by 72

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2025Dream-Coder 7B: An Open Diffusion Language Model for Code
  2. 2026Beyond the Autoregressive Horizon: A Comprehensive Survey of Diffusion Models, World Modelling, and State Space Models for Code
  3. 2026Seeing is Coding: On the Effectiveness of Vision Language Models in Code Understanding
  4. 2025DeepCode: Open Agentic Coding
  5. 2024Assessing Code Generation with Intermediate Languages
  6. 2026DreamOn: Diffusion Language Models For Code Infilling Beyond Fixed-size Canvas
  7. 2026Autoregressive Mosaics: Probing 2D Spatial Reasoning in Text-Only Language Models
  8. 2025A Code Comprehension Benchmark for Large Language Models for Code