Live data from Hacker News

Language models as compilers: Simulating pseudocode execution

arxiv.org

21–30 of 57 posts

Re: Language models as compilers: Simulating pseudocode execution

#21
post #5

Any sufficiently advanced LLM is indistinguishable from Prolog. I half-jest but I envision the direction of LLM research to head towards a parser-oriented setup where LLMs merely extract the entities and relations and the actual logic is done by a logical engine such as Prolog.

[deleted]

Re: Language models as compilers: Simulating pseudocode execution

#22
post #9
post #5

Any sufficiently advanced LLM is indistinguishable from Prolog. I half-jest but I envision the direction of LLM research to head towards a parser-oriented setup where LLMs merely extract the entities and relations and the actual logic is done by a logical engine such as Prolog.

I envision a thread of research in the exact opposite direction. Take a logic program/theorem/database query/... and use a LLM to guide a search for a solution/proof/query plan/...

I wonder if the problem that LLMs solved was not the lack of "intelligence" of logic driven systems but the lack of a particular intelligence that is so crucial for is to make effective use of the interaction with such tools, namely the ability to actually understand our natural language.

That feature by itself is not enough, but can be a very effective glue to be used with other components of an intelligent system. The analogy with the human brain would be the broca area vs. the rest of the brain.

Now, there are open questions about whether the _architecture_ that underpins the LLMs is also good enough to be used as a substrate for other functions and what's the most effective way for having these different components of the system communicate between each other.

The analogy with the human brain can guide us (as well as lead us astray), in that our brain, like biological systems often do, re-purposes the basic building blocks to create different subsystems.

It's not clear to me at which level we'll find the most effective re-purposable building blocks.

It's easy to try (and people do) to use the top-level LLM system as such a building block and have it produce plans, connect it to external systems that feed information back and have it iterate again on it (ab)using it's language processing as an API with the environment.

The human analogy of that is when we use external tools to extend our cognitive capacity, like when we do arithmetic using pencil and paper or when we scribble some notes to help us think.

I think this level is useful and real but I wonder if we also need to give more power to some lower levels too.

Granted, some of that "power" can already be emerging during the training of the LLMs but I wonder if some more specialized blocks might enhance the effectiveness

Re: Language models as compilers: Simulating pseudocode execution

#24
post #5

Any sufficiently advanced LLM is indistinguishable from Prolog. I half-jest but I envision the direction of LLM research to head towards a parser-oriented setup where LLMs merely extract the entities and relations and the actual logic is done by a logical engine such as Prolog.

[deleted]

Re: Language models as compilers: Simulating pseudocode execution

#25
post #10

If you train a LLM to compile, you probably also want to set the randomness to zero, if that is the case you’ve just “brute forced” an actual compiler

you don't want a creative compiler?

In this specific use case I think we should avoid any creative aspect in the behavior of the LLM. Compiling might look like a "word-for-word" translation in a certain manner. Isn't it ?

Re: Language models as compilers: Simulating pseudocode execution

#26
post #18
post #5

Any sufficiently advanced LLM is indistinguishable from Prolog. I half-jest but I envision the direction of LLM research to head towards a parser-oriented setup where LLMs merely extract the entities and relations and the actual logic is done by a logical engine such as Prolog.

https://en.wikipedia.org/wiki/Cyc#MathCraft Quote: One Cyc application aims to help students doing math at a 6th grade level, helping them much more deeply understand that subject matter... Unlike almost all other educational software, where the computer plays the role of the teacher, this application of Cyc, called MathCraft, has Cyc play the role of a fellow student who is always slightly more confused than you, th…

> I suspect it is still hard for LLMs

I just gave it to Claude: https://imgur.com/a/fQQOy1d

Re: Language models as compilers: Simulating pseudocode execution

#27
post #26
post #18

Earlier quoted context omitted.

https://en.wikipedia.org/wiki/Cyc#MathCraft Quote: One Cyc application aims to help students doing math at a 6th grade level, helping them much more deeply understand that subject matter... Unlike almost all other educational software, where the computer plays the role of the teacher, this application of Cyc, called MathCraft, has Cyc play the role of a fellow student who is always slightly more confused than you, th…

> I suspect it is still hard for LLMs I just gave it to Claude: https://imgur.com/a/fQQOy1d

1) This is ridiculously cool

2) The "action" text gives me such I put on my wizard hat vibes

Re: Language models as compilers: Simulating pseudocode execution

#28
post #5

Any sufficiently advanced LLM is indistinguishable from Prolog. I half-jest but I envision the direction of LLM research to head towards a parser-oriented setup where LLMs merely extract the entities and relations and the actual logic is done by a logical engine such as Prolog.

It also has further reaching consequences.

It creates foundation for reinforcement learning without human feedback - a missing piece of puzzle.

Simplifying: propose plausible theorem, try to find provable solution, reinforce reasoning/solution path, move proved statement into axioms, repeat.

(super)intelligence has many dimentions. One of less explored ones is exploiting concurrency in thought chains. It's something very un-natural to us, but there is a lot of gain if you're able to branch and collect feedback from dead ends and progress from different directions being taken at the same time.

Re: Language models as compilers: Simulating pseudocode execution

#29
post #5

Any sufficiently advanced LLM is indistinguishable from Prolog. I half-jest but I envision the direction of LLM research to head towards a parser-oriented setup where LLMs merely extract the entities and relations and the actual logic is done by a logical engine such as Prolog.

I was thinking of if AI systems could be composed of multiple internal agents that when prompted are supposed to discuss internally and agree on what to reply in the end. Some of the agents could be LLMs but others could be logic engines or database frontends for instance.

Re: Language models as compilers: Simulating pseudocode execution

#30

Non deterministic compilers, yay! Where do I sign up? In more seriousness, miscompilations or in general unexpected behavior caused by layers below you are expensive to find and fix. I think LLMs have a long way to go before such use cases seem appealing to me.

Even regular compilers need quite a bit of nudging to give deterministic results.
Post reply on HN