top of page

Leah Hamilton - Computational Thinking


Welcome to "AigoraCast", conversations with industry experts on how new technologies are transforming sensory and consumer science!


AigoraCast is available on Apple Podcasts, Stitcher, Google Podcasts, Spotify, PodCast Republic, Pandora, and Amazon Music. Remember to subscribe, and please leave a positive review if you like what you hear!


 

Leah Hamilton is a PhD Candidate at Virginia Tech, working in the sensory science lab with Dr. Jacob Lahne. Leah researches method development in sensory science and has a particular focus on the application of computer science and natural language processing to food flavor language. She received her bachelor's in Food Science at NC State University, and then spent two years studying cucumber pickle off-flavors in a USDA lab.


Transcript (Semi-automated, forgive typos!)


John: So, Leah, welcome to the show.


Leah: Hi, John. Thank you for having me.


John: It's great. Alright. So, I'm really happy to have you on the show, Leah because when I went to Pangbourne, Scotland back in those olden days when people used to travel, maybe you're listening to this year's hence and you might find it hard to believe once upon a time, people would actually get on airplanes and go to other countries and visit other places. There was a thing called a conference.

Leah: I thought how I miss it.


John: Anyway, in Scotland and I went to that I think it was a sensometric, no, it was the thing on new technologies. And I was really struck by how good the presentation was by this one person, not talking to, who had I think, you know, I was with my friend Will Russ at the time and we were watching the talk together and said, yeah, well, this is the future sensory science is the use of these computational tools to first off automate existing processes, but then also find new insights along the way. Because I think there's this transformation that happens when you have access to these tools. So I was really excited to meet you and I thought it would be great, as I see you as someone who's kind of part of this new generation of what you might call computational sensory scientists. To talk a little bit about, you know, how did you get where you are? And then we can talk about some of the lessons you've learned along the way.


Leah: Yeah, it's very, but now it feels so funny because I have met slowly a lot of people who are in the like a lot of other computational sensory scientists like you and other members of Aigora that are doing the same kind of work. But so, like I said, I got my bachelors at NC State, and I mostly used to work with flavor chemistry. And I decided that I sort of wanted Hibbett for my PhD. And I was like talking back and forth with Dr. Lahne when I was interested in working for him. And he had this one project that had to do with sort of like automatic synonym detection, basically, you know, like can we cut down on the time we have to spend manually coding hour like comment analysis data. And it was one of those things in the list of potential projects that he threw out. And he was like, this is probably like a long term thing. I don't know if I actually want to hire a student for it right now. And then we took a couple months and then we both came back and we were like, this is what we want to do. But at the time, it was very like both of us were sort of winging a lot of it, and we have gained the skills now that to catch up and feel much more solid. And, you know, we're familiar with the other work going on around us which I've been really excited to see, you know by people like Janice Wong and there have been a lot, hers is the stuff that sticks out to me the most. But, yeah, so it's been really great to get to see other people who are interested and who are already having the same thoughts at the same time. Sebastian Lyons group also doing some really interesting things right now.


John: Yeah, there's been, I think the last five years especially I have seen this. I don't wanna call it a renaissance because it was never born the first time. It's a kind of a transformation that's happening in sensory which is very analogous to a transformation. Actually, it's interesting chemistry, background, background, because there does seem to be some strong overlap between chemistry and data science. Right? There's something I run into again and again when I talk to data scientists. It's so often they started life as chemists. Right? And in chemistry....


Leah: I'm taking a machine learning class at the moment and one of very few computer science classes I've actually taken formally, and a lot of the examples that the professor has worked on are like chemistry and keeps trying to ask me chemistry questions like it's been a couple of years.


John: Yeah. Well, let's talk a little bit more about if we can go back to your background. So your undergraduate degree was in food science? Was it food science proper? So you had analytic chemistry kind of along the way. You ended up with a food science degree. But prior to that, you did have some early coding experiences that I think would be worth revisiting here. Like what would lay the groundwork for your kind of like current I would say maybe hybrid specialization in food science and computer science?


Leah: Yeah, I think, I like to tell people about it and I feel like I try and say it in an encouraging way that I have like basically no formal computer science education or experience. I was in a Web development program in high school where the high school students were allowed to have a very small group of high school students, sort of had free reign over the running and programming the school's website. And I learned a bunch of PHP and server side programming and built a calendar system from the ground up because Google Calendar integration was not very good at the time. And I think it was it has almost nothing to do with the kind of programming I'm doing now. But I have found that because I had that basic experience, like back in my history where I just sort of pick things up and I learn the basics. But it's been much easier to, like, learn whatever I need as I go and to look at problems and know what is probably in a science that I can solve it and what is maybe too ambitious.


John: Well, that takes me to actually I think one thing that I definitely want us to talk about, which is computational thinking, because I think something you said in our call before the show was that people get hung up on particular programming languages, you know, learning particular syntax or learning, you know, particular details of say R or Python. I think the R versus Python debate is kind of ridiculous. I don't think, like I mean, we can talk about it if we want to, but I think in the grand scheme of things, there is something that I would call computational thinking that I know you have also thought a fair amount about. And I think that, because if you learning PHP even if you're never going to use it again, I'm sure that helped you with developing your own computational thinking. So what are some of the key aspects you would say of maybe not necessarily being a coder, but thinking like a coder that a sensory scientist should be the skills that we should be trying to learn that are maybe not exactly coding skills, but are adjacent to coding?


Leah: Yeah, and I come at this from sort of a like a pedagogical perspective, I think a lot about teaching, and so that's probably the lens where I'm going to talk about a lot of this through. But I think people get really hung up, like you said, on what I would call a content knowledge of coding, like knowing a specific language or how to solve specific kinds of problems. And I think there's a little bit of that, that you need to sort of get you into thinking computationally. You know it's really helpful to know, like what a function is, what a loop is. Some of the, like, basic programming. I guess you would call control flow and stuff like that. But the big question...


John: Before we go on, Leah, let's just take two minutes and get those terms define for our audience, because honestly, these things people get oh, function sounds complicated. Maybe just get some definitions, what would be the simple, how would you tell one of your students? What is a function in its most pure form?


Leah: Yeah. So a function is you can think of it like a black box if like if that helps. But, you know, it's just some system, some bit of code, some machine, however you want to think about it abstractly where you can give it certain things as input and it could give you an output. And then instead of having to rewrite or rerun all of the stuff in the middle, it's always going to be able to solve that certain kind of problem you know. Like addition is a function. One plus two equals three, but then you could change those numbers out in the input and the output is going to change in a corresponding function.


John: Right. So that's a way of getting outputs from inputs where the same inputs always give the same outputs and that's it. Yeah, I think like a vending machine is a function. That's something that, you know, you push a button, you get a coke, you push the same button, you get the same thing. Push your button, you may or may not get the same thing every time when you push that button. Yeah. So, okay, let's talk about loops. So maybe, that's I think is one of the biggest things that people need to be more aware of. You know, I see this all the time with working with clients, lack of awareness of loops. Could you bring us up some spill a little bit on loops and why they're so important?

Leah: Yeah, so most broadly, a loop is it's like similar to a function in some ways. It's like a piece of code that you can run repeatedly, but it also has, you know, you're going to take so you have a list of addiction problems that you need to solve instead of solving each one individual and addiction is a little you know, maybe you have like a bunch of different Excel spreadsheets and you want to get the average value from all those different spreadsheets. That's a problem where it becomes a little more clear that they're like a couple of steps involved in that. And you can write out that set of steps once and then tell it where all of your sets of inputs are and then just run all of those in parallel or in succession that you don't necessarily have to know that bit, but it reduces the amount of effort once you know how to solve a problem once. Loops mean that you can solve that problem infinite times.

John: Right. So you can have the same sort of problem? So you got the same sort of problem over and over again. Right? And I think that opens up all sorts of possibilities, because I think, for example, we just working on a project recently. There are three hundred respondents in a study. Right? And we wanted you know, it would have been it was interesting to take a look and see how for each respondent, how do the scores in one area relate to the scores and another. Right? So we're thinking we're going to build a model for every respondent. So describe that to the client. And, you know, I think there is a little bit of, now, it's interesting because different people, you know, are different, you know, levels of awareness with coding. But if you don't have an awareness of coding, then there can be a feeling of like, wow, that's a lot of work. Whereas if you're coder, like doesn't matter if you can do, once you can do it a million times. Right? So I think that that by itself is a game changer in terms of how you think about it. So you were going to say are going on to kind of bigger picture ideas around computational thinking. What were some of the other thoughts you had, not just about the details of functions and loops, but kind of maybe bigger principles of computational?


Leah: Yeah, I think. One thing that I think I have been doing it for so long that sometimes I have a hard time explaining exactly what I mean by some of these concepts. But there is a certain like a level of being able to break problems down into individual steps and being able to define your problem in a way that's sort of like discipline agnostic or where you can, you know, know your inputs, your outputs, how to get from point A to point B this way of problem definition. Then once you can get to that point where you know, I know what I have. I know what I want. I know what those look like. And that can help you start to look at other very different problems from other disciplines. You know, the example that I've been using lately a lot, because relevant is that some of the work that Dr. Lahne and myself and our collaborator, Dr. Christine Miller, are doing is based off of a machine learning algorithm that was trained on trying to extract skill words that refer to skills out of resumes and we've found that actually had a lot of really direct application to our work of trying to find, you know, words in descriptions of flavor that are sort of have a sensory relevance.

John: Right. So someone has no computational thinking experience? They seem like totally different things. But for you, you're like, well, the structure of this problem is almost identical to the structure of our problem, which means whatever was used to solve that problem, you're able to leverage. Well, I think that's a huge idea. So what would be how would you recommend that people start to get some, you know, get these skills? What are some recommendations for how to get started?


Leah: I think the thing that currently is keeping those skills the most honed, I think is working with and talking to computer scientists and people from other disciplines. You know, I think that idea of like, can you explain this problem to your grandmother? Like, can you explain this problem to your friends that are in different fields? I think that uses a lot of the same skills that you need. You know, just thinking metaphorically, like if you can come up with good metaphors for what you're doing in an explanation, that also means that you understand it better and you can sort of understand the underlying parts of the problem a little better.

John: Fascinating. You know, it's interesting, I don't know how much, you know of the history of Grace Hopper, but, you know, Grace Hopper was the few of the math professor and she got involved with some of the early, I think she worked on the I think she worked on one of the early computers, okay? And that was back in the day when computer programming meant reconfiguring, physically, reconfiguring the wires. That's what it was program the machine was physically programmed. And she, as a math professor, used to give her students this assignment that every theorem that they learned they needed to come up with a story that explained the theorem. Right? Very similar to what you're saying. And when she got involved with these people, interestingly, all men who are busy physically changing the computer. She said, why don't you just learned to talk to the computer and it was because of her early work, she was like the work she did became eventually COBOL. So I would credit her as being the world, the first true computer programmer. Somebody would say Ada Lovelace, you know, she's the first person who wrote down an algorithm that could be programmed. But I think Grace Hopper deserves that credit. And that idea is very analogous to what you're saying, that if you can tell a story that describes your problem and describe maybe how you're solving your problem, then it's generalizable. So I think that's really interesting. Okay, good. Thank you, Leah. I've learned something today.


Leah: Thank you to for helping me come up with another metaphor for what I am trying to explain to people. I feel like it's all getting very meta as I'm trying to figure out how to talk about talking about problems.


John: Yeah, well, it is funny stuff gets meta because we're talking about, like, you know, building 300 models. Well, then what we did is we took those outputs and we analyzed them and built a model using the 300. So, you know, everything starts to scale up. It is quite interesting. So let's talk a little bit about your actual research. I think that would be good for people to hear about. So as far as applying your computational thinking, can you describe a little bit on your work on NLP, what you've been doing, what are some of the, you know, insights that you've learned along the way? What tools would you recommend for people who are interested in applying natural language processing to sensory or to consumer data?


Leah: Yeah. At the moment, natural language processing is I think it's one of the forms of machine learning that is a little easier to get into without knowing as much about, like model architecture and things. It's a little bit of a different beast from some other areas of modern, you know, machine learning and neural network sort of research or application. A lot of the NLP world is kind of using the same few big free trained like language models and like changing bits and pieces to work for your specific problem. So some of the big ones are Stanford Core NLP, which is written in Java and does have rappers in R and Python. But I find a little difficult to work with. It is probably one of the more easily available, like the "state of the art" with air quotes for the podcast sake models. I do most of my work in what's called spaCy, p-a-C-y, Capital C. And it is fairly easy to get started with it. It's written in Python. There are a couple of different R rappers for it. Spaceyar is one of those. But, like you said before, I don't want to get too into the technical details because I think there's a lot of room to have arguments about which one is best, and at some point you just need to pick something right. So we've been doing a lot of our work in spCy, and what it does is, you know, you can take written, in our case, English text. I also get a lot of questions at conferences and things about other languages and spaCy and a lot of the other, like these sort of big libraries do have support for other languages. A lot of the time it is not as robust just because there hasn't been as much research done. But there's not necessarily anything in the like the methods that means that it can't be applied to other languages. It's just that fewer people have done that work previously. So you can take just raw English text like a kind that people are dumping out on the Internet in mass everywhere. Text from Facebook, text from Twitter, text from the Whiskey Review blog or the product descriptions on Amazon or like whatever.


John: In your case, was whiskey review is kind of the first big project that you worked on with this? Is that correct?


Leah: Yeah.


John: So that's your, the work that you presented in Pangbourne, that's got your first big exercise. So you were looking at whiskey reviews, so you went ahead and harvested those and then what happened?


Leah: So there are like and this is one place where, again like a little bit of knowledge of what's already been done goes a long way because there are certain things like if you want to break the text up into individual words. If you want to remove common words. If you want to, you know, sort of tag in a sentence like, you know, the whiskey had a lightly oaky flavor. You might be interested in the fact that the word lightly is sort of working as a modifier that tells you how intense the oaky flavor is and you may want to link those words together, which you know these are like grammatical concepts are things that have already been done. But getting from, like every word in the sentence is linked to, it's like grammatical antecedent to just the words we care about are linked to the words that they're modifying. That's the part where you have to bring in some new code and some domain knowledge. That part is an ongoing project to be part of trying to connect which sort of intensity modifiers to the descriptors that they're modifying. And right now we're wrapping up, telling this kind of in reverse, sorry about that. But just starting with the stuff I'm most excited about, which is the problem, I have a lot. So essentially, to take the workflow that we have in terms of like, you know what, we walked up to the our computer science collaborators and are like, these are our inputs. And this is what we want to get is you know, we have these reviews that are just full English sentences. We want to get to the point where we have a list of descriptors from each of those reviews. Maybe from there we would like to reduce the number of words by you know maybe things like peaty and smoky and tar are all sort of in the same family and we want a group of those somehow, or maybe we want a group of whiskeys based on the words that are used to describe them. These are sort of different, like branching paths we have off from that step. And then at the end, then a number of different places where you could fit in like, oh, maybe it's not just presence or absence of a descriptor, but maybe we're also interested in how intense those are and maybe that is present in the language data. And these are things you can start like piecing into the workflow depending on what your overall goal is. But the original workflow like that I presented at Pangbourne was pretty straightforward, it was a process of like, okay, we start with the reviews, we get down to the words, we find words that are just adjectives and nouns because those are the ones that are most commonly flavors. And then we use some clustering methods and then we have a flavor wheel.


John: Right. So semi-automated for producing flavor wheels based on publicly available information that could be applied to any category if you haven't pick whiskey. But if someone has access to, I don't know, tequila reviews, you could do the exact same thing or any other area where they've got a similar amount of data. Yeah, I mean, I think that's fantastic. So it's kind of big, big picture, NLP is the use of machines to comprehend to make sense of text. Is that how you would describe it?


Leah: Yeah.


John: Yeah, and then you're applying it here. And so then what have been the kind of new applications? So you talked a little bit, now you're trying to get into more details, like the modifiers, understanding the intensity. What are some of the other challenges that you're finding with other things that you're working on that you think are kind of promising or interesting in this area?


Leah: So one thing that we're hoping to work on right now is using this as a source of understanding about the relationship between price and flavor, potentially. Like kind of flavors that people are willing to pay more for. And then going from there into doing some sensory work in the lab to try and parse out. You know, is it the words that have some sort of prestige value or like the actual flavor that's detected that has some sort of prestige? We're interested in like, well, ultimately, I think it would be interesting to use some of these methods and maybe also some like text to speech technology or something like that to speed up a lot of data collection and processing for consumer work.


John: Yeah, of course, speech-text, text-speech, these things, I mean, for me with the smart speaker research is very relevant. Yeah, now, I think you're really just set at the forefront here. Unfortunately, we're almost out of time. I can't believe it. I think you and I could talk for a long time. It's really interesting. So you are going to be graduating on the next year or the year after and when you graduate then your plan is to stay in academia? Is that your kind of current thought? Or potentially going to hit the job market? What's your general, I'm sure you will be a hot commodity if you decide to go to the, you know, industrial era.


Leah: There are a couple of friends and collaborators in companies that have already told me that if I change my mind, that they're interested. But yeah, at the moment I'm hoping to find an academic job. I am open to other routes. I'll probably be applying both ways when the time gets there.


John: Maybe Aigora. You think about Aigora. We can talk in a couple of years.


Leah: Good to know that.


John: Yeah, this has been great, Leah. So just to wrap up, normally we ask people, you know, what advice would you have for young sensory scientist but you are a young sensory scientist, so let me instead ask you, over the last couple of years, what are the things that have helped you the most in terms of your kind of early career development? The things that have happened that you feel like either that you chose to happen or that happened to you, that you feel like were most helpful and that you would encourage other people to try to replicate for themselves?


Leah: Yeah, I think, in a lot of ways, applying to, well, taking the position at Virginia Tech in the project that was sort of like more nebulous and more cutting edge was a little bit of a leap of faith compared to the other program I had an offer from which was like just on a very defined variant that was much more close to what I been doing in the past. And I think that worked out really well for me. Just like following what I wanted to do, like saying yes to things and being okay with the idea that I might have to learn as I go. I also think I have gotten a lot of benefit from both like the linguistics classes I've taken, the computer programming experience I have like English minor and if you can be a little bit of an expert in something else and bring that like not enough to be an expert to other computer scientists, but enough to bring that into sensory science and be able to speak the same language as the other sensory scientists, but have this outside expertise. I think that's really valuable and it really makes a difference to the field.


John: Yes, I totally agree. That's the idea of the talents staff. I think it was Scott Adams who pioneered this idea of the talent staff which is much easier to be talk 10 percent and say four things than it is to be .001 percent. There's only one LeBron James, right? Like you're going to be the best basketball. That's really hard. But if you're very good at several things, pretty soon you're the only person who is as good as you in all those things. So, yeah, that's, I think, really excellent advice. This has been great, Leah. So if someone wants to reach out and connect with you following this, what's the best way for them to get in touch with you?


Leah: Yeah, I have a LinkedIn and it has a lot of numbers at the end.


John: We'll put the link. Okay, so reach out on LinkedIn and connect with you. Okay, this has been great. Any last comments, thoughts, advice, wisdom?


Leah: Thank you so much for having me on the podcast and I could talk forever, so thank you for humoring me.


John: This has been great. Alright, thanks. Okay, that's it. Hope you enjoyed this conversation. If you did, please help us grow our audience by telling your friend about AigoraCast and leaving us a positive review on iTunes. Thanks.



 

That's it for now. If you'd like to receive email updates from Aigora, including weekly video recaps of our blog activity, click on the button below to join our email list. Thanks for stopping by!



コメント


コメント機能がオフになっています。
bottom of page