Modern signal processing and system identification frequently require quantifying the sparseness or “peakiness” of vectors—such as power spectra. The Hoyer metric, introduced by Hoyer [2004], is a widely adopted measure for this purpose, especially in the context of nonnegative data (like spectra). This blog post explains the Hoyer metric’s role in fitting models in the context of LTE, its mathematical form, and provides references to its origins.
What Is the Hoyer Sparsity Metric?
Given a nonnegative vector (), the Hoyer sparsity is defined as:
Where:
- is the L1 norm (sum of absolute values).
- is the L2 norm (Euclidean norm).
- is the length of the vector.
The Hoyer metric ranges from 0 (completely distributed, e.g., flat spectrum) to 1 (maximally sparse, only one element is nonzero).
Why Use the Hoyer Metric in Fitting?
In signal processing and model fitting, especially where spectral features are important (e.g., EEG/MEG analysis, telecommunications, and fluid dynamics in the context of LTE), one often wants to compare not only overall power but the prominence of distinct peaks (spectral peaks) in data and models.
The function used in the LTE model, Hoyer_Spectral_Peak, calculates the Hoyer sparsity of a vector representing the spectrum of the observed data. When used in fitting, it serves to:
- Quantify Peakiness: Models producing spectra closer in “peakiness” to the data will better mirror the physiological or system constraints.
- Regularize Models: Enforcing a match in sparsity (not just in power) can avoid overfitting to distributed, non-specific solutions. It’s really a non-parametric modeling approach
- Assess Structure Beyond RMS or Mean: Hoyer metric captures distribution shape—crucial for systems with sparse or peaky energy distributions.
Hoyer Metric Formula in the Code
The provided Ada snippet implements the Hoyer sparsity for a vector of LTE manifold data points. Here’s the formula as used:
-- Hoyer_Spectral_Peak
--
function Hoyer_Spectral_Peak (Model, Data, Forcing : in Data_Pairs) return Long_Float is
Model_S : Data_Pairs := Model;
Data_S : Data_Pairs := Data;
L1, L2 : Long_Float := 0.0;
Len : Long_Float;
RMS : Long_Float;
Num, Den : Long_Float;
use Ada.Numerics.Long_Elementary_Functions;
begin
ME_Power_Spectrum
(Forcing => Forcing, Model => Model, Data => Data, Model_Spectrum => Model_S,
Data_Spectrum => Data_S, RMS => RMS);
Len := Long_Float(Data_S'Length);
for I in Data_S'First+1 .. Data_S'Last loop
L1 := L1 + Data_S(I).Value;
L2 := L2 + Data_S(I).Value * Data_S(I).Value;
end loop;
L2 := Sqrt(L2);
Num := Sqrt(Len) - L1/L2;
Den := Sqrt(Len) - 1.0;
return Num/Den;
end Hoyer_Spectral_Peak;
Where all (). This is exactly as described in Hoyer’s paper.
Example Usage
Suppose the observed spectrum is more “peaky” than the model spectrum. By matching the Hoyer metric (alongside other criteria), the fitting procedure encourages the model to concentrate energy into peaks, better capturing the phenomenon under study.
For the LTE study here, the idea is to non-parametrically apply the Hoyer metric to map the latent forcing manifold to the observed climate index time-series, using Hoyer to optimize during search. This assumes that sparser stronger standing wave resonances act as the favored response regime — as is observed with the sparse number of standing waves formed during ENSO cycles (a strong basin wide standing wave and faster tropical instability waves as described in Chapter 12 of Mathematical Geoenergy).

Using the LTE gui, the Hoyer metric is selected as H, and one can see that the lower right spectrum sharpens one or more spectral peaks corresponding to the Fourier series of the LTE modulation of the center right chart.
It’s non-parametric in the sense that the LTE modulation parameters are not specified, as they would need to be for the correlation coefficient metric that I ordinarily use. The index here (#11) is the Warnemunde MSL time-series.
Citation and References
The Hoyer sparsity metric was introduced in:
- Hoyer, P. O. (2004). “Non-negative matrix factorization with sparseness constraints.” Journal of Machine Learning Research, 5(Nov):1457–1469. [Link: JMLR Paper]
For further applications in neural data and spectral analysis, you may see usage such as:
- Bruns, A. (2004). “Fourier-, Hilbert- and wavelet-based signal analysis: Are they really different approaches?” Journal of Neuroscience Methods, 137(2):321-332.
Conclusion
The Hoyer metric is a robust, intuitive, and well-cited tool for quantifying sparsity in spectra or model parameters—encouraging interpretable, physiologically plausible solutions when fitting models to data. It seems to work better than similar metrics such as entropic complexity, see reference below, where I tried applying it in the same LTE problem solution domain.
Reference:
- Hoyer, P.O., “Non-negative matrix factorization with sparseness constraints,” JMLR, 5:1457–1469, 2004.\
- Pukite, P., & Bankes, S. (2011). Entropic Complexity Measured in Context Switching. In Applications of Digital Signal Processing. InTech. https://doi.org/10.5772/25520
Let me know if you’d like code snippets, visualization examples, or more advanced mathematical discussion!
