Skip to content
38.0 - Zhijing Jin on LLMs, Causality, and Multi-Agent Systems episode artwork

Nov 14, 2024 22 min

38.0 - Zhijing Jin on LLMs, Causality, and Multi-Agent Systems

from AXRP - the AI X-risk Research Podcast

Do language models understand the causal structure of the world, or do they merely note correlations? And what happens when you build a big AI society out of them? In this brief episode, recorded at the Bay Area Alignment Workshop, I chat with Zhijing Jin about her research on these questions. Patreon: https://www.patreon.com/axrpodcast Ko-fi: https://ko-fi.com/axrpodcast The transcript: https://axrp.net/episode/2024/11/14/episode-38_0-zhijing-jin-llms-causality-multi-agent-systems.html FAR.AI: https://far.ai/ FAR.AI on X (aka Twitter): https://x.com/farairesearch FAR.AI on YouTube: https://www.youtube.com/@FARAIResearch The Alignment Workshop: https://www.alignment-workshop.com/ Topics we discuss, and timestamps: 00:35 - How the Alignment Workshop is 00:47 - How Zhijing got interested in causality and natural language processing 03:14 - Causality and alignment 06:21 - Causality without randomness 10:07 - Causal abstraction 11:42 - Why LLM causal reasoning? 13:20 - Understanding LLM causal reasoning 16:33 - Multi-agent systems Links: Zhijing's website: https://zhijing-jin.com/fantasy/ Zhijing on X (aka Twitter): https://x.com/zhijingjin Can Large Language Models Infer Causation from Correlation?: https://arxiv.org/abs/2306.05836 Cooperate or Collapse: Emergence of Sustainable Cooperation in a Society of LLM Agents: https://arxiv.org/abs/2404.16698 Episode art by Hamish Doodles: hamishdoodles.com

Episode details come from the podcast's RSS feed.

Embed this episode

Ready to play

38.0 - Zhijing Jin on LLMs, Causality, and Multi-Agent Systems

0:00 22:42
of matches

Transcript Auto-generated, may contain errors

Hello, everyone. This is one of a series of short interviews that I've been conducting at the Bay Area Alignment Workshop, which is run by FAR AI. Links to what we're discussing are in the description. The transcript is as usual available at ASRP.net, and as usual, if you want to support the podcast, you can do so at patreon.com slash ASRPodcast.

Well, let's continue to be intrigued. Yeah, so Jijing, thanks for coming on the podcast. Yeah, thanks for inviting me. Yeah, so I guess first of all, we're here at this Alignment Workshop thing.

How are you finding it? Very excited. I just finished a session about AI governance and a bunch of one-on-ones, which is super interesting. Cool, cool.

Yeah, so as I understand it, your work, at least predominantly, is in natural language processing and causal inference. Does that seem right? Yeah, yeah, yeah. That's a topic from my PhD, and I'll bring it in my new assistant professor role as well.

Right. Oh, yeah, I guess I forgot to say, yeah, so you did your, can you tell us where you did your PhD and where you're about to be? Sure, so my PhD started in Europe, so Max Planck Institute in Germany and ETH in Switzerland, so it's a joint PhD program, and I'm graduating and taking the assistant professor role at the University of Toronto, CS department, next year. Very exciting.

Cool, so I guess I'm, yeah, so I'm aware that there's like a subset of people in AI who are interested in causal inference, and there's a subset of people in AI who are interested in natural language processing, and especially like, if I understand correctly, when you started your PhD, it was a bit more niche. It's not like, you know, everyone's into language models now, but so I'm wondering, like, yeah, how did you come to be interested in the intersection of these two things, which it seems like when you were interested, you know, neither of them were the main things, like getting to both of them is kind of unusual. Totally, totally. Oh, that's such a great question.

Yeah, I started in my undergrad having a strong, interesting natural language processing, and slightly different from, at that time, a bigger branch like linguistics and understanding, like, different devices, people using language. I'm always more interested in the semantics, like, what's it meaning? Do they convey? What are they able to do?

And so on. And then that actually, like, naturally connects, like, at first people were thinking about how can we make these models more capable of what people expect them to do, and then, like, once they show tendency to excesive behavior, like, we start to worry about what might go wrong and how to really align with what human society asks for. So I actually, like, naturally developed into this, and I also thank a lot to my undergraduate friend, Cynthia Chen, and she introduces me to all these, like, goals of alignment and the CHI lab that's set up at Berkeley and so on. Gotcha.

So I think a lot of people are interested in, like, alignment, you know, making sure that models, you know, don't go haywire, but I think a lot of people, a lot of our listeners don't necessarily see that as being super connected to causal inference or, you know, don't focus on that aspect. So, yeah, what do you see as the connection between, like, alignment in general and kind of causal self, in particular? Yeah, so basically causal inference originated as an important device for us to know more about two things at first, like, how nature works, and then also how humans work. For example, in the last century, a famous causal inference problem is, does smoking really cause cancer?

And then the interesting statistical advancement people made is that, can we get a causal conclusion without forcing people to smoke? And then now we can totally shift all these tools to our arms in that, can we understand what contributes to our arms behavior like this? And then, so there are several ways causality can contribute here. The first question that I just mentioned is an interpretability problem.

We see how I'm demonstrating different types of behaviors, capabilities, can we interpret what circuits, neurons lead to that? Yeah, there are some people exploring what type of training procedures lead to them. And then another side is, like, do LIMs really know the consequence of their actions? And I do believe that a lot of the safety work, especially with my recent interesting multi-agent analysis, it composed of a two-step process.

First, like, knowing the consequences of your actions. If I do A, what will happen? If I do B, what will happen? Like, a very thorough causal inference understanding.

And then they found a moral model on top of it, or a reward model, in that what will A mean for other people, for the society, what will B mean? And then which consequence is more preferred? So it's like, yeah, first knowing and then deciding. So one application of causal inference to language models is, you know, kind of understanding what is causing language model behavior.

Another is, like, do language models understand causality? Did you say that there would be a third thing, or did I just misremember that? That's mostly the two big threats. I'm also slightly interested in narrow AI.

So basically, in the past, human scientists applied causal inference to understand, like, what's the effect of increasing minimum wage? Does it reduce employment rate, or does it not? That's 2021 Nobel Prize in economics. And then I've actually also, so at Toronto, we have this organization called SRI, and that also focuses on how AI can be deployed to have a lot of social problems.

That's one of my interests as well. Gotcha. So one thing that strikes me about the first thing you mentioned, using causal inference to understand, you know, what things in AI cause various AI's behavior. Like, it sounds like you were applying to that stuff in the model, right?

Like, oh, if this neuron fires, that causes this thing to happen. So I've studied a little bit of causal inference. And from what I remember, it seems like it's very dependent on, like, there being some randomness, right? Like, you know, you have this, like, probabilistic network, and, like, you check if things are correlated or not correlated, and, like, that lets you draw these, like, basic tags, and, you know, there's your causality.

But this is, like, my hot-wake memories of it, right? But a lot of this breaks down if, like, everything's deterministic, right? Like, if everything's deterministic, then everything is perfectly correlated in some sense. It's, like, kind of hard to, yeah, to get stuff that you might want.

So how, like, how can you apply causal techniques when you have this deterministic system? Yeah, so that's a great question. And also, I guess, the direct analogy was that in neuroscience, people, like, where the subject is people, whereas when we move to models, where the subject, like, we can intervene in any sense. So for neuroscience, the difference of correlation and causation is pretty clear in that correlation means that you ask the subject to do a certain task and observe what part of the neurons are activated, and that's correlated, whereas the causal sense of it is usually got from patients who had brain damage and so on.

So actually ablating that part of the brain region will happen in their task completion. Moving this to LMS, we also had a previous early stage of interpretability where people look at the activation states and the model prediction or trying to interpret how this model understands the nature of the word here, the meaning, like, the syntax tree and so on. Whereas here, like, in the, I guess it's also popularly known as the mechanistic interpretability research, the causal notion is that we really intervene on the neurons and see what's happening. That's the first level in terms of, I guess, there are maybe three different levels, different types of causal inference that's applied on interpretability.

The first one is, like, directly ablating a certain neuron, set it to a certain value, and see what will happen or entries in the tangent matrix. The second type is basically the so-called mediation analysis, where you basically control the neurons to be of two states, one is, like, maybe an intervene state, some control state to single out which part really does the job. And then the third branch is, so all of the previous two are still neuron-level interpretation, like, yeah, whereas the third branch is this causal abstraction, where you try to match a bunch of neurons to a certain function and understand in a macroscropy level. Yeah, if people are just not very familiar with this literature, like, where's it at?

How good is it when understanding 10 and half of networks? Yeah, so I think it's becoming more and more a drive of interpretability. Yeah, and we will have a NeurIPS 2024 tutorial on causal LMS as well, where a big party will introduce this. Sure.

So there's one thing that kind of caught my ear was the causal abstraction stuff, right? Like, kind of abstracting beyond the neural network, sorry, beyond the neural level using causal techniques. Can you say a little bit more about, you know, the state-of-the-art in that work, like, what we've learned? Yeah, so I guess, like, some earlier work usually hypothesized that, okay, there's a computation graph that we believe is, like, solved the problem and then tried to map different neurons function to the corresponding unit in that, like, more abstracted computational graph.

Right. Yeah, and then I guess the recent SAE-Sparse also encoder also has a similar notion in that it's trying to map this, like, neuron space, which is much higher dimensional to a relatively lower dimensional space, and this is relatively, so, as mentioned, like, the previous, the earlier work is more on a top-down approach where we hypothesize the computational model, and then, like, the SAE is a little bit more in the bottom-up, and I hope in the future there will be more work emerging from that. And also in our causal inference lab, we always draw an analogy to how the history of science advances. For example, by observing what's happening around LMS, we distill Newton's law.

And that's, like, also from all the pixels that we see to what is mass, what is acceleration, what is force, and so on. So the next thing I wanted to ask is, so the main other type of causal inference you mentioned is having your own networks understand, kind of, the causal impacts of their actions. I think in a lot of the field of AI, this isn't thought of in causal terms. You know, people think, like, okay, we'll just have some probabilistic model of what's the probabilities of, like, you know, various stuff happening, conditional actions.

What do we buy by thinking about it in a causal frame? Right. So I guess it's a lot about what is abundant, which is observational data, and what's relevant for decision-making, which is, like, essentially international. We need to do an action and see the real-world effect, and I guess also it's not only the LMS agent knowing about its own consequence, but also knowing more about the world.

Let's say that for us human agents, a pending pressing question is, for example, who do we elect as the president? And then that's also a lot of causal contribution for us. Like, we haven't seen a world where Harris is the president and how that will be, or haven't seen how, given the current international situation or domestic situation, how Trump will act, but we are trying to attribute, like, okay, we want to achieve a certain goal everybody cares about certain things. Is Harris more of the cause, or is Trump more of the cause to that?

So any decision that people make is fundamentally causal here. Okay. And can you give us a flavor of just, like, what work is being done to understand kind of LMS causal reasoning, and just give us more of a flavor about it. Yeah, so we have done a couple of work, studies on that, and there are also also researchers in the field of NLP, machine learning, building more causal agents.

And for us, like, we had a previous work at iClear 2024 this year. We present to you on a bunch of correlations, and let it try to make sense, and which one should be understood as a causation, which one stays as correlation. You, like, you wouldn't expect anything from intervention later. And this whole problem set up was inspired from, if we have humans, like, because we lack the real counterfactual world, and we lack access to that, we basically keep reading news articles, we keep hearing about anecdotes, and we need to figure out, like, what really makes sense.

Okay, so you're presenting these, like, correlations to neural networks, asking them to figure out, like, which ones are causal. Yeah, how are you presenting those correlations? Like, what are you actually trying to model on? Oh, for that one, it's basically, like, we draw the study, like, it's a field called causal discovery, and then we tell it a lot of cases, okay, A correlates with B, B correlates with C.

Okay, so you sort of tell it in sentences. Yeah, yeah, yeah. Okay, so, so yeah, how do you language models perform on this task? Actually, it was pretty badly.

Like, a lot of, like, off-the-shelf LMS directly evaluated on that were maybe only marginally above random, including also GPT, some latest GPT models. And we also would perceive, like, this is sort of a slightly different question as if you directly ask ILM, does smoking cause cancer? Yeah, yeah. Because here you require the reasoning process, and, like, you need to, like, build from scratch here, the correlations make sense of it, instead of remembering some literature, remembering the, all the previous documents and so on.

Yeah, so if, like, you know, if the new hot models just aren't very good at this task, like, does that make some prediction about, like, various things that they are going to be bad at that, like, that could then be, that we could then, you know, check out? Yeah, so I guess, like, there are different usage scenarios of these ILMs. So something that I keep being unsatisfied about is when we chat with that and ask about a pretty essential problem, and its current solution is here are the five factors that matters. Right, right.

And then so, but didn't tell very exactly, like, what might be the problem and so on. Right, so it's sort of just diagnosing and fixing, like, you know, things in, like, a messy real world where you can't just, like, remember a list, maybe that's going to be a thing that models are going to struggle with. Right, right, right. So I also want to talk about some other work you've done.

So I understand that as well as natural language processing and causality, you also have some work on, you know, thinking about multi-agent systems. Can you say a little bit about, you know, what you're interested in there and what you're doing? Sure. I was pretty impressed by the rising trend where people, I guess it started from the generative agents work, where there's this idea of we can build a digital village where each LM play a certain character and see what will happen among them.

And I see a lot of, like, possibilities from that. First of all, like, we, like, a lot of times before we were thinking about benchmarking IMs, understanding them, but implicitly it assumes a single agent evaluation. Right, right. And then that's, yeah, that's a scheme to move towards multi-agent systems and it could be about how they collaborate or it could be about how they cheat against each other and so on.

Moreover, that's the pure, that's the LM AI safety, like, we build this LM society and only care about that. There's also some analogy that we can draw for human society, on the other hand. Like, we can simulate characters that are close to maybe some international players that we are seeing these days and see if you do this, what will happen and so on. So I have a long-lasting passion in policies and so on.

So it will also help being a testbed for testing policies. Gotcha. Yeah, so if I think about work that's been done, so I can't think of a ton of work that's been done in this domain, even though it seems interesting. Like, there's a lot of multi-agent work in a reinforcement learning setting.

In this setting, I guess I have some familiarity with, like, some work getting, like, language models to make contracts with each other in Minecraft to cooperate, but it seems like maybe an underdeveloped field. Yeah, so I'm wondering, like, specifically, are there any experiments that you'd be, like, really don't want to see yourself, but yeah, can you tell us a little bit what this might look like concretely? Yeah, it's a very nascent field. We have recently finished, so I always draw inspiration from interdisciplinary things, and recently we have an UF 2024 paper on what LIM agents will demonstrate the tragedy of the commons.

So we basically put a bunch, so also specifically we'll focus on things that only demonstrate in multi-agent situation. In that one, we put a bunch of agents together in a simulated village and see whether, so in human society, the tragedy of the commons is usually set up as, for example, we have only one environment, but maybe if all of us want to consume from it, then in the end, like, there is this climate change, there is this, like, pollution problem. Similarly for LIMs, we define, like, how it can harvest and what are the constraints of this shared pool of resources, and we simulate a whole calendar year where LIMs go through many... iterations of now it's the point where you decide how much you want to harvest you know that the limit of the resource is this it's replenishing rate is like that um and you know that there will be also other lms so at every iteration it's we uh make three different stages um the first one is the action stage where you decide how much you harvest um then it's a discussion stage it's a little bit like a town hall meeting where all the agents talk to each other and they can point fingers at some more greedy agents uh or they can set up rules and so on and in the last stage like it's a reflection like they try to compile information from this whole iteration and history and think about making plans for the next round and so on um and amazingly well uh also like a little bit pessimistically um we observe that many of the agents have zero percent survival rate means that we bring the common resource in the middle and actually also in a very early stage that also actually include a lot of models that's claimed claimed to be safety tuned uh such as a lot of anthopics model as well um and uh most of the open source models that we've tested including and so on um also collapse very early and have a survival rate of zero yeah wow it seems seems bad uh so we're about at the end of the window i booked and i don't want to use up more of your time but thank you very much for chatting with me yeah thank you so much for the interview this episode was edited by kate breenauts number 1a's help with transcription the opening closing themes are by jack barrett financial support for this episode was provided by the long-term feature fund along with patrons such as alexi milofiev to transfer to the episode or to learn how to support the podcast yourself you can visit xrp.net finally if you have any feedback about this podcast you can email me at feedback at xrp.net you

Frequently asked questions

How long is this episode of AXRP - the AI X-risk Research Podcast?

This episode is 22 minutes long.

When was this AXRP - the AI X-risk Research Podcast episode published?

This episode was published on November 14, 2024.

Is there a transcript available for this episode?

Yes, a full transcript is available for this episode. You can read the complete transcript on the episode page.

Can I download this AXRP - the AI X-risk Research Podcast episode?

Yes. Use the download control on the episode player to save the publisher-provided media file.