METAL LAB

What AstroPT knows about galaxies, and what that can teach us about LLMs

arXiv:2608.226142026-08-22

研究者用一个在星系图像上训练的AI(AstroPT)当作标准答案,来检验解读语言模型内部结构的方法是否真的找到了正确的概念

研究团队用数百万张星系图像训练了一个类似GPT或BERT的Transformer模型AstroPT,提议将其作为校准可解释性研究方法的测试场,这些方法通常直接用于语言模型。因为天文学中星系属性之间的难度顺序和相互关系都是已知的,研究者可以检验模型学到的内部表示是否按正确顺序出现、是否体现出正确的物理关系。结果显示星系属性确实按已知的难度顺序被模型学会,探针方向也重现了已知物理关系的正负号结构。

METAL LAB 解读图

把AstroPT当作标准答案来校准可解释性方法

证据状态已报告实测结果

  1. 输入:星系图像块数百万张星系图像被切分为有序的图像块序列,用类GPT(AR)或类BERT(MAE)的自监督方式训练
  2. 已知的难度阶梯r波段星等(几乎直接来自像素)、红移(需要多波段)、比恒星形成率(需要推断),三者难度顺序在天体物理学中已知
  3. 探针检验出现顺序线性探针测量每个属性在训练进程和网络深度上何时变得可解码,并检验是否符合已知难度顺序
  4. 探针检验关系几何结构用探针方向的余弦相似度检验光度-质量、比恒星形成率-质量、红移-质量等已知正负号关系是否出现在模型内部
  5. 质量残差的因果检验检验光度无法解释的质量部分是否被单独表示,并用激活替换实验探索这部分信息是否被模型实际使用
这是 METAL LAB 制作的解读图,并非论文作者提供的原图。

他们做了什么

  1. 几乎可以直接从像素读出的量(波段星等)在训练早期、网络浅层就能被解码出来,而需要多波段或推断才能得到的量(红移、比恒星形成率)则要到训练后期、网络更深处才能解码出来。
  2. 这种出现顺序在类GPT的自回归(AR)训练和类BERT的掩码自编码(MAE)训练两种目标下都一致,而且在1M、21M、100M三种模型规模下顺序也不变,模型变大只是提升分数而不改变顺序。
  3. 比较线性探针(从模型隐藏表示中读出特定属性的简单线性回归)学到的方向向量,发现光度与恒星质量方向高度一致,比恒星形成率与恒星质量方向相反,红移与恒星质量方向正向一致,这与已知星系物理学中的正负号结构相符。
  4. 光度无法解释的恒星质量'残差'部分,在模型中被表示为一个几乎与光度方向垂直(独立)的方向,说明模型并未把质量简单地当作光度的替代品。
Figure 1: Overview of AstroPT. Galaxy images are split into ordered patch sequences and used to train a GPT (pictured here) or BERT-style transformer via a patch reconstruction objective. The learned embeddings are then used for downstream probes of galaxy properties.
Figure 1: Overview of AstroPT. Galaxy images are split into ordered patch sequences and used to train a GPT (pictured here) or BERT-style transformer via a patch reconstruction objective. The learned embeddings are then used for downstream probes of galaxy properties.
Figure 2: Concepts emerge in a fixed, difficulty-ordered sequence. Held-out mag​r, redshift, and sSFR R2 as a function of pre-training progress and model depth. Directly recoverable photometric information (r-band magnitude) is decoded earliest and most strongly; redshift follows more weakly; specific star formation rate remains weakly retrievable after one epoch at our model parameter counts. Likewise, our directly recoverable quantities peak in shallow layers, while integrated and inferred quantities peak deeper. The order is fixed across model size, with capacity raising the attained score rather than reordering the properties.
Figure 2: Concepts emerge in a fixed, difficulty-ordered sequence. Held-out mag​r, redshift, and sSFR R2 as a function of pre-training progress and model depth. Directly recoverable photometric information (r-band magnitude) is decoded earliest and most strongly; redshift follows more weakly; specific star formation rate remains weakly retrievable after one epoch at our model parameter counts. Likewise, our directly recoverable quantities peak in shallow layers, while integrated and inferred quantities peak deeper. The order is fixed across model size, with capacity raising the attained score rather than reordering the properties.
Table 1: Final-checkpoint bootstrap metrics across objective and model-size choices. Here ℓr=−0.4​Mr is the absolute r-band log-luminosity proxy, M⋆ is stellar mass, and ϵM|ℓr is the residual mass at fixed luminosity. Intervals are 95% bootstrap intervals.
ConfigR2​(ℓr)R2​(M⋆)R2​(ϵM|ℓr)R2​(log⁡sSFR)R2​(z)
AR 1M0.422 [0.420, 0.424]0.535 [0.533, 0.536]0.101 [0.099, 0.104]0.258 [0.256, 0.260]0.410 [0.408, 0.412]
AR 21M0.499 [0.496, 0.501]0.610 [0.608, 0.612]0.109 [0.104, 0.114]0.298 [0.295, 0.302]0.503 [0.499, 0.506]
AR 100M0.530 [0.526, 0.533]0.639 [0.636, 0.641]0.110 [0.103, 0.116]0.309 [0.304, 0.313]0.573 [0.568, 0.576]
MAE 1M0.356 [0.354, 0.358]0.454 [0.452, 0.456]0.085 [0.082, 0.087]0.248 [0.245, 0.250]0.328 [0.326, 0.330]
MAE 21M0.350 [0.347, 0.354]0.446 [0.443, 0.449]0.070 [0.065, 0.075]0.228 [0.224, 0.232]0.323 [0.319, 0.327]
MAE 100M0.386 [0.381, 0.390]0.488 [0.484, 0.491]0.080 [0.075, 0.085]0.246 [0.243, 0.250]0.349 [0.343, 0.354]
Figure 3: Probe geometry recovers the signs of known galaxy relationships. Across model sizes, luminosity and stellar-mass directions are strongly aligned, sSFR and stellar-mass directions are anti-aligned, redshift and stellar-mass directions are positively aligned, and the mass residual is much less aligned with luminosity than stellar mass is, matching the known sign structure of these relationships.
Figure 3: Probe geometry recovers the signs of known galaxy relationships. Across model sizes, luminosity and stellar-mass directions are strongly aligned, sSFR and stellar-mass directions are anti-aligned, redshift and stellar-mass directions are positively aligned, and the mass residual is much less aligned with luminosity than stellar mass is, matching the known sign structure of these relationships.
Figure 4: Label-space galaxy relationships used as baselines for the representation-geometry analysis. Left: specific star formation rate is anti-correlated with stellar mass. Middle: redshift is positively correlated with stellar mass. Right: absolute r-band luminosity is strongly correlated with stellar mass. These label-space relationships set the expected signs for the probe-direction analysis in the main text.
Figure 4: Label-space galaxy relationships used as baselines for the representation-geometry analysis. Left: specific star formation rate is anti-correlated with stellar mass. Middle: redshift is positively correlated with stellar mass. Right: absolute r-band luminosity is strongly correlated with stellar mass. These label-space relationships set the expected signs for the probe-direction analysis in the main text.

研究结果

  • r波段星等(可直接观测的量)在训练早期和浅层就被最早、最强地解码出来,红移次之,比恒星形成率在一个训练轮次内只能被弱解码(图2)。
  • 这种难度顺序在AR和MAE两种训练目标下都保持不变,在1M/21M/100M三种模型规模下也保持不变,模型容量增大只提升平均探针表现而不改变顺序。
  • 探针方向比较显示光度与恒星质量方向高度一致,比恒星形成率与恒星质量方向反向一致,红移与恒星质量方向正向一致,这与已知星系物理关系的正负号结构相符(图3,并与图4的标签空间基准对照)。
  • 光度无法解释的质量残差比光度和恒星质量本身更难解码(R2更低),其探针方向与光度方向几乎垂直,远不如恒星质量方向与光度方向的一致程度(图10、图11、表1)。
  • 在光度相近但质量残差不同的星系对之间进行激活替换(activation patching)实验时,残差预测朝源星系方向移动的频率高于相同残差或打乱探针的对照组(图12)。
Figure 5: Training-time relationship geometry under the AR objective. Left: the sSFR direction is anti-aligned with the stellar-mass direction through training. Right: the redshift direction is positively aligned with the stellar-mass direction through training. The signs are also stable across model sizes, suggesting that the relationships are not confined to our fully pre-trained models.
Figure 5: Training-time relationship geometry under the AR objective. Left: the sSFR direction is anti-aligned with the stellar-mass direction through training. Right: the redshift direction is positively aligned with the stellar-mass direction through training. The signs are also stable across model sizes, suggesting that the relationships are not confined to our fully pre-trained models.
Figure 6: Training-time relationship geometry under the MAE objective. Left: the sSFR direction is anti-aligned with the stellar-mass direction through training. Right: the redshift direction is positively aligned with the stellar-mass direction through training. The signs are also stable across model sizes, suggesting that the relationships are not confined to our fully pre-trained models.
Figure 6: Training-time relationship geometry under the MAE objective. Left: the sSFR direction is anti-aligned with the stellar-mass direction through training. Right: the redshift direction is positively aligned with the stellar-mass direction through training. The signs are also stable across model sizes, suggesting that the relationships are not confined to our fully pre-trained models.

可应用场景

  • 先在已知标准答案的领域(天文学)中测试概念何时在训练中出现、在网络哪一层出现的方法,再应用到语言模型上。
  • 将探针方向是否真正捕捉到概念间关系的验证方法,推广到其他科学基础模型上。
  • 把星系数据集用作激活替换等因果追踪技术的基准测试。
Figure 7: Layer-wise relationship geometry under the AR objective. The luminosity and stellar-mass directions remain strongly aligned across layers, the sSFR and stellar-mass directions remain anti-aligned, and the redshift direction is positively aligned with both mass and luminosity. This suggests the relationship geometry is distributed across layers rather than confined to the final layer.
Figure 7: Layer-wise relationship geometry under the AR objective. The luminosity and stellar-mass directions remain strongly aligned across layers, the sSFR and stellar-mass directions remain anti-aligned, and the redshift direction is positively aligned with both mass and luminosity. This suggests the relationship geometry is distributed across layers rather than confined to the final layer.
Figure 8: Layer-wise relationship geometry under the MAE objective. Luminosity and stellar mass remain strongly aligned across layers, sSFR and stellar mass remain anti-aligned, and redshift remains positively aligned with both mass and luminosity. The same sign structure appears under MAE and AIM, supporting the claim that the recovered geometry is not tied to a single training objective.
Figure 8: Layer-wise relationship geometry under the MAE objective. Luminosity and stellar mass remain strongly aligned across layers, sSFR and stellar mass remain anti-aligned, and redshift remains positively aligned with both mass and luminosity. The same sign structure appears under MAE and AIM, supporting the claim that the recovered geometry is not tied to a single training objective.

局限与待验证事项

  • 星系不是语言,图像块也不是离散的词元(token),论文并不主张天文数据本身对大语言模型预训练有用。
  • 分析属于相关性层面,用作标准答案的物理标签本身是基于星表推断得到的,可能带有自身误差。
  • 预训练仅进行了一个训练轮次,且模型规模范围较小,只测试了{1M, 21M, 100M}三种参数量。
  • 线性探针只能揭示嵌入空间中线性可读取的信息,可能遗漏以非线性方式编码的结构。
  • 关于质量残差的激活替换实验被作者描述为探索性分析,需要进一步验证。
Figure 9: Empirical mass–luminosity relation used to define the residual mass at fixed luminosity. The horizontal axis is a log-luminosity proxy from absolute r-band magnitude, ℓr=−0.4​Mr. The dashed line is the linear fit on the training split, and color shows the residual ϵM|ℓr.
Figure 9: Empirical mass–luminosity relation used to define the residual mass at fixed luminosity. The horizontal axis is a log-luminosity proxy from absolute r-band magnitude, ℓr=−0.4​Mr. The dashed line is the linear fit on the training split, and color shows the residual ϵM|ℓr.
Figure 10: Residual mass-at-fixed-luminosity remains weak across objective choices. Each panel reports final-checkpoint, best-layer R2 for the luminosity proxy ℓr, stellar mass M⋆, and the residual ϵM|ℓr, with error bars showing 95% bootstrap confidence intervals (300 resamples). Luminosity and stellar mass are consistently easier to decode, while the residual remains weak across AR/MAE objectives.
Figure 10: Residual mass-at-fixed-luminosity remains weak across objective choices. Each panel reports final-checkpoint, best-layer R2 for the luminosity proxy ℓr, stellar mass M⋆, and the residual ϵM|ℓr, with error bars showing 95% bootstrap confidence intervals (300 resamples). Luminosity and stellar mass are consistently easier to decode, while the residual remains weak across AR/MAE objectives.

为什么重要

关于语言模型的可解释性研究常问概念何时在训练中出现、探针是否找到了真实结构,但语言本身缺乏可供验证的标准答案。天文学中概念的难度顺序和相互关系是已知的,这项研究相当于提供了一份标准答案,用来校准那些平常盲目应用在大语言模型上的解读方法。

Figure 11: Residual probe directions are separated from the dominant luminosity-mass axis, with error bars showing 95% bootstrap confidence intervals (300 resamples). Across objective choices, luminosity and stellar-mass directions remain strongly aligned. The residual direction is much less aligned with luminosity than the stellar-mass direction is, indicating that the residual probe is not reading out the same luminosity direction. The separation is strongest in the larger AR models and weaker in the MAE setting.
Figure 11: Residual probe directions are separated from the dominant luminosity-mass axis, with error bars showing 95% bootstrap confidence intervals (300 resamples). Across objective choices, luminosity and stellar-mass directions remain strongly aligned. The residual direction is much less aligned with luminosity than the stellar-mass direction is, indicating that the residual probe is not reading out the same luminosity direction. The separation is strongest in the larger AR models and weaker in the MAE setting.
Figure 12: Causal tracing of the mass-luminosity residual. Patching activations between galaxy pairs with similar luminosity but different mass residual moves the residual prediction toward the source more often than same-residual and shuffled-probe controls.
Figure 12: Causal tracing of the mass-luminosity residual. Patching activations between galaxy pairs with similar luminosity but different mass residual moves the residual prediction toward the source more often than same-residual and shuffled-probe controls.

本文术语

  • AstroPT · 将星系图像切分成一系列图像块,用类似GPT或BERT的自监督方式训练的Transformer模型
  • 线性探针 · 在模型冻结的隐藏表示上拟合的简单线性回归,用来检验某个目标属性能否被读出
  • 红移 · 因宇宙膨胀导致星系光线波长被拉长的程度,需要多个波段或光谱才能估算
  • 比恒星形成率(sSFR) · 恒星形成速率除以恒星质量,是一个需要推断得到的间接物理量
  • 余弦相似度 · 衡量两个方向向量是否指向相近方向的指标,正值表示方向相近,负值表示方向相反

论文原文摘要(英文)

Interpretability research increasingly asks when concepts emerge during training and whether linear probes recover real structure, but in language models these claims are hard to validate because language offers little ground-truth ordering of concepts or relationships among them. We propose the use of astronomical ground truth through AstroPT, a transformer trained on millions of galaxy images, as a calibration testbed. AstroPT is an LLM-like model trained within a domain where the difficulty ordering of concepts and the relations among them are known in advance. Probing frozen representations across checkpoints, layers, model sizes, and objective choices, we find that galaxy properties emerge in a fixed order that tracks their known difficulty---quantities written almost directly into the pixels (band magnitude) become decodable early in training and shallow in the network, while multiband/spectra based and inferred quantities (such as redshift and specific star formation rate) emerge later and deeper. This order is invariant to our tested training objectives, and scales in magnitude but not in sequence with capacity. Our linear probe directions further recover the known physical structure among galaxy properties. Our findings suggest that astronomy offers a controlled sandbox for calibrating mechanistic interpretability methods we otherwise apply to LLMs blind.

作者 · UniverseTBD

在 arXiv 阅读

最新论文

全部论文 →

METAL LAB 最新报道

图片来源: UniverseTBD et al., arXiv:2608.22614, CC BY-SA 4.0