논문 해설
DB-KSVD: Scalable Alternating Optimization for Disentangling High-Dimensional Embedding Spaces
DB-KSVD: 고차원 임베딩 공간을 분리하기 위한 확장 가능한 교대 최적화
- 연구 문제 고차원 트랜스포머 임베딩의 dictionary learning은 SAE의 단순한 선형 encoder가 충분한지 불명확한 상태에서 대규모 확장이 필요합니다.
- 연구 방법 DB-KSVD는 고전적인 KSVD를 Matching Pursuit 기반 희소 부호화, 배치 방식의 dictionary update, Lanczos 고유벡터 계산으로 확장하며 Matryoshka 구조를 추가한 변형도 제안합니다.
- 주요 결과 Gemma-2-2B의 SAEBench 평가에서 DB-KSVD는 SAE 기반 방법과 경쟁력 있는 결과를 보였으나 autointerpretability에서는 차이가 있었고, DINOv2-B 이미지 실험에서는 variance explained가 높고 sparse probing은 낮았습니다.
문제 설정: 고차원 임베딩의 해체
트랜스포머 임베딩을 단일 의미 특징으로 분해하려면 고차원 데이터와 많은 샘플을 다룰 수 있는 dictionary learning 알고리즘이 필요합니다. 최근에는 sparse autoencoder(SAE)가 이 목적으로 널리 쓰이지만, SAE는 희소 부호화 부문제를 단순한 선형 encoder로 해결합니다. 희소 부호화는 NP-hard로 알려져 있으므로, SAE가 충분한 해를 찾는지 아니면 더 정교한 최적화가 더 나은 해를 찾을 수 있는지는 명확하지 않습니다. 이 논문은 이 질문을 확인하기 위해 고전적인 KSVD 알고리즘을 수백만 개 샘플과 수천 차원 규모로 확장한 Double-Batch KSVD(DB-KSVD)를 제안합니다.
원문은 DB-KSVD를 기존 KSVD의 이론적 기반을 유지하면서 대규모 데이터에 맞춘 방법으로 설명합니다.
희소 부호화와 dictionary 갱신의 기본 구조
Dictionary learning은 데이터 행렬 Y가 dictionary D와 희소 계수 행렬 X의 곱으로 근사된다고 보고, 각 열이 단위 노름을 갖는 D와 열마다 0이 아닌 원소가 최대 k개인 X를 찾는 문제입니다. 이 문제는 두 단계를 번갈아 수행하는 교대 최적화로 풀리며, 하나는 고정된 D에서 각 샘플의 희소 벡터를 찾는 sparse encoding이고 다른 하나는 X의 구조를 고정한 채 D의 원소를 갱신하는 dictionary update입니다. KSVD는 dictionary update에서 각 원소에 해당하는 잔차 행렬의 최대 특이벡터를 사용합니다. 원문은 sparse encoding의 근사 방법으로 Matching Pursuit를 채택하며, 이 방법은 잔차와 dictionary 원소의 내적이 최대인 원소를 반복 선택하는 방식이라고 설명합니다.
희소성과 coherence가 식별 가능성에 미치는 영향
원문은 희소성 제약이 없으면 dictionary learning이 잘 정의되지 않으며, 희소성 제약을 주더라도 식별 가능성은 차원, 샘플 수, 희소성 k, dictionary의 incoherence에 의존한다고 설명합니다. 여기서 coherence는 서로 다른 dictionary 원소 사이의 최대 내적 절댓값으로 정의되며, 이 값이 작을수록 원소들이 더 직교에 가깝습니다. 원문은 coherence가 작을수록 희소 벡터를 복원할 수 있는 최대 k가 커진다는 조건을 제시하고, Welch bound에 따라 최대 직교성의 coherence도 차원과 원소 수에 의해 하한이 정해진다고 밝힙니다. 다만 이 절의 식은 원문이 제시한 충분조건과 하한을 구분해 읽어야 하며, 원문은 이 분석이 RIP처럼 더 세밀한 지표를 대체하지 않는다는 한계도 함께 적습니다.
DB-KSVD의 확장 구조: 병렬 Matching Pursuit와 배치 갱신
DB-KSVD는 샘플 수가 많을 때 계산 병목을 줄이기 위해 여러 수준의 계산 재구성을 사용합니다. Sparse encoding에서는 같은 dictionary를 여러 샘플에 사용하므로 D의 전치와 D의 곱 D^T D, 그리고 D^T Y를 미리 계산합니다. 원문은 이렇게 하면 각 샘플의 반복이 최댓값 선택, 벡터 인덱싱, 벡터 덧셈으로 줄어든다고 설명합니다. Dictionary update에서는 원래 KSVD의 순차 갱신을 w개의 작업자 단위 배치로 나누어 병렬화하고, 각 원소에 대해 고유벡터 계산을 Lanczos 알고리즘으로 수행합니다. 원문은 이 변형이 원래 KSVD와 수학적으로 동일하지 않다고 명시하면서도, 실험에서 수렴 속도가 크게 나빠지지 않았다고 보고합니다.
샘플이 메모리 한계를 넘는 경우에는 전체 데이터 대신 배치를 사용하는 outer batching을 적용합니다.
Matryoshka 구조로 coherence를 줄이는 변형
원문은 KSVD가 기본적으로 coherence가 높은 dictionary를 만들며, 특히 k가 작을 때 그 경향이 강하다고 보고합니다. 이를 줄이기 위해 Matryoshka 구조를 도입합니다. 이 방식은 dictionary 원소를 지수적으로 증가하는 그룹으로 나누고 각 그룹에 같은 몫의 k를 배정합니다. 학습 때는 첫 그룹을 먼저 맞춘 뒤 남은 잔차에 다음 그룹을 학습하는 순서를 반복하며, 평가 때는 전체 dictionary에 대해 한 번의 sparse encoding을 수행한다고 원문은 설명합니다. 원문은 이 변형이 계층적 inductive bias를 주려는 것이며, 실제 coherence 감소 효과는 이후 실험에서 확인한다고 적습니다.
Gemma-2-2B와 Pythia-160M에서의 SAEBench 평가
언어 모델 실험에서는 Gemma-2-2B와 Pythia-160M의 임베딩을 Pile Uncopyrighted 데이터셋에서 얻었으며, Gemma-2-2B의 차원은 2304이고 Pythia-160M의 차원은 768입니다. 학습 설정은 dictionary 크기 m이 4096 또는 16384, 희소성 k가 20, 40, 80이며, 배치 크기 2^16으로 40회 반복하는 것입니다. 원문은 SAEBench의 여섯 지표 중 Loss Recovered, Autointerpretability, Absorption, Sparse Probing, Spurious Correlation Removal, RAVEL을 사용합니다.
Gemma-2-2B의 m=4096 결과에서 DB-KSVD는 Standard ReLU SAE보다 autointerpretability와 한 조건의 sparse probing을 제외한 대부분의 지표에서 높게 보고되며, 일부 SAE 변형과도 대체로 경쟁력이 있지만 autointerpretability에서는 차이가 있습니다. 이 결과는 해당 모델과 설정에서 얻은 것입니다.

Figure 8 .Mean relative error (Eq. (6)) for SAEBench training (Section 5) on the Gemma-2-2B model plotted against iterations.
원문 · CC BY 4.0 · Romeo Valentin, Sydney M. Katz, Vincent Vanhoucke, Mykel J. Kochenderfer · DB-KSVD: Scalable Alternating Optimization for Disentangling High-Dimensional Embedding Spaces · 원문 그림 인용 · 원본 PDF 18쪽에서 그림 영역을 추출했습니다.
Figure 9 .Variance explained (Eq. (7)) for SAEBench training (Section 5) on the Gemma-2-2B model plotted against iterations.
원문 · CC BY 4.0 · Romeo Valentin, Sydney M. Katz, Vincent Vanhoucke, Mykel J. Kochenderfer · DB-KSVD: Scalable Alternating Optimization for Disentangling High-Dimensional Embedding Spaces · 원문 그림 인용 · 원본 PDF 18쪽에서 그림 영역을 추출했습니다.Coherence 분석과 autointerpretability 차이의 해석
Coherence 분석은 Gemma-2-2B 임베딩으로 만든 m=4096 dictionary에서 각 원소의 최대 내적을 k별로 비교한 결과입니다. 원문은 DB-KSVD의 학습된 dictionary가 특히 작은 k에서 상대적으로 coherent하며, 거의 정렬된 원소 쌍이 두드러지게 나타난다고 보고합니다. 저자들은 이 현상이 Matryoshka 구조를 도입하는 동기가 되었고, Matryoshka 구조를 쓰면 coherence가 뚜렷하게 줄어든다고 설명합니다. 또한 저자들은 autointerpretability 차이가 이 coherence 차이와 관련되어 있을 것이라고 가설을 세우지만, 원문은 성능 차이가 sparse encoding 때문인지 dictionary 자체 때문인지는 아직 명확하지 않다고 밝힙니다.
DINOv2 이미지 임베딩 평가
이미지 실험에서는 ImageNet-1k에서 추출한 DINOv2-S와 DINOv2-B의 CLS token 임베딩으로 m=4096 dictionary를 학습합니다. 평가 지표는 variance explained, sparse probing, VLM 기반 autointerpretability로 구성됩니다. DINOv2-B의 k=32 요약 결과에서 DB-KSVD는 SAE보다 variance explained가 높게 보고되지만, sparse probing에서는 SAE가 더 높게 보고됩니다. Autointerpretability는 k=32 요약에서 SAE가 0.797, DB-KSVD가 0.802로 보고되어 큰 차이가 없습니다.
원문은 DINOv2-S에서 autointerpretability 차이가 더 크게 나타난다고 설명하며, 이는 낮은 차원 임베딩에서 SAE가 덜 적합할 수 있다는 저자들의 해석입니다.

Table 2 .DINOv2-B evaluation at sparsity k= 32. Sparse probing usesk
원문 · CC BY 4.0 · Romeo Valentin, Sydney M. Katz, Vincent Vanhoucke, Mykel J. Kochenderfer · DB-KSVD: Scalable Alternating Optimization for Disentangling High-Dimensional Embedding Spaces · 원문 그림 인용 · 원본 PDF 8쪽에서 그림 영역을 추출했습니다.
Figure 3 .Sparse decomposition of individual images.Each row shows random input image (left) with its top-5 most active dictionary features and their VLM-generated explanations (right). The sparse code (k=32) represents each image as a weighted combination of interpretable concepts. For instance, the cocker spaniel activates features related to dogs, while the honeycomb activates features for hexagonal patterns and structures.
원문 · CC BY 4.0 · Romeo Valentin, Sydney M. Katz, Vincent Vanhoucke, Mykel J. Kochenderfer · DB-KSVD: Scalable Alternating Optimization for Disentangling High-Dimensional Embedding Spaces · 원문 그림 인용 · 원본 PDF 13쪽에서 그림 영역을 추출했습니다.
Table 4 .Full DINOv2 evaluation with k-sparse probing ( ksp = 1). DB-KSVD consistently outperforms SAE on variance explained and autointerpretability; SAE outperforms DB-KSVD on sparse probing.
원문 · CC BY 4.0 · Romeo Valentin, Sydney M. Katz, Vincent Vanhoucke, Mykel J. Kochenderfer · DB-KSVD: Scalable Alternating Optimization for Disentangling High-Dimensional Embedding Spaces · 원문 그림 인용 · 원본 PDF 16쪽에서 그림 영역을 추출했습니다.
Table 5 .Sparse probing accuracy for varying numbers of features per class ksp. SAE outperforms DB-KSVD across all settings, with the gap largest atk sp = 1.
원문 · CC BY 4.0 · Romeo Valentin, Sydney M. Katz, Vincent Vanhoucke, Mykel J. Kochenderfer · DB-KSVD: Scalable Alternating Optimization for Disentangling High-Dimensional Embedding Spaces · 원문 그림 인용 · 원본 PDF 17쪽에서 그림 영역을 추출했습니다.계산 복잡도, 구현 비용, 해석의 한계
원문은 DB-KSVD가 SAE보다 알고리즘적으로 복잡해 구현이 더 어렵다고 밝힙니다. 또한 DB-KSVD는 수백만 샘플로 확장될 수 있지만, 그것만으로 disentanglement 문제가 해결되는지는 명확하지 않다고 결론에서 설명합니다. 원문의 시간 측정은 CPU와 GPU 조건에서 다른 기준선 추정과 함께 제시되며, 표의 일부 시간은 더 작은 문제에서 추정한 값입니다. 따라서 해당 속도 비교는 제시된 하드웨어와 문제 크기의 결과로 읽어야 합니다. 이미지와 언어 실험은 서로 다른 모델과 지표를 사용하므로 두 결과를 하나의 공통 프로토콜로 합칠 수 없습니다.

Table 1 .Runtime in seconds for a single batch of n= 2 16 = 65 536Gemma-2-2B embeddings. We report the fastest of 5 trials, except baseline, which is estimated based on timing results from a smaller problem. All CPU only and CPU+GPU trials are within a 10 % margin.
원문 · CC BY 4.0 · Romeo Valentin, Sydney M. Katz, Vincent Vanhoucke, Mykel J. Kochenderfer · DB-KSVD: Scalable Alternating Optimization for Disentangling High-Dimensional Embedding Spaces · 원문 그림 인용 · 원본 PDF 8쪽에서 그림 영역을 추출했습니다.
Table 3 .Runtime in seconds for a single batch of n= 2 20 = 1 048 576samples of the Gemma-2-2B embeddings. Baseline re- sults are estimated based on timing results from a smaller problem.
원문 · CC BY 4.0 · Romeo Valentin, Sydney M. Katz, Vincent Vanhoucke, Mykel J. Kochenderfer · DB-KSVD: Scalable Alternating Optimization for Disentangling High-Dimensional Embedding Spaces · 원문 그림 인용 · 원본 PDF 15쪽에서 그림 영역을 추출했습니다.논문 정보
- 저자
- Romeo Valentin, Sydney M. Katz, Vincent Vanhoucke, Mykel J. Kochenderfer
- 학회·저널
- arXiv · 프리프린트
- 최초 공개일
- 2025년 5월 24일
- 등록일
- 2026년 10월 29일
- 수정일
- 2026년 4월 29일
- 버전
- v2
- arXiv
- 2505.18441
- 분류
- cs.LG · cs.MS · stat.AP
- 원문 이용 조건
- CC BY 4.0
- 제공 범위
- 논문 정보, 해설, 허용된 원문 그림
AI 해설은 논문 원문과 별개의 설명이며 오류가 있을 수 있습니다. 원문과 그림은 각 출처의 이용 조건과 따로 표시된 권리를 따릅니다.
초록
Dictionary learning has recently emerged as a promising approach for mechanistic interpretability of large transformer models. Disentangling high-dimensional transformer embeddings requires algorithms that scale to high-dimensional data with large sample sizes. Recent work has explored sparse autoencoders (SAEs) for this problem. However, SAEs use a simple linear encoder to solve the sparse encoding subproblem, which is known to be NP-hard. It is therefore interesting to understand whether this approach is sufficient to find good solutions to the dictionary learning problem or if a more sophisticated algorithm could find better solutions. In this work, we propose Double-Batch KSVD (DB-KSVD), a scalable dictionary learning algorithm that adapts the classic KSVD algorithm. DB-KSVD is informed by the rich theoretical foundations of KSVD but scales to datasets with millions of samples and thousands of dimensions. We demonstrate the efficacy of DB-KSVD by disentangling text embeddings of the Gemma-2-2B and Pythia-160M models and evaluating on six metrics from the SAEBench benchmark, where we achieve competitive results when compared to established approaches based on SAEs. We further show similar results when disentangling image embeddings obtained from the DINOv2-S and DINOv2-B models, solidifying our findings. By matching SAE performance with an entirely different optimization approach, our results suggest that (i) SAEs do find strong solutions to the dictionary learning problem and (ii) traditional optimization approaches can be scaled to the required problem sizes, offering a promising avenue for further research. We make an implementation of DB-KSVD available at https://github.com/romeov/ksvd.jl.
원문 인용
Romeo Valentin, Sydney M. Katz, Vincent Vanhoucke, Mykel J. Kochenderfer (2025). DB-KSVD: Scalable Alternating Optimization for Disentangling High-Dimensional Embedding Spaces. arXiv:2505.18441v2. https://arxiv.org/abs/2505.18441v2
BibTeX
@misc{valentin2025ksvd,
title = {{DB-KSVD: Scalable Alternating Optimization for Disentangling High-Dimensional Embedding Spaces}},
author = {Romeo Valentin and Sydney M. Katz and Vincent Vanhoucke and Mykel J. Kochenderfer},
year = {2025},
eprint = {2505.18441},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2505.18441v2}
}