mlsanityData to 14 Oct 2026

Statistical investigations into the geometry and homology of random programs

arXiv 2407.04854 ↗First posted 5 Jul 2024cs.CLcited by 0

Not on the map. Why?

Abstract (arXiv)

AI-supported programming has taken giant leaps with tools such as Meta's Llama and openAI's chatGPT. These are examples of stochastic sources of programs and have already greatly influenced how we produce code and teach programming. If we consider input to such models as a stochastic source, a natural question is, what is the relation between the input and the output distributions, between the chatGPT prompt and the resulting program? In this paper, we will show how the relation between random Python programs generated from chatGPT can be described geometrically and topologically using Tree-edit distances between the program's syntax trees and without explicit modeling of the underlying space. A popular approach to studying high-dimensional samples in a metric space is to use low-dimensional embedding using, e.g., multidimensional scaling. Such methods imply errors depending on the data and dimension of the embedding space. In this article, we propose to restrict such projection methods to purely visualization purposes and instead use geometric summary statistics, methods from spatial point statistics, and topological data analysis to characterize the configurations of random programs that do not rely on embedding approximations. To demonstrate their usefulness, we compare two publicly available models: ChatGPT-4 and TinyLlama, on a simple problem related to image processing. Application areas include understanding how questions should be asked to obtain useful programs; measuring how consistently a given large language model answers; and comparing the different large language models as a programming assistant. Finally, we speculate that our approach may in the future give new insights into the structure of programming languages.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 6 of its 20 references that are in the map. First posted on arXiv 5 Jul 2024.

Builds on

6 of 20 references.

References · 6

  1. 2023GPT-4 Technical Reportcited by 18,396
  2. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
  3. 2015Neural Machine Translation of Rare Words with Subword Unitscited by 2,918
  4. 2018SentencePiece: A simple and language independent subword tokenizer and detokenizer for Neural Text Processingcited by 1,989
  5. 2024TinyLlama: An Open-Source Small Language Modelcited by 618
  6. 2017An introduction to Topological Data Analysis: fundamental and practical aspects for data scientistscited by 172

Built on by

Not cited yet.