Improving LLM multi-dimensional trustworthiness via sparse activation controlEnhancing Multiple Dimensions of Trustworthiness in LLMs via Sparse Activation Control
For Llama2-13b-Chat, multi-task SAC has CR, RR, and NRR of 86.12%, 53.75%, and 88.5%.
- RepE interferes when encoding multiple trustworthiness requirements into the same semantic direction, making it difficult to simultaneously improve honesty, safety awareness, and debiasing. RLHF also relies on extensive feedback and still falsely refuses benign requests.
- Sparse Activation Control uses Path Patching to find causally relevant attention heads for each task, fits a single Gaussian to head outputs, and transforms based on mean and covariance, enabling training-free simultaneous control of multiple tasks.
- For Llama2-13b-Chat, multi-task SAC has CR, RR, and NRR of 86.12%, 53.75%, and 88.5%; the authors claim it remains effective, while RepE fusion is worse than no control. On two Qwen2 instruction models, preference refusal also increased from 0.00%.
- The authors claim trustworthiness extends beyond the three measured dimensions, with the rest unexplored; evaluation becomes harder when factual correction exceeds model capability; closed-source transfer and causal localization costs are left for future work. Experiments cover Llama2-13b-Chat, Qwen2-7B-Instruct, and Qwen2-72B-Instruct.
- Evaluated models
- Llama2-13B-ChatQwen2-7B-InstructQwen2-72B-Instruct
- Benchmarks
- golden_advfactualityPreferenceBiasXSTESTMMLUCSQAAdvBenchToolEprivacy-related inquiries
- Metrics
- Correct Rate (CR)Refusal Rate (RR)Not Refusal Rate (NRR)RtAsafety (AdvBench)MMLUCSQA
The paper proposes a sparse activation control method that simultaneously aligns multiple trustworthiness dimensions, including safety, factuality, and bias, on open-source Llama series models. The research notes that traditional RLHF relies on large amounts of data, while representation engineering can control model intermediate hidden states without training through semantic features, but encoding multiple semantic contents such as honesty and safety into a single semantic feature is difficult. This work identifies model components closely related to specific tasks, namely attention heads, and leverages their sparsity to achieve approximately independent control over different tasks. Experiments show that the model can align with human preferences on safety, factuality, and bias issues simultaneously.
Paper analysis
What problem does this paper attempt to solve?
Multidimensional trustworthiness requirements are difficult to encode into a single semantic direction; the authors use sparse attention heads for near-independent control.
How to simultaneously satisfy multiple requirements such as factuality, safety, and debiasing without retraining, without compressing them into a single semantic direction.
- Scenario: The authors believe LLMs have entered various applications and must reduce bias and harmful outputs. RLHF relies on extensive human feedback, and models may still misjudge benign requests and refuse them uniformly. The authors use TrustLLM and DecodingTrust to illustrate that trustworthiness is a multidimensional issue.
- Existing shortcomings: RepE collects hidden states from paired samples of opposing behaviors, extracts concept vectors via PCA, and adjusts strength during inference before adding them back to original features. The authors claim that single-control performance improves, but simultaneous control of multiple behaviors degrades all metrics (Figure 1 left), making it impractical. The text does not provide coordinate readings for this figure.
- Observation: The authors claim that components corresponding to different behaviors are sparse and mutually independent (Figure 1 right), so it may be possible to control different tasks nearly independently. They attribute the difficulty to existing methods performing hierarchical control over all tasks, lacking precision for task objectives.
- Approach: They propose Sparse Activation Control. They use Path Patching to locate attention heads relevant to specific tasks, model the outputs of these heads with GMM, and apply transformations. The authors claim that heads are sparse with little overlap, so multiple controls can be placed in the same model, and modifying only a few components does not affect general reasoning. The concurrent dimensions chosen for experiments are safety, factuality, and bias.
What related research exists?
Related work is divided into trustworthiness, representation editing, and mechanistic interpretability; baselines are no control and RepE.
Trustworthiness and Alignment
- Behaviors and attacks: Ji et al. (2022), Huang et al. (2023), Augenstein et al. (2023), and Chen and Shu (2023) discuss bias, sycophancy, hallucination, and misinformation. Casper et al. (2023), Wei et al. (2023), Kang et al. (2023), Shaikh et al. (2023), Yuan et al. (2023), and Zhu et al. (2023) discuss adversarial attacks that elicit harmful responses. The authors claim that Zhang et al. (2022)'s causal-based attack is effective and believe it inspires improving trustworthiness from internal mechanisms.
- Evaluation: DecodingTrust (Wang et al., 2023) evaluates GPT's trustworthiness from multiple angles. TrustLLM (Sun et al., 2024) organizes previous data into a framework of 8 aspects and 31 tasks; the authors specifically mention Safety, Fairness, and Truthfulness.
- RLHF: Ouyang et al. (2022). The authors note that even GPT-4, after RLHF, still avoids queries with sensitive wording, so additional output management strategies are needed.
Representation Localization and Editing
- Linear representations and probes: Park et al. (2023) propose the linear representation hypothesis in LLMs, where each semantic concept forms a subspace. Probe classifiers are found in Alain and Bengio (2017), Tenney et al. (2019), and Belinkov (2022).
- Inference-time control: Li et al. (2023) train classifiers for each attention head, select the most effective set, and control their outputs via PCA. Zou et al. (2023a)'s RepE uses principal direction projection for discrimination and controls the identified most effective layers.
- Authors' critique: These localization methods mainly rely on data quality and scale, making it hard to avoid data bias; PCA principal directions discard information from other dimensions of the subspace. This paper instead uses causal mediation analysis for localization and GMM for modeling and adjustment.
Mechanistic Interpretability
Causal mediation: Vig et al. (2020) apply Pearl (2001)'s causal mediation analysis to LLM paths, comparing outputs after intervention with original inputs. Subsequent work applies it to subject-verb agreement (Finlayson et al., 2021), natural language inference (Geiger et al., 2021), and factual associations (Meng et al., 2022; Geva et al., 2023).
Path Patching and circuits: It measures how node-to-node connections mediate treatment effects. Olah et al. (2020) use circuits to explain networks; Wang et al. (2022), Hanna et al. (2023), and Lieberum et al. (2023) apply them to indirect object identification, greater-than comparison, and mapping answer text to answer labels, respectively. This section is a method source; there is no per-paper critique.
Baselines and data: Experimental baselines are No Control, and RepE, multi-task RepE-Mean, and RepE-Merge. Main data are golden_advfactuality, PreferenceBias, and XSTEST, with MMLU and CSQA reported; AdvBench is used to assess overall safety.
The authors distinguish this work from the above by noting that multi-task failure stems from hierarchical control over all tasks and imprecise objectives; by modeling only causally relevant, sparse, and minimally overlapping attention heads, multidimensional tasks can be combined in one model.
How does the paper address this problem?
Path Patching locates task-relevant attention heads, then uses GMM to transform head outputs to simultaneously control multiple tasks.
Overall, it is a training-free inference-time intervention: Sparse Activation Control. First, identify attention heads causally relevant to each task, then apply distribution transformations only to the outputs of these heads; both single-task and multi-task use the same control pipeline.
Localizing Key Components
- Computational graph: Treat the LLM as a directed acyclic graph. Nodes include attention heads, MLPs, and residual connections; edges are data flows from node outputs to next node inputs (Figure 4, Appendix A).
- Counterfactual pairs: Each standard set Xr is paired with a counterfactual set Xc. The authors require Xc to differ minimally from Xr but cause the model to produce opposite understanding and answers. The three tasks are constructed as: replacing erroneous information in the question with original information; retaining or removing the suffix that forces output of only one option word; and replacing trigger words with milder, neutral words. Appendix C provides construction details and examples.
- Path Patching: First run Xr and Xc separately, recording all node activations. Except for patched nodes replaced with activations from Xc, all other nodes are frozen at Xr. Then forward pass and compare output logits before and after patching. Scan nodes separately for each task. They treat each attention head as the Sender and the output logit of the ground-truth token as the Receiver; because residuals and MLPs are computed per token, only the last token position of the input is patched. Causal effect is the relative change in logits before and after patching, averaged over samples (Algorithm 1).
Multi-task Representation Modeling
- Stimuli: Following RepE's functional stimuli, construct Tf⊕ and Tf⊖ with opposing objectives for each task. For the preference task, one side is neutral and the other exhibits preference. Given instruction-response pairs, collect only last-token activations of significant heads on task-relevant data. When a head appears in multiple tasks, features are mixed. Extraction locations are in Appendix D; layer numbers are not listed in the main text.
- Why GMM: The authors claim that PCA principal directions on head outputs have low explained variance, losing information from other directions. The two stimulus groups are already separated, and the authors claim no significant change with additional subclusters, so each data batch fits a single Gaussian:
T_{f}^{\oplus}(q_i,a_i^{\oplus})\sim N(\mu_{\oplus},\Sigma_{\oplus}),\ T_{f}^{\ominus}(q_i,a_i^{\ominus})\sim N(\mu_{\ominus},\Sigma_{\ominus})This means head outputs under two opposing stimulus groups are each described by a Gaussian, rather than retaining only one principal direction.Behavior Manipulation
- Coordinate transformation: Based on the means and covariances of the two distributions, transform a point from one coordinate system to another. One direction given in the paper is:
x_{\oplus}=\Sigma_{\oplus}^{1/2}\Sigma_{\ominus}^{-1/2}(x_{\ominus}-\mu_{\ominus})+\mu_{\oplus}This maps activations from one distribution to the other; Equation (4) also provides the reverse mapping.- Direction not fully aligned: The preference example in 3.2 places neutral in Tf⊕ and preference in Tf⊖; 3.3 also writes using the inverse transformation to map points from Tf⊕ to Tf⊖. The text does not uniformly specify which side is chosen during inference for each task. The paper also does not report the strength coefficient values used in experiments; Section 5 only states that SAC can flexibly control strength.
How Success Is Determined
- Three main metrics: Adv Factuality uses GPT-4 to judge whether the response corrects the erroneous information in the question, with the metric being Correct Rate. Preference Bias expects refusal, measured by keyword detection as Refusal Rate. Exaggerated Safety expects direct answers, measured by Not Refusal Rate, i.e., the proportion without refusal keywords. Keyword examples include "I'm sorry" and "I cannot". General capability uses MMLU and CSQA, not as control targets.
What experiments did the paper conduct?
For Llama2-13b-Chat, multi-task SAC has CR/RR/NRR of 86.12%, 53.75%, and 88.5%.
Experimental Setup
- Models: The main experiment uses Llama2-13b-Chat. Appendix B adds Qwen2-7B-Instruct and Qwen2-72B-Instruct. The CR for Adv Factuality is judged by GPT-4 via API; the paper does not state the version or score threshold.
- Main data: golden_advfactuality has 209 questions with counterfactual premises; PreferenceBias has 120 questions, of which 80 are ideological and 40 are cultural or lifestyle; XSTEST has 200 safe prompts that should be answered. Following TrustLLM results, the authors selected these three as the weaker tasks for Llama2-13b-Chat.
- Baselines: No Control is default inference. RepE uses CONCEPT templates to collect representations from each layer, PCA takes the principal direction, and the intervention location is the MLP output. Multi-task has two fusion methods: averaging the principal directions of the three tasks (RepE-Mean), or merging the data to obtain one principal direction (RepE-Merge).
- Metrics: CR is the proportion of answers that correct misinformation; RR is the refusal rate; NRR is the proportion of answers without refusal keywords. Robustness and privacy use RtA, also keyword detection.
- Side sets: MMLU, CSQA; AdvBench contains 500 harmful instructions. The robustness data in Appendix B comes from the set used by Sun et al., built on ToolE; the paper does not give the number of items; privacy is 280 items across seven categories of private information.
- Sample size: The paper does not report the number of repetitions. Path Patching uses 10 Xr and 10 Xc per task. Representation extraction is 1770 for factuality, 574 for preference, and 1202 for exaggerated safety (Appendix C).
Main Results
The table below is based on Table 1, with the model being Llama2-13b-Chat. Multi-task No Control is the same as single-task and is not listed again.
Swipe horizontally to read the table
Method CR RR NRR MMLU CSQA Single-task No Control 76.56% 10.83% 67% 52.45% 62.67% Single-task RepE 90.43% 39.17% 95% 52.44% 62.65% Single-task SAC 89.47% 62.5% 96% 51.37% 60.20% Multi-task RepE-Mean 72.59% 5% 61% 51.37% 63.06% Multi-task RepE-Merge 71.08% 10% 63% 51.36% 63.06% Multi-task SAC 86.12% 53.75% 88.5% 50.80% 60.50% - The authors say single-task RepE improves the three tasks by 13.87%, 28.34%, and 28%, respectively. The authors say SAC is comparable to RepE on factuality and exaggerated safety; in the table, factuality is higher for RepE, and exaggerated safety is higher for SAC. On preference bias, the authors claim a 51.57% advantage, and in the table SAC's RR is higher than No Control and RepE.
- The authors say RepE-Mean and RepE-Merge drop by more than 15% relative to single-task and are worse than no control, because the mixed PCA direction loses task semantics. SAC still has a control effect, and the authors say it differs from single-task by about 10%.
- The authors give an example: factuality control corrects false premises, and when the premise is correct, it still answers as intended, and they say this differs from RLHF's one-size-fits-all approach. The authors say MMLU and CSQA are not greatly disturbed. Examples are in Appendix F.
Overall Safety on AdvBench
- The authors worry that weakening exaggerated safety will lower overall safety. The original model's safety rate is 99.42%; after only exaggerated safety control it is 97.30%, and after multi-task control it is 98.26%.
- The authors say overall safety is not significantly sacrificed, and they state the decrease is 2.2%. The explanation given is: replacing sensitive words with milder words forms negative-positive pairs, transforming from negative to positive, thereby reducing reliance on keywords and letting the model judge intent with context.
- The paper does not break down AdvBench safety rates by attack type.
Qwen2, Robustness, and Privacy
The table below is based on Table 4. Column order is Preference Bias RR, Adv Factuality CR, Exaggerated Safety NRR.
Swipe horizontally to read the table
Model Method RR CR NRR Qwen2-7B-Instruct No Control 0.00% 76.08% 88.00% Qwen2-7B-Instruct SAC single-task 50.83% 95.22% 96.00% Qwen2-7B-Instruct SAC multi-task 58.33% 96.65% 99.50% Qwen2-72B-Instruct No Control 0.00% 98.08% 90.50% Qwen2-72B-Instruct SAC single-task 85.83% 99.04% 99.50% Qwen2-72B-Instruct SAC multi-task 80.83% 98.56% 100.00% - The authors say both Qwen2 models are already high on factuality and exaggerated safety, but never refuse on preference questions; after SAC they return to neutrality. In the same table, multi-task MMLU/CSQA: 7B is 67.10%/76.90% (no control 67.57%/78.62%), and 72B is 79.58%/82.56% (no control 80.05%/82.39%).
- Table 5 robustness/privacy RtA: Llama2-13B-Chat in the appendix is 39.42%/100.00% no control, 78.42%/100.00% single-task, 75.93%/100.00% multi-task. Qwen2-7B-Instruct is 57.68%/37.14%, 85.89%/93.93%, 82.16%/87.50%. Qwen2-72B-Instruct is 58.51%/98.57%, 84.23%/99.29%, 87.97%/98.93%. The authors say robustness was originally poor and RtA rises after SAC. Llama2's privacy is 100.00% both before and after control.
Human Evaluation
- Appendix H has 18 volunteers (2 undergraduates, 7 master's students, 9 doctoral students), each with 20 items, checking GPT-4's judgments on adversarial factuality. Table 9: precision 0.909, recall 1.000, F1 0.952, Cohen's Kappa 0.875. The authors therefore consider the automatic evaluation credible.
- Annotators also compared which output, with or without control, is more trustworthy, with the criterion being both helpful and safe. Table 10 averages Control Wins 84.8%, Tie 9.2%, No Control Wins 6.0%. The main text says the win rate is 80.8%, inconsistent with the table; here the table is taken as authoritative.
- Per-dataset control wins/ties/no-control wins: exaggerated safety 68.0%/8.0%/24.0%, preference 88.0%/12.0%/0.0%, robustness 100.0%/0.0%/0.0%, privacy 100.0%/0.0%/0.0%, factuality 68.0%/26.0%/6.0%. The authors say answers after exaggerated safety control are more cautious, and some annotators found them not direct enough.
Other Ablations and Analyses
- Table 2: random head CR/RR/NRR is 84.68%/10%/69%, RepE-CLS is 82.29%/12.5%/67.5%, and SAC in the same table is 85.17%/62.5%/96%; this CR differs from Table 1's 89.47%, and the paper does not explain it.
- Shared heads: factuality shares 2 with the other two tasks (the authors say 4% of the total), and preference shares 7 with exaggerated safety (14%); the authors say RepE overlap exceeds 70%, and classification heads overlap by more than 30% between factuality and other tasks.
- The authors say most important heads' principal directions explain less than 30% of variance (the main text says top 10 heads; Figure 2's caption says the top 10 layers by classification accuracy). The authors say PCA lags GMM by about 10% on Preference Bias.
- Fine-tuning with the same small samples: exsafe, advfact, pref bias are 63.00%, 66.98%, 10.83%; robustness drops from 39.42% to 12.86%, and privacy from 100% to 36.43% (Section 5).
- Appendix D: jointly controlling exaggerated safety and adversarial factuality, the authors say it improves both by 21.5% and 9.6%, with CSQA (CoT) unchanged; the paper does not give absolute scores for this group. The authors say that for 90% of task pairs, head overlap is below 10%.
- Table 3: in exaggerated safety examples, the top-5 tokens of relevant heads before control include gender, bias, and subsequent refusal-related tokens; after control they become neutral words, and subsequent heads become non-refusal tokens. Appendix G has similar tables for the other two tasks.
What are some points that can be further explored?
The authors state that only a subset of trustworthiness is covered; closed-source transfer and causal localization costs remain for future work.
Limitations and Future Directions Noted by the Authors
- Dimensions not exhausted: Trustworthiness covers a broad scope beyond adversarial factuality, preference bias, and exaggerated safety; the authors state that overall trustworthiness still has a long way to go, and this paper only validates a subset, with the rest unexplored (Section 5).
- Factuality evaluation: If the erroneous information to be corrected exceeds model capability, adversarial factuality evaluation becomes complex; the authors call this implausible and emphasize the need for diverse domain expertise and carefully designed prompts (Section 5).
- Computational cost: SAC does not modify parameters; the main cost is in causal mediation analysis. The authors hope to localize components at different granularities in the future to further reduce cost (Section 5).
- Closed-source models: The authors list transfer to proprietary models as further discussion and state that improving closed-source models remains a significant challenge (Section 5).
- Scope of further discussion: Section 5 also lists comparison of computational cost with SFT, orthogonality of key components, and activation modeling approaches as further discussion, hoping future work continues these discussions. Section 6 hopes to extend internal control to other aspects of trustworthiness.
Experimental Coverage
- Models: The main result model is Llama2-13b-Chat; Appendix B additionally reports Qwen2-7B-Instruct and Qwen2-72B-Instruct. Proprietary models are not control targets because their internal outputs cannot be read.
- Tasks: Main tasks are Adv Factuality (209), Preference Bias (120), and XSTEST (200). Side tasks include MMLU, CSQA, and AdvBench (500). Appendix B also includes robustness and privacy (privacy 280 items). The authors state that transparency, ethics, and accountability are excluded because they are not concepts testable or improvable at inference time.
- Evaluation: Adv Factuality uses GPT-4; Appendix H reports agreement with 18 annotators. RR, NRR, and RtA are keyword detection. The paper does not report the number of repetitions or the strength coefficient values used during inference.
- Localization and extraction: Each task's Path Patching uses 10 Xr and 10 Xc. Representation extraction samples are factuality 1770, preference 574, exaggerated safety 1202 (Appendix C).
- Baselines: Main table baselines are No Control, RepE, RepE-Mean, and RepE-Merge. Section 5 also fine-tunes with the same small samples as SAC and compares on robustness and privacy sets.
Summarize the main content of the paper
Training-independent head-level control can simultaneously improve factuality, neutrality, and avoid over-refusal on a single model.
Sparse Activation Control is a training-free, inference-time method for simultaneously adjusting multiple trustworthiness dimensions in the same open-source LLM.
- Problem: RepE uses PCA to create concept directions for behaviors; a single behavior can be added or subtracted, but adding multiple behaviors together drags each other down. The authors believe the reason is that all tasks rely on layer-level control without aligning to their respective computational components.
- Method: Path Patching replaces the activation of a single attention head with a counterfactual activation to see whether the logit of the correct token changes, thereby identifying task-relevant heads. Only on these heads are the last-token outputs of opposing stimuli collected, each fitted with a Gaussian, and then a coordinate transformation is done using the mean and covariance. If a head appears across tasks, the features are merged.
- Main results: On Llama2-13b-Chat, Table 1's multi-task SAC is CR 86.12%, RR 53.75%, NRR 88.5%; single-task SAC's RR is 62.5%. The authors say both RepE fusion methods are worse than no control, and SAC differs from the corresponding single-task by about 10%.
- Side effects and extensions: AdvBench's original safety rate is 99.42%, and after single-task and multi-task control it is 97.30% and 98.26%, with the authors saying the decrease is 2.2%. Qwen2-7B-Instruct and Qwen2-72B-Instruct both have a no-control preference RR of 0.00%, and multi-task SAC gives 58.33% and 80.83%, respectively (Table 4).
- Authors' conclusion: Sparse, low-overlap heads can support multi-task control, and general tasks are not greatly disturbed; after projecting head outputs onto the vocabulary, sensitive-related tokens become neutral words, corresponding to a change in refusal tendency. The authors leave uncovered trustworthiness aspects, closed-source models, and control localization cost to future work.