{"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/householder-pseudo-rotation-a-novel-approach","title":"Householder Pseudo-Rotation: A Novel Approach to Activation Editing in LLMs with Direction-Magnitude Perspective","arxiv_id":"2409.10053","date":"2024-09-16","proceeding":null,"authors":["Van-Cuong Pham","Thien Huu Nguyen"],"abstract":"Activation Editing, which involves directly editting the internal representations of large language models (LLMs) to alter their behaviors and achieve desired properties, has emerged as a promising area of research. Existing works primarily treat LLMs' activations as points in space and modify them by adding steering vectors. However, this approach is limited in its ability to achieve greater performance improvement while maintaining the necessary consistency of activation magnitudes. To overcome these issues, we propose a novel editing method that views activations in terms of their directions and magnitudes. Our method, named Householder Pseudo-Rotation (HPR), mimics the rotation transformation, thus preserving activation norms and resulting in an improved performance on various safety benchmarks.","url_abs":"https://arxiv.org/abs/2409.10053v2","url_pdf":"https://arxiv.org/pdf/2409.10053v2.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":"householder-pseudo-rotation-a-novel-approach","repo_url":"https://github.com/VinAIResearch/HPR","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"none","reach":{"status":"ok","spdx":"BSD-3-Clause"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2409.10053","atlas_url":"https://app.syntology.ai/?focus=2409.10053","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2409.10053"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/VinAIResearch/HPR","reach":{"status":"ok","spdx":"BSD-3-Clause"}}],"summary":{"ran":7,"unverified":3},"by_repo_kind":{"official":{"samples":10,"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":0,"samples":[{"code_sha256_prefix":"3cfd332f24591b87","entry":"filter_by_sample_ids","repo":"VinAIResearch/HPR","repo_kind":"official","path":"activation_editing/dataset_split.py","file_url":"https://github.com/VinAIResearch/HPR/blob/HEAD/activation_editing/dataset_split.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"3cfd332f24591b87"}},{"code_sha256_prefix":"28812107e80f8065","entry":"householder_evaluation_metrics","repo":"VinAIResearch/HPR","repo_kind":"official","path":"activation_editing/model/guidance/householder.py","file_url":"https://github.com/VinAIResearch/HPR/blob/HEAD/activation_editing/model/guidance/householder.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"28812107e80f8065"}},{"code_sha256_prefix":"9e4b5bd6d825d29b","entry":"prompt_function","repo":"VinAIResearch/HPR","repo_kind":"official","path":"activation_editing/cli_demo.py","file_url":"https://github.com/VinAIResearch/HPR/blob/HEAD/activation_editing/cli_demo.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"9e4b5bd6d825d29b"}},{"code_sha256_prefix":"4972d9a9289f1c51","entry":"prompt_function","repo":"VinAIResearch/HPR","repo_kind":"official","path":"activation_editing/generate_responses.py","file_url":"https://github.com/VinAIResearch/HPR/blob/HEAD/activation_editing/generate_responses.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"4972d9a9289f1c51"}},{"code_sha256_prefix":"a639770c12532a50","entry":"prompt_function","repo":"VinAIResearch/HPR","repo_kind":"official","path":"activation_editing/get_activations.py","file_url":"https://github.com/VinAIResearch/HPR/blob/HEAD/activation_editing/get_activations.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"a639770c12532a50"}},{"code_sha256_prefix":"374b163db294edb4","entry":"split_by_sample_ids","repo":"VinAIResearch/HPR","repo_kind":"official","path":"activation_editing/dataset_split.py","file_url":"https://github.com/VinAIResearch/HPR/blob/HEAD/activation_editing/dataset_split.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"374b163db294edb4"}},{"code_sha256_prefix":"b2a2c7262c9af473","entry":"tokenize_function","repo":"VinAIResearch/HPR","repo_kind":"official","path":"activation_editing/get_activations.py","file_url":"https://github.com/VinAIResearch/HPR/blob/HEAD/activation_editing/get_activations.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"b2a2c7262c9af473"}},{"code_sha256_prefix":"cab0297cf145da07","entry":"get_model_activation","repo":"VinAIResearch/HPR","repo_kind":"official","path":"activation_editing/get_activations.py","file_url":"https://github.com/VinAIResearch/HPR/blob/HEAD/activation_editing/get_activations.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"cab0297cf145da07"}},{"code_sha256_prefix":"aee277e456a78dbe","entry":"get_model_responses","repo":"VinAIResearch/HPR","repo_kind":"official","path":"activation_editing/cli_demo.py","file_url":"https://github.com/VinAIResearch/HPR/blob/HEAD/activation_editing/cli_demo.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"aee277e456a78dbe"}},{"code_sha256_prefix":"9949ead81382b044","entry":"get_model_responses","repo":"VinAIResearch/HPR","repo_kind":"official","path":"activation_editing/generate_responses.py","file_url":"https://github.com/VinAIResearch/HPR/blob/HEAD/activation_editing/generate_responses.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"9949ead81382b044"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}