New course steeps humanities and social science graduate students in machine learning
Claire Dennis, a graduate student in the Princeton School of Public and International Affairs, is steeping herself in math and computer code this spring. While she plans to enter the world of policy — and not that of algorithms and computer programming — she felt it was important to familiarize herself with how technology is transforming the way we process knowledge.
“We’re watching tech explode, and the implications for policy are huge,” said Dennis, who is preparing to receive her master’s in public affairs in May. “I’ve heard so many times that there’s this huge disconnect between policymakers and engineers, and there are very few people speaking both languages.”
Dennis, who plans to pursue a career in tech policy, is bridging her own knowledge gap through a new graduate course, “Machine Learning: A Practical Introduction for Humanists and Social Scientists.” The course, taught by Sarah-Jane Leslie, the Class of 1943 Professor of Philosophy, offers a primer on “deep learning” for graduate students.
The class assumes the students have no extensive knowledge of calculus or linear algebra, nor any prior experience with coding. By the end of the semester, students were able to code a variety of models themselves, including language and image recognition models, and gained an appreciation for the uses of machine learning in the humanities and social sciences, in particular. The last two weeks of the course focused on understanding how complex language models such as ChatGPT work.
“This course is really the best opportunity for me not to become a programmer, but to become familiar with the models, with the challenges in these models, the common tensions or tradeoffs, and to be able to be that intermediary as best as I can be when I when I graduate,” Dennis said. “It’s becoming all the more relevant every day.”
A portal to brand new scholarship
Leslie, the dean of the Graduate School from 2018 to 2021, conceived the course shortly after stepping down from that role as she thought about how to leverage machine learning in her own research. The class will be offered, again, next spring.
“It’s an incredibly exciting frontier that’s opening up new research possibilities across disciplines, and doing so at an incredibly fast rate,” Leslie said. Leslie was especially inspired by the work of Marina Rustow, the Khedouri A. Zilkha Professor of Jewish Civilization in the Near East and professor of Near Eastern studies and history, who uses deep learning and computer vision to identify and transcribe a treasure trove of ancient documents through the Princeton Geniza Project.
“Even in an area seemingly far removed from machine learning, you can leverage these techniques to do scholarship that’s never been done before,” Leslie said.
Leslie estimated that perhaps 10 students would join the course, which was capped at 25. Instead, she enrolled 35 students from all four of the University’s academic divisions. Among those taking the class are doctoral students in comparative literature, Near Eastern studies, history, politics, psychology, neuroscience, civil and environmental engineering, and mechanical and aerospace engineering.
Four students, including Dennis, are graduate students from the School of Public and International Affairs.
“Typically, especially at the graduate level, there’s going to be fairly hefty prerequisites to take a class in machine learning, so the challenge that I put to myself was to try to teach this course without requiring any coding background or any college-level math,” Leslie said. “I think of it as a zero-to-hero course.”
Cracking the code
Given that Leslie planned to teach students with no prior experience in machine learning, she needed to develop some method by which they could gain a quick, but substantive understanding of the technology and its uses.
She launched the class with a crash course in Python, a programming language used in machine learning. During many of the early sessions, she demonstrated how she writes code while projecting her computer screen for the class to see, narrating every step as she composed each line. From time to time, she highlights potential traps, bugs and error messages, and how to respond to them, so students can follow her thought process.
In addition to teaching students how to code, Leslie also has led in-depth discussions of the core mathematical operations that make machine learning possible, as well as the core concepts in computer vision and cutting-edge natural language processing. Throughout she aimed to demystify artificial intelligence such as ChatGPT by helping students to understand how such models actually learn and operate.
Dennis said the course is engaging and challenging in a different way from her policy classes, but it’s not so difficult that she finds herself struggling. “I feel like I’ve surprised myself a little bit in how much I’ve actually kept up with it as someone who has absolutely no background in this,” she said.
Chelsea Clark, a graduate student in comparative literature, said she became intrigued by the concept for the course after hearing Leslie give a talk last fall at the Center for Digital Humanities (CDH).
“There have been so many discussions at the Center for Digital Humanities around large language models,” Clark said. “That was probably the biggest motivation for me — to be fluent enough in these models to be able to speak about them in context.”
Clark also has been thinking about her career prospects after earning a Ph.D. “I’m looking at tech careers and at careers outside the tenure track,” she said. “I asked someone at CDH who is a research software engineer whether she would hire someone who was self-taught or who had taken a course, and she said she would prefer someone who had taken a course because even if they don’t know everything, they know where are the gaps in their learning.”
At a minimum, Clark said she will leave the class having literacy in machine learning and an understanding of its applications and uses.
Leslie said one of her hopes is that the course will allow her students to become more fluent collaborators.
“My own research career involved considerable, interdisciplinary collaboration, and my experience is that it’s easy to have the fantasy that two people who know nothing about each other’s work can work together productively," she said. "Very often it takes at least one of the people having some fluency in the other person’s disciplines.”
“I hope that students see this course as a starting point, not an endpoint,” she added. “I told them on day one, what I wanted more than anything was for them to feel a sense of self-efficacy to go out and learn more about machine learning, and to feel they could navigate this burgeoning domain.”
AI through a philosopher’s lens
With how quickly artificial intelligence, in particular, is evolving, it would be difficult to get large numbers of students through the requisite mathematical and theory-oriented courses to develop an expertise in machine learning, said Peter Ramadge, the Gordon Y.S. Wu Professor of Engineering, professor of electrical and computer engineering and director of the Center for Statistics and Machine Learning.
“I think what Sarah-Jane is doing is she’s bringing machine learning to those people who are living outside the pond of machine learning, and saying, look, let’s just roll up our sleeves and have a practical exercise here and see how it all works,” Ramadge said. “And you'll get to learn how to program in Python along the way, which is, I think, a good thing for everybody these days. Hopefully people will see ‘Aha, it’s not as mysterious as I thought it was, and I’d like to know more.’”
Benjamin Morison, professor of philosophy and department chair, said he was excited when Leslie first proposed the idea for the course not only for its practical benefits, but also as a way to broaden the skill set of graduate students, so they are more attractive prospects to future employers.
It also made sense for such a course to be taught by a philosophy faculty member, he said, given the long tradition of philosophers who have had expertise in adjacent areas, whether linguistics or logic or mathematics. “Philosophers use philosophy as a lens to think about those expertises, and philosophy feeds off knowledge in other domains so that it can think hard about what the nature of knowledge in those domains is,” Morison said.
“I thought that was really inspired of Sarah-Jane to see that our students, if they're going to make progress with the sorts of questions which surround AI, then they really are going to have to understand these technologies,” Morison added. “And of course, that goes for the other humanistic scholars and beyond who are attending her seminar. If they’re all going to make progress with these issues, they’ve got to know the nuts and bolts.”