The mammalian olfactory system learns new odors rapidly, exhibits negligible interference among odor memories, and identifies known odors under challenging conditions. The mechanisms by which it does so are unknown. We here present a general theory for odor learning and identification under noise in the olfactory system, and demonstrate its efficacy using a neuromorphic model of the olfactory bulb. As with biological olfaction, the spike timing-based algorithm utilizes distributed, event-driven computations and rapid online learning. Localized spike timing-dependent plasticity rules are employed iteratively over sequential gamma-frequency packets to construct odor representations from the activity of chemosensor arrays mounted in a wind tunnel. Learned odors then are reliably identified despite strong destructive interference. Noise resistance is enhanced by neuromodulation and contextual priming. Lifelong learning capabilities are enabled by adult neurogenesis. The algorithm is applicable to any signal identification problem in which high-dimensional signals are embedded in unknown backgrounds.