# SpecTree

- **Event:** [Meta Global AI Developer Hackathon](https://cerebralvalley.ai/e/meta-ai-developer-hackathon)
- **When:** Oct 26, 12:00 PM – Nov 4, 9:00 PM (EST)
- **Where:** Online
- **Team:** [Gavin Moore](https://cerebralvalley.ai/u/G004)
- **GitHub:** https://github.com/GavinM00re/spectree-explorer
- **Demo video:** https://youtu.be/MMU9ARUDKCs
- **Gallery:** https://cerebralvalley.ai/e/meta-ai-developer-hackathon/hackathon/gallery
- **Page:** https://cerebralvalley.ai/e/meta-ai-developer-hackathon/hackathon/gallery/4782

SpecTree identifies small molecules from spectroscopy by playing “twenty questions” with the data.

The problem: chemists spend hours interpreting mass spectrometry, FTIR, ¹H NMR and ¹³C NMR spectra to answer one question: what is this compound? Automating it is hard for three reasons. Spectra vary between samples, labs and acquisition settings (impurities, solvent peaks, noise, shifted peaks). No single technique is enough, and complete multimodal datasets for many compounds barely exist. And chemists can’t guess; a wrong identification can cost months of work or cause a lab accident. That rules out a black-box model trained on scarce data whose answer nobody can check.

The approach: instead of reading a whole spectrum at once, SpecTree asks simple, noise-tolerant questions a chemist would ask, such as “Is there a strong C=O band at 1650–1800 cm⁻¹?” or “How many ¹³C peaks are at 100–160 ppm?”. I built a candidate library of 105,328 known compounds from PubChemLite and simulated MS, IR, ¹H and ¹³C spectra for each, with noise. Each spectrum becomes answers to a bank of 645 questions. After every answer, SpecTree updates the probability of all 105,328 candidates, using a learned model of how often each answer is wrong. It then picks the next question with the highest information gain, and stops when one structure passes 99.9%.

Every decision is visible. On a simulated test reading, SpecTree identifies N-isopropylbenzylamine in 18 questions, out of 105,328 candidates. The same path also tells you which measurements to take: with IR skipped, it still confirms the compound in 15 questions.

It runs entirely in the browser, with no server, account or API key. You get a guided caffeine example, a mode for answering questions from your own spectra, an interactive Cytoscape.js map of the model architecture, and a 360° decision tree of 1,524,318 decision states covering every compound’s path.

## More from Meta Global AI Developer Hackathon

- [Tickr](https://cerebralvalley.ai/e/meta-ai-developer-hackathon/hackathon/gallery/4779)
- [NinoWatch](https://cerebralvalley.ai/e/meta-ai-developer-hackathon/hackathon/gallery/4780)
- [PreFlight - YA](https://cerebralvalley.ai/e/meta-ai-developer-hackathon/hackathon/gallery/4781)
- [tether.](https://cerebralvalley.ai/e/meta-ai-developer-hackathon/hackathon/gallery/4783)
- [Solo Builder – Unhook](https://cerebralvalley.ai/e/meta-ai-developer-hackathon/hackathon/gallery/4784)
- [MadMutant](https://cerebralvalley.ai/e/meta-ai-developer-hackathon/hackathon/gallery/4785)

---

Markdown version of https://cerebralvalley.ai/e/meta-ai-developer-hackathon/hackathon/gallery/4782. Site index for agents: https://cerebralvalley.ai/llms.txt · full text: https://cerebralvalley.ai/llms-full.txt
