SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2406.02888 · NeurIPS · 2024

HYDRA: Model Factorization Framework for Black-Box LLM Personalization

Bo Dai, Chao Zhang, Yue Yu, Qifan Wang, Yuchen Zhuang, Haotian Sun, Rushi Qiang

arXiv · PDF · Open in the Atlas

Code that ran

16 of 16 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (2 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 13 failures of our instrument; 0 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2406.02888.json · badge: /api/ran/2406.02888.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
night-chen/HYDRA canonical (classifier label)
classifier basis: census
13 ran · 0 no recorded run
night-chen/hydra canonical (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
FunctionStatusWhere it lives
LongformerForPersonalizedCls Ran
ran on a synthesized input
night-chen/hydra/adapter/trainer/personalized_trainer.py
pointer only (licence: NONE) · get_code("da25fbe823b3c54e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, night-chen/hydra when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

LongformerPersonalizedClsHead Ran
ran on a synthesized input · constructed an object; no result was computed
night-chen/hydra/adapter/trainer/personalized_trainer.py
pointer only (licence: NONE) · get_code("2b0e9e1de87f7100")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, night-chen/hydra when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

LongformerSequenceClassifierOutput Ran
ran on a synthesized input · constructed an object; no result was computed
night-chen/hydra/adapter/trainer/personalized_trainer.py
pointer only (licence: NONE) · get_code("8da550fed680318d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, night-chen/hydra when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

api_key_list Ran
ran; our contract draft was wrong, not the code
night-chen/HYDRA/utils/credentials.py
pointer only (licence: NONE) · get_code("78978cd98b44b675")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, night-chen/HYDRA when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

extract_after_article Ran
ran; our contract draft was wrong, not the code
night-chen/HYDRA/prompts/utils.py
pointer only (licence: NONE); the stored copy get_code serves, from kimdanny/fair-rag, is pointer only (licence: NONE) · get_code("3c022e0b56a5b9aa")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, night-chen/HYDRA when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

extract_after_description Ran
ran; our contract draft was wrong, not the code
night-chen/HYDRA/prompts/utils.py
pointer only (licence: NONE); the stored copy get_code serves, from kimdanny/fair-rag, is pointer only (licence: NONE) · get_code("490005de8edac2a7")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, night-chen/HYDRA when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

extract_numbers Ran
ran; our contract draft was wrong, not the code
night-chen/HYDRA/metrics/classification_metrics.py
pointer only (licence: NONE) · get_code("128a6ca41173c482")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, night-chen/HYDRA when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

extract_strings_between_quotes Ran
ran; our contract draft was wrong, not the code
night-chen/HYDRA/prompts/utils.py
pointer only (licence: NONE); the stored copy get_code serves, from kimdanny/fair-rag, is pointer only (licence: NONE) · get_code("f11dc768dc0cbefb")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, night-chen/HYDRA when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_data Ran
ran; our contract draft was wrong, not the code
night-chen/HYDRA/utils/util.py
pointer only (licence: NONE) · get_code("4b094583baf62f2f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, night-chen/HYDRA when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_personalize_data Ran
ran; our contract draft was wrong, not the code
night-chen/HYDRA/utils/util.py
pointer only (licence: NONE) · get_code("1a267a44dd55b79b")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, night-chen/HYDRA when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

load_config Ran
ran; our contract draft was wrong, not the code
night-chen/HYDRA/utils/util.py
pointer only (licence: NONE) · get_code("159282975f5b3801")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, night-chen/HYDRA when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

mean_pooling Ran
ran; our contract draft was wrong, not the code
night-chen/HYDRA/prompts/contriever_retriever.py
pointer only (licence: NONE); the stored copy get_code serves, from chenyiqun/MMOA-RAG, is pointer only (licence: NONE) · get_code("fe0e2df4d9cb5edd")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, night-chen/HYDRA when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

postprocess_text Ran
ran; our contract draft was wrong, not the code
night-chen/HYDRA/metrics/generation_metrics.py
pointer only (licence: NONE); the stored copy get_code serves, from jingyng/label-adaptive-self-rationalization, is pointer only (licence: NONE) · get_code("8b51adb8a6c014e5")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, night-chen/HYDRA when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

postprocess_text_cls Ran
ran; our contract draft was wrong, not the code
night-chen/HYDRA/metrics/classification_metrics.py
pointer only (licence: NONE) · get_code("33df4a8be7151fcc")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, night-chen/HYDRA when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

postprocess_text_reg Ran
ran; our contract draft was wrong, not the code
night-chen/HYDRA/metrics/classification_metrics.py
pointer only (licence: NONE) · get_code("21eed1ab0d4f98f7")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, night-chen/HYDRA when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

prepare_prompts Ran
ran; our contract draft was wrong, not the code
night-chen/HYDRA/adapter/generate/generate.py
pointer only (licence: NONE); the stored copy get_code serves, from wshi83/MedAdapter, is pointer only (licence: NONE) · get_code("a5c4afa103aa6d76")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, night-chen/HYDRA when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

Also present in other papers' code

Of 16 samples lifted from this paper's linked repositories, 16 carry a function identity and 0 do not. Of the 16 distinct functions with an identity, 6 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 0 the same month, 5 later) and 10 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
mean_pooling 15 other papers
7 dated earlier, 8 later
2304.11406 (2023-04)
LaMP: When Large Language Models Meet Personalization
2305.18395 (2023-05)
Knowledge-Augmented Reasoning Distillation for Small Language Models in Knowledge-Intensive Tasks
2308.04275 (2023-08)
In-Context Alignment: Chat with Vanilla Language Models Before Fine-Tuning
and 12 more not named here
postprocess_text 4 other papers
2 dated earlier, 2 later
2022.findings-emnlp.174 (2022 (year only))
CodeExp: Explanatory Code Document Generation
2404.05970 (2024-04)
Optimization Methods for Personalizing Large Language Models through Retrieval Augmentation
2410.04002 (2024-10)
Take It Easy: Label-Adaptive Self-Rationalization for Fact Verification and Explanation Generation
and 1 more not named here
extract_after_article 2 other papers
1 dated earlier, 1 later
2404.05970 (2024-04)
Optimization Methods for Personalizing Large Language Models through Retrieval Augmentation
2409.11598 (2024-09)
Towards Fair RAG: On the Impact of Fair Ranking in Retrieval-Augmented Generation
extract_after_description 2 other papers
1 dated earlier, 1 later
2404.05970 (2024-04)
Optimization Methods for Personalizing Large Language Models through Retrieval Augmentation
2409.11598 (2024-09)
Towards Fair RAG: On the Impact of Fair Ranking in Retrieval-Augmented Generation
extract_strings_between_quotes 2 other papers
1 dated earlier, 1 later
2404.05970 (2024-04)
Optimization Methods for Personalizing Large Language Models through Retrieval Augmentation
2409.11598 (2024-09)
Towards Fair RAG: On the Impact of Fair Ranking in Retrieval-Augmented Generation
prepare_prompts 2 other papers
2 dated earlier
2405.03000 (2024-05)
MedAdapter: Efficient Test-Time Adaptation of Large Language Models Towards Medical Reasoning
2405.17888 (2024-05)
Getting More Juice Out of the SFT Data: Reward Learning from Human Demonstration Improves SFT for LLM Alignment

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Personalization has emerged as a critical research area in modern intelligent systems, focusing on mining users' behavioral history and adapting to their preferences for delivering tailored experiences. Despite the remarkable few-shot capabilities exhibited by black-box large language models (LLMs), the inherent opacity of their model parameters presents significant challenges in aligning the generated output with individual expectations. Existing solutions have primarily focused on prompt design to incorporate user-specific profiles and behaviors; however, such approaches often struggle to generalize effectively due to their inability to capture shared knowledge among all users. To address these challenges, we propose HYDRA, a model factorization framework that captures both user-specific behavior patterns from historical data and shared general knowledge among all users to deliver personalized generation. In order to capture user-specific behavior patterns, we first train a reranker to prioritize the most useful information from top-retrieved relevant historical records. By combining the prioritized history with the corresponding query, we train an adapter to align the output with individual user-specific preferences, eliminating the reliance on access to inherent model parameters of black-box LLMs. Both the reranker and the adapter can be decomposed into a base model with multiple user-specific heads, resembling a hydra. The base model maintains shared knowledge across users, while the multiple personal heads capture userspecific preferences. Experimental results demonstrate that HYDRA outperforms existing state-of-the-art prompt-based methods by an average relative improvement of 9.01% across five diverse personalization tasks in the LaMP benchmark. Our implementation is available at https://github.com/night-chen/HYDRA.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2406.02888")
get_code_for_paper("2406.02888")
have("2406.02888")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2406.02888.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2406.02888.svg)](https://syntology.ai/paper/2406.02888)

Connect an agent — have() is free.