SafeDepth: Safety-Aware Token-Level Adaptive Computation
SafeDepth is a framework that learns to selectively execute or skip Transformer layers for each token based on its representation and inference stage. It addresses the issue where existing adaptive methods hurt model safety by learning to preserve performance while actively reducing harmful responses. The method uses two-stage training, including safety feedback, to find execution paths that balance quality and cost.