[Paper Review] Multi-Head Multi-Layer Attention to Deep Language Representations for Grammatical Error Detection
This paper proposes a multi-head multi-layer attention (MHMLA) mechanism that leverages intermediate and final layers of BERT to improve grammatical error detection (GED). By learning task-specific representations through multi-head attention over multiple layers, the model achieves state-of-the-art F₀.₅ scores on FCE (+6.0), CoNLL14 (+8.2), and JFLEG (+12.2) benchmarks, outperforming both BERT-base and prior SOTA methods.
It is known that a deep neural network model pre-trained with large-scale data greatly improves the accuracy of various tasks, especially when there are resource constraints. However, the information needed to solve a given task can vary, and simply using the output of the final layer is not necessarily sufficient. Moreover, to our knowledge, exploiting large language representation models to detect grammatical errors has not yet been studied. In this work, we investigate the effect of utilizing information not only from the final layer but also from intermediate layers of a pre-trained language representation model to detect grammatical errors. We propose a multi-head multi-layer attention model that determines the appropriate layers in Bidirectional Encoder Representation from Transformers (BERT). The proposed method achieved the best scores on three datasets for grammatical error detection tasks, outperforming the current state-of-the-art method by 6.0 points on FCE, 8.2 points on CoNLL14, and 12.2 points on JFLEG in terms of F_0.5. We also demonstrate that by using multi-head multi-layer attention, our model can exploit a broader range of information for each token in a sentence than a model that uses only the final layer's information.
Motivation & Objective
- To investigate whether intermediate layers of pre-trained language models like BERT contain useful information for grammatical error detection beyond the final layer.
- To improve GED performance by learning task-specific representations from multiple layers of a pre-trained model.
- To design a mechanism that effectively aggregates information across different layers of BERT for better contextual representation in GED.
- To demonstrate that multi-head attention over multiple layers enables broader and more effective information utilization per token than final-layer-only approaches.
Proposed method
- The proposed MHMLA model applies multi-head attention to hidden representations from multiple layers of BERT, allowing the model to dynamically attend to different layers for each token.
- The model fine-tunes all parameters of BERT-base on GED data, learning task-specific representations through end-to-end training.
- Multi-head attention computes attention scores across multiple subspaces, enabling the model to attend to various layers simultaneously and capture diverse linguistic features.
- The attention mechanism computes weighted sums of representations from different layers using learnable parameters, with the number of heads determining layer utilization granularity.
- The method uses a weighted sum of layer representations based on attention scores, where each head learns to focus on different combinations of layers.
- The model is trained end-to-end on three GED datasets: FCE, CoNLL14, and JFLEG, using standard BERT-base architecture with added MHMLA layers.

Experimental results
Research questions
- RQ1Can intermediate layers of BERT provide complementary information for grammatical error detection beyond the final layer?
- RQ2Does multi-head multi-layer attention effectively utilize representations from multiple layers to improve GED performance?
- RQ3How does the number of attention heads influence the model’s ability to attend to different layers and improve accuracy?
- RQ4Is there a significant performance gain when using MHMLA compared to using only the final layer or averaging across layers?
- RQ5Can MHMLA learn to attend to layers that correspond to syntactic and semantic roles relevant to error detection?
Key findings
- The MHMLA model achieved state-of-the-art F₀.₅ scores on all three GED benchmarks: 6.0 points higher than the previous SOTA on FCE, 8.2 points on CoNLL14, and 12.2 points on JFLEG.
- MHMLA outperformed BERT-base by 2.18, 1.29, 0.81, and 1.32 points in F₀.₅ on FCE, CoNLL14-{1,2}, and JFLEG, respectively.
- The model with 12 heads achieved the highest F₀.₅ on CoNLL14 and JFLEG, while 3 heads were optimal for FCE, indicating that head count affects layer attention distribution.
- Visualization showed that with 8 or 12 heads, MHMLA attended more uniformly across all layers, confirming broader information utilization.
- The AvgL baseline, which naively averages layer representations, underperformed MHMLA, proving that learned attention is more effective than fixed averaging.
- Attention visualization confirmed that MHMLA successfully learned to attend to multiple layers, especially when using more heads, achieving balanced layer utilization.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.