File size: 2,281 Bytes
d085cb6
 
 
 
 
 
 
 
 
 
 
a5a4d75
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d085cb6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
---
license: apache-2.0
task_categories:
- translation
- automatic-speech-recognition
language:
- zh
- en
size_categories:
- 100K<n<1M
---
# Attention2Probability: Attention-Driven Terminology Probability Estimation for Robust Speech-to-Text System

<p align="center">
  <a href="https://arxiv.org/abs/2508.18701" alt="paper"><img src="https://img.shields.io/badge/Paper-A2P-blue?logo=arxiv&logoColor=white"/></a>
  <a href="https://huggingface.co/ByteDance/Attention2Probability" alt="Model"><img src="https://img.shields.io/badge/Model-A2P-yellow?logo=huggingface"/></a>
  <a href="https://huggingface.co/datasets/ByteDance/Attention2Probability" alt="Dataset"><img src="https://img.shields.io/badge/Dataset-A2P-yellow?logo=huggingface"/></a>


Attention2Probability (A2P) is a lightweight intervention scheme for speech terminology. The core approach is to use the cross-attention mechanism to retrieve the terms that may appear in the audio and add these terms to the prompt of the llm to complete the term intervention.

## Data description
This project does not provide audio data for librispeech and aishell2. Please download them from other addresses. All the training data is provided in the data_json folder. The prefix path needs to be modified before use.

## Training step
For English, the LibriSpeech dataset should first be utilized for pre-training. Subsequently, the second-stage training on LibriSpeech can be conducted by modifying the settings in the dataset configuration. 

For Chinese, retrieving a single character in isolation lacks practical significance; thus, the Retriever can be directly trained using the Aishell-2 dataset. Finally, the models for both languages are fine-tuned on real-world data.


## Citation
If you find A2P useful, please cite the paper:
```
@misc{du2025attention2probabilityattentiondriventerminologyprobability,
      title={Attention2Probability: Attention-Driven Terminology Probability Estimation for Robust Speech-to-Text System}, 
      author={Yanfan Du and Jun Zhang and Bin Wang and Jin Qiu and Lu Huang and Yuan Ge and Xiaoqian Liu and Tong Xiao and Jingbo Zhu},
      year={2025},
      eprint={2508.18701},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2508.18701}, 
}
```