A Matter of Representation: Towards Graph-Based Abstract Code Generation

Nyx Iskandar, Hisham Bedri, Andy Tsen
10/15/2025
cs.CL

No official code found. Best implementation: xyntechx/graph-abstract-code-gen (1 star, MIT, last commit 2025-10-16).

Abstract

Most large language models (LLMs) today excel at generating raw, sequential code with minimal abstractions and custom structures. However, there has been little work on graph-based abstract code generation, where significant logic is encapsulated in predefined nodes and execution flow is determined by edges. This is relevant for visual programming languages, and in cases where raw source code is inaccessible to users and LLM training sets. In this work, we propose and evaluate JSON representations for graphs to enable high accuracy graph-based abstract code generation. We evaluate these representations on ScratchTest, a mini-benchmark based on our custom Python re-implementation of Scratch, which tests the LLM in code graph space. Our findings demonstrate that LLMs can indeed perform the aforementioned generation task in a single pass without relying on specialized or complex pipelines, given the correct graph representations. We also show that different representations induce significantly different accuracies, highlighting the instrumental role of representations in this generation task. All in all, this work establishes the first steps towards representation learning for graph-based abstract code generation.

View on arXivView PDF

Code Implementations(1)

MIT

[NeurIPS 2025 DL4C Workshop] A Matter of Representation: Towards Graph-Based Abstract Code Generation

10PythonOct 1, 20251 years agoMIT

Similar Papers

Cite this paper

@article{iskandar2025matter,
  title  = {A Matter of Representation: Towards Graph-Based Abstract Code Generation},
  author = {Nyx Iskandar and Hisham Bedri and Andy Tsen},
  year   = {2025},
  eprint = {2510.13163},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2510.13163v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2510.13163.svg)](https://codeofpaper.com/paper/2510.13163)

Discussion