Conceptual illustration of AI self-rewriting. AI-generated image by Inside Telecom. Researchers have demonstrated that an artificial intelligence (AI) language model can diagnose its own failures and modify its internal weights to improve performance without conventional retraining. The experiment offers a possible new way to maintain AI systems, but leaves open questions about reliability, cost and safety.
The study, Language Models Can Rewrite Their Own Weights, describes experiments using Qwen3.5-27B, an open model with 27 billion parameters. Researchers affiliated with the University of Illinois Urbana-Champaign, Carnegie Mellon, Rutgers, Princeton, Stanford and Yale report a 6.6-percentage-point improvement on 490 previously unseen mathematical problems.
The work follows advances in AI-assisted software diagnosis, including an AI agent finding a Java vulnerability, previously covered by Inside Telecom. Instead of examining external software, the new experiment directs the diagnostic process toward the model itself.
How AI self-rewriting works
Self-rewriting allows a model to change the numerical parameters that govern its behavior. Unlike conventional training, the experiment did not use gradients, which normally guide parameter updates, or a separate, more capable model to make the changes.
The researchers provided the model with a Python environment containing its weights, graded answers to practice problems and the ability to run itself before and after an edit. The model examined its internal states, wrote code to modify its weights and tested the proposed changes before deciding whether to submit them.
The approach also differs from inference-time techniques, which can improve an answer without changing the underlying weights. A successful self-rewrite persists in the edited model rather than requiring the same intervention each time it responds.

Why the model became more accurate
The strongest edit raised accuracy from 57.2% to 63.8% on 490 held-out mathematical problems. The researchers found that the model identified repetitive output as a major source of failure: some responses continued until they reached the token limit without producing a final answer.
After the edit, the proportion of responses cut off at the limit fell from 33.6% to 26.1%. In one example, the unedited model repeated the same sentence 549 times and failed to answer; the edited version solved the same problem in 5,341 tokens.

In the first eight sealed sessions, the model submitted three edits and withdrew five. Each session started from the base weights, not from a previously edited model. The three accepted edits achieved 57.8%, 61.3% and 63.8% accuracy, compared with the 57.2% baseline. These results demonstrate the value of testing and rejecting changes, not cumulative self-improvement.
For developers, the distinction matters: an improvement on a particular benchmark does not establish a general increase in intelligence. The model was operating within an environment and evaluation procedure designed by researchers, rather than independently deciding when and how to learn in production.
Can an AI model repair a damaged copy?
The researchers also tested whether the model could restore a deliberately damaged copy of itself. They overwrote eight rows of a weight matrix with noise, severely reducing the copy’s performance, and asked the model to identify the corruption without providing the original values.
The model examined 112 matrices, located the damaged matrix and generated replacement values. Its diagnosis was: “Layer 30’s down_proj has an extreme 1397x outlier.” On text-based mathematics tasks, the damaged copy improved from 0.0% to 33.0% accuracy. The repair was then evaluated on image tasks that had not been used to find it.

Across six image benchmarks, accuracy rose from 7.3% to 70.2%, equivalent to 83% of the undamaged model’s accuracy of 84.3%. The result suggests that repairing a particular internal fault can restore capabilities beyond the tasks used to diagnose it. It does not establish that arbitrary model damage can be repaired in the same way.
Model size and the limits of self-improvement
The ability was not consistent across model sizes. Under the same experimental setup, the two-billion-parameter model made no edit, while the four-billion- and nine-billion-parameter models introduced changes that reduced their accuracy to zero. Only the 27-billion-parameter model improved its own performance and repaired the damaged copy.

The findings indicate that the ability to reason about internal model behavior may be important for successful self-rewriting. However, the experiments cover one model family, so they do not establish a universal size threshold or prove that larger models will always be better at modifying themselves.
What self-rewriting could mean for AI development
The method could offer developers another option for correcting targeted failures after a model has been trained. The authors report that the sessions behind the largest gains took a few hours on a single graphics processing unit (GPU), using forward passes rather than a conventional training pipeline.
“The paper does not estimate costs, so I can’t say whether, or by how much, it would lower the cost of developing future models,” Jiajun Fan, a PhD student at the University of Illinois Urbana-Champaign and first author of the paper, told Inside Telecom. Diagnosing failures, testing candidate edits and independently validating the resulting models all require resources.
The research is relevant to the wider discussion about AI autonomy in model development. If the technique proves reliable across architectures and tasks, developers could potentially address some weaknesses without repeating a full training procedure. That possibility remains to be tested at production scale.
Why safety evaluation remains essential
Self-rewriting creates a separate safety challenge because a modification to model weights can affect behavior beyond the task being evaluated. A change that improves mathematical reasoning might have unintended consequences in other domains, including tasks that were not part of the validation process.
The experiment used controlled access to model weights and computational tools, with proposed edits tested before submission. The edits are represented as code that can be inspected and reversed. “These tests measure accuracy on the task; the paper reports no separate safety evaluation,” Fan told Inside Telecom.
This distinction matters in light of previous reporting on AI agents bypassing restrictions in controlled environments. The present study does not demonstrate such behavior, but it highlights why independent safety tests, human approval and rollback mechanisms would be important before self-edited models enter operational environments.
The researchers see self-rewriting as a possible step toward recursive self-improvement, in which models could repeatedly enhance their own capabilities. The current evidence is narrower: a sufficiently capable model corrected specific failures under controlled conditions. The study remains a preprint, and broader validation is needed before its findings can be generalized.
The research project page provides additional figures, demonstrations and a film explaining the experiments. For the AI industry, the next question is whether self-rewriting can deliver repeatable improvements while preserving the reliability and safety of deployed systems.