---
title: "Multi-granular Legal Topic Classification on Greek Legislation"
description: "Greek Legal Code benchmarks how well classifiers identify broad and narrow topics in Greek legislation, including categories with scarce examples."
canonical: "https://research.elamur.ai/free/en/papers/papaloukas-2021-multi-granular-legal-topic-classification/"
---
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/papaloukas-2021-multi-granular-legal-topic-classification/)

[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/) / Multi-granular Legal Topic Classification on Greek Legislation

# Multi-granular Legal Topic Classification on Greek Legislation

Paper · 2021 · Christos Papaloukas, Ilias Chalkidis, Konstantinos Athinaios et al.

**Authors:** Christos Papaloukas, [Ilias Chalkidis](https://md.research.elamur.ai/free/en/authors/ilias-chalkidis/), Konstantinos Athinaios, Despina Pantazi and Manolis Koubarakis · **Year:** 2021 · **Venue:** Proceedings of the Natural Legal Language Processing Workshop 2021 · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

[**22** citations OpenAlex, 2026-10-14](https://openalex.org/works?filter=cites:W3201982822|W3212068524) · [Proceedings of the Natural Legal Language Processing Workshop 2021](https://aclanthology.org/volumes/2021.nllp-1/) · [licence](https://creativecommons.org/licenses/by/4.0/)

- [Publisher's page](https://aclanthology.org/2021.nllp-1.6/)
- [PDF](https://aclanthology.org/2021.nllp-1.6.pdf)
- [DOI 10.18653/v1/2021.nllp-1.6](https://doi.org/10.18653/v1/2021.nllp-1.6)
- [OpenAlex](https://openalex.org/W3201982822)

Citations: OpenAlex, 2026-10-14.

## Summary

A catalogue of legislation helps readers find documents by subject, from a broad area such as labour law to a specific matter such as holiday allowance. Assigning those topics automatically requires a system to recognize both the general area of a document and the finer distinctions that determine where it belongs. The authors study that problem in Greek, a language for which they identify relatively few resources for legal text processing. They release Greek Legal Code, or GLC, a collection of 47,563 legislative records drawn from an existing Greek catalogue. Its index gives each retained record a place in a hierarchy of volumes, chapters and subjects.

The paper evaluates three [text classification](https://md.research.elamur.ai/free/en/concepts/text-classification/) tasks. Each asks for a single category from one level of the hierarchy. The authors compare methods that count and weight terms, recurrent networks that read a document as a sequence, and pretrained systems adapted to the classification tasks. The most specific task has 2285 subject categories, many with very little training material. Some records provide only a title or a brief description, while others contain articles or the full legislative text.

GREEK-LEGAL-BERT, which was pretrained on Greek legal material, achieves the highest overall test F1 at each level. Its scores are 89.4 for volumes, 84.3 for chapters and 81.2 for subjects. A recurrent classifier that learns to give some words more weight than others also performs well. It reaches 86.4 at the volume level and 74.8 at the subject level. A support vector machine using weighted term features is competitive on broad volumes at 85.3, but falls to 37.9 on subjects. The recurrent system with a shared attention mechanism also outperforms its counterpart that learns a separate attention mechanism for every category.

The results are less uniform when the comparison focuses on categories with few training examples. At the subject level, GREEK-LEGAL-BERT reaches 71.4 F1 on that group, and the shared-attention recurrent classifier reaches 66.3. At the chapter level, GREEK-LEGAL-BERT and the general-purpose GREEK-BERT tie at 57.8 on the same kind of evaluation. The authors leave categories absent from training without dedicated scores. Their benchmark shows how performance changes as the catalogue asks for more specific decisions and provides fewer examples for many of them. It leaves open how much a system could gain by using the hierarchy directly or learning to recognize topics it has never seen during training.

## Deep dive: Multi-granular Legal Topic Classification on Greek Legislation

Greek Legal Code benchmarks how well classifiers identify broad and narrow topics in Greek legislation, including categories with scarce examples. · about 33 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

#### The same law can be described at several levels

A reader looking for legislation on holiday allowance might start with labour law. That broad heading provides a place to begin, but it also groups together documents about many different matters. The catalogue examined in the paper puts holiday allowance under collective employment contracts, with labour law above both. Each level presents a different classification problem. Recognizing the area of law is one decision. Distinguishing holiday allowance from other matters governed by collective employment contracts requires more specific evidence.

The paper studies how to infer the catalogue category from the text of a legislative record. The target is the category already attached to the record in the catalogue. That makes the task concrete enough to evaluate. Given a document and a level of the index, a classifier must choose one category, and its answer can be checked against the recorded placement. The same document can support evaluations at several levels because its catalogue entry has a position at each level.

That setup reflects a practical need the authors identify in [Legal AI](https://md.research.elamur.ai/free/en/topics/legal-ai/). Legal practitioners work with large collections of documents, much of the material arrives as text, and reviewing or organizing it takes time. A thematic index offers one route into such a collection. Classifying a record by its topic supports that organization. Other legal language tasks ask for different outputs, such as the name of an entity, an obligation expressed in a contract, or the likely outcome of a case. The paper treats those activities as neighbouring applications with their own objectives. Its evidence concerns the assignment of catalogue topics to legislative records.

The catalogue is also a source of decisions about where the boundaries between topics lie. Some distinctions reflect the institutional or legal context of a document. Others turn on the matter covered by the provisions within it. The paper gives examples from criminal law. The catalogue has separate chapters for international and military criminal law. Under international criminal law are subjects such as genocide and counterfeiting. Under military criminal law are entries such as the military criminal code and legal remedies. These labels are arranged as branches of an index, so a subject is meaningful in relation to the chapter above it. The experiments use those labels as given.

#### What earlier legal classification studies had tried

The authors trace legal topic classification back to work with laws from EUR-LEX, the European legal database. Those laws carried EUROVOC concepts, and a document could receive several of them. Early systems represented the text through the words or expressions it contained and trained perceptrons, classifiers that learn weighted decisions from examples. Some of those systems assigned a separate binary decision to each category. The relevant distinction for GLC is the form of the answer. A multi-label task permits several correct categories for a document. GLC’s experiments require a single choice at the level being studied.

Another early study looked at 5.5k US court docket entries. In the paper’s account, that study emphasized feature selection and found that a representation based on the vocabulary occurring in a text could miss distinctions important to specialized language. A support vector machine can build a strong decision rule over the features it receives. Its access to context still depends on how those features describe the text. The GLC experiments keep a vocabulary-based support vector machine as a baseline so that richer representations have to demonstrate their value against an established approach.

A closer parallel for variable topic granularity came from work on 8k US Supreme Court opinions. That study set up a broad classification task with 15 categories and a finer one with 279. Its strongest evaluated combination used Word2Vec and a convolutional network. It reported 72.4% accuracy on the broad task and 31.9% on the fine task. The authors of that study suggested trying recurrent networks with legal word representations. For the Greek study, the precedent is useful because it provides a reason to evaluate coarse and fine classification separately. The scores themselves refer to court opinions, a different taxonomy and a different collection.

Work on EURLEX57k supplied another line of comparison. That collection contains 57k legislative documents in English, and its task allows multiple labels per document. As summarized by the Greek study, recurrent systems using bidirectional gated units and shared attention performed well against convolutional systems with category-specific attention. Legal word representations and context-sensitive representations also helped in those experiments. The authors point to the finding that pretraining could further improve results and include the contextual representation work associated with ELMo among the relevant precedents. [Deep Contextualized Word Representations](https://md.research.elamur.ai/free/en/papers/peters-2018-deep-contextualized-word-representations/)

The paper also reviews a broader comparison of large label spaces. It describes tests of recurrent networks, probabilistic label trees and pretrained attention-based systems. Probabilistic label trees organize the decision over categories into a sequence of choices through a tree. A comparison of that kind asks, among other things, whether organizing the labels or improving the representation of the text pays off. The Greek study borrows much of its classifier selection from this line of work. It changes the setting to single-category assignments and uses a taxonomy that was already part of a Greek legislative catalogue.

#### Why the Greek setting mattered

Much of the legal language research discussed in the paper concerned English, and the authors identify Chinese as another main focus in the field. Their account of Greek research includes work on sentiment, language resources and the identification of offensive language. They also cite work on named entities in Greek legislation. Together those precedents established that several components were available, including word representations learned from Greek law, while leaving open the question of how to classify entire Greek legal records by theme. [Offensive Language Identification in Greek](https://md.research.elamur.ai/free/en/papers/pitenis-2020-offensive-language-identification-greek/)

The study brings two features together that are easy to consider separately. It concerns a language with fewer resources in the authors’ account, and it uses a catalogue whose fine categories vary greatly in the number of available examples. A Greek classifier can benefit from representations learned from other text before it sees topic labels. Its task-specific training still depends on what the catalogue contains. A detailed index can therefore pose a data problem even when there is substantial material for the broad areas of law. Making a benchmark from the catalogue lets the authors examine those conditions within the same collection.

### The method, step by step

#### Turn the catalogue into individual records

The starting point is the Raptarchis catalogue, a thematic collection covering Greek legislation from 1834 until 2015. It includes laws, decrees, regulations and decisions drawn from the Official Government Gazette. The digital catalogue was offered through the e-Themis service as Word documents. A volume grouped many legislative items under a common theme, and the text carried the chapter and subject divisions that gave those items their position in the index.

The authors first had to recover the text and its structure. The Word files varied in layout. Many used columns, some included single-column passages, and the collection could also include scanned material or images. The authors used the docx2txt utility to obtain plain text. The conversion removed formatting and sometimes disturbed information that marked where a category began. A subject marker might be missing or misspelled, for instance, or a subject identifier that belonged on its own line might appear next to the heading. The authors used regular expressions, which detect patterns in text, and other rules to normalize whitespace, line breaks, corrupted characters and structural markers.

A rule-based Python parser then recovered the catalogue hierarchy and separated the legislative items. It built a tree of depth 4. Volumes occupy the broadest thematic level, chapters lie within volumes, and subjects lie within chapters. Individual legal records occupy the leaves. The distinction between a subject and a leaf matters. A subject names a class that can contain many records. A leaf is a particular item whose text will be used to train or evaluate a classifier.

For each item, the parser recovered metadata such as its identifier, publication year, document type and title. It also attempted to find the article boundaries in the item’s body. When the text supported that division, the record retained the individual articles. Otherwise, the parser stored the body as a single passage. Some entries supplied an original title or short description, some supplied selected articles, and some supplied the full legislative text. Each final record included a header and whatever body the curation procedure was able to retain. The paper describes article boundaries as part of the dataset structure. The tested classifiers ultimately produce a category for the whole record.

The metadata also provided a way to find duplicates. The parser identified a legislative item by the combination of its type, publication year and identifier. The catalogue could list the same law under different subjects, for instance when separate provisions dealt with distinct matters. The authors removed repeated resources entirely to produce a dataset with a single intended classification for each retained item. This choice defines which cases are available to the classifiers. It removes items for which repeated catalogue placement itself supplied evidence of multiple valid topics.

Where the document type allowed it, the parser sought a fuller text from Nomothesia, a platform for Greek legislative linked data. It looked up the item by the same identifying fields and obtained the text in JSON form. The parser compared the number of tokens in the catalogue text and the retrieved text and kept the more extensive version. This step could add legislative content to records whose original text was short. The paper illustrates it with a final JSON record whose body contains articles recovered from Nomothesia. The completed GLC dataset stores each legal item and its associated metadata in a separate JSON file. The authors make GLC and the experimental code publicly available.

From the Raptarchis catalogue to topic predictions The steps in order.

#### Set up a separate task at each catalogue level

GLC contains 47 volumes, 389 chapters and 2285 subjects. For a given experiment, each record supplies the text and the correct category at the chosen level. A volume classifier chooses among volume names. A subject classifier chooses among subject names from across the collection. The finer tasks make distinctions within the same broad area and can also require distinguishing subjects from different areas. In the described setup, a predicted volume does not restrict which chapters or subjects the other classifiers can consider.

The authors divide the records into training, development and test sets. They aim for a consistent partition across the hierarchy, from individual subjects up through broader divisions. Training is where a system learns from labelled texts. Development is where the authors compare settings and select a trained system. The test set supplies the held-out results. The allocation preserves the imbalances in the catalogue, so a training split can contain ample material for a volume while leaving a subject underrepresented or absent.

The study groups the labels by their training support. A frequent class has more than 10 training documents and is represented across the splits. The prose defines a few-shot class as having 1 to 10 training examples and occurring in both development and test. The table headings use the shorthand `<10` for few-shot, while the prose includes the upper boundary. A zero-shot class has examples in development or test, or both, and none in training. Here, [few-shot learning](https://md.research.elamur.ai/free/en/concepts/few-shot-learning/) is relevant as a research area, but the paper’s few-shot label describes how many examples an ordinary supervised classifier gets for a particular category. The authors evaluate how the same training procedure handles categories with different amounts of data.

#### Build baselines from the expressions in a document

The first family uses a bag-of-words representation. Each document becomes a vector of features corresponding to expressions observed in the training corpus. The features include [n-grams](https://md.research.elamur.ai/free/en/concepts/n-gram/), contiguous sequences of tokens. An n-gram can retain local word order within the expression. The feature vector records which expressions appear and how strongly they are weighted, while its organization carries no record of where in the document each occurrence appeared.

The weighting is [TF-IDF](https://md.research.elamur.ai/free/en/concepts/tf-idf/), short for term frequency–inverse document frequency. It combines information about an expression’s occurrence in an individual record and its prevalence across the collection. The representation can give substantial weight to a distinctive expression that occurs in a document, even when the expression contributes only a small share of its text. The authors choose frequent candidate n-grams from the training data, and their search considers different n-gram ranges and feature budgets.

SVM-BOW applies a support vector machine to those vectors. The classifier learns boundaries between categories in the feature space. The authors search linear and radial basis function kernels. That choice changes how the classifier measures relationships between feature vectors and what kinds of boundaries it can express. Their search also varies the penalty setting and considers feature caps of 200k and 400k. The baseline can make use of terms and short expressions that are strong signs of a topic without needing to build a contextual representation of every word.

XGBOOST-BOW receives the same type of TF-IDF representation and uses boosted decision trees. A tree makes a sequence of decisions based on feature values. Boosting adds trees whose training is guided by the loss left by the preceding ensemble. The search varies tree depth and the minimum child weight, a setting that influences whether a tree can make a split with limited support. The paper specifies 800 estimators and a softmax output for the multiclass decision. Comparing this system with SVM-BOW shows how two different classifiers perform over similar lexical evidence. [XGBoost](https://md.research.elamur.ai/free/en/papers/tianqi-2016-xgboost-scalable-tree-boosting-system/)

#### Read the text as a sequence and combine the word representations

The recurrent classifiers begin with pretrained [word embeddings](https://md.research.elamur.ai/free/en/concepts/word-embeddings/). An embedding is a vector that represents a word numerically. The paper uses Word2Vec representations learned on Greek legal corpora that include national and European Union legislation. This gives the classifiers a starting representation learned from legal language before they are trained to predict a GLC label.

Each input word has an initial vector, denoted wᵢ for the word in position i. A stack of bidirectional gated recurrent units, or BiGRUs, turns those vectors into context-dependent ones. A recurrent unit updates its representation as it moves through the text, carrying information from earlier positions in its processing order. A bidirectional encoder processes the sequence in both directions, so the vector at a word can reflect surrounding material on either side of it. The result is a sequence of vectors hᵢ, where hᵢ represents the word in position i after the encoder has taken its context into account.

A classifier still needs to combine the sequence into evidence for the whole record. BIGRU-MAX uses max pooling. For each vector component it keeps the largest value that occurs anywhere in the sequence. Different components can come from different positions, so the resulting vector can collect several conspicuous signals from across a document. A dense output layer converts that vector into a score for each category. Softmax turns the scores into a distribution over the categories. The category with the highest probability is the prediction.

BIGRU-ATT uses the same kind of input embeddings and recurrent encoder. Its document representation comes from a weighted combination of the contextual vectors. A trainable vector compares itself with each word representation through a dot product. Exponentiation produces positive values, and dividing each value by the total across the document normalizes them. This gives the following attention weight for each position.

```
aᵢ = exp(hᵢᵀu) / Σⱼ exp(hⱼᵀu)
```

Here aᵢ is the weight for position i. The vector hᵢ is the encoder output at that position, and u is the learned attention vector shared across all categories. The superscript ᵀ denotes a transpose, so hᵢᵀu is the dot product of the two vectors. The function exp is the exponential. The summation Σⱼ runs over word positions indexed by j, with hⱼ giving the corresponding encoder output. The slash divides the value at i by the common normalizing total. The equals sign states the value of the weight.

The normalized weights determine how much each contextual vector contributes to the document representation. In the paper’s equation, the weighted sum also has a factor based on the length of the document.

```
d = (1/T) Σᵢ₌₁ᵀ aᵢ hᵢ
```

The vector d represents the whole document. The symbol T is the document length in words, and 1/T is its reciprocal. In the sum, i runs from the first word through position T. Each term is the vector hᵢ multiplied by its attention weight aᵢ. The equals sign defines the resulting document vector. The dense layer and softmax use that shared vector to produce the category probabilities.

This design gives each record its own distribution of attention over words. The learned vector u is common to the categories, while the contextual vectors change from record to record. A term can therefore receive a different weight depending on the words around it. The output layer sees the resulting document representation and learns which of its components support each category. The paper draws on prior uses of attention to aggregate representations. [Show, Attend and Tell](https://md.research.elamur.ai/free/en/papers/xu-2015-show-attend-tell-neural-image/)

#### Give each category its own view of the text

BIGRU-LWAN implements label-wise attention. Each category has its own trainable attention vector. The motivation is that different parts of a record can carry evidence for different labels. A word that helps decide whether a record concerns a given chapter could matter little to the decision about another chapter. Using separate attention weights lets each candidate category draw on a different combination of the same contextual word vectors. The approach follows a label-wise network originally used to predict medical codes and later adapted to legal documents with a recurrent encoder. [Explainable Prediction of Medical Codes from Clinical Text](https://md.research.elamur.ai/free/en/papers/mullenbach-2018-explainable-prediction-medical-codes-clinical/)

```
aₗᵢ = exp(hᵢᵀuₗ) / Σᵢ′ exp(hᵢ′ᵀuₗ)
```

Here l identifies a category, and i is a word position. The weight aₗᵢ measures the contribution of position i to the representation for category l. The vector uₗ is the learned attention vector for that category. The contextual vectors hᵢ and hᵢ′ refer to positions i and i′, respectively. The prime distinguishes the summation index i′ from the position whose weight is being calculated. The transpose ᵀ allows the dot product with uₗ, and exp exponentiates that product. The summation Σᵢ′ adds the exponentiated products at all word positions for the same category. The slash gives the normalized weight, and the equals sign defines it.

```
dₗ = (1/T) Σᵢ₌₁ᵀ aₗᵢ hᵢ
```

The vector dₗ is the document representation for category l. The quantity T is the number of words, 1/T is its reciprocal, and i indexes the words from the first position through T. Each summand scales the contextual vector hᵢ by that category’s weight aₗᵢ. The equals sign assigns the scaled sum to dₗ. As in the shared-attention equation, the factor 1/T appears outside the sum.

There are L such representations, with L denoting the number of candidate classes at the chosen level. Each category’s document vector goes through its own dense scoring layer. The resulting category scores then enter one softmax, so they compete in the final prediction. Shared attention moved the category-specific part of the decision to the output scoring layer. Label-wise attention introduces category-specific parameters at the earlier stage where the classifier selects and combines word evidence.

#### Adapt pretrained encoders to the same prediction task

The final family uses the [Transformer and attention](https://md.research.elamur.ai/free/en/concepts/transformer/) architecture. These systems begin with encoders trained on large text collections and use the labelled GLC examples to adapt them to the downstream task. The paper calls that adaptation [fine-tuning](https://md.research.elamur.ai/free/en/concepts/fine-tuning/). The encoder represents the text in context and provides a special classification position whose output acts as a vector for the record. A linear layer reads that vector and supplies the category scores. A softmax produces the final distribution over volume, chapter or subject categories. The classification head follows the arrangement described for [BERT](https://md.research.elamur.ai/free/en/papers/devlin-2019-bert-pre-training-deep-bidirectional/).

The authors compare two multilingual encoders. M-BERT is the multilingual cased version of BERT-BASE and supports modern Greek alongside 99 other languages. XLM-RoBERTa is a multilingual adaptation of [RoBERTa](https://md.research.elamur.ai/free/en/papers/liu-2019-roberta-robustly-optimized-bert-pretraining/). The paper describes it as covering 100 languages and using 2.5TB of filtered Common Crawl material during pretraining. These encoders make it possible to test how a system trained across languages performs when the downstream documents are all in Greek. [Unsupervised Cross-lingual Representation Learning at Scale](https://md.research.elamur.ai/free/en/papers/conneau-2020-unsupervised-cross-lingual-representation-learning/)

The other encoders specialize in modern Greek. GREEK-BERT uses 29GB of material from the Greek portions of Wikipedia and Europarl, together with text from OSCAR. GREEK-LEGAL-BERT uses around 5GB of Greek and EU legislative material obtained through Nomothesia. Both follow the same downstream classification setup as the multilingual encoders. Their training collections differ in domain and composition, which gives the authors a comparison of available pretrained systems with different backgrounds. The paper describes the BERT-family runs as using base configurations with 12 layers and 12 attention heads per layer.

#### Tune on development data and evaluate on held-out records

The authors tune the main settings of each method before choosing what to evaluate. For most methods, they try combinations in a grid. For the recurrent networks, they use HyperOpt because the search covers a larger space. That space includes recurrent depth and width, dropout, word dropout and batch size. Dropout is a training mechanism that temporarily withholds parts of the representation. Word dropout works at the level of the input words or their representations. The search lets the recurrent variants find suitable training settings for their respective document encoders.

For the pretrained encoders, the paper specifies dropout of 0.1 and a batch size of 8. It tests learning rates of 1e-5, 2e-5, 3e-5 and 5e-5. The learning rate controls the size of parameter updates. The paper reports early stopping based on development loss with the [Adam](https://md.research.elamur.ai/free/en/papers/kingma-2014-adam-method-stochastic-optimization/) optimizer. Development loss measures how well the current parameters fit the development examples under the training objective. Monitoring it gives a basis for deciding when to stop updating the network. The final comparisons use the selected settings on the test data, with scores averaged over 5 runs using different seeds.

### Experiments and results

#### What is in the test and what the scores measure

GLC contains 47,563 records. The training share is 60%, the development share is 20%, and the test share is 20%. The paper gives a test count of 9516 documents and a mean length of 595 tokens for that split. Across GLC as a whole, the mean is 594 tokens, and 54% of records have less than 100 tokens. A classifier may thus see an extensive legal text in one example and a compact title or description in another. The reported scores pool over those forms of evidence.

The distribution of labels gives the volume and subject tasks different properties. All 47 volume categories count as frequent. At the chapter level, 333 of the 389 classes are frequent, 53 are few-shot and 3 have no training examples. The paper reports that frequent chapters account for 99.0% of the documents in the full collection. The few-shot chapter figures therefore describe a small share of records, even though the categories themselves account for a larger share of the index.

At the subject level, the full collection contains 712 frequent categories, 1431 few-shot categories and 142 zero-shot categories. Frequent subjects account for 80.9% of documents, and few-shot subjects account for 18.6%. These are corpus statistics, covering the whole collection. They describe how common the records are for each label group. The classification numbers that follow concern performance on the held-out test split. The distinction matters in particular for the rare categories, where a count of labels says how broad the coverage problem is and a count of documents says how much influence those labels can have on a pooled metric.

The paper reports micro-averaged precision, recall and F1. Precision measures how many predictions credited to a label group are correct. Recall measures how many gold assignments in that group the system recovers. F1 combines precision and recall through their harmonic mean, so weak recall can limit F1 even when precision is high. Micro-averaging pools the underlying decisions across labels. Categories with more records can therefore contribute more to the resulting score than categories with very few.

In the overall columns, each document has one expected topic and each method makes one choice. The paper reports the same value for overall precision, recall and F1 at each level. For the frequency groups, the values can differ because a prediction can cross the boundary between groups. A classifier can, for example, choose a frequent subject for a document that belongs to a few-shot subject. That error depresses recall for the rare group. The paper supplies separate frequent and few-shot columns where those groups exist and omits separate zero-shot scores.

#### Broad themes are within reach of several approaches

At the volume level, GREEK-LEGAL-BERT leads with an overall test F1 of 89.4. GREEK-BERT is next at 87.5, and BIGRU-ATT reaches 86.4. These are scores for assigning one broad volume to a record across all volume categories. Because every volume category counts as frequent, the overall and frequent-label results are identical at this level.

The weighted vocabulary baseline is competitive here. SVM-BOW scores 85.3, ahead of BIGRU-MAX and BIGRU-LWAN at 84.3 and 84.1. M-BERT reaches 85.8 and XLM-RoBERTa reaches 85.0. The broad task gives many of these methods enough information to identify the general area of a document. A useful broad topic can often be specified by cues that are available to a vocabulary-based classifier as well as to a system that reads words in context.

XGBOOST-BOW is the exception in this group of results. It records 77.2 overall test F1 in spite of using the same kind of weighted term features as the stronger support vector baseline. That comparison puts the choice of classifier in view. The volume-level results for SVM-BOW show that term features contain useful signals. The boosted-tree result shows that the way a system learns to use those signals also matters in this setup.

GLC volume classification, overall test micro-F1 Greek legal pretraining leads the volume task, with several recurrent and vocabulary-based systems remaining competitive.

**The numbers**

| System or setting | micro-F1 |
| --- | --- |
| XGBOOST-BOW | 77.2 |
| BIGRU-LWAN | 84.1 |
| BIGRU-MAX | 84.3 |
| XLM-ROBERTA | 85.0 |
| SVM-BOW | 85.3 |
| M-BERT | 85.8 |
| BIGRU-ATT | 86.4 |
| GREEK-BERT | 87.5 |
| GREEK-LEGAL-BERT (this paper) | 89.4 |

#### The chapter task reveals the cost of missing rare labels

On chapters, GREEK-LEGAL-BERT again has the highest overall test F1 at 84.3, followed by GREEK-BERT at 82.4. BIGRU-ATT reaches 81.1, ahead of XLM-RoBERTa at 80.6 and M-BERT at 80.2. This is a case where the strongest recurrent system slightly exceeds the multilingual systems even though the monolingual Greek encoders lead. The ordering depends on which member of each family is used.

SVM-BOW scores 77.9 overall on chapters, BIGRU-MAX scores 77.5, and BIGRU-LWAN records 76.8. XGBOOST-BOW has the lowest overall chapter F1 at 67.5. The recurrent results show that the way contextual vectors are aggregated can matter at this intermediate level. BIGRU-ATT and BIGRU-MAX start with the same kind of recurrent encoding and legal embeddings, and the shared-attention version has the stronger result.

The scores for few-shot chapters reveal errors that carry little weight in the overall figures. SVM-BOW reaches 90.0 precision in that group, but its recall is 09.3 and its F1 is 16.8. Its rare-chapter predictions are frequently correct when it makes them. It recovers only a small fraction of the test examples assigned to those chapters. XGBOOST-BOW has few-shot chapter F1 of 13.4, with precision of 19.2 and recall of 10.3. The two vocabulary baselines therefore yield similarly low F1 for the rare chapters through different precision and recall profiles.

BIGRU-MAX reaches 45.1 test F1 for few-shot chapters, and BIGRU-ATT reaches 54.9. M-BERT scores 56.6, and XLM-RoBERTa scores 51.3. The best reported F1 in this group is 57.8, shared by GREEK-BERT and GREEK-LEGAL-BERT. Their precision and recall differ. The general Greek encoder records 81.0 precision and 45.2 recall, while the Greek legal encoder records 79.0 precision and 45.8 recall. The overall lead of the legal encoder therefore coexists with a tie under the narrower chapter evaluation.

#### The finest categories separate the strongest and weakest systems

At the subject level, GREEK-LEGAL-BERT reaches 81.2 overall test F1, followed by GREEK-BERT at 79.4. XLM-RoBERTa records 78.0 and M-BERT records 76.8. BIGRU-ATT remains the strongest recurrent classifier at 74.8. This time both multilingual encoders are ahead of it on the overall metric. BIGRU-LWAN has 65.2 and BIGRU-MAX has 62.9.

The lexical baselines change order at the subject level. XGBOOST-BOW reaches 55.3 overall test F1 and SVM-BOW reaches 37.9. The support vector classifier that handled broad volumes reasonably well has the weakest overall result on this finer task. A reader choosing a baseline for thematic indexing therefore has to specify the desired granularity. The coarse-level outcome alone would give an incomplete picture of the subject-level comparison.

GLC subject classification, overall test micro-F1 The Greek legal encoder leads the fine-grained task, where the vocabulary baselines trail the recurrent and pretrained encoders.

**The numbers**

| System or setting | micro-F1 |
| --- | --- |
| SVM-BOW | 37.9 |
| XGBOOST-BOW | 55.3 |
| BIGRU-MAX | 62.9 |
| BIGRU-LWAN | 65.2 |
| BIGRU-ATT | 74.8 |
| M-BERT | 76.8 |
| XLM-ROBERTA | 78.0 |
| GREEK-BERT | 79.4 |
| GREEK-LEGAL-BERT (this paper) | 81.2 |

For frequent subjects, GREEK-LEGAL-BERT is still the leader at 84.2 test F1. GREEK-BERT scores 82.2, XLM-RoBERTa 81.8 and M-BERT 81.1. BIGRU-ATT reaches 77.4. Frequent-subject performance helps explain why the aggregate score can look considerably stronger than the result on the least supported part of the label space. Those frequent subjects include most of the corpus records.

The few-shot comparison changes some of the intermediate ranks. BIGRU-ATT reaches 66.3 F1, ahead of XLM-RoBERTa at 65.0 and M-BERT at 62.0. GREEK-BERT and GREEK-LEGAL-BERT lead at 70.6 and 71.4. The legal encoder obtains 69.4 recall for the few-shot subjects, alongside 73.6 precision. GREEK-BERT records 67.0 recall and 74.6 precision. The legal encoder’s stronger F1 in that group accompanies higher recall, while the general Greek encoder has the higher precision.

BIGRU-LWAN reaches 45.0 on few-shot subjects, and BIGRU-MAX reaches 42.0. The lexical baselines place lower. XGBOOST-BOW has 27.2 F1, with 19.1 recall. SVM-BOW reports 00.0 for precision, recall and F1 in the few-shot subject group. That result applies to this baseline, these labels and this split. Its overall subject score includes cases from other labels. Keeping the group and overall figures visible makes clear where the classifier’s subject-level successes are concentrated.

GLC few-shot subject classification, test micro-F1 Greek pretrained encoders lead, and shared recurrent attention exceeds both multilingual encoders on this subset.

**The numbers**

| System or setting | micro-F1 |
| --- | --- |
| SVM-BOW | 00.0 |
| XGBOOST-BOW | 27.2 |
| BIGRU-MAX | 42.0 |
| BIGRU-LWAN | 45.0 |
| M-BERT | 62.0 |
| XLM-ROBERTA | 65.0 |
| BIGRU-ATT | 66.3 |
| GREEK-BERT | 70.6 |
| GREEK-LEGAL-BERT (this paper) | 71.4 |

### What the ablations show

#### The comparison closest to an ablation changes how the document is summarized

The paper gives closely related architecture comparisons and analyses by label frequency, while leaving dedicated component ablations for future work. Its recurrent variants provide the closest comparison to changing one component. They use the same kind of pretrained legal word representations and bidirectional encoder. Their main architectural difference is the operation that turns a sequence of contextual word vectors into the evidence used for classifying the document. Each method still goes through tuning, so the comparison is between trained variants selected for the task.

Replacing max pooling with shared attention accompanies improved overall F1 at every level. On broad volumes, BIGRU-ATT reaches 86.4 and BIGRU-MAX reaches 84.3. On subjects, the corresponding overall scores are 74.8 and 62.9. In the few-shot subject group, they are 66.3 and 42.0. The pattern is consistent with the authors’ view that weighting contextual evidence across a document can help when the final decision requires more specific information. Max pooling retains the largest activation for each component. Shared attention can form the document vector from several positions, with their contributions learned from the classification task.

The attention comparison also bears on interpretation. The network learns the weights because they help form a representation for classification. The experiment reports better label prediction. It offers no independent assessment of whether a legal reader would identify the same words as decisive, and attention weights can reflect the wider context carried by each vector. The strongest inference comes from the predictive comparison between aggregation methods.

#### Category-specific attention does not improve on shared attention here

BIGRU-LWAN has the capacity to assign different parts of the same document to different candidate categories. It still trails BIGRU-ATT across the overall comparisons and on the few-shot groups reported. At the chapter level, shared attention obtains 54.9 few-shot test F1 and label-wise attention obtains 41.7. For few-shot subjects, the values are 66.3 and 45.0. Label-wise attention does improve over max pooling on the overall subject task. The order of recurrent methods at that level therefore favours both attention-based versions over max pooling, with a substantial advantage for shared attention.

The authors relate the weaker label-wise result to the competitive structure of the single-label task. In the label-wise architecture, separate representations produce separate scores, and softmax then makes those scores compete. Each category can emphasize the context most favourable to itself. The authors speculate that the resulting scores can compete poorly when the objective allows one answer. That explanation connects the architecture to the result. The study does not isolate the score competition by changing the normalization or by testing the same records with multiple valid labels.

The comparison also raises a question about data support. A shared attention vector receives training signals from records across the category set. A category-specific attention vector belongs to a particular category’s scoring path. The architecture therefore distributes the work of learning to aggregate the text differently. The rare-label results show where the shared design works better in this benchmark. The experiments do not independently vary the amount of training evidence for the same categories, so they leave the role of support in explaining that advantage unresolved.

#### Pretraining comparisons show performance under bundled differences

The Greek legal encoder is the strongest overall system at all levels, and the general Greek encoder also leads the multilingual systems on those same overall scores. The authors propose that prior exposure to Greek legal texts contributes to the legal encoder’s advantage. The comparison supports the usefulness of the particular Greek legal encoder evaluated here. The pretrained systems differ in their text collections and training setup, so the measured ordering combines language coverage, domain and other properties of pretraining.

The recurrent results pose a related attribution question. Legal Word2Vec embeddings are common to the recurrent variants. BIGRU-ATT’s competitiveness shows what that recurrent architecture can achieve with those embeddings. The study does not repeat it with a matched set of general-purpose Greek embeddings. Its strongest recurrent comparison therefore concerns aggregation over the encoded legal text. The independent contribution of legal pretraining to the word vectors remains open.

The authors also suggest that sub-word units could help with the variation of word forms in Greek and that multiple attention heads could capture details useful for fine categorization. [Subword tokenization](https://md.research.elamur.ai/free/en/concepts/subword-tokenization/) represents words through smaller units, allowing related forms to share some input pieces. That provides a plausible mechanism for improving the representation of Greek text. Testing it separately would require changing the unit of input while keeping other parts of the comparison sufficiently stable. The paper proposes a recurrent system with pretrained sub-word representations as one way to examine the possibility.

#### The frequency breakdown changes what counts as a strong result

The paper’s most informative evaluation analysis compares aggregate scores with scores for labels that have little training evidence. The volume task has no such subdivision. In the chapter task the rare categories account for a small share of documents, and the overall score gives their errors correspondingly little influence. The subject task gives the few-shot group a larger presence. Performance on that group still differs markedly from performance on frequent subjects.

The breakdown also prevents an aggregate rank from being read as a rank for every use. At the subject level, both multilingual encoders score above the shared-attention recurrent classifier overall. The recurrent classifier scores above both on the few-shot subjects. For chapters, the general and legal Greek encoders share the best few-shot F1 while their overall scores differ. The choice of which part of the label space to evaluate can therefore change the conclusion about which method performed best. The source of that change is observable in the reported scores, even where the underlying mechanism remains uncertain.

### Limitations

#### Limits identified by the authors

The authors identify class imbalance and data scarcity as central limitations of the benchmarked methods. Some subjects have few opportunities to contribute a positive training example, and others have none. The authors describe the tested classifiers as incapable of zero-shot learning and omit a dedicated zero-shot evaluation. They suggest methods that could use label descriptions or the relationships among labels to help in that setting. The reported results establish the supervised comparison for the available data. Recognition of subjects absent from training remains a separate question.

The authors also leave direct use of the class hierarchy to future work. The catalogue links each subject to a chapter and volume, and the release preserves those links. The evaluations train and score a prediction separately at each level. This setup leaves open whether reasoning over the links would improve a fine-level choice, or whether joint prediction would produce more useful results across the catalogue. The paper points to hierarchy-aware classification as an existing research direction. [HDLTex](https://md.research.elamur.ai/free/en/papers/kowsari-2017-hdltex-hierarchical-deep-learning-text/)

The suggested explanations for the architecture results are likewise provisional. The paper proposes more data and component comparisons to test the roles of sub-word representations and attention. Its broad observation that multilingual encoders are competitive also comes with a practical question about the effort required to pretrain in a particular language. The paper compares predictive performance. It provides no measured training-cost comparison that would resolve when building a specialized encoder is worthwhile.

Finally, the authors identify evaluation on related legislation as future work. They propose European Union legislation written in Greek as another setting, and they mention Cypriot legislation for studying transfer beyond the Greek national collection. A common language can make such a comparison feasible while leaving the source of the documents and their categorization different. The reported rankings come from GLC.

#### Limits that follow from the setup

The release answers a narrower question than classification of every item in the original catalogue. A law listed in more than one place is removed during curation. That makes a single-answer evaluation tractable, and it also excludes a recognizable type of legal document. An instrument can deal with several topics through different provisions, and repeat placements can reflect that character of the text. The benchmark does not measure how accurately a system could recover several catalogue placements for such an instrument. It also gives no estimate of the performance change that would follow from retaining those records in a multi-label version of the task.

The evaluation uses the catalogue assignment as the answer. As a result, it measures agreement with the existing index. It offers no separate assessment of how legal experts would resolve ambiguous classifications, which errors they would consider tolerable, or whether another plausible category would still help a reader find the document. Legal interpretation and retrieval usefulness would each require criteria beyond the classification scores given here.

Record length is another source of variation. A descriptive title can state the topic almost directly. A full law can include many provisions, qualifications and references, with the evidence for the catalogue label spread across its text. The authors observe that some short entries use strongly representative words and give an example. They publish aggregate length statistics but give no performance breakdown by length, degree of text completeness or whether Nomothesia supplied a longer version. The reported F1 therefore applies to the mix of records in the test split. It gives limited guidance about which forms of evidence each classifier handles best.

The paper describes a split intended to maintain the same proportions across levels of the hierarchy. It gives no evaluation organized around a later publication period, and it does not report performance by year or document type. Held-out test results show performance on the benchmark partition. Assessing how easily a classifier could handle changes in drafting conventions, legislation or the topics represented over time would require evidence organized for that question.

The Greek legal encoder draws its pretraining material from Nomothesia, which also supplied fuller text for some GLC records. This shared source leaves a question about the relationship between the pretraining corpus and the benchmark documents. The paper gives no overlap analysis. The available results cannot determine how much of the benefit comes from familiarity with legal writing in general and how much might be associated with familiarity with particular texts. A shared source alone establishes neither the extent of overlap nor its effect on downstream performance.

The target granularity also changes several things together. A subject is more specific than a volume, the candidate set is larger, and support is more uneven across subject labels. A decline in performance between these levels shows what happens under the resulting combination of conditions. It cannot isolate the effect of any one of them. Likewise, frequent and few-shot labels are the naturally occurring categories in this collection. They can differ in the clarity of their wording and the variety of the documents they contain as well as in the number of examples. The few-shot scores describe an important part of GLC, while a controlled study of training quantity would hold the category fixed and vary its support.

Finally, the paper reports averages over different random seeds and gives no run-to-run spread or significance tests in its result tables. Close scores can be read as the reported ordering of the averages. The study gives limited evidence about the stability of small rank differences. The clearest empirical patterns are the lead of GREEK-LEGAL-BERT on overall F1 at each level, the advantage of shared recurrent attention over max pooling, and the weaker results many methods obtain on the sparsely represented labels.

### What came after

The later citations place the Greek study in research on legal language evaluation, legal NLP surveys and multilingual text representations. Their relationship to the study can be described at the level of their stated scope. A citation establishes that a later work refers to the Greek classification study. The details of a particular data inclusion, adapted task or experimental reuse require a corresponding account of what the citing work did.

[LegalBench](https://md.research.elamur.ai/free/en/papers/guha-2023-legalbench-collaboratively-built-benchmark-measuring/) (2023) is a collaboratively built benchmark for measuring legal reasoning. Its scope extends to the evaluation of legal reasoning capabilities, while the Greek study measures agreement with topics in a legislative catalogue. The citation connects two efforts to make legal language evaluation concrete through specified tasks. The Greek study’s contribution to that conversation is an evaluation across levels of thematic specificity, with separate evidence for categories with little training data. The citation alone leaves open whether LegalBench reused any GLC records or classification tasks.

[LEXTREME](https://md.research.elamur.ai/free/en/papers/niklaus-2023-lextreme-multi-lingual-multi-task/) (2023) concerns multilingual and multitask evaluation in the legal domain. It takes up a broader version of the evaluation setting in which the Greek study is relevant. GLC supplies a specific example of legal classification in Greek, together with differences among tasks defined by granularity. LEXTREME’s scope places legal tasks and languages together in a benchmark setting. The citation identifies the Greek work as part of that research context. The particular treatment of GLC and its volume, chapter or subject targets cannot be established from the citation alone.

[Natural Language Processing for the Legal Domain](https://md.research.elamur.ai/free/en/papers/ariai-2024-natural-language-processing-legal-domain/) (2024) surveys legal language processing tasks, datasets, systems and challenges. Its connection is through that survey scope. The Greek classification paper contributes an example that combines legislative documents, a thematic index and a language whose legal resources its authors describe as limited. It also gives concrete instances of challenges a survey can identify across studies, including uneven category frequencies and the distinction between having a detailed taxonomy and using it during prediction. The citation establishes coverage in the survey’s literature without specifying how extensively it treats individual experiments.

[MMTEB](https://md.research.elamur.ai/free/en/papers/enevoldsen-2025-mmteb-massive-multilingual-text-embedding/) (2025) is a multilingual benchmark for text embeddings. Its stated evaluation target is the quality of text representations across languages. The connection to GLC is that the Greek paper tests how several ways of representing text support a measurable downstream assignment, from broad legal areas to specific subjects. The Greek study also compares multilingual representations with ones pretrained specifically on Greek. The citation links that comparison to the larger evaluation literature on multilingual representations. It leaves open the exact experimental role, if any, of GLC in MMTEB.

## Cite

Cite as Christos Papaloukas, Ilias Chalkidis, Konstantinos Athinaios, Despina Pantazi and Manolis Koubarakis. 2021. Multi-granular Legal Topic Classification on Greek Legislation. Proceedings of the Natural Legal Language Processing Workshop 2021.

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

```bibtex
@inproceedings{papaloukas2021multi,
  title = {{Multi-granular Legal Topic Classification on Greek Legislation}},
  author = {Christos Papaloukas, Ilias Chalkidis, Konstantinos Athinaios, Despina Pantazi and Manolis Koubarakis},
  booktitle = {Proceedings of the Natural Legal Language Processing Workshop 2021},
  year = {2021},
  doi = {10.18653/v1/2021.nllp-1.6},
  url = {https://doi.org/10.18653/v1/2021.nllp-1.6}
}
```

> 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)
