What’s That Smell? An AI Nose Knows
If you want to predict the color of something, you can talk about wavelengths of light. Light with a wavelength of around 460 nanometers is going to look blue. If you want to predict what something sounds like, frequencies can be a guide—a frequency of around 261 Hertz should sound like the musical note middle C.
Predicting smells is more difficult. While we know that many sulfur-containing molecules tend to fall somewhere in the ‘rotten egg’ or ‘skunky’ category, predicting other aromas based solely on a chemical structure is hard. Molecules with a similar chemical structure may smell quite different—while two molecules with very different chemical structures can smell the same.
This week in the journal Science, researchers describe developing an AI model that, given the structure of a chemical compound, can roughly predict where it’s likely to fall on a map of odors. For example, is it grassy? Or more meaty? Perhaps floral?
Dr. Joel Mainland is one of the authors of that report. He’s a member of the Monell Chemical Senses Center and an adjunct associate professor in the department of neuroscience at the University of Pennsylvania in Philadelphia. Mainland joins Ira to talk about the mystery of odor, and his hope that odor maps like the one developed by the AI model could bring scientists closer to identifying the odor equivalent of the three primary colors—base notes that could be mixed and blended to create all other smells.
Dr. Joel Mainland is a member of the Monell Chemical Senses Center and an adjunct associate professor in the Department of Neuroscience at the University of Pennsylvania in Philadelphia, Pennsylvania.
IRA FLATOW: This is Science Friday. I’m Ira Flatow. Later in the hour, work to preserve the golden lion tamarin and unraveling the mysteries of the Y chromosome. But first, if you want to predict a color you can talk about wavelengths of light, right?
Around 460 nanometers, it’s going to look blue. If you want to predict what something sounds like you can talk about frequencies. 261hz– that sounds like middle C. But is there a way to tell what something is going to smell like? One way might be to look at a molecule and say, that should smell like dirty socks or this molecule should smell like roses.
Well, this week in the journal Science researchers describe developing an AI model, that if you give it the structure of a chemical compound, can predict where it’s likely to fall on a map of odors. For instance, is it more grassy, more meaty, more floral?
Dr. Joel Mainland is one of the authors of that report. He’s a member of the Monell Chemical Senses Center and an adjunct associate professor in the Department of Neuroscience at the University of Pennsylvania in Philadelphia. Welcome to Science Friday.
DR. JOEL MAINLAND: Thanks for having me.
IRA FLATOW: Nice to have you. OK. Before we start on this new work, let’s get a refresher on smell biology 101. I was always taught that it’s sort of a lock and a key situation in your nose, with smell molecules fitting into lock receptors. Is that right?
DR. JOEL MAINLAND: Yeah. So I think that’s a good analogy at the basic level and gets most of the things we care about correct. We have a more subtle understanding of that now as people have developed molecular docking tools and gotten a finer grained understanding of having electronegative and electropositive interactions and things like that.
IRA FLATOW: So your team developed this AI model. How do you train a computer to smell things?
DR. JOEL MAINLAND: The way to do it is to collect a lot of data. So a lot of these machine learning algorithms are very skilled at solving complicated problems, but they’re very data hungry. So previous work– the sort of standard in the field– used about 500 molecules to develop a model. And this work started with 5,000.
We trained the model using these 5,000 odors. And we used a new type of architecture called a graph neural network that is very skilled at looking at molecular structure in a more specific way than previous models and allowed us to match those two things up.
IRA FLATOW: Do you have a panel of smell testers to help them train?
DR. JOEL MAINLAND: Yeah. So we created our own panel. So we took some people in Philadelphia and trained them for about four hours to be panelists for us. And that training basically consists of us handing them a kit that has 55 different vials in it.
And each of those vials corresponds to a particular smell. So we have a vial in there for grassy. We have a vial in there for animal. And they learn what those labels mean by actually smelling those. So we train them over the course of four hours and then the panel would smell the 400 molecules for us.
IRA FLATOW: And so then because what the molecules smell like, you tell the AI, this is what this smell looks like molecularly.
DR. JOEL MAINLAND: That’s right and then we do pattern matching. So the model will look for molecular patterns that match up to various smells that all have the same percept.
IRA FLATOW: Now I’m thinking of these people who can taste the wine and come up with this huge list of descriptions. Were some people better than others?
DR. JOEL MAINLAND: Yes. Some people are better than others. And we definitely screened out some people who were not very good at this. Some default people that are untrained are terrible at this. And some people we have difficulty training.
We had a couple panelists who were better than others. But I would say we did not have a real set of standouts there. At the end of this, after we had collected all the data and tested the model, we brought in a master perfumer– so Christophe Laudamiel came in as our expert and he also smelled all these molecules looking for ones that were particularly interesting for industrial applications, for example.
And he had very different description of these than the panel did. So one example, our panel smelled a molecule and rated it as sharp, sweet, roasted, and buttery. And the master perfumer smelled it and he said, that smells like a ski lodge or a fireplace without a fire.
IRA FLATOW: Now you know, I know what that smells like now. That’s a really good description.
DR. JOEL MAINLAND: That’s right. And if you think about an ashy smell, of old ash versus an ash of a fireplace that recently had a fire– those are different smells. And the perfumer was able to pin this down very precisely.
IRA FLATOW: And are you able to train the AI to know that difference?
DR. JOEL MAINLAND: Right now we are not able to. So the data that we collected is sort of a lower resolution. We think of it akin to 8-bit graphics. We have some rough idea of what these things smell like but we don’t have the level of resolution to get to what the master perfumer is doing.
IRA FLATOW: So it can get close to what you think it is but not really hit it exactly.
DR. JOEL MAINLAND: That’s right. It gets in the neighborhood. And we would love to have 15 master perfumers smell 400 molecules for us, but unfortunately that’s a lot more difficult to pull off.
IRA FLATOW: Is it better at some kind of smell than another?
DR. JOEL MAINLAND: Yeah. So the model is very good at things like garlic and fishy. And part of the reason it’s good at those is that there are lots of examples of molecules in our training data that have a garlic or fishy odor. It’s much worse at things like musk.
And musk is actually a well known problem in the field where you have many different molecules that have distinct structures and all of those structures– even though they’re very different– all have this musk character.
IRA FLATOW: Yeah. I would imagine musk smells a lot different to a lot of different people and certainly to the AI.
DR. JOEL MAINLAND: So musk is sort of a tricky term. Untrained subjects will often relate it to a body odor smell. But the way that perfumers use the word musk is this sweet powdery smell. And we know that some people don’t smell certain musks. And indeed the industry to deal with this will often include multiple musks of different structures in a formulation so that they know that everybody will smell at least one of the musks.
IRA FLATOW: Love it. I love it. Now some AI models are kind of a black box right? Can you look at what your model is doing and try to figure out why certain molecules smell the way they do?
DR. JOEL MAINLAND: We can a little bit. There’s still parts of the model that are very much a black box. But what was interesting here was that we have a neural network and the neural network first takes this molecular structure and tries to learn as much as possible about how molecular structure relates to perception. And it sort of culminates in this sort of next to last layer.
And then out of that layer, it makes predictions for how cheesy something is or how grassy something is in different ways. So that next to last layer has all of the information about all the different odor properties. And we can take a look at that. So we can essentially plot that out as a map of coordinates.
And we can see which molecules fall close to each other in that map. And so that lets us understand the logic of why the model is able to learn this better than previous models.
IRA FLATOW: Does this tell you anything about what’s going on inside the brain or why we smell things the way we do?
DR. JOEL MAINLAND: I think a lot of the field typically thinks about olfaction from the perspective of a chemist. So we look at a molecule, and if two molecules have the same number of carbons and they both have particular sulfur group in them, then people think that those are structurally similar molecules.
And the brain has a slightly different take on this. There are lots of cases where we have very similar structures that are perceived very differently, or very different structures that are perceived very similarly. And when we looked at this map, we saw that it solved several of these problems in a way that was better than previous models.
And we hypothesized about why that might be. And our guess is that what it’s doing is looking at this from a metabolic perspective. So if you can think about smell as being important for us to find nutrients in certain foods, you could imagine that there’s an essential amino acid in a food that has no odor. And that essential amino acid, even though it’s odorless, can be broken down into smaller molecules that do have an odor.
And so you could imagine this amino acid is split in two. And those two halves don’t look the same, but both of them are signals for the same source nutrient. So the olfactory system would like to link those back and say those have the same smell. But a chemist would not think that those are structurally similar.
IRA FLATOW: Very interesting. With colors, we have the three primary colors. You can mix and match them to make all the other colors. Are there primary smells?
DR. JOEL MAINLAND: We think that there are primary smells. And we’re now playing around to try to figure that out. So this paper really was focused on understanding single molecules and how to make predictions about those. But in reality, almost everything that you smell is a complex mixture.
And so the next phase of what we want to do with this research is understand how you can take two molecules, A and B, where you know what they smell like and then predict, when you mix them, what the mixture will smell like. And if we can tie those two things together, we can go sort of forward and take any recipe and predict what it smells like. Or we can go backwards and look at the universe of smells and try to identify these primary odors that would allow us to use them as sort of simplified building blocks to make a wide variety of odors.
IRA FLATOW: Our tongues have taste buds on them that are sort of dedicated to certain tastes. Does our nose have sort of smell buds that are dedicated to certain smells?
DR. JOEL MAINLAND: There’s some debate about this. I think there are a couple of cases where you have a specific receptor that’s tied to a specific percept that we would cognitively think of as a category. But there are also other cases where you look at these receptors and they respond across a wide variety of categories. So it’s still an unsettled question in the field as to how these actually match up to a specific percept.
IRA FLATOW: That’s cool. Do we all smell things the same way? Like we can all agree on what blue is, but can we all agree on how something smells?
DR. JOEL MAINLAND: Yeah. So in some cases that we know very specifically that’s not true. So one example here is androstenone. And about a third of the population, when they smell this molecule, don’t smell anything at all, myself included. A third of the population when they smell it, smell it as this sort of sweet sandalwood odor.
And then another third of people will smell it and find it to be a very intense urine odor. So we’ve linked this to genetics. Certain people have a receptor that responds to this molecule. And that changes your perception of this. And we find that if you look at one individual and another individual, you’ll have these areas of disagreement.
But once you put panels together and you get those panels to be large enough– around 12 to 15 people– you can smooth out that variation. And at that point we find that really the differences among smells is really similar to the sort of level of noise or differences in vision. So even though we think of vision as sort of this truth that you can put in an RGB number and everybody will think that number is exactly the same color, in reality there’s variation there too.
And so we have this variation in vision and yet these visual maps have been really profoundly useful. Similarly, we have variation in smell. But we think that smell maps will also be extremely useful.
IRA FLATOW: That is cool. Now once you have this model, you used it to predict chemicals that haven’t been smelled before. Something new that we have never smelled.
DR. JOEL MAINLAND: That’s right. So in fact, we tried to pick 400 molecules that had never been smelled before for the study. And in fact, industry had done this previously. There’s a sort of famous example of a molecule that smelled like the ocean that was used in the sort of late 80s in a lot of different fragrances.
So prior to that time, perfumers had no access to that particular smell. They discovered a molecule that let them now create lots of things that smell that way. And it resulted in this big boom of that particular type of fragrance.
IRA FLATOW: As we wrap up, what are your big goals? What would you really love to be able to get out of your research?
DR. JOEL MAINLAND: I think really the big goal here is to figure out primary odors. I think that– right now, if you think about what you can do with your phone in terms of sharing and recording images or sounds, and storing them and archiving them and bringing them back up without destroying them– we can’t do that with odors right now. And the ability to digitize then find primary odors will really explode the possibilities for what we can do with smell.
IRA FLATOW: Wow. Sounds cool. Thank you for taking time to be with us today.
DR. JOEL MAINLAND: Thanks for having me.
IRA FLATOW: Dr. Joel Mainland, member of the Monell Chemical Senses Center and adjunct associate professor in the Department of Neuroscience at University of Pennsylvania in Philadelphia.