NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Hengam: An Adversarially Trained Transformer for Persian Temporal Tagging

Sajad Mirzababaei, Amir Hossein Kargaran, Hinrich Schütze, Ehsaneddin AsgariAACL/IJCNLP 2022

TL;DR

This paper introduces Hengam, a novel adversarial transformer model for Persian temporal tagging that significantly outperforms existing methods. By combining a robust rule-based tagger with adversarial training on a new, diverse dataset, Hengam effectively handles Persian's linguistic complexities, including ambiguities and informal language.

What Problem Does This Paper Address?

Accurately identifying temporal expressions (like "next Tuesday" or "February 15th") is crucial for many NLP tasks, including summarization and question answering. While significant progress has been made in languages like English, Persian temporal tagging has lagged due to a lack of comprehensive datasets and the unique challenges posed by the language. These challenges include:

  • Linguistic Ambiguity: Persian has homographs (words with the same spelling but different meanings) that can be mistaken for temporal expressions.
  • Multiple Calendar Systems: Persian uses Gregorian, Hijri (Lunar), and Jalali (Solar) calendars, requiring systems to handle references across these systems.
  • Formal vs. Informal Language: Persian exhibits a wide range of styles, from formal written text to informal social media, which can significantly alter how temporal expressions are phrased.
  • Limited Existing Resources: Previous Persian temporal tagging efforts have relied on rule-based systems with limited recall or learning-based approaches trained on small, incomplete datasets, leading to poor generalization.

This paper aims to bridge this gap by developing a more accurate and robust temporal tagging system for Persian.

Methods

The Hengam system is built in three main stages:

  1. HengamTagger (Rule-Based Tagger): The authors developed an extensible rule-based tool that uses regular expressions to extract temporal expressions. This tool is designed to be adaptable to different languages by defining language-specific patterns and "pattern units" (atomic temporal terminologies). It aims to cover a broad range of temporal expressions, including formal and informal ones, and addresses some limitations of previous rule-based systems like ParsTime by incorporating exclusion patterns.
  2. HengamCorpus (Weakly Labeled Dataset): HengamTagger was used to automatically annotate a large and diverse Persian text collection (including formal sources like Wikipedia and informal sources like Twitter) to create a weakly labeled dataset. This corpus aims to be unbiased and cover a wide array of temporal patterns, addressing the scarcity of such data.
  3. HengamTransformer (Adversarial Transformer Model): A state-of-the-art transformer model (XLM-ROBERTa with a CRF layer) is fine-tuned on the HengamCorpus. Crucially, this model then undergoes adversarial fine-tuning using a smaller, strongly labeled dataset (HengamGold) and a Projected Gradient Descent (PGD) algorithm. This adversarial training aims to improve the model's robustness and generalization capabilities, particularly in handling ambiguities and complex cases.

Datasets

  • Raw Text Collections: The authors utilized four Persian text collections for creating HengamCorpus:
  • Persian Wikipedia (formal)
    • Hamshahri Corpus (formal)
    • PersianTwitter (informal)
    • HelloKish dataset (informal)
  • HengamCorpus: A newly created, large, weakly labeled dataset for Persian temporal tagging, generated by applying HengamTagger to the raw text collections. It aims for diversity in temporal patterns.
  • HengamGold: A newly introduced, high-quality, strongly labeled gold standard dataset for Persian temporal tagging. It consists of 200 carefully crafted examples designed to cover a wide range of temporal expression patterns and contexts, annotated by two experts with high inter-annotator agreement (kappa score of 0.97). This dataset is crucial for evaluating and fine-tuning the adversarial model.
  • Existing Persian NER Datasets: Peyma, NSURL'19, and Persian-NER were used for initial analysis and comparison, though their limitations for temporal tagging evaluation were noted.

Key Insights and Ideas

  • Adversarial Training for Robustness: The paper strongly advocates for adversarial training in temporal tagging. It demonstrates that this technique significantly improves the model's ability to handle linguistic ambiguities and spelling variations, which are common in Persian.
  • Synergy of Rule-Based and Learning-Based Approaches: Hengam effectively combines the strengths of both worlds. HengamTagger provides broad coverage and initial annotation, while the transformer model learns to generalize beyond explicit rules, especially when fine-tuned adversarially.
  • Importance of Diverse and High-Quality Data: The creation of HengamCorpus and HengamGold highlights the critical need for comprehensive and well-annotated datasets, particularly for under-resourced languages like Persian. The paper shows that even a small, high-quality strongly labeled dataset can be highly effective when used for adversarial fine-tuning.
  • Addressing Persian-Specific Challenges: The work directly tackles Persian's unique linguistic features, such as multiple calendar systems and homographs, by designing specific patterns and leveraging context-aware adversarial training.

Key Results

  • The HengamTransformer (adversarially trained) achieved a type F1-score of 95.42 and a partial F1-score of 91.60 on the HengamGold evaluation dataset.
  • This performance significantly outperforms state-of-the-art Persian temporal tagging approaches like Beheshti-NER and ParsBERT.
  • The adversarial variant (HengamTransA) correctly disambiguated all 30 challenging cases in the HengamChallengeSet, while the weakly trained version (HengamTransW) only identified 9.
  • HengamTransformer demonstrated superior generalization and robustness compared to the rule-based HengamTagger, successfully handling style and spelling variations.

Limitations and Future Work

  • Limitations of Rule-Based Tagger: HengamTagger, being rule-based, still has limitations in handling severe spelling errors and different writing styles without explicit rules.
  • Dataset Size: While HengamGold is a high-quality dataset, it is relatively small (200 examples). The authors suggest that a larger strongly labeled dataset could further enhance performance.
  • Future Work: The authors suggest extending HengamTagger to other languages and exploring more advanced adversarial training techniques. They also highlight the potential for further improving the model by incorporating more linguistic knowledge and exploring different transformer architectures.

Summary updated

BibTeX
@inproceedings{mirzababaei2022hengam,
  author = {Sajad Mirzababaei and Amir Hossein Kargaran and Hinrich Schütze and Ehsaneddin Asgari},
  title = {{Hengam: An Adversarially Trained Transformer for Persian Temporal Tagging}},
  booktitle = {AACL/IJCNLP},
  year = {2022},
  url = {https://openreview.net/forum?id=A7HzvP5jB1e},
}
Figure