logo SBA

ETD

Archivio digitale delle tesi discusse presso l’Università di Pisa

Tesi etd-09282026-115154


Tipo di tesi
Tesi di laurea magistrale
Autore
CARRERA, STEFANO
URN
etd-09282026-115154
Titolo
Breaking the Curse of Recursion: Temperature as a Regularizer Against Model Collapse in Code Generation
Dipartimento
INFORMATICA
Corso di studi
DATA SCIENCE AND BUSINESS INFORMATICS
Relatori
.
relatore Prof. Pappalardo, Luca
relatore Dott. Gambetta, Daniele
Parole chiave
  • AI autophagy
  • code generation
  • fully synthetic loop
  • inference temperature
  • large language models
  • model collapse
  • predictive entropy
  • synthetic data
Data inizio appello
15/10/2026
Consultabilità
Non consultabile
Data di rilascio
15/10/2029
Riassunto (Inglese)
The proliferation of Large Language Models (LLMs) has led to an influx of AI-generated content across the internet, sparking critical concerns about the AI autophagy loop, the recursive training of future models on synthetic data. While Model Collapse is widely documented in natural language and vision as a catastrophic loss of diversity, its impact on deterministic programming languages remains largely unexplored. This thesis investigates a fully synthetic AI autophagy loop in LLMs trained for Python code generation. Using the Qwen3 architecture (4B and 8B parameters) evaluated on the HumanEval benchmark, model performance is tracked across ten recursive generations under varying inference temperatures. Contrary to prevailing assumptions, empirical findings demonstrate that degradation in code generation is highly conditional. A critical temperature threshold is identified: at low temperatures (T ≤ 1.0), recursive training acts as an iterative regularizer, preserving or even improving functional correctness. Although lexical diversity (e.g., Type-Token Ratio) declines, structural and predictive entropy analyses indicate this stems from syntactic standardization and software best practices rather than degenerative collapse. Conversely, higher stochasticity (T > 1.0) triggers rapid functional failure. Ultimately, this work challenges the direct translation of natural language evaluation paradigms to formal languages. By redefining the symptoms of Model Collapse for the programming domain, it is concluded that the AI autophagy loop can actually be harnessed to refine code generation capabilities, provided that inference stochasticity is strictly controlled.
Riassunto (Italiano)
File