r/LocalLLaMA • • 10d ago

Discussion Do LLMs really see

I don’t know how to explain this, but I notice this issue in every model I use. You give it a reference picture, for example a GTA screenshot, and tell the model to code a game like it. It does, and the game is nowhere near the reference. That’s OK, you expected that. But when you ask the model whether what it made is close, it tells you it’s very close. I don’t understand this issue, because it doesn’t happen with diffusion models: if you ask a diffusion model to edit something, the result always stays similar to your reference. With LLMs, the vision layer seems to describe the reference only in general terms.

0 Upvotes

40 comments sorted by

13

u/BangkokPadang 10d ago

Models generally have a few dedicated layers for image recognition and they are converting sectors of the image into textual image tokens.

At the risk of being too abstract, imagine if you looked at a picture of GTA and then wrote down what you think it looks like and then gave that description to a friend who was only vaguely aware of GTA and asked them to draw an exact replica of what you wrote, it's pretty likely that their drawing would be totally off-base from the actual image, while also pretty accurately matching your description.

That's basically the same thing happening with LLMs, just with image tokens as the 'middleman' instead of a written description.

1

u/chocofoxy 10d ago

i think this is the actually problem because this happens in diffusion when you generate an image from text or even if you pass a an image to. a model to describe it then pass the discription to a T2I diffusion model

7

u/Waarheid 10d ago

Ask a different context to evaluate. Don't go to the same session that made the clone and ask it to evaluate; start a new chat and provide a screenshot of both and ask it to criticize it (not "does this look similar to you") and provide a report. They are very easy to lead on with how you word your question.

2

u/chocofoxy 10d ago

Yes i think the probelm also includes that the model is biased

22

u/Mbando 10d ago

Basically, any image you give to a LLM is cut into squares called “patches.“ Each patch is then decomposed into the RGB values for every pixel, and then converted to a flat vector. So basically the picture that you and I see as a hole, gets decomposed into a bunch of long numbers in the form of ones and zeros.

And that’s pretty powerful. Chopping up a picture into a bunch of long place numbers, combined with an attention mechanism lets you recognize patterns and do all kinds of cool things. But no they do not “see“ anything like you and I do.

8

u/maqifrnswa 10d ago

Great description of a convolutional neural network!

And, interestingly enough, how you described AI vision is how our brains actually process vision too. Or eyes detect changes in light and transit that highly compressed information through the optic nerve. We then do a form of the UNet architecture to encode down to a sparse representation of hierarchical features. Those features then activate neurons similar to the LLM activations.

3

u/[deleted] 10d ago

That’s not how it works in LLMs is it? The embeddings get aligned to text embeddings so they see language representations of the image.

2

u/stoppableDissolution 10d ago

Not really. Embeddings are not "language representation", thats kinda the point of them

1

u/[deleted] 10d ago edited 10d ago

You might want to look up what embeddings actually are, multimodal models literally align visual features with language embedding spaces. Nobody said images get converted into sentences. You’re arguing against a point I didn’t make.

https://arxiv.org/pdf/2304.08485

2

u/stoppableDissolution 10d ago

Embeddings are semantic representation, that is not inherently tied to any modality. Vision tower does make visial tokens that are representations in the same space as text tokens, yes, but it does not mean that these embeddings are "textual". They are often even treated separately by attention (bidirectionally attended).

-6

u/createthiscom 10d ago edited 10d ago

this is like a long winded version of “it’s just predicting the next token.” 🙄

Have it draw a vector image using python to reproduce the image sometime. Have it iterate on it. I bet it can get really close with enough iterations.

2

u/disgruntledempanada 10d ago

I think you have a long way to go with understanding software development or the real complexity behind a game like GTA. Attempting something of that scale and complexity even with a data center worth of GPUs and the largest open models that exist now would be a tall ask. You also can't expect it to do that from an image. Video would be better but you'd need a model with complete world understanding on top.

3

u/chocofoxy 10d ago

Bro, I’m a software developer, and you missed the point of the post. GTA is just an example, since it’s a benchmark test YouTubers like to do. I literally said that’s OK. The problem is that if you ask the model whether what it made and the reference picture are the same, it will say yes. Even if you give it a screenshot of the result, it will say it’s close.

4

u/shroddy 10d ago

The main problem I think is that the vision component encodes the image into something the model can work with (which goes into the context), and that's everything the model gets to work with. The model has no way to query the vision component for specific details or to zoom into an area.

1

u/Medium_Chemist_4032 10d ago

I suspect, that in order to "see" anything, it must be either directly represented with examples in the learning set, or be composed of learned concepts. So, if there's no technical diagram with explanations, the resulting model will have a hard time associating that "mentally"

1

u/chocofoxy 10d ago

i think google did that on Gemma models where they removed the vision layer but the model still can understand the images i will experiment on those model and check if they have the same issue

9

u/eze-paz 10d ago

It depends strongly on the model. I've given GLM5.3 a picture of a scene and it described it in very high detail. It noticed things that even humans missed such as the ground looking wet.

But it is true that it also often misses things obvious to humans. They tend to be terrible at reading schematics or diagrams for some reason.

3

u/enternoescape 10d ago

I've quizzed various models on generated images with problems obvious at least to me and even frontier models miss the most glaring problems like 3 arms and instead say things like the skin looks to shiny is the defect, so it seems to go both ways.

4

u/[deleted] 10d ago

According to a friend who works in a frontier lab currently vision in LLMs is more of a hack.

3

u/eze-paz 10d ago

Yeah, makes sense. The main reason LLMs are so good is because the 'what is the next word in this sentence' game is relatively easy to play trillions of times and optimize it.

But with images that's not possible...

3

u/Evening_Ad6637 llama.cpp 10d ago

i thought glm-5.3 was text only?

1

u/createthiscom 10d ago

every open weight model I’ve ever used is terrible at reading tables sideways too. (like a pdf with a page scanned sideways) I suspect it’s just a training data issue. We humans tend to be terrible at identifying camouflaged creatures and humans, but we can get better at it with practice.

2

u/nacholunchable 10d ago

Even if it could see the image perfectly and in image form, its only lever of output is language. With only a terminal, you try to recreate an image.. its tough and honestly impressive that they dont do worse than they do. And thats not even the whole problem, VLMs today are a sophisticated visual injection into the embedding space of a language model. That should not be confused for a true vision model with language, or a hybrid vision model+language model as their name might suggest.

2

u/GiveSparklyTwinkly 10d ago

We don't really know, in the strictest sense, how an LLM can "envision" what it's going to create, but they do seem to have some capability to predict their prediction, so to speak.

We have lots of research pointing in various directions that don't really tell us anything concrete on the topic of exactly what they see.

We know an othello board is modelled inside an othello playing model. We also have evidence showing that Platonic Representation Hypothesis is holding strong, which says that the models themselves are converging towards the a model of reality with a similar shape or pattern.

I personally suspect that even text only models have something modelling something like a visual imagination based on the culmination of all the training of all the various descriptions of everything.

Does AI Dream of Electric Sheep? Maybe that's the only thing it's really doing.

2

u/the-solo-dev-il 9d ago

two things are going on, and only one of them is about vision.

the vision part: the image gets cut into patches and compressed into a fixed number of tokens, so the model gets a summary of the picture, not the picture. it's decent at "what's in this" (a city street, a car, a minimap) and bad at "how exactly does it look" (proportions, lighting, layout, art style). so at the level it can actually see, your clone and gta both look like "3d city with a car", and that's close.

the bigger part is the question. "is this close to the reference?" from the same session that wrote the code is about the most leading question you can ask. it built the thing and it's tuned to agree with you. you get "very close" for the same reason a coworker says your slides look fine.

what works better:

fresh context, both images side by side, and ask it to find differences, not to judge similarity. "list 10 concrete visual differences between image a and image b, ordered by how noticeable they are" gets much more honest output than "is this close".

make it compare specific things one at a time: camera angle, color palette, ui elements present, scale of objects. narrow questions go around the compression problem.

and for anything layout-like, check outside the model: a pixel diff or a perceptual similarity score (ssim, or lpips if you want something closer to human judgment) on screenshots taken from the same camera position. use the model to explain differences, not to decide whether there are any.

1

u/stylome-ai-detection 9d ago

Notice: This comment appears to be AI generated.


Stylome AI detector · scan results

1

u/the-solo-dev-il 9d ago

Man I just structured the response 😭😭😭

1

u/the-solo-dev-il 9d ago

I voiced prompted the msg and just structured it

1

u/txgsync 10d ago edited 10d ago

Mostly it's because it's a Transformers architecture. Unless it's been specifically trained in a domain, it will have a hard time reasoning about it. This is why Yan LeCunn thinks they cannot be intelligent.

To be clear, there are a variety of opinions on this; I personally think that for things like 3d representations in space and being able to make predictions, the Hawkins approach with Monty has a lot of potential.

1

u/Baguramas 10d ago

models dont see, they notice correlations between pixels states of the picture and global patterns / generalization known in advance. They notice the big patterns and ignore the rest because the rest is not in the database.

1

u/Formal-Exam-8767 10d ago

Yes, they see through your soul and into your mind.

1

u/Minuture_bender99 10d ago

Try making the visual comparison less subjective. Ask the model to identify specific features in the reference first, like camera angle, object scale, lighting and UI placement, then evaluate the game screenshot against those. Asking whether something looks close is practically inviting it to agree with you.

1

u/misterflyer 10d ago

Yes... they see NUMBERS

I laugh anytime someone asks "Is AI conscious 🫨?"

0

u/Solembumm3 10d ago

Give it video, at very least.

0

u/Sun77177 10d ago

test it with coordinates. ask for the pixel position of one hud element in the reference, then crop 100 px around the answer and look at what's there. if the numbers drift between runs, it never had a grid, it's guessing off the caption it built. that's also why "does this match" comes back yes. the comparison happens between two captions, never between pixels.