---
title: "Clustering Word Embeddings with Self-Organizing Maps."
description: "How self-organizing maps group word embeddings for Romanian sentiment classification, and what the LaRoSeDa and MOROCO results show."
canonical: "https://research.elamur.ai/free/en/papers/tache-2021-clustering-word-embeddings-self-organizing/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/tache-2021-clustering-word-embeddings-self-organizing/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2021](https://md.research.elamur.ai/free/en/papers/2021/) / Clustering Word Embeddings with Self-Organizing Maps. Application on LaRoSeDa - A Large Romanian Sentiment Data Set

# Clustering Word Embeddings with Self-Organizing Maps. Application on LaRoSeDa - A Large Romanian Sentiment Data Set

Paper · 2021 · Anca Maria Tache, Mihaela Găman and Radu Tudor Ionescu

**Authors:** [Anca Maria Tache](https://md.research.elamur.ai/free/en/authors/anca-maria-tache/), [Mihaela Găman](https://md.research.elamur.ai/free/en/authors/mihaela-gaman/) and [Radu Tudor Ionescu](https://md.research.elamur.ai/free/en/authors/radu-tudor-ionescu/) · **Year:** 2021 · **Venue:** Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume · [licence](https://creativecommons.org/licenses/by/4.0/)

- [Publisher's page](https://aclanthology.org/2021.eacl-main.81/)
- [PDF](https://aclanthology.org/2021.eacl-main.81.pdf)
- [DOI 10.18653/v1/2021.eacl-main.81](https://doi.org/10.18653/v1/2021.eacl-main.81)

## Summary

A product review has both a star rating and a piece of text. The rating gives researchers a way to label the review, while the text is what a classification system must learn to read. For Romanian, the authors found few publicly available collections large enough to support this kind of experiment. They introduced LaRoSeDa, a dataset of 15,000 Romanian e-commerce reviews divided evenly between positive and negative labels. Reviews with four or five stars count as positive, and reviews with one or two count as negative. The authors leave out neutral ratings and acknowledge that the rating sometimes gives an imperfect account of what the reviewer wrote. The task is a form of [sentiment classification](https://md.research.elamur.ai/free/en/topics/sentiment-emotion/).

The paper compares ways to represent a whole review. A character-based baseline measures how much two reviews overlap in short stretches of text. The other approach starts with [word embeddings](https://md.research.elamur.ai/free/en/concepts/word-embeddings/), numerical representations of words. It groups nearby embeddings into clusters and describes a review by counting how many of its word vectors belong to each cluster. The authors compare k-means, the clustering procedure used in earlier work, with self-organizing maps, whose units move during training in a way that can reflect the shape and density of the input. On LaRoSeDa, the map produces a more uneven distribution of words across clusters, closer to the rank-frequency pattern associated with [Zipf’s law](https://md.research.elamur.ai/free/en/concepts/zipfs-law/). The authors offer that observation as an explanation for the gains in classification.

The character-based system is the strongest standalone approach on LaRoSeDa. Switching from k-means to self-organizing maps improves accuracy with both word2vec and Romanian BERT embeddings, whether the resulting features are used alone or combined with character evidence. The best combination uses character similarity and the Romanian BERT cluster counts from a self-organizing map. It reaches 89.54% accuracy in 10-fold cross-validation and 90.90% on the established LaRoSeDa test split.

The authors also test the clustering change on MOROCO, where the job is to distinguish news topics within the Romanian portion of the corpus. The combination of character evidence and Romanian BERT embeddings again scores highest with the map, reaching 73.35% accuracy in 10-fold cross-validation. This extends the comparison beyond review sentiment while keeping the language setting close to the original experiment. The two datasets show a consistent advantage for the map in the reported comparisons. The experiments measure that advantage more directly than they establish why it occurs.

## Deep dive: Clustering Word Embeddings with Self-Organizing Maps. Application on LaRoSeDa - A Large Romanian Sentiment Data Set

How self-organizing maps group word embeddings for Romanian sentiment classification, and what the LaRoSeDa and MOROCO results show. · about 31 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### Why Romanian review data mattered

Sentiment classification asks a system to infer an evaluation from written language. For a review, the target can be as simple as deciding whether the writer’s judgment is positive or negative. A researcher who wants to compare solutions needs examples with known labels and a way to reserve some examples for evaluation. The authors describe a field with substantial prior work on languages such as English, Chinese, Arabic and Spanish. In Romanian, the resources they located were fewer, and the public ones most closely aligned with review polarity were small.

An important distinction in their account is between subjectivity and polarity. Subjectivity concerns whether language conveys a point of view or judgment. Polarity concerns the direction of that judgment. A resource that helps identify subjective material can support the broader study of opinion without supplying the positive and negative labels needed for a review benchmark. The Romanian material in the multilingual studies the authors discuss was used to investigate subjectivity. The earlier efforts included transferring annotations from English by [cross-lingual projection](https://md.research.elamur.ai/free/en/papers/mihalcea-2007-learning-multilingual-subjective-language-cross/) and creating multilingual resources through [machine translation](https://md.research.elamur.ai/free/en/papers/banea-2008-multilingual-subjectivity-analysis-machine-translation/).

Other work moved closer to polarity but provided a different kind of resource. One study assembled Romanian and Russian words tagged for polarity. A multilingual sentiment service supported Romanian using manually assembled triggers, which the authors did not find publicly available. They also describe RoEmoLex, a Romanian lexicon of roughly 11,000 words tagged for sentiment and emotion. They found no public link to it. A lexicon gives information about individual entries. A review benchmark pairs judgments with entire texts, allowing a classifier to be assessed on the combined effect of the words a reviewer uses.

Tourist and movie reviews offered closer precedents. The authors cite a study with 2,521 Romanian tourist reviews and a detailed linguistic analysis, but the collection was unavailable for public use. The freely available annotated Romanian dataset they found contained 1,000 movie reviews selected manually from sites and blogs. That resource put sentiment labels and complete reviews together. LaRoSeDa broadened the amount of available material and used a different review domain. The claim about its scale is framed by the resources the authors knew about.

Star ratings let the authors build the new dataset without having a person read and label every review. They follow precedents from English review research, where ratings had already served as the basis for sentiment categories and collections had been balanced for comparison. The cited work includes [Seeing Stars](https://md.research.elamur.ai/free/en/papers/pang-2005-seeing-stars-exploiting-class-relationships/) and [Learning Word Vectors for Sentiment Analysis](https://md.research.elamur.ai/free/en/papers/maas-2011-learning-word-vectors-sentiment-analysis/). The convention makes a large dataset practical. It also defines what its benchmark accuracy means. A prediction is counted against a label derived from the rating, even if a reader would interpret the review differently.

#### What a document representation needs to retain

A collection of labeled reviews makes it possible to compare representations. One established approach starts from characters. Instead of deciding which words or expressions deserve special treatment in Romanian, it compares short contiguous sequences of characters that occur in the reviews. This creates a similarity based on the written form of the text. In the earlier work cited, string kernels had been applied to polarity classification in several languages. The authors also point to their use for a separate problem, including the first-place Arabic dialect identification system described in [UnibucKernel Reloaded](https://md.research.elamur.ai/free/en/papers/butnaru-2018-unibuckernel-reloaded-first-place-arabic/).

Character features are useful to the design of this paper because their construction has few linguistic prerequisites. A labeled training collection is enough to build the comparison, without a Romanian sentiment lexicon or a separately trained source of lexical information. The same property gives the approach a clear role in the experiment. If a representation built from word vectors is to help, it can be compared with a method that already draws considerable information from the observable text.

Word embeddings offer another kind of evidence. A review of several words yields several vectors, and a classification system needs a way to combine them at document level. Averaging is a straightforward option discussed in the paper’s account of earlier work on [word-embedding pooling](https://md.research.elamur.ai/free/en/papers/shen-2018-baseline-needs-more-love-simple/). The document is represented by a vector in the space shared by the word vectors. The approach pursued here comes from work that first groups the vectors and then represents each document as a collection of counts over those groups. A document represented that way retains information about how its word occurrences are distributed among the groups.

This distinction changes what a coordinate means. In an average, a coordinate is an average of numerical components of the word vectors. In the cluster representation, a coordinate records how frequently a document uses words assigned to a particular region of the embedding space. Occurrences can accumulate in the same coordinate even when the written words differ. The authors call the resulting representation a bag of word embeddings. Earlier work they cite used clustering-based document representations for several classification tasks, including sentiment. The paper treats k-means as the established way of building that representation.

#### Why the clustering choice was open

Clustering contributes more than a convenient way to reduce the number of features. It decides which embedding occurrences count as the same kind of evidence at document level. Move a cluster boundary and some words contribute to a different histogram bin. Change the locations of the cluster representatives and the whole representation can emphasize a different partition of the vocabulary and its uses. That makes the clustering algorithm a meaningful part of the classification pipeline, even though its own training does not use sentiment labels.

The authors motivate their alternative with the frequency distribution of words. In the rank-frequency relation they cite, a word’s frequency is inversely proportional to its rank in a frequency list. High-ranking words account for many occurrences, while words farther down the ranking occur less often. This is a claim about counts of words in a text collection. It gives the authors a reason to ask what happens to that unevenness when occurrences represented as vectors are grouped into a smaller collection of bins.

The paper describes k-means as having a tendency toward more uniform cluster populations in this setting and argues that its optimization does not specifically adapt to variations in density. The authors qualify that observation because k-means can produce groups of different sizes. Their alternative, the self-organizing map, comes from earlier work by Kohonen. They adopt it for its ability to reflect relations in the input space and to move units toward densely populated regions. The research question is whether that different way of forming groups yields a more useful document representation while the rest of the classification design stays comparable.

### The method, step by step

#### From a rating to a classification target

The authors collect the text and associated ratings of product reviews from a large Romanian e-commerce website. They use the two ends of the rating range. A review with one or two stars receives a negative label, and a review with four or five stars receives a positive label. The middle rating is outside the task. During evaluation, the reference label is therefore a binary category assigned from the rating. The system is judged on whether it can recover that category from the review text.

They select equal numbers of positive and negative examples, then define a training and test partition. The training material supplies labeled examples for the classifier and word vectors for the clustering stage. A separate evaluation protocol uses folds of the collection. In either form of evaluation, the central distinction is between fitting the features or decision rule and scoring predictions on the evaluation reviews. The paper is explicit that the vectors used to form the clusters come from training documents. It describes the corpus used to train word2vec in more general terms.

A review enters one representation as a string of characters. In the other, it enters as a sequence of words with vectors. Each representation ultimately supplies a measure of similarity between documents. The classifier can use either similarity representation on its own, or the authors can add the two sets of similarity scores before training. The flow below follows the embedding route and indicates where the optional character evidence joins it.

From review text to a sentiment prediction The steps in order.

#### How the character baseline compares texts

The character route regards each review as a string and counts its [character n-grams](https://md.research.elamur.ai/free/en/concepts/n-gram/). An n-gram is a contiguous sequence of a specified length. A character n-gram uses neighboring characters as its units. A review can contain the same sequence several times, so each sequence has a count. Using these fragments avoids requiring the feature extractor to decide where a useful sentiment expression begins or ends.

A conceptual feature vector would have a coordinate for each possible fragment. The paper notes that the number of such fragments is usually much larger than the number of text samples. Its implementation uses a kernel matrix instead. Each entry represents the similarity of two reviews, with their positions in the collection identifying the row and column. The classifier can use those prepared similarities without requiring the reviews to be stored as explicit vectors over all possible fragments.

The chosen similarity is the histogram intersection string kernel, abbreviated HISK. For each possible character n-gram of a given length, it takes the smaller count in the two texts. It then adds these contributions. An occurrence in one review contributes only as far as the other review supplies a matching occurrence of the same fragment. A fragment absent from either review supplies no shared count. This is how the intersection rule incorporates repetition without giving credit for occurrences that only one text contains.

```
k∩(xᵢ, xⱼ) = ∑[g ∈ Sⁿ] min{#(xᵢ, g), #(xⱼ, g)}
```

Here `k∩` names the histogram intersection similarity, with `∩` indicating intersection. The strings are `xᵢ` and `xⱼ`, and `i` and `j` identify the samples being compared. `S` is the character set, `n` is the fragment length, and `Sⁿ` is the set of sequences of that length over `S`. The symbol `g` stands for one of those sequences, and `∈` means it belongs to that set. `#(x, g)` counts occurrences of the sequence `g` in the string `x`. The operation `min` selects the smaller of the two counts, and `∑` adds the selected counts over the sequences in `Sⁿ`. The equality defines the similarity returned for this pair of strings.

The authors combine character 3-grams, 4-grams and 5-grams in their experiments. Using several lengths provides separate opportunities for two texts to overlap. Short fragments can survive differences in the surrounding characters, whereas a longer match requires more of the sequence to agree. The reported results refer to the combined character baseline. The paper gives no separate result for an individual length.

#### How words become vectors

The embedding route begins by turning words into numerical vectors. The authors use two sources. For word2vec, they train the continuous bag-of-words variant on collected Romanian reviews, after converting letters to lower-case and removing punctuation. Continuous bag-of-words learns through a prediction task that uses the context around a word. The learned representation supplies a vector that can be reused across occurrences of that word. In these experiments, the word2vec vectors have 300 dimensions. The paper traces this source of representations to [word2vec](https://md.research.elamur.ai/free/en/papers/mikolov-2013-distributed-representations-words-phrases-their/).

The other source is Romanian BERT, whose output is 768-dimensional. Its representation depends on where and how a word is used, so separate occurrences of the same written word can yield different vectors. The authors expect many such occurrences still to go into the same cluster. For the pipeline to work, however, it only needs each occurrence to have an assignment. If the vectors for a word in different contexts land in different groups, the relevant occurrences increment different bins. The paper draws on the Romanian system introduced in [The birth of Romanian BERT](https://md.research.elamur.ai/free/en/papers/dumitrescu-2020-birth-romanian-bert/), following the earlier [BERT](https://md.research.elamur.ai/free/en/papers/devlin-2019-bert-pre-training-deep-bidirectional/) work.

The paper writes a document as a sequence of words.

```
D = (w₁, w₂, …, wₙ)
```

`D` is the document. Each `w` with a subscript denotes the word occurrence at the corresponding position. The parentheses enclose an ordered sequence, and the ellipsis indicates the positions between the start and the end. Here `n` is the document’s length in words. Its role is local to this expression. In the string kernel, the same letter denotes the selected length of a character fragment.

Embedding the document gives a matrix of shape `n × m`, where `m` is the number of coordinates in each word vector and `×` separates the two dimensions of the matrix. The row at position `i` gives the representation for `wᵢ`. The matrix therefore still distinguishes positions within the document. The later counting step will remove those position distinctions.

The two embedding sources differ in more than the number of coordinates they use. The word2vec training procedure described in the paper learns from the collected reviews, while Romanian BERT is brought in as an existing Romanian system. The account of context dependence also means that the two sources can supply different patterns of redundancy among the vectors collected for clustering. Those differences matter when interpreting the experiments. Changing the embedding source is a comparison between existing alternatives in this pipeline, with several properties changing together.

#### How the cluster inventory is learned

The authors pool the word vectors extracted from training documents. Clustering this collection produces groups that will be used to describe any document in the corresponding run. A classifier will later learn from labeled document examples. At this earlier stage, the clusters are fit to the vectors, so there is no instruction to form a positive group or a negative group. Their relationship to sentiment, or to topic on MOROCO, depends on whether the resulting groups support useful distinctions among documents.

The baseline uses k-means. In broad terms, it represents each group by a center, assigns inputs to centers, and updates the centers to suit their assigned inputs. The number of groups is chosen before fitting. Group populations can differ because the assignment depends on the positions of the vectors and the representatives. The paper’s objection concerns the kind of partition this produces when the quantity of data varies across regions. The method’s objective need not lead to cluster populations with the particular rank-frequency pattern the authors are looking for.

A self-organizing map, abbreviated SOM, represents the input through units with weight vectors. The units are organized so that their relations to one another matter during training. As the map adapts to the data, the units shift in the embedding space. The paper describes them as tending to move towards regions where the input is denser and emphasizes the method’s ability to preserve aspects of the topology of the input. In this application, the units provide the representatives from which the groups are formed. A group is useful to the document histogram because it supplies a stable bin for later word assignments.

The map and k-means are used here to solve the same intermediate problem. Each provides a vocabulary of cluster assignments, and the downstream representation only needs to know which cluster received each vector. The map’s internal organization guides how the representatives are learned. The document representation does not record the position of one map unit relative to another or the path between any units. Thus the direct contribution of the map at classification time is the set of groups it learned and the resulting assignment counts.

The number of groups is `k = 500` in the reported embedding configurations. The letter `k` denotes how many clusters there are. This is separate from `k∩`, which names a similarity function in the character comparison. The authors choose the cluster count following an earlier study they cite. A common count holds the size of the resulting histogram fixed when the clustering procedure changes. It also means the word2vec and Romanian BERT branches finish with document vectors of the same size in spite of starting from embeddings of different dimensions.

For the self-organizing map, the authors use an open-source implementation and keep most settings at their defaults. They set the learning rate to 0.25 and train for 200 epochs. The learning rate controls how strongly training updates the weights, and epochs describe repeated passes through the training process. At initialization, the implementation is configured to choose random training samples in a quantity matching the expected number of outputs. The authors use cosine distance between the input vectors and the weights of the map units. In this setting, cosine distance compares the directions of the vectors.

#### How a document becomes a histogram

Once the clusters are fitted, each word vector in a document is assigned to a group. The authors count those assignments separately for each document. These counts form the bag of word embeddings, abbreviated BOWE. The process yields the same number of coordinates for short and long documents. A longer review has more word occurrences available to contribute to the counts, but it uses the same inventory of bins as a shorter review.

```
H = (h₁, h₂, …, hₖ)
```

`H` denotes the document histogram. Each `hᵢ` is the count of word vectors from that document assigned to cluster `i`. The index `i` runs from the first group to the last. The symbol `k` gives the number of groups and therefore the number of histogram coordinates. The parentheses enclose the ordered counts, and the ellipsis stands for the bins between the displayed positions. The order of the coordinates identifies clusters, whereas the order in `D` identifies places in the text.

The counting operation explains both what the representation preserves and what it discards. A bin preserves the number of occurrences assigned to it, regardless of whether those occurrences are repeated uses of the same word or uses of different words whose vectors landed in the same group. The histogram drops the identity of the individual vectors within a bin. It also drops their order in the review. A contextual vector can carry information influenced by its surroundings into the assignment, but the resulting count does not identify those surroundings.

This makes the final histogram different from a literal inventory of words. Two documents can have a corresponding bin count even when the items that raised the count are different words. Conversely, two uses of the same spelling can contribute to different bins if their contextual representations lead to different assignments. The cluster inventory fixes the conditions under which those occurrences are treated alike. That is the immediate mechanism through which replacing k-means with a map can affect the document comparison.

#### How the similarities reach the classifier

The paper uses the PQ kernel to compare BOWE histograms. This choice follows earlier results the authors cite, and it is used for both embedding sources with either clustering procedure. A similarity entry in the embedding kernel matrix is between whole documents, even though the features behind it were built from individual word occurrences. The paper names the PQ kernel and gives its place in the pipeline. It supplies an explicit similarity formula for HISK.

For a combined system, the authors add the character and embedding kernel matrices entry by entry. At a position corresponding to a pair of reviews, the combined value includes the character similarity for that pair and the histogram similarity for the same pair. This is fusion in the dual form, meaning that the system works with document similarities at the point of combination. There is no need to merge the underlying character fragments and cluster bins into a common inventory.

The authors train a support vector machine, or SVM, using precomputed kernels in Scikit-learn. A support vector machine learns a decision rule for distinguishing the labeled examples using the supplied representation. Its regularization setting controls the tradeoff between fitting the training examples and constraining that decision rule. The authors use the same setting in their experiments.

```
C = 10³
```

`C` denotes the SVM regularization parameter. The right-hand side is ten raised to the third power, with the superscript `³` giving the exponent. The equality specifies its fixed value for the runs. In comparing the clustering procedures, the paper keeps this classifier setting, the kernel choice for the histograms and the number of bins in place. The difference reaches the classifier through the word vectors’ assignments to those bins.

### Experiments and results

#### LaRoSeDa’s labels, balance and evaluation splits

LaRoSeDa contains 15,000 product reviews, with 7,500 in each polarity class. The training partition takes 80% of the collection and contains 6,000 reviews from each class. The test partition takes the remaining 20%, with 1,500 positive and 1,500 negative reviews. The authors release LaRoSeDa for non-commercial use. The benchmark results give users of the collection a comparison on the established split as well as a comparison across folds.

The rating distribution is concentrated at the ends. The authors count 5,561 one-star reviews within the negative class and 6,238 five-star reviews within the positive class. These are counts of the original ratings, before treating all examples on the same side as one category. The split therefore preserves a distinction between positive and negative examples while the task itself combines different degrees of rating within each side. Accuracy by the binary category cannot reveal whether the system performs equally well at those different degrees.

The corpus contains 540,287 words, and the paper reports an average of 36 words per review. Equal numbers of documents in the two labels coexist with different quantities of text. The positive reviews contain 235,474 words, while the negative reviews contain 304,813 words. In the training split, the positive reviews account for 187,813 words and the negative reviews for 244,499 words. In the test split, the corresponding counts are 47,661 and 60,314 words. The authors suggest that dissatisfied reviewers may use the text to describe several problems or to explain what failed. The counts describe the imbalance in length. The proposed explanation is an interpretation of that observation.

The metric is accuracy, the percentage of documents assigned their reference label. On LaRoSeDa the reference comes from the star rating, and each review counts as a single prediction regardless of length. Good accuracy on the benchmark therefore means that the features and classifier recover the rating-derived category for many documents. The corpus word totals describe what goes into the representation. They are separate from the units counted when calculating accuracy.

The reported evaluation protocols answer related questions. The fixed split evaluates the trained classifier on the designated test reviews. In 10-fold cross-validation, portions of the corpus take turns serving as evaluation material. The paper gives an accuracy for each method under each protocol. The official test figures make a fixed benchmark comparison possible, while the cross-validation figures show how the method ordering looks when the evaluation is organized across portions of the data.

#### Accuracy on the established test split

The fixed-split results include the character baseline, the embedding histograms using each combination of vector source and clustering procedure, and the corresponding fusions with character similarity. In the chart, word2vec and Romanian BERT refer to the embedding histograms. Their combinations with HISK use the same kernel addition described in the method.

LaRoSeDa fixed test split accuracy by representation and clustering method The combination of HISK and Romanian BERT embeddings clustered with a self-organizing map has the highest test accuracy.

**The numbers**

| System or setting | Accuracy % |
| --- | --- |
| HISK | 84.73 |
| Word2vec with k-means | 70.73 |
| Word2vec with a self-organizing map | 75.57 |
| Romanian BERT with k-means | 77.36 |
| Romanian BERT with a self-organizing map | 80.73 |
| HISK plus word2vec with k-means | 83.57 |
| HISK plus word2vec with a self-organizing map | 88.93 |
| HISK plus Romanian BERT with k-means | 89.42 |
| HISK plus Romanian BERT with a self-organizing map (this paper) | 90.90 |

HISK alone reaches 84.73% on the LaRoSeDa test split, leading every standalone embedding-based entry. Among the standalone histograms, Romanian BERT with a self-organizing map is highest at 80.73%. Within each embedding source, the map improves the test accuracy. For word2vec, the entries are 70.73% with k-means and 75.57% with the map. For Romanian BERT they are 77.36% with k-means and 80.73% with the map. Those comparisons keep the character baseline out of the decision and show that the histogram on its own is sensitive to how the bins are formed.

The comparison with HISK changes when the similarities are combined. The best test result, 90.90%, comes from adding the Romanian BERT histogram kernel with map-based clustering to HISK. The corresponding combination with k-means reaches 89.42%. Both stand above the character baseline even though their embedding-only counterparts score below it. A standalone ranking therefore does not capture the contribution the embedding similarity can make once the classifier also has the character evidence.

The word2vec combinations illustrate the dependence on how the embedding representation is made. The k-means fusion gives 83.57% on the fixed test set, below the 84.73% for HISK alone. The map fusion reaches 88.93%. In this comparison, the choice of cluster inventory accompanies a change in whether adding word2vec helps the character baseline. It would be too broad to describe any embedding kernel as beneficial simply because it is additional evidence. The specific similarity added matters.

#### Accuracy across folds

The cross-validation results use 10 folds on LaRoSeDa. Each method is evaluated under that protocol, so the figures can be compared with those on the fixed split without pooling them into a single score. The main pattern persists. The string kernel leads the standalone methods, the map improves the corresponding k-means setting, and the leading fusion uses Romanian BERT with the map.

LaRoSeDa 10-fold cross-validation accuracy by representation and clustering method The leading fusion uses Romanian BERT with a self-organizing map, and the map improves each matched comparison with k-means.

**The numbers**

| System or setting | Accuracy % |
| --- | --- |
| HISK | 84.38 |
| Word2vec with k-means | 72.24 |
| Word2vec with a self-organizing map | 75.99 |
| Romanian BERT with k-means | 78.63 |
| Romanian BERT with a self-organizing map | 79.75 |
| HISK plus word2vec with k-means | 85.08 |
| HISK plus word2vec with a self-organizing map | 87.17 |
| HISK plus Romanian BERT with k-means | 88.81 |
| HISK plus Romanian BERT with a self-organizing map (this paper) | 89.54 |

Using the embedding representations alone, the cross-validation accuracy for word2vec is 72.24% with k-means and 75.99% with the map. Romanian BERT gives 78.63% with k-means and 79.75% with the map. The paper’s characterization of the improvement for word2vec is supported by the ordering in both evaluation protocols. The individual figures keep the comparison tied to its split and show that the change need not have the same effect for both embedding sources.

With HISK at 84.38% in cross-validation, all of the combined systems are above the standalone character result under this protocol. In particular, the word2vec fusion with k-means gives 85.08%, whereas on the fixed split its accuracy falls below the corresponding HISK baseline. Its map-based counterpart reaches 87.17% in cross-validation. The behavior of the weaker fusion gives a reason to keep the evaluation protocols distinct. A small advantage in one view of the dataset can accompany a reversal in the other.

The Romanian BERT fusions narrow the choice to the clustering procedure while keeping both character and embedding evidence present. In cross-validation, the k-means fusion reaches 88.81% and the map fusion reaches 89.54%. The best cross-validation and fixed-test scores thus belong to the same configuration. The agreement concerns the reported rankings. The two accuracy entries belong to different evaluations and should each be read in relation to the other systems scored under its own protocol.

#### The Romanian news topic experiment

MOROCO contains Moldavian and Romanian news articles. The experiment described here asks for the topic of each article in the portion of the corpus consisting of 18,161 samples in the Romanian dialect. The target is one of several topic classes. It is not a decision about the dialect of the article, and it does not use star ratings. The authors report 10-fold cross-validation accuracy for this experiment.

The reported comparison uses the previously published HISK result and the Romanian BERT histograms with k-means or a self-organizing map. It also includes the two fusions with the character kernel. This changes both the kind of text and the kind of label while preserving the central comparison between cluster inventories. The reported entries for MOROCO concern Romanian BERT rather than the full set of embedding alternatives tested on LaRoSeDa.

MOROCO Romanian news topic accuracy in 10-fold cross-validation The map improves the Romanian BERT histogram on its own and gives the strongest fusion with HISK.

**The numbers**

| System or setting | Accuracy % |
| --- | --- |
| HISK | 71.27 |
| Romanian BERT with k-means | 63.42 |
| Romanian BERT with a self-organizing map | 68.50 |
| HISK plus Romanian BERT with k-means | 72.21 |
| HISK plus Romanian BERT with a self-organizing map (this paper) | 73.35 |

The map raises the standalone Romanian BERT result from 63.42% to 68.50%. HISK reaches 71.27% and remains the strongest standalone choice. Adding the k-means histogram to the character kernel gives 72.21%, and adding the map-based histogram gives 73.35%. These are accuracy figures for the Romanian intra-dialect topic task. Their role in the paper is to show that the directional comparison between clustering procedures also holds with news articles and topic labels. The absolute accuracies have meaning within that task, where the set of possible predictions differs from the binary review setting.

### What the ablations show

#### Replacing the clustering procedure

The paper’s main controlled comparison replaces k-means with a self-organizing map inside the same document representation. It holds the embedding source fixed for each pair and keeps the histogram size, the use of the PQ kernel and the classifier setting in place. On LaRoSeDa, the comparison is available for both word2vec and Romanian BERT, alone and as additions to HISK. On MOROCO, it is available for the Romanian BERT histogram alone and in combination with the character kernel. This design is more informative about clustering than a comparison between the strongest complete systems would be on its own.

The improvement in the standalone embedding runs shows that the map can help without any contribution from the character features. This is important because the strongest overall results use a combination. Looking only at those results would leave open the possibility that the map is useful specifically because its similarity interacts well with HISK. The standalone runs show an advantage before fusion. The paired fusions then show that the change can also help when the classifier already receives a strong character similarity.

The word2vec and Romanian BERT results test how much the finding depends on one way of representing words. Word2vec uses learned word vectors from the reviews. Romanian BERT provides context-dependent vectors. The map improves the reported LaRoSeDa results with either source, so the observation is not limited to one of those settings. The difference in their starting representations also matters when comparing magnitudes. A larger or smaller gain does not on its own tell us which property of an embedding made the map more effective.

This is a comparison of full clustering procedures. As configured in the paper, the self-organizing map brings its own training process, initialization and cosine comparison. A favorable outcome identifies the map configuration as the better choice of the two tested in that pair. It does not assign a portion of the gain to how the map units are arranged or to any individual training choice. The reported runs have no separate intervention that removes neighborhood organization while keeping all the other map choices fixed.

#### Testing what the character and embedding features contribute

The character-only run answers whether embeddings are necessary for a strong baseline. With both corpora, the character kernel alone leads the embedding-only configurations tested on that corpus. That result gives the fusion experiment a demanding point of comparison. An improvement over a standalone embedding histogram would be less informative if it merely came from adding the already stronger character features. The character-only reference shows whether the combined similarity improves on those features themselves.

The leading fusions do improve on HISK. The experiment supports complementarity in the operational sense that the classifier with access to the summed similarities gives higher accuracy than either component alone. The features supply different views of a document. HISK registers shared stretches of written text, while BOWE registers similarity among counts of clustered word vectors. The setup gives a plausible account of how one could add information that the other misses. The paper does not trace the improvements to particular reviews, words or expressions, so the source of the complementarity remains at the level of the measured system performance.

The test result for the word2vec fusion with k-means is especially informative about the limits of combination. Its standing changes relative to HISK when the evaluation protocol changes. With the map, the corresponding word2vec fusion improves on HISK in both reported LaRoSeDa evaluations. This qualifies the broad observation that fusion helps. The gains depend on the representation going into the added kernel and can vary with how the data are evaluated.

#### Relating the cluster counts to Zipf’s law

To examine why the clustering change might help, the authors plot the number of assigned word embeddings per cluster on LaRoSeDa. Their figure includes the k-means distribution, the self-organizing map distribution and a Zipf reference. The map’s distribution looks closer to that reference. The analysis links the classifier comparison to a measurable property of the intermediate representation. The authors can inspect the group counts before attributing any learned polarity or topic to an individual group.

The distinction between word counts and cluster counts is essential here. The linguistic relation invoked by the authors ranks individual words by their frequencies. A point in the cluster distribution describes how many embeddings entered a bin, which can contain occurrences of several different words. The figures concern the transfer of an overall shape from the frequency pattern of language to the induced inventory. They do not imply that a cluster has the meaning of a word or that its members agree in sentiment.

The observed shape is consistent with the authors’ account of a map adapting to dense regions. The performance comparison and the distribution plot, taken together, associate a change in cluster populations with higher classification accuracy. Establishing a causal role for that property would require a comparison that changed the population profile while keeping other features of the partition comparable. Different cluster assignments can alter which words share bins even when the overall size profiles look similar. The paper compares the resulting distributions visually and does not report a quantitative fit or a test that isolates the effect of distribution shape.

#### Changing the task while retaining the comparison

The MOROCO experiment is an additional check on the setting in which the advantage occurs. The labels now distinguish article topics, so a benefit that required the use of ratings or strong sentiment language would have less reason to carry through. The map again improves the standalone histogram and the histogram combined with HISK. This supplies evidence of transfer across the two tasks through a fresh application of the same representation procedure.

The extension is narrower than a transfer experiment in which the exact groups learned on LaRoSeDa are evaluated on news. The paper compares ways to build document features in the news setting. Its finding concerns the usefulness of the clustering procedure there. The reported evidence covers different Romanian text collections and classification targets, and the MOROCO comparison is restricted to the Romanian BERT embedding branch.

### Limitations

#### Limits the authors identify

The authors explicitly acknowledge that ratings can give noisy labels. A reviewer can write about several aspects of a product, and the rating records an overall judgment that may not correspond cleanly to the expressed polarity of the text. An automatic rule assigns each such review a category as if the rating and text agreed. The authors leave an analysis of noisy labels and possible manual labeling to future work. There is consequently no human-checked error rate for the polarity labels in the paper.

That uncertainty affects how to read both correct and incorrect predictions. Benchmark accuracy treats an agreement with the rating-derived label as correct. For a review whose text and rating diverge, a classifier could distinguish the text in a way that a reader finds reasonable and still be counted wrong. The paper does not identify which examples have this property, so the size of the effect on the benchmark is unknown. The results assess the intended automatic labels under a disclosed source of uncertainty.

The authors also qualify the motivation for switching algorithms. Their claim is that k-means does not specifically account for density in the relevant way and that the populations it produces on LaRoSeDa are farther from the reference pattern. They recognize that k-means itself can yield differently sized groups. This qualification matters because a criticism of a particular partition objective is compatible with uneven group counts. The empirical figure shows what happened in this application and leaves room for other outcomes with different data or settings.

#### Limits of the review benchmark

LaRoSeDa measures binary polarity on selected material from one retailer. It excludes neutral reviews by construction, and its positive and negative reviews are deliberately balanced. The extreme ratings supply most examples in their respective classes. These choices make a clear benchmark, but they leave open how the same system would behave with more ambiguous evaluations, on a collection with different proportions of ratings, or on text from elsewhere. The experiment supplies evidence on the sampled task rather than an estimate for every kind of Romanian opinion.

Accuracy is reported at document level, without a breakdown by original star rating. There is no result distinguishing a one-star review from a two-star review or a four-star review from a five-star review. The results also give no separate scores for shorter and longer reviews. Those distinctions matter because the paper itself shows strong representation of the extreme ratings and unequal word totals by class. A histogram counts word occurrences, and the character kernel uses occurrence counts as well. Differences in review length could affect the evidence available to either approach. The experiments do not measure that effect separately.

There is also no reported diagnosis of which review phenomena cause errors. A polarity signal could be concentrated in a small part of a review, expressed across several statements, or weakened by competing judgments. The document accuracy combines those cases. A higher score supports the usefulness of the aggregate representation without showing how it handles each linguistic construction or why a particular review was classified correctly.

#### Limits of the clustering explanation

The comparison evaluates pipelines at a common cluster count and with a selected map configuration. The paper does not report a sweep over the number of clusters. It therefore gives no curve relating histogram size to accuracy or showing how robust the advantage is as assignments become coarser or finer. It also reports no separate comparisons for the map’s learning rate, initialization or distance choice. Those decisions belong to the tested method, but their independent effects remain unmeasured.

The accuracy figures give an ordering of the reported configurations without uncertainty intervals or a formal significance test. Cross-validation and the fixed split offer two views of LaRoSeDa, and the recurring ordering is evidence within those evaluations. Readers cannot tell from the aggregate figures how much scores varied from fold to fold or how much they would vary across fresh random initializations. That is especially relevant to interpreting closely spaced results among the stronger fusions.

The explanatory plot compares the populations of the induced groups. A population is an aggregate count and reveals little by itself about membership. Two groups of a similar size could contain words that are useful for different labels or have quite different internal coherence. The paper does not evaluate the learned clusters against sentiment annotations or inspect their semantic quality through a separate test. It also does not provide a matching population analysis for MOROCO that would show whether the visual explanation recurs on the news task.

The document histogram discards ordering at the counting stage. The word2vec route has a fixed vector for a word, while the Romanian BERT route can carry contextual information into the grouping through the vector for each occurrence. Once an assignment is counted, the feature no longer records which words were adjacent or which occurrence supplied a contribution. This puts a limit on what can be explained from the histogram. It can show that membership in some group is associated with a prediction, if analyzed further, but it cannot by itself recover how the reviewer assembled the words into a judgment.

#### Limits of reproduction and transfer

The paper specifies several choices that shape the experiments, including the word2vec preprocessing, the embedding dimensions, the kernels, the cluster count and the SVM setting. Some implementation details are less explicit. In particular, it says that the clusters were fit from training documents and describes word2vec as trained on collected Romanian reviews. It does not spell out whether that earlier embedding training was repeated within each cross-validation fold. These are different stages. The stated scope of clustering alone cannot answer the scope question for embedding training.

For Romanian BERT, the account describes a vector corresponding to each word position and emphasizes context dependence. It gives no detailed recipe for selecting the output or mapping multiple pieces of a word into the reported word-level representation. The PQ kernel is identified by name and use, while the paper gives the mathematical definition for the character kernel. The method is described clearly enough to understand what is being compared, but the article’s details alone do not specify every choice needed to reproduce the experiments independently.

The MOROCO results extend the comparison to a different task and genre within Romanian. The wider corpus includes Moldavian articles, but the reported experiment uses its Romanian portion. The evidence therefore does not establish a result across both dialect portions or in other languages. MOROCO also supplies a different reference metric in practice because a correct prediction selects a news topic from several classes. The paper uses that setting to test the portability of a clustering choice. It does not turn the accuracies from the two corpora into a single measure of how widely the advantage transfers.

### What came after

No later citing work is documented here. The MOROCO experiment belongs to the original study and uses an earlier news corpus. It is the paper’s own evidence that the clustering comparison extends beyond product-review sentiment. There is no documented follow-up establishing independent reuse of LaRoSeDa, replication of the map’s advantage, or a further test of the proposed connection between cluster populations and Zipf’s law.

## Cite

Cite as Anca Maria Tache, Mihaela Găman and Radu Tudor Ionescu. 2021. Clustering Word Embeddings with Self-Organizing Maps. Application on LaRoSeDa - A Large Romanian Sentiment Data Set. Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.18653/v1/2021.eacl-main.81](https://doi.org/10.18653/v1/2021.eacl-main.81)

```bibtex
@inproceedings{tache2021clustering,
  title = {{Clustering Word Embeddings with Self-Organizing Maps. Application on LaRoSeDa - A Large Romanian Sentiment Data Set}},
  author = {Anca Maria Tache, Mihaela Găman and Radu Tudor Ionescu},
  booktitle = {Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume},
  year = {2021},
  doi = {10.18653/v1/2021.eacl-main.81},
  url = {https://doi.org/10.18653/v1/2021.eacl-main.81}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
