Neural Machine Translation English-Bengali
Rishi Dey Chowdhury
Ayush Bilkhiwal
Sujeet Kumar
Confidential
Customized for Lorem Ipsum LLC
Version 1.0
Hello! হ্যালো!
How are you? তুমি কেমন আছো?: 0.80, তুমি কেমন আছ?: 0.70 তুমি কেমন আছো?
(English Input) (Model generated scores) (Reference)
Confidential
Customized for Lorem Ipsum LLC
Version 1.0
Outline
Overview
Problems to solve
Strategy
Model Architecture
Hyperparameters
Model Performance
Translation Results
Conclusion
Confidential
Customized for Lorem Ipsum LLC
Version 1.0
Overview
Project objective
Literature
Survey
Literature Survey
Datasets
Datasets
�
Data Preprocessing
Output Sentence Selection
Neural Network is just the way to calculate the conditional probability of the next word that comes in the output sentence given the previous word generated in the output sequence till now and the input sentence in the case of Machine Translation. Now, we can opt for several ways, like Greedy Search, Beam Search, Minimizing Baye's Risk,etc. to find the output sequence with the highest joint probability. Looking for all possible combinations is computationally very expensive. Hence, we resort to heuristic and asymptotically best methods to generate the output sequence with highest probability. We resorted to two ways which are:
ROUGE SCORE =
MBR Selection Criterion:
MODELS
Architecture
1 Layer Transformer Architecture
We changed the Hyperparameters of the Transformer and trained 2 of these models to compare their performance.
With Attention head 0
Reference: https://jalammar.github.io/illustrated-transformer/
heads(0-7)
Feed Forward Neural Network
Reference: https://jalammar.github.io/illustrated-transformer/
With Multi headed Self Attention
Here we are using 2 heads we get the importance of tired word as well as the importance of animal word.
If we add all the attention heads to the picture, however, things can be harder to interpret
Reference: https://jalammar.github.io/illustrated-transformer/
Architecture
| 8 Heads | 8 Heads Big |
Number of Layers | 1 | 1 |
Number of Heads | 8 | 8 |
Embedding Dimension | 256 | 256 |
Key Dimension | 32 | 32 |
Value Dimension | 32 | 32 |
Number of Parallel Sentences | 1,54,836 | 7,28,047 |
Epochs | 10 | 10 |
Batch Size | 256 | 256 |
Architecture
2 Layer Transformer Architecture
We changed the Hyperparameters of the Transformer and trained 4 of these models to compare their performance.
Architecture
| 4 Heads | 8 Heads | 8 Heads Big | 8 Heads Dim Mod |
Number of Layers | 2 | 2 | 2 | 2 |
Number of Heads | 4 | 8 | 4 | 8 |
Embedding Dimension | 256 | 256 | 256 | 512 |
Key Dimension | 32 | 32 | 32 | 64 |
Value Dimension | 32 | 32 | 32 | 64 |
Number of Parallel Sentences | 1,54,836 | 1,54,836 | 7,28,047 | 1,54,836 |
Epochs | 10 | 10+10 | 10 (pretrained weights from 8-heads)+10 | 10+10 |
Batch Size | 256 | 256 | 256 | 256 |
Architecture
3 Layer Transformer Architecture
Hyperparameters:
Number of Layers = 2
Number of Heads = 4
Embedding Dimension = 256
Key Dimension = 32
Value Dimension = 32
Parallel Sentences = 1,54,836
Epochs = 10
Batch Size = 256
Architecture
4 Layer Transformer Architecture
We changed the Hyperparameters of the Transformer and trained 2 of these models to compare their performance.
Architecture
| 4 Heads | 4 Heads Big |
Number of Layers | 4 | 4 |
Number of Heads | 4 | 4 |
Embedding Dimension | 256 | 256 |
Key Dimension | 32 | 32 |
Value Dimension | 32 | 32 |
Number of Parallel Sentences | 1,54,836 | 7,28,047 |
Epochs | 10 | 10 |
Batch Size | 256 | 256 |
RESULTS
Results
For smaller dataset
For larger dataset
Results
For smaller data
For larger data
Results
| 8 Heads | 8 Heads Big |
BLEU | 1.51 | 3.03 |
chrF2 | 25.52 | 29.33 |
TER | 100.29 | 96.24 |
Manual Evaluation of 8 Heads on Test Data
English Sentence | Bengali Translation | Adequacy | Fluency |
Are we leaving for good? | আমরা ভাল যাব? | 0 | 0 |
Investigation was taken away. | তদন্ত করে খুঁজতে তদন্ত করা হয়েছে। | 0 | 0 |
The palace is an extended part of a huge complex. | প্রাসাদটি একটি জটিল জটিল একটি জটিল স্তর ধারণ করে। | 0 | 0 |
Then he abruptly disappeared. | তারপর হঠাৎ হারিয়ে গেলো সে। | 4 | 4 |
He had a rope tied around his waist. | তার কোমর ঘিরে ফেলে তিনি। | 1 | 4 |
There have been numerous ideas and attempts to reduce the amount of carbon emissions. | অনেকগুলি অণুযায়ী অনেক কিছু সফ্টভ্যতার জন্য প্রয়োজনীয় উপাদান সরবরাহ করা হয়েছে। | 0 | 0 |
In India, faith and Nature have had a deep link since ancient times. | ভারতে, বিশ্বাস এবং প্রকৃতি এবং প্রকৃতি যে প্রাচীন কালে ছিল ভারত। | 2 | 1 |
Manual Evaluation of 8 Heads on Test Data
English Sentence | Bengali Translation | Adequacy | Fluency |
What kind? | কোন ধরনের? | 4 | 4 |
India has emerged as a bright spot in the global economy which is driving global growth as well. | ভারতে বিশ্ব অর্থনীতি সারা বিশ্বে একটি উজ্জ্বল শিল্প সঞ্চার করে এবং বিশ্বের অর্থনীতি বিশ্বব্যাপী বিনিয়োগ করছে। | 2 | 2 |
Do you think it is possible for mere humans to come to know our almighty Creator, as stated here in the Bible? | আপনার কি মনে হয়, তুমি কি জানো আর আমাদের সৃষ্টিকর্তা সম্বন্ধে জানতে পারবে না? | 3 | 2 |
Results
Heads | English | Bengali Translation: MBR Score(10 samples) | Reference Translation |
8 | I love you. | তোমায় ভালোবাসি।?: 0.83, আমি তোমায় ভালবাসি।: 0.83 | আমি তোমাকে ভালোবাসি। |
8 | How are you. | তুমি কেমন আছ।: 0.93, তুমি কেমন আছ?: 0.89 | তুমি কেমন আছো। |
8 | I am hungry. | আমি ক্ষুধার্ত মানুষ।: 0.80, আমি ক্ষুধার্ত।: 0.74 | আমি ক্ষুধার্ত। |
8 | I am a boy. | আমি ছেলে।: 0.98, আমি তো ছেলে।: 0.85 | আমি ছেলে। |
8 Big | I love you. | ভালোবাসি।: 0.36, আমার সঙ্গে ভালবাসার সম্পর্ক।: 0.36 | আমি তোমাকে ভালোবাসি। |
8 Big | How are you. | কেমন আছো তুমি।: 0.99, তুমি কেমন আছো।: 0.99 | তুমি কেমন আছো। |
8 Big | Hyderabad is a beautiful city. | হায়দরাবাদের সুন্দর শহর।: 0.8576, হায়দ্রাবাদের একটি শহর।: 0.8573 | হায়দ্রাবাদ একটি সুন্দর শহর। |
8 Big | My name Rishi. | আমার নাম ঋষি।: 0.87, আমার নাম।: 0.83 | আমার নাম ঋষি। |
Results
Results
Results
Results
And the same trend holds for losses as well.
Results
| 4 Heads | 8 Heads | 8 Heads Big | 8 Heads Dim Mod |
BLEU | 0.80 | 1.07 | 2.82 | 0.06 |
chrF2 | 20.25 | 20.48 | 29.59 | 5.04 |
TER | 107.92 | 98.69 | 93.91 | 99.45 |
Manual Evaluation of 8 Heads Big on Test Data
English Sentence | Bengali Translation | Adequacy | Fluency |
His demise is anguishing. | তাঁর মৃত্যু মহাসমাঢ়। | 4 | 3 |
This is the ninth interaction in the series by the Prime Minister through video conference with the beneficiaries of various Government schemes. | প্রধানমন্ত্রীর বিভিন্ন প্রকল্পের মাধ্যমে এই আলোচনা সভা ছাড়াও প্রধানমন্ত্রী বিভিন্ন ধরনের সচিবদের সঙ্গে আলাপ-আলোচনা করবেন। | 0 | 1 |
He said that the Union Government is working with an approach of “isolation to integration” to develop all the hitherto under-developed parts of the country. | প্রধানমন্ত্রী বলেছেন, দেশের সার্বিক উন্নয়নের লক্ষ্যে কেন্দ্রীয় সরকার একযোগে কাজ করছে। | 1 | 4 |
Imran khan taking oath | শপথ নিলেন ইমরান খান। | 4 | 4 |
Samsung has been heavily rumoured to launch two new mid-end smartphones the Galaxy J7 (2017) and Galaxy J5 (2017). | স্যামসাং গ্যালাক্সি এম ০১ (২০১৭) এবং স্যামসাং (২০১৭-১৮৯), স্যামসাং এর দুটি নতুন স্মার্টফোন বাজারে এসেছে। | 1 | 3 |
Hence, the people in the area are in panic. | ফলে আতঙ্কে রয়েছে এলাকাবাসী। | 4 | 4 |
The issue has not come to my notice. | বিষয়টি আমার নজরে আসেনি। | 4 | 4 |
Manual Evaluation of 8 Heads Big on Test Data
English Sentence | Bengali Translation | Adequacy | Fluency |
But there is no use. | কিন্তু তাতে কোনও লাভ হয়নি। | 2 | 4 |
I just hate feeling helpless. | আমি শুধু অসহায় বোধ করি। | 1 | 4 |
I congratulate the Finance Minister Arun Jaitley Jee for presenting an excellent Budget. | এ নিয়ে বাজেট বক্তৃতায় প্রধানমন্ত্রী নরেন্দ্র মোদীর সঙ্গে বিভিন্ন বাজেটের জন্য শুভেচ্ছা জানাই। | 0 | 0 |
Results
Heads | English | Bengali Translation: MBR Score(10 samples) | Reference Translation |
4 | I love you. | আমি তোমাকে ভালোবাসি।: 0.98, আমি তোমাকে ভালবাসি।: 0.97 | আমি তোমাকে ভালোবাসি। |
4 | Thank You! | ধন্যবাদ!: 0.99, ধন্যবাদ তোমার!: 0.72 | ধন্যবাদ! |
4 | Modiji is India's Prime Minister. | কিন্তু নরেন্দ্র মোদী সরকার।: 0.81,নরেন্দ্র মোদী সরকারের ভারত।: 0.77 | মোদিজি ভারতের প্রধানমন্ত্রী |
8 | I am tired. | আমি ক্লান্ত হয়ে গেছি।: 0.93, ক্লান্ত হয়ে গেছি।: 0.86 | আমি ক্লান্ত |
8 | How are you? | তুমি কেমন আছো?: 0.80, তুমি কেমন আছ?: 0.70 | তুমি কেমন আছো |
8 | Hello! | হ্যালো! | হ্যালো! |
8 | Let's start! আসুন শুরু যাক! | চল শুরু করি! | |
8 Big | Let's Start! | চলো, শুরু করি!: 0.72, চলো শুরু করছি!: 0.72 | চল শুরু করি! |
8 Big | I like Durga Puja very much. | আমি দুর্গা পূজা করতে খুব পছন্দ করি।: 0.76, আমার কাছে দুর্গা পূজা খুব ভাল লাগে।: 0.76, আমি দুর্গা পূজা খুব ভালোবাসি।: 0.75 | আমি দুর্গা পূজা করতে খুব পছন্দ করি। |
8 Big | I am hungry | আমি ক্ষুধার্ত।: 0.95, আমার ক্ষুধার্ত।: 0.87 | আমি ক্ষুধার্ত। |
8 Dim | I love you. | কিন্তু অপরিবর্তিত থাকতে পেরেছিলেন ঠিক।: 0.52, ১৩ ঈশ্বরের বাক্য বাইবেল জোর নেই।: 0.52 | আমি তোমাকে ভালোবাসি। |
Results
Results
| 4 Heads |
BLEU | 0.01 |
chrF2 | 2.85 |
TER | 211.89 |
Heads | English | Bengali Translation: MBR Score(10 samples) | Reference Translation |
4 | I love you. | কলকাতা, নোয়াখালী মতো-এর নিচে পূর্ণ করে তাদের কম কাছে খুশি করা এবং অন্যটি যা বিভিন্ন পরিশ্রম হয়।: 0.37, তারা গোকীতে আমি এই ভূমিকা।: 0.37 | আমি তোমাকে ভালোবাসি। |
Manual Evaluation of all examples gives 0 Adequacy and 0 Fluency
Results
Results
Results
| 4 Heads | 4 Heads Big |
BLEU | 0.00 | 0.00 |
chrF2 | 3.29 | 2.18 |
TER | 429.87 | 100.00 |
Heads | English | Bengali Translation: MBR Score(10 samples) | Reference Translation |
4 | I love you. | কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু কিন্তু | আমি তোমাকে ভালোবাসি। |
4 Big | I love you. | দেশের ছোট সরকারি ওঁকে সামনে।: 0.43, রাস্তায় কোন তেমনটা কোন পেয়েছে পারে কারো এখানে এ গ্রেপ্তারবেন হয় করে সঙ্গে।: 0.43 | আমি তোমাকে ভালোবাসি। |
Manual Evaluation of all examples gives 0 Adequacy and 0 Fluency
Conclusion
�
English Bengali Translation: MBR Score Reference Translation
Thank You! ধন্যবাদ!: 0.99, ধন্যবাদ তোমার!: 0.72 ধন্যবাদ!