Skip to content

OPTML-Group/SIFT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Subspace Control: Turning Constrained Model Steering into Controllable Spectral Optimization

collection issues

License: MIT GitHub top language GitHub repo size GitHub stars

Teaser
Figure 1: Schematic overview of proposed subspace control framework, SIFT.

This is the official code repository for SIFT Subspace Control: Turning Constrained Model Steering into Controllable Spectral Optimization.

News

📣 Check out our Arxiv version on subspace control for constrained model training!

Abstract

Foundation models, such as large language models (LLMs), are powerful but often require customization before deployment to satisfy practical constraints such as safety, privacy, and task-specific requirements, leading to "constrained" optimization problems for model steering and adaptation. However, solving such problems remains largely underexplored and is particularly challenging due to interference between the primary objective and constraint objectives during optimization. In this paper, we propose a subspace control framework for constrained model training. Specifically, (i) we first analyze, from a model merging perspective, how spectral cross-task interference arises and show that it can be resolved via a one-shot solution that orthogonalizes the merged subspace; (ii) we establish a connection between this solution and gradient orthogonalization in the spectral optimizer Muon; and (iii) building on these insights, we introduce SIFT (spectral interference-free training), which leverages a localization scheme to selectively intervene during optimization, enabling controllable updates that mitigate objective–constraint conflicts. We evaluate SIFT across four representative applications: (a) machine unlearning, (b) safety alignment, (c) text-to-speech adaptation, and (d) hallucination mitigation. Compared to both control-based and control-free baselines, SIFT consistently achieves substantial and robust performance improvements across all tasks.

Getting Started

This repository is organized into four task-specific modules:

  • unlearning
  • safety
  • speech
  • hallucination

Unlearning

Environment Setup

cd unlearning
conda env create -f environment.yml
conda activate <env_name>

Usage

bash unlearn_sift_run.sh

Safety

Environment Setup

cd safety
conda env create -f environment.yml
conda activate <env_name>

Usage

bash safety_sift_run.sh

Speech

Environment Setup

cd speech
conda env create -f environment.yml
conda activate <env_name>

Usage

bash speech_sift_run.sh

Hallucination

Environment Setup

cd hallucination
conda env create -f environment.yml
conda activate <env_name>

Usage

bash hallucination_sift_run.sh

Download Models

To directly using our unlearned model, please refer to our HuggingFace Collection:

Contributors

Cite This Work

Published Soon ! 

Any problem about the code please contact the wangc168@msu.edu directly!

About

[Arxiv] Official repo for "Subspace Control: Turning Constrained Model Steering into Controllable Spectral Optimization"

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors