{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/personality-alignment-of-large-language","title":"Personality Alignment of Large Language Models","arxiv_id":"2408.11779","date":"2024-08-21","proceeding":null,"authors":["Minjun Zhu","Linyi Yang","Yue Zhang"],"abstract":"Current methods for aligning large language models (LLMs) typically aim to reflect general human values and behaviors, but they often fail to capture the unique characteristics and preferences of individual users. To address this gap, we introduce the concept of Personality Alignment. This approach tailors LLMs' responses and decisions to match the specific preferences of individual users or closely related groups. Inspired by psychometrics, we created the Personality Alignment with Personality Inventories (PAPI) dataset, which includes data from 300,000 real subjects, each providing behavioral preferences based on the Big Five Personality Factors. This dataset allows us to quantitatively evaluate the extent to which LLMs can align with each subject's behavioral patterns. Recognizing the challenges of personality alignments: such as limited personal data, diverse preferences, and scalability requirements: we developed an activation intervention optimization method. This method enhances LLMs' ability to efficiently align with individual behavioral preferences using minimal data and computational resources. Remarkably, our method, PAS, achieves superior performance while requiring only 1/5 of the optimization time compared to DPO, offering practical value for personality alignment. Our work paves the way for future AI systems to make decisions and reason in truly personality ways, enhancing the relevance and meaning of AI interactions for each user and advancing human-centered artificial intelligence.The code has released in \\url{https://github.com/zhu-minjun/PAlign}.","url_abs":"https://arxiv.org/abs/2408.11779v1","url_pdf":"https://arxiv.org/pdf/2408.11779v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"personality-alignment-of-large-language","repo_url":"https://github.com/zhu-minjun/palign","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"personality-alignment","task_name":"Personality Alignment"}],"methods":[{"method_slug":"align","method_name":"ALIGN"},{"method_slug":"dpo","method_name":"DPO"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2408.11779","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2408.11779"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"deterministic:regex_extraction","url":"https://github.com/zhu-minjun/PAlign","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/zhu-minjun/palign","reach":{"status":"ok"}}],"summary":{"ran_fixture":1,"ran_draft_wrong":2,"ran":4,"unverified":2},"by_repo_kind":{"official":{"samples":9,"ran":7,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":9,"samples":[{"code_sha256_prefix":"30d7eec482ebf6b1","entry":"repeat_kv","repo":"zhu-minjun/PAlign","repo_kind":"official","path":"PAlign/modeling_llama.py","file_url":"https://github.com/zhu-minjun/PAlign/blob/HEAD/PAlign/modeling_llama.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":2,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"30d7eec482ebf6b1"}},{"code_sha256_prefix":"bac65c3dafaec040","entry":"apply_rotary_pos_emb","repo":"zhu-minjun/PAlign","repo_kind":"official","path":"PAlign/modeling_llama.py","file_url":"https://github.com/zhu-minjun/PAlign/blob/HEAD/PAlign/modeling_llama.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"bac65c3dafaec040"}},{"code_sha256_prefix":"4a3ae200cd68405d","entry":"calc_mean_and_var","repo":"zhu-minjun/PAlign","repo_kind":"official","path":"baseline_utils.py","file_url":"https://github.com/zhu-minjun/PAlign/blob/HEAD/baseline_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4a3ae200cd68405d"}},{"code_sha256_prefix":"f82b66f7ebc91726","entry":"generateAnswer","repo":"zhu-minjun/PAlign","repo_kind":"official","path":"data_preprocess/get_personality_prompt.py","file_url":"https://github.com/zhu-minjun/PAlign/blob/HEAD/data_preprocess/get_personality_prompt.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f82b66f7ebc91726"}},{"code_sha256_prefix":"f1a17d86de08bb1d","entry":"process_answers","repo":"zhu-minjun/PAlign","repo_kind":"official","path":"baseline_utils.py","file_url":"https://github.com/zhu-minjun/PAlign/blob/HEAD/baseline_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f1a17d86de08bb1d"}},{"code_sha256_prefix":"6eb6fd88b8af5b63","entry":"prompt_to_tokens","repo":"zhu-minjun/PAlign","repo_kind":"official","path":"data_preprocess/get_personality_prompt.py","file_url":"https://github.com/zhu-minjun/PAlign/blob/HEAD/data_preprocess/get_personality_prompt.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6eb6fd88b8af5b63"}},{"code_sha256_prefix":"b99eea6376d1e212","entry":"rotate_half","repo":"zhu-minjun/PAlign","repo_kind":"official","path":"PAlign/modeling_llama.py","file_url":"https://github.com/zhu-minjun/PAlign/blob/HEAD/PAlign/modeling_llama.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b99eea6376d1e212"}},{"code_sha256_prefix":"af3966fce9ca8ccb","entry":"getItems","repo":"zhu-minjun/PAlign","repo_kind":"official","path":"data_preprocess/get_personality_prompt.py","file_url":"https://github.com/zhu-minjun/PAlign/blob/HEAD/data_preprocess/get_personality_prompt.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"af3966fce9ca8ccb"}},{"code_sha256_prefix":"5b78489c42e7c5b4","entry":"process_few_shot","repo":"zhu-minjun/PAlign","repo_kind":"official","path":"baseline_utils.py","file_url":"https://github.com/zhu-minjun/PAlign/blob/HEAD/baseline_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5b78489c42e7c5b4"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}