Skip to main content

Physical Interpretation of PCA

Dataset

PHY-3500 · G1 · 43,019 spectra — PCA run phy3500_pca_run_20260408T012751Z. Nothing on this page comes from the G2 runs.

This page presents the astrophysical interpretation of the Principal Component Analysis (PCA) applied to the 183 spectroscopic features of N = 43,019 LAMOST DR5 × Gaia DR3 spectra. It documents the physical meaning of each principal axis, confirmed by cross-correlation with independent Gaia DR3 parameters.

Summary of the two main axes​

PC1
Thermal Axis
Dominant effective temperature
16.9%
variance · λ=30.19
+0.831
ρ(Teff)
-0.768
ρ(GBP−GRP)
Top absolute loading
Hα EW
+0.173
Family share of top-10 |loadings|
Balmer (H) 29.7%
Ca II 9.3%
Mg / α 10.8%
Continuum 50.2%
PC2
Metallicity Axis
Chemical composition + SNR contamination
11.9%
variance · λ=21.39
-0.082
ρ([M/H])
-0.310
ρ(SNR_r)
Top absolute loading
FeH proxy
+0.205
Family share of top-10 |loadings|
Iron & metals 79.7%
Mg / α 20.3%
⚠️ ρ(SNRr) = −0.310: PC2 contains a share of instrumental variance — it is not a pure metallicity axis.

Mathematical foundations of PCA​

PCA seeks the orthogonal directions wk∈Rp\mathbf{w}_k \in \mathbb{R}^p that successively maximise the projected variance of the centred data X∈RN×p\mathbf{X} \in \mathbb{R}^{N \times p}. This problem is equivalent to diagonalising the empirical covariance matrix:

C=1N−1X⊤X∈Rp×p\mathbf{C} = \frac{1}{N-1}\mathbf{X}^\top\mathbf{X} \in \mathbb{R}^{p \times p}

The spectral theorem guarantees C=WΛW⊤\mathbf{C} = \mathbf{W}\mathbf{\Lambda}\mathbf{W}^\top with λ1≥⋯≥λp≥0\lambda_1 \geq \cdots \geq \lambda_p \geq 0. Projection onto the K first components gives scores Z=XWK\mathbf{Z} = \mathbf{X}\mathbf{W}_K.

In practice, truncated SVD is preferred: X≈UKΣKWK⊤\mathbf{X} \approx \mathbf{U}_K\mathbf{\Sigma}_K\mathbf{W}_K^\top (Lanczos algorithm for N=43,019N = 43{,}019, p=183p = 183). The Eckart-Young theorem guarantees that this truncation is the best rank-K approximation in the Frobenius norm sense:

XK=arg⁡min⁡rank(M)≤K∥X−M∥F\mathbf{X}_K = \underset{\text{rank}(M) \leq K}{\arg\min} \|\mathbf{X} - M\|_F

Explained variance​

Characteristic thresholds and reconstruction error​

The cumulative explained variance reveals the high intrinsic dimensionality of the 183-feature space: the eigenvalue spectrum decays smoothly, without a clear elbow — unlike what is observed on raw fluxes.

Individual variance — PC1 to PC10
PC1
PC2
5
10
PC1 — Thermal axis (16.9%)
PC2 — Metallicity axis (11.9%)
Cumulative-variance thresholds requiring K components
V(K) ≥ 80%
K = 51/ 183
28% of components used
V(K) ≥ 90%
K = 73/ 183
40% of components used
V(K) ≥ 95%
K = 91/ 183
50% of components used
V(K) ≥ 99%
K = 100/ 183
55% of components used
↪ UMAP and t-SNE use the first 91 components (95% threshold) as input.
K = 2
0.696
MSE(K)
28.8% captured
K = 10
0.494
MSE(K)
49.5% captured
K = 50
0.196
MSE(K)
< 80% captured
K = 91 ★
—
MSE(K) not exported
≥ 95% captured

The first 2 components capture only 28.8% of total variance (PC1: 16.9%, λ1=30.19\lambda_1 = 30.19; PC2: 12.0%, λ2=21.39\lambda_2 = 21.39). 91 components are needed to reach 95%, indicating that the spectral manifold occupies an effective space of at least ten dimensions.

This has an important practical implication: UMAP and t-SNE are applied to the first 91 PCA components (95% threshold) rather than the 183 raw features. This pre-reduction eliminates noise from late components while preserving the essential structure.


PCA eigenspectra on raw flux​

In addition to the engineered features, PCA was also applied directly to the raw flux of 10,000 LAMOST spectra (3,921 channels). The resulting eigenvectors — the eigenspectra — are interpretable as basis spectra in flux space.

Contrast with the features​

PCA on raw flux
3,921 spectral channels · 10,000 spectra
Components for 95% variance
K = 5
Top 3 cumulate
91.3%
PC1
Colour slope — T_eff
46.6%
✓
PC2
Infrared rise — K-M cool stars
31.8%
✓
PC3
LAMOST instrumental cut
12.9%
⚠
✓ Physically: adjacent pixels (Δλ~2 Å) are strongly correlated — coherence length ~10 Å. 5 components suffice!
PCA on 183 features
Engineered features · 43,019 spectra
Components for 95% variance
K = 91
Top 3 cumulate
33.5%
PC1
Thermal axis ρ(Teff)=+0.831
16.9%
✓
PC2
Metallicity axis + instrumental SNR
11.9%
✓
PC3
Mixed spectral structure
4.7%
✓
→ Features eliminate spectral redundancy but introduce genuinely orthogonal physical information: 91 components for 95%.
Interpretation of the contrast: The 183 features eliminate adjacent pixel redundancy but introduce genuinely orthogonal physical information (temperature, metallicity, gravity, chromospheric activity…). Result: intrinsic dimensionality rises from ~5 to ~91 — not a sign of inefficiency, but proof that features encode distinct physical dimensions.

Physical interpretation of the 3 first eigenspectra​

PC1 (46.6% of flux variance) — Colour slope (Teff): Dominated by a quasi-uniform continuum in the blue (3700–6500 Å) that collapses toward the red. This is the global continuum slope, directly related to effective temperature. Hot stars (A-F types) contribute positively; cool stars (K-M types) negatively.

PC2 (31.8%) — Infrared rise (cool stars): Captures the progressive flux increase toward the near-infrared (> 6500 Å). This is the distinctive signature of cool K-M stars whose blackbody emission peaks in the red.

PC3 (12.9%) — Blue/red instrumental transition: Isolates an abrupt transition around 6500–7000 Å, corresponding to the LAMOST spectrograph's blue/red arm junction. This is an instrumental artefact, not a physical property.

PC3 artefact

The presence of an instrumental artefact in PC3 (LAMOST blue/red cut 6500–7000 Å) illustrates a fundamental limitation of unsupervised PCA: it maximises total variance, including instrumental variations that can mask physical signals. This problem does not disappear in the 183 features, but is diluted across late components.

Figure reference: pca_eigenspectra.png


PC1/PC2 projection and physical interpretation​

Spearman correlations with Gaia DR3 parameters​

The following table quantifies the alignment between principal axes and independent Gaia DR3 astrophysical parameters (N = 43,019). Colour intensity is proportional to |ρ| — hover over a cell for the interpretation.

Colour intensity ∝ |ρ| :
strong positive
strong negative
moderate
weak
Gaia DR3 Parameter
Unit
ρ(PC1, ·)
ρ(PC2, ·)
Teff
K
+0.831
+0.156
log g
dex
-0.155
+0.081
[Fe/H]
dex
-0.548
-0.082
G_BP − G_RP
mag
-0.768
-0.025
SNR_r
+0.071
-0.310
A_G
mag
-0.070
+0.196
PC1 = thermal axis — ρ(Teff) = +0.831. Continuous Teff gradient (hot A-F stars on the right, cool K-M on the left).
PC2 = metallicity axis — metal indices lead its loadings. ⚠️ Partially contaminated by SNR (ρ = −0.310): instrumental artefact inherent to unsupervised PCA.

Reading the results:

The correlation ρ(PC1, Teff) = +0.831 is significant: it means that effective temperature is the dominant source of variance in the 183-feature space. This is consistent with the MK classification scheme — Balmer line strengths and continuum slope vary massively between O and M types, far beyond metallicity effects.

The correlation ρ(PC1, [Fe/H]) = −0.548 indicates a natural co-regulation: cool stars (K-M) tend to be more metal-rich than hot stars (A-F), which linear PCA inevitably absorbs into the same axis.

PC1/PC2 projection coloured by Teff​

Colouring by Teff in the PC1/PC2 space visually confirms the thermal nature of PC1: hot stars (> 7,000 K, A-F types) occupy the positive side of PC1; cool stars (< 5,000 K, K-M types) the negative side; with a continuous gradient along the main sequence.

Colouring by log g reveals a distinct branch of subgiants and giants (log g < 3.5) in the upper part of the projection — PC2 partially encodes the luminosity class.

Figure references: pca_scores_classes.png, pca_scores_grid.png, pca_correlation_heatmap.png


Contribution by spectroscopic family to PCA axes​

The decomposition of PC1 and PC2 variance by feature family reveals the relative contributions of each line group. The ★ bars identify the dominant family of each axis.

Family
PC1 — Thermal axis
PC2 — Metallicity axis
0%──────────→ 100%
0%──────────→ 100%
Balmer lines
H α–θ
29.7%
0%
Ionised calcium
Ca II H&K + IR
9.3%
0%
Iron & metals
Fe, Cr, V, Ni…
0%
79.7%
★ dom.
Magnesium / α
Mg b, [Mg/Fe]
10.8%
20.3%
Lick indices
Lick IDS, SDSS
0%
0%
Continuum
slopes, colours
50.2%
★ dom.
0%
Share of Σ|loading| over the 10 largest loadings of each component (the facts pack exports the top 10 only).
PC1 thermal: Continuum (50.2%) + Balmer lines (29.7%) of the top-10 |loadings| — the two leading families of the thermal axis.
PC2 composition: Iron & metals (79.7%) dominates the top-10 |loadings| of PC2, followed by Magnesium / α (20.3%).

Top-5 absolute loadings of PC1 and PC2​

The loadings wkjw_{kj} measure the correlation between the jj-th feature and the kk-th principal component. The larger ∣wkj∣|w_{kj}|, the more this feature contributes to defining the axis. Signed bars show the direction (positive = toward hot stars for PC1, toward metals for PC2) and amplitude.

PC1
thermal axis · 16.9% variance · ρ(Teff) = +0.831
interpretation
Temperature T_eff
#
Feature
← negative · · · · positive →
w
1
Hα EW
+0.173
2
continuum asymmetry
+0.172
3
Mg b EW
-0.171
4
synthetic BV
-0.163
5
flux ratio blue red
+0.161
PC2
metallicity axis · 11.9% variance
interpretation
Metallicity [Fe/H]
#
Feature
← negative · · · · positive →
w
1
FeH proxy
+0.205
2
metal index combined
+0.198
3
alpha elements index
+0.194
4
metal poor index
-0.193
5
Fe 5270 EW
+0.174

PC1 — W(Hα) at top: the Hα equivalent width is one of the most robust temperature indicators in the MK spectral classification. Its positive sign means that hot stars (strong Hα) have a high PC1 score.

PC2 — all metallicity indices: the five top loadings of PC2 are all chemical composition indices — consistent confirmation of the interpretation as a composition axis.

Figure references: pca_loadings_pc1.png, pca_loadings_pc2.png, pca_loadings_heatmap.png


HR diagram coloured by PC1​

The correlation ρ(PC1, Teff) = +0.831 can be visualised directly on the Hertzsprung-Russell diagram (Teff vs log g). The PC1 colour gradient follows the main sequence precisely from right (cool, negative PC1) to left (hot, positive PC1), visually validating the thermal interpretation of PC1.

Evolved stars (log g < 3) show intermediate PC1 values — they have left the main sequence and their spectra present a combination of thermal and gravity characteristics not captured linearly by PC1 alone. This is a concrete limitation of the optimal linear estimator that is PCA.

Figure references: hr_diagram_pca_pc1.png, hr_diagram_pca_pc2.png


Limitations of PCA​

Linearity. PCA is blind to any non-linear structure. The relationships between Teff, log g and [Fe/H] in spectral space are not strictly linear — this is why UMAP and t-SNE reveal additional structures (subgiant clusters, dwarf/giant bifurcation) that PCA flattens into a continuous projection.

L₂ optimality only. The Eckart-Young theorem guarantees that PCA truncation is the best rank-K approximation in the Frobenius norm — not in terms of neighbourhood preservation or cluster separation.

Sensitivity to outliers in late components. PC1 and PC2 are robust as they maximise global variance. In contrast, late components (PC80–PC183) are sensitive to outlier spectra that maximise residual variance.

Physical mixing in PC1. The correlation ρ(PC1, [Fe/H]) = −0.548 (moderate) reveals that PC1 is not a pure temperature axis: the natural Teff/[Fe/H] co-variation (cool K-M stars are generally more metal-rich than A-F stars) is inevitably absorbed into the first axis.