M/Visual Library
  1. Visual Library
  2. Gen AI
  3. Distributional Semantics for Image-Makers

Gen AI

Distributional Semantics for Image-Makers

'You shall know a word by the company it keeps': how models learn meaning from co-occurrence, why every prompt word brings its neighbours, and how to use that on purpose.

Also known as: distributional semantics, you shall know a word by the company it keeps, word embeddings explained, word associations in AI images, why prompt words carry baggage

A word is the company it keeps

In the 1950s the linguists Zellig Harris and J. R. Firth proposed that words appearing in similar contexts have similar meanings. Firth's line, 'You shall know a word by the company it keeps', became the founding idea of distributional semantics, and the basis of almost every modern language model. Word2vec (2013) showed that such learned representations capture analogies; CLIP (2021) extended the idea to images and captions together.

For image-makers this explains a daily experience: words carry more than their dictionary meaning. 'Vintage' carries sepia, grain and 1970s furniture because those things kept appearing near it in captions. Every prompt word pulls its neighbourhood into the picture. Understanding that neighbourhood is the difference between a word that works and a word that drags clichés along.

The core idea

Distributional hypothesis

Words used in similar contexts have similar meanings; meaning is learned from patterns of use.

Embeddings

Each word or caption becomes a point in a high-dimensional space; nearby points mean similar things.

Co-occurrence

What appears together in text and images becomes linked: 'rustic' with wood, linen, bread.

Joint image-text space

Models like CLIP place images and captions in the same space, so words and looks become neighbours.

Why words carry baggage

Neighbourhood effect

'Cyberpunk' brings neon, rain, Japanese signage and leather jackets, whether you asked or not.

Hype words

'Epic', 'stunning', 'masterpiece' sit near over-processed, high-contrast images, so they push that look.

Bias by association

Language data links professions, genders and places in skewed ways, and images inherit it.

Rare words

Words with few examples have vague neighbourhoods and give unpredictable results.

Using neighbourhoods on purpose

Evoke a setting with neighbours

Instead of naming a mood, name things from its neighbourhood: 'enamel mug, wool blanket, frost on glass' for a winter morning.

Choose the less loaded synonym

'Weathered' versus 'vintage', 'quiet' versus 'moody': small swaps change the whole neighbourhood.

Test single words

Generate a bare word to see its neighbourhood before relying on it.

Combine distant neighbourhoods

Mixing two far-apart clusters, 'baroque' and 'laundromat', produces fresh images.

Limits of the approach

Association is not understanding

Models know what goes together, not always why or how.

Frequency rules

Common contexts dominate; specific or minority meanings get crowded out.

Language imbalance

Neighbourhoods are richest in English and thinner in other languages.

Static snapshot

Meanings shift over time; a model's neighbourhoods reflect the period of its data.

The words to describe it

Precise words for the qualities above. Combine a few of them instead of naming the style or artist alone.

  • distributional hypothesis
  • word embedding
  • co-occurrence
  • semantic neighbourhood
  • joint image-text space
  • word baggage
  • association bias
  • less loaded synonym
  • neighbourhood evocation
  • frequency effect
A description to start from

Instead of 'cosy aesthetic winter morning': 'A wool blanket on a windowsill, an enamel mug of tea, frost patterns on the glass, low pale sun across the floorboards.' The objects carry the cosiness without the clichés of the word.

How to put it into words

  • Ask what usually appears near a word, not only what it means.
  • Replace loaded words with concrete members of the neighbourhood you want.
  • Test a single word before building a prompt around it.

Where we usually get it wrong

Treating words as neutral labels. 'Aesthetic', 'cinematic' or 'vintage' each pull a crowd of associations into the image. If results feel generic, the words are usually doing exactly what their neighbourhoods suggest.

Try this

Generate five single-word prompts: 'nostalgia', 'luxury', 'cosy', 'futuristic', 'ancient'. For each, list the five objects or qualities that appeared without being asked. That list is the word's neighbourhood.

Sources and further reading

  • J. R. Firth, 'A Synopsis of Linguistic Theory, 1930–1955' (1957).
  • Zellig Harris, 'Distributional Structure' (1954).
  • Mikolov et al., 'Efficient Estimation of Word Representations in Vector Space' (2013).
  • Radford et al., 'Learning Transferable Visual Models From Natural Language Supervision' (CLIP, 2021).
  • Caliskan, Bryson and Narayanan, 'Semantics derived automatically from language corpora contain human-like biases' (Science, 2017).

Keep looking