GePpeTto Carves Italian into a Language Model

Lorenzo De Mattei, Michele Cafagna, Felice Dell'Orletta, Malvina Nissim, Marco Guerini

Abstract

GePpeTto is the first generative language model for Italian based on the GPT-2 architecture. Trained on 13GB of diverse Italian text, it produces high-quality, syntactically complex sentences. Evaluation through perplexity, linguistic profiling, and human studies shows that while the model produces shorter sentences than humans, its internal complexity is comparable, and its outputs are often indistinguishable from human-written text.

Introduction

In the landscape of 2020, Natural Language Processing (NLP) was undergoing a "Transformer revolution." While discriminative models like BERT were being adapted for various languages, large-scale generative models—capable of writing coherent, creative text—remained largely English-centric.

The authors identified a significant gap in the Italian NLP ecosystem: the lack of a robust, open-source generative model. To solve this, they developed GePpeTto, aiming to provide the Italian research community with a tool comparable to the original GPT-2, while also establishing a rigorous framework for evaluating how well these models actually mimic human linguistic patterns.

Methods

The researchers followed the "blueprint" of the GPT-2 small architecture:

  • Architecture: 12 layers, 117M parameters, and a vocabulary size of 30,000.
  • Training: The model was trained for 620,000 steps on four Tesla T4 GPUs using the PyTorch implementation from HuggingFace.
  • Evaluation Framework: The authors moved beyond simple metrics, employing a three-pronged approach:
  • Perplexity: Measuring how "surprised" the model is by new text across different genres.
  • Linguistic Profiling: Using a tool called Profiling-UD to extract features like sentence length, part-of-speech distribution, and syntactic dependency lengths.
  • Human Evaluation: A double-blind study where participants ranked and classified text snippets as "human" or "AI-generated."

Datasets

The model was trained on a total of ~13GB of Italian text, comprising:

  • Italian Wikipedia (2019): 2.8GB of "standardized," encyclopedic text.
  • ItWac Corpus: 11GB of web-crawled data, providing a mix of formal and informal Italian across a wide chronological span.

For evaluation, the authors also tested the model on "out-of-domain" datasets, including Italian legal documents (EUR-Lex), online news (la Repubblica, Il Giornale), and social media forum comments.

Linguistic Profiling and the "Bonsai" Effect

One of the most fascinating findings is that GePpeTto produces a "bonsai version" of human language. While its sentences are significantly shorter on average than human ones (20.4 vs. 32.3 tokens per sentence), the internal complexity—measured by tokens per clause (TPC) and average dependency length—remains remarkably similar to human writing.

Linguistic profiling comparing human-written (Original) text to GePpeTto-generated text, illustrating the "Bonsai Effect".

This suggests that GePpeTto captures the core syntactic structures of Italian, even if it tends toward more concise output. Additionally, the model exhibits Zero-Shot Style Priming. By simply prefixing prompts with keywords like "Wikipedia" or "Links" (mimicking the training data format), the model can be "primed" to switch styles—from encyclopedic definitions to news headers—without any specific fine-tuning.

Human Evaluation and Key Results

The human evaluation phase revealed that GePpeTto is successfully navigating the "uncanny valley." In a double-blind study, GePpeTto achieved the highest "can't tell" rate among evaluators when compared to simpler baselines.

Human classification of text snippets as artificial or natural, showing GePpeTto's high rate of being perceived as human-written.

Key findings from the evaluation include:

  • Naturalness: 54% of GePpeTto’s outputs were judged as "natural" (human-written) in isolation, compared to only 26% for the Markov-based baseline.
  • Human Ranking: In head-to-head comparisons, humans ranked GePpeTto as "more natural" than the baseline in the vast majority of cases. While "Gold" (human) text still outperformed the model, the gap between GePpeTto and human text was significantly smaller than the gap between GePpeTto and the baseline.
  • Perplexity: GePpeTto performed best on its "home" domains (Wikipedia: 26.5; ItWac: 31.0) but struggled with the chaotic nature of Social Media (131.4).
  • Contextual Boost: The model's performance improved significantly when given a longer prompt (10 tokens vs. 5), suggesting that providing more context helps the model "lock in" to the correct linguistic trajectory.

Limitations and Future Work

Despite its successes, GePpeTto has clear limitations. The Sentence Length Bias remains a detectable "tell" for its artificial nature. Furthermore, while 13GB of training data is substantial, it is smaller than the datasets used for the original English GPT-2, resulting in slightly higher perplexity scores.

Future research is needed to determine if the improved performance with longer prompts is due to the model's inherent generation quality or simply because the evaluator is seeing a higher ratio of "gold" (human) text in the prompt. The authors look forward to the community using GePpeTto as a foundation for downstream Italian NLP tasks.

Summary updated

Abstract

In the last few years, pre-trained neural architectures have provided impressive improvements across several NLP tasks. Still, generative language models are available mainly for English. We develop GePpeTto, the first generative language model for Italian, built using the GPT-2 architecture. We provide a thorough analysis of GePpeTto's quality by means of both an automatic and a human-based evaluation. The automatic assessment consists in (i) calculating perplexity across different genres and (ii) a profiling analysis over GePpeTto's writing characteristics. We find that GePpeTto's production is a sort of bonsai version of human production, with shorter but yet complex sentences. Human evaluation is performed over a sentence completion task, where GePpeTto's output is judged as natural more often than not, and much closer to the original human texts than to a simpler language model which we take as baseline.
BibTeX
@inproceedings{mattei2020geppetto,
  author = {Lorenzo De Mattei and Michele Cafagna and Felice Dell'Orletta and Malvina Nissim and Marco Guerini},
  title = {{GePpeTto Carves Italian into a Language Model}},
  booktitle = {CLiC-it},
  year = {2020},
  url = {https://openreview.net/forum?id=VNTr1Bq6G3j},
}
Figure