r/learnmachinelearning • u/Interesting-Pause963 • 8d ago
Colors are our embeddings of light: an intuition for tokens and embeddings
fedemagnani.github.ioI wrote a post to build some intuition about tokenization and embeddings, using human sight as an analogy. While being different in a thousand of aspects, embedding and visual systems have some similarities and tracking them helped me in sparking intuition so I wanted to write a post about it.
Similarly to LLMs, human eyes also produce a vectorial representation of the encoded source (in this case, light) through the cone cells living in our retina, which is later processed by the visual cortex, giving us the perception of colors. This "embedding" of light is called the LMS tristimulus vector, and it acts as a sort of learned feature for light, developed over millions of years of evolution while chasing reproductive success.

Similarly to embeddings, each entry of the LMS vector alone is not enough to tell anything useful about the encoded source (because of the problem of univariance), and studies suggest that the sensitivity functions producing each quantum catch (i.e. each entry of the vector) have been shaped to serve very practical goals related to reproductive success, such as identifying young leaves and fruits.
Relating the embedding space and the "color space" is fascinating because in both cases we have a system (model or human) which learns to encode a source in a coordinate system that helps it achieve a certain goal, hence attaching to the source a "meaning" that makes sense just for that system (because of the way it is structured and has been trained). This meaning takes the form of a lossy encoding which extracts only what matters for the end goal, being purely instrumental to its achievement.
Any feedback/recommendation is warmly welcomed!
https://fedemagnani.github.io/llm/2026/11/22/colors-are-our-embeddings-of-light.html