神经谱容量:仅从网络规范测量和设计架构
研究论文 · 2026/09/25
现代Transformer设计与压缩本质上是在预算下分配容量。标准标量#Params和#FLOPs捕捉了规模和计算量,但未反映架构结构:两个参数预算相同但深度-宽度、头数或FFN分配不同的架构会得到相同评分,却表现不同。我们提出神经谱容量(NSC),一种基于每个权重矩阵奇异值谱的闭式标量。在标准随机初始化下,Marchenko-Pastur定律使得NSC仅从架构规格即可计算,无需模型实例化、数据或梯度。其逐层可加结构支持NSC-DP,一种精确动态规划求解器,可在CPU上数秒内返回在资源约束下全局最大化NSC的架构——这是对现有免训练代理的黑盒搜索无法提供的保证。实证上,NSC在七个Transformer和CNN系列中的排序上优于#Params、#FLOPs和代表性免训练代理(在FlexiBERT上,对于#Params差异小于10%的配对,τ=0.505,而#Params降至0.082);NSC-DP在WikiText-103上2秒内发现一个Transformer-XL架构,击败人工设计基线;并将LLaMA-7B修剪为八个常识推理任务上最佳的5.7B模型,无需任何校准数据,比最强的免训练代理基线快约5900倍。
该研究提出了一种仅从架构规格即可计算的新容量度量,无需训练或数据,并能精确优化架构,在多个任务上显著优于现有方法,为Transformer设计与压缩提供了高效且理论保证的新途径。
Modern Transformer design and compression both reduce to allocating capacity under a budget. The standard scalars for these decisions, #Params and #FLOPs, capture size and compute but not architectural structure: two architectures with identical parameter budgets but different depth-width, head, or FFN allocations receive identical scores yet behave differently. We propose Neural Spectral Capacity (NSC), a closed-form scalar grounded in the singular-value spectrum of each weight matrix. Under standard random initialization, the Marchenko-Pastur law renders NSC computable from the architectural specification alone, with no model instantiation, data, or gradients. Its layer-wise additive structure admits NSC-DP, an exact dynamic-programming solver returning the architecture globally maximizing NSC under resource constraints in seconds on a CPU -- a guarantee that black-box search over existing training-free proxies cannot provide. Empirically, NSC outperforms #Params, #FLOPs, and representative training-free proxies in ranking across seven Transformer and CNN families (on FlexiBERT, τ= 0.505 on pairs differing in #Params by less than 10%, where #Params collapses to 0.082); NSC-DP discovers a Transformer-XL architecture on WikiText-103 that beats the human-designed baseline in 2 seconds; and prunes LLaMA-7B to the best 5.7B model across eight commonsense reasoning tasks without any calibration data, about 5900x faster than the strongest training-free proxy baseline.