A production-ready Natural Language Processing (NLP) research engine and evaluation benchmark designed to solve Cross-lingual Aspect-Based Sentiment Analysis (X-ABSA). The system transfers deep semantic representations from high-resource source languages (English - EN) across low-resource target languages (Vietnamese - VI, German - DE, and Chinese - ZH) across both Restaurant and Electronic Device (Phone) domains.

Evaluated Neural Architectures

The framework benchmarks three cutting-edge cross-lingual modeling paradigms under rigorous academic and industrial evaluation standards:

ArchitectureParadigm & BackboneTechnical Key Innovation
AG-CANAspect-Guided Context Attention Network (mBERT)Integrates dedicated Aspect-Guided Attention layers with Gated Residual Networks to capture delicate micro-interactions between context tokens and target aspect entities.
XLM-RoBERTa (XLM-R)Large-Scale Multilingual Encoder Fine-TuningUtilizes Exact Masked Mean Pooling over aspect spans coupled with Layer-wise Learning Rate Decay (LLRD) (lr_embeddings, lr_encoder_low, lr_classifier) to preserve cross-lingual alignment.
mT5Generative Seq2Seq Transformer (Text-to-Text)Reformulates aspect sentiment classification into an end-to-end generative task utilizing Constrained Decoding and exact probability Label Scoring across sentiment tokens.

Experimental Transfer Scenarios (S1, S2, S3)

To rigorously evaluate knowledge transfer capability and fast adaptation kinetics, our framework executes across three standardized transfer settings:

%%{init: {'theme':'base', 'themeVariables': { 'primaryColor':'#1e1e2d','primaryTextColor':'#fff','primaryBorderColor':'#10b981','lineColor':'#34d399'}}}%% flowchart TB SRC[("🇬🇧 SOURCE DATASET
English (EN)
Restaurant & Phone Domains")] subgraph S1 ["S1: Zero-Shot Transfer (Cross-Lingual Generalization)"] direction TB A1["🧠 Train Model Strictly on English Source Data"] A2["⚡ Direct Zero-Shot Evaluation on VI, DE, ZH Test Sets"] A1 ==> A2 end subgraph S2 ["S2: Few-Shot Fast Adaptation (Low-Resource Tuning)"] direction TB B1["📥 Initialize Checkpoint from Best S1 Weights"] B2["🎯 Fine-Tune on Tiny Target Samples (N ∈ {50, 100, 200})"] B3["🔄 Multi-Seed Statistical Validation across Runs"] B1 ==> B2 ==> B3 end subgraph S3 ["S3: Full-Target Transfer (Upper-Bound Benchmark)"] direction TB C1["📥 Initialize Checkpoint from Best S1 Weights"] C2["🚀 Full Supervised Training on Complete Target Datasets"] C3["🏆 Establish Upper-Bound Performance Benchmarks"] C1 ==> C2 ==> C3 end SRC ==> S1 S1 ==>|"Save Best Checkpoints"| S2 S1 ==>|"Save Best Checkpoints"| S3

Architecture & Cross-Lingual Pipeline

flowchart LR subgraph INGESTION ["📥 Multi-Lingual Ingestion"] direction TB RAW["Raw Domain Text
(EN, VI, DE, ZH)"] ==> TOKEN["Subword Tokenizer
(SentencePiece / WordPiece)"] end subgraph ENCODERS ["🧠 Neural Backbone Layer"] direction TB M1["AG-CAN + mBERT
(Aspect Attention + Gated Residuals)"] M2["XLM-RoBERTa
(LLRD Optimization + Masked Mean Pooling)"] M3["mT5 Generative Seq2Seq
(Constrained Decoding + Label Scoring)"] end subgraph METRICS ["📊 Automated Evaluation Engine"] direction TB E1["Macro F1-Score & Accuracy Calculation"] E2["Recovery Curve Synthesis across N-Shots"] E3["Cross-Lingual Performance Gap Matrix"] end TOKEN ==> ENCODERS ENCODERS ==> METRICS

Technical Features & MLOps Infrastructure

  1. Dockerized Orchestration: Fully containerized via docker-compose.yml and unified Dockerfile specifications, isolating CUDA environments (CUDA >= 11.0, PyTorch 3.8+) for deterministic cross-platform execution.
  2. Layer-Wise Learning Rate Decay (LLRD): Prevents catastrophic forgetting when fine-tuning deep multilingual transformers by applying systematically decreasing learning rates from higher classification heads down to lower embedding layers.
  3. Automated Error Taxonomy & Visualizations: The evaluation module (scripts/eval.py) automatically synthesizes publication-quality charts:
    • macro_f1_comparison.png: Cross-lingual F1 benchmark comparison across architectures.
    • recovery_curves.png: Few-shot recovery trajectories depicting adaptation efficiency versus sample size $N$.
    • gap_matrix.png: Matrix quantifying exact inter-language representation drift.