Authors: Junpeng Hou, Jiaxing Qu, Derek Cheng, Jaewon Yang, Abhinav Naikawadi, Karthik SubbianarXiv 2611.29613

Weight Coding: Evolving Web-Scale Recommenders through Direct Weight Edits with LLM Agents was submitted to arXiv on 2026-11-22 by Junpeng Hou, Jiaxing Qu, Derek Cheng, Jaewon Yang, Abhinav Naikawadi, Karthik Subbian. Read it on arXiv or as a PDF.

Key findings

The main takeaway. On Pinterest’s production recommender models, an LLM agent can substantially alter retrieval recall, item freshness, product exposure, and user saves by directly editing a small fraction of model parameters rather than running full gradient-based retraining.

The abstract, as written

Web-scale recommender models evolve primarily through retraining or fine-tuning. We propose \emph{weight coding}, a methodology for model evolution through direct, executable weight edits. A large language model (LLM) agent inspects model structure and parameters, formulates hypotheses, and implements edits using evaluation feedback. The loop progresses from localized changes to targeted searches and composition, allowing edited components to adapt to one another. A cached engine enables rapid forward evaluation without backpropagation. On Pinterest’s 147M-parameter Image Search two-tower retriever, weight coding improves held-out recall@10 of production model by up to 15.0 percentage points (+24% relative) with few edits in about 1/4 GPU hours of a full post-training finetune, while a common launch only improves around 1%. After reinitializing the entire 13.6M-parameter interaction module randomly while retaining the surrounding trained model, searching 2,448 mixing and normalization parameters yields 9.8 points above production. Offline gains span the full funnel including dense retrieval, generative retrieval and ranking, with up to 1.37B learnable parameters and different edits for each architecture. Steering edits provide explicit control of model performance over segments like freshness and product. Weight coding requires no serving change and online A/B tests increase saves per user from the edited retrieval source by 8.4% to 10.7%, aligned with the target business objectives. Our results establish weight coding as a practical and useful tool for model development and and behavioral control in a real web-scale production system, with potential to extend to both pre-training and post-training stages across the funnel.

Key terms

From the paper

This passage reports the main offline recall@10 improvement and compute cost on Pinterest’s Image Search two-tower retriever.

On Pinterest’s 147M-parameter Image Search two-tower retriever, weight coding improves held-out recall@10 of production model by up to 15.0 percentage points (+24% relative) with few edits in about 1/4 GPU hours of a full post-training finetune, while a common launch only improves around 1%.

This passage explains how adjusting a single steering coefficient controls the share of fresh and product Pins in the top-10 retrieved results.

Fresh share in the top-10 spans 2% at to 70% at , while product share reaches 39% at . Strong product steering also concentrates results. The share of the top-1% most popular Pins rises from 0.10 to 0.42 at , delimiting the useful range of this control.

This passage summarizes the online A/B test results when the agent optimizes for save-type engagements on a serving index of over 50 million Pins.

These edits raise saves from the source by 8.4-10.7% per user and 4.3-5.3% per impression. They also increase closeups while reducing long clicks and product share. The same editable sites therefore support different business goals under different evaluation objectives.

This passage describes the cannibalization effect observed when the edited retriever competes with other retrieval sources in the online ranking stack.

One caveat to call out is that the ranker tends to rank the Pins from the edited model much higher and such a cannibalization reduces impression share and engagements from other retrievers.

Figures from the paper

Look at panel (b) to see how successive weight-coding edits and parameter searches progressively increase relative recall@10 on Pinterest’s Image Search retrieval model.

Figure 1. Weight coding by LLM agents. (a) Training and direct editing of trained or randomized weights through an agent

Figure from the paper, arXiv:2611.29613, by its authors. Caption as written: Figure 1. Weight coding by LLM agents. (a) Training and direct editing of trained or randomized weights through an agent-driven loop. (b) Relative metric changes after successive weight-coding iterations on the Image Search retrieval model at Pinterest.

Look at panels (c) and (d) to see how varying the freshness and product steering coefficients trades off overall recall@10 against targeted Pin exposure.

Figure 5. Edits across models and objectives. (a) PinRec interpolation from production ( λ = 0 \lambda=0 ) to its fine-t

Figure from the paper, arXiv:2611.29613, by its authors. Caption as written: Figure 5. Edits across models and objectives. (a) PinRec interpolation from production ( λ = 0 \lambda=0 ) to its fine-tune ( λ = 1 \lambda=1 ). (b) Relative changes in ranker utility NDCG and hit@3 after expert scaling and recalibration. (c,d) Two-tower recall@10 under fresh and product steering. Four panels show PinRec interpolation, ranker expert scaling, and recall under freshness and product steering.

What the authors say it means

What to do with it

  1. Evaluate weight-edited recommender checkpoints across multiple held-out dates, unseen item corpora, and unoptimized engagement metrics before online deployment. Supported by: In offline validation on Pinterest’s Image Search retriever, searched edits lost an average of 4.5 recall@10 points between the development day and held-out days while remaining positive across held-out days and reaching +9.7 points on a separate corpus.
  2. Monitor popularity concentration when applying attribute steering coefficients to retrieval head biases. Supported by: Increasing product steering on Pinterest’s two-tower retriever pushed product share to 39% in the top-10 results but also raised the share of the top-1% most popular Pins from 0.10 to 0.42.
  3. Track impression share and engagement across competing retrieval sources during online A/B tests of an edited retriever. Supported by: In Pinterest’s one-week online A/B test on roughly 10M users per arm, saves per user from the edited two-tower source rose by 8.4% to 10.7%, while downstream rankers ranked those Pins higher and reduced impression share from other retrievers.
  4. Require human engineer review and reproducible artifact tracking before deploying agent-generated weight edits to production traffic. Supported by: The authors report that reusing edits across checkpoint refreshes requires revalidation against dependent artifacts and explicitly keep human engineers responsible for deployment approval.

Caveat. All experiments were conducted exclusively on Pinterest’s internal recommendation models and datasets over roughly one-week online tests, and the authors note that offline cross-validation does not rule out adaptive overfitting or biases shared across dates. Furthermore, source-level online gains on the edited retriever partially cannibalized impressions from other retrievers, and whether successful edits persist across routine checkpoint refreshes or generalize to other platforms remains untested.

In short

Pinterest researchers developed weight coding, an iterative workflow in which an LLM agent directly inspects and edits recommender weights using cached forward evaluation. Across Pinterest’s Image Search retriever, PinRec generative model, and ranker, targeted edits improved offline recall by up to 15.0 percentage points, controlled fresh and product Pin exposure, and increased source-attributed online saves by 8.4% to 10.7%. The study demonstrates an alternative to full retraining on Pinterest’s stack, though generalization to other systems and long-term checkpoint refreshes remains open.

Read the paper on arXiv →

Written from the paper's own text. Quoted passages are verbatim and the numbers are the authors' own. For the method and full results, read the paper.