CAST: Compositional Analysis via Spectral Tracking for Understanding Transformer Layer Functions

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Fu, Zihao, Liao, Ming, Russell, Chris, Cai, Zhenguang G.
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866914096244326400
author Fu, Zihao
Liao, Ming
Russell, Chris
Cai, Zhenguang G.
author_facet Fu, Zihao
Liao, Ming
Russell, Chris
Cai, Zhenguang G.
contents Large language models have achieved remarkable success but remain largely black boxes with poorly understood internal mechanisms. To address this limitation, many researchers have proposed various interpretability methods including mechanistic analysis, probing classifiers, and activation visualization, each providing valuable insights from different perspectives. Building upon this rich landscape of complementary approaches, we introduce CAST (Compositional Analysis via Spectral Tracking), a probe-free framework that contributes a novel perspective by analyzing transformer layer functions through direct transformation matrix estimation and comprehensive spectral analysis. CAST offers complementary insights to existing methods by estimating the realized transformation matrices for each layer using Moore-Penrose pseudoinverse and applying spectral analysis with six interpretable metrics characterizing layer behavior. Our analysis reveals distinct behaviors between encoder-only and decoder-only models, with decoder models exhibiting compression-expansion cycles while encoder models maintain consistent high-rank processing. Kernel analysis further demonstrates functional relationship patterns between layers, with CKA similarity matrices clearly partitioning layers into three phases: feature extraction, compression, and specialization.
format Preprint
id arxiv_https___arxiv_org_abs_2510_14262
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle CAST: Compositional Analysis via Spectral Tracking for Understanding Transformer Layer Functions
Fu, Zihao
Liao, Ming
Russell, Chris
Cai, Zhenguang G.
Machine Learning
Artificial Intelligence
Computation and Language
Large language models have achieved remarkable success but remain largely black boxes with poorly understood internal mechanisms. To address this limitation, many researchers have proposed various interpretability methods including mechanistic analysis, probing classifiers, and activation visualization, each providing valuable insights from different perspectives. Building upon this rich landscape of complementary approaches, we introduce CAST (Compositional Analysis via Spectral Tracking), a probe-free framework that contributes a novel perspective by analyzing transformer layer functions through direct transformation matrix estimation and comprehensive spectral analysis. CAST offers complementary insights to existing methods by estimating the realized transformation matrices for each layer using Moore-Penrose pseudoinverse and applying spectral analysis with six interpretable metrics characterizing layer behavior. Our analysis reveals distinct behaviors between encoder-only and decoder-only models, with decoder models exhibiting compression-expansion cycles while encoder models maintain consistent high-rank processing. Kernel analysis further demonstrates functional relationship patterns between layers, with CKA similarity matrices clearly partitioning layers into three phases: feature extraction, compression, and specialization.
title CAST: Compositional Analysis via Spectral Tracking for Understanding Transformer Layer Functions
topic Machine Learning
Artificial Intelligence
Computation and Language
url https://arxiv.org/abs/2510.14262