Targeted Angular Reversal of Weights (TARS) for Knowledge Removal in Large Language Models
Davies, Harry J., Iacovides, Giorgos, Mandic, Danilo P.
–arXiv.org Artificial Intelligence
Methods designed to remove such knowledge must do so from all prompt directions, in a multi-lingual capacity and without degrading general model performance. To this end, we introduce the targeted angular reversal (TARS) method of knowledge removal from LLMs. The TARS method firstly leverages the LLM in combination with a detailed prompt to aggregate information about a selected concept in the internal representation space of the LLM. It then refines this approximate concept vector to trigger the concept token with high probability, by perturbing the approximate concept vector with noise and transforming it into token scores with the language model head. The feed-forward weight vectors in the LLM which operate directly on the internal representation space, and have the highest cosine similarity with this refined targeting vector, are then replaced by a reversed targeting vector, thus limiting the ability of the concept to propagate through the model. The modularity of the TARS method allows for a sequential removal of concepts from Llama 3.1 8B, such as the famous literary detective Sherlock Holmes, and the planet Saturn. It is demonstrated that the probability of triggering target concepts can be reduced to 0.00 with as few as 1 TARS edit, whilst simultaneously removing the knowledge bi-directionally. Moreover, knowledge is shown to be removed across all languages despite only being targeted in English. Importantly, TARS has minimal impact on the general model capabilities, as after removing 5 diverse concepts in a modular fashion, there is minimal KL divergence in the next token probabilities of the LLM on large corpora of Wikipedia text (median of 0.002).
arXiv.org Artificial Intelligence
Dec-16-2024
- Country:
- Africa > Middle East
- Egypt (0.04)
- Europe > United Kingdom
- England > Greater London > London (0.04)
- North America > United States
- Virginia (0.04)
- Africa > Middle East
- Genre:
- Research Report (0.83)
- Industry:
- Information Technology > Security & Privacy (0.46)
- Leisure & Entertainment > Games (0.46)
- Technology: