this post was submitted on 24 Aug 2024
37 points (63.9% liked)

Technology

59377 readers
5196 users here now

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related content.
  3. Be excellent to each another!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, to ask if your bot can be added please contact us.
  9. Check for duplicates before posting, duplicates may be removed

Approved Bots


founded 1 year ago
MODERATORS
 

“An intriguing open question is whether the LLM is actually using its internal model of reality to reason about that reality as it solves the robot navigation problem,” says Rinard. “While our results are consistent with the LLM using the model in this way, our experiments are not designed to answer this next question.”

The paper, "Emergent Representations of Program Semantics in Language Models Trained on Programs" can be found here.

Abstract

We present evidence that language models (LMs) of code can learn to represent the formal semantics of programs, despite being trained only to perform next-token prediction. Specifically, we train a Transformer model on a synthetic corpus of programs written in a domain-specific language for navigating 2D grid world environments. Each program in the corpus is preceded by a (partial) specification in the form of several input-output grid world states. Despite providing no further inductive biases, we find that a probing classifier is able to extract increasingly accurate representations of the unobserved, intermediate grid world states from the LM hidden states over the course of training, suggesting the LM acquires an emergent ability to interpret programs in the formal sense. We also develop a novel interventional baseline that enables us to disambiguate what is represented by the LM as opposed to learned by the probe. We anticipate that this technique may be generally applicable to a broad range of semantic probing experiments. In summary, this paper does not propose any new techniques for training LMs of code, but develops an experimental framework for and provides insights into the acquisition and representation of formal semantics in statistical models of code.

you are viewing a single comment's thread
view the rest of the comments
[–] wizardbeard@lemmy.dbzer0.com 79 points 2 months ago (1 children)

Wow, that headline is significantly overstated. This has nothing to do with "understanding" or "reality". Like holy shit this is an absurd leap from what they actually state in the abstract. Thanks OP for including it in the "preview" here.

Given a number of "starting states" and "ending states" of 2D grid based "environments", an LLM is able to return increasing accurate "between states" as it is trained.

Neat! Not an understanding of reality. At the biggest stretch it is an "understanding" of an incredibly constrained problem space.

[–] Hackworth@lemmy.world 11 points 2 months ago (1 children)

I did some source digging to hopefully best address your observations. Science journalism (even when internal and likely done in concert with the authors) is fundamentally a game of telephone. But looking at the source papers:

They say it in an incredibly formal way, but they do seem to come to the conclusion that the LLM develops understanding. The paper makes that case within an incredibly narrow context, but it does include:

We anticipate that this technique may be generally applicable to a broad range of semantic probing experiments. We argue that the observed semantic content cannot be fully attributed to a retrieval-like process, and instead requires the LM to perform some degree of generalization over the semantics. More broadly, we see programs and their precise formal semantics as a promising direction for working toward a deeper understanding of the behavior of LMs, such as whether or how LMs acquire and use semantic representations of the underlying domain more generally.

With it now clear that the generalized case is not shown: the specific type of understanding that they have shown is non-trivial.

Conclusion: This paper presents empirical evidence that LMs of code can acquire the formal semantics of programs from next token prediction.

A foundational topic in the theory of programming languages, formal semantics (Winskel, 1993) is the study of how to formally specify the meaning of programs.

From Winskel: The Formal Semantics of Programming Languages provides the basic mathematical techniques necessary for those who are beginning a study of the semantics and logics of programming languages. These techniques will allow students to invent, formalize, and justify rules with which to reason about a variety of programming languages.

Also notable but unrelated: Jin and Rinard’s paper was supported, in part, by grants from the U.S. Defense Advanced Research Projects Agency (DARPA).

[–] MagicShel@programming.dev 15 points 2 months ago (2 children)

I mostly get what you're saying, though I don't have the requisite understanding to follow formal proofs, but if there is one thing I do know for certain, it's that "understanding" is anthropomorphizing and shorthand for something that is very much not understanding in a human context at all.

I get that it can be hard to find the right words to explain a some of these emergent phenomena, but I think it's misleading to use words that make AI appear to have a thought process akin to anything we could understand as such—at least in settings where folks might not understand the shorthand as such.

And maybe everyone here is aware of that, but it makes me uneasy, hence this comment to hopefully make that point.

[–] Hackworth@lemmy.world 7 points 2 months ago* (last edited 2 months ago)

The paper is kind of saying that as well. I added a quote to the post to help set the context a bit more. As I understand it, they've shown that an LLM contains a model of its "world" (training data) and that this model becomes a more meaningful map of that "world" the longer the model is trained. Notably, they haven't shown that this model is actively employed when the LLM is generating text (robot commands in this case), only that it exists within the neural network and can be probed. And to be clear - its world is so dissimilar from ours, the form its understanding takes is likely to seem alien.

[–] technocrit@lemmy.dbzer0.com 2 points 2 months ago* (last edited 2 months ago) (1 children)

These techniques will allow students

As someone who understands formal proofs, it's completely misleading to conflate formalism with sketchy pedagogical theories (wtf).

Yes, terminology like "understands" is a choice outside of formalism that's intentionally misleading for the sake of marketing/funding.

[–] Hackworth@lemmy.world 1 points 2 months ago

Genuine question: What evidence would make it seem likely to you that an AI "understands"? These papers are coming at an unyielding rate, so these conversations (regardless of the specifics) will continue. Do you have a test or threshold in mind?