arXiv:2503.17272 공식 코드 · Papers with Code

Revisiting End-To-End Sparse Autoencoder Training: A Short Finetune Is All You Need

Adam Karvonen

제출 2025-03-21

원문 초록

Sparse autoencoders (SAEs) are widely used for interpreting language model activations. A key evaluation metric is the increase in cross-entropy loss between the original model logits and the reconstructed model logits when replacing model activations with SAE reconstructions. Typically, SAEs are trained solely on mean squared error (MSE) when reconstructing precomputed, shuffled activations. Recent work introduced training SAEs directly with a combination of KL divergence and MSE ("end-to-end" SAEs), significantly improving reconstruction accuracy at the cost of substantially increased computation, which has limited their widespread adoption. We propose a brief KL+MSE fine-tuning step applied only to the final 25M training tokens (just a few percent of typical training budgets) that achieves comparable improvements, reducing the cross-entropy loss gap by 20-50%, while incurring minimal additional computational cost. We further find that multiple fine-tuning methods (KL fine-tuning, LoRA adapters, linear adapters) yield similar, non-additive cross-entropy improvements, suggesting a common, easily correctable error source in MSE-trained SAEs. We demonstrate a straightforward method for effectively transferring hyperparameters and sparsity penalties between training phases despite scale differences between KL and MSE losses. While both ReLU and TopK SAEs see significant cross-entropy loss improvements, evaluations on supervised SAEBench metrics yield mixed results, with improvements on some metrics and decreases on others, depending on both the SAE architecture and downstream task. Nonetheless, our method may offer meaningful improvements in interpretability applications such as circuit analysis with minor additional cost.

함께 살펴볼 논문

공통 태그를 근거로 연결했습니다. 실제 인용 관계나 논문의 우수성을 뜻하지 않습니다.

arXiv:2503.05840v3cs.LG공통 태그 All공식 코드 · Papers with Code

슬림 어텐션: 손실 없이 컨텍스트 메모리를 절반으로 줄이다 -- MHA에는 K-캐시만 있으면 된다

Slim attention: cut your context memory in half without loss -- K-cache is all you need for MHA

슬림 어텐션(slim attention)은 MHA(멀티 헤드 어텐션)를 사용하는 트랜스포머 모델의 컨텍스트 메모리 크기를 2배 줄이며, 큰 컨텍스트 윈도우에서 추론 속도를 최대 2배까지 높일 수 있다. 슬림 어텐션은 표준 어텐션 메커니즘을 수학적으로 동일하게 정확히 구현한 것이므로 모델 정확도를 저하시키지 않는다. 다시 말해, 슬림 어텐션은 컨텍스트 메모리를 2배로 무손실 압축한다. 인코더-디코더 트랜스포머의 경우 컨텍스트 메모리 크기를 더욱 줄일 수 있다. 예를 들어 Whisper 모델에서는 슬림 어텐션이 컨텍스트 메모리를 8배 줄이며, 예컨대 배치 크기 64에서 토큰 생성 속도를 5배 높일 수 있다. 또한 예를 들어 T5-11B 모델에서는 MHA 투영 차원이 임베딩 차원보다 크기 때문에 메모리를 32배 줄일 수 있다. 코드와 더 많은 트랜스포머 기법은 https://github.com/OpenMachine-ai/transformer-tricks 를, 본 논문의 유튜브 영상은 https://www.youtube.com/watch?v=uVtk3B6YO4Y 를 참조하라.

arXiv:2502.06806v5cs.LG공통 태그 All공식 코드 · Papers with Code

폐쇄형 모델 적응에 필요한 것은 로짓뿐이다

Logits are All We Need to Adapt Closed Models

많은 상용 대규모 언어 모델(LLM)은 종종 폐쇄형(closed-source)이어서, 개발자가 특정 응용에 맞게 콘텐츠 생성을 정렬(alignment)하기 위해 프롬프트 튜닝에만 의존하게 제한된다. 이러한 모델은 현재 토큰 로짓에 대한 접근을 제공하지 않지만, 그러한 접근이 가능하다면 프롬프트 엔지니어링을 넘어선 더 강력한 적응(adaptation) 기법을 가능하게 할 것이라고 주장한다. 본 논문에서는 로짓 접근과 소량의 태스크별 데이터가 주어졌을 때, 블랙박스 LLM을 응용별 콘텐츠 생성 방향으로 효과적으로 유도할 수 있는 토큰 수준 확률 재가중(reweighting) 프레임워크를 제안한다. 우리 접근법은 다음 토큰 예측을 지도 분류(supervised classification)의 관점에서 본다. 블랙박스 LLM을 태스크별 데이터와 정렬하는 문제를 레이블 노이즈 보정(label noise correction) 문제로 형식화할 수 있음을 보이며, 이는 로짓만으로 동작하는 자기회귀(autoregressive) 확률 재가중 모델인 Plugin 모델로 이어진다. 태스크 적응을 위해 로짓 재가중만으로 충분한 이유에 대한 이론적 근거를 제공한다. 다양한 데이터셋, LLM, 재가중 모델을 사용한 광범위한 실험은 본 방법의 효과를 보여 주며, 폐쇄형 모델에서 토큰 로짓에 대한 더 넓은 접근을 촉구한다.

토론

이 논문과 연결된 포럼 글이 아직 없습니다.