MASCing: Configurable Mixture-of-Experts Behavior via Activation Steering Masks
summary
The gist
Mixture-of-Experts (MoE) architectures in Large Language Models (LLMs) have significantly reduced inference costs through sparse activation.
In short
MASCing is a training-free framework that allows flexible reconfiguration of Mixture-of-Experts (MoE) model behavior using sparse activation steering masks. It uses an LSTM surrogate to map routing logits to target behaviors, creating a mask applied at inference time to override expert selection for improved safety and policy compliance without retraining the model.
Key concepts
- Mixture-of-Experts (MoE)
- MoE models are large language models that use multiple specialized 'expert' sub-networks. Instead of using all parameters for every task, the model selectively activates only a small subset of these experts based on the input prompt, which makes them efficient during inference.
- Routing Logits
- These are continuous numerical scores generated by the model that determine which expert should process a specific part of an input sequence. MASCing analyzes these continuous logits sequentially to understand how routing decisions evolve over time in a conversation.
- Steering Mask
- A steering mask is a set of instructions applied during inference that selectively forces or suppresses the selection of certain experts based on the desired safety outcome. MASCing optimizes this mask using a surrogate model to guide expert choices toward specific, safe behaviors.
- LSTM Surrogate Model
- An LSTM (Long Short-Term Memory) network trained to predict downstream behavior from routing logits. It acts as a lightweight, differentiable proxy that learns the complex, temporal relationships between how the model routes tokens and what kind of output it produces.
Terminology used across episodes
This episode discusses
- MASCing: Configurable Mixture-of-Experts Behavior via Activation Steering Masks · Paper Radio
- Phi-3 Technical Report: A Highly Capable Language Model Locally on Your Phone
- Evaluating Large Language Models Trained on Code
- Persona Vectors: Monitoring and Controlling Character Traits in Language Models
- Training Verifiers to Solve Math Word Problems
- DeepSeekMoE: Towards Ultimate Expert Specialization in Mixture-of-Experts Language Models
- The Llama 3 Herd of Models · Paper Radio
- Mixtral of Experts
- Adam: A Method for Stochastic Optimization
- Building Production-Ready Probes For Gemini
- LLM Defenses Are Not Robust to Multi-Turn Human Jailbreaks Yet
- Scaling Down to Scale Up: A Guide to Parameter-Efficient Fine-Tuning
- The Assistant Axis: Situating and Stabilizing the Default Persona of Language Models
- Jailbreaking Attack against Multimodal Large Language Model
- Outrageously Large Neural Networks: The Sparsely-Gated Mixture-of-Experts Layer
- Large Language Lobotomy: Jailbreaking Mixture-of-Experts via Expert Silencing
- GateBreaker: Gate-Guided Attacks on Mixture-of-Expert LLMs
- Qwen3 Technical Report
- SafeSeek: Universal Attribution of Safety Circuits in Language Models
- NaturalReasoning: Reasoning in the Wild with 2.8M Challenging Questions
- SafeSteer: Adaptive Subspace Steering for Efficient Jailbreak Defense in Vision-Language Models
The paper
MASCing: Configurable Mixture-of-Experts Behavior via Activation Steering Masks · Read on arXiv
Radboud University · University of Bristol · Leiden University · Faculty of Electrical Engineering and Computing, University of Zagreb
Large language models (LLMs) operate under safety requirements that vary across applications and evolve with emerging threats and deployment policies. Conventional training-based interventions make adapting model behavior computationally expensive. Mixture-of-Experts (MoE) models introduce a further control challenge because each input activates only a subset of experts, coupling safety behavior to discrete routing decisions. Rapid adaption of MoE LLMs therefore requires a lightweight mechanism for identifying and controlling the routing decisions that produce the target behavior. We present MASCing (MoE Activation Steering Configuration), a framework that enables flexible configuration of safety-related MoE behavior without training the underlying model. MASCing uses an LSTM surrogate model to capture cross-layer dependencies and map routing logits to downstream behaviors. Guided by this surrogate, it identifies safety-relevant experts and optimizes a sparse steering mask to bias expert selection. This enables targeted enhancement or suppression of specific behaviors while preserving model utility. We evaluate MASCing on three contrasting safety objectives and observe consistent gains across seven MoE models. For multi-turn jailbreak defense, it improves the average defense success rate from 52.5% to 83.9%. For adult-content generation, MASCing enables models to comply with such requests that would otherwise be refused, increasing the average generation success rate from 52.6% to 82.0%. For political neutrality, MASCing makes models decline to state personal opinions on political questions, which they otherwise often give, raising the share of such questions on which they take no position from 31.8% to 75.4% while other questions remain answered. These results establish MASCing as a practical, lightweight, and flexible framework for task-specific safety configuration in MoE models.
Transcript
Introduction to the show: ident: Security Radio. Generated commentary on the latest security and cryptography papers.
Nadia: We're looking at the paper: "MASCing: Configurable Mixture-of-Experts Behavior via Activation Steering Masks".
Paper summary: Nadia: We’re looking at "MASCing: Configurable Mixture-of-Experts Behavior via Activation Steering Masks" here. The thesis is that because sparse activation makes model behavior depend on those routing decisions, we need a way to control that behavior without retraining the whole system.
Elias: It claims they use an LSTM-based surrogate model to capture both temporal patterns across token sequences and crosslayer dependencies. This lets them map those routing patterns to downstream behavioral expert circuits.
Nadia: The framework then uses that surrogate to search for safety-relevant expert circuits, and after that, they optimize a continuous steering matrix, imposing sparsity through L1 regularization and symmetric magnitude pruning.
Nadia: The paper presents a three-phase pipeline: first modeling the behavior sequentially, then creating a steering mask by optimizing a continuous matrix, and finally applying that static mask at deployment time to override the top-k expert selection only where needed.
Conclusion: Nadia: So to wrap up, "MASCing: Configurable Mixture-of-Experts Behavior via Activation Steering Masks" develops a framework that models internal representations as directions in activation space. They use an LSTM surrogate model to capture how routing logits change over token sequences.
Elias: The core contribution is using that surrogate to search for safety-relevant expert circuits and then optimizing a continuous steering matrix which they prune using L1 regularization and symmetric magnitude pruning to make it compact.
Nadia: Then they convert that discovered circuit into a static steering mask and apply it during inference, overriding the top-k expert selection only when needed, which preserves general language utility.
Priya: What does this mean for how we think about securing these large models? Does this give us a way to patch behavior on the fly?
Elias: It’s about providing a practical mechanism for targeted safety configuration without modifying model weights or incurring the cost of retraining, which is what makes it interesting in terms of deployment.
Nadia: It gives us a way to dynamically and selectively configure safety-related behavior in MoE architectures through sparse activation steering masks. It allows for flexible reconfiguration across diverse safety scenarios.
Elias: The implication is that we don't need full fine-tuning just to adjust model behavior, which is a cost saver when you have models this large.
More episodes
- The day in conversation for 2026-12-05
- Daily Summary for 2026-12-05
- 2607.15118-Automated Template-free Synthesis of Instruction-Centric Leakage Contracts for Black-Box CPUs
- 2610.37722-FVH-Bench: Evaluating Image Generator Safety Beyond Overtly Harmful Imagery
- 2512.23849-Security Without Detection: Economic Denial as a Primitive for Edge and IoT Defense
- 2605.05807-LCC-LLM: Leveraging Code-Centric Large Language Models for Malware Attribution
- 2607.02932-PromptPET: Prompt Obfuscation Against Profiling by AI Agents
- 2309.05646-A Novel Supervised Deep Learning Solution to Detect Distributed Denial of Service (DDoS) attacks on Edge Systems using Convolutional Neural Networks (CNN)
- The day in conversation for 2026-12-04
- Daily Summary for 2026-12-04