Publication Date
Spring 2026
Degree Type
Master's Project
Degree Name
Master of Science in Computer Science (MSCS)
Department
Computer Science
First Advisor
Amith Kamath Belman
Second Advisor
Navrati Saxena
Third Advisor
Nada Attar
Keywords
Small Language Models, Program Synthesis, Adaptive Dynamic Weighting, Automated Debugging, Cognitive Harness, Software Reliability
Abstract
In this paper, we describe the Cognitive Harness Architecture for remediating the stochastic brittleness of small language models (SLM), as they are used for automated programming synthesis. Large-scale models dominate the cur- rent programming environment, and SLMs will continue to play an important role in edge-deployed and pedagogical environments because they lack the re- sources to minimize instruction drift and meta-cognitive collapse. Our project proposes a system-wide, multi-stage pipeline, that transfers the reliability challenge away from the model itself and towards deterministic scaffolding external to the model. We employ Adaptive Dynamic Weighting (ADW), which attaches the model’s attention to a hierarchical YAML blueprint, to regularize hallucinated outputs into standard repairable ‘near-misses.’ The combined ADW and Automated Debugging (ADB) controller processes these near-misses using a deterministic heuristic loop that computes execution tracebacks and maps them to hard-coded pedagogical recipes. Our evaluation of the Qwen2.5-Coder-0.5B model on the HumanEval bench- mark shows a remarkable 59.1% functional correctness rate from the ADW ∪ ADB combined pipeline, representing an absolute +19.5% gain over the zero-shot baseline. Additionally, our neural ablation study shows that adding secondary machine learning classifiers (i.e., ECNN/GEPN) creates a Semantic Bottleneck, because they introduce a negatively proportional flattening of the modeled structure, ultimately resulting in a degradation of performance compared to rigid heuristics. Our results demonstrate that the reliability of operating in a resource-constrained environment is a property of a system, not of the model, and that the most productive means for achieving reliable reasoning in the sub- 1B parameter regime is through the employment of deterministic scaffolding.
Recommended Citation
Tripathy, Sakshi Sanskruti, "A Modular Enhancement Pipeline to Improve Code Generation in Small Language Models" (2026). Master's Projects. 1831.
DOI: https://doi.org/10.31979/etd.55t9-3u89
https://scholarworks.sjsu.edu/etd_projects/1831