← Back to Research

WeightECO: LLM-Guided Analytic Weight Programming for Automated Neural Model Repair

Research Project · 2026

Submitted to the Design Automation Conference (DAC)

Automated neural model repair through LLM-guided weight programming, without gradient-based fine-tuning.

Overview

Adapting pretrained neural networks to new requirements typically involves gradient-based optimization and task-specific training pipelines. We investigate an alternative paradigm in which large language models directly program neural network weights to activate existing capabilities and repair specific model deficiencies.

WeightECO is an automated framework that translates natural language repair objectives into executable analytic weight modifications. By integrating model analysis, weight programming, empirical validation, and iterative refinement, WeightECO aims to achieve targeted model adaptation without gradient-based fine-tuning.

Framework

Overview of the WeightECO framework. An LLM authors a weight program, an analytic compiler constructs a native patch, and a verifier tests the edited model. A failed check returns feedback to the programmer.
Overview of the WeightECO framework. An LLM authors a weight program, an analytic compiler constructs a native patch, and a verifier tests the edited model. A failed check returns feedback to the programmer.

LLM-Guided Model Analysis. The LLM analyzes the pretrained model architecture and task requirements to identify candidate parameters and formulate a weight modification strategy.

Analytic Weight Programming. The LLM generates executable analytic weight modification programs to directly adapt selected model parameters without backpropagation.

Closed-Loop Validation and Refinement. The framework evaluates the modified model against target objectives and capability-preservation constraints, using execution feedback to refine or roll back unsuccessful modifications.

Key Contributions

  • Natural Language–Driven Weight Programming. An LLM-guided framework that translates natural language requirements into executable analytic weight modifications.
  • Gradient-Free Capability Activation and Repair. A unified approach to activating existing model capabilities and addressing specific model deficiencies through direct weight programming.
  • Automated Closed-Loop Adaptation. An integrated workflow for model analysis, program generation, execution, validation, and iterative refinement.

Experimental Results

Capability Activation

T1 — Capability activation (DINOv3-7B, full-image forgery; GenImage / WildRF)

Target metrics (%) and maximum protected loss D (pp) for evaluated edits. Three-seed mean ± sample SD. T1 varies the readout across seeds. Training Method is a supervised or training reference and reports a single score with no D.
Method GenImage ↑ WildRF ↑ D ↓
Original 64.45 ± 0.00 51.41 ± 0.00 0.000 ± 0.000
Fixed Analytic 93.16 ± 0.00 93.07 ± 0.00 0.729 ± 0.000
WSP 85.59 ± 1.90 82.95 ± 1.69 0.742 ± 0.140
WeightLoop-style 85.31 ± 0.97 80.97 ± 1.04 0.036 ± 0.012
WeightECO 99.27 ± 0.13 98.97 ± 0.17 0.011 ± 0.004
Training Method 99.73 99.43 —

On DINOv3-7B with a fixed readout, WeightECO reaches mean GenImage / WildRF AUROCs of 99.27% / 98.97%, close to the supervised DINOv3-Linear training reference at 99.73% / 99.43%.

Targeted Model Repair

T2 — Targeted model repair (DINOv3-Linear, localized forgery on BR-Gen)

Target metrics (%) and maximum protected loss D (pp) for evaluated edits. Three-seed mean ± sample SD. T1 varies the readout across seeds. Training Method is a supervised or training reference and reports a single score with no D.
Method AUROC ↑ TPR@5 ↑ FPR ↓ D ↓
Original 89.99 ± 0.00 72.34 ± 0.00 0.13 ± 0.00 0.000 ± 0.000
Fixed Analytic 91.65 ± 0.00 75.32 ± 0.00 2.80 ± 0.00 0.834 ± 0.000
WSP 91.63 ± 0.92 75.63 ± 1.49 0.76 ± 0.14 0.223 ± 0.038
WeightLoop-style 91.56 ± 0.61 76.34 ± 0.92 0.42 ± 0.10 0.036 ± 0.008
WeightECO 97.87 ± 0.24 93.94 ± 0.40 0.20 ± 0.07 0.018 ± 0.005
Training Method 99.18 99.17 0.80 —

On localized BR-Gen repair of the DINOv3-Linear detector, WeightECO raises mean AUROC from 89.99% to 97.87% and TPR@5 from 72.34% to 93.94%, with mean protected-metric loss D = 0.018 pp.

These Table II scores are three-seed means of evaluated edits. After a patch is frozen, independent confirmation can be lower: localized-repair AUROC is 92.98%, and negation N/H accuracy is 41.07% with D = 0.633 pp.

Astra’s negation repair (T3) from weight inspection to a frozen COCO evaluation.
Astra’s negation repair (T3) from weight inspection to a frozen COCO evaluation.

Automation and Generalization

Frozen repairs by four LLMs. (a) Target performance: GenImage AUROC (T1), BR-Gen AUROC (T2), and COCO N/H (T3). (b) Maximum protected-metric loss on the same frozen patches.
Frozen repairs by four LLMs. (a) Target performance: GenImage AUROC (T1), BR-Gen AUROC (T2), and COCO N/H (T3). (b) Maximum protected-metric loss on the same frozen patches.

Frozen repairs from four LLM programmers succeed on the shared benchmarks. Astra has the highest GenImage AUROC; Gemini Argon reaches the highest COCO N/H (46.08%) with 0.83 pp ordinary retrieval loss; on BR-Gen, Sol reaches 92.71% AUROC.

My Contributions

  • Research problem formulation and framework design.
  • Implementation of the LLM-guided weight programming and automated validation pipeline.
  • Experimental design, empirical evaluation, and result analysis.

← Back to Research