This repository presents a generation task for structured summaries of subjects of discussion from Municipal Meeting Minutes in European Portuguese using the mBART-50 model as base. It includes training and evaluation scripts for three experimental settings: a general model, intra-municipality specialization, and leave-one-municipality-out generalization.
π― Try the summarization and theme generation models Now: Test the models interactively at https://huggingface.co/spaces/liaad/CitiLink-Theme-Generation-and-Segment-Level-Summarization-Demo
Get the summarization and theme generation models: https://huggingface.co/collections/liaad/citilink
- Description
- Project Status
- Technology Stack
- Dependencies
- Installation
- Repository Structure
- Usage
- Dataset
- Architecture
- Evaluation Metrics
- Experimental Settings & Results
- Known Issues
- License
- Resources
- Acknowledgments
- Citation
The system addresses two complementary tasks for Portuguese municipal meeting minutes:
- Segment-Level Summarization β Summarizing the content of each subject of discussion using recursive chunking and theme-aware prompting, fine-tuned on
facebook/mbart-large-50. - Theme Generation β Generating a concise theme/title (up to 15 words) for each subject of discussion using instruction-prompted fine-tuning on
facebook/mbart-large-50-many-to-many-mmt.
- Recursive Chunking (Summarization): A recursive function that calculates how many context-window chunks are needed to cover both the input text and the target summary. It then splits both the text and summary into aligned shards, guiding the model with part indicators (
[PARTE: i/N]). - Theme-Aware Prompting (Summarization): Along with fine-tuning, prompting is used to guide the model with structured input containing the theme and chunk position (e.g.,
RESUMIR [TEMA: theme] [PARTE: 1/3] [TEXTO]: ...). - Instruction Prompting (Theme Generation): The model is fine-tuned with an instruction prefix that guides concise theme generation with nominalized beginnings (e.g., "Sumariza o segmento de ata num tema conciso...").
- Fine-Tuning:
facebook/mbart-large-50for summarization;facebook/mbart-large-50-many-to-many-mmtfor theme generation. - Cross-Municipality Evaluation: A leave-one-municipality-out strategy to test generalization to unseen locations.
- Intra-Municipality Evaluation: Training and testing using data from a specific municipality (specialization).
- General Model: A single model trained on the full training set and evaluated on the held-out test set.
- Reproducible Experiments: All code is made available to ensure all presented results are reproducible.
β The summarization and theme generation models are fully implemented and validated for research use. The codebase is actively maintained to ensure reproducibility of the published results.
- Sample Data: Available in
dataset_sample/sample.json - Train/Val/Test Split: Available in
split_info.json(temporal split strategy, 60/20/20) - Full Dataset: Available through the CitiLink-Summ repository
Language: Python
Core Frameworks:
- PyTorch: Deep learning backend for tensor computations, gradient calculation, and GPU acceleration during training.
- Hugging Face Transformers: Used for loading the mBART-50 models, tokenization, and the
Seq2SeqTrainerAPI for training. - Hugging Face Datasets: Used for managing, structuring, and applying batched transformations to the training data.
Key Libraries:
pandas: Tabular data manipulation for structuring extracted segments into DataFrames.json: Parsing the hierarchical JSON structure of the municipal minutes dataset.evaluate/rouge_score/sacrebleu/bert_score: Evaluation metric computation (ROUGE, BLEU, METEOR, BERTScore).nltk: Tokenization for METEOR computation.tqdm: Progress bars during inference.os: Directory and path management for model checkpoints and output files.
transformers(>=4.30.0) β Load the mBART-50 models, handle tokenization, and run theSeq2SeqTrainer.torch(>=2.0.0) β PyTorch backend for tensor operations, gradient accumulation, and GPU-accelerated training.datasets(>=2.14.0) β Hugging Face library for efficient batch processing and data splitting.pandas(>=2.0.0) β Structuring parsed JSON data into tabular format.evaluateβ Hugging Face evaluation metrics library.rouge-scoreβ ROUGE metric computation.sacrebleuβ BLEU metric computation.bert-scoreβ BERTScore metric computation.nltkβ Natural language tokenization for METEOR.
accelerate(>=0.21.0) β Required by the Trainer for mixed-precision training (fp16) and optimized memory usage.sentencepiece(>=0.1.99) β Subword tokenization library required by the mBART tokenizer.
pip install transformers torch datasets pandas accelerate sentencepiece evaluate rouge-score sacrebleu bert-score nltk tqdmFor PyTorch with CUDA support (match your NVIDIA driver version):
pip install torch --index-url https://download.pytorch.org/whl/cu118- Python 3.10 or higher
- CUDA-capable GPU recommended (at least 16 GB VRAM for fine-tuning mBART-50)
- At least 16 GB system RAM
- Clone the repository
git clone https://github.com/INESCTEC/summarizing_meeting_minutes_in_European_Portuguese_with_mBART-50.git
cd summarizing_meeting_minutes_in_European_Portuguese_with_mBART-50- Create and activate a virtual environment
python -m venv venv
source venv/bin/activate- Install dependencies
pip install transformers torch datasets pandas accelerate sentencepiece evaluate rouge-score sacrebleu bert-score nltk tqdm- Place the dataset
The full dataset JSON (citilink_summ_v2.json) should be placed in a dataset/ folder at the repository root:
dataset/citilink_summ_v2.json
The full dataset can be obtained from the CitiLink-Summ repository.
- Verify installation
python -c "import torch; from transformers import AutoTokenizer; print('CUDA Available:', torch.cuda.is_available()); AutoTokenizer.from_pretrained('facebook/mbart-large-50')".
βββ README.md
βββ split_info.json # Train/Val/Test file-level split (temporal, 60/20/20)
βββ summarization_guidelines.pdf # Summarization annotation guidelines
βββ dataset_sample/
β βββ sample.json # Sample of the dataset structure
βββ assets/ # Images for documentation
β
βββ Segment-level_Summarization/ # ββ TASK 1: Segment-Level Summarization ββ
β βββ general_model/ # General model (train on all, test on held-out set)
β β βββ TRAIN_recursive_mbart-50.py # Training with recursive chunking & prompting
β β βββ TEST_generate_summaries.py # Inference (generates summaries for test set)
β β βββ get_metrics.py # Compute ROUGE, BLEU, METEOR, BERTScore
β β βββ summaries_and_results/
β β βββ generated_summaries.json # Generated summaries
β β βββ evaluation_results.json # Overall evaluation metrics
β β βββ evaluation_results_all_municipalities.csv
β β
β βββ in_municipality/ # Intra-municipality (train & test per municipality)
β β βββ TRAIN_recursive_mbart.py # Training (one model per municipality)
β β βββ get_metrics.py # Per-municipality evaluation metrics
β β βββ summaries_and_results/
β β βββ generated_summaries.json
β β βββ evaluation_results.json
β β
β βββ leave_one_municipality_out/ # Leave-one-out (train on N-1, test on held-out)
β βββ TRAIN_recursive_mbart-50.py # Training (one model per held-out municipality)
β βββ TEST_generate_summaries.py # Inference + evaluation
β βββ get_metrics.py # Detailed per-municipality metrics
β βββ summaries_and-results/
β βββ generated_summaries.json
β βββ evaluation_results.csv
β
βββ Theme_Generation/ # ββ TASK 2: Theme Generation ββ
βββ general_model/ # General model (train on all, test on held-out set)
β βββ TRAIN_mbart-50.py # Training with instruction prompting
β βββ TEST_generate_themes.py # Inference + evaluation on test set
β βββ get_metrics.py # Standalone metric computation
β βββ summaries_and_results/
β βββ mbart_evaluation_results.json # Generated themes + evaluation
β
βββ in_municipality/ # Intra-municipality (train & test per municipality)
β βββ TRAIN_mbart-50.py # Training (one model per municipality)
β βββ get_metrics.py # Per-municipality evaluation
β βββ summaries_and_results/
β βββ metricas_finais_municipios.csv # Per-municipality results
β
βββ leave_one_municipality_out/ # Leave-one-out (train on N-1, test on held-out)
βββ TRAIN_mbart-50.py # Training (one model per held-out municipality)
βββ get_metrics.py # LOO evaluation
βββ summaries_and_results/
βββ loo_evaluation_results.csv # Per-municipality LOO results
The general model trains a single mBART-50 on the full training split and evaluates on the test split.
Train:
cd Segment-level_Summarization/general_model
python TRAIN_recursive_mbart-50.pyThis applies recursive chunking with theme-aware prompts, fine-tunes facebook/mbart-large-50, and saves the final model to results_mbart50_recursive_v1/citilink_recursive_final/.
Generate summaries on the test set:
python TEST_generate_summaries.pyOutputs generated summaries to summaries_and_results/generated_summaries.json.
Evaluate:
python get_metrics.pyComputes ROUGE-1/2/L/Lsum, BLEU, METEOR, and BERTScore (Precision, Recall, F1).
Trains a separate model for each municipality using only that municipality's training data, then evaluates on that municipality's test data. This tests specialization.
Train (all municipalities):
cd Segment-level_Summarization/in_municipality
python TRAIN_recursive_mbart.pyCreates one fine-tuned model per municipality under in_muni_only/<municipality>/final_model/.
Evaluate:
python get_metrics.pyTrains one model per municipality where that municipality is excluded from training, then tests on the excluded municipality. This tests generalization.
Train (all leave-one-out folds):
cd Segment-level_Summarization/leave_one_municipality_out
python TRAIN_recursive_mbart-50.pyCreates one model per fold under loo_models_mbart/train_without_<municipality>/final_model/.
Generate summaries & evaluate:
python TEST_generate_summaries.pyDetailed per-municipality metrics:
python get_metrics.pyTrains a single mBART-50-many-to-many-mmt model with instruction prompting for theme generation.
Train:
cd Theme_Generation/general_model
python TRAIN_mbart-50.pyFine-tunes facebook/mbart-large-50-many-to-many-mmt with instruction-prefixed inputs. The model learns to generate concise themes (max 15 words) starting with nominalizations. Saves the final model to results_mbart50_ata_summarization/final_model/.
Generate themes & evaluate:
python TEST_generate_themes.pyLoads the trained model, generates themes for the test set, computes ROUGE/BLEU/METEOR/BERTScore, and saves results to summaries_and_results/mbart_evaluation_results.json.
Standalone metric computation:
python get_metrics.pyTrains a separate theme generation model for each municipality using only that municipality's training data from the pre-defined split.
Train (all municipalities):
cd Theme_Generation/in_municipality
python TRAIN_mbart-50.pyCreates one fine-tuned model per municipality under results_mbart50_individual_muni/train_test_<municipality>/final_model/.
Evaluate:
python get_metrics.pyOutputs per-municipality metrics to summaries_and_results/metricas_finais_municipios.csv.
Trains one theme generation model per municipality where that municipality is excluded from training.
Train (all leave-one-out folds):
cd Theme_Generation/leave_one_municipality_out
python TRAIN_mbart-50.pyCreates one model per fold under results_mbart50_loo_temas/loo_without_<municipality>/final_model/.
Evaluate:
python get_metrics.pyOutputs per-municipality metrics to summaries_and_results/loo_evaluation_results.csv.
| Parameter | Value |
|---|---|
| Base Model | facebook/mbart-large-50 |
| Max Input Length | 600 tokens |
| Max Target Length | 400 tokens |
| Learning Rate | 2e-5 |
| Batch Size | 1 (with 16 gradient accumulation steps) |
| Epochs | 5 |
| Weight Decay | 0.01 |
| Mixed Precision | fp16 (if CUDA available) |
| Parameter | Value |
|---|---|
| Base Model | facebook/mbart-large-50 |
| Chunk Max Length | 1024 tokens |
| Chunk Stride | 512 tokens |
| Target Max Length | 128 tokens |
| Learning Rate | 2e-5 |
| Batch Size | 2 |
| Epochs | 3 |
| Warmup Ratio | 10% of total steps |
| Weight Decay | 0.01 |
| Parameter | Value |
|---|---|
| Base Model | facebook/mbart-large-50-many-to-many-mmt |
| Max Input Length | 1024 tokens |
| Max Target Length | 150 tokens |
| Batch Size | 8 |
| Epochs | 3 |
| Warmup Steps | 500 |
| Weight Decay | 0.01 |
| Mixed Precision | fp16 (if CUDA available) |
| Parameter | Value |
|---|---|
| Base Model | facebook/mbart-large-50-many-to-many-mmt |
| Max Input Length | 1024 tokens |
| Max Target Length | 150 tokens |
| Batch Size | 4 |
| Epochs | 5 |
| Weight Decay | 0.01 |
| Parameter | Value |
|---|---|
| Base Model | facebook/mbart-large-50-many-to-many-mmt |
| Max Input Length | 1024 tokens |
| Max Target Length | 150 tokens |
| Batch Size | 4 |
| Epochs | 3 |
β οΈ Important Note: The GitHub repository for the paper CitiLink-Summ: A Dataset of Discussion Subjects Summaries in European Portuguese Municipal Meeting Minutes, presenting the dataset and summarization baselines, is available at https://github.com/INESCTEC/citilink-summ.
This dataset contains 2885 subjects of discussion from Portuguese municipal meeting minutes annotated with summaries, themes, and topics.
| Attribute | Value |
|---|---|
| Subjects of Discussion | 2885 |
| Number of Municipalities | 6 |
| Administrative Term | 2021β2024 |
| Number of Minutes | 120 |
| Train / Val / Test Split | 72 / 24 / 24 documents |
| Split Strategy | Temporal |
Alandroal, Campo Maior, CovilhΓ£, FundΓ£o, GuimarΓ£es, Porto
{
"municipalities": [
{
"municipality": "Municipality name",
"minutes": [
{
"minute_id": "ID",
"full_text": "Full minute text",
"agenda_items": [
{
"text": "Complete text of the subject of discussion",
"topics": ["Topic 1", "Topic 2"],
"theme": "Short Title / Theme",
"summary": "Human-annotated summary"
}
]
}
]
}
]
}- dataset_sample/sample.json β Sample of the dataset structure with real examples
- split_info.json β Train/validation/test document-level split (temporal strategy)
For instructions about dataset usage, consult the dataset GitHub repository. The full dataset can be accessed through it.
The summarization pipeline is built around mBART-large-50 fine-tuned for segment-level summarization of Portuguese municipal meeting minutes. The key components are:
- Data Loading & Filtering β Parses the hierarchical JSON dataset, extracts text segments with their summaries and themes, and filters based on the train/test split.
- Recursive Chunking β Calculates how many context-window shards are needed to cover a long input text and its corresponding summary, then splits both into aligned chunks.
- Theme-Aware Prompting β Each chunk is wrapped in a structured prompt:
RESUMIR [TEMA: <theme>] [PARTE: i/N] [TEXTO]: <chunk_text>, providing the model with the theme and positional context. - Fine-Tuning β The
Seq2SeqTrainerfrom Hugging Face fine-tunesmBART-large-50with the Portuguese language code (pt_XX) set as both source and target language, using mixed precision when available. - Inference β At test time, the same recursive chunking and prompting is applied. Each chunk is decoded independently with beam search, and the partial summaries are concatenated.
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Raw Municipal Minutes (JSON) β
βββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββ
β
βββββββββββββββΌββββββββββββββ
β Data Loading & Split β
β (JSON parsing, filtering)β
βββββββββββββββ¬ββββββββββββββ
β
βββββββββββββββΌββββββββββββββ
β Recursive Chunking β
β (Text + Summary aligned β
β shard splitting) β
βββββββββββββββ¬ββββββββββββββ
β
βββββββββββββββΌββββββββββββββ
β Theme-Aware Prompting β
β RESUMIR [TEMA:] [PARTE:] β
β [TEXTO]: ... β
βββββββββββββββ¬ββββββββββββββ
β
βββββββββββββββΌββββββββββββββ
β mBART-large-50 (Seq2Seq) β
β Fine-tuning / Inference β
βββββββββββββββ¬ββββββββββββββ
β
βββββββββββββββΌββββββββββββββ
β Shard Summary Concat β
β (Join partial summaries) β
βββββββββββββββ¬ββββββββββββββ
β
βββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββ
β Final Summary β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
The recursive chunking function determines the number of shards needed based on both input and target token lengths:
num_shards = max(
(len(text_tokens) // (MAX_INPUT_LENGTH - 60)) + 1,
(len(summary_tokens) // (MAX_TARGET_LENGTH - 20)) + 1
)Both text and summary are then split into num_shards equal-sized token chunks. Each text chunk is paired with its corresponding summary chunk during training, and the prompt includes the shard index ([PARTE: i/N]) so the model knows its position within the document.
During inference, the text is chunked at a fixed token size (e.g., 700 tokens). For each chunk, a prompt is constructed and the model generates a summary using beam search (num_beams=5), with repetition penalties and no-repeat n-gram constraints. The partial summaries from all chunks are concatenated to produce the final output.
The theme generation pipeline uses mBART-large-50-many-to-many-mmt fine-tuned with instruction prompting to generate concise themes (titles) for each subject of discussion.
- Data Loading β Parses the JSON dataset, extracts text segments with their annotated themes.
- Instruction Prompting β Each input is prefixed with a structured instruction:
Sumariza o segmento de ata num tema conciso (mΓ‘x. 15 palavras), comeΓ§ando com nominalizaΓ§Γ£o (ex.: aprovaΓ§Γ£o da, criaΓ§Γ£o de) e sem pontuaΓ§Γ£o final. Segmento: <text> - Fine-Tuning β The
Seq2SeqTrainerfine-tunes the model with Portuguese language codes (pt_XX) set as both source and target. - Inference β The model generates short themes using beam search (
num_beams=5).
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Raw Municipal Minutes (JSON) β
βββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββ
β
βββββββββββββββΌββββββββββββββ
β Data Loading β
β (JSON parsing, filtering)β
βββββββββββββββ¬ββββββββββββββ
β
βββββββββββββββΌββββββββββββββ
β Instruction Prompting β
β "Sumariza o segmento..." β
β + segment text β
βββββββββββββββ¬ββββββββββββββ
β
βββββββββββββββΌββββββββββββββ
β mBART-50-many-to-many β
β Fine-tuning / Inference β
βββββββββββββββ¬ββββββββββββββ
β
βββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββ
β Generated Theme (β€ 15 words) β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Measures n-gram overlap between generated and reference summaries:
- ROUGE-1: Unigram overlap.
- ROUGE-2: Bigram overlap (captures fluency).
- ROUGE-L: Longest Common Subsequence (captures structural coherence).
- Range: 0.0 to 1.0. Higher is better.
Evaluates n-gram precision with a brevity penalty.
- Range: 0.0 to 100.0. Higher is better.
Incorporates stemming and synonymy matching; computes harmonic mean of precision and recall.
- Range: 0.0 to 1.0. Higher is better.
Uses pre-trained contextual embeddings (BERT) to compute cosine similarity between generated and reference tokens.
- Precision / Recall / F1: 0.0 to 1.0. Higher is better.
- Rewards semantically correct summaries even when vocabulary differs from the reference.
Trained on the full training split (72 documents), evaluated on the test split (24 documents).
Overall Results:
| Metric | Value |
|---|---|
| ROUGE-1 | 0.6617 |
| ROUGE-2 | 0.5457 |
| ROUGE-L | 0.6194 |
| BLEU | 0.2906 |
| METEOR | 0.5705 |
| BERTScore P | 0.8710 |
| BERTScore R | 0.8479 |
| BERTScore F1 | 0.8579 |
Per-Municipality Breakdown:
| Municipality | Segments | ROUGE-1 | ROUGE-2 | ROUGE-L | BLEU | METEOR | BS F1 |
|---|---|---|---|---|---|---|---|
| Alandroal | 482 | 0.7465 | 0.6372 | 0.7153 | 50.74 | 0.7109 | 0.8958 |
| Campo Maior | 393 | 0.6137 | 0.4702 | 0.5661 | 33.05 | 0.5513 | 0.8367 |
| CovilhΓ£ | 705 | 0.6205 | 0.4656 | 0.5642 | 30.12 | 0.4923 | 0.8331 |
| FundΓ£o | 244 | 0.5770 | 0.4151 | 0.4825 | 27.04 | 0.4624 | 0.8122 |
| GuimarΓ£es | 531 | 0.6100 | 0.4567 | 0.5428 | 29.50 | 0.4848 | 0.8314 |
| Porto | 458 | 0.6600 | 0.5066 | 0.5731 | 29.45 | 0.5748 | 0.8632 |
Each row shows results when the given municipality was held out of training and used for testing.
| Municipality | ROUGE-1 | ROUGE-2 | ROUGE-L | BLEU | METEOR | BS F1 |
|---|---|---|---|---|---|---|
| Alandroal | 0.7920 | 0.6966 | 0.7680 | 58.52 | 0.7566 | 0.9186 |
| Campo Maior | 0.5924 | 0.4704 | 0.5429 | 34.89 | 0.5859 | 0.8252 |
| CovilhΓ£ | 0.6702 | 0.5194 | 0.6068 | 35.70 | 0.6184 | 0.8430 |
| FundΓ£o | 0.5992 | 0.4248 | 0.4898 | 31.80 | 0.4769 | 0.8109 |
| GuimarΓ£es | 0.6348 | 0.4785 | 0.5629 | 37.18 | 0.5743 | 0.8398 |
| Porto | 0.7635 | 0.6504 | 0.6963 | 56.11 | 0.6943 | 0.8895 |
| Average | 0.6753 | 0.5400 | 0.6111 | 42.36 | 0.6178 | 0.8545 |
Each municipality is trained and tested independently (specialization).
| Municipality | ROUGE-1 | ROUGE-2 | ROUGE-L | BLEU | BS F1 |
|---|---|---|---|---|---|
| Alandroal | 0.7600 | 0.6365 | 0.7260 | 0.5098 | 0.9063 |
| Campo Maior | 0.4894 | 0.3454 | 0.4406 | 0.2186 | 0.7723 |
| CovilhΓ£ | 0.0307 | 0.0000 | 0.0309 | 0.0000 | 0.4162 |
| FundΓ£o | 0.1690 | 0.1103 | 0.1430 | 0.0547 | 0.5441 |
| GuimarΓ£es | 0.6068 | 0.4509 | 0.5468 | 0.2565 | 0.8281 |
| Porto | 0.6347 | 0.5228 | 0.5934 | 0.2066 | 0.8446 |
Note: Intra-municipality performance varies significantly. Municipalities with fewer training segments (e.g., CovilhΓ£, FundΓ£o) show considerably lower scores, consistent with limited fine-tuning data.
Each row shows results when the given municipality was held out of training and used for testing.
| Municipality | ROUGE-1 | ROUGE-2 | ROUGE-L | BLEU | BS Precision | BS Recall | BS F1 |
|---|---|---|---|---|---|---|---|
| Alandroal | 0.7444 | 0.6338 | 0.7260 | 0.4307 | 0.8719 | 0.8953 | 0.8824 |
| Campo Maior | 0.5282 | 0.3691 | 0.5008 | 0.2183 | 0.8191 | 0.8137 | 0.8154 |
| CovilhΓ£ | 0.6965 | 0.5820 | 0.6763 | 0.4505 | 0.8713 | 0.8693 | 0.8696 |
| FundΓ£o | 0.6056 | 0.4876 | 0.5878 | 0.3461 | 0.8552 | 0.8305 | 0.8418 |
| GuimarΓ£es | 0.5809 | 0.4321 | 0.5544 | 0.2743 | 0.8344 | 0.8257 | 0.8292 |
Each municipality is trained and tested independently using the pre-defined temporal split.
| Municipality | Samples | ROUGE-1 | ROUGE-2 | ROUGE-L | BLEU | BS Precision | BS Recall | BS F1 |
|---|---|---|---|---|---|---|---|---|
| Alandroal | 97 | 0.8395 | 0.7741 | 0.8329 | 0.6645 | 0.9376 | 0.9315 | 0.9342 |
| Campo Maior | 80 | 0.7483 | 0.6361 | 0.7338 | 0.4974 | 0.9031 | 0.8998 | 0.9010 |
| CovilhΓ£ | 144 | 0.8581 | 0.7919 | 0.8492 | 0.6864 | 0.9340 | 0.9335 | 0.9332 |
| FundΓ£o | 50 | 0.8728 | 0.8052 | 0.8590 | 0.7013 | 0.9452 | 0.9436 | 0.9441 |
| GuimarΓ£es | 111 | 0.7973 | 0.7013 | 0.7853 | 0.5763 | 0.9210 | 0.9150 | 0.9172 |
| Porto | 95 | 0.8374 | 0.7492 | 0.8091 | 0.6035 | 0.9245 | 0.9155 | 0.9195 |
Note: Theme generation performance is generally higher than segment-level summarization, as themes are short (up to 15 words) and often follow formulaic patterns (e.g., "AprovaΓ§Γ£o da...", "Aditamento ao...").
- Intra-municipality models with limited data produce poor results for municipalities with few training segments (e.g., CovilhΓ£, FundΓ£o) in the summarization task.
- Long documents: Very long subjects of discussion may lose coherence across chunk boundaries during summarization inference, as shard summaries are concatenated without a merging step.
- Repetition: Despite repetition penalties and no-repeat n-gram constraints during generation, some repetition can occur in longer summarization outputs.
Please report issues on GitHub. Include:
- Python and library versions
- GPU model and CUDA version (if applicable)
- Steps to reproduce the issue
- Error traceback or unexpected output
This project is licensed under Creative Commons Attribution-NoDerivatives 4.0 International (CC BY-ND 4.0).
You are free to:
- Share: Copy and redistribute the material in any medium or format for any purpose, even commercially.
Under the following terms:
- Attribution: You must give appropriate credit, provide a link to the license, and indicate if changes were made.
- NoDerivatives: If you remix, transform, or build upon the material, you may not distribute the modified material.
Pre-trained models are available for download:
- liaad/Citilink-mBART-50-Theme-Generation-pt: https://huggingface.co/liaad/Citilink-mBART-50-Theme-Generation-pt
- liaad/Citilink-mBART-50-Summarization-pt: https://huggingface.co/liaad/Citilink-mBART-50-Summarization-pt
We would like to extend our gratitude to the following institutions for their invaluable support, research contributions, and collaboration in making this project possible:
- INESC TEC
- University of Beira Interior
- University of Porto
This work was funded within the scope of the project CitiLink, with reference 2024.07509.IACDC, which is co-funded by Component 5 - Capitalization and Business Innovation, integrated in the Resilience Dimension of the Recovery and Resilience Plan within the scope of the Recovery and Resilience Mechanism (MRR) of the European Union (EU), framed in the Next Generation EU, for the period 2021 - 2026, measure RE-C05-i08.M04 - "To support the launch of a programme of R&D projects geared towards the development and implementation of advanced cybersecurity, artificial intelligence and data science systems in public administration, as well as a scientific training programme," as part of the funding contract signed between the Recovering Portugal Mission Structure (EMRP) and the FCT - FundaΓ§Γ£o para a CiΓͺncia e a Tecnologia, I.P. (Portuguese Foundation for Science and Technology), as intermediary beneficiary. https://doi.org/10.54499/2024.07509.IACDC
We also acknowledge the open-source community, particularly the maintainers of Hugging Face, PyTorch, and mBART, whose tools and pre-trained models were fundamental to the development of this summarization pipeline.
Last Updated: February 27, 2026 Maintained by: Miguel Marques
![[Summarization and Theme Generation Tasks Cards]](/LIAAD/citilink_summarization/raw/main/assets/summarization_and_theme_cards.png)
![[Dataset Card]](/LIAAD/citilink_summarization/raw/main/assets/dataset_card.png)