mlsanityData to 7 Oct 2026

GALLa: Graph Aligned Large Language Models for Improved Source Code Understanding

arXiv 2409.04183 ↗First posted 6 Sep 2024cs.CL cs.AIcited by 7

On the map: LLM alignment / RLHF / preference optimisation → LLM preference optimization methods

Abstract (arXiv)

Programming languages possess rich semantic information - such as data flow - that is represented by graphs and not available from the surface form of source code. Recent code language models have scaled to billions of parameters, but model source code solely as text tokens while ignoring any other structural information. Conversely, models that do encode structural information of code make modifications to the Transformer architecture, limiting their scale and compatibility with pretrained LLMs. In this work, we take the best of both worlds with GALLa - Graph Aligned Large Language Models. GALLa utilizes graph neural networks and cross-modal alignment technologies to inject the structural information of code into LLMs as an auxiliary task during finetuning. This framework is both model-agnostic and task-agnostic, as it can be applied to any code LLM for any code downstream task, and requires the structural graph data only at training time from a corpus unrelated to the finetuning data, while incurring no cost at inference time over the baseline LLM. Experiments on five code tasks with seven different baseline LLMs ranging in size from 350M to 14B validate the effectiveness of GALLa, demonstrating consistent improvement over the baseline, even for powerful models such as LLaMA3 and Qwen2.5-Coder.

Key facts. Cited by 7 papers in the map (data through 7 Oct 2026). Placed in LLM preference optimization methods, one of 10 directions in LLM alignment / RLHF / preference optimisation. Builds on 31 of its 41 references that are in the map. First posted on arXiv 6 Sep 2024.

Builds on

31 of 41 references.

References · 31

  1. 2017Attention Is All You Needcited by 59,932
  2. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
  3. 2024The Llama 3 Herd of Modelscited by 14,192
  4. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
  5. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  6. 2023Visual Instruction Tuningcited by 7,792
  7. 2020Scaling Laws for Neural Language Modelscited by 6,411
  8. 2022Scaling Instruction-Finetuned Language Modelscited by 2,997
  9. 2023MiniGPT-4: Enhancing Vision-Language Understanding with Advanced Large Language Modelscited by 2,689
  10. 2023Qwen-VL: A Versatile Vision-Language Model for Understanding, Localization, Text Reading, and Beyondcited by 2,179
  11. 2023Code Llama: Open Foundation Models for Codecited by 2,105
  12. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
19 more
  1. 2019ZeRO: Memory Optimizations Toward Training Trillion Parameter Modelscited by 1,278
  2. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,154
  3. 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
  4. 2023StarCoder: may the source be with you!cited by 790
  5. 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
  6. 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
  7. 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 355
  8. 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 327
  9. 2024DeepSeek-Coder-V2: Breaking the Barrier of Closed-Source Models in Code Intelligencecited by 325
  10. 2021CodeNet: A Large-Scale AI for Code Dataset for Learning a Diversity of Coding Taskscited by 199
  11. 2021MagNet: A Neural Network for Directed Graphscited by 104
  12. 2021SynCoBERT: Syntax-Guided Multi-Modal Contrastive Pre-Training for Code Representationcited by 63
  13. 2023Unifying the Perspectives of NLP and Software Engineering: A Survey on Language Models for Codecited by 62
  14. 2022Code Translation with Compiler Representationscited by 42
  15. 2021TreeBERT: A Tree-Based Pre-Trained Model for Programming Languagecited by 40
  16. 2022SPT-Code: Sequence-to-Sequence Pre-Training for Learning Source Code Representationscited by 35
  17. 2022StructCoder: Structure-Aware Transformer for Code Generationcited by 33
  18. 2023CodeFuse-13B: A Pretrained Multi-lingual Code Large Language Modelcited by 14
  19. 2024DUPLEX: Dual GAT for Complex Embedding of Directed Graphscited by 7

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 6; 2026: 1.

7 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026Deep Graph-Language Fusion for Structure-Aware Code Generation ↗
  2. 2024Enhance Graph Alignment for Large Language Models
  3. 2026Teaching LLMs to See Graphs: Unifying Text and Structural Reasoning
  4. 2026A Unified Graph Language Model for Multi-Domain Multi-Task Graph Alignment Instruction Tuning
  5. 2025Scalability Matters: Overcoming Challenges in InstructGLM with Similarity-Degree-Based Sampling
  6. 2023Large Language Models on Graphs: A Comprehensive Survey
  7. 2024CodeGRAG: Bridging the Gap between Natural Language and Programming Language via Graphical Retrieval Augmented Generation
  8. 2025A Code Comprehension Benchmark for Large Language Models for Code