Myanmar ABSA - Aspect Detection Model (Stage 1)
A multi-label classification model for detecting aspects in Burmese product/service reviews. This is Stage 1 of a two-stage Aspect-Based Sentiment Analysis (ABSA) pipeline.
Model Details
- Base Model: xlm-roberta-base
- Architecture: XLM-RoBERTa for Sequence Classification
- Problem Type: Multi-label classification
- Language: Burmese (Myanmar)
- License: MIT
Aspects Detected
The model predicts the presence of up to 5 aspects in a given review:
- product_quality - Quality, functionality, and effectiveness of products/services
- fulfillment_and_speed - Delivery speed, order fulfillment, and logistics
- price_and_value - Pricing, value for money, and cost-related aspects
- staff_and_service - Customer service, staff behavior, and support interactions
- variety_and_availability - Product variety, stock availability, and selection
Training Data
- Total Samples: 5,281 Burmese reviews
- Data Split: Stratified train/val/test split
- Train: 4,224 samples
- Validation: 528 samples
- Test: 529 samples
- Label Distribution: Multi-label annotations (reviews can have multiple aspects)
- Taxonomy: Updated 5-aspect taxonomy (removed digital_experience, renamed aspects for clarity)
Performance Metrics
Evaluated on the test set:
| Metric | Score |
|---|---|
| Macro F1 | 0.9314 |
| Micro F1 | 0.9279 |
Training Configuration
- Learning Rate: 2e-5
- Batch Size: 8 (with gradient accumulation steps = 4, effective batch size = 32)
- Epochs: 4
- Max Sequence Length: 128 tokens
- Optimizer: AdamW
- Precision: bfloat16
Usage
Basic Usage with Pipeline
from transformers import pipeline
# Load the model
classifier = pipeline(
"text-classification",
model="Fixaro/myanmar-absa-aspect-detection",
return_all_scores=True,
function_to_apply="sigmoid" # For multi-label classification
)
# Predict aspects
review = "แแ
แนแ
แแบแธแกแแแบแกแแฝแฑแธแ แแฑแฌแแบแธแแผแฎแธ แแญแฏแทแแฌแแแบแธ แแผแแบแแแบ"
results = classifier(review)
# Results will show scores for all 5 aspects
for result in results[0]:
if result['score'] > 0.5: # Threshold for multi-label
print(f"{result['label']}: {result['score']:.4f}")
Advanced Usage with Tokenizer
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
# Load model and tokenizer
model_name = "Fixaro/myanmar-absa-aspect-detection"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)
# Prepare input
review = "แแฑแธแแแบแธ แแแบแแฌแแแบแ แแแบแแแบแธแแฝแฑแแแแบแธ แแฑแฌแบแแฝแฑแแแบ"
inputs = tokenizer(
review,
return_tensors="pt",
truncation=True,
max_length=128,
padding=True
)
# Get predictions
with torch.no_grad():
outputs = model(**inputs)
logits = outputs.logits
probabilities = torch.sigmoid(logits)
# Apply threshold (0.5)
threshold = 0.5
predictions = (probabilities > threshold).int()
# Map to aspect names
aspect_names = [
"product_quality",
"fulfillment_and_speed",
"price_and_value",
"staff_and_service",
"variety_and_availability"
]
detected_aspects = [
aspect_names[i]
for i, pred in enumerate(predictions[0])
if pred == 1
]
print(f"Detected aspects: {detected_aspects}")
Model Architecture
XLM-RoBERTa Base (xlm-roberta-base)
โโโ Encoder: 12 transformer layers
โโโ Hidden size: 768
โโโ Attention heads: 12
โโโ Classification head: Linear(768, 5) with sigmoid activation
Limitations and Biases
- Domain Specificity: Trained on product/service reviews; may not generalize to other domains
- Language Limitation: Optimized for Burmese; performance may vary for code-mixed text
- Aspect Overlap: Some reviews may express multiple aspects ambiguously
- Threshold Sensitivity: The 0.5 threshold for multi-label prediction may need adjustment based on use case
Intended Use
This model is intended for:
- Aspect detection in Burmese customer reviews
- First stage of ABSA pipelines
- Research and academic purposes
- Commercial applications with proper validation
Citation
If you use this model in your research, please cite:
@software{myanmar_absa_aspect_detection,
title = {Myanmar ABSA: Aspect Detection Model},
author = {Fixaro},
year = {2026},
publisher = {Hugging Face},
url = {https://huggingface.co/Fixaro/myanmar-absa-aspect-detection}
}
Related Models
- Stage 2 Model: Fixaro/myanmar-absa-sentiment-classification - Aspect-level sentiment classification
Contact
For questions or issues, please open an issue on the model repository.
- Downloads last month
- 20