Finding Sugar Ladders in Herbal Mass Spectra with Pitch-Tracking Combs

A traditional herbal decoction holds hundreds of compounds, and when a lab measures one with mass spectrometry, about 95% of the signals cannot be matched to any known molecule. Many of these unknowns are not unrelated, though. A plant often decorates one core scaffold, such as a flavonoid, with a variable number of sugars. The result is a "ladder" of compounds whose masses differ by whole multiples of a sugar unit. Speech scientists already have mature tools for this kind of pattern. A voiced sound produces spectral peaks at evenly spaced multiples of a fundamental frequency, and pitch trackers recover that spacing even when peaks are noisy, missing, or mixed with other voices. We propose to treat a herbal extract's list of detected compounds as a spectrum along the mass axis. A pitch-style comb detector would then recover each ladder's spacing (the sugar or acyl unit) and its starting point (the mass of the core scaffold) without any reference library.

The mechanistic payoff is a better unit of analysis for traditional medicine. Members of one ladder share a core scaffold, and gut bacteria strip the sugars from such compounds. So a ladder's combined abundance, not any single member's, is the quantity that should predict how much of the core reaches the blood. That bears directly on the "absorption paradox": remedies whose known constituents barely enter the bloodstream still act on the body. We test this prediction with a microbial incubation experiment. If it holds, we have a library-free way to turn chemical dark matter into scaffold-level hypotheses that network pharmacology can use.

Core Claim

The obvious bridge between these fields, spectral autocorrelation along the mass axis, is close to something mass spectrometry already does. The autocorrelation of a list of discrete peaks at lag $\Delta$ is simply a weighted histogram of all pairwise mass differences. That histogram is what Bittremieux et al. mined at repository scale to catalogue 1,350 recurring mass offsets. Porting the method of Rahman et al. as-is would therefore rediscover known offsets. We changed the idea accordingly.

Our claim is that what pitch tracking adds over pairwise differences is evidence from whole series, plus three properties that come with it:

  • Chains, not pairs. A candidate is scored only when several consecutive rungs are present. In a dense extract, chance coincidences between two peaks are common, but chance chains of four peaks are rare.
  • Explicit offset. The detector estimates where the comb starts, and that starting mass is the core scaffold. This plays the role that phase plays in pitch analysis.
  • Overlapping combs. Several combs can be pulled apart iteratively, in the way shift-autocorrelation separates overlapping bird calls (Robust Detection of Multiple Bioacoustic Events with Repetitive Structures).

We also exploit chromatographic retention time, the moment each compound exits the separation column. Each added sugar shifts retention time in a consistent direction, so a real ladder is a comb in mass and roughly monotone in time. A coincidental series need not be.

Concretely, an extract becomes a set of features $(m_i, t_i, a_i)$: precursor mass, retention time, and peak area. We score a candidate ladder with repeat unit $\Delta$ and core mass $c$ as follows:

$$S(\Delta, c) = \sum_{n=1}^{N} \max_i \; \log(1+a_i)\, K\!\left(m_i - c - n\Delta\right)\, R_n(t_i),$$

The terms are:

  • $K$ is a Gaussian mass-tolerance kernel of a few ppm.
  • $R_n$ is a soft constraint that rung $n$ elutes on the expected side of rung $n-1$.
  • A ladder counts only if at least $k$ consecutive rungs are present.

With $k=1$ and $R_n \equiv 1$, the score collapses to the pairwise difference histogram. That reduction gives us the key ablation for free.

The analogue of the "octave error" in pitch tracking is mistaking a two-hexose step (324.106 Da) for the true one-hexose unit (162.053 Da). We handle it as pitch trackers do, by preferring the smallest spacing that explains the rungs.

Research Program

The work rests on three roles from prior literature.

Prior work that supplies the method. Three lines contribute:

  • Spectral-domain autocorrelation with conditioning, which suppresses dominant non-periodic structure. Rahman et al. used it to remove formant bias and octave errors in speech.
  • Peak-only accumulation over consecutive frames (Lee et al., TAPS). We reuse it across adjacent liquid-chromatography scans so that transient chemical noise cancels before comb search.
  • Iterative shift-product separation of overlapping periodicities, which we use to peel off one ladder at a time.

Prior work that motivates the problem. Several papers show the gap:

  • mzRepeat stacks mass spectra by a repeating unit, but it requires that unit to be known in advance and names blind detection as future work.
  • Library-dependent annotation stalls at low coverage. BAM needs an annotated anchor compound and lifts global annotation only from 2.3% to 3%.
  • Herbal glycoside series are real and abundant. In Quercus mongolica bee pollen, 69 flavonoid glycosides were annotated in negative mode, 46 of them isorhamnetin derivatives.

Prior work that constrains the design.

  • DreaMS shows that learned spectral representations are strong, but it covers only positive-mode, singly charged spectra. A deterministic detector that works in either ionization mode is therefore useful for flavonoids and polyphenols, which are mostly measured in negative mode.
  • The network pharmacology studies on Radix Salviae and heart-failure herbs admit that they assume the parent compounds reach their targets. Our gut-incubation test targets that assumption directly.

What we build. The deliverable is an open detector. It takes feature tables from standard feature-finding software, the same inputs used by FBMN, and outputs ranked ladders, each with its repeat unit, core mass, member features, and score.

The independence check. The detector sees only first-stage information: precursor mass, retention time, and area. The fragmentation spectra are held out. A predicted ladder is verified if its members' fragmentation spectra share a fragment ion at the predicted core mass, or show sequential losses of $\Delta$. This verification uses data the detector never saw, so we can measure precision on large public datasets without hand annotation.

Baselines

Pairwise mass-difference histogram (naive reference). This counts all pairwise differences within each extract and links features whose difference falls in a top-scoring or catalogued offset bin; this is the approach behind Bittremieux et al.. We run it on identical feature tables, with the same ppm tolerance and the same number of reported candidates. This is the k=1 case of our score, so it is both the naive baseline and the ablation that isolates chain evidence. The reported number is a library match rate rising from 5.5% to 9.3%. That measures annotation, not series recovery, and we found no reported series-recovery number on Lacuna for this method. Beating it means higher precision at matched recall in the fragmentation-verified evaluation, especially in the densest extracts.

Feature-based molecular networking (strongest established tool). FBMN links features by the cosine similarity of their fragmentation spectra, and it is what the Q. mongolica study used to group its glycosides. We run it with default GNPS parameters plus a small grid over cosine threshold, giving it the same tuning budget we give our tolerance and $k$. Because it uses fragmentation spectra, it cannot be scored by our fragmentation-based verification without circularity. We therefore compare against the 69 expert-annotated glycosides there, or against expert curation of our own extract. We found no reported series-level recall for networking on Lacuna. Beating it means recovering more of the annotated ladders, particularly members whose fragmentation spectra are weak or missing.

DreaMS embedding clustering (learned competitor). We cluster DreaMS embeddings, restricted to positive-mode data where the model applies. The strongest reported number in the file is 91% precision for fluorine detection. That is a different task, so it is not a series-recovery benchmark.

Anchor-based expansion. BAM is the anchor-dependent comparator. It reports correct structures for 24.2% of anchor-suspect pairs and the correct candidate ranked first in 57.7% of cases. Our proposal is library-free, so it should win specifically on ladders whose core is absent from libraries.

Further ablations. We remove the retention-time constraint ($R_n \equiv 1$) and the scan accumulation step separately.

Why not just…?

Why not just histogram pairwise mass differences, which is what spectral autocorrelation reduces to? This is the real threat, and we built the proposal around it. If chain scoring with $k \ge 3$ and the retention-time constraint do not improve precision over $k=1$ in dense extracts, the harmonic framing adds nothing and we will say so. Our expectation comes from simple combinatorics. In an extract with thousands of features, the number of chance pairs at any given offset grows roughly with the square of feature density. A chance run of $k$ evenly spaced rungs that also elutes in the right order is suppressed by the per-rung coincidence probability raised to the power $k$.

Why not just run a Kendrick mass-defect plot? Kendrick analysis rescales masses so that members of a series with a chosen repeat unit line up. Like mzRepeat, it needs that unit fixed in advance. Scanning many candidate units is close to our spacing search. What it lacks is the core-mass estimate, the separation of overlapping ladders, and the retention-time constraint. We include a scanned Kendrick variant inside the $k=1$, no-time ablation.

Why not just use molecular networking or DreaMS? Both depend on fragmentation spectra. Many low-abundance dark-matter features in crude extracts have poor or no fragmentation spectra, and DreaMS excludes negative mode. Our detector needs only first-stage features. The comparison on annotated glycosides will show whether that matters in practice. If networking already recovers nearly every ladder, our contribution narrows to the core-mass estimate and the pharmacokinetic test.

Why not just fractionate and isolate the active compound? Chen et al. isolated EGCG and ECG this way. Their isolate was weak, with an IC50 near 100 µM, but structure-activity work showed that the shared galloyl group was required. That is a scaffold-level finding, which is what ladder families organize around. Fractionation remains complementary. Our test asks whether family totals explain exposure better than any single isolate.

Proposed Experiments

Synthetic recovery. We plant ladders into real background feature tables drawn from public GNPS herbal extracts. The ladders use hexose, rhamnose, pentose, glucuronide, and galloyl units, with chain lengths 2 to 6, rung dropout, and overlapping ladders. We measure precision and recall of recovered spacing and core mass against feature density. This is where $k=1$ versus $k \ge 3$ should separate.

Real extracts with held-out verification. We run all methods on public herbal datasets in the GNPS repository, plus one in-house negative-mode extract of a glycoside-rich herb. We report fragmentation-verified precision for every method that does not consume fragmentation spectra. We report recall against expert-annotated glycosides for every method.

Decisive mechanistic check. We incubate the extract with human fecal microbiota and sample over time, measuring two quantities:

  • whether members of each predicted ladder decline together while a feature at the predicted core mass rises;
  • whether, across several commercial batches with natural chemical heterogeneity, the ladder's summed starting abundance predicts the core's yield better than its most abundant member.

The family-unit claim fails if the predicted cores do not appear, or if single members predict yield equally well.