This repository contains the official code for our ACL 2026 (main conference, long paper, oral presentation) paper—Single-Pass, Depth-Selective Reading for Multi-Aspect Sentiment Analysis.
DABS is a single-pass inference framework for Aspect-Term Sentiment Analysis in multi-aspect sentences. It encodes each sentence once to construct a reusable, depth-ordered substrate, and then performs aspect-conditioned readout without re-encoding. The framework consists of:
- DORA, which constructs a shared depth substrate via a single encoder pass.
- ACBS, which performs aspect-conditioned token localization and budget-aware depth selection.
Experiments on four ATSA benchmarks show that DABS achieves competitive performance while reducing end-to-end computation by up to 60% in multi-aspect settings (M > 2).
.
├── data/ # ACL ATSA data restored from data.tar.gz
│ └── semeval/ # English and multilingual SemEval data
├── figures/ # ACL paper figures
├── scripts/ # ACL training, inference, and analysis entry points
├── src/ # ACL DABS/DORA/ACBS implementation
│ ├── config/
│ ├── core/
│ └── utils/
├── journal/ # isolated journal-extension code
│ ├── configs/ # ASTE, multilingual ASTE, and ASQP protocols
│ ├── dabs_structured/ # Full DORA--QCBS structured model
│ │ ├── aste/ # ASTE data, batching, and exact decoding
│ │ └── asqp/ # ASQP data, batching, and exact decoding
│ ├── data/README.md # official data sources and setup commands
│ ├── train_aste.py
│ ├── evaluate_aste.py
│ ├── train_asqp.py
│ ├── evaluate_asqp.py
│ └── requirements.txt # separate journal environment
├── outputs/ # generated checkpoints (git-ignored)
├── results/ # generated summaries (git-ignored)
├── README.md
└── requirements.txt # ACL environment
Install dependencies with:
pip install -r requirements.txtNotes:
- Because this project was developed on an RTX 5090 GPU, some packages were early locally built versions. If exact builds are unavailable, please use approximately matching versions.
- Do not use
transformers5.x for the ACL code. Use the separate journal environment described below for the extension.
This section applies to the ACL conference implementation. The journal
extension uses independent ASTE/ASQP readers and data roots documented under
Journal Data and Official Downloads.
We provide a unified entry point for all SemEval datasets in src/core/data.py.
It covers the main English SemEval ATSA benchmarks together with multilingual
Restaurant-16 variants:
2:Laptop-143:Restaurant-144:Restaurant-155:Restaurant-166:Restaurant-16-FR7:Restaurant-16-RU8:Restaurant-16-ES9:Restaurant-16-DU10:Restaurant-16-TU
The repository expects the processed JSON files under:
data/semeval/Laptop_14/data/semeval/Restaurant_14/data/semeval/Restaurant_15/data/semeval/Restaurant_16/data/semeval/Restaurant_16_FR/data/semeval/Restaurant_16_RU/data/semeval/Restaurant_16_ES/data/semeval/Restaurant_16_DU/data/semeval/Restaurant_16_TU/
The data/ directory is distributed as a compressed archive instead of being maintained directly in the GitHub repository.
- Dataset archive (
data.tar.gz): Google Drive
After downloading data.tar.gz, place it at the project root and extract it with:
tar -xzf data.tar.gzThis restores the expected data/ directory used by src/core/data.py.
The released full-model checkpoints are also provided as a compressed archive:
- Checkpoint archive (
full_model.tar.gz): Google Drive
After downloading full_model.tar.gz, place it at the project root and extract it with:
tar -xzf full_model.tar.gzThis restores outputs/full_model/. You can then run batch inference over the released checkpoints with:
python scripts/run_full_model_inference.py --device cuda:0Single run:
DATASET_CHOICE=3 RANDOM_SEED=42 python scripts/train.py --dual-layerBatch runs for the full model on the four benchmarks:
python scripts/run_full_model_batch.py --datasets 2 3 4 5 --seeds 42 123 456Outputs are written to:
outputs/full_model/...results/full_model_batch_<timestamp>/...
To compare standard aspect-wise evaluation against the reuse path on a given checkpoint, run:
python scripts/compare_reuse_non_reuse_eval.py outputs/full_model/Restaurant-14/seed_42 --dataset-choice 3You can also specify a JSON output path if you want to save the comparison report:
python scripts/compare_reuse_non_reuse_eval.py \
outputs/full_model/Restaurant-14/seed_42 \
--dataset-choice 3 \
--json results/reuse_vs_non_reuse_res16_seed42.jsonThese benchmarks do not provide a standard development split. Following the protocol in the paper, the best checkpoint within the training budget is selected on the test split by macro-F1.
The journal extension studies whether the same single-encoder, reusable DABS
principle transfers from supplied-aspect ATSA to latent structured affective
extraction. It supports English ASTE, multilingual ASTE, and ASQP through one
Full DORA--QCBS implementation. The extension is isolated under journal/:
it does not import or modify the ACL src/ and scripts/ implementation.
Use a separate environment because the journal implementation has a newer software stack:
python -m venv journal/.venv
source journal/.venv/bin/activate
pip install -r journal/requirements.txtThe journal datasets are not redistributed here. Obtain them from their
upstream releases and place them under journal/data/:
| Task | Datasets used here | Upstream release |
|---|---|---|
| English ASTE | 14lap, 14res, 15res, 16res |
SemEval-Triplet-data / ASTE-Data-V2-EMNLP2020 |
| Polish ASTE | pl_hotels, fold 1 |
Polish-ASTE-Datasets |
| Catalan/Basque ASTE | ca, eu |
ASTE-Transformer multilingual conversions |
| ASQP | rest15, rest16 |
ABSA-QUAD |
Ready-to-run clone and copy commands, including the Polish fold mapping
valid.txt to dev.txt, are provided in
journal/data/README.md. Please follow the licences
and terms of the respective upstream datasets.
English ASTE:
python -m journal.train_aste \
--config journal/configs/aste_en.json \
--dataset 16res \
--seed 42Multilingual ASTE uses the same trainer with mDeBERTa:
python -m journal.train_aste \
--config journal/configs/aste_multilingual.json \
--dataset ca \
--seed 42ASQP:
python -m journal.train_asqp \
--config journal/configs/asqp.json \
--dataset rest16 \
--seed 42See journal/README.md for evaluation commands, the five
fixed seeds, output locations, and smoke checks.
If you find our code useful, feel free to ⭐ star this repository. If you use the ACL work in your research, please cite:
@inproceedings{xia2026single,
title={Single-Pass, Depth-Selective Reading for Multi-Aspect Sentiment Analysis},
author={Xia, Yan and Pan, Zhuangzhuang and Kamsin, Amirrudin and Chan, Chee Seng},
booktitle={Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)},
pages={14638--14656},
year={2026},
doi={10.18653/v1/2026.acl-long.667},
url={https://aclanthology.org/2026.acl-long.667/}
}