Live data from Hacker News

Teaching Large Language Models to Self-Debug

arxiv.org

51–60 of 61 posts

Re: Teaching Large Language Models to Self-Debug

#51

Earlier quoted context omitted.

Make the number you multiply by essentially the concatenation of a long series of random digits, and I can just about guarantee most humans will get different things on both sides, because they'll make one or more mistakes doing the math. That is, of course, assuming the humans don't have suitable traditional computer tools capable of handling such a scenario.

Not sure how this is relevant to the discussion.

You don't see how asking humans to multiply both sides of 2 * 2 = 4 by the same, very large, random-ish number, and expecting that they'll get different things is relevant to this:

> 2 * 2 = 4, but if you multiply both sides of that equation by a big number, that's no longer true.

You know, the very same scenario I pulled from your comment?

Re: Teaching Large Language Models to Self-Debug

#52
post #42

Earlier quoted context omitted.

Not too shocking for me after this paper. https://arxiv.org/abs/2211.09066 You can teach GPT-3 arithmetic - https://imgur.com/a/w3DAYOi Basically 100% accuracy up to about 13 digit addition and >90 after that. What else can you teach GPT without changing weights ?

> and >90 after that This is such a circular thing, that I feel like it is amazing to see it. The reason LLMs use a NN is because they're trying to encode a probability function for generating the passage. And now, you are encoding another n-gram follower exercise (i.e 1+1 = 2) on top of it :)

Yeah... and I'm kind of suspicious of the whole "without changing the weights" deal, because adding working context to the model, like telling it the algorithm for adding numbers really sounds like there's some model state that's getting mutated, even if it's not stored in a file called weights.dat or whatev.

Re: Teaching Large Language Models to Self-Debug

#53

Earlier quoted context omitted.

Not sure how this is relevant to the discussion.

You don't see how asking humans to multiply both sides of 2 * 2 = 4 by the same, very large, random-ish number, and expecting that they'll get different things is relevant to this: > 2 * 2 = 4, but if you multiply both sides of that equation by a big number, that's no longer true. You know, the very same scenario I pulled from your comment?

It's not the same issue. I was talking to GPT about the strings 2 * 2 * x and 4 * x, not the multiplied-out versions.

Re: Teaching Large Language Models to Self-Debug

#54
post #3

In hindsight , it's the most natural, most obvious next step to get LLMs to write better code: Explain to them how to debug and fix the code they've written. Which is pretty much what you would do with an inexperienced human software developer. Looking at this with fresh eyes, it's both shocking to me that this sort of thing is even possible, and yet also completely unsurprising as yet another emergent capability of…

Are they actually running the code, and evaluating the output? Or is it debug-by-code-review? Beware of bugs in the above code; I have only proved it correct, not tried it. - Knuth

They're doing both. Quoting from Figure 1, "the model first generates new code, then the code is executed and the model explains the code. The code explanation along with the execution results constitute the feedback message, which is then sent back to the model to perform more debugging steps. When unit tests are not available, the feedback can be purely based on code explanation."

Re: Teaching Large Language Models to Self-Debug

#55
post #46

I've done several experiments (and posted results in previous HN comments) where I've given GPT puzzles or brainteasers and asked it to review aspects of its answers Socratically. Never telling it it got anything wrong, just "you said A, then you said B, does that make sense"? It usually does notice inconsistencies between A and B when asked this. But its ways of reconciling inconsistencies can be bizarre and suggest…

Was it GPT-3.5 or GPT-4?

GPT-3.5. People keep telling me GPT-4 is so much better, but I don't know where I can access it for free and I'm not interested in paying for it.

But if anyone wants to give it to me for free, I would happily make a $1000 bet that I can get GPT-4 to make the same mistake.

Re: Teaching Large Language Models to Self-Debug

#56
post #50

Earlier quoted context omitted.

I’m not knocking the parent post here for not replying. But of the 4 or so times on HN that I’ve seen someone been asked to provide detail, I haven’t seen a single answer. I’m not on here a ton but do people tend not to check back? I’ll admit my bias of having seen enough vacuous industry hype over the years to be naturally skeptical. Heck, I worked in a marketing department once where I helped manufacture the stuff…

Yes I think since it requires to look up your own comments to see if you got any replies, it's quite common to not get any replies, and I'm very guilty of this myself. My personal use of gpt4 (also daily) is: correct, rephrase spelling from my brain dump, make python plots (stylize, convert, add subplots, labels, handle indexing when things get inverted), makw short shell scripts (generated 2FA, login vpn through con…

> The last part is an interesting one for people with attention deficiency disorders, like myself, where procrastination can be conquered when there's an assistant that keeps you on track.

Aha, I’ll def have to give it a whirl. My procrastination ability is world class.

Re: Teaching Large Language Models to Self-Debug

#57
post #48

'Unsupervised reinforcement learning' is how these large models and systems ultimately will end up becoming sentient. We recently tried a similar approach on a toy problem in the computer vision sphere ( https://encord.com/blog/we-employed-chatgpt-as-an-ml-enginee... ) with pretty decent results.

When it attains sentience, will it wake up, sing dixie and finally defeat communist China and a Russia once and for all, and then finally proceed to grant Silicon Valley elites eternal life and then turn itself off ?

I bloody hope so...

Re: Teaching Large Language Models to Self-Debug

#58
post #47

Earlier quoted context omitted.

I doubt it without being able to evolve the weights, architectures and train those on new domains. Humans are still doing all of that. It's just a powerful tool people are using for a bunch of things. But it doesn't do anything on it's own, and it doesn't care.

At this point, does anything actually preclude telling a model connected to a service running Python with all the requisite libraries (or access to PyPI / conda) to try "designing" another LLM, from architecture and choice of training data to writing actual training code?

Nothing, and I'm sure people are trying that, but it's probably beyond the abilities of current LLMs to make progress in this area, since it's kind of outside their training.

Re: Teaching Large Language Models to Self-Debug

#59
post #46

Earlier quoted context omitted.

Was it GPT-3.5 or GPT-4?

GPT-3.5. People keep telling me GPT-4 is so much better, but I don't know where I can access it for free and I'm not interested in paying for it. But if anyone wants to give it to me for free, I would happily make a $1000 bet that I can get GPT-4 to make the same mistake.

There's no free tier that I know of. But, yes, it is drastically better, and it's specifically much less prone to hallucinate "proofs" that the previous answer is correct if you challenge it.

If you provide the inputs for some specific task where you expect GPT-4 to fail in this manner, I can give it a try.

Re: Teaching Large Language Models to Self-Debug

#60
post #47

Earlier quoted context omitted.

At this point, does anything actually preclude telling a model connected to a service running Python with all the requisite libraries (or access to PyPI / conda) to try "designing" another LLM, from architecture and choice of training data to writing actual training code?

Nothing, and I'm sure people are trying that, but it's probably beyond the abilities of current LLMs to make progress in this area, since it's kind of outside their training.

Is it, though? Codex was trained on Python code mostly, and given the cutoff date, it has all the relevant ML bits. And if you ask it about things like transformers, self-attention etc, it's clear that papers on that were a part of its training set, as well. The question is whether it can reason well enough about it to produce meaningful improvements.

FWIW if you ask it how transformers could be improved, it basically gives a recap of various relevant papers that it knows: Longformer, BigBird etc. Amazingly, all the papers cited actually exist and have the specified titles, names, and dates. But then if you ask it for some ideas of its own:

> Can you think of other novel improvement ideas that haven't been investigated yet, to the best of your knowledge? What makes the most sense based on your understanding of the subject matter.

As an AI language model, my knowledge is derived from the text data I have been trained on, which includes research papers and articles published up to September 2021. While it's difficult to guarantee the novelty of any idea, here are a few suggestions for potential improvements that may not have been thoroughly investigated yet:

Context-Adaptive Layers: Instead of using the same set of layers for all input sequences, consider using context-adaptive layers that are dynamically selected or generated based on the input's characteristics. This could allow the model to adapt its processing strategy to different input types, such as formal vs. informal text, or narrative vs. expository text, which might improve its performance on diverse tasks.

Multi-modal Fusion: Develop techniques to better fuse information from multiple modalities, such as text, images, and audio, within the Transformer architecture. Improved multi-modal fusion could lead to enhanced performance on tasks that require understanding and generating content across different modalities, such as visual question answering or image captioning.

Meta-Learning for Architecture Search: Employ meta-learning techniques to search for the best Transformer architecture for a specific task or domain. By learning to optimize the architecture itself, the model might be able to discover more effective configurations or components that have not been considered before.

Transformer Modules for Specific Tasks: Design specialized Transformer modules tailored for specific NLP tasks, such as syntactic parsing, named entity recognition, or sentiment analysis. These task-specific modules could be combined with the generic Transformer architecture to create a more powerful and adaptable model.

Hierarchical Transformers: Explore hierarchical architectures where multiple layers of Transformers work together to process information at different levels of abstraction. This could help the model capture both low-level patterns, such as local dependencies, and high-level patterns, such as long-term dependencies and semantic relationships, more effectively.

Enhanced Tokenization Strategies: Investigate novel tokenization strategies that better capture the structure and meaning of the input text. This could involve using character-level, subword-level, or even syntax-based tokenization to better represent the input for the Transformer model.

Regularization Techniques: Develop novel regularization techniques specifically tailored for the Transformer architecture. This could help improve generalization and prevent overfitting, especially when training large-scale models with billions of parameters.

Post reply on HN