服务调研关于联系
← Back to Research
2026-05-18数据分析·

A Perfume Holds Hundreds of MoleculesHow AI Picks Them Out One by One · The GC-MS Deconvolution Algorithm

A Perfume Holds Hundreds of Molecules — How AI Picks Them Out One by One

The GC-MS fragrance deconvolution algorithm, from principle to deployment


I. Where the Problem Begins

You get your hands on someone else's fragrance oil. It smells great. The client asks: "Can you make me one just like it?"

The traditional approach is this: send it out for a GC-MS analysis, get back a report, then bring in a seasoned perfumer who sits with that report for 3 to 7 days and reverse-engineers a bench-ready formula sheet.

What that perfumer is doing is called, in the trade, "deconvolution." Meaning: reversing the spectrum back into a formula.

3 to 7 days is the industry floor. A typical compound fragrance may contain 80 to 150 chemical compounds, blending a dozen or so essential oils, dozens of synthetic monomers, and a few carrier solvents. The same molecule may come both from "linalool" inside lavender oil and from "pure linalool monomer" added on its own. The perfumer has to judge from experience: whom does this number belong to?

Can we let an algorithm do this step?

We can. But not the kind of "AI" you're imagining.


II. GC-MS Isn't the Answer — It's the Answer Sheet, Torn to Shreds

First, let's be clear about what GC-MS is.

Gas Chromatography–Mass Spectrometry. You inject the fragrance sample, and the instrument separates it into dozens to hundreds of chromatographic peaks, each peak corresponding to one molecule. The output looks roughly like this Excel sheet:

No.Retention TimeCAS No.Compound NameArea%
14.3278-70-6Linalool8.68
25.11115-95-7Linalyl acetate3.60
36.89105-37-3Ethyl propionate2.10
...............
12622.41unknow0.22

A compound fragrance of the oud-agarwood family runs out to 126 rows.

Note one crucial fact: GC-MS gives you a "molecule-level inventory," not a "material-level formula."

What the perfumer actually needs is this kind of thing:

异构十二烷    80.46%   ← 载体
芳樟醇         8.80%   ← 纯单体
乙酸芳樟酯     3.60%   ← 纯单体
二丙二醇甲醚   2.60%   ← 溶剂
龙涎酮         1.55%
佳乐麝香       0.92%
... 共 24 行原料 ...
藿香油         0.10%   ← 唯一精油

This is the "formula sheet" a compounder can take and weigh out ingredients from. Its granularity is material, not molecule.

GC-MS has torn the answer sheet into 126 scraps of paper. What the deconvolution algorithm does is piece those 126 scraps back into the original 24-row material manuscript.

GC-MS 给的是"分子清单",调香师要的是"原料配方" 反卷算法就是把左边变成右边 GC-MS 原始报告(实测) 序号 保留时间 CAS 号 化合物名 面积% 14.3278-70-6芳樟醇8.68 25.11115-95-7乙酸芳樟酯3.60 36.89105-37-3丙酸乙酯2.10 48.2187-44-5β-石竹烯1.84 59.55123-35-3月桂烯1.42 610.1898-55-5α-松油醇1.21 711.425392-40-5柠檬醛0.96 812.71128-37-0丁基羟基甲苯0.83 913.858000-46-2广藿香醇2.72 1014.96469-61-4α-雪松烯1.51 1116.2317699-05-7α-愈创木烯0.41 12622.41unknown0.22 126 行 · 分子级颗粒度 · 算法不能直接打样 反卷 algorithm 药剂师配料表(反卷输出) 原料 类别 用量% 异构十二烷载体80.46 芳樟醇纯单体8.80 乙酸芳樟酯纯单体3.60 二丙二醇甲醚溶剂2.60 龙涎酮纯单体1.55 佳乐麝香纯单体0.92 广藿香油精油9.07 柏木油精油6.02 藿香油精油0.10 丁基羟基甲苯抗氧剂0.83 合计24 项原料100.00 24 行 · 原料级颗粒度 · 拿了就能称量打样 Robert · TryWay Labs · 2026-05-18

Figure 1 · GC-MS gives a "molecule inventory," the perfumer wants a "material formula" — what deconvolution does is turn the left side into the right


III. Deconvolution Is Not Training, and It's Certainly Not a Large Model

Many people's first reaction is: "Just hand it to GPT, no?"

No. There are three reasons, each more important than the last:

① A large language model has never "smelled" a fragrance — all it has read is text. Even if you fed it every perfumery blog on the internet, it would only know surface-level knowledge like "linalool has a lavender note," not the quantitative structure of "one dose of lemon oil brings in 8% limonene."

② The GC-MS inversion is an inverse problem with a mathematical structure — it's not pattern recognition. In essence it is solving a set of linear equations — "given the measured percentages of 126 compounds, find how much of each of 30 candidate materials was added." This kind of problem has 50 years of statistical groundwork behind it, and traditional methods handle it cleanly. Deep learning, by contrast, would need paired "formula → GC-MS" data to train on, and in this industry that data is precisely the least likely thing to be made public — the formula itself is the lifeblood.

③ A large model will "make things up." It might tell you this bottle contains 5.2% nerolidol, when the GC-MS report has no such row at all. In a setting like perfumery, where even a ±1% deviation forces a re-sample, one fabrication scraps an entire batch of material.

ApproachSuited toFit for this scenario?
Train an LLMTeaching AI to understand languageWrong fit, and it's not your call anyway
Fine-tune an LLMMaking AI learn a certain toneWrong fit — this isn't a language problem
Prompt a large modelOpen-ended generationWrong fit — it will fabricate
Traditional numerical algorithmInverse problems with an equation structureThe right answer

The deconvolution algorithm takes the fourth road. It isn't "clever," but it is "honest" — the part it can't solve, it leaves blank, and it never makes anything up.


IV. The Full Pipeline: From Spectrum to Formula

The entire deconvolution pipeline breaks into five stages:

StageInputOutputKey Technique
1. ParsingGC-MS ExcelCompound inventoryMulti-format xlsx parsing
2. ClassificationCompound inventoryLabels: essential oil / synthetic / solvent / unknownCAS dictionary + name matching
3. NormalizationLabeled inventoryDe-solvent, normalize to 100%Formulation convention
4. InversionNormalized compoundsCandidate materials + amountsFocus of this piece
5. Table outputCandidate materials + amountsPerfumer's ingredient sheetExcel template

The first three steps are engineering grunt work — nothing much to say about them. What's genuinely interesting is step 4 — the "inversion."

Step 4 itself splits into two layers:

Let's take them one at a time.

GC-MS 香精反卷 · 五阶段流水线 前三步是工程苦活,第四步"反推"才是算法本体 ① 解析 输入 GC-MS Excel 输出 化合物清单 ② 分类 输入 化合物清单 输出 精油/合成/溶剂/未知 ③ 归一 输入 标注后的清单 输出 去溶剂 + 归 100% ④ 反推 ★ 输入 归一后的化合物 输出 候选原料 + 用量 本文核心 ⑤ 出表 输入 候选原料 + 用量 输出 调香师配料表 ④ 反推 — 三层算法的叠罗汉 锚定法(v1.5) 反算用量 · 解决 80% 简单问题 双信号合验(v1.9) 否决假阳性精油 NNLS + LASSO(v2.0) 多源化合物精确拆分 Robert · TryWay Labs · 2026-05-18

Figure 2 · The five-stage deconvolution pipeline — the first three steps are engineering grunt work; step ④ "inversion" is the algorithm proper


V. Step One · The Anchoring Method: Find the Fingerprint First

Every essential oil has its own "fingerprint molecule."

Essential OilAnchor MoleculeTypical Share in That Oil
Lavender oilLinalool~35%
Patchouli oilPatchoulol~30%
Cedarwood oilα-cedrene~25%
Petitgrain oilLinalyl acetate~50%
Black pepper oilβ-caryophyllene~22%

The idea behind the anchoring method is plain: work backwards.

Here's an example. The GC-MS report measures patchoulol at 2.72%. This molecule appears almost exclusively in patchouli oil, at a typical share of 30%.

So:

配方里广藿香油的用量 ≈ 2.72% ÷ 30% ≈ 9.07%

Then you verify: do the measured amounts of the other characteristic molecules in patchouli oil (α-patchoulene, α-guaiene…) also match the carry-in ratio for 9.07%? If they match, HIGH confidence; if only half match, MEDIUM; if they don't match at all, either the amount was miscalculated or it isn't this essential oil in the first place.

This one step resolves about 80% of the problems in fragrance analysis. Once you can identify "there's 9% patchouli oil here, 6% cedarwood oil, 0.1% agarwood oil," the perfumer can start sampling right away.

锚定法:从实测分子反推精油用量 每种精油都有自己的"指纹分子",反着算回去就行 GC-MS 实测片段 化合物 实测 % 芳樟醇8.68 乙酸芳樟酯3.60 β-石竹烯1.84 广藿香醇 ★ 2.72 α-雪松烯1.51 α-愈创木烯0.41 ① 在 GC-MS 报告里找到广藿香醇的实测值 反算公式 2.72% ÷ 30% ≈ 9.07% ② 已知广藿香油里广藿香醇典型占比 30%,反推精油用量 推出的配方片段 原料 用量 % 异构十二烷(载体)80.46 芳樟醇(单体)8.80 广藿香油 ★ 9.07 柏木油6.02 藿香油0.10 ③ 把"广藿香油 9.07%"写进配方表 交叉验证: 再去看广藿香油的其他特征分子(α-愈创木烯 0.41% / α-雪松烯 1.51%)是否对得上 9.07% 的带入比例 对得上 → HIGH 置信 · 对一半 → MEDIUM · 完全不对 → 进入下一步「双信号合验」

Figure 3 · The anchoring method: measured patchoulol 2.72% ÷ typical share 30% ≈ inferred patchouli oil amount 9.07%

But the anchoring method has a hole — it can't tell "molecules carried in by an essential oil" from "pure monomers added on their own."


VI. Step Two · Dual-Signal Cross-Check: Making Counterfeit Oils Show Themselves

Back to that Sample No. 8 from the start.

The perfumer told us, off the record: "There's no petitgrain oil in this."

But the algorithm identified 7.54% petitgrain oil. Why?

The main components of petitgrain oil are linalool + linalyl acetate. The algorithm sees linalool at 8.8% and linalyl acetate at 3.6% in this bottle, works backwards, and arrives at "7.54% petitgrain oil."

But the truth is: linalool and linalyl acetate are both pure monomers added on their own — cheap, pure, in bulk. The algorithm mistook them for something "carried in by petitgrain oil."

This is a false positive. In a perfumery setting, a false positive is more dangerous than a miss — you sample against a bogus formula and the money is wasted.

The fix is to add a "dual-signal cross-check":

Signal ①: anchor dominance.

In a genuine essential oil, its anchor molecule should hold the highest share. In petitgrain oil, linalyl acetate (the anchor) is 50%, linalool is 30% — a ratio of 50:30. But in Sample No. 8, the measured linalyl acetate is 3.6% and linalool is 8.8% — the ratio is inverted; there's more linalool than the anchor. Such an inversion can only mean one thing: the linalool is externally added, not carried in by petitgrain oil. Veto it outright.

Signal ②: weighted failure rate.

If you've identified, say, 9% of some essential oil, then the measured amounts of all characteristic molecules in that oil should "match a 9% carry-in." Compare the expected and measured values of every characteristic molecule one by one, and compute a "failure rate" weighted by typical share. Failure rate above 70%, veto; between 50% and 70%, drop the confidence one notch.

With these two gates in place, the algorithm can finally no longer be fooled by pure monomers. The petitgrain oil false positive in Sample No. 8 was cleanly vetoed, and the genuine essential oils were kept.

This step looks unremarkable, but it is the one that pushes the system from "can spit out a report" to "can deliver to a client." The real moat is often not the main algorithm, but the "boundary detection around the main algorithm."

双信号合验:让冒牌精油现形 案例:8 号样品里识别出 7.54% 橙叶油 — 真的还是假阳性? 信号 ① · 锚定主导性 — 真精油里锚定分子应当占比最高 参考(真橙叶油里的典型比例) 乙酸芳樟酯(锚定) 50% 芳樟醇 30% 比例 50 : 30 → 锚定 ✓ 占优 实测(8 号样品 GC-MS) 乙酸芳樟酯(锚定) 3.6% 芳樟醇 8.8% 比例倒挂 3.6 : 8.8 → 锚定反而被压 ✗ 比例倒挂只能说明:芳樟醇是单独加的纯单体,不是橙叶油带进来的 → 否决 信号 ② · 加权失败率 — 真精油里所有特征分子都该"配得上"识别出的用量 若识别出 7.54% 橙叶油,则下列 marker 应有相应的"预期带入量",与实测对比 → Marker 预期 % (按 7.54% 推) 实测 % 判定 typical 权重 乙酸芳樟酯(锚定) 3.77 3.60 ✓ PASS 50 橙花叔醇 2.26 0.45 ✗ FAIL 30 香叶醇 1.36 0.05 ✗ FAIL 18 乙酸香叶酯 0.91 0.02 ✗ FAIL 12 β-蒎烯 0.75 0.68 ✓ PASS 10 加权失败率 = (30 + 18 + 12) / (50 + 30 + 18 + 12 + 10) = 60 / 120 = 50% < 70%,但叠加信号 ① 已 REJECT Robert · TryWay Labs · 2026-05-18

Figure 4 · The dual-signal cross-check stops the petitgrain oil false positive — Signal ① inverted anchor ratio + Signal ② weighted failure rate over threshold


VII. Step Three · A Gift from 1974: NNLS

The two steps above still only deal with "which essential oil, how much."

Now to the hardest problem: for a single molecule, how do you know which materials jointly contributed it?

Here's an example. This fragrance measures linalool at 8.8%. It could come from:

Or it could be:

This is the classic inverse problem: given "what the mixture looks like," find "how much of each material was added."

Written as an equation:

b = A · x

If A were a square, invertible matrix, one line of linear algebra would solve it. The problem is:

In 1974, two mathematicians, Charles Lawson and Richard Hanson, wrote down an algorithm in their book Solving Least Squares Problems dedicated to solving this kind of "least squares problem with non-negativity constraints," called NNLS (Non-Negative Least Squares).

The algorithm itself is only a few dozen lines of code, but it has two things that move me:

First, it comes with a guarantee of an "exact solution." Not the neural-network kind of "trained until roughly converged," but a genuine, mathematically proven convergence to the optimal solution in a finite number of steps.

Second, it has crossed half a century. From its invention in 1974 to today — from chemometrics to spectral deconvolution, medical imaging, seismology, astronomy — every problem of "known observations, solve for source proportions, and the proportions cannot be negative" has this at its back.

When you write scipy.optimize.nnls(A, b) in Python today, what you're calling is Lawson-Hanson 1974.

Fragrance deconvolution takes it and uses it as-is. It belongs to no single programmer; it belongs to half a century of accumulated statistics.


VIII. Step Four · A Revolution from 1996: LASSO

NNLS solved "non-negativity," but there's still one unsolved problem: sparsity.

In reality, a fragrance uses at most 20–30 materials. But the candidate library holds thousands of materials.

If you run NNLS directly, it tends to "spread the amounts evenly" — giving a little bit to each material. The answer it hands you might be 800 materials each at 0.1%. In theory the residual is minimized; in practice it's unusable.

In 1996, Stanford statistician Robert Tibshirani gave an elegant solution in a paper — Regression Shrinkage and Selection via the Lasso — that has been cited nearly 100,000 times to this day.

LASSO stands for Least Absolute Shrinkage and Selection Operator. It adds an L1 penalty term to the least-squares objective function:

minimize  ‖Ax - b‖² + λ · ‖x‖₁

That last term, ‖x‖₁, is the sum of the absolute values of all components of x. The larger the coefficient λ, the harsher the penalty, and the more variables get squeezed to 0.

The magic of LASSO is: it will automatically squeeze the vast majority of variables to exactly 0, leaving only the few that truly "contribute."

This is exactly what we want.

AlgorithmProblem SolvedRole in Fragrance Deconvolution
NNLS (1974)Amounts can't be negativePhysical constraint
LASSO (1996)Only a few materials may be usedSparsity prior

Put the two together — NNLS guaranteeing non-negativity, LASSO guaranteeing sparsity — and what you get is a bench-ready formula sheet of "30 materials, each amount a positive number, summing to 100%."

Note that these mathematicians — Lawson, Hanson, Tibshirani — were not chemists. What they solved were abstract mathematical problems. But because the abstract form of that problem happens to match fragrance deconvolution exactly, today's algorithm runs on just 80 lines of Python.

This is the most beautiful thing about mathematics: invented in a completely unrelated field, and picked up 30 years later for use in another.

半个世纪的统计学,被香精反卷捡了起来 两位数学家、一位统计学家——三个完全不相关的领域里出生,最后汇到一起 1970 1980 1990 2000 2010 2020 2030 1974 NNLS · 非负最小二乘 Charles Lawson & Richard Hanson Solving Least Squares Problems 保证答案非负 1996 LASSO · 稀疏选择 Robert Tibshirani · 斯坦福 Regression Shrinkage & Selection 保证答案稀疏 2026 香精反卷 · 我们这一代 NNLS + LASSO 组合用于 GC-MS 把光谱反推成可打样的配方表 化学计量学新落地 ↔ 22 年 ↔ 30 年 数学最美的地方: 在一个完全不相关的领域里被发明,在 30 年后被另一个领域捡起来用。 `scipy.optimize.nnls(A, b)` · `sklearn.linear_model.Lasso` — 你今天调的就是 1974 与 1996

Figure 5 · 1974 Lawson-Hanson NNLS → 1996 Tibshirani LASSO → 2026 fragrance deconvolution: half a century of accumulated mathematics, picked back up


IX. The Dictionary Is the Moat, the Material Data Is the Wall

By now you should have noticed a counterintuitive fact:

The algorithm itself holds no secret. NNLS is in scipy, LASSO is in sklearn, the anchoring method is common sense. Any engineer who knows statistics could build a set in two weeks.

What's genuinely hard is the data.

To run this deconvolution system, you need:

Data AssetWhat It IsDifficulty
Material dictionaryChinese and English names, CAS, aroma descriptions, and volatility for over a thousand materialsIndustry-internal material, unobtainable to outsiders
Essential-oil GC-MS libraryThe complete spectral fingerprint of every commonly used essential oilOne measurement runs 1,500–2,500 yuan; a full spectrum needs 40+ oils
Formula ground-truth reference setPaired samples of known formula + known GC-MSThe most secret thing in the industry, almost never circulated
CAS one-molecule-many-names annotationThe several commercial names of the same molecule across different manufacturersThe dirty work no one is willing to do, but which must exist

In our current system:

Through 6 rounds of independent third-party blind testing (dual-LLM cross-checking of 188 samples), the true error rate of the material database was driven down from 17% all the way to below 1.5%.

原料数据库 v1 → v5.1:6 轮盲测,真错率压到 1.5% 以下 外部双 LLM(ChatGPT-5 + Gemini 2.5 Pro)独立校对 188 条样本 0% 5% 10% 15% 20% 真错率(事实错误占比) v1 v2 v3 v4 v5 v5.1 17% 10% 6% 4.8% 1.5% <1.5% PubChem 全补 + LLM 审查 BP 解析修复 + 抛错 AI 香调 MW>200 重质大分子 + CAS 一物多名 MP>60 固体结晶 + 错配 hotfix 3 具名 FAIL + 65 翻译补全 后调白名单 +1 hotfix 工程化迭代的力量: 17% → 10% → 6% → 4.8% → 1.5% — 真错率压缩约 11 倍,靠的不是算法升级,是 137 条系统修订

Figure 6 · Material database v1→v5.1 true error rate: 17% pressed all the way down to below 1.5%, verified by 6 rounds of independent LLM blind testing

On a typical oud-agarwood compound fragrance sample, the system's current capability is:

3 to 7 days → 1 day. This is the speed-up ratio the industry can currently deliver.


X. Why Not Proactively Expand the Library?

Reading this far, you might ask: since the algorithm is clear and the data is the wall, why not just spend the money to fill in the data and expand the library to 2,000 entries?

Because this road has a counterintuitive trap — the marginal return on proactively expanding the library is diminishing.

There are thousands of essential oils, but 80% of fragrances use only about 40 main oils. Beyond 50 oils, the gain in "real-world hit rate" from each additional one decays rapidly. The same goes for synthetic monomers — past a thousand commercial names, each additional 100 entries only shaves off another 1–3% of the placeholder gaps.

More importantly, the next iteration of this system is the full NNLS + LASSO deconvolution, an engineering effort of 6–7 days. This step doesn't need more data — it needs more "samples with known answers" — that is, a "problem + ground-truth" reference set.

And that kind of data can't be bought on the open market. It sits only in the hands of two kinds of people:

  1. Upstream material makers and independent essential-oil suppliers — you hold the complete GC-MS of your own products.
  2. OEM copy-sample factories and perfumery studios — you hold paired records of "sample formula + client's original-product GC-MS."

If you're reading this article and you happen to belong to either of these two groups — you're welcome to plug in. Cooperation is not limited to cash: data exchange, subscription licensing, per-order revenue share are all open to discussion. Contribute one essential-oil GC-MS or one set of formula ground truth, and in return you get priority access to an engineered deconvolution system that has already passed 6 rounds of blind testing.

This isn't marketing spin. It's because the next leap for this system was never an algorithm problem in the first place — it's a data-cooperation problem.


XI. The Current Boundary of Capability

Let me honestly write down what the system can't do right now:

Still Can't DoReasonWaiting On
Precise splitting of multi-source compoundsNNLS+LASSO not yet integrated6–7 days once triggered
Amount accuracy of ±3%Missing the "problem+ground-truth" reference setN=10–30 samples
High-end natural-perfume-grade deconvolutionEssential-oil library covers 18/40+Add 22–25 GC-MS records
Cloning name-brand perfumesLegal red lineWon't do

v1.10 当前能力 · 六维准确率画像 在一瓶典型的乌木沉香复合香精样本上 — 不掩盖短板 25% 50% 75% 100% ① 形态覆盖率 87.6% ② 精油识别召回 100% ③ 精油识别精确 100% ④ 合成单体识别 ~65% ⑤ 用量数字精度 ±6.7pp ⑥ 多源化合物拆分 0% (v2.0 待解锁) v1.10 当前实测 100% 概念边界 "找东西 100% · 称数字 ±6.7pp · 拆来源 0%" Robert · TryWay Labs · 2026-05-18

Figure 7 · v1.10 current-capability six-dimension profile — finding things 100%, weighing numbers ±6.7pp, splitting sources 0% (to be unlocked in v2.0)

The last row matters — any request to deconvolve finished products from the likes of Chanel, Dior, or Tom Ford, we decline across the board. This isn't a technical problem; it's an intellectual-property one. The compliant uses of this system are clearly defined:


XII. Summary

The essence of GC-MS deconvolution: it isn't AI smelling perfume, it's using 50-year-old statistics to solve a structured inverse problem.

The essence of the anchoring method: work backwards — infer material amounts from molecular proportions.

The essence of NNLS: a gift from 1974 — guaranteeing the answer is non-negative.

The essence of LASSO: a revolution from 1996 — guaranteeing the answer is sparse.

The essence of the dual-signal cross-check: not making the algorithm smarter, but teaching the algorithm to doubt itself.

The essence of the whole system: the algorithm is public, the dictionary is private, the data is scarce. The algorithm can be reproduced in two weeks, but a database validated by 6 rounds of independent blind testing, a 488-entry CAS one-molecule-many-names audit, and a "problem+ground-truth" reference set — for these there is no shortcut.

You don't need to train an AI. You don't need a GPU cluster. You don't need to hand the fragrance over to a large model to "understand."

What you need is: a material dictionary, a set of essential-oil fingerprints, a few ground-truth samples, and half a century of statistics.

Share
← Back to Research

Related · TryWay Labs

長為試之印(盖印版·自然崩口)