Skip to content

Cookies

We use cookies to enhance your experience. Learn more

ResearchPublication

Unsupervised attribute extraction for online listings

Earlier work, a post written in 2020 on an internship project with Prosus and OLX Group. Words in classified ads are grouped by meaning and labeled without people, and a named-entity model learns from them to find the attributes of a listing.

Three lines of small cream pieces of paper on blue paper, like the words of an ad. Strips of red and yellow tape lie over a few of the pieces, like highlighted words.

Where this comes from

This is a post on the Prosus AI Tech Blog, published on 14 October 2020 and written by Debajyoti (Deb). It reports the author’s project in a summer internship program at the Eindhoven University of Technology with Prosus, done in collaboration with OLX Group, part of Prosus, which runs online classifieds marketplaces. The post thanks Nishikant Dhanuka, Dogu Araci, Liesbeth Dingemans and Dmitri Jarnikov of the Prosus AI team and Alexey Grigorev of OLX Group for their suggestions and help. It is listed here as earlier work done with Prosus’s AI team. What follows is from the post.

What the post asks

Buyers on OLX often want something specific: a laptop with a certain amount of RAM, a car of a certain brand. Such specifications are attributes, and each takes values, as color can be red, blue or green. On an e-commerce marketplace, merchants often write detailed, structured descriptions from what the manufacturer gives them. On a classifieds site the sellers are more often consumers themselves, every item is secondhand and so in a sense unique, and the descriptions are less structured.

Pulling the attributes and their values out of a listing’s title and description gives a buyer more structured information to choose by, without holding the seller to strict requirements. The post names what else it makes possible: search and recommendations that use a product’s brand or color, and products sorted into a taxonomy automatically.

Building the labels automatically

The usual way to extract attributes is a named-entity recognition model, which finds each mention of a value in the text and labels it with its attribute. The most successful models are supervised, and they need correct annotations in large quantities, made by hand by people who know the domain. Pre-trained models find generic types, such as people, dates, places and organizations, so transfer learning did not fit a task this specific. The project set out to build the labeled data for the model in a completely unsupervised way.

That meant two problems. The pairs of attributes and values had to be found automatically, since defining the attributes of every category by hand would not scale. And ambiguous words, whose meaning depends on the words around them, had to be labeled by their context. There was no ready solution, so the project built its own, in three parts.

  1. A knowledge base

    Words used in similar contexts are grouped together, and each group is named, which gives a list of attribute and value pairs.

  2. Labeled data

    Each word in a description is given the sense its context points to, and the name of that sense’s group becomes its attribute.

  3. A named-entity model

    A model trained on the labeled descriptions finds the spans of text that are values and labels each with its attribute.

Building the knowledge base

The text is cleaned first: one case throughout, no punctuation or stopwords, and every word reduced to its lemma. Each word is then represented by Adaptive Skip-gram, a model that learns how many meanings a word has and gives it a separate vector for each, so that Apple the electronics product and apple the fruit have different neighbors. Nouns and adjectives are kept as the words that describe a product, found by tagging parts of speech with NLTK. Numbers are left out, since one number can belong to many attributes.

The post tried several ways of grouping words used in similar contexts, among them hierarchical agglomerative clustering, spherical k-means, HDBSCAN and DBSCAN, with cosine distance, and judged them by the silhouette score; hierarchical agglomerative clustering was chosen. To name a cluster, the broader terms of its words, their hypernyms, are looked up in BabelNet, and each hypernym is scored by its cosine similarity to the cluster’s words. The best scored are the candidates for the attribute the cluster stands for.

Labeling and training

To label a description, Adaptive Skip-gram infers the meaning of each word from the words around it, as a probability for each of its senses. The most probable sense is taken, and the name of the cluster it belongs to is the word’s attribute. The labeled descriptions are written in the IOB tagging scheme, which marks a token as the first of an entity, inside one, or outside any, and a named-entity model is trained on them with spaCy.

What it found

The post shows the candidate names for two clusters. For a cluster of car brands, automaker and company were among the highest ranked hypernyms, and for a cluster of colors, color was. From this the author concludes that a relevant broader term can be found for a cluster this way.

It also shows examples from a named-entity model built to detect car brands and colors. From an ad for a Mercedes Benz available in blue, it took the brand as the automaker and blue as the color; from an ad for a curtain, it took white as the color.

Numeric and boolean values are beyond the approach, the post says, since a number is used in so many contexts that its attribute is hard to tell. It describes the approach as scalable across categories of products, and names a significant advantage: “the attributes are defined automatically, which reduces manual intervention”.

The post

Unsupervised Attribute Extraction for Online ListingsDebajyoti (Deb). Prosus AI Tech Blog, 2020

Author

  • Debajyoti (Deb)

References

  1. Unsupervised Attribute Extraction for Online ListingsDebajyoti (Deb). Prosus AI Tech Blog, Medium, 14 October 2020
  2. Unsupervised attribute extraction for online listingsProsus, 14 October 2020
  3. Breaking Sticks and Ambiguities with Adaptive Skip-gramSergey Bartunov, Dmitry Kondrashkin, Anton Osokin, Dmitry Vetrov. arXiv, 2015
  4. BabelNetWhere the post looks up the hypernyms that name its clusters

Keep reading

  • Publication

    One model for the whole home page

    A shopping app’s home page is filled by many recommenders, each tuned for its own slot. This model writes one page per person, per meal moment: the title, the subtitle and what to show. In a live test on one slot it brought 137% more orders from that list.

  • Publication

    New robots, old tricks: teaching robots to speak AI

    A post of November 2026 on a year of wiring Darwin, the Prosus humanoid robot. Five parts spoke five protocols, and the post asks what a robot should tell an AI agent about its actions before the agent can use it.

  • Method

    Meet the large commerce model

    Language models learn from text. Magnet Decision learns from what people search for, look at, buy and come back for. Here’s how it’s built.