Nested Sparsity for Scalable Pretraining and Continual Learning

Tianzhe Chu, Druv Pai, Yi Ma

arXiv:2610.31818 · 2026-10-27 공개 · arXiv · PDF

transformer long-context mixture-of-experts model-scaling continual-learning language-model-pretraining nested-sparsity conditional-computation

Abstract

Mixture-of-experts (MoE) transformers, the standard backbone for modern large-scale deep learning, employ conditional computation: only a sparse subset of model weights is used in each forward pass. In MoE transformers, this sparsity arises in the MoE operator, which generalizes the multi-layer perceptron in the classical transformer. In this work, we explore an alternative mechanism for conditional computation that analogously generalizes the attention operator. The sparsity induced by this mechanism naturally nests (i.e., hierarchically composes) with the sparsity induced by the MoE operator. We show that a transformer employing this nested sparsity mechanism, which we call Nestor, performs better than a conventional MoE transformer at equal compute and equal sparsity in language model pretraining. We also show that Nestor is well-suited for continual pretraining: it can be adapted to longer contexts more effectively than conventional MoEs, as well as adapt more efficiently to new domains while forgetting less on old domains. Furthermore, we demonstrate that these benefits persist as model size, dataset size, and context length grow. Our results demonstrate the potential of alternative conditional computation mechanisms for deep neural network architectures. Code and checkpoints are available on GitHub at https://github.com/Ma-Lab-Berkeley/Nestor .

한국어 요약

한 줄 요약

Nestor는 MoE와 attention에 중첩된 스파르시티를 적용한 트랜스포머로, 학습 효율과 지속 학습 성능을 향상시킨다.

핵심 기여도

핵심 아이디어

기존 MoE 트랜스포머는 MLP 부분에만 스파르시티를 적용하지만, Nestor는 attention 메커니즘에도 스파르시티를 도입하여 계산 효율성을 극대화한다. 이는 attention에서 키-쿼리 매칭 시 일부 토큰만 선택적으로 처리하도록 하는 방식이다. 이 중첩된 스파르시티는 계산 부담을 줄이면서도 모델 표현력이 유지되도록 설계되었다. 특히, 이 구조는 지속 학습 시 새로운 도메인 학습과 이전 도메인 정보 유지 사이의 균형을 더 잘 맞춘다.

기술적 접근법

주요 결과

의의 및 한계

Nestor는 트랜스포머의 조건 계산 메커니즘을 재정의하며, 효율적인 대규모 모델 학습과 지속 학습을 가능하게 한다. 특히, 이중 스파르시티 구조는 기존 MoE의 한계를 보완할 수 있는 잠재력을 보인다. 그러나, 스파르시티 적용이 모델의 복잡도를 증가시키며, 특정 도메인에서는 성능 차이가 미미할 수 있다.

실용적 활용

Nestor는 대규모 언어 모델의 효율적인 사전 학습과 지속 학습에 적합하며, 특히 데이터 도메인 변화가 빈번한 산업(예: 고객 지원, 콘텐츠 생성)에서 유용할 수 있다. 또한, 메모리와 계산 자원이 제한된 환경에서의 모델 배포에도 활용 가능하다.