Interviews

How AlphaChip Revolutionized Chip Design at Google | Anna Goldie

How AlphaChip Revolutionized Chip Design at Google | Anna Goldie

Anna Goldie, Senior Staff Research Scientist at Google DeepMind and co-lead of AlphaChip, using reinforcement learning for chip design.

Speaker:

Anna Goldie

Anna Goldie

|

AlphaChip Co-Lead, Ex-Google DeepMind & Anthropic, Founder & CEO of Ricursive Intelligence

Anna Goldie – Senior Staff Research Scientist at Google DeepMind and co-lead of AlphaChip, the groundbreaking project that used reinforcement learning for chip design (Nature cover publication). Her career bridges disciplines—starting in linguistics and computer science at MIT, earning her PhD at Stanford, and nearly a decade at Google Brain, where she co-founded the ML for Systems team with Azalia Mirhoseini.


Anna shares how her early curiosity in linguistics sparked a career at the intersection of AI and systems. From building dialogue systems at MIT, to working on Google’s moonshot projects like Amy and Small Talk, to pioneering deep reinforcement learning approaches for chip design, her path reflects both adaptability and vision.


References


Timestamp

  • 00:00 – Highlights

  • 01:10 – Introduction and Interview Focus

  • 02:35 – Early Days & MIT Journey

  • 08:16 – Google research team

  • 11:00 – Joining Google Brain during the golden age

  • 15:13 – Brilliant Minds behind Leadership

  • 17:02 – Early Projects and Collaboration

  • 19:50 – Moonshot Program

  • 23:21 – Collaboration with Azalia on device placement

  • 28:02 – Chip Design, Academic and Industry Research

  • 32:16 – Meeting Jeff Dean

  • 39:05 – Bridging software and hardware at Google Brain

  • 43:16 – The foundations that led to AlphaChip

  • 45:49 – Outro


Full Transcript

I think if say I won a billion dollars in the lottery, I would keep doing exactly what I'm doing now.
Meet Anna Goldie, the co-creator of AlphaChip, the AI that revolutionized how computer chips are designed. Then came the opportunity of a lifetime.
We received an email from Jeff Dean saying, let's do a moonshot.
When she finally got her shot at Google Brain, reality hit hard.
When we show that to like the TPU team, they weren't even, it wasn't even like they laugh us out of the room. They were like actually a little bit angry, like, why are you showing us this thing? We don't care about this.

The pressure was crushing
and every day that the chip is delayed costs the company enormous amounts of money.
So even just the opportunity cost.

What is the magnitude of the money that was lost? I would say like

millions of dollars per day. Millions.
The stakes couldn't be higher.

Make a mistake, maybe it costs a hundred million dollars. A hundred
million, right? The problem seemed impossible.

Our large pre-training data set had 20 examples in it.

That's insane from a machine learning perspective. So the state space is like a simplified version, is like 10 to the 9,000 like possible solutions. The vast, vast majority of those solutions are invalid.
How do you solve the unsolvable with almost no data, million dollar stakes, and the future of AI hanging in the balance?

Meet Anna Goldie - Senior Staff Research Scientist at Google DeepMind and co-lead of AlphaChip, the breakthrough project that applied reinforcement learning to chip design and was featured on the cover of Nature. With 11 years at Google Brain and a recent stint as a Member of Technical Staff at Anthropic, Anna has been at the forefront of AI research spanning systems, language, and large-scale infrastructure. She holds a PhD in Computer Science from Stanford, dual bachelor's degrees in Computer Science and Linguistics from MIT, and was honored on MIT's 35 Under 35 list. From developing dialogue systems as a student to building superhuman AI-generated chip layouts now running in Google data centers, Anna's journey reflects both scientific rigor and visionary ambition.
Anna Goldie's path shows how a spark of curiosity can grow into a career that reshapes an entire field. At MIT, a single lecture on spoken language systems inspired her to dive into AI and linguistics, building early dialogue systems before pursuing her PhD at Stanford. Her career at Google began with experiments like Project Amy and Small Talk, exploring how AI could learn from language. But when deep learning started to outpace older rule-based systems, Anna made the leap - joining Google Brain during what she calls a golden age of bottom-up research. Backed by leaders like Jeff Dean, she collaborated with Azalia Mirhoseini, first tackling device placement for neural networks, and later co-leading AlphaChip - Google's moonshot applying reinforcement learning to chip design. That collaboration bridged software and hardware, opening a new frontier in AI-driven systems.

Let us get started!
Hi Anna, welcome to FounderCoHo. You have an amazing career as a co-leader of AlphaChip. I think it's one of the breakthroughs that really changed how hardware is designed. And very honored to have you.

Well, I'm very honored to be here. Thanks so much for inviting me.

Absolutely. Yeah. We love to hear about your early days and can you introduce yourself to our audiences and listeners.
I would say that I don't know if there's like some strong boundary between myself as a person and a researcher, right? I think if I won a billion dollars in the lottery, I would keep doing exactly what I'm doing now.

So research is more passion for you.
Yeah, passion for me.

Yeah and I'm actually wondering when did that passion start in your early days?

I guess, I remember when I was growing up in kindergarten, they would ask you, what do you want to be when you grow up? And everyone else seemed to know the answer. Like, oh, I want to be a firefighter or an astronaut. And I remember being kind of worried because I really wasn't sure. And then in high school, I liked everything. I liked French literature or math or biology. I wasn't sure what I wanted to do with my life going forward. And then I did this summer program at MIT, which was basically an introduction to discrete math, electrical engineering, and computer science. And then they had these lunch lectures by various faculty. And one of them was about spoken language systems. So this professor, Victor Zhu, described this idea of a spoken language dialogue system, a computer system you could speak to and it could respond.

When was that?
That was 2004.

Well, that was like OG time.
It was like crazy but I was just like completely like I could feel like my blood like pounding in my ears. I like this is what I want to do when I grow up, right? This is the most amazing, fascinating thing I can imagine.

Yeah. So that journey, the MIT summer school, ignited your passions for the whole research area. I know you later went to MIT. Was it because of that?

Oh yeah, for sure. I was like, okay, I want to build systems like this. So I went to MIT. I studied computer science and linguistics. I actually joined that professor's lab.

Oh that particular professor? Wow.
Yeah, so I worked on dialogue systems. Yeah.

Wow. Yeah, tell us more about your life at MIT. How was MIT study life look like?

That was very intense, right? Like they say, drinking from a fire hose.

What was the dialogue system look like back in 2004, 2005?

Completely different, right? You have like a rule-based dialogue system. And it was like, in the case of the lab I was in, which is SLS, spoken language systems, like it was actually audio as well. And I remember like, I took the 6-3-4-5, it was like ASR, automatic speech recognition. We would actually read spectrograms as humans. Like you would look at the waveform and you could like say, there's an R here or something. It was like using like signal processing and such, right? It was like completely different paradigm.
Yeah.

How long does it take to learn how to read the spectrum? That sounds like a magic skill.

I mean, like a semester, I guess. A whole semester. Not just yourself to learn how, but also to do signal processing to enable that recognition. I worked on like, I made a domain-specific language with a compiler in C or something. I don't know, it's just a completely different paradigm.
I think back then like there was like you mentioned a lot of rule base so you kind of have to know language very well in order to do research. Is that true? Yeah.
Yeah exactly. I remember my goal was to build language models, and so I wasn't sure what the best way was. And I remember interviewing faculty, like five faculty who were on the sort of computational side of linguistics, five faculty who were on the sort of language, NLP side of computer science to try to ask for their advice on whether I should do linguistics or computer science. And then I met my advisor that way and I decided to just do both of it.
But I think at this point I don't think linguistics is super necessary for like the neural paradigm. It's satisfying.

Yeah, I think that the next stage is very, very important and a lot of the learning people have on that has already been internalized as they develop this new paradigm of LLM.
The models find the rules but back then it's like you would define these like elegant like parsing.

Yeah, like all the structures, syntax trees. And I know you speak perfect Mandarin. Is that related to your major over there?
So MIT doesn't allow triple majors, but so I actually did take enough like foreign language classes that I could have gotten a third major if that were allowed. But I think I would just take foreign language classes every semester that I was there, but for fun. Because for me, the reason I wanted to build like language models was because I thought maybe that would mean something like bring us towards understanding how humans can understand and generate human language. And so I like learning languages to try to observe my own process of acquiring a language, if you get some insight.

Yeah, exactly. How did you choose Mandarin? There's so many languages in the world.

I studied other languages too, right?
Yeah, how many languages can you speak?

I speak English, hopefully, Mandarin, Japanese, French, some Korean, some German, some Italian, some Spanish, I guess. I think I just really, I'm just like very fascinated by the process of acquiring languages and like how you can do it optimally.

What first team did you join when you joined Google?

I remember it was funny, it was called the AI team, which is ridiculous. It was like AI at Google.com was like the team's alias or something. It was Anna Patterson's team. She was my first manager.
What was the project? Was it related to the project you later worked at Google Research?
It's called Amy, was basically this idea like, maybe we should be able to benchmark AI progress by having the model like take like elementary school, like reading comprehension exams. We had the model would like read or it wasn't even a model would say, but it would, you know, the system would read a passage and then answer questions. Yeah. Hoping to make progress on that.

When was that?
That was like 2013.

Well, this was very early. I think it was before that most people started to establish all these NLP benchmarks.
Exactly, it was like a different era.

It was a totally different area. Yeah, yeah. And how long did you work in that team?

A year and half.
And then later you started to switch to the Google Research team.
This was Google Research actually.

This was also Google. Okay, the first thing was...

So I remember I then worked on this team doing dialogue systems actually. It was called Small Talk.
Yes, Small Talk I remember, yeah.

And I remember we were all on the same floor so it really wasn't much of a change to change with that team but yeah I remember like I was working it was again rule-based and I making this beautiful semantic parser like I think I joined the team and then like I tripled like the performance on the metrics that we had but I could just tell that this was not going anywhere like I collected this large data set and then I tried like comparing the performance of this rule-based system that I had poured my soul into compared to like a very simple like neural baseline and it was just yeah.
There was no hope for the human-handled based system. That's when I decided I need to be working on deep learning.

Exactly. When was that?
2016.

I think that was the time a lot of people realized a similar thing. And I think that in the time before 2016, like everyone started feature engineering, adding the rules, even there was decision trees. And everyone like smart people will come up with all these tricky rules. And I think 2015, 2016, that was a time like, you almost all fields people started to realize that if you have an end-to-end learning system that can learn the rules, like gradually, like no human will be able to beat that.
Yeah, exactly. I certainly I knew I couldn't.

Yeah, exactly. Yeah. And then after you had that realization that you have to jump the ship to work on end-to-end learning system, what project did you choose to do?

I mean, I think that, like I remember I had lunch with my friend Chris Olah and he like encouraged me to apply to Google Brain. I think I'm not sure I would have otherwise even thought that they would consider me or something, right? So yeah, I remember I met with Jeff, like basically I applied, like applied to Google Brain and I...
Do you apply through internal transfer portal?

I mean, I think they had an abnormal process, I think. It was way beyond the normal.

Exactly. I remember it was 10 to 1. Only 10 people applied to transfer Google Brain. Only one get accepted.
I didn't know about that maybe I would have been too intimidated. I remember like I think I had I was up for promotion and they and I think Greg Corrado was like maybe just use your promo packet as your application. They had some kind of like committee of like Quoc and Jeff Dean and like Sammy or something.

Smart strategy.
I was so happy when I found out I got in, I just couldn't believe it. It was clearly a life-changing moment.

Yeah, that's exactly. And that was 2016. And so what was the first day that you joined the Google Brain team? What was your what was the day look like?

I guess the interesting other part was that like, so I had this offer to join Google Brain and then Jeff said that he could even sort of improve the situation that I could if I wanted to participate in this Google Brain residency program that hadn't previously existed. So he's like, you know, we have this program, it's starting, you know, feel like June 20th or something. And you can take part in that if you want, even though you're full time. And like, I remember him showing me these like profiles of the people that like were, It was like a crazy batch, especially that first Google Brain cohort.
So you joined the residency program.

I joined the residency program and it was like an amazing situation for me, right? Because I'm like already full time, so I'm not like stressed out about conversion, but I also had this like complete freedom. Yeah. And I was like, Jeff was like basically like, will have the freedom to like pursue your research interests. And if you want to like, you know, grow into a research scientist, cause I was a software engineer at that time, right? Yeah. And it was like true.
That's a fantastic program to be.

Extremely lucky that you get to be part of that.

Yeah so for many of our listeners who are less familiar about the Google Brain environment or the whole this research lab, and how would you describe the environment?

Basically like the perfect research environment, a golden age.

What does a typical day look like when you are working over there?

It was just like complete research freedom is like the backdrop, right? So you can work on what at that time you could work on whatever you want with whoever you want. You could publish it. You could open source it. I think in terms of a typical day, just like a lot of coding, Like coding, some, like at the time it was, it was like before this like large scale, like transformer paradigm. Like I'd even make like custom neural architectures, right? Like I'd be like writing some code in TensorFlow.
Running experiments, writing papers, open sourcing code even.
I can't.

Exactly, I think it's a very awesome place. It's basically like a playground for researchers. You can do anything you want. And you can be as crazy, while actually craziness is encouraged in the whole environment.
Exactly! I remember there was like nose brain, were like people that were like making neural nets to like understand smells or like discover exoplanets or yeah, maybe do chip design or whatever. Like I feel like there was it was very like bottom-up and like a lot of brilliant people too. So it was like really fun to work with pretty much anyone on the team, right? Yeah.
It's like pretty self-organized, very flat organizations. Do you have a manager in the Google Brain?

I mean, I still haven't had a manager yet.
But how does this manager and report relationship work in Google Brain? Is this traditional or is it more like a different role?

I think like less traditional. I think my first manager was Sammy Bengio. Like my current manager is Quoc Le. It's just like, you know, like this really brilliant researcher who has like very deep intuitions himself, but also like trust. I think he's picky about who he hires and then he trusts them to do what makes sense. Like I never would, my manager would never like tell me what to do or something like that, right? Or even how to do the thing. It was like, if you know, what do I think makes sense to do? Then if I think it makes sense, then do it.
Yeah.

Technically they still call it manager, but I think the role is very different than what people traditionally think managers are doing.

It's more like your lawyer within the performance review system, promo system or something.

Yeah, it's more, but I think they like, there is a kind of a kind of formal structure they have to have in as corporate. But in reality, they all serve as your coach as you do your own research and you are independent researcher who are pursuing your own passion. Yeah.

I completely agree with that. But I think it's still such an honor to get to meet with someone like Quoc or Jeff right? Yeah, exactly.

And I know that later you started work on AlphaChip project, which is amazing. I think it's one of the most important breakthroughs in the hardware design and AI plus hardware in the past decade, few decades. In fact, I still remember I attended one of Jeff Dean's talk and he was like, it has always been hardware for AI. Now it's time for AI for hardware. It's very, very inspirational. Tell us more. How did you start the project? What was the circumstances made you decide to start the project?

We really want to like go to the origins of that I could like as all you and I, we actually started out as like workout buddies. So we would do like high interval training circuit training I guess you could spend like a year as like workout buddies. And then you're like, Oh, you know how you like, you're like friends with someone, but you don't know if they'd be a good roommate or, you know, like, it's always like nerve-racking to change relationship.

But you are in different team back before that.

We're both at Google Brain. We started on the same day actually.

Oh same day? Wow.

Yeah, we didn't work together for like a year and then, you know, we thought, let's try collaborating. So we worked on this project, on, we call it device placement, where it's like, say you have a very large neural network, like maybe tens of thousands of operations, and maybe it doesn't even fit on a single GPU, or you could accelerate it if you were to do like parallelism, right? And so we were like, maybe this, you know, we can treat this as an RL problem, have an RL agent, assign each of the ops onto a different GPU or CPU core.

We weren't even doing enough TPUs which is funny and the reward signal can be just the runtime of executing that like training or inference with that partition. So that was our first project together. We did it in like three weeks. We wrote like a bunch of code together.

Wow three weeks yeah yeah was this type of like hackathon like?

It kind of felt like one in retrospect. We actually like we had this idea, we coded it up together, we ran the experiment, and we wrote the paper in three weeks, which is insane actually. I think it was rejected the first time we submitted, and then we did a little bit of rewriting and it got in. So then we were like, well, what can we do next? What would be more interesting or impactful?

And one quick question, because at that time, you and Azalia are still in different teams. So did you...

We were both at Google Brain.

But the bigger team are now working on the same projects. And you two come up with this project idea.

I mean, like I said, as a resident or just maybe as any researcher at Google Brain, we could just do anything we wanted, right?

How this idea came to your mind?

I think we just were thinking about what is a thing that we both find interesting, right? And you know, it would be impactful. But I think when we were thinking, okay, like how do we take this to the next level though? Right. And like, what is another like much larger scale, much more challenging, much more impactful graph placement problem? And like, what is the problem that has this sort of recursive self-improvement structure? And then we thought maybe chip design, chip placement, right? Like we thought maybe we have some edge here, right? Cause we had worked on and gotten traction on his comparable or to us, related problem.

Yeah, when was that?

Let's see, so it was like 2017, end of 2017. And then I think Google had this, Google Brain had this moonshot program, which was starting for the first time. Any person could propose a moonshot and you would commit to work for a year on something that, you know, maybe it sounds impossible, but if you were to succeed, it would matter a lot kind of thing, right? It was a very competitive program.

I think that was time, I think way too mad. I heard your pitch in the Moonshot project.

Oh really? That's funny.

And then we grab lunch to eat afterwards.

I didn't know that was crazy. I remember it was like, so it was like we got three minutes to pitch. I think Quoc was like, like he saw our slide deck in advance. I think we had like 21 slides and then Azalia and I jointly pitched for three minutes. And he was like, he was like, oh my God, you're going to like, you're not going to be able to get through all of those slides. But we did it.

Yeah, I remember you, yeah.

Can you tell our listeners about what is this Moonshot project and why it was set up in the Google Brain?

So I think we thought, well, chips are the fuel for progress in machine learning, right? Like as soon as you see those neural scaling laws, whereas you scale up the number of, the amount of compute applied, the number of parameters, the data, you just get better performance, right? So we're like, if we could use machine learning to make better chips to fuel the AI systems of the future, I think this could be really powerful, right?

Yeah, the chip design is a very important part and also the area in which the RL can be very, very useful. Exactly. Take a step back. Who organized this pitch and was it organized regularly and how did you find the moonshot pitch?

I feel bad. I don't remember exactly like which person organized the moonshot program the first time. Do you remember? I feel like they deserve credit.

I don't know who initiated yeah. But it becomes like a regular thing.

I think when I pitched it was the first time they had it. I remember Quoc had like autoML as a moonshot for example.

Yeah, I remember that one. Yeah, yeah, yeah.

I think it's really good because I think that it's a little bit of an antidote to this one potential weakness of an organization that's doing bottoms up exploratory research is people could individually do low impact projects or something. So to have this little bit of force towards let's think about what would be really impactful and ambitious was probably good for the team.

Exactly. I don't know who organized this. I think we should find a name and give the person credit.

And the funny part was like, I don't think they actually provided like additional compute resources or really, or head count or anything, but I think just something about like, you are a moonshot, that you have this banner that you can even, even that's good.

Hold up a right? Yeah. I always, because I never got a Moonshot project because my project was like a recommendation system, so it's like why it's called Moonshot? But I didn't know they didn't provide additional computer resources.

If you wanted to request leads resources, maybe you could have a quicker line to leadership, but I don't think that was true.

But back then, I think the resource was never a problem. There was plenty of free GPU back then. And then each of the model training doesn't take that many GPU back then. Exactly. Yeah, yeah. That's cool. That's cool. Yeah, so let's dive back into the AlphaChip projects. So you mentioned about then you started to think about the bigger problem, and chip design is one of them.

Yeah.

And then how did you turn this idea to something that actually is more concrete? And did you choose some design partners or to work on a chip design?

Yeah. I remember like Azalia and I, spent a lot of time interviewing chip designers across various parts of the stack, right? Because there's multiple stages and we wanted to understand where are people spending time, what's hard, and also which problems had a shape that we thought we could help with or that maybe an RL or neural approach could be helpful for. And that's kind of how we would narrow in on, our goal was to do end-to-end chip design, but where would we start? And we thought chip placement optimization.

And we partnered with the TPU team. Because we thought, OK, what's more exciting than helping build AI chips, right? Because TPUs are the AI accelerators at Google.

Yeah. So what problem TPU team was facing made them to be interested to collaborate with you?

I mean, they're like a tire team of like, say for example, I mean, this is just one of their many problems, but physical design. How to generate like a manufacturable chip layout that's like high performance and has no defects. They have like teams of people spending like weeks, months, they have PhDs in this area. And every day that the chip is delayed costs the company enormous amounts of money. So even just the opportunity cost.

What is magnitude of the money that was lost?

I would say millions of dollars per day, it's an opportunity cost.

Yeah, it's a very high-stake situation. That also.

If you make a mistake, maybe it'll cost $100 million.

A hundred million, right? So if you make the wrong design and then they started to manufacture it and then hundreds of millions of dollars gonna be wasted.

If you make like a wrong mask or something like you're just, it's catastrophic.

Exactly. And I wonder that because the problem you're solving, there's many people apply RL to different problems. So for example, I was applying RL to recommendation system. If you make a mistake, totally fine. Just say like a bad YouTube video.

Maybe like you radicalize someone or something.

That could happen. I think there's guardrails still needed for those cases. And for your case, I think stake is particularly high. And what was your approach to minimize the risk?

I mean, I think one thing that's better about the chip placement setting would be you can do it offline, right? So you can do extensive simulation of the design that you generate.

So implement like simulators and...

So there are commercial tools. They cost like say a million dollars per license per year and they can take up to 72 hours to run, but they will calculate high fidelity metrics. So something that you can almost treat as ground truth. Like obviously you can't like build the chip and then test it because that would be way too expensive of a way to check the quality of your solution but you can get some signal before you build it, which helps a lot.

Yeah, that's a great point like one thing I realized back then I think 2017 2018 all the RL researchers was like basically you have a hammer you are trying to find a solution and one of the indicators I realized that whether an RL can be successful in the field is whether there is an existing simulator from that. That is that it feel the same way or different? Yeah.

I guess like, so one interesting thing I would say is like, I feel like there's like a divergence between like industry and academic research in this, in this area. Like when Azalia and I first started working on this, we like looked into papers and we're like, people optimize like half-perimeter wire length or something like that. Right. And so we, you know, we code up some RL agent that demonstrates that we can minimize half-perimeter wire length, which is kind of seems like, you know, it's like a nice proxy cost.

Where you can calculate it quickly. But when we show that to the TPU team, it wasn't even like they laugh us out of the room. They were actually a little bit angry. Like, why are you showing us this thing? We don't care about this. This metric doesn't mean anything to us. So even finding out what is the thing that they actually use to make decisions, like what are their real metrics, was actually somewhat challenging.

Yeah, you mentioned a great point, which is the gap between research and production. I think we still haven't like fast forward now almost like 8 years later, we haven't really still sort that out. There's still a gap between the research like the metrics you use in research, or the benchmarks you do and what actually the production team is using.

Exactly.

Yeah. And do you think that like in the past eight years we have been making progress on that?

It depends which domain we're talking about. I think in chip design, I think there was, or physical design, I think increasing divergence.

Increasing divergence.

The academic community was solving this beautiful applied math problem. Have analytic solvers, optimize half-perimeter wire length maybe, some kind of approximate metric of routing congestion but often not. Whereas in the real world, when you're trying to actually build chips at sub 10 or sub 7 or even sub 5 nanometer technology node sizes, they're looking at completely different metrics. They're looking at routed wire length, horizontal vertical congestion, various timing violations, power consumption area relates to yield.

It's very divergent. Do you think this trend will continue?

I mean, I think with our paper, we really tried to push things back towards something more like what the real problem is in industry. We reported metrics from this commercial EDA tool on modern chips with sub, I guess I can't say what nanometer process, but.

Right, right, right.

Yeah, and I think we saw some other papers and reporting metrics that were like the actual ones that physical designers use to decide which layout to send for manufacturing. So hopefully we, you know, some influence.

Yeah, I think that's also the challenge of the industry research team because when we do the research in company, we usually pay more attention to what actually works. But when we publish these results in the research community, they don't necessarily care about that. They often care more about what is the theoretic value providing or how they can reproduce it.

But in real world, a lot of things it takes an enormous amount of computation to reproduce.

I mean, that was the other weird part is like, I think some academics felt like, you know, say AlphaChip used a lot of compute. Like it's just like, use like 16 GPUs for like six hours. Like that's not actually that much compute. Like, you're like, you people are spending like, I can't even say how many GPUs for how many months people's for training, like large language models. Like the ratio is just absolutely ridiculous. Right.

Yeah.

Yeah. I think you mentioned another great point, which is not just the divergence of the evaluations between academics and also industry research, but also the capability or the focus. Because for 16 GPUs, for most of the research lab, they don't have. So they couldn't reproduce. But for industrial standard or any like labs like the Gemini, Anthropic 16 GPU is nothing at all for that. So these gaps of the computational resources that is available to the industrial research lab and the academics is also widening.

I guess I don't know if I'm so convinced. Obviously if you're actually building a chip, then there's just no question that it's worth that compute. The stakes are incredibly high. It's IP for TPU is worth, I shouldn't even say, but I think on the academic side, say some lab that was interested in our work, they had won a multi-million dollar grant from NSF to do AI for chip design. I'm pretty sure that they could afford to run 16 GPUs or 20 GPUs for 40 hours in pre-training or something. That doesn't really make sense. The cost is really not that much.

Yeah, I think it's also the emphasis because traditionally they would be putting more emphasis on the theoretical innovations rather than the practical innovations like in the school evaluation system. Yeah, I also want to dive in another topic related as you do AlphaChip because I know this is a project that also Jeff Dean is super passionate about it and you and Azalia and also Jeff Dean work very closely in this project. He's legendary person in the whole industry as well. How did you meet him?

I mean, I met him actually. He was trying to convince me to join Google Brain. But it's too hard for him.

What was the first meeting you had with him? What was your first impression on him?

Actually, my first meeting was I was like walking with this, you know Khu, one of our teammate in Google Brain. We were talking in Chinese for some reason. Then Jeff Dean was like walking behind us and I guess he overheard us speaking in Chinese. And he was like, my daughter wants to learn Chinese. Can you give her tips or something? That's how I met him originally.

That's funny, yeah. I know we both also speak Chinese a lot.

Jeff never asked you for your tips, I guess.

Maybe I should speak more with you. Yeah, cool. And then later you work more closely when you study AlphaChip.

I think Azalia and I, worked on this device placement work and Jeff was a co-author. I remember we had discussed the idea with him, but then we were so bad, we gave him a draft of our paper, I think the morning that it was due or something into the conference, and then he was like, maybe you could run these additional experiments. And I was like, maybe Jeff Dean could run these experiments in the three hours left, but I am not capable of that.

We had collaborated on that paper previously and then I remember Azalia and I, we saw this like announcement for the moonshot and we were like, maybe we could do like ML for chip design. Maybe that would end systems optimization. Maybe that would be impactful. But we kind of wanted to propose that and we wanted to see if Jeff were interested, right? And so we were writing this email together, like saying like, okay, we don't want it to sound too crazy, but you know, maybe he would find this interesting. And so as we were writing this email, we received an email from Jeff Dean saying let's do a moonshot on...

What a coincidence. You are thinking the same thing. Before you write, he messaged you first.

Yeah, I was like, okay, well, Jeff thought it was a good idea. Then maybe we're not that crazy, right?

Yeah, yeah, that's cool. In fact, I think one of the reasons why everyone loves Jeff is he's so humble. He's actually helping so many projects in Google to move forward and encouraging people. Like exactly like you mentioned, a lot of us, we think about it, we always don't have enough confidence. We think it's crazy or not. But when Jeff says, just do it, then why not?

I think he's like a deeply technical person, right? But he's also optimistic, which is nice. He's very fast, too. He can immediately understand any idea or result you might share with him. It's kind of exhilarating.

Yeah, it's a, you immediately get a positive feedback after, like, people understand you, especially a person with such a salient leadership and such a track record, understand you right away. I wonder, in the projects, how does the work with Jeff look like? Do you do, like, regular meetings? He give you ideas? And how exactly collaboration work?

I mean, I think we shared our proposal with him and got feedback. I think the first year of the project, he actually would come to our weekly meeting with the TPU team, which was pretty cool. I remember being kind of nervous, like I better have some good results every week to show this RL agent better learn something. Yeah, I think, I guess that was how we would, and then we had a monthly lunch with him. So we would discuss ideas and results, like, we're having this difficulty, we're thinking about solving it this way, what do you think?

Yeah, exactly. Yeah, and I know that like especially for any project related RL in early days. It hasn't been smooth like in fact in 2016 2019 that everyone who working on RL was it's very tough moment back then and you're working on the AlphaChip device replacement. I'm very curious about your experience over there was it smooth you do get it working in first trial or did you face a lot of obstacles in the process?

I think like, I mean, the device placement project, I mean, was, that was pretty fast, right? Like to get to a result. I mean, maybe that's just, I think in that case it's because the reward signal was so clean, right? Cause you can just like, you create a partition and then you can just do a forward pass, a backwards pass, parameter update. Maybe you do it 10 times and take the average to reduce variance, but you have a very fast and very like aligned with your true objective reward function. Right? So it's, it's an easier setup. In this case, it's like very complex, like the true reward. Very hard to evaluate.

You mean the chip design is much harder.

If you look at what the chip designers care about, it's like eight different things, right? And they are complex to evaluate.

So can you tell us what are the chip design, what are the eight components in this?

So I guess like one of them would be like routed wire length. Like, what is the length of the wire is needed to connect all the components that you've placed onto the chip. Like, there's like, you know, these memory components like SRAMs, which are like maybe in the order of hundreds of those. And then there's millions of these logic gates, like standard cells and all it's all connected by wire. So it's this graph you're placing onto this highly granular canvas. So the state space is like a simplified version is like 10 to the 9,000 possible solutions.

Like if you make various like simplifying assumptions and like the vast vast majority of those solutions are invalid.

Yeah, that number feels bigger than the molecules in the universe.

It's kind of scary, right? It's like this docking problem. And then in terms of the cost functions, you're like, okay, what is the length of the wires needed to connect them? There's another metric, which is like, absolutely, it's like a blocker, like routing congestion. So is it even possible to, given the routing resources available on this chip, and I've been kind of presenting as if it's like you're placing onto a 2D canvas, but that's not true. It's three dimensional, right? Because you have some number of wafers. And so you're placing components and then you need to have wires.

At each xy coordinate along in this chip, you can only route one wire, let's say. And so if you place it a certain way, it may be just actually impossible to connect these components. And then there's timing. So the signal.

There's a lot of constraints as well.

Yeah, yeah.

And then like this sounds like extremely complex problem to solve and how did you do this with 16 GPU that feels like nothing to solve like this problem.

The real issue is that we had so little data, right? So because we have so little data, it's like there's some limit to how much GPU we can even leverage, right? So like, you know, it's just, we're talking like our large pre-training data set had 20 examples in it. That's insane from a machine learning perspective. I think RL was like key to kind of making this tractable because in some sense you could think of RL as generating labeled examples. So you have some chip you're trying to place and you can try many many times to do that and you can label the outcomes with your reward function. You're in some sense expanding out your data but like 20 examples is so few right?

And how did you make this RL to be able to learn with such a few amount of data?

I think the key was representation learning, right? So this is in the pre...

For the audience with a less background of ML, what is representation learning?

So it's like how do I basically create, like allow the neural network to, or the RL agent to actually see or understand the inputs in a meaningful way, right? So like in, you know, language models, they like ingest words and then they create some, you know, embeddings of their meaning, right? In this case, like we want to ingest like a chip that we want to place, which is, you know, millions of standard cells and maybe up to a few hundred macros connected by wires and maybe some state of the canvas.

We've formulated it as like a sequential placement task, where you place each of the components. But how can you represent the progress so far? Like some parts of the chip you've already placed things onto and you can't put things on top of those. So how can I make the neural network or agent see what's going on? And then learn from it.

Yeah. Great. Yeah. So is my understanding correct that it's basically a very advanced model to be able to understand what's going on in the current placement?

Exactly, or in the state of the thing that you're placing as well. What is the relationships between different components on the chip? Which ones need to be near each other maybe or something like that, right?

And then that representation learning is the one that you use the 16 GPU to train.

So we have basically an encoder that creates embeddings for this, like some kind of neural representation for the input. And then we pass that into a deconvolutional neural network, or policy network, to generate a probability distribution over where should we place the next component onto this 2D canvas? And then a value network.

Yeah, yeah.

Exactly. Yeah. And I think you also touched such an interesting point I want to dive a little bit deeper into that. You mentioned about encoder. And you also mentioned about earlier the representation learning, which everything here is basically trying to understand input and turn that into subtle representation, which can be the embedding. Yeah. And encoder back then was extremely popular at Google. I think eventually lead also to BERT, the representations of language which then become part of the first really like popular transformer models and then everyone started to. So this like all these projects we did accidentally kick off all this another thread of large-language models. I wonder what is your thought about like the paradigm that is evolving in this vibrant research community? Like you mentioned like you're working on a chip design, you were using RL. I was working on RL. Some other team working on this encoder things. How did you got ideas of using this representation learning or encoders? Was it related to the environment that you were in? Just some lunch conversations or read some papers?

I think it was more that we thought, OK, we want to train an agent that's capable of doing this general task of generating high quality layouts. But what we found was, at least initially, we had so little data but even that little data that we had, we weren't getting anything out of it. So we would say, to, we're like, let's have this agent place a bunch of chips and learn from that. It wasn't learning anything, actually. So makeyou might as well start from a randomly initialized. If you had some new chip that you wanted to place you were just as well off to start from a randomly initialized policy as the one that had experience on these other chips. And we thought that didn't seem like, I mean, there's something good if you spend 24 hours and you get like a superhuman layout, that's worth something. But it felt like there was something fundamentally less interesting about that setup, right? We wanted to actually be able to like learn from experience. And so that like, we were looking into like, why is it that we're not able to leverage pre-training or RL pre-training when we looked into it, seemed like the value network was just giving insane predictions of the quality of the chip. Like it wasn't generalizing across different inputs. And so we thought maybe there's something wrong with the way we're feeding information into this network. Like it's not actually, it's not actually taking a meaningful representation of the chip that generalizes across different inputs. And so we, we put a lot of effort into exploring different representations that would be really well suited, like how the right inductive bias for our problem and we ended up with this like novel edge-based graph neural network that could generalize like that we could say from this embedding predict what the reward signal would be and then once we had that we could use it as the encoder and then we generalized across chips.

Yeah, exactly. I think that one thing that I hear you talking about it, I also many team back then was like, how to make the model more generalizable. Yeah.

Yeah, exactly. I remember one of our nature reviewers was like, because we were like very excited in our nature paper about how we thought this generalization. And he was like, isn't the bigger breakthrough that instead of spending weeks or months like a human effort that you in, you know, in say, 24 hours, you could from scratch generate a high quality layout that was superhuman? Like, why do you care that you can do it in like six hours after pre training? And I was like, maybe it's just as like a deep learning nerd. Like, that seemed like, I think it matters actually, because then you can towards like zero shot placements or something like you know like a second at just inference time generate a layout if you did enough pre-training I think it does matter.

Thanks for watching the interview. If you got value from this conversation, please like drop a comment and subscribe to Founder Coho. We've got more founder insights and deep dive interviews coming your way, so don't miss them. See you in the next one.