VIETNAM NATIONAL UNIVERSITY HO CHI MINH CITY HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY NGUYỄN TẤN SANG LEVERAGING SENTENCE-ORIENTED AUGMENTATION AND TRANSFORMER-BASED ARCHITECTURE FOR VIETNAMESE-BAHNARIC TRANSLATION Major: Computer Science Major code: 8480101 MASTER THESIS HO CHI MINH CITY, July 2023 VIETNAM NATIONAL UNIVERSITY HO CHI MINH CITY HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY NGUYỄN TẤN SANG LEVERAGING SENTENCE-ORIENTED AUGMENTATION AND TRANSFORMER-BASED ARCHITECTURE FOR VIETNAMESE-BAHNARIC TRANSLATION Major: Computer Science Major code: 8480101 MASTER THESIS HO CHI MINH CITY, July 2023 THIS THESIS IS COMPLETED AT HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY – VNU-HCM Supervisor(s): • Assoc. Quản Thành Thơ • Dr. Nguyễn Tiến Thịnh Examiner 1: Assoc. Bùi Hoài Thắng Examiner 2: Dr.
Bùi Thanh Hùng This master’s thesis is defended at HCM City University of Technology, VNU- HCM City on July 13, 2023 Master’s Thesis Committee: (Please write down full name and academic rank of each member of the Master’s Thesis Committee) 1. Võ Thị Ngọc Châu 2. Phan Trọng Nhân 3. Bùi Hoài Thắng 4.
Bùi Thanh Hùng 5. Bùi Công Giao Approval of the Chairman of Master’s Thesis Committee and Dean of Faculty of Computer Science and Engineering after the thesis is corrected (If any). CHAIRMAN OF THESIS COMMITTEE DEAN OF FACULTY OF COMPUTER SCIENCE AND ENGINEERING i VIETNAM NATIONAL UNIVERSITY - HO CHI MINH CITY SOCIALIST REPUBLIC OF VIETNAM HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY Independence – Freedom - Happiness THE TASK SHEET OF MASTER’S THESIS Full name: NGUYỄN TẤN SANG Student ID: 2170459 Date of birth: 24/11/1997 Place of birth: HCM City Major: Computer Science Major ID: 8480101 I. THESIS TITLE: LEVERAGING SENTENCE-ORIENTED AUGMENTATION AND TRANSFORMER-BASED ARCHITECTURE FOR VIETNAMESE-BAHNARIC TRANS- LATION (TẬN DỤNG TĂNG CƯỜNG DỮ LIỆU TẬP TRUNG THEO CÂU VÀ KIẾN TRÚC TRANSFORMER TRONG DỊCH TIẾNG VIỆT-TIẾNG BANA) II.
TASKS AND CONTENTS: • Researching data augmentation in neural machine translation • Proposing suitable approaches for data augmentation in low-resource machine translation • Experimenting and evaluating proposed approaches III. THESIS START DAY: 06/02/2023 IV. THESIS COMPLETION DAY: 09/06/2023 V. Quản Thành Thơ, Dr.
Nguyễn Tiến Thịnh Ho Chi Minh City, 09/06/2023 SUPERVISOR 1 SUPERVISOR 2 CHAIR OF PROGRAM COMMITTEE (Full name and signature) (Full name and signature) (Full name and signature) Quản Thành Thơ Nguyễn Tiến Thịnh DEAN OF FACULTY OF COMPUTER SCIENCE AND ENGINEERING (Full name and signature) ii ACKNOWLEDGMENTS I would like to thank my parents for their unceasing love for me and their faith that I could accomplish anything I put my mind to. Their presence in my life has led me here, and now more than ever, I realize how truly amazing they are. I want to express my profound appreciation to Assoc. Quản Thành Thơ, for his supportive guidance, encouragement, and invaluable feedback throughout this study.
I am immensely grateful for his patience in guiding me and reviewing my work. Without his guidance and support, this thesis would not become possible. I also want to thank Mr. Phạm Quốc Nguyên and Mr.
Nguyễn Quang Đức for their enthusiastic cooperation and encouragement in offering valuable advice during the thesis. Lastly, I would like to express my gratitude to our friends and the Computer Sci- ence and Engineering Department faculty members for enriching my master’s studies with an enjoyable and valuable experience. This project is supported by the Ministry of Science and Technology (MOST) within the framework of the Program "Supporting research, development, and tech- nology application of Industry 4.0/19-25 - Project "Development of a Vietnamese-Bahnaric machine translation and Bahnaric text-to-speech system (all di- alects)" - KC-4. iii ABSTRACT In the context of neural machine translation, data augmentation techniques serve the purpose of generating additional training samples when there is a scarcity of avail- able parallel data.
The goal of many data augmentation approaches is to expand the support of the empirical data distribution by creating new sentence pairs that include infrequent words. This approach helps align the data distribution more closely with the true distribution observed in parallel sentences. Besides, other data augmentation techniques from other natural language processing tasks can be studied and applied in neural machine translation. Therefore, in this thesis, the researcher only focused on investigating and experimenting to see the affection of different data augmenta- tion techniques on neural machine translation, especially low-resource neural machine translation.
There are two data augmentation approaches have been proposed. • In a multi-task data augmentation approach, new sentence pairs are generated through transformations. These augmented sentences are employed as auxiliary tasks within a multi-task framework during training. The objective is to intro- duce fresh contexts where the target prefix alone does not provide sufficient in- formation for predicting the next word accurately.
This approach enhances the encoder’s capabilities and compels the decoder to focus more on the source rep- resentations from the encoder. The effectiveness of this method was evaluated through experiments conducted on five translation tasks with limited resources. • Drawing inspiration from sentiment Tweet analysis, the Sentence Boundary Aug- mentation method extends the application of the noising-based approach beyond the word level to include sentence-level augmentation. In neural machine trans- lation, handling errors related to grammatical structure and sentence boundaries poses significant challenges to ensure robustness.
Through thoroughly examin- ing errors, it becomes evident that sentence boundary segmentation has the most substantial impact on translation quality. To enhance segmentation robustness, a straightforward data augmentation strategy is devised. iv TÓM TẮT LUẬN VĂN Trong ngữ cảnh của dịch máy, các kỹ thuật tăng cường dữ liệu phục vụ mục đích tạo ra thêm mẫu huấn luyện khi có sự thiếu hụt dữ liệu song song. Mục tiêu của các phương pháp tăng cường dữ liệu là mở rộng bộ liệu có sẵn bằng cách tạo ra các cặp câu mới.
Phương pháp này giúp cân bằng phân phối dữ liệu một cách gần gũi hơn so với bộ dữ liệu song song trong thực tế. Ngoài ra, các kỹ thuật tăng cường dữ liệu từ các nhiệm vụ khác trong xử lý ngôn ngữ tự nhiên có thể được nghiên cứu và áp dụng trong dịch máy. Do đó, trong luận văn này, tác giả chỉ tập trung vào việc nghiên cứu và thực nghiệm để quan sát những ảnh hưởng của các kỹ thuật tăng cường dữ liệu khác nhau đối với dịch máy, đặc biệt là trong dịch máy với tài nguyên hạn chế. Hai phương pháp tăng cường dữ liệu đã được đề xuất.
• Trong phương pháp tăng cường dữ liệu đa nhiệm, các cặp câu mới được tạo ra thông qua các biến đổi. Những câu này được sử dụng với mục đích hỗ trợ trong quá trình huấn luyện. Mục tiêu là tạo ra các nội dung mới nơi mà thông tin để dự đoán từ tiếp theo không phụ thuộc vào tiền tố một cách hoàn toàn. Phương pháp này tăng cường sức mạnh của bộ mã hóa và ép bộ giải mã tập trung hơn vào các đơn vị mã hóa từ bộ mã hóa.
Phương pháp này đã thể hiện được sự hiểu quả thông qua các thử nghiệm được tiến hành trên việc dịch với tài nguyên hạn chế. • Lấy cảm hứng từ phân tích cảm xúc trên Twitter, phương pháp Tăng cường Biên giới Câu đã mở rộng ứng dụng của tăng cường dữ liệu bằng cách tạo nhiễu ở cấp độ câu. Trong dịch máy, việc xử lý lỗi liên quan đến cấu trúc ngữ pháp và phân hoạch câu là một trong những thách thức đáng kể. Qua việc kiểm tra kỹ lưỡng các lỗi, ta có thể thấy rằng lỗi phân hoạch câu ảnh hưởng mạnh nhất đến chất lượng dịch.
Để cải thiện tính ổn định trong chất lượng dịch, một chiến lược tăng cường dữ liệu đơn giản đã được xây dựng. v COMMITMENT I declare this thesis to be a work of mine under the supervision of Assoc. Quản Thành Thơ was built to meet society’s demands, and my ability to achieve information. The contents of external assistance should be recorded, referenced, and cited.
Nguyễn Tấn Sang June 9, 2023 Contents List of Figures. viii List of Tables .3 Objectives And Missions .4 Scope Of Work .1 Neural Machine Translation .2 Goals And Trade-offs .5 Applications on NLP tasks .3 Dialects In Bahnar Language .4 Vietnamese-Bahnar Translating Notices .1 Data Augmentation in NMT .2 Pre-training data .4 Multi-task Learning Data Augmentation .5 Sentence Boundary Augmentation. 46 6 EXPERIMENTS AND EVALUATIONS 49 6.3 Results And Discussion. 72 List of Figures 1.1 The commonly used methods of DA for NMT .1 Taxonomy of DA NLP Methods .2 Hyperparameters that affect the augmentation effect in each DA method 18 4.1 Illustration of the proposed span cutoff method with one specific ex- ample (from the SST-2 dataset) [60] .2 The overall architecture of our soft contextual data augmentation ap- proach in the encoder side for source sentences.
The decoder side for target sentences is similar.1 General pipeline of augmenting, training and evaluating process. 40 viii List of Tables 3.1 Example of Bahnar dialects differences .2 Similarity level of two groups in Bahnar language .1 Interpretation of BLEU scores [72] .2 Example of Multi-task Learning Data Augmentation .3 Example of Sentence Boundary Augmentation .1 Original Dataset Information .3 Total sentence pairs of the baseline and augmented training sets .4 BLEU scores obtained with the baseline and MTL DA approach, us- ing different auxiliary tasks and combinations of them .5 BLEU scores obtained in evaluation and prediction, using different p in sentence boundary augmentation approach .6 BLEU scores obtained with the baseline and MTL DA approach com- bination, sentence boundary, EDA and semantic embedding .7 Translating issues of chosen sentences in test set .8 Predict BLEU scores of Collocation and word-by-word with baseline and other DA methods. 57 ix Chapter 1 INTRODUCTION 1.1 General Introduction Machine Translation (MT) [1] is a major sub-field of Natural Language Process- ing (NLP) [2] that focuses on translating human languages automatically by using a computer. Machine translation relies heavily on manual translation rules and lin- guistic knowledge in the early stages.
However, because the nature of language is significantly complicated, it is impossible to cover all irregular cases with just hand- crafted translation rules. During the development process of MT, more and more large-scale parallel corpora appeared. With the data-driven approaches, Statistical Machine Translation (SMT) [3] has replaced the original rule-based translation due to its availability to study latent factors such as word alignment or phrases directly from corpora. But SMT is still far from expectations because it cannot model long- distance word dependencies.
With the emergence of deep learning in recent years, Neural Machine Translation (NMT) [4], [5] has become a new model and replaced SMT to become the mainstream of MT. This project primarily aims to use NMT to translate Vietnamese to Bahnar (the language used by one of the ethnic minorities of Vietnam - the Bahnar people). The translation system can make communication between Bahnar people and others who use native Vietnamese easier. Moreover, the system can be enhanced and developed 1 2 to become a more friendly application(web or mobile).
Besides, due to Circular No. 34/2020/TT-BGDĐT, now published by the Ministry of Education and Training in 2020 [6], Bahnar is a subject in the language education field that students from ele- mentary level to high school level can learn. Studying Bahnar is a way to conserve the national language and honor the spiritual values and culture of the Bahnar people. While the availability of large parallel corpora significantly impacts how a neural machine translation system performs, the Bahnar language itself is a low-resource language [7], which can make the system suffer from poor translation quality [8].
Therefore, Data Augmentation (DA) [9] needs to be involved in the project to generate extra data points from the empirically observed training set to train the NMT model.