Published September 25, 20211:36:05

5 - Tai-Danae Bradley: Where math meets language

How a mathematician who hated school math came to love category theory, and why tools from quantum physics help explain what language models learn.

Chapters

Quotes

  • On believing math was for geniuses

    “I thought math was like the thing that geniuses do, and I'm not a genius, so math is not for me.”

    Tai-Danae BradleyRead from 05:20
  • Why she moved from physics to math

    “If I just want to understand what physicists are talking about, I need to know or be fluent in the language that they use. And that language is math.”

    Tai-Danae BradleyRead from 14:51
  • On category theory as a bridge

    “The most exciting place to be is on this bridge, where you can transport ideas one to the other.”

    Tai-Danae BradleyRead from 24:57
  • A joke about category theory

    “They'll say of category theory that it makes the trivial things trivially trivial.”

    Grant SandersonRead from 29:15
  • On physicists' math in AI

    “Maybe some of these mathematical tools that the physicists are using are actually just the right way to do linear algebra in high dimensions.”

    Tai-Danae BradleyRead from 55:10
  • Why she wrote her thesis for everyone

    “There's so much great math out there, but it's like hidden behind this dense fog of formality, you know, and jargon.”

    Tai-Danae BradleyRead from 59:15
  • Advice for new writers

    “If you're doing it so that you can, like, you know, I don't know, get lots of clicks or something, I think people can see through that.”

    Tai-Danae BradleyRead from 1:21:42
  • What math revealed to her

    “Those ideas made an impression on me, because it suggested that to do math, you just need a brain.”

    Tai-Danae BradleyRead from 1:32:31

Summary

Tai-Danae Bradley didn't like math until the middle of college: in school she was good at being "a very good robot," following procedures and getting A's without understanding what she was doing. What changed it was a calculus teacher who explained the comparison test for series with two cars at a stoplight and kept saying you don't have to be a genius to do math. Then came physics, because she wanted to know how the world works, then math, because it turned out to be the language of physics, and a PhD at the City University of New York. Category theory, which on first contact struck her as the worst thing in mathematics, was reintroduced to her by her advisor John Terilla as a language of bridges between fields.

The heart of the conversation is her research. Language models learn from raw text with no labels at all, yet pick up syntax and meaning. Bradley and her collaborators look for the mathematical structure present in the text itself: algebra (words get stuck together) and statistics (how often). Enriched category theory provides an answer: the arrow from "red" to "red fire truck" carries the conditional probability of that continuation. Her dissertation borrows from quantum physics a way of passing from a system to one of its parts without losing information, and applies it to probabilities on words. Grant admits he's usually skeptical of anything billed as "quantum plus AI," but calls her thesis one of the most clarifying things he's read.

The second half is about explaining. Bradley deliberately wrote her dissertation for everyone and made a hand-drawn 10-minute trailer for it; her blog Math3ma began as exam notes she rewrote at home to find out what she didn't understand. They agree that the fear of publishing fades with time and with writing about what genuinely excites you, and Grant recalls busking on violin in Park City: the hard part is starting, and people respond to passion more than polish.

Mentioned

Show 14 more mentionsShow fewer mentions

Sponsors of the episode

  • Brilliant00:39interactive courses in math and programming, 20% off an annual subscription

Transcript

01The guest and her blog

Grant invited Tai-Danae Bradley because her blog Math3ma makes the most abstract corners of math remarkably approachable.

Welcome to the 3b1b podcast.1The 3b1b Podcast — Grant Sanderson's podcast, from the creator of the YouTube channel 3Blue1Brown. Five interviews came out in the summer and fall of 2021; this is the fifth. I'm Grant Sanderson. Today my guest is Tai-Danae Bradley,2Tai-Danae Bradley — mathematician who applies category theory and tools from quantum physics to language and language models. She earned her PhD at the City University of New York in 2020 and co-wrote the textbook Topology: A Categorical Approach (2020). who is currently a researcher at Sandbox at Alphabet,3Sandbox at Alphabet — a team inside Alphabet, Google's parent company, working at the intersection of AI and quantum technology. It was spun out in 2022 as the independent company SandboxAQ. and I think I first came to know about Tai-Danae because of the blog that she writes, which is called Math3ma,4Math3ma — Bradley's blog (since 2015), explaining graduate-level math from topology to category theory. math3ma.com and the spelling is a little weird. It's M-A-T-H, the number 3, M-A. And I think what really struck me is how she talks about these topics which are stereotypically extremely abstract, things like category theory,5Category theory — a branch of mathematics that studies not objects themselves (sets, groups, spaces) but the arrows between them, structure-preserving maps, and how those arrows compose. It began in the 1940s with Samuel Eilenberg and Saunders Mac Lane; its generality earned it the half-joking nickname "abstract nonsense." which has this reputation in math of being, you know, the abstraction of abstractions. Today in our conversation, we talk a bit about her research, some of her blogging, and the path that got her there, what her experience as a PhD student was, and even before that.

AdBrilliant00:39 2 min

And as usual, before diving into things, a brief word from today's sponsor. This episode is supported by Brilliant. I think a lot of people listening to this want to improve their math skills in one way or another, and Brilliant is a great place to do so. In the very first episode of this podcast, actually, Alex KontorovichaAlex Kontorovich — Rutgers mathematician working on number theory and formalizing proofs in Lean; the guest of the first episode of The 3b1b Podcast (2021). and I talked about how important it is to actually work on problems and drill on examples in order to learn, and how this goes just as much for working mathematicians as it does for anyone else. From the get-go, Brilliant's approach has always been more intrinsically about interactivity than a lot of the courses that people take, because they're centered around doing problems and working through exercises. But recently, they've been doing a lot more to make the courses even more interactive.

For example, if you want to learn about derivatives, you find yourself directly manipulating graphs and tangent lines and kind of testing your understanding of what they represent. Now, for me personally these days, whenever I try to learn something new, I really have to make an extra effort to remind myself to actually do concrete computations or to actually code something up that's related to the topic, rather than just kind of reading about it. So it's exceedingly helpful when there's a platform that actually builds in this mode of interaction. So if there's something that you want to learn, you know, statistics, data science, calculus, geometry, whatever it is, some skill you're trying to develop, take a moment to visit brilliant.org/3b1b and check out some of the courses they have to offer. You can try the product for free, but if you follow that link, brilliant.org/3b1b, it gives you a 20% off discount should you choose to get an annual subscription.

02From hating math to understanding it

Until mid-college, math was a set of pointless procedures for Bradley, until a teacher explained series with cars at a stoplight.

Was there a moment when you knew you wanted to be a mathematician?

There was a moment, yes, but it was a little bit later on in life. That's an interesting story. So how far back do we want to go?

Let's go back to the beginning.

Let's say first there was a long period of time when mathematician was not a thing on my radar as far as things to do in life. So when I was a younger student, I did not really like math that much at all.

Oh yeah. Oh no. I had quite bitter feelings.

Are we talking like elementary school, high school?

Yeah, basically like everything up until, you know, middle of college.

Yeah. I thought, okay, so for me, when I was, let's say middle school and high school, math was just one of those subjects that, you know, people said you had to learn along with everything else.

I don't really have math memories as a young student, except for maybe feelings of frustration. Like, what are these esoteric hieroglyphics and why are we doing this? Like this is so horrible. What is this thing? And I didn't understand. I was very much like, I could regurgitate things well. So if like the teacher said follow this procedure, I could be a very good robot and follow that procedure and then get it correct, but I didn't know what I was doing or why I was doing it. And I thought that that's what math was.

So you could sort of win the game of school, but it was other than that pretty uninteresting.

Exactly, exactly. Totally uninteresting. And in fact, it was like towards the other end, you know, like frustrating. What is this thing? Why are we doing it? Anyway, so I went to college.

Math was not on my radar. When I entered college, I didn't really know what I wanted to do as far as a major goes. I've always really liked science. And when I was in college, I played on the women's basketball team my first two years actually.

Yeah, so I really liked athletics. I like science, and so I thought maybe I'd have a career in that realm.

In like the mixture of athletics and science.

Yeah, like kinesiology or sports nutrition, something like that.

So this is what I thought I was gonna do in life. So because of that, I was taking some science-y classes. I wasn't a major yet, but okay, like I took bio 101, chemistry. I put off physics as long as possible because that was very scary. But on this track, I was taking calculus classes, like the calc one, calc two, calc three sequence. And at the end of my second year of college, I was in a calc three class and I had a really great teacher.

Someone who taught math as much more than just these, you know, symbols that you push around, much more than just doing really fast arithmetic, like who's the fastest that can multiply these numbers together. This is what I thought math was. But he taught it in a very conceptual way, and he would say things like, you don't have to be a genius to do mathematics. And I had never heard someone say that before, and in fact, I thought math was like the thing that geniuses do, and I'm not a genius, so math is not for me. This is really what I thought, like, I'll have a career in something else.

Were there like particular examples that you remember him bringing up to this effect? Was it like only a matter of emotional motivation?

ExplainerThe comparison test and cars at a stoplight

A series is an infinite sum a₁ + a₂ + a₃ + … It converges if the sum is finite (1 + ½ + ¼ + … = 2) and diverges if it's infinite (1 + ½ + ⅓ + … grows without bound).

The comparison test: suppose all terms are non-negative and each term of series A is at most the corresponding term of series B. Then if B converges, so does A; if A diverges, so does B. The converse fails: B diverging says nothing about A.

Bradley's teacher's analogy: B is the car in front, A is you. If the car in front stops (B converges), you must stop too; if you run the red light (A diverges), the car in front had better be moving, or there's a crash.

No, no. So I have an explicit example. I'm so happy you asked, because I remember this very vividly. And okay, I will try not to give too much details, to not like bog people down in the weeds, but do you remember the comparison test6Comparison test — a way to tell whether a series converges by comparing it term by term with a series whose behavior is already known. for if a series7Series — an infinite sum of numbers. It converges if its partial sums approach a finite number and diverges otherwise. converges or not? Yeah. Okay, so maybe for the sake of listeners I'll just recall it really quickly. Please do. You have some numbers, which I'm gonna call them by letters, a1, a2, a3, a4, and you have a whole bunch of them, and you look at their sum, and the question is, you know, does this thing converge? Is the sum finite or is it infinite? Is it infinity?

Does it converge or does it diverge? So let me call that sum, the sum of these a1, a2, a3, let me just call that A. Now suppose you have another series, let's call it B. So it's the sum of numbers b1, b2, b3, da-da-da-da. And the question is, like I have a series and I want to know, does it converge or does it diverge? Does it blow up or is it some finite number?

And the comparison test says, well, if you have two of these, you can kind of like compare them with each other. And if you have knowledge about one, that'll tell you something about the other. So I think you have to have some hypotheses like, suppose that a1 is less than or equal to b1 and a2 is less than or equal to b2, da-da-da. And suppose these are all non-negative numbers. Okay, if that's true, then you can say the following. The test says, if A diverges, if that's infinity, then so is B. That's a thing that you know. Or if B converges, then so does A. So this is a thing that you learn, and I was like, blah, blah, blah, wah, wah, wah, symbols, blah, blah, whatever.

Like, what is that?

And who cares? But then when I learned this in class, here's how the teacher explained it. This was so mind-blowing to me. He says, suppose you're driving down the road and you're in your car, right? And you go to a stoplight, and in front of you is a car also at the stoplight, right in front of you. Now, if the car in front of you stops, then you had better stop. Like if B is the car in front of you and you're A, and if B stops, if B converges, you had better stop or there's a problem, right? Okay, so this is like the comparison test. Conversely, or the other part of this is, if you don't stop and you keep going through this red light, you better hope that B goes too, right? Like B has to go, otherwise there's gonna be an accident.

That's such a vivid way of viewing it, isn't it, right?

Like these series rear-ending each other.

Exactly, exactly. You want to avoid a collision. And so the mathematics says, well, here's how you avoid it. Now I had never ever heard anyone describe math like with English, you know. I mean there's math with English, but then there's math with English, like that, like everyday, you know, language. And I thought, I've been in a car at a stoplight, and I personally don't like collisions. So I can understand why this is like a math thing and like maybe why it should be true. And that was the first time that I remember mathematics, but like as a concept and as an idea. So when he would say, hey, you don't have to be a genius to do math, anyone can do it, it wasn't just words, but then he would illustrate this concretely by taking what at the time seemed to me like a, you know, a complex idea. Like, I don't know, what is this series and like why are we adding these numbers up? And what's this Sigma8Sigma — the Greek letter Σ, used as the summation sign: Σaₙ reads "the sum of all aₙ." thing anyway?

Like what is this? So to me at the time it felt complicated. But he made it very simple and accessible. Now that was like an epiphany for me, because he also taught math in the context of physics, and he would kind of go off on tangents in lectures, but like, here's how, you know, physicists think about these things when they try to understand how the universe works. So then that class was very transformative for me, because I realized that math is not just about, you know, being a human calculator, which is what I thought, or like, you know, symbol manipulation. This is what I thought it was. But it's like, you know, concepts and ideas that people use to understand the universe and nature around them.

03From physics to the language of physics

Wanting to know how the world works took Bradley to physics, and asking "why" took her to math, because math turned out to be the language physicists speak.

Hearing your story actually like resonates, or it seems to explain a lot, because what strikes me about your blog, first of all, it's actually very abstract, a lot of the things. Like you're talking about category theory. It's almost bizarre to hear that, if you back up to your early college years, just the symbolism around like converging series was unmotivated. Because looking at your blog now, it almost seems like you relish the, I don't know, the purity and the fact that you can like take these extremely general concepts and describe them with just a very sparse number of symbols. But what stands out is you always connect it to something absurdly tangible, right? Like way more so than most other math expositors do.

And do you think that kind of harkens back to this calc three teacher, and, I don't know, the example that was set there?

I do. In fact, so the question was, I think your original question was, when did I know I wanted to be a mathematician? So towards answering both of these questions, it wasn't even that class, to be honest. So what happens after that epiphany? I was like, what? I want to understand the mysteries of the universe. So I quit the basketball team and, you know what? I declared physics as my major.

As a physicist. One step in the direction towards math. It wasn't gonna be a wholehearted dive into it, but just...

That's right. Well, I was very interested in understanding how the world works. And remember, I really liked science. And I thought, you know, like that's so cool, when I eat a banana, you know, I get energy after a workout. Like what is that process? Like who's telling my cells to do all the things that they're doing? Like I don't have to think about DNA, you know, replicating. It just does it on its own. I find that really fascinating.

Very reassuring that it does it, yeah, that we don't have to think about it. Just how hard would life be if we did.

Wow, yeah, too much to think about. Yes. So that's actually really what my interests were. And I kind of, you know, I like asking why. Why does this work? Well, you know, if I'm interested in like how the body works as an athlete, you know, maybe I should understand something about biology. But I really thought it was cool, like at the molecular level. So, oh, maybe I should do like biochemistry. I'll be a biochemistry major. But then you keep on asking these fundamental questions and it was always going back to physics. And so I think that class helped me identify that, oh, physics is like the branch of science where you sort of ask these fundamental questions about, you know, laws of nature. And I was very intrigued by that.

So fast-forwarding, I guess, a little bit, when I write on Math3ma about math topics that feel very pure, like category theory, or, you know, I went to a graduate program in pure math...

Really, secretly, or not so secretly now, it's because I have interests in like how the world works.

So you're an applied mathematician, but with the external veneer of a category theorist.

Yeah, yeah. So, you know, I don't know, when people think applied mathematician, maybe category theory is not the thing that comes to mind, but maybe I'm like a, you know, doing non-traditional applied math in non-traditional ways or something like that.

Well, so I guess if the reason you were driven into physics as opposed to biochemistry was the sense of like the fundamentals, what then made you step to a graduate program in math instead of pursuing physics and trying to understand just the universe as the universe?

Yeah. So, great question. So I did physics as this major. And so, by the way, it took me about six years to finish undergrad. I did two years of basketball. I took a whole bunch of liberal arts classes. I was like, I don't know what my major is, but science is cool and basketball is too. So I did that for two years. Then I had this life-changing calculus three class. I quit the team, I did the physics major for two years. At the end of that, I could have, yeah, like stopped, I guess graduated and then done something else. But by the end of that time, I realized that all of the fascination that I found actually had foundations in mathematics.

So I thought it was very curious that when you ask these sort of fundamental why questions, I like filtered down to physics. Then when you're in physics and you ask why, it's like, well, the language that we're using is mathematics. And then you go over to the math world and you're like, why? And it's just like, well, math again. So it felt very, very fundamental. And I thought, oh, if I want to understand really what's going on, I need to understand mathematics. Like if I want to one day, you know, be engaged, not be engaged, that's too much. If I just want to understand what physicists are talking about, I need to know or be fluent in the language that they use. And that language is math. And I don't really speak that language very well. So I want to learn it. So at the end of my fourth year of college, I then declared a math major.

Okay, so I declared a math major and I stayed on for two more years and I did math.

Well, so what were the physics classes like at that point? Was it as curiosity-provoking as you had hoped it would be? Were they disappointingly abstract, inspiring, not?

Okay, so now I have to think back. This is a long time ago. So I enjoyed them. Sometimes, as one does, one feels that some classes can be dry. So I definitely had that feeling. I don't know if it was disappointing. I think I was just so excited that I was learning the tools that, you know, the great physicists of old used. I was like, oh, this is so amazing, you know, I'm like taking a class in quantum mechanics. This is so exciting.

But I think that it was a little bit, I don't know, unsatisfactory, because I could see that they were using mathematical tools, but we never really talked about them. Like, you know, I mentioned quantum mechanics, so there's lots of linear algebra. And that felt so fundamental to me. Like, okay, we're talking about eigenvectors and eigenvalues,9An eigenvector of a linear transformation is a vector that only gets stretched or shrunk, without changing direction; the stretch factor is the eigenvalue. In quantum mechanics, eigenvalues of operators are the possible outcomes of measurements. but like, what is that? And why does it work that way? And why is that the thing that we're choosing? And what else can you do with these things? Right? And so that was like a whole nother universe, mathematical universe. And it just seemed that that's where all the juiciness lied. Like that's where all of the awesome stuff lied. So then I realized, you know, if I can understand the math, then I can go back, you know, and like ask the physicists, hey, you know, what are you doing with these tools?

Maybe, I don't know, is it harder to go the other way around? I don't know. But I felt like, hey, that's the thing that I'm really interested in. So then I did, you know, I did the math major. And then after I did two years of this math undergrad, that was like, oh no, that's only the appetizer. You know, where's the meal? I want more. How can I learn more? I didn't even scratch the surface. It's like a touch, tickle at the top atom on the top of the surface. Like there's so much more to do. Undergrad can't be all that there is.

I have to go to learn more. Where can I get more information? And then I found out, oh, wait a second, grad school? In most math PhD programs, you know, they'll pay for your tuition.10In US math PhD programs, students usually pay no tuition and receive a stipend, typically in exchange for teaching or research assistance. So I realized, wait a second, you mean someone is going to pay me to learn math? Oh my gosh. So then it was like the natural thing to do is to go to graduate school.

04Grad school and an advisor

At the CUNY Graduate Center Bradley found her advisor, John Terilla, who introduced her to machine learning and category theory.

And at this point, was it still with a feeling that you wanted to better understand the language of the physicists, or had you kind of been caught into the whirlpool of just the delight of math in and of itself?

So it's definitely the former, although I had a better appreciation for the latter. But I absolutely went into graduate school... You know, when you write your research, not your research statement, but like your personal statement for admissions into graduate school, you know, you want to say something about, I'm applying to your school because my interests are blah, blah, blah, and you have awesome faculty in these related fields, and here's what I'd like to do. I didn't have like a very specific thing, but I've always had interest in mathematical physics. And so I would say that, you know, I came into graduate school, I wrote this on my little personal statement thing, and I came into graduate school with this in mind, like, okay, I want to take math courses and work with an advisor one day that has interests or connections to physics, because secretly I have this goal, you know, that I stumbled upon a few years prior, to do this.

So where did you end up going to grad school, and what was the process of choosing an advisor like?

Yeah, so I went to the City University of New York, the Graduate Center, or the CUNY GC,11CUNY Graduate Center — the graduate school of the City University of New York, on Fifth Avenue in Manhattan, where doctoral degrees, including in mathematics, are awarded. we call it. So that's where I went. To choose a thesis advisor, let's see. So I think that I kind of poked around on the department website, and you can see, you know, faculty's research interests. I kind of made a list of everyone who did math research that was tangentially related to physics in some way. So this is by process of elimination, right?

And then, you know, as one does, you kind of like ping these faculty, you know, dear so-and-so, I'm a second-year graduate student and I am really interested in your research, you know, can we meet or something? So I did this with a couple of folks. My thesis advisor ended up being John Terilla,12John Terilla — mathematician at Queens College and the CUNY Graduate Center, Bradley's co-author on the textbook Topology: A Categorical Approach and on papers about the mathematics of language. who is a great mathematician. He has done work in quantum computing13Quantum computing uses qubits, quantum analogues of bits that can be in superpositions of states, and in theory gives enormous speedups for some problems, such as factoring numbers. back in the day, but also in deformation theory14Deformation theory studies how a mathematical object (an algebra, a manifold) can be wiggled slightly by varying a parameter, and what survives. and algebraic topology.15Algebraic topology assigns algebraic objects, such as groups, to shapes and spaces in order to tell them apart: a doughnut and a sphere get different groups, so one can't be continuously deformed into the other. And then in fact it was through him that I got introduced to machine learning and even category theory. So I was very fortunate to go to a university and find a really, really great advisor.

There was a very broad set of different fields that like touch together. And maybe it's no coincidence that category theory sits there on the top, if you're saying, hey, we've got like this quantum computing and also topology and data science, trying to have some notion of unifying those. At least as a reader from afar, it seems like this is an interest of yours, that you'll take these different things from different fields and try to understand what's a way of viewing them that kind of brings them all together. Was that an instinct that, I don't know, you kind of already had, or was it something that this particular advisor seemed to bring out more and highlight?

Yeah. So maybe a little bit of both. I think I have always, well, okay, from the time that I started liking math and forward, I've always really enjoyed the sort of 30,000-foot perspective versus the, you know, fine-grain perspective. So I really enjoy, you know, taking like a bird's-eye view of the landscape and seeing where things that felt unrelated turn out to actually have some commonality, you know, or be related in some way. This happens a lot in mathematics. You know, two mathematicians maybe will come up with two different constructions, and then later you realize, oh my goodness, you're doing the same thing.

05How category theory went from worst to favorite

Her first encounter with category theory put Bradley off, and her second, with Terilla, revealed it as a bridge between areas of math.

You just use different tools and different words to describe it, but it's the same. I think that's fascinating. Now, so I've always really liked this. And I think when I was an undergrad, I really enjoyed the more abstract classes, like I loved group theory16Group theory studies symmetry: a group is a set with an operation (say, the rotations of a square and their composition) obeying a few simple axioms. when I first learned about it. I struggled more in real analysis.17Real analysis — the rigorous foundation of calculus: limits, continuity and integration through epsilon-delta arguments, notorious among students for painstaking estimates. So I really like the more abstract, like, I don't know, structure type... I don't know, I've had this sort of love of the abstract for a while. Now, I had never heard of category theory before, like I didn't know that was a thing until I got to graduate school.

The first time...

Okay, confession. The first time I was in a class and I was formally introduced to category theory, I thought it was the worst. So it was like, oh, I was like, see, this is why nobody likes math. Like this is so horrible. Why are we even doing this?

Horrible in the sense of it being abstract nonsense,18Abstract nonsense — mathematicians' half-joking name for category theory, often used for proofs that follow from general categorical reasoning without computation. that it was confusing, like garbage?

What is this? A category is a collection of objects together with morphisms,19Morphism — an "arrow" from one object to another in a category; in concrete settings, a function, a group homomorphism or a continuous map. In the diagram, f and g connect A, B and C. The arrow from A directly to C is their composite, g ∘ f.A category in miniature: objects A, B, C, morphisms f and g, their composite g ∘ f and an identity morphism 1 on each object and a functor can be contravariant, covariant.20Functor — a map between categories sending objects to objects and arrows to arrows. A covariant functor keeps the direction of arrows, a contravariant one reverses it. Like, okay, whatever. This just made no sense to me. But there was no motivation, right? It was just like blah, blah, blah, wah, wah, wah, here's a thing, move on. I was like, this is why people don't like math. I was in grad school at the time having these thoughts. So I, you know, had my mental checklist of things I want to do in life, and I was like, category theory, you're not on my list anymore, because that was really boring.

Okay, however, that was, what, my first year in graduate school. I think maybe the beginning of my third year of grad school is when I met John Terilla and we started working together. Now, John, I think, is a great mathematician, and he has great perspective and great insight, and he thinks categorically. So, category theoretically. So he has that perspective and that mindset, and that sort of permeates his thinking. So when I came on board, he recommended to me, hey, let's start doing an independent study together and let's learn category theory. I love this inclusive, you know, let's do it together. Let's learn category theory. Why?

Because this is the modern language that mathematicians use today. So to help prepare you to be equipped to face the mathematical world of today, you know, you should really get used to this language. And I was a little bit afraid, because I was like, well, I've seen category theory and it's very boring. But however, the way that John describes ideas and talks about mathematics reminded me very much of my original calc three professor. So it was not just like this dry, you know, check your brain at the door, just open your mouth and I'll shove stuff down. But it was rather, look at the mathematical landscape.

Look how these things are connected. You know, you have two worlds, like, you know, algebra, group theory, and topology,21Topology studies properties of shapes that survive continuous deformation without tearing or gluing: to a topologist, a coffee mug and a doughnut are the same. and there's a bridge between them. And like the most exciting place to be is on this bridge, where you can transport ideas one to the other. And oh, did you know that that language, that bridge itself is built from mathematics, and that mathematics has a name, that's category theory. So when it was explained to me that way, I was like, oh my goodness, what? So, yeah.

06Category theory as Mad Libs

Bradley likens category theory to Mad Libs: a general template that different fields of math fill in with their own words.

Sorry, I didn't mean to interrupt the excitement there. Just for a listener who might not be aware, can you give a description of what category theory is, or what it means to you? And especially maybe in the ways that it came through with a positive aftertaste, as opposed to this heavily negative one from the first introduction.

Yeah, okay. Thank you. I'm glad you asked. So yes, let's rewind a little bit. Okay, folks will describe category theory in different ways. I'm going to try to give an analogy that I like to use.

So I like to think of category theory as like the Mad Libs of mathematics.22Mad Libs — an American word game (in booklets since 1958): a story has blanks, players supply words of a required part of speech without seeing the text, and the result is nonsense read aloud. So Mad Libs, maybe for the benefit of folks listening who may not know, a Mad Lib is like a story where some of the words are missing and you get to fill in the word. So a Mad Lib is like, you know, I went to the blank to buy yada yada, and the blank is like, insert a noun, to buy, and then insert a noun. And you just like randomly pick a noun, and then you read the story and it's very funny, ha ha, all that stuff. Okay. So I think category theory is a little bit like that for math.

Maybe you have this general template, and depending on what words that you fill into that template, you specialize to, you know, a specific construction or a specific thing in mathematics. Maybe it's something that you do in differential geometry,23Differential geometry studies smooth curves, surfaces and their higher-dimensional generalizations with the tools of calculus; general relativity is built on it. but if you flip the words around, like, oh, we also do something similar in topology, and then you flip the words around, you're like, oh, we also do something similar in group theory. So that's interesting, like, oh, why do mathematicians kind of reuse the same ideas and the same tools, but using different language in different fields? So you might say, well, what is that tool? Like, what's the essence of it? Let me not worry about the details right now.

But maybe I can just kind of coarse-grain things to see what is the fundamental underlying structure, skeleton, Mad Lib type template that's going on. And category theory provides a language to help you do that. And I think that's nice, because you can then use that sort of Mad Lib-y type language to help identify when two things are really the same. And then maybe that can be easier for mathematicians to have conversations, because it's like, oh, you're doing that thing and I am too, and this is great. Or if you have this vehicle to sort of translate one area of math into another, maybe, like I alluded to earlier, you can maybe transport your ideas across this bridge. You know, maybe a problem is very difficult to solve, you know, in the like world of topology, so you can ship it over to the world of group theory and algebra and use those tools, and it's easier to solve there. So category theory kind of organizes this phenomenon that we see, and it provides a language where everything sort of fits nicely in like a little box or something.

07Is category theory useful?

Bradley knows of no big problem that only category theory could solve, but in her own research it answers questions better than other tools.

ExplainerCategory theory: a language of bridges

A category is a collection of objects and morphisms (arrows) between them. Arrows compose: from A → B and B → C you get A → C, and every object has a "do nothing" identity arrow. That's all that's required, so almost everything is a category: sets and functions, groups and homomorphisms, topological spaces and continuous maps, vector spaces and linear maps.

A functor maps one category to another, sending objects to objects and arrows to arrows while preserving composition. This is Bradley's "bridge": the fundamental group functor, for instance, turns topological spaces into groups, so questions about shapes can be attacked with algebra.

An isomorphism is an arrow with an inverse. Category theory looks at objects only "from the outside," through their arrows, so isomorphic objects are indistinguishable to it. That's how it notices when two mathematicians are "doing the same thing."

Maybe you can help me a little bit, I think, because my own relationship with category theory was one of, you know, like when you're learning math as an undergrad, you learn something like group theory, like you're describing, you've got this certain language, and you see something similar happening elsewhere, where you're defining maps between special kinds of sets, and then what's a notion of structure-preserving maps there. And they're given like some name here. A lot of them we call them isomorphisms,24Isomorphism — a one-to-one correspondence that preserves structure in both directions; isomorphic objects are built the same way even if written differently. for some reason. Off in other fields they might be given a slightly different name, like linear map or something to that effect. And, you know, category theory felt like refactoring your code25Refactoring — reworking code without changing its behavior to make it clearer, for instance pulling a repeated chunk out into one shared function. in a way that was just satisfying, saying, oh, okay, we're just going to give the same language to all these things and have something that's the layer of abstraction on top of all these abstract things.

But for the longest time, and if I'm honest, I think this even applies to me now, it felt like a nice organizational scheme, but didn't feel especially useful. It was satisfying, and there's this aesthetic to it in saying, oh wow, okay, it can kind of use the same language across these things. But I struggle to think of a time when you're actually using the statements of category theory to solve a problem. And I know that it must. And maybe the mere fact of organizing someone's thoughts is enough. And, you know, the way one friend described it to me, he said, well, you know, they'll say of category theory that it makes the trivial things trivially trivial.26The line is usually credited to Peter Freyd, one of the founders of category theory and author of Abelian Categories (1964): "Perhaps the purpose of categorical algebra is to show that which is trivial is trivially trivial." No one seems to have pinned down where he said or wrote it; even research papers quote it as "allegedly" Freyd (arXiv:2503.22699).

So you'll have these various proofs that, it's like you're pretty much just doing the same thing that you were for that proof over in topology, but now you're in group theory. And instead of having to just rewrite all of that stuff, you can just basically point to a particular theorem in category theory. Is there an instance in your mind when you feel it's especially useful, or it's helped you solve a problem that otherwise would have been either much messier to solve or maybe even impossible to solve without the right language? Or is it more a matter that it's got this aesthetic organization that feels great, and that feeling frees up your mind to think of other things? It like decreases cognitive load, such that you're able to solve other problems in a more specific setting.

Yeah, so maybe more of the latter. I mean, I can't... yeah, maybe, okay, so maybe category theory has to work on its PR a little. Yes, I mean, I have heard this question before, like, what, you know, big problem in math, you know, could we only solve by category theory that we couldn't, you know, using the tools of the actual field, you know, the specific field that we were in. I don't have an example that comes to mind for that. For me, I really like how category theory clarifies things. I mean, I just think that that's delightful in itself. With that said, I can think of non-math... so let me not say non-math. I can think of not traditional mathy type problems that have come in my own research where category theory helped answer a question that, I don't know, another branch of math would have answered well.

08Language as algebra and statistics

Language models learn from raw text, so the structure must be in the text itself, and Bradley and her collaborators describe it with enriched categories.

Does an example come to mind?

Yeah, an example comes to mind. It's part of my research, you know, what folks can find on Math3ma, on the blog, or on the arXiv.27Bradley posts her papers on language and category theory to arXiv, the open preprint archive for math, physics, and computer science, where work appears before journal publication. It's related to work I did as an undergrad. But okay, so the example that comes to mind relates to some of the work that's being done in artificial intelligence these days. In particular in natural language processing,28Natural language processing (NLP) — the field of computer science and AI that teaches computers to understand and generate human language. you know, we have these really great language models29Language model — a program that estimates the probability of the next word (token) given the previous ones and generates text that way. In 2021 the best known was OpenAI's GPT-3. nowadays that can generate text in a way that feels very human-like. And the thing that is fascinating to me, and this is work that I've done with John Terilla, who is my graduate advisor, and Yiannis Vlassopoulos,30Yiannis Vlassopoulos — Greek mathematician, co-author with Bradley and Terilla of "An enriched category theory of language: from syntax to semantics" (2021). a mathematician in Greece.

So a fascinating question that we have, an idea that we thought about, is if you ask why these large language models work so well. You know, like they can write a blog post and it's online, and at the end you're like, whoa, that was really interesting. And then, surprise, the computer wrote it.31By 2021 this had already happened. In the summer of 2020, Berkeley student Liam Porr started a productivity blog under the pen name adolos with posts written by GPT-3, and his very first post hit #1 on Hacker News. Only three or four commenters grew suspicious, and other readers downvoted them. MIT Technology Review Like a human did not write this, right? Or you can ask it to summarize, you know, a news article, and it'll give you a nice three-sentence summary, and it's like coherent text, and it's really cool. So then the question is, oh, how did the computer learn this? Like how did it know that these words go together in English, you know, and that it's grammatically correct and it's semantically meaningful? Like what are we doing to get it to this state? Well, for some of these large language models, the only input really is just like text.

Just like massive, massive corpuses of text.

Yeah, massive amounts of text, and like with no extra structure. Like you don't have to say, okay, this is a noun and this is an adjective and adjectives go before... like it just learns that. You just say, like, read Reddit,32Bradley’s choice of Reddit is apt: its text has been widely used to train language models. OpenAI’s WebText corpus for GPT-2, for example, was built from outbound links that earned at least three upvotes on Reddit. OpenAI you know, or whatever the data set is, and it learns this. So that's an extremely interesting math problem. Okay, because in the billions of parameters33Parameters are the numbers (weights) a network tunes during training; in Bradley’s framing, the learned structure of language is hidden in them. In 2021 the largest language models had hundreds of billions: GPT-3 had 175 billion. of this fancy neural network, okay, some structure is being learned. There's like some syntactic structure that's being learned, because it's stringing together coherent pieces of text, and it's like semantically meaningful.

So then the question is like, what is that math?

You know, what did you start with? You just started with what goes with what, you know, like, you know, red fire truck sped down the street quickly. Okay. So these things go together, but like also how frequently these things go together. Okay. So that's interesting. You have like some algebraic structure. If I think of algebra in the basic sense of like taking two things, schmushing them together and getting something new, like x times y is xy. Okay. But I can also have algebraic structure in language. Like I can take red, multiply it by fire truck, i.e. concatenate,34Concatenation — appending one string to another. With it, strings form a monoid: the "multiplication" is associative and the empty string acts as the unit. and I get red fire truck. So language has algebraic structure.

But there's also like statistical structure, right? You let this large language model read a whole bunch of things in English, so it's like seeing how many times red pairs with fire truck versus, you know, to borrow from Noam Chomsky,35Noam Chomsky — American linguist at MIT, founder of generative grammar. He holds that grammaticality can't be reduced to usage statistics, a view disputed by proponents of statistical and neural models of language. something like red idea, or green ideas. He says, like, that's not a thing. Why is that not a thing? Well, if I say I had a green idea or red idea, that's like, oh, that's weird. That's not something we say often, right? So even the frequencies of these concatenations contribute to the meanings of these words. But that's all that you have. Okay, you have some algebraic structure and you have some statistical structure, and that's all that's in these corpora of text which you're feeding to your large language models. And it's an interesting math question to say, like, what is that mathematical structure?

And it turns out that category theory provides a very nice answer to it. So category theory has ready-made tools to kind of say, given a corpora of text, you know, what's like a, you know, a good representation or candidate for the meaning of a word,36The key ready-made tool is the Yoneda lemma: an object in a category is completely determined by the arrows out of it to every other object. In Bradley, Terilla, and Vlassopoulos’s paper, that is how a word gets its meaning — from the set of all the texts it extends into. Bradley has written about the lemma on her blog. Math3ma maybe. And there are tools in category theory where you can kind of, you know, propose an answer. But you also have these statistics lying around. So it turns out there's like a category version two, which is called enriched category theory.

A category for the statistical aspect of it.

Yeah, that's right, that's right. So, I mean, enriched category theory doesn't just have to do with statistics, but it's kind of like, if I have two... okay, imagine two vector spaces,37Vector space — a set of objects (vectors) that can be added and multiplied by numbers. A linear map between such spaces preserves both operations; in finite dimensions it's a matrix. right? Say finite-dimensional, so we don't have to think too hard. Imagine the set of all linear transformations from one to the other. Well, that set is more than a set. It itself is a vector space, because if I have two linear maps, I can add them together, and the result is a linear map. Or if I have a linear map, I can scale, you know, scalar multiply, you can multiply... yep, I can scale it, and that is a linear map. Okay, so I can like add things and multiply them by numbers.

ExplainerEnriched categories and language

In an ordinary category, the arrows between two objects form a plain set, a "bag of marbles." In an enriched category, that set carries structure of its own: linear maps between two vector spaces, for example, can be added and scaled, so they form a vector space themselves.

Bradley, Terilla and Vlassopoulos build a category out of language in which objects are phrases, with an arrow from "red" to "red fire truck" whenever the first is the start of the second. In the plain version the arrow is either there or not. In the enriched version the arrow carries a number between 0 and 1: the conditional probability that "red" continues as "red fire truck." Such probabilities can be read off a text corpus, which is exactly what language models are trained on.

In this picture a word's meaning is the whole network of its continuations and contexts, a mathematical form of linguist J. R. Firth's old dictum: "You shall know a word by the company it keeps."

Well, that's like a vector space structure. So when you have like a set of objects, as they're called, vector spaces... sorry, if you have a pair of vector spaces and you look at the set of morphisms or maps between them, if that thing itself is more than a set, like in this case it's a vector space itself, this kind of leads you into the world of enriched category theory. What about when the set of ways to get from one thing to another, the set of relationships between one thing and another, has more structure than just the set? It's not just a bag of marbles, but it itself has rich structure. Then like you can do category theory on top of the category theory in this way. But in this case, but back to language, like imagine instead of two vector spaces, I have two words, like red, and two phrases, say, red to red fire truck. Okay, and I'm gonna have an arrow between them because they're related: red sits inside the phrase red fire truck. So that's like a yes or no.

So in the analogy, red is kind of like one of the vector spaces, and then red fire truck is like the other vector space, or is fire truck like the other vector space, and then, let's say, red fire truck. Okay. And then, so the maps from red, the fact that it's a member of the other one gives you... and then, I guess this is going somewhere where the notion of mapping between the maps, or having some structure to what all those maps are, and like the very fact that red maps into all these like phrases, like red fire truck or red apple tree, is like the structure you want to study.

Yes, yes. So here I'm thinking my arrow that goes from red to red fire truck is like, there's an arrow. It's a set with one element, the one element being the one arrow that indicates red sits inside of red fire truck, right? But maybe there's like a statistical story to that, because there's a certain conditional probability38Conditional probability P(B | A) — the probability of B given that A happened. Language models predict exactly this: the probability of the next word given the previous ones. that if I tell you, oh, Grant, I saw a red, right? Like with some probability, the next word is going to be fire truck.

With a different probability, it's going to be idea, with a different probability it's going to be apple, blah, blah, blah, blah, blah. Okay. So there's like a probability distribution on English given, you know, that I just said red or something. So I can imagine enriching my arrow with that conditional probability. And this is like what you have with the training data for these large language models. You just know what goes with what, red goes with fire truck, da-da-da-da, but also like how often, just based on, you know, for example, like frequency counts or something, you can maybe learn these kind of things.

So that's an interesting, I mean, that's like a non-traditional math problem. Like, you know, I didn't ask like something involving language, Langlands program,39Langlands program — a web of conjectures formulated by Robert Langlands in 1967 linking number theory to harmonic analysis and geometry; one of the most sweeping programs in modern math. or like Galois theory40Galois theory links the roots of polynomials to symmetry groups; it shows that the general quintic equation can't be solved by radicals. Named after Évariste Galois (1811–1832). or something, but I'm like, hey, look at what's happening in the world right now. And then that motivated a math question, which we think has a really nice answer in the language of category theory.

09Where does a model learn grammar?

Logical connectives can already be located in the categorical picture, but grammar, such as asking for seven nouns, can't yet.

And so in this construct that's trying to give an answer to the question of what's going on in the language models, do you feel like it would answer where in that model it learns grammar from the statistics? Because like, for example, I mean, one of the, you know, you mentioned Chomsky's green ideas thing, right? I think, what was the full phrase? It was like, colorless green ideas sleep furiously.41"Colorless green ideas sleep furiously" — a sentence from Chomsky's Syntactic Structures (1957), grammatically flawless but meaningless. Chomsky used it to argue that grammaticality reduces neither to meaning nor to how often words occur together. Was this sentence meant to illustrate something that's entirely grammatical? You know, we all recognize it as a coherent sentence, but they would never show up.

Or like statistically so unlikely for any given pair of words, like colorless green. That's not gonna happen.42This is Chomsky’s own argument: none of the adjacent word pairs occur in real text, so statistics supposedly can’t tell the sentence from gibberish. It has been tested. Fernando Pereira trained a simple statistical model with word classes on newspaper text, and it rated "Colorless green ideas sleep furiously" about 200,000 times more probable than the same words in reverse. Peter Norvig cited the result in his 2011 rebuttal to Chomsky. norvig.com Green ideas sleep furiously. When you're studying these models and you see some kind of nice structure that explains it, do you feel like there's a point that you can, or a part that you can point to that says, here's where it might learn grammar that would never show up in the statistics? Because this is what would let it generate a sentence that it never possibly could have seen in the world, or seen anything remotely like it, but nevertheless know that it's grammatical, in the same way that human brains seem to know that these unlikely things are grammatical.

Right, yeah. That's work in progress. So, I mean, there are steps, like, you know, maybe before even getting something specific like grammar, nouns, verbs, adjectives, you might just ask, like, oh, let's take a step back, and like, where's the syntax being learned?43Machine learning researchers were asking the same thing. In 2019 Stanford’s John Hewitt and Christopher Manning showed that a single linear transformation of BERT’s internal vectors recovers a sentence’s syntactic parse tree, even though the model was never trained on parse trees. ACL Anthology And there are ideas for that. We've done work in that direction. You know, you can ask maybe sort of logical type questions, like, you know, if I have two words, and I have, and, you know, like red and blue, blah, blah, blah, like where's that in the math? Where's that in the category theory? And that turns out, I think we have some good ideas about that, maybe leading one to topos theory44Topos — a category that behaves like a "universe of sets" with its own internal logic. Topos theory, growing out of the work of Grothendieck and Lawvere, connects geometry, logic and category theory. type related concepts, which is like one place where mathematicians like to do logic, maybe with a more topological, category theoretical flavor.

But then, yeah, I don't see a way yet to have something like, oh, if we understand the math and then, you know, model this some way, you know, in the computer, and then say, okay, given, you know, this very nice mathematical structure, give me seven examples of nouns. I don't see that yet, but that is a tantalizing question, and certainly one that we have thought about and put it on future work.

And I guess also, just sort of stepping back, is this the kind of research where you look at the particular kind of models that generate it, you know, the specifics of the neural network that's doing all of this? Or is it more a matter of, in principle, how could anything, independent of the implementation details, accomplish what's being accomplished here?

Yeah, that's right. So it's independent of implementation details. So we're just saying, we're just looking at the input corpus of text, what's the math there. And then, like, sure, you want to learn it with your favorite neural network, fine, you do that. You want to use something maybe that's not a neural network, fine, you do that. Maybe, you know, one could be interested to explore also. But just as like a nice juicy math problem, you know, it's just, what is the structure of the input? Something is being learned. Okay, maybe the details one could think about later, but the fact that it's being learned, there's structure there. What is that? Like, what is that math?

10A thesis inside a startup, then X

Bradley wrote her dissertation at her advisor's startup and happily straddled academia and industry instead of choosing one.

Okay, so then backing up in your particular story, you're there, third year of grad school, starting to engage with all of this. At what point do you choose what your thesis is going to be about, or what, like, novel things you would like to find during your time as a PhD candidate?

Yeah, so maybe my experience was a little bit different than, I don't know, like the... I don't even know if there's a typical thing, but, you know, some students might say, oh, I personally really like thinking about this, or I have been thinking about this for a while and I want to continue doing that. And, you know, dear professor, can I work on this problem for my thesis under your guidance or something? And maybe you have a flexible mathematician that'll say, yeah, no problem, like, you do your thing and I'll be here if you want help. Other folks might say, you know, please give me a problem, give me something to work on. You know, I just, I don't know what to do, but I want to do something. Please, can you guide me? I was a little bit more in that second camp.

So, you know, I told you I was like, oh, I like math and physics, la-di-da-di-da, but I don't really know what exactly. So when I started working with John, for my thesis, I actually thought that I would do something in the space of topology. I really love algebraic topology. I loved that class in graduate school. And I, you know, I like pictures, I like math that has pictures attached to it. And so I thought I'd do something along there. And even my oral exam...

So in graduate school, you take these preliminary exams, these qualifying exams,45Qualifying exams (quals) — written exams on core courses (algebra, analysis, topology) after the first year or two of a US PhD; passing them is required to move on to the dissertation. which are like written exams that you must pass to progress in the program. And then you have an oral exam, which is where you learn something for like a year, you read a paper or something, and then you present it to a committee and they ask you questions. Even my oral exam topic was closely related to algebraic topology and sort of pure category theory. Had nothing to do with anything we just spent five minutes talking about at all, whatsoever. Now, at the end of that, it was kind of like, okay, Tai, what are you gonna do for your dissertation? Now, at that time, it turns out that my advisor opened a research startup company in New York, which used, or the idea was to basically use tools from the space of quantum many-body physics46Quantum many-body physics studies systems of huge numbers of interacting particles, like electrons in a solid. The number of parameters describing their state grows exponentially with the number of particles, so physicists developed ways to compress it, such as tensor networks. to build sort of new kinds of language models.

That seems from out of left field.

Totally, I know. And at that time, John said, hey, there are some really interesting math questions behind the scenes here. And believe it or not, they are intimately related to all of the stuff we just talked about with red fire trucks and all that. So he said, why don't you work with us here at this startup, Tunnel is the name,47Tunnel — the New York research startup where Bradley did her dissertation; as she describes it, her advisor John Terilla started it to build language models on tools from quantum physics. and do, you know, a math problem, do your dissertation on, you know, machine learning, language, physics.

Interesting. So as part of the startup itself, and like already into industry, that's how you finished the PhD.

That's exactly right.

Very interesting.

And at that point, did you have much of a sense of whether in the long run you wanted to be more in industry or more in academia, or you kind of were happy to take you wherever the winds blew?

Yeah. So at the end of that, I kind of felt the same way I did when I finished undergrad, like, wow, that was just the beginning.

I want more, right?

So I think I enjoyed straddling the line so much. I loved the idea of working in pure math, you know, I get the freedom to think, you know, learn category theory, learn, you know, tools that they're using in quantum mechanics. I mean, this is so exciting. But then work closely with those who are working on the engineering side of things or the applied side of things. So all of that pure math exploration was kind of always motivated by a very tangible, concrete, non-traditional applied problem. And I like that a lot. And that was like a vehicle also for me to kind of revisit all of the physics-y type interests I had before. So this was perfect for me. I loved, like, every day grad school was amazing.

Now at the end of that, I realized I want more of that. I love that. You know, there's often this like dichotomy, right? Like either you stay in academia or you leave it and you go into industry, and like you have to choose one. Well, I didn't really choose one in graduate school. I was kind of like happily on the fence and thriving, you know, in graduate school. And then towards the end of that, I realized I love that so much. I just want to keep on doing more of that. Like, what an exciting place to be.

And so did you continue at Tunnel at that point?

Oh no. So then I graduated, and then I went on to do a postdoc48Postdoc — a temporary research position of a few years after the PhD, the usual step before a permanent job in research. at X, the Moonshot Factory,49X, the Moonshot Factory — Alphabet's lab for "moonshot" projects, founded in 2010 as Google X; its spinouts include Waymo's self-driving cars and Wing's delivery drones. which was really nice. So some folks there were working on some related things that I was doing in graduate school. So it was a really good fit there. And so, you know, more of the same. I've been very fortunate to kind of pursue these ideas.

I guess I don't really have much of a sense of how it works if one does their PhD in an industrial research lab, where, like, in normal industry land, if someone's doing really well, and they, you know, maybe they're, let's say, a graduate student intern at some company, that company wants to hold on to them and kind of keep them there. Which is kind of the opposite of a lot of academia, where as soon as someone's finished their PhD in some institution, it's more desired that they sort of spread the seed and get a different sense of what's out there and do their postdoc somewhere else.50The norm is a guard against "academic inbreeding": departments are wary of hiring their own graduates and want people trained in other schools of thought, so new PhDs are nudged to postdoc elsewhere. Wikipedia Was there any pressure from Tunnel to kind of hold on to you and keep you there, or was it a little bit more the usual academic vibe of, make sure that you get a diversity of experiences, different research groups and all of that? We've loved having you, but like, okay, okay, letting go of the investment we put into you.

Right, right, yeah. So John is a very, like, great advisor, and I think saw, you know, beyond just Tunnel's interests, but as a fantastic thesis advisor, you know, kind of in charge of a student, he was very much like, I want you to go out there and, like, flourish elsewhere. You know, it'd be great to stay here, but also for your own, you know, growth as a mathematician, it would be good. His encouragement to me was, it would be good for you to go, you know, and have new experiences, meet new people and do new things. And I just love that, you know, as a student.

Yeah, amazing. Yeah. And have you found that at X?

Oh yes, yeah, yeah. So I'm currently on a team called Sandbox at Alphabet, which is an independent unit at Alphabet, which is the parent company of Google. On my team there are physicists and engineers that are working sort of at the intersection of, or I should say scientists, lots of scientists and engineers working at the intersection of physics and AI. And on that team, I'm there, but what's amazing is that I actually have the freedom to pursue my own mathematical interests and my own academic research program. So in that sense it's very much like a traditional math postdoc. You know, you go to a university and you come in with a research statement, and you're like, you know, here's the things I did in graduate school and I have so many other things to explore. Bam, bam, bam, here's how I'm going to do it. So what's amazing is that I have the freedom to do that there.

But while surrounded by exceptionally amazing people, you know, also from academia, some physicists, but then also great engineers, all working on, you know, building cool technologies. And so I think that that's a really cool place to be, because I still have all of my collaborators, you know, from the math world. And, you know, we meet on Zoom or however one does these days. But then, you know, I log off my math, you know, calls, and then I, you know, join the team meeting, and then there's all of these awesome people outside of the world of mathematics. And I think that that's really vibrant and exciting.

11Why quantum physics helps with language models

The tools of quantum physics help with language models, Bradley explains, because they are good linear algebra for huge amounts of data.

Yeah. I have to be honest, I feel like I'm one of those people where, when I hear, especially from companies, descriptions of blending AI with blank, I often get really skeptical. You know, say, we're working on the frontiers of quantum computation and artificial intelligence.51The irony: six months later, Bradley’s own team went to market with exactly this pitch. In March 2022 Sandbox spun out of Alphabet as SandboxAQ — "AQ" for AI plus quantum — with Eric Schmidt as chairman. TechCrunch And usually in the back of my mind I'm like, ah, that sounds like some real BS right there, just finding the right buzzwords. And from the outside looking in, if I hear, you know, these descriptions, we're taking tools from quantum physics and we're applying them to language models, I'd be like, ah, are those related? But then I looked at your thesis, and that was actually one of the most clarifying moments, where I said, oh, oh, I get it.

This is actually a highly approachable way to see why it's the math that underlies some of this quantum physics that helps you do some useful things there. And I actually do think the math of quantum physics is like really elegant, in a way that feels strange to confine just to the realm of physics. If you were to give, I don't know, just a little bit of a defense to a skeptic who, outside looking in, hears these descriptions of, we're going to take this pile of scientists and we're gonna like throw them at AI, because both of those sound like cool things, and you needed to say, like, no, here's why it's actually useful, here's why this is a coherent way to approach the problem. And I know you have an answer, because your thesis at the very least contains one. What would you say to them?

Well, so I'm going to imagine that this question from this hypothetical person is addressed to, let's say, the math underlying the physics that appears in my work, because let me not speak for sort of the totality of all ways that all physics is applied, pretending to be applied to AI. So how would I describe this? So, okay, in AI and machine learning, you're working with lots and lots of data, right? So you're kind of working in this large-dimensional vector space, maybe. Now in quantum many-body physics, okay, let's not even use the word quantum. In physics, when you've got a lot of like little things going on, you've got a lot of little particles, and maybe they're each doing their own thing, and you're like, whoa, what's the conglomeration doing?

Okay, this is like a lot of stuff, and it also has a lot of data. Now, linear algebra turns out to be a really nice set of tools to kind of organize what's going on here. So in that sense, there are some tools that have been used in this branch of physics. And it's kind of like, well, why can't we also repurpose them over here in AI? Like, I don't need to know anything about electrons to know what an operator, a linear operator is. Maybe it's like, is it Hermitian?52Hermitian operator — the complex analogue of a symmetric matrix: it equals its own conjugate transpose. Its eigenvalues are real, which is why quantum mechanics describes observable quantities with Hermitian operators. I don't know, it's a density operator,53Density operator (matrix) — a description of a quantum state, including a mixed state or the state of part of a larger system. It's a positive semidefinite Hermitian matrix with trace 1, and its diagonal is a probability distribution. whatever. It's a matrix that satisfies some properties. And I can learn what those properties are. I can learn what that definition is, and I can like prove things with it. And I can do that without any knowledge of like scary physics-y type interpretations. Those are helpful too, and physicists know a lot about that.

A tensor network diagram: tensors are circles, indices are lines; the shared line j means contraction, here ordinary matrix multiplication
A tensor network diagram: tensors are circles, indices are lines; the shared line j means contraction, here ordinary matrix multiplication

And if I need to know something about it, I can ask them. So it turns out that some of those tools are really useful actually in dealing with large-dimensional data. And, you know, there's a great physicist at the Flatiron Institute,54Flatiron Institute — the Simons Foundation's research institute in New York (since 2016), with centers for computational astrophysics, biology, mathematics, neuroscience and quantum physics. Miles Stoudenmire,55Miles Stoudenmire — physicist at the Flatiron Institute's Center for Computational Quantum Physics, an expert on tensor networks, co-creator of the ITensor library and co-author with Bradley and Terilla of "Modeling Sequences with Quantum States" (2020). he's one of my collaborators, and I like how he puts it, like, you know, maybe some of these mathematical tools that the physicists are using are actually just the right way to do linear algebra in high dimensions.56Stoudenmire means tensor networks, which physicists invented to compress the enormous state vector of a many-particle system into a chain of small tensors. In 2016 he and David Schwab showed such a chain could be trained to classify handwritten digits, the paper that launched tensor networks in machine learning. arXiv:1605.05775

Yeah. Like a beautiful way to phrase it, actually. Yeah, I love it.

I love it. And he's a physicist, right? So I'm like, okay, if he can say it, then I can repeat it.

Like it's totally fine, right?

Or, you know, there are some things in physics which, like, maybe the physicists happened to stumble upon first historically. So just historically it's always like, oh, those are the tools that the physicists use. I'm thinking now about probabilities, right? Like, what's a probability distribution? Well, it's like a bunch of non-negative numbers that add up to one. Okay, but in physics, if you want to ask something about probability, you have these kind of funny things called probability amplitudes,57Probability amplitude — the complex number quantum mechanics assigns to each outcome; the outcome's probability is the squared modulus of its amplitude (the Born rule). Unlike probabilities, amplitudes can cancel each other, which is where interference comes from. right? So, like, how does that go again? Oh yeah, you can have complex numbers now, or maybe even negative numbers, but how do we get probabilities from them?

ExplainerAmplitudes instead of probabilities

A classical probability distribution is a list of non-negative numbers summing to 1. In quantum mechanics a state is given by amplitudes, complex numbers that can also be negative; the probability of an outcome is the squared modulus of its amplitude, and these squares sum to 1.

The payoff is that a list of amplitudes is a unit vector, so the whole toolkit of linear algebra applies to the distribution: projections, eigenvectors, tensor products. Bradley's dissertation encodes distributions on word sequences exactly this way, as a quantum state, and the model learns from frequencies in text.

The idea from Miles Stoudenmire that she quotes: maybe none of this is specifically "quantum" at all, just the right way to handle probabilities and linear algebra in huge dimensions.

Well, we say you take like the modulus squared, and then if those numbers add up to one, you get a probability distribution that way. Now it turns out that that way of thinking about probability connects really well with linear algebra, and you can kind of repurpose those ideas in the context of machine learning and language, and that's actually what I wrote about in my thesis. But I like this perspective that Miles and others have, which is, maybe that's the right way to do probability theory. Like, why should the physicists, you know, have ownership of that? Who's going to stop mathematicians from thinking about probability differently?58Mathematicians already do. In free probability, started by Dan Voiculescu in the 1980s, random variables are operators that, as in quantum mechanics, need not commute; today it is a workhorse of random matrix theory. Wikipedia And if we do, like, who knows what we can find? Like, who knows what new ideas might be out there.

And so I like that. So if I were to, you know, give, I don't know, an answer to this question of, like, why are we doing kind of this stuff that feels a little bit, I don't know, over the top, it's really just you're having access to more mathematical tools. And in my thesis I try to say something like, you don't have to be a physicist, don't worry about, like, the word quantum, blah-de-blah-de-blah, like, just forget that. We're just doing mathematics here, and there are new sets of tools, and like, let's see what we can do with those things. Forget about all that physics stuff for the purposes of our goals. Like, it's not really necessary that one comes in with all of that knowledge ahead. So I think that maybe, you know, it's a fun playground. There's new tools. Why not? Let's explore.

12A dissertation people can read

Bradley deliberately wrote her thesis for everyone and made a trailer for it, because an excitement party is no fun alone.

And I mean, just the way that you wrote the thesis, actually, you kind of alluded to it there, where it's meant to be much more inclusionary. It actually feels a lot different from most other theses that I've read out there, that have a sense more that they're like trying to hold up the writer themselves, and like, this is why I'm deserving of the academic accolades, and thus let me not, you know, bore the reader with details of exposition. That's not exactly the case, and that's not fair to many. But yours seemed like it was really this document that was meant to be, it could almost be a blog post, that was meant to be like put out there, that anyone without necessarily background in there could read.

Very substantive, right? Very substantive, but also strong motivating examples. Was that a very conscious thought while you were writing it, that you wanted it to stand out from other theses in that way? Is that just how you write naturally and you can't help yourself?

No, so that was very conscious. So I definitely did that on purpose. I put a lot of work into making that... I wanted it to be read by lots of people. I wanted it to be accessible to lots of people. I was totally aware that this is not how PhD theses are done, and I was also like, I don't care, because I want the world to know all of this cool stuff.

Absolutely. I really love that.

Yeah, yeah, yeah. You know, there's so much great math out there, but it's like hidden behind this dense fog of formality, you know, and jargon. And I think sometimes that sort of hides the ideas. And I had so much fun exploring the ideas I did during graduate school. I wanted other people to be excited with me. You know, people talk about pity parties, but there's also like excitement parties. And it's not fun to just be by yourself in an excitement party. I wanted lots of people to be with me.

And so I wrote this thesis hoping that I could lure people into these ideas. I don't know how well I accomplished that, but my goal was really, I wanted it to be, you know, able to be read by more than just the experts, you know, in my community, but I wanted lots of folks to have access to the ideas.

And how was it received, both by that committee and then by the broader public?

Bradley introduces her dissertation, At the Interface of Algebra and Statistics, in a 10-minute "trailer" hand-drawn on an iPad (2020)

Yeah, well, I think the committee was okay with it, because I graduated, so it can't have been so bad. Yeah, and I did get a lot of nice feedback from folks, even that I haven't met before, you know, emailing me, which has been really nice. I also made a video. I shouldn't be talking about videos to the master of...59Grant animates 3Blue1Brown videos in his own Python library, Manim, which he wrote for the channel and open-sourced; many other math explainers now use it. Bradley drew her video by hand. GitHub

It was a great video, the one about your thesis.

Yeah, I made like this 10-minute video clip, kind of like a trailer or a commercial video.

It was outstanding. I wish every PhD student did this, created a little 10-minute trailer of their thesis.

It was one of the most amazing things I'd seen. I'm like, yeah, this is what... I genuinely want more people to do this now. Because one of the things I like the best is that you said, like, ah, you can skip this section. If you really want to get the heart of it, go here. If you want to go more detailed... It was like this roadmap ahead of time, which a good paper will do in its introduction. And so to be fair, this is often where people will do that kind of preview. But something about, I don't know, the friendliness of the way that you were talking about it, and kind of the doodles that surrounded it, gave it a very different tone than most others out there.

Yeah, I, you know, I kind of envisioned, you know, I'm sure we've all had like those great teachers that say, here, read this book, you know, or read this paper. They're like, look, skip chapter three. Like, you don't need to know about that. And look, when you get to section 7.2, it's totally fine if you don't understand it, because we'll talk about it later in my office. So I just imagine, I really appreciate things like that, so that when I get to chapter three, I'm like, oh my goodness, what is this craziness? I wish I could skip it, but I'm going to feel bad if I don't, because I'm supposed to know everything.

But if someone tells you ahead of time, don't worry about it, it'll be fine. Like, you'll live. We'll get through it together. I like that. So I kind of envisioned that. I mean, I wanted to do that, right, for people reading my thesis, if they're gonna really... I don't know who reads PhD theses.

Like, do you do this in the morning when you have coffee?

I don't know, not normal people, but for the few people that I could, you know, convince to please read this work.

Great. Then I imagine it might be helpful if I also, like, sit alongside them and say, I know 130 pages kind of is a lot. Maybe it's not compared to 600-page theses, but it's like more than a blog post. And so let me just give you the big-picture perspective, so that there's like, hey, you may not know this, I'm gonna tell you now, maybe there's like a golden thread through my thesis, and I want you to be aware of that. So when you read it, you know that, oh, she's writing about this in this section because she really has this larger goal in mind. So glad she told me, because now I can kind of make sense of what feels confusing on this page.

I could have done that in writing, I guess, as a prologue or something, but there was so much writing already, maybe your eyes get tired, like, oh, I have to read five extra pages now. But there's something, as you know, friendly about a video. You just kind of sit back in your chair, you know, you hit play and let the speaker do the work, and I like that. I hadn't really made videos before. I love your videos, of course. I don't really know how to make like super technical fancy videos, so I just got out my iPad and hand-drew some stuff, and I was like, well, let's see how this goes.

I actually think the hand-drawn style is in many ways a lot better. It's a closer reflection of what actually doing math feels like, and then it feels like a little bit of a human connection there.

13Marginalizing without losing information

Bradley's thesis borrows from quantum physics a way to study part of a system without losing information about the whole.

I guess, right, if you wanted to summarize... I guess we kind of already have hit on some of the topics in there, but describe a little bit of what was in that thesis to a listener. I realize maybe this is redundant with the preview that you've already made, but how would you try to encapsulate some of the key ideas?

Yeah, so, right, how do I do this? Okay, so I think if I had like an elevator pitch type description... okay, so let me back up. The title of the thesis is At the Interface of Algebra and Statistics.60At the Interface of Algebra and Statistics — Bradley's dissertation (CUNY, 2020), arXiv:2004.05631. It applies tools from quantum physics to probability distributions on sequences, such as words in a text. So we talked about algebra and statistics in the context of language earlier. The interface, because that's an interesting place to be. We talked about that earlier, kind of bridges between two worlds. I like living there. But maybe one thing I could say is that this thesis was still in a quest to understand this structure in natural language. It was motivated by that, pre the category theory ideas that we talked about earlier. There's a much simpler question that one could ask, which is, if I have a large system of things, okay, like maybe, you know, a book, your favorite book, I don't know.

Let's go. Moby Dick. Sure. Moby Dick, why not.

Or whatever, right? Or maybe even something simpler, like, you know, a Calvin and Hobbes comic strip.61Calvin and Hobbes — Bill Watterson's newspaper comic strip (1985–1995) about a six-year-old boy and his stuffed tiger, who is alive in Calvin's eyes; full of philosophical conversations.

Oh, I love Calvin and Hobbes, yes. I could never like someone if they didn't like Calvin and Hobbes.

Exactly, I know, right? Okay, but you have like some systems of things, some system of things, and they're like interacting with each other. I don't know. Maybe these are words in English, and, you know, the meaning of the first word in your favorite book, you know, or a long joke, correlates to the last word, like the punchline of the joke or the final conclusion in your book. Like, even these things are spaced far apart, you know, they still have meaning. They're closely related.62This is the problem of long-range dependencies in text. In a Markov chain, which predicts a word from the few before it, correlations die off exponentially with distance. In 2016 Henry Lin and Max Tegmark measured that in real text the mutual information between words decays far more slowly, as a power law, like a physical system at a critical point. arXiv:1606.06737

Anyway, so you have like the system of interacting stuff, maybe there's some correlations, and you might want to know, hey, if I like zoom in to a little piece of it, like, maybe I have a sentence, maybe we're reading a Calvin and Hobbes comic, and Calvin, you know, says something to Hobbes about his red fire truck. Oh, there's my example again. Okay, I can't get away from it. Right. So I like zoom in into a little piece, like there's this long dialogue, but in it there's this one phrase, or maybe like, you know, one sentence in a longer dialogue. And I'd like to know, how does that small thing interact with its larger environment?

Okay. In math, we have this idea of marginalization. Like, if I have a probability distribution, you know, on two things, I can kind of close my eye to one half and, like, marginalize over it, and now I have probabilities on this smaller thing. So this is marginal probability.63Marginal distribution — obtained from a joint distribution by summing (integrating) over the variables you don't care about. From a table of adjective-noun pair frequencies, this gives each adjective's frequency on its own, but the information about which nouns it goes with is lost. The dots show the joint distribution. The histograms at the edges show each variable on its own.A joint distribution of two variables (the point cloud) and its marginal distributions along the edges: the marginals alone no longer show how the variables are related Classically, when you do this, you have lost information about this complementary subsystem. Okay, like, marginal probability doesn't know about the thing you kind of integrated out.

Turns out in quantum physics, in linear algebra, there's an analogous way to do that, that actually retains information about all of this stuff that you ignored. And it turns out that that information tells you a lot about this system that you're working with, and you can actually kind of build back up what you started with in a better way. I'm totally being vague and nobody understands what I'm talking about at this point.

I think anyone has to acknowledge that in a podcast medium, there is a struggle for describing any of these things very literally, because it's intrinsically visual and symbolic. And I guess maybe in this context, you know, one of the examples that you had in your thesis was, if you have like adjective-noun phrases, right? You've got not just your, like, your red fire truck, but also your green apple and things like that, that you can have a distribution for all these phrases, and you could say, just what's the likelihood of seeing a particular adjective, like red, and ask about, you know, distribution on those. Or you could ask about, what's the probability of seeing all the different nouns. And then somehow each time you limit your view there, you like forget everything about the adjectives when you're just looking at the nouns, you forget everything about the nouns when you're looking at the adjectives.

ExplainerMarginalizing without losing anything

Take a joint distribution of adjective-noun pairs. Classical marginalization sums over the nouns and gives each adjective's frequency, but afterwards you can no longer tell that "red" likes "fire truck" and "green" likes "apple."

The quantum analogue of marginalization is the partial trace: from the state of a whole system it produces the reduced density matrix of a part. Its diagonal holds the same classical marginal probabilities, while the off-diagonal entries encode how the part was related to the rest.

Bradley shows that the eigenvectors of the reduced density matrix carry meaningful information, for example grouping adjectives by the nouns they occur with, and that the original distribution can be reconstructed from them. Her algorithms for learning models from text are built on this.

But, I don't know, there's these really elegant constructions in quantum mechanics and quantum information whereby you shift your perspective, but without losing anything. Which is, I never really thought about that as an application to probability. It was just one of those things that happens in quantum information. You say, oh, I guess, yeah, this is an elegant way of doing it. But the thought of then applying that to anything else, like language, personally, I found that a little bit mind-blowing, that it's a very clever bridging between two seemingly unrelated sets of ideas.

Yeah. You just summarized the work brilliantly. Thank you. I was struggling and you brought us back home. So, yeah, listener, just listen to what Grant said. He just summarized my thesis well. Thank you.

Well, literally I was reading it this morning. So I think honestly it's fresher in my mind than it might be in yours. Yeah.

I was like, what did I write a year ago? No, that's great. Thank you.

14How Math3ma started

The blog grew out of Bradley's habit of rewriting lecture notes to find out what she didn't understand.

So talk to me a little bit about the blog Math3ma, and what made you start it, and then if you had goals with it, whether or not you felt like those goals were achieved.

Yeah. So I started Math3ma in 2015, in February of that year, which was my second semester of graduate school. And I started the blog really because I wanted to pass those qualifying exams I was telling you about. So the first year or two of graduate school kind of feels a lot like undergrad in most programs, in the sense that you're just taking classes, you have exams, midterms, finals. But at the end, courses are typically a two-semester course, like topology, you know, class one, topology class two, first semester, second semester. At the end of that, you have these written exams that are like a big final exam from the previous year of all of the stuff that you learned in that class.

Now I wanted to pass these exams, obviously. And I happen to learn really well by writing things down. So some people are, you know, visual learners,64Dividing people into "visual" and "auditory" learners comes from the popular theory of learning styles; research hasn't found that teaching to a person's style improves outcomes (Pashler et al., "Learning Styles: Concepts and Evidence," 2008). others are auditory. For me, I need to like have the ideas flow from my mind into my hand onto a piece of paper for me to remember it. And I also came... so, in other words, I would take a lot of notes during school, right? So I'm in class, I am, you know, the professor's on the board writing stuff, proving theorems, and I'm like frantically copying stuff down. I don't really learn math well in real time. So if you're at the board saying something, I kind of, I often wish that there was like a real life remote, where I could just pause you in real time and say, like, okay, you just said let blah blah be a yada yada, and then you made this conclusion, but my brain hasn't gotten there yet. So like I would want to pause, right? But I can't pause in class. I can't tell the professor, hey, sorry, I know you guys are like, you got this.

Not until technology catches up.

That would be great, having some... there's just a giant screen that the professor is looking at, and there's a pause symbol on it, and the students have clicked the button. They're like, oh, okay, I'll just go get a sip of water then. And then all the students, like, click the little play button on their seats, like, oh, I can continue.

Yeah, would that be great? Yeah.

Because people are afraid to say, can you like slow down?

No, I know. So I certainly did not have the courage to ask the professor to pause, you know, for all 15 other students or something. So I would go home and I would actually rewrite the notes that I took in class. And the reason I would do that is because I would write a sentence, you know, I'd look at my notes, okay, the professor said this, you know, here's the proof of this theorem. And then I'd write the first sentence, and then I'd realize, wait a second, I don't understand that first sentence. You know, I don't remember, for example, what, like, I don't know, what's a quotient group65Quotient group G/N — the group obtained from G by "gluing together" elements that differ by an element of a normal subgroup N. Clock arithmetic, the integers mod 12, is an example. really?

Like, we got this blank mod yada yada, but like, what is that thing? So I'd write that down. By the process of writing, I would realize, oh, I don't know this idea. I mean, I thought I knew it, or I thought I could like superficially know it and sort of shove it under the rug, but I cannot proceed from the first sentence of this proof to the second one without filling in this gap. So by the process of writing things down, I would identify what I did not know. And I wouldn't go on to write the next sentence until I filled up that gap and got that bit of knowledge that I didn't understand.

And sometimes it's something I genuinely didn't know, like, you know, they might cite another theorem, and maybe I don't remember what that theorem was because, I don't know, for whatever reason. So then I'd have to go learn that. Or maybe it's something that I thought I knew. Like, oh, I thought I had the intuition for this math construction, but if I truly understood what it was, then I wouldn't be struggling with this other proof.

Yeah, because often there's so many different layers at which you understand something.

Absolutely, absolutely.

The quotient group is a perfect example. You can read the definition and then much later be like, oh wait, like, this is what idea should be in mind.

The fact that they're so different.

Exactly. And, you know, I mentioned I came in to math very late in the game. So I think I had less experience than maybe some of my other classmates. So in other words, things I was seeing for the first time, maybe they saw previously when they took graduate classes, you know, as an undergrad or something like that. I'll give you an example. I took abstract algebra my first semester, first year of graduate school. The first, okay, not to scare people, the first two or three weeks of that class covered everything I knew about algebra, group theory, that I learned in undergrad. So grad school went very fast for me.

And I realized, to pass these exams a year from now, I can't just get by with like memorizing things or having a superficial understanding. I needed to have a deep intuitive understanding of the mathematics. And for me, the only way that I could do that was to take this very slow approach, sort of line by line, make sure I deeply understand this concept, because once I have that sort of deep holistic understanding, then, like, yeah, I can figure out the other stuff. Like, I think the key for me was I had to first identify what I did not know. And the process of writing these little expositions to myself helped me identify that.

And oftentimes, what would happen? There would be an idea which felt so complicated to me during class. I would do all of this work after and then realize the idea is so simple. It's so beautiful. You could have, like, you know, we could have used this like car at a stoplight analogy to explain this idea. What's all this other mumbo jumbo? So then I'd write this little exposition to myself, explaining the math the way I wish it had been explained to me the first time, you know, that light bulb moment. So I would do this for my classes. And so over time, I'd accumulate these little notes, like these little expositions.

So then I eventually thought, well, maybe there are other people also taking, you know, algebra or topology, also about to pass their qualifying exam. So maybe I could put this online, and maybe it would be helpful for them. That's really how I started Math3ma, because I was doing all this work, you know, on my own time, and I thought there's no way I could have been the only person that was stumped on, like, the Borel–Cantelli lemma66Borel–Cantelli lemma — a result in probability: if the probabilities of an infinite sequence of events have a finite sum, then with probability 1 only finitely many of them happen. A standard topic in measure theory courses. or something. So maybe I'll write a blog post about this.

15The fear of publishing, and getting past it

The fear of publishing, Bradley says, is cured by time, by readers' feedback and by writing about what genuinely excites you.

To be honest, I was very nervous when I started. Oh my goodness, yes. I think my first blog post is a very apologetic blog post. It's not even about math yet. I think the title, in February 2015, the title is, I think, A Math Blog? Say What?67Math3ma's first post: "A Math Blog? Say What?" I was thinking, what, why are you taking up space on the internet with your silly math blog? Nobody likes math, and certainly nobody likes advanced math at the graduate level. Like, you're just talking to, like, your mom. Maybe your mom's gonna read your blog and nobody else. I was just putting this stuff out there. I was a little bit nervous, because I'm being very transparent, right? Like, I'm saying, hey, I did not know this thing, and now I think I know it. I don't know, what do I know? I'm a first-year graduate student. I don't know, I really don't know anything. But I'm gonna write this, and I'm gonna put this out on the internet, and like, maybe it'll help a couple of other students. But if it's wrong, I'm really sorry, because I'm still learning myself. So I was very nervous when I started this.

I actually think that makes it better, though. I mean, this is actually something that came up in a previous interview with... do you know Mithuna Yoganathan,68Mithuna Yoganathan — physicist behind the YouTube channel Looking Glass Universe, about quantum mechanics and math; she started it while doing her PhD in quantum information at Cambridge. by chance? Actually runs a channel about, like, quantum physics, among other things, but she started the channel while doing grad school, and it was actually a very similar thing, where it was trying to come to grips with certain fundamental ideas by explaining them to others. And I think the term we came to was to describe it as discovery journalism.69The 3b1b Podcast has no published interview with Yoganathan. Grant used the phrase "discovery journalism" in the previous episode, with physics YouTuber Dianna Cowern (Physics Girl), for videos where the creator doesn’t fake the moment of learning but documents how they actually worked it out. Episode with Dianna Cowern, 00:56:14

And so, yeah, oh, I love that.

It's like there's not a term for it, but by giving it a term, it kind of legitimizes the genre that you are actually an expert at. And I think for a reader, one, it's actually a lot more comforting to feel like you're... you said this earlier, talking about how inviting it is when your advisor said, let's learn this together, right? Let's take this category thing, let's learn it together, even though he's the expert, and in the back of your mind you're like, yeah, really, but you're teaching me. In the same way, if I'm reading your blog and it has this feeling of, let's learn this together. And like, you're the expert and you're teaching me, but somehow that actually feels a lot more inviting than saying, oh, let me tell you how things work from on high, because I can enlighten you with what follows.

So, but nevertheless, I get the nervousness, because that is a very, I don't know, it's a very exposed thing to do. And did you find yourself getting more comfortable as you went on, or a year or two into it, did it have the same feeling of baring your soul?

Yeah. So I was probably... so, okay, confession, I was probably still like the same amount of nervous up until like the fourth or fifth year at Math3ma. So, what, it's been around for six years now. Maybe like in the last year, probably when I graduated. I think when I graduated from grad school, I was like, oh, okay, maybe I really can do this. At which point I was like, well, I have written, you know, five years' worth of stuff, and I haven't like, you know, spontaneously caught on fire or anything, and like no one... I didn't cause any major issues, or maybe I did, no one told me about it. So maybe it's okay to, like, continue doing this.

And I got a lot of positive feedback from folks basically all over, which has been really encouraging for me. People sending emails and saying, you know, oh, I was studying for my qual, and your blog post on this topic really helped me. Thank you so much. I mean, I get a lot of those and it's really touching. I really, really appreciate that. So I think the more feedback I got from folks, the more I realized, oh, maybe I'm not the only one that kind of felt that math is a little bit scary, a little bit intimidating. And in fact, you know, it seems to be helpful to, like, acknowledge that publicly, so that other students don't feel that they have to hold maybe their intimidations or their concerns inside. But when you see that someone else is saying, no, no, math is hard, like, it's totally fine, because that just is what it is. I mean, also, you know, you're like exploring the language of the universe.70The image goes back to Galileo, who wrote in The Assayer (1623) that the grand book of the universe "is written in the language of mathematics." Wikipedia It can't be that easy. Like, you're in good company.

So it's hard, but it's also fun and exciting.

So anyways, when I got more feedback, I think just like the maturity of progressing in graduate school, learning more, kind of building my math muscles, and then getting just, you know, emails and pings from folks all over saying, oh, this was really helpful, thank you, I think that kind of slowly chipped away at my nervousness and, like, stoked the confidence fire a little bit.

Well, let me throw one more into the batch and say, for myself, thank you for writing all of what you have written, because it's actually exceedingly helpful. There's been lots of ideas that I was confused by, but looked at your blog, and it just had a very approachable way to, like, get at the heart of something.

Oh, thank you. Thanks, Grant.

For others who are feeling that same level of nervousness, and they might want to write something, maybe they want to make a video, they want to give talks on it, how would you advise getting past those nerves? Or is there a way other than just kind of do it?

Yeah, maybe just do it. I think the only thing that kind of cured my nerves was just time, you know, time and experience. I think something that helped me when I was blogging: you might have two different perspectives. Like, if you want to write something and put it out there, there are kind of two ways you could approach that. You could say, hey, I learned this thing and I want you to know about it. So I'm gonna, like, bring you along with me in my joy and my excitement. So I'm gonna, you know, come over to you, and like, let's do this together, like you were saying. The other perspective someone might have is to say, hey, what do people want to know about? Do you want to know about this topic? Like, what's out there that's confusing people? And then, like, can I write about that? I think the second option is trickier.

And if this conversation is making sense to people, I might suggest leaning more towards the first one. Because if you're not excited or passionate about something, and you're kind of just doing it to, like, what do they want to hear? Okay, like, you know, the masses kind of change, they ebb and flow, and you may not feel very excited or motivated to write about a certain topic. But if you're doing it so that you can, like, you know, I don't know, get lots of clicks or something, I think people can see through that.

And that's such good advice.

Yeah. And on the other hand, if you are very passionate about something, I think that folks can often see that passion and that excitement. I think that can be very contagious, you know. So if you can see, quote unquote, the joy in someone's eyes as they're trying to explain something to you, even if that thing is very complicated, almost just the, like, contagiousness of that excitement brings you along. Like, oh, I want to know what... you know, that sounds really cool. So I would almost say, you know, how do you get over the nervousness? Well, look, did you learn something in school today that you think is really exciting? Go stand on the mountaintops and tell it to everybody.

And I think that they will just see your excitement and that, like, aha moment, that realization that you had. I'm sure that there are lots of other people that haven't had that light bulb moment go off. But if you share it with others and they kind of see your passion, I think that helps the math come alive. And maybe you just, like, instead of thinking about all of the people in the audience, you know, or, like, what's the trick, like, you imagine everyone, like, forgot to put their pants on. Don't do that. Just focus.

Never made me less nervous.

Yeah, right? But yeah, rather than thinking about, like, oh, I'm gonna publish this thing, and who is it going to go to, and, like, what are my Google Analytics,71Bradley means traffic dashboards like Google Analytics — how many visitors, from where, reading what. Her advice is not to write with an eye on those numbers. like, don't worry about that. That's not why you're doing this anyway. You're doing this because you just had a great, you know, aha moment. You realize something awesome about mathematics and you want to share it with others. So I think that, like, where is your perspective? Like, what are you focusing on? Is it the math, or is it, like, you know, I don't know, the people that it's going to? I think the latter kind of takes your eyes in a distracting direction. So I think, like, what fundamentally drew you into math? Like, where do your passions lie? What was your original spark of joy? If you keep that at the front of your mind, you know, all the other stuff takes care of itself.

16The street violinist

Busking taught Grant that the key is to start, and that people respond to passion more than polish.

This might seem like a totally unrelated analogy, but if I think of nerves and getting started with something, when I was in high school, I did some like busking, some street musician stuff, where my brother and I both played, like, violin. And at some point we lived in Park City, Utah, so the Sundance Film Festival72Sundance — the leading US festival of independent film, run since 1985 by Robert Redford's Sundance Institute. It was held every January in the ski town of Park City, Utah; from 2027 it moves to Boulder, Colorado. Main Street in Park City during the Sundance Film Festival, 2011.Main Street in Park City during the Sundance Film Festival, 2011 was this thing that brought in tourists. And my brother was much more outgoing than me. He's like, we should go on the street and, like, put out a case and, like, play some songs. And I was definitely much more nervous. But eventually, after he graduated, I just kept doing it on my own. But I was still very nervous.

And, like, there's two things that I actually think parallel in the world of maybe writing blogs that are expositional, even though those seem unrelated. One was the power of just starting. So I had one particular song that I felt comfortable with. I'm like, okay, I'll just start with it. And inevitably, after you kind of start, which is a weird thing, because you're standing out on a street and there's like a bunch of people walking around, you're like, I will now introduce some sound into the environment. But once you get started, then it, like, feels normalized in yourself.

And I don't know if you felt this with blogging, but I felt it with videos, where, like, after I'm maybe 10% into a project, the project has this momentum that really helps me run with it. But then the other thing was, if I was looking at what causes the most tips, what causes people to actually throw money into the case and things like that? It actually seemed less correlated with the musical quality of what was being played, and a little bit more with if I was, I don't know, like being passionate into it, right? I'm like closing my eyes while playing something, and getting into it, as opposed to just being like, yeah, I'm just kind of here doing a thing.

And, like, people index off of that. And there's something where, by seeing someone else that seems really into the music, that almost makes them want to be. And I think, again, that kind of shines through with some of this exposition, where, independent of the topic matter itself, on whether someone was interested ahead of time, the same way, independent of a song, if someone recognized the song ahead of time, if there's a sense that it's something others care about, in particular the author cares about it. Well, because the other thing that would, like, cause more tips is if there's a little bit of a crowd and you, like, see evidence of others there. So that's a little bit harder to have control over, in terms of, if you are the blog, like, simulating a view of an audience who's there and engaging with it. Maybe a comment section.

But both of those, I, yeah, I do think carry over. Just, there is a momentum to getting started, and there is an authenticity that people can detect. And between those, you know, there's a lot of ground that can be covered, because a lot of people out there have these beautiful insights. They kind of keep to themselves, and maybe they were thinking about blogging, maybe they were thinking about making a video, but you just never really get around to it. It's, you know, yeah, kind of hard.

Yeah, I like that real-life analogy, and that's a good point about just getting started. Yeah, good, good advice. I find that is definitely true for me, not just in writing, but also, like, in public speaking.

Yeah. But why is that hard?

Yeah, that is really hard. But I think kind of like you playing music, and like, once you get in the flow, it's kind of like, yeah, this is going good. Like, let's keep going. Who cares who's listening? Like, this is a beautiful song. And I'm certainly like that with public speaking too. I definitely get nervous at, you know, the first five minutes, and then I kind of warm up. So maybe the same with writing too.

Do you do a lot of public speaking now?

Kind of, yeah. Well, okay. COVID public speaking, like on Zoom.

Yeah, but more like for research talks. So more for, like, you know, math audiences, maybe at a seminar or conference, not so much general audience talks now. Yeah.

17Sparking interest in school

What would have helped young Tai is someone saying outright that math is more than procedures and that a right answer isn't understanding.

Nice. And then, as a very last circle of thoughts before I wrap things up here: you mentioned at the beginning how, at the earlier phases of your life, your relationship with math was very different. You know, it's this kind of annoying thing that maybe you could win the game of, but it didn't ignite any sparks. If you, I don't know, if you could go back in time to younger Tai and try to, like, inspire her in that way, or to any other student who's out there and kind of has that same general feeling with it, like, what should we be doing, like teachers or parents or things like that? What should the general world who cares about math education be doing that would have ignited that spark in young Tai, in a way that never happened until calc three?

Yeah, so I think what did it for me is something that a lot of great math educators have thought about before and have great insights. So in some sense, maybe this is above my pay grade, but I'll say from personal experience, the thing that I really enjoyed was this explicit communication that math is more than it might appear to be when you're stuck in the weeds, and you're like, oh, what's the quadratic formula? How do I add fractions? Like, it feels very dry. It feels very, like, rote memorization, kind of, you get an A if you can follow this procedure. And often that's how math is taught in schools, which maybe implicitly communicates to the students that that's what math is. It's a bunch of procedures, and you do well when you can obey those procedures, even if you don't think.

Like, you don't have to understand, you know, what multiplication means to complete a times table properly. And really, maybe the teacher doesn't know whether you understand conceptually what it means or not, because they just see that you answered all the questions correctly. So getting the right answer is sometimes accidentally substituted for understanding, right? But just because you have an A in something does not mean that you understood it deeply. So I think what really helped me was someone saying that explicitly. This is not understanding.

I remember my calc teacher, he once told me, he said, I would much rather have a student get a C and thoroughly understand the math by the end of the class than if they have an A and come away with no understanding. I was like, what? That does not compute with how I thought grades worked. What do you mean?

What is this? That's possible, right? That there is this disconnect between getting the correct answer and understanding.

Yes, yes. So I think, and, you know, maybe this was communicated to me earlier, and maybe, like, my brain just wasn't ready to accept it. I don't know.

I think it kind of, it sort of sounds like BS if you're a student, where you're in high school and someone says, oh, you know, don't worry about the grades too much, just try to understand. Or, like, trust us, math is beyond this. It gets applied to the real world, take a look at the word problems in the back of the book. The student looks at the word problems, and, you know, it's about Alice and Bob73Alice and Bob — stock characters of textbook problems, especially in cryptography, where Rivest, Shamir and Adleman introduced them in the 1978 RSA paper. trading apples with each other. They're like, this... honestly, I'm fine with my apple trading issues. Especially when you have like 103 of them.

I think it's a harder question than it's easy to give credit for, because everyone does try in their own ways. And I think a lot of times, if we were to zoom back to, like, math classes that happen that people feel uninspired by, when you look at the teacher behind it, they've just got a million things going on, and it's, like, hard enough just to manage the current situation.

And it's very easy to say, like, oh, if only more math teachers were like this, or if everyone did that. And, like, half the time they actually are doing a kind of inspiring thing, or they're trying their hardest, but they're working within a strangely confined system.

I almost think a little bit of what we were talking about before, where you find yourself blogging as a grad student, I don't see any reason a high school student shouldn't blog or try to write expositional material about what they're learning.

Right. Right. I mean, imagine if there were a blog post on, like, the comparison test. Right? Like, how helpful would that have been? I certainly didn't see that. I mean, I had a teacher to explain it. But even just... yeah, so I think, so maybe towards answering your question, yeah, like saying explicitly, you know, hey, there's more to math than just this stuff, or whatever. But I think I really like this idea of translating from math to English. Like, taking something that seems like a technical idea, and there's like a bunch of symbols, and, like, we were working with numbers and now we have the English alphabet, and now you want to put in Greek letters. Like, this is way... like, what is this? It's not math anymore.

But showing explicitly, maybe by taking very simple ideas to explain these more complicated topics, and making an effort to do that. I think, I mean, like you do on your channel, taking very complex ideas and sort of breaking them down in accessible ways, it's hugely valuable. Hugely valuable. And like you said, I think it's very possible that maybe my teachers prior to, you know, calc three were doing that, and maybe my brain was just not ready to accept it at that time. But for the most part, I just really remember math as being this very dry, robotic, boring, ghastly thing. And it wasn't until I saw explicitly these sort of friendly, simple ideas that were being represented by the symbols. And I think those ideas made an impression on me, because it suggested that to do math, you just need a brain.

Like, if math is just about thinking thoughts, I have a brain and I can think thoughts. And that was hugely important to me, rather than this other thing which I felt math was, like, this field where you are applauded for pushing around symbols quickly and getting them in the right order. There's no rhyme or reason to that. So I think maybe, you know, sharing math, the more conceptual kind of golden nuggets that are underlying the, you know, maybe the procedures. And I understand, you know, maybe we have to, like, learn how to do things procedurally first, and then the understanding comes later. There's, you know, thoughts behind that too. So again, I don't know, maybe it's like a timing thing, you have to, like, be at the right place at the right time. But yeah, I have no good answers to this, Grant. I don't know.

I think, like I said, I actually think it's an incredibly hard question. And everyone has an opinion on education. No matter who you talk to, everyone has an opinion. But I think there is a reason that things... whatever someone's opinion is, there's usually a reason that that particular opinion hasn't been implemented. And it maybe has to do with some of the underlying challenges of just, like, classroom management on top of inspiring students and things to that effect.

I guess, totally unrelated, but the actual last question: do you still play any basketball?

Oh, I mean, I might shoot around for fun. I'm not on any... I guess I'm like an old person now, so I'm not on any leagues or anything. But, yeah, there's a nice basketball court down the street from where I live, and so I was just there yesterday playing around, but nothing too serious.

I mean, do you miss it much? Is it like that, being on a team like you were in those first two years of college?

I don't miss it so much, because I, like, found the thing in life that I love, and so who has time to miss other things?

When you have category theory.

Yeah, right. No, I mean, it's really fun, but I absolutely love what I do now, and so no regrets.

Well, thank you for coming on. This has been an absolute delight, and I hope you keep blogging, like, for all of our benefits.

I hope so too. Thank you for having me. It's been fun.

Chapters
  1. 1The guest and her blog
  2. 2From hating math to understanding it
  3. 3From physics to the language of physics
  4. 4Grad school and an advisor
  5. 5How category theory went from worst to favorite
  6. 6Category theory as Mad Libs
  7. 7Is category theory useful?
  8. 8Language as algebra and statistics
  9. 9Where does a model learn grammar?
  10. 10A thesis inside a startup, then X
  11. 11Why quantum physics helps with language models
  12. 12A dissertation people can read
  13. 13Marginalizing without losing information
  14. 14How Math3ma started
  15. 15The fear of publishing, and getting past it
  16. 16The street violinist
  17. 17Sparking interest in school

Related episodes