Language, word embeddings and brands: using Natural Language Processing to pierce fashion bubbles

Wilame
Analytics Vidhya
Published in
6 min readDec 6, 2019
Image source: https://pixabay.com/photos/soap-bubble-colorful-ball-824558/

Brands circulation is the art of identifying brands that are - in a certain way -complementary or that attract the same customer profile. It measures he probability of buying brand A based on the preference of a client for the brands C and D.

The concept assumes that different fashion brands are connected by the perception that the consumer has of them. And not necessarily by the way as these brands see themselves.

Fashion brands spend a lot of time trying to build their images to influence the way as you see them. In the end of the day, some want you to think they are more chic or more cheap.

If image was a mall, brands with complementary images would be located at the same alley, one close to another. This is where things start to become interesting. From a Natural Language Processing standpoint, would it be possible to discover brand similarity using vector semantics?

Say hello to context

How do you know that two things are similar? As human being, you are a very powerful classifier. We are very good at spotting differences and similarities between things. But, let’s say that you are not human, you are a computer, and you need a good way to define similarity, how would you do it?

The key here is context. If a conversation was a dinner, words would be dishes, food, cups and forks. Context would be the table.

The way as the words are distributed on a speech is not a mere accident.

If you look closer, similar words occupy the same place over and over again. It’s like the salad bowl, that’s usually located closer to the center of the table, while the dishes and the cups are closer to the edges.

If you look at enough tables, you soon start to see a pattern. If a friend asks you to dress a table, there’s a big chance that you will follow this pattern.

Computers are not good at throwing dinner parties, but they are capable of recognising patterns. This leads us to assumption number one:

If you look at enough textual examples, you will be able to see partterns.

Until here, nothing new. But there’s something magical about patterns. A pattern happens on a context. This leads us to another assumption:

A pattern is a bubble of connected things, happening on a context.

Piercing the bubble

Let’s get back to the table example. The bubbles on your table could be divided into:

  • Things sitting closer to the center
  • Perhaps different things on the edges of the table that are occupied by kids
  • And different things sitting closer to the edges occupied by adults and teenagers.

By the way, don’t worry, we’ll talk about fashion in a minute. I promise.

Let’s call take these groups of things sitting on the table and give names for them. I forgot to say something: this is a vegetarian table.

  • Bubble #1: big salad bowl, veggie quiche, pepper, salt, more vegetables.
  • Bubble #2: plastic dish and plastic cup (not good for the environment), small fork, a toy, knives for kids.
  • Bubble #3: dishes, forks, table protection, cups, knives, cellphones, napkins.

Do you agree that the chances of finding a brush teeth or a pillow in any of these bubbles are very low… ?

If you agree with me, congratulations, you understand vectors now.

Prada, Chanel… Zara?!?

Vectors are great because they help us to contextualize tokens (a fancy way to refer to a single semantic unit, a.k.a. words, punctuation etc.). It’s a mathematical way to represent meaning, synonyms, antonyms and connotation.

It’s also a fantastic way to compare how close things are one another… If these things are fashion brands, bingo, we may have a way to discover clusters (or bubble-brands).

But why do I need vectors? I can just go to the company website, read their description and compare with other brands, right?

Well… yes and no.

In the beginning of this text we talked about perception. Perception is the distance between how a brand wants to be perceived and how it is really perceived. Perception is also highly dependent on context.

Don’t you believe? I will prove it.

Let’s take Prada and Chanel. No one questions that these are luxury oriented fashion brands, anywhere in the world.

However, is Zara is a discount brand, right?

Make this question in France and in Brazil and you get different answers.

In France, Zara is perceived as a discount company, fast-fashion, fair quality, good price/design brand. You will hardly find a french that will tell you that Zara is luxury.

The same question in Brazil may lead you to an opposite perception. Zara Brazil is the most expensive in the world, even though their products have the same quality as in Europe.

And vectors can prove this.

Hi, Gucci, let’s be friends? Kisses, Zara.

Here at La Madeleine, we study fashion and fashion data. For this article, we isolated a corpus with 40 thousand random sentences about fashion and trained a word2vec model with 300 dimensions, and a 10 tokens window, removing the stop words and punctuation from the corpus.

When analysing brand perception in fashion, Zara intrigued us. Let’s check the most similar words to this brand. For best visualisation, I will keep only the brands names:

[('h&m', 0.9682981967926025),
('balenciaga', 0.9637893438339233),
('gucci', 0.9579935073852539),
('louis_vuitton', 0.9391179084777832),
('dolce_and_gabbana', 0.9348092079162598),
('fendi', 0.92620849609375),
('lacoste', 0.925973653793335),
('adidas', 0.9256582260131836),
('inditex', 0.9247792959213257),
('bottega_veneta', 0.9240132570266724),
('melissa', 0.9238268136978149),
('kenzo', 0.9218297004699707)]

It’s pretty normal that brands like H&M (which doesn’t exist in Brazil) or Inditex (Zara’s mum) appear close to Zara.

But brands like Melissa, Lacoste and Adidas are more premium.

Things get stranger when we see that Zara ids very close to the “luxury club”, appearing close to brands like Balenciaga, Louis Vuitton and Fendi.

Iguatemi: /dusty canoes river/

Iguatemi is a Tupi word, an extinct language spoken by the native Tupi people of Brazil. It means ‘dusty canoes river’, but it also means ‘very chic shopping mall located at one of the busiest avenues in São Paulo’.

You know: a place in Brazil where rich people go to buy bags and shoes.

But… you have C&A in Iguatemi. And not only: you can find Zara and Havaianas in there too (a brand that is now premium, but before was a discount company).

Iguatemi is the place where you can buy a US$10 t-shirt and a US$3.000 bag.

Very Brazilian.

Here’s the floor plan of Iguatemi.

In Brazil, Zara is perceived as luxury/premium. And vectors were able to capture this reality.

Only analysing a couple of texts, it was possible to identify this unique phenomena. This was the same as if Zara, H&M and Tchibo decided to open stores at Avenue Montagne, in Paris.

Iguatemi has also another luxury mall called JK Iguatemi. Zara is also there, together with Chanel, Gucci, Prada, Bvlgary etc.

Language is information

Language modelling is great at capturing reality because language is pure information.

Information that can be useful for companies trying to understand how they are perceived and correct or stimulate this perception.

But not only.

Word embeddings applications range from this simple and fun exercise we have just made to more complex tasks, such as natural language generation and natural language understanding.

From a social standpoint, embeddings can be very useful to capture cultural nuances.

On the book “Speech and Language Processing: An Introduction to Natural Language Processing, Computational Linguistics, and Speech Recognition” of Daniel Jurafsky and James H. Martin, there’s a great example of this.

As they explain, vectors can be used to spot semantic change of words. The word “gay” shifted from “cheerful” in the 1900s to “homosexual” today.

Same happened to words like “broadcast” and “awful”, which moved from “seed” to “television” and from “awful” to “weird”.

Reproduction of figure 6.14. “Speech and Language Processing: An Introduction to Natural Language Processing, Computational Linguistics, and Speech Recognition” Jurafsky, Daniel | H. Martin, James.

Just a reminder, in no way this experiment was scientific. We just played around with a small corpus, using no serious methodology just to see what we could achieve.

Do you want to connect? It will be a pleasure to discuss Machine Learning and Machine Learning for Fashion industry with you. Message me on https://www.linkedin.com/in/limavallantin.

--

--