\documentclass[english]{jnlp_3.8}
\usepackage{jnlpbbl_2.2}
\usepackage[dvipdfmx]{graphicx}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{url}
\usepackage{array}
\allowdisplaybreaks

\usepackage{hangcaption_jnlp}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% author's definition

\usepackage{bm}
%%%%%\usepackage{tabularx}
\usepackage{xcolor}
\usepackage{colortbl}
\usepackage{multirow}
\usepackage{enumitem}
%%%%%\makeatletter
%%%%%\let\MYcaption\@makecaption
%%%%%\makeatother

%%%%%\usepackage{subcaption}
%%%%%\captionsetup{compatibility=false}

%%%%%\makeatletter
%%%%%\let\@makecaption\MYcaption
%%%%%\makeatother

%%%%%\newcommand*{\red}{\textcolor{red}}
%%%%%\newcommand*{\blue}{\textcolor{blue}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\Volume{32}
\Number{2}
\Month{June}
\Year{2025}
%%%%\Issuetitle{「　　　　」特集号}

\received{2024}{10}{1}
\revised{2024}{12}{13}
\accepted{2025}{1}{15}

\setcounter{page}{438}



%%%%   Title, Author, etc.            %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\esubject{General Paper}
\etitle{Enhancing Automated Essay Scoring with Grammatical Features using Multi-task Learning and \\ Item Response Theory}
\eauthor{Kosuke Doi\affiref{Author_1} \and Katsuhito Sudoh\affiref{Author_1}\affiref{Author_2} \and Satoshi Nakamura\affiref{Author_1}\affiref{Author_3} \and Taro Watanabe\affiref{Author_1}}
\eabstract{In foreign language learning, writing tasks play a crucial role in developing and assessing learners' language abilities, but manual scoring requires significant time and effort. Automated essay scoring (AES) is a way to mitigate this problem. Although human raters consider grammatical items and their difficulties as clues for judging learners' proficiency levels while scoring essays, it is unclear whether the current state-of-the-art AES models, which use BERT-based essay representations, consider these factors. In this paper, we propose to incorporate grammatical features into BERT-based AES models in three ways: (1) using grammatical features as additional model inputs, (2) performing multi-task learning (MTL) with holistic and grammar scores while using grammatical features as model inputs, and (3) reconstructing grammatical features through MTL with holistic scores. For grammatical features, we model learners' grammar usage using item response theory (IRT), which measures learners' grammar abilities and characteristics of grammatical items, including their difficulties, based on essay data without teacher labels. The experimental results show that grammatical features improve the scoring performance, and further improvements are brought by MTL with holistic and grammar scores. We also show that weighting grammatical items using IRT-estimated difficulties improve the scoring performance, and IRT-estimated grammar abilities can be used for the labels of MTL.
}
\ekeywords{Automated Essay Scoring, Grammar, Multi-Task Learning, Item Response Theory}

\headauthor{Doi et al.}
\headtitle{Enhancing AES with Grammatical Features using MTL and IRT}



%%%%     Affiliation     %%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\affilabel{Author_1}{}{Nara Institute of Science and Technology}
\affilabel{Author_2}{}{Nara Women's University}
\affilabel{Author_3}{}{The Chinese University of Hong Kong, Shenzhen}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}

\maketitle

\renewcommand{\thefootnote}{\fnsymbol{footnote}}
\footnote[0]{This paper is an extended version of \citeA{doi-etal-2024-automated} presented at the 19th Workshop on Innovative Use of NLP for Building Educational Applications (BEA 2024).
The code is publicly available at \url{https://github.com/ahclab/aes-grammar-mtl-irt}.
}
\renewcommand{\thefootnote}{\arabic{footnote}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%S1
\section{Introduction}
Writing tasks in foreign language learning are activities that require learners to write essays (\emph{e.g.}, argumentative essays and narrative essays) and are widely used in tests or classroom activities to assess and develop learners' language abilities.
It is essential for learners to write essays because writing involves generating ideas, organizing them, and using language correctly.
However, this poses two major challenges for evaluating them: (1)~the considerable time and effort required from human raters, and (2)~ensuring inter- and intra-rater reliability.
Automated essay scoring (AES) is an approach to address these issues by automatically assigning a score to an essay.

Current state-of-the-art AES models \cite{yang-etal-2020-enhancing,cao-2020-domain,wang-etal-2022-use} employed BERT \cite{devlin-etal-2019-bert} to encode an essay as a feature representation to predict 
a holistic score, \emph{i.e.}, a single overall score.
Ideally, an essay representation should capture various aspects of the essay, such as content, organization, and grammar, aligning with the human rater assignment of holistic scores considering those factors as shown in the rubric for TOEFL iBT Independent Writing in Table~\ref{table:toefl_writing_rubric}.
However, it remains unclear whether BERT-based essay representations adequately capture them.
\citeA{uto-etal-2020-neural} demonstrated that incorporating handcrafted features into BERT-based AES models, including those related to grammar, semantic, or argumentation, improved the model performance, while \citeA{banno-matassoni-2022-cross} reported that incorporating information related to grammatical errors did not improve AES performance.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%T1
\begin{table}[b]
\input{02table01.tex}
\caption{Criteria for TOEFL iBT Independent Writing (Score 5)}
\label{table:toefl_writing_rubric}
\end{table}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


Given these contradictory results, we focus on the aspect of grammar among the various other aspects of writing and examine the effectiveness of incorporating grammatical features into BERT-based AES models.
To address the problem of whether BERT-based essay representations have sufficient grammar-related information, we propose three different methods to incorporate grammatical features:
(1)~using grammatical features as additional inputs to a model, (2)~training a model to jointly predict holistic scores and grammar scores through multi-task learning \cite<MTL;>{Caruana-1997} while using grammatical features as additional model inputs, and (3)~reconstructing learners' grammar usage in essays through the MTL of holistic scores and grammatical features.
In method~(2), we further apply the MTL of holistic scores and grammar scores under the setting of method~(1) because simply concatenating grammatical features with essay representations \cite{uto-etal-2020-neural,banno-matassoni-2022-cross} may lead to problems such as explain-away, where a model only relies on features that make predictions easier, causing the model to ignore grammatical features \cite{klein-manning-2002-conditional,vu-etal-2024-context}.
In method~(3), a model only takes essay representations as model input to jointly predict holistic scores and grammatical features.
While using grammatical features as additional model inputs, \emph{i.e.}, \mbox{methods~(1) and (2)}, requires explicit extraction of grammatical features both at training time and test time, method~(3) allows us to run the trained model on test data without part-of-speech tagging and subsequent feature extraction.

Our focus on grammar is inspired by the fact that it has been one of the key features for analyzing writing proficiency development in second language acquisition research \cite{Wolfe-Quintero_1998}, and that human raters are known to reflect it during the evaluation of learners' performance \cite{Hawkins_2012}.
In fact, grammatical features have been employed in many feature-engineering AES models \cite<see>{Ke2019_survey} as well as in hybrid models, which incorporate handcrafted features into deep neural network-based AES models~\cite{dasgupta-etal-2018-augmenting,uto-etal-2020-neural,banno-matassoni-2022-cross}.
However, individual grammatical items, \mbox{\emph{e.g.}, adverbial }clause \emph{if} and \emph{so that}, have been transformed into grammatical complexity measures such as the ratio of dependent clauses per clause in most previous studies \cite<\emph{e.g.},>{Vajjala2018_automated,uto-etal-2020-neural}, making it difficult to capture the characteristics of each grammatical item.

Therefore, we design our grammatical features based on individual grammatical items, without transforming them into grammatical complexity measures.
We also use the frequencies of grammatical errors as features.
Grammatical errors in essays are corrected using a modern grammatical error correction model \cite<GECToR-large;>{tarnavskyi-etal-2022-ensembling}, and their frequencies are calculated using ERRANT \cite{bryant-etal-2017-automatic}.

Considering the characteristics of individual grammatical items, we propose to model learners' grammar usage for each writing task using item response theory \cite<IRT;>{Lord-1980}, assuming
that learners with different proficiency levels use different grammatical items in their essays.
We employ IRT because it can model the relationships between examinees' responses to test items and their latent abilities (\emph{e.g.}, learners' responses to questions in an English test and their English abilities).
By treating each individual grammatical item as a test item, IRT can predict the probability that a writer uses a grammatical item correctly based on item parameters (\emph{e.g.}, difficulties) and the writer's grammar ability.
Item parameters can be estimated based on writers' grammar usage patterns, and grammar abilities can be estimated using the estimated item parameters and grammar usage patterns.
Note that no teacher labels are required for IRT estimations.
We use the probability and item parameters to weight the grammatical features (\emph{e.g.}, awarding for the use of a difficult grammatical item; see Section~\ref{sssec:weighted-pf}).

In experiments, we examine the effectiveness of our three different methods of incorporating grammatical features into BERT-based AES models, \emph{i.e.}, (1)~using grammatical features as additional model inputs, (2)~performing MTL of holistic scores and grammar scores while using grammatical features as additional model inputs, and (3)~reconstructing grammatical features through MTL with holistic scores.
We demonstrate that combining grammatical features with essay representations improves AES performance, and further improvements are brought by applying MTL and weighting grammatical features with IRT-estimated difficulties.
Then, we analyze grammatical items that contribute to predicting holistic scores of essays by computing
Integrated Gradients \cite{Sundararajan-2017-integrated-gradients} as a measure of feature importance for model inputs (\emph{i.e.}, essay representations and grammatical items).
We compare important grammatical items across different essay tasks and show that some items are consistently significant across the tasks.
Furthermore, we show that the MTL approach, which jointly predicts holistic scores and grammatical features, achieves comparable results to those obtained using grammatical features as additional inputs.

This paper is an extended version of our work \cite{doi-etal-2024-automated} presented at the 19th Workshop on Innovative Use of NLP for Building Educational Applications.
While \citeA{doi-etal-2024-automated} analyzed the results based on predicted scores, this paper presents the analysis of grammatical features that contribute to score predictions.
Additionally, we newly propose our third approach to incorporate grammatical features, \emph{i.e.}, an MTL approach that jointly predicts essay scores and grammatical features, and present the results of its experiments.



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%S2
\section{Related Work and Background}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%S2.1
\subsection{Grammatical Features in Writing Evaluation}

Grammar has been one of the important constructs for evaluating learners' writing abilities.
Syntactic complexity\footnote{Syntactic complexity refers to the extent to which a learner can use a wide variety of both basic and sophisticated grammatical items \cite{Wolfe-Quintero_1998}.} and accuracy are major components of writing proficiency development analysis in second language acquisition research, and various complexity and accuracy measures, such as frequency of dependent clauses and error-free clause ratio, have been shown to correlate with L2 proficiency levels \cite<see>{Kuiken_2023,housen-et-al-2012}.
In addition, analysis of learner corpora identified criterial features, which refer to linguistic properties that are characteristic and indicative of L2 proficiency levels and that distinguish higher levels from lower \cite{Hawkins_2012}.
These features include positive linguistic features (PFs) and negative linguistic features (NFs).
PFs refer to grammatical items that learners at a certain level and above can use correctly, while NFs refer to grammatical items that learners at a certain level are likely to make mistakes with.

These findings in the language learning field suggest that explicitly incorporating grammatical features improves AES performance.
For example, \mbox{e-rater} \cite{Burstein2004_e-rater} employs a feature related to grammatical errors along with other 11 features.
\citeA{yannakoudakis-etal-2011-new} automatically extracted grammatical structures as well as various linguistic features using a parser, which were used to train SVM ranking models.
\citeA{Vajjala2018_automated} observed that large weights were assigned to features related to grammatical complexity and errors among various linguistic features.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%S2.2
\subsection{Deep Learning-based Automated Essay Scoring}

Early AES models used handcrafted features for predicting essay scores \cite<see>{Ke2019_survey}, while it has become popular to adopt deep learning-based approaches.
Since \citeA{taghipour-ng-2016-neural} proposed the first neural AES model based on RNN, various other models have been developed, including those based on CNN \cite{dong-zhang-2016-automatic}, Bi-LSTM \cite{alikaniotis-etal-2016-automatic}, and pre-trained language models \cite{nadeem-etal-2019-automated,yang-etal-2020-enhancing,cao-2020-domain,wang-etal-2022-use}.
A hybrid model has also been proposed by incorporating manually designed features into a deep neural network-based model \cite{dasgupta-etal-2018-augmenting,uto-etal-2020-neural,banno-matassoni-2022-cross}.
Grammatical features, such as syntactic complexity measures and frequencies of grammatical errors, are used in hybrid models as well as in feature-based models.

With the great success of large language models (LLMs), some studies have explored their potential in AES.
\citeA{mizumoto-2023} employed GPT-3.5 to score essays written by learners of English, obtaining promising scoring performance.
Furthermore, they showed that using linguistic features enhanced performance.
\citeA{yancey-etal-2023-rating} also reported the promising performance of GPT-4 in a few-shot setting.
\citeA{stahl-etal-2024-exploring} demonstrated that employing LLMs to jointly perform AES and feedback generation can improve AES performance.
While these studies focused on holistic scores, \citeA{banno-etal-2024-gpt} investigated whether GPT-4 can predict analytic scores.\footnote{Analytic scores correspond to different aspects of the essay, including grammar, vocabulary, content, or organization \cite{Weigle_2002}. A separate score is assigned to each aspect.}

The state-of-the-art AES models employed BERT to encode essays and obtain essay representations based on the embeddings of \texttt{[CLS]} token \cite{yang-etal-2020-enhancing,cao-2020-domain} or \texttt{[CLS]} token and each token in the essay \cite{wang-etal-2022-use}.
Although various aspects of writing, including grammar, should be considered during scoring essays, it is unclear whether the BERT-based essay representations fully captured them.
Information related to these aspects can be incorporated into hybrid models, but the effectiveness of features related to grammar was inconsistent: \citeA{uto-etal-2020-neural} reported that syntactic features contributed to predicting essay scores, while \citeA{banno-matassoni-2022-cross} found that features on grammatical errors did not improve AES performance.
In addition, most previous studies transformed features related to correctly used grammatical items into syntactic complexity measures, thereby overlooking the characteristics of each item.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%S2.3
\subsection{Multi-task Learning}

Multi-task learning \cite<MTL;>{Caruana-1997} is a technique that improves the generalization performance of the main task by training a single model to perform multiple tasks simultaneously.
MTL has been shown to be effective for AES in previous studies.
To address the data scarcity for each essay set in the ASAP dataset,\footnote{\url{https://www.kaggle.com/c/asap-aes}} MTL was used by considering eight sets as different tasks \cite{cummins-etal-2016-constrained,Xue-2021-hierarchical}.
Other NLP tasks were also employed for MTL: those related to the use of language include grammatical error detection \cite{Cummins2018_multi-task,elks-2021-using-transfer}; morpho-syntactic labeling and language modeling \cite{craighead-etal-2020-investigating}; and predicting the level of each token \cite{elks-2021-using-transfer}.

MTL was also employed to train models to predict multiple essay traits simultaneously \cite{mathias-bhattacharyya-2020-neural,Hussein-2020,mim-etal-2019-unsupervised,Ridley_He_Dai_Huang_Chen_2021}.
This approach is similar to our MTL framework where models are jointly trained on holistic scores and grammar scores using essay representations and grammatical features as model inputs.
However, ours aims to encourage models to consider grammar usage by applying MTL as well as explicitly taking grammatical features as input.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%S2.4
\subsection{Item Response Theory}
\label{ssec:review-irt}

IRT is a popular probabilistic framework in psychological and educational measurements that models the relationship between individuals' latent traits, \emph{i.e.}, unobservable characteristic or attribute, and their responses to test items \cite{Hambleton-1991-irt}.
An IRT model defines the probability that an examinee provides a certain response, \emph{e.g.}, correct response, to a test item as a function of the item parameters and the ability parameter.
Item parameters, \emph{e.g.}, the discrimination parameter $a$ and difficulty parameter $b$, represent the characteristics of the item, and the ability parameter denoted as $\theta$ represents the ability of the examinee.

Given an English test consisting of multiple-choice questions, an IRT model can represent the relationships between the examinee's English abilities and responses to items in the test.
In this case, an item response is dichotomous: 1 if an examinee chooses the correct option, otherwise~0.
Let the $i$-th ($i = 1, 2,  ..., I$) examinee's responses to test items be $\bm{u}_i = \{u_{i1}, u_{i2}, ..., u_{iJ}\}$, where $I$ and $J$ denote the number of examinees and test items, respectively.
Given an item response matrix $\bm{U} = \{\bm{u}_1, \bm{u}_2, ..., \bm{u}_I\}$, we can estimate the item parameters.
For example, the difficulty parameter $b_{j}$ represents the difficulty of the $j$-th item.
Then, the ability parameter $\bm{\theta} = \{\theta_1, \theta_2, ... \theta_I \}$ can be estimated using $\bm{U}$ and estimated item parameters.
Here, $\theta_i$ represents the $i$-th examinee's English ability.

Previous AES studies used IRT to address raters' bias \cite{Uto-2021-learning}, integrate predicted scores from multiple AES models \cite{Aomi-2021,Uto-2023-integration}, and predict analytic scores \cite{Uto-2021-multidimensional,shibata-uto-2022-analytic}.
These studies employed a multidimensional IRT model, assuming that observed variables (\emph{i.e.}, scores) depended on one or more underlying factors (\emph{e.g.}, different rater characteristics).
In other words, unidimensionality was not assumed for the subject to which IRT was applied.

In this work, we treat each individual grammatical item as a test item and employ IRT to model the relationships between writers' grammar abilities and their grammar usage patterns in the essays.
We assume that the correct use of individual grammatical items constitutes grammar ability (\emph{i.e.}, it satisfies the assumption of unidimensionality), and employ the two-parameter logistic model \cite{Lord-1952}, which is defined by the following equation:
%%%%%
\begin{equation}
\label{equation-2plm-irt}
  P_{ij} (\theta_i) = \frac{1}{1 + \exp(-Da_j(\theta_i - b_j))}
\end{equation}
%%%%%
where $P_{ij} (\theta_i)$ is the probability that the writer $i$ with ability $\theta_i$ uses the grammatical item $j$ correctly, $a_j$ is the discrimination parameter for item $j$, and $b_j$ is the difficulty parameter for item $j$.
$D$ is a scaling factor and set to $1.0$ in this work.
The relationships defined in Equation \ref{equation-2plm-irt} are expressed by a monotonically increasing function called the item characteristic curve (ICC).
Examples of the ICC with different $a_j$ and $b_j$ are shown in Figure \ref{fig:icc-irt}.
The value of $b_j$ corresponds to that of the ability $\theta$ at which the probability of a correct response is 0.5.
An item with a greater $b_j$ value requires a higher level of ability for a correct response.
The $a$ parameter determines the slope of the ICC, and an item with a greater $a_j$ value is more useful for judging examinees' abilities around the ability level $b_j$.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%F1
\begin{figure}[t]
\begin{center}
\includegraphics{32-2ia2f01.eps}
\end{center}
\caption{Examples of the item characteristic curve}
\label{fig:icc-irt}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%S3
\section{Proposed Method}

Incorporating grammatical features in AES faces two challenges: (a)~it is unclear whether BERT-based essay representations adequately capture information related to grammar usage, and (b)~existing grammatical features may overlook the characteristics of individual grammatical features.
To address challenge (a), we propose to incorporate grammatical features in three ways: (1)~using grammatical features as additional inputs to a model, (2)~training a model to jointly predict the holistic scores and grammar scores under the setting of (1), and (3)~unlike (1) or (2) where grammatical features are used as additional inputs, training a model to jointly predict the holistic scores and grammatical features.
For challenge (b), we propose to adjust grammatical features using IRT.
Here, grammatical features refer to those that contain information about the usage of grammatical items, \emph{e.g.}, correct use of to-infinitives and erroneous use of definite articles.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%S3.1
\subsection{Task Formulation}
\label{ssec:task-formulation}

The task of AES is defined as follows: given an essay $\bm{W}_i = \{w_{i1}, w_{i2}, ..., w_{iN_i}\}$ written by the writer $i$ ($i = 1, 2,  ..., I$), where $N_i$ and $I$ denote the number of the words and writers respectively,\footnote{Hereafter, $I$ represents the number of writers rather than the number of examinees to match the AES task settings (see Section \ref{ssec:review-irt}).} a model $f(\bm{W}_i)$ returns its score $\hat{s}_i$.
The task of predicting the holistic score of an essay $\hat{s}_{i}^{hol}$ can be formalized as follows: 
%%%%%
\begin{equation}
\hat{s}_{i}^{hol}=f(\bm{W}_i).
\end{equation}
%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%S3.2
\subsection{Grammatical Features}

Foreign language learners master more grammatical items as they progress in proficiency levels \cite<\emph{e.g.},>{hawkins-buttery-2009}.
Among various language proficiency scales, our study relies on the Common European Frameworks of References \cite<CEFR;>{Council_of_Europe2001_cefr,Council_of_Europe2020_cefr_cv}.
Before the CEFR was published, proficiency levels were defined independently by each scale and test, resulting in inconsistent use of terminology.
For example, the corresponding levels are defined using different terms in the ALTE Framework\footnote{\url{https://www.cambridgeenglish.org/images/28906-alte-can-do-document.pdf}} and the ACTFL Proficiency Guidelines,\footnote{\url{https://www.actfl.org/uploads/files/general/Resources-Publications/ACTFL_Proficiency_Guidelines_2024.pdf}}
while a score of 60 corresponds to different proficiency levels in TOEFL iBT\footnote{\url{https://www.ets.org/toefl.html}} and PTE Academic.\footnote{\url{https://www.pearsonpte.com/pte-academic}}
The CEFR provides a framework for a common understanding of language levels, and today, most scales and tests are aligned with the CEFR.

The CEFR defines proficiency across seven levels ranging from Pre-A1 (beginner) to C2 (advanced).
Each proficiency level is described based on a functional perspective using can-do statements, such as ``Can write short, simple essays on topics of interest.''
Because of this language-neutral nature, the grammatical and lexical properties that learners develop across the CEFR levels have been studied independently for each language.
In the English language, these properties, \emph{i.e.}, criterial features, have been explored in several projects, including the English Profile Programme \cite{Hawkins_2012} and CEFR-J Grammar Profile \cite{Ishii-2018}.

We expect that incorporating grammatical features would make the models aware of criterial features and improve their AES performance.
Following the definition of criterial features, we design both
PFs and NFs for our experiments, which are listed in Table~\ref{tab:g_features}.
The details will be described in the following sections. 


%%%%%%%%%%%%%%%%%%%%%%%%%T2
\begin{table}[t]
\input{02table02.tex}
\caption{Grammatical features used in our experiments}
\label{tab:g_features}
\end{table}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%S3.2.1
\subsubsection{Positive linguistic features}

We extract PFs using a toolkit\footnote{\url{https://www.cefr-j.org/PDF/sympo2020/CEFRJGP_SCRIPTS.zip#back}} provided by the CEFR-J Grammar Profile.
Given sentences with lemma and part-of-speech information, it outputs the frequencies of 501 grammatical items in the sentences based on regular expressions.

In this study, we obtain the frequencies of grammatical items in each essay and convert these frequencies into the 256-dimensional vector \texttt{type256}, which is denoted as $\bm{g}^{type256}_{i} = \{g^{type256}_{i1}, g^{type256}_{i2}, ..., g^{type256}_{ij}, ..., g^{type256}_{i256}\}$.\footnote{Hereafter, the $j$-th grammatical item is referred to $g_{j}$, and $J$ represents the number of grammatical items rather than the number of test items to match the AES task settings (see Section \ref{ssec:review-irt}). In the case of $\bm{g}^{type256}_{i}$, $J=256$.}
We reduce the 501 items to 256 because some are less frequent, even in large learner corpora.\footnote{The data can be downloaded from \url{https://www.cefr-j.org/PDF/sympo2020/CEFRJGP_FULL.zip#back}.}
The toolkit provides frequencies for each different sentence type of grammatical items, \emph{i.e.}, affirmative, negative, declarative, interrogative, imperative, and their combinations, and items such as the negative interrogative of the present perfect are typically infrequent.
We use a list of 256 grammatical items following the CEFR-J Grammar Profile for Teachers,\footnote{\url{https://www.cefr-j.org/download.html#cefrj_grammar}} which does not distinguish sentence types for the same grammatical items.
For example, the four sentence types of present perfect, \emph{i.e.}, the affirmative declarative, affirmative interrogative, negative declarative, and negative interrogative, are combined into a single item called the present perfect on the list.

Given an essay $\bm{W}_i$, we automatically annotate the lemma and part-of-speech information to each word in $\bm{W}_i$ using TreeTagger.\footnote{\url{https://www.cis.uni-muenchen.de/~schmid/tools/TreeTagger/}}
Then, the essay with lemma and part-of-speech information $\bm{W}^{pos}_i$ is passed to the toolkit to obtain the frequencies of the 501 grammatical items.
The 501 items are converted into 256 items by combining grammatical items with different sentence types into one item, following the CEFR-J Grammar Profile for Teachers.
We calculate the frequency of a combined item by summing the frequencies of its different sentence types.
We convert the vector of the frequencies into $\bm{g}^{type256}_{i}$ such that each dimension represents a grammatical item, where $g^{type256}_{ij} = 1$ if the writer $i$ uses the item $j$ in the essay, and 0 otherwise.
We do not normalize \texttt{type256} by essay length because the value for each dimension is binary rather than frequency.\footnote{In our preliminary experiments, the features based on normalized frequencies did not perform as well as \texttt{type256}.}
Note that $\bm{W}^{pos}_i$ is used only to obtain \texttt{type256}, and the original essay $\bm{W}_i$ is used to train AES models.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%S3.2.2
\subsubsection{PFs weighted using IRT parameters}
\label{sssec:weighted-pf}

Studies on criterial features have indicated that learners master more grammatical items as they advance through the CEFR levels.
However, the characteristics of the items, including the difficulties, are not considered in \texttt{type256}.
To address this problem, we employ IRT and modify \texttt{type256} using the IRT parameters.

We transform $g^{type256}_{ij}$ in the following four ways:
%%%%%
\begin{description}[labelwidth=7.3em]
    \setlength{\itemsep}{+7pt}
    \setlength{\leftskip}{1.5cm}
    \item[multiply\_b:] $g^{\mathit{multiply\_b}}_{ij} = g^{\mathit{type}256}_{ij} \times b_j$
    \item[prob:] $g^{\mathit{prob}}_{ij} = P_{ij}(\hat{\theta}_i)$
    \item[multiply\_prob:] $g^{\mathit{multiply\_prob}}_{ij} = g^{\mathit{type}256}_{ij} \times P_{ij}(\hat{\theta}_i)$
    \item[add\_prob:] $g^{\mathit{add\_prob}}_{ij} = \alpha g^{\mathit{type}256}_{ij} + (1-\alpha) P_{ij}(\hat{\theta}_i)$
\end{description}
%%%%%
where $b_j$ is the difficulty parameter for the item $j$, and $\hat{\theta}_i$ is the grammar ability of the writer $i$ estimated using IRT. 
$\alpha$ is a weighting parameter and is set to $0.5$ in this paper.

We designed \texttt{multiply\_b} to award writers who use difficult grammatical items by multiplying the difficulty parameter for the items.
Since the difficulty parameters can take negative values, we normalize them in the range of \mbox{$[0, 1]$} when we use them to obtain \texttt{multiply\_b}.
\texttt{multiply\_b} takes larger values for more difficult grammatical items.
However, writers might not use certain grammatical items even though they have enough ability to do so.
Therefore, we introduce IRT, \emph{i.e.}, $P_{ij}(\hat{\theta}_i)$ to the features, which represents the probability that writer $i$ with ability $\hat{\theta}_i$ can use the item $j$ correctly.
In \texttt{prob}, $g^{type256}_{ij}$ is substituted with $P_{ij}(\hat{\theta}_i)$, 
while the two values are combined to consider both (1)~whether the writer actually uses the item in the essay ($g^{type256}_{ij}$) and (2)~whether the writer has sufficient grammar ability to use it ($P_{ij}(\hat{\theta}_i)$) in \texttt{multiply\_prob} and \texttt{add\_prob}.
If writers use the item $j$ in the essay, but IRT predicts that the writer is not likely to use the item correctly, the value of $g^{multiply\_prob}_{ij}$ is reduced.
In other words, we impose a penalty when writers correctly use the item \emph{by chance} (\emph{e.g.}, they memorize a phrase that includes the grammatical item).
When the writer $i$ does not use the item $j$ in the essay, $g^{multiply\_prob}_{ij}$ equals zero, but $g^{add\_prob}_{ij}$ does not.
$\alpha$ controls which factor, the actual use in essays or the writers' abilities, is given more importance.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%S3.2.3
\subsubsection{Negative linguistic features}

We use the number of grammatical errors per 100 words as NFs.
Given an essay $\bm{W}_i$, we automatically correct grammatical errors in $\bm{W}_i$ using GECToR-large \cite{tarnavskyi-etal-2022-ensembling}, a pre-trained GECToR based on RoBERTa-large,\footnote{Available at \url{https://github.com/MaksTarnavskyi/gector-large}.} and obtain the corrected essay $\bm{W}^{GEC}_i$.
We pass $\bm{W}_i$ and $\bm{W}^{GEC}_i$ into ERRANT \cite{bryant-etal-2017-automatic} and calculate the frequencies of grammatical errors.
We obtain the 54-dimensional vector \texttt{err54} based on error tags assigned by ERRANT\footnote{Based on all possible combinations of the error types and categories. We compared the 54- and 24-dimensional vectors (based only on the error types) in preliminary experiments. We use the 54-dimensional vector for our experiments because it improved the model performance more.} such that each dimension of \texttt{err54} corresponds to ERRANT's error tag.
We use ERRANT's tags rather than GECToR's because most of GECToR's tags are related to specific tokens, \emph{e.g.}, \texttt{APPEND\_for}, and not appropriate for capturing errors in certain grammatical categories such as \texttt{preposition} \cite<see>{omelianchuk-etal-2020-gector}.
Note that $\bm{W}^{GEC}_i$ is used only to calculate grammatical error frequencies, and the original essay $\bm{W}_i$ is used to train AES models.



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%S3.3
\subsection{Estimation of IRT Parameters}
\label{sssec:settings-irt-parameters}

The first step in estimating IRT parameters is to estimate the values of the item parameters $a_j$ and $b_j$, \emph{i.e.}, the characteristics of each grammatical item.
Given writers' grammar usage patterns $\bm{g}=\{\bm{g}_1^{type256}, \bm{g}_2^{type256}, ..., \bm{g}_i^{type256}, ..., \bm{g}_I^{type256}\}$, the item parameters $a_j$ and $b_j$ in the two-parameter logistic model (Equation \ref{equation-2plm-irt}) are estimated using the marginal maximum likelihood estimation \cite{Bock_irt_1981}.
Then, using the estimated item parameters and $\bm{g}$, we estimate the latent grammar abilities $\theta_i$ using the maximum likelihood estimation method.

Many IRT-based studies focused on an expected a posteriori (EAP) estimation, a type of Bayesian estimation \cite<\emph{e.g.},>{Uto-2021-learning}.
The advantages of EAP estimation are (1)~providing robust estimations for complex IRT models and (2)~working properly when an examinee has a non-mixed response vector, \emph{i.e.}, the elements of $\bm{g}_i^{type256}$ are all 1 or all 0 \cite{uto-2016-irt,Thompson-2009-irt}.
We opted to use the more simple two-parameter logistic model, assuming that learners are unlikely to write essays using all or none of the grammatical items listed in the CEFR-J Grammar Profile for Teachers.
Therefore, using the maximum likelihood estimation in this study is reasonable and acceptable.

In the process of estimating item parameters $a_j$ and $b_j$, outlier items (\emph{e.g.}, items whose correct response rates are extremely high/low) could affect the parameter estimation of other items or potentially make the estimation impossible.
Therefore, prior to estimating the item parameters, we conduct item analysis based on classical test theory (CTT) and exclude such items.

CTT analysis involves the following procedures:
We calculate the correct response rate $p_j$ and item-total correlation $r_j$, which is one of the commonly used item discrimination indices in CTT:
%%%%%
\begin{align}
  &p_j = \frac{\sum_{i=1}^I g^{\mathit{type}256}_{ij}}{I} \\
  &r_j = r(\bm{y}, \bm{g}_j^{\mathit{type}256}) = \frac{\frac{1}{I}\sum_{i=1}^I (y_i - \bar{y})(g^{\mathit{type}256}_{ij} - \bar{g}^{\mathit{type}256}_j)}{s_y s_j} \\[-9pt]
\intertext{where{\vskip -6pt}}
  &y_i = \sum_{j=1}^J g^{\mathit{type}256}_{ij} \\
  &\bar{y} = \frac{\sum_{i=1}^I y_i}{I}.
\end{align}
%%%%%
$p_j$ represents the percentage of writers who use the item $j$ correctly in their essays.
Given $\bm{y} = \{y_1, y_2, ..., y_i, ..., y_I \}$ and $\bm{g}^{type256}_{j} = \{g^{type256}_{1j}, g^{type256}_{2j}, ..., g^{type256}_{ij}, ..., g^{type256}_{Ij}\}$, $r_j$ is defined as the correlation coefficient between $\bm{y}$ and $\bm{g}^{type256}_{j}$, where $y_i$ is the number of different grammatical items that the writer $i$ used in the essay and $g^{type256}_{ij}$ represents whether the writer $i$ used the item $j$ in the essay.
Here, $g^{type256}_{ij}$ is a binary variable that takes the value 0 or 1, and $\bar{g}^{type256}_j$ is the mean of $\bm{g}^{type256}_{j}$ that is equal to $p_j$.
$\bar{y}$ is the average number of different grammatical items used in the essays.
$s_y$ and $s_j$ are the standard deviations for $\bm{y}$ and $\bm{g}_j^{type256}$, respectively.

Outlier items are defined as those whose $p_j$ equals 0 or 1, or whose $r_j$ is less than 0.1.
We calculate $p_j$ and $r_j$ for each grammatical item and exclude outliers.
Then, we recalculate $p_j$ and $r_j$ and repeat the process until no more items need to be excluded.

To assess the dimensionality of the data, we employ factor analysis.
We calculate the eigenvalues of the tetrachoric correlation matrix and plot them on a graph.
We evaluate dimensionality based on the number of factors above the elbow (\emph{i.e.}, the point where the slope of the scree plot begins to level off).
Another assumption of IRT called local independence is evaluated using the $\rm{Q_3}$ statistic \cite{yen-1984-irt}.
Local independence means that responses to different items are statistically independent of each other when the ability parameter $\theta$ is fixed.

After item analysis based on CTT, we estimate IRT parameters.
Note that IRT parameters are estimated independently from the prediction of essay scores, and are frozen during the training of scoring models.



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%F2
\begin{figure}[b]
{\vspace{-4pt}}
\begin{center}
\includegraphics{32-2ia2f02.eps}
\end{center}
\caption{The architectures of proposed models}
\label{fig:model}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%S3.4
\subsection{Model Architecture}
\label{ssec:model-architecture}

Figure \ref{fig:model} shows the architectures of our proposed and baseline models.
All of our models are developed using BERT in line with the state-of-the-art AES models.
We tokenize $\bm{W}_i$ using the BERT tokenizer into a token sequence $\bm{T}_i = \{[CLS], t_1, t_2, ..., t_{L_i}\}$, where $L_i$ is the number of subwords.
Assuming the BERT model to be $\rm{BERT}(\cdot)$, we obtain essay representations $\bm{h}_i^{[CLS]}$ from its \texttt{[CLS]} token.
We pass the essay representations into a fully connected feed-forward neural network $\rm{FFNN^{top}}(\cdot)$ and obtain predicted scores.
This process can be formalized as:
%%%%%
\begin{align}
  &\bm{h}_i^{[CLS]} = \rm{BERT}(\textbf{\textit{T}}_\textit{i}) \\
  &\hat{s}_{i}^{hol} = \rm{FFNN^{top}}(\textbf{\textit{h}}_\textit{i}^{[CLS]}).
\end{align}
%%%%%


As a baseline, we employ a model that takes a batch of essays as inputs and predicts their holistic scores, which is denoted as $\hat{s}_{i}^{hol}=f(\bm{h}_i^{[CLS]})$.
We formalize the AES task as a regression problem and use the mean squared error (MSE) as the loss function, which is defined as:
%%%%%
\begin{equation}
\label{equation-mse-loss}
    \mathit{MSE}(\bm{s}, \bm{\hat{s}}) = \frac{1}{I}\sum_{i=1}^{I}(s_i - \hat{s}_i)^2
\end{equation}
%%%%%
where $s_i$ and $\hat{s}_i$ are the gold and predicted scores for the $i$-th writer's essay, respectively.
To train the baseline models, we minimize $\mathit{MSE}(\bm{s}^{hol}, \bm{\hat{s}}^{hol})$.
Our approach incorporating grammatical features into BERT-based AES models is described in the following two sections.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%S3.4.1
\subsubsection{Using grammatical features as model inputs}
\label{sssec:model-architecture-grammatical-features-as-model-input}

We use grammatical features as additional model inputs in four settings: \texttt{cat}, \texttt{net}, \texttt{multi}, and \texttt{dual}, as shown in Figure \ref{fig:model}.
The \texttt{cat} and \texttt{net} models correspond to the proposed method (1)~using grammatical features as additional inputs, while the \texttt{multi} and \texttt{dual} models correspond to (2)~training a model to jointly predict the holistic scores and grammar scores under the setting of (1).

In \texttt{cat}, the essay representation and vector of grammatical features are simply concatenated and fed into the $\rm{FFNN^{top}}$.
Letting grammatical features be $\bm{g}_i =\{g_{i1}, g_{i2}, ..., g_{iJ}\}$, the \texttt{cat} model is formalized as follows:
%%%%%
\begin{equation}
    \hat{s}_{i}^{hol}=f^{cat}(\bm{h}_i^{[\mathit{CLS}]}; \bm{g}_i).
\end{equation}
%%%%%
This setting is equivalent to the hybrid model proposed by \citeA{uto-etal-2020-neural}
and serves as a benchmark for comparison with other settings that use grammatical features as inputs.

In \texttt{net}, we input the vector of grammatical features into an additional FFNN, which is denoted as $\rm{FFNN^{gra}(\cdot)}$.
Then, the representation obtained from the final layer is concatenated with the essay representation.
The \texttt{net} model is formalized as follows:
%%%%%
\begin{equation}
    \hat{s}_{i}^{hol}=f^{net}(\bm{h}_i^{[\mathit{CLS}]}, \rm{FFNN^{gra}}(\textbf{\textit{g}}_\textit{i})).
\end{equation}
%%%%%
Studies on criterial features suggest that certain grammatical items play important roles in predicting learners' proficiency levels, and we leverage $\rm{FFNN^{gra}}(\cdot)$ to learn representations useful for the AES task rather than relying on manual feature engineering.

In \texttt{multi}, MTL is applied with the model architecture of \texttt{net}.
The weights of $\rm{FFNN^{top}}$ are shared for the prediction of the holistic score $\hat{s}_{i}^{hol}$ and grammar score $\hat{s}_{i}^{gra}$.\footnote{We tried models with layers dedicated for each task in our preliminary studies, but the performance was worse than those without them.}
The \texttt{multi} model is denoted as follows:
%%%%%
\begin{equation}
    \hat{s}_{i}^{hol}, \hat{s}_{i}^{gra}=f^{\mathit{multi}}(\bm{h}_i^{[CLS]}, \rm{FFNN^{gra}}(\textbf{\textit{g}}_\textit{i})).
\end{equation}
%%%%%
We expect that the joint prediction of $\hat{s}_{i}^{hol}$ and $\hat{s}_{i}^{gra}$ help the models learn better essay and grammar representations and improve AES performance.


The \texttt{dual} model is represented as follows:
%%%%%
\begin{align}
    &\hat{s}_{i}^{gra}, \bm{h}_i^{gra}=\rm{FFNN^{gra}}(\textbf{\textit{g}}_\textit{i}) \\
    &\hat{s}_{i}^{hol}=f^{dual}(\bm{h}_i^{[CLS]}, \bm{h}_i^{gra}),
\end{align}
%%%%%
where $\bm{h}_i^{gra}$ is grammar representations obtained from the final layer of $\rm{FFNN^{gra}}(\cdot)$.
The difference with \texttt{multi} is that $\hat{s}_{i}^{gra}$ is predicted from $\rm{FFNN^{gra}}$ in \texttt{dual}, which we expect to allow $\rm{FFNN^{gra}}$ to learn better grammar representations.
The prediction of $\hat{s}_{i}^{hol}$ is based on a vector that concatenates $\bm{h}_i^{[\mathit{CLS}]}$ and $\bm{h}_i^{gra}$, similar to the \texttt{net} and \texttt{multi} settings.

We train models using human-annotated holistic and grammar scores as the gold scores, which are available in the ASAP and ASAP++ datasets \cite{mathias-bhattacharyya-2018-asap}.
In \texttt{multi} and \texttt{dual}, we further train the models using IRT-estimated grammar abilities $\hat{\theta}_i$ instead of human-annotated grammar scores to avoid using additional human-annotated labels, as IRT does not require any teacher labels.
The models trained using the human-annotated grammar scores are denoted as \texttt{multi-hum} or \texttt{dual-hum}, while those trained using IRT-estimated grammar abilities are denoted as \texttt{multi-irt} or \texttt{dual-irt}.
Note that we use \texttt{type256} as the additional input for the \texttt{multi-irt} and \texttt{dual-irt} models and do not use IRT-weighted grammatical features to prevent problems such as shortcut learning.

The models described in this section are optimized with MSE loss.
We minimize $\mathit{MSE}(\bm{s}^{hol},$ $\bm{\hat{s}}^{hol})$ to train the \texttt{cat} and \texttt{net} models, while we minimize a loss function that combines losses for the main and auxiliary tasks to train the \texttt{multi} and \texttt{dual} models, which is defined as:
%%%%%
\begin{equation}
\label{equation-combined-loss-mtl}
    \mathit{Loss_{MTL}} = \beta \mathit{MSE}(\bm{s}^{hol}, \bm{\hat{s}}^{hol}) + (1 - \beta) \mathit{MSE}(\bm{s}^{gra}, \bm{\hat{s}}^{gra})
\end{equation}
%%%%%
where $\beta$ is a weighting parameter that defines the weight of the main task.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%S3.4.2
\subsubsection{Reconstructing grammatical features}

While the four model architectures described in Section \ref{sssec:model-architecture-grammatical-features-as-model-input} use grammatical features as model inputs, the \texttt{reconstruct} model corresponds to the proposed method (3), and is designed to obviate the need for the explicit extraction of grammatical features at test time.
Taking essay representations as inputs without additional grammatical features, the model jointly predicts the holistic scores (the main task) and patterns of grammar usage (the auxiliary task), which can be represented as follows:
%%%%%
\begin{equation}
    \hat{s}_{i}^{hol}, \bm{\hat{g}}_i=f^{\mathit{recons}}(\bm{h}_i^{[CLS]}).
\end{equation}
%%%%%
Similar to the \texttt{multi} setting, the weights of $\rm{FFNN^{top}}$ are shared for the prediction of the holistic score $\hat{s}_{i}^{hol}$ and grammar usage $\bm{\hat{g}}_{i}$.
We use PFs, \emph{i.e.}, $\bm{g}^{type256}_{i}$ and IRT-weighted PFs, as teacher signals for the auxiliary task.

We employ MSE for the main task and the binary cross entropy (BCE) for the auxiliary task as the loss functions.\footnote{We trained models using the MSE loss for both the main and the auxiliary tasks, but their performance was worse than those using the BCE loss for the auxiliary task.}
The BCE loss is defined as:
%%%%%
\begin{equation}
\label{equation-combined-loss-reconstruct}
    \mathit{BCE}(\bm{g}, \bm{\hat{g}}) = -\sum_{i=1}^{I}\sum_{j=1}^{J}(g_{ij}\log (\hat{g}_{ij}) + (1 - g_{ij})\log (1 - \hat{g}_{ij}))
\end{equation}
%%%%%
where $g_{ij}$ is a gold label indicating whether the writer $i$ uses the grammatical item $j$ in the essay, and $\hat{g}_{ij}$ is a predicted value.
We employ the BCE loss for the auxiliary task because $g^{type256}_{ij}$ is a binary variable that takes a value of 0 or 1.
We normalize IRT-weighted PFs in the range [0, 1].
By using a sigmoid as the activation function in the output layer of $\rm{FFNN^{top}}$, the predicted values are constrained to the range [0, 1].
To train \texttt{reconstruct} models, we minimize the loss function defined as follows:
%%%%%
\begin{equation}
    \mathit{Loss_{rec}} = \gamma \mathit{MSE}(\bm{s}^{hol}, \bm{\hat{s}}^{hol}) + (1 - \gamma) \mathit{BCE}(\bm{g}, \bm{\hat{g}}).
\label{eq18}
\end{equation}
%%%%%
$\gamma$ is a weighting parameter that defines the weight for the main task.



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%S4
\section{Experimental Setting}

In the this section, we describe the data and evaluation metric used in our experiments, and the experimental settings.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%S4.1
\subsection{Data and Evaluation}

In our experiments, we used data from the ASAP and the ASAP++ dataset \cite{mathias-bhattacharyya-2018-asap}.
The ASAP dataset consists of eight essay sets, each containing essays generated from an essay task called a prompt.
The prompts vary in topics and genres, including argumentative and narrative essays.
Some prompts required a response to a source text.
Each essay is graded by human raters.
The essays generated from Prompts 1--6 were assigned holistic scores, while those from Prompts 7--8 were assigned analytic scores.
The holistic scores for essays in Prompts 7 and 8 are calculated as the weighted sum of the analytic scores.
The ASAP++ dataset includes analytic scores of essays for Prompts 1--6.
Among various analytic scores, such as content or organization, we only used those related to grammar.\footnote{Conventions for Prompts 1, 2, 7, and 8. Language for Prompts 3--6.}
Statistics of the ASAP and ASAP++ datasets are shown in Table \ref{tab:datasets-statistics}.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%T3
\begin{table}[b]
\input{02table03.tex}
\hangcaption{Statistics of the ASAP and ASAP++ datasets. For the essay type column, Arg, Res, and Nar represent argumentative essays, source-dependent responses, and narrative essays, respectively. Essays in Prompt 2 are assigned two types of scores: Domain 1 (writing applications) and Domain 2 (language applications). The values of average length are cited from the essay set descriptions provided by the ASAP dataset.}
\label{tab:datasets-statistics}
\end{table}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



We developed AES models for each prompt that predicted the holistic scores of the essays.
We evaluated their scoring performance using the Quadratic Weighted Kappa (QWK).
Following previous studies, we performed five-fold cross-validation using the data split (60/20/20 split for training, development, and test sets) defined by \citeA{taghipour-ng-2016-neural}.



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%S4.2
\subsection{Settings}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%S4.2.1
\subsubsection{Grammatical items eligible for IRT}

After the CTT-based item analysis described in Section \ref{sssec:settings-irt-parameters}, approximately 80--130 grammatical items were eligible for applying IRT, as shown in Table \ref{tab:number-of-item-weighted-irt}.
Figure \ref{fig:scree-plot} shows the eigenvalues obtained by factor analysis for different numbers of dimensions in Fold 0 of Prompt 1.
Although the eigenvalues continued to decrease until they fell below 1 at approximately the 40th eigenvalue, there was a significant drop between the first and second eigenvalues, indicating the presence of one dominant factor.
Similar results were obtained with other folds and prompts, and we considered the assumption of unidimensionality to be satisfied.



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%T4
\begin{table}[b]
\input{02table04.tex}
\caption{The number of grammatical items weighted using IRT parameters}
\label{tab:number-of-item-weighted-irt}
\end{table}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%F3
\begin{figure}[b]
\begin{center}
\includegraphics{32-2ia2f03.eps}
\end{center}
\caption{Scree plot for Fold 0 of Prompt 1. The horizontal line indicates that eigenvalue equals to 1.}
\label{fig:scree-plot}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



The $\rm{Q_3}$ statistic for some item pairs was over 0.2, which suggests that the assumption of local independence was not fully satisfied \cite{yen-2023}.
For example, the average $\rm{Q_3}$ statistic in Fold 0 of Prompt 1 was 0.03, with a standard deviation of 0.04, and 45 pairs (0.5\%) exceeded the 0.2 threshold.
However, real-world tests often do not satisfy the assumption, and some research has shown that applying the two-parameter logistic model to such data is acceptable in practical situations, although this affects the accuracy of parameter estimation \cite{Ishizuka-2001-irt,Todo-2012-irt,Tsubota-irt-2018}.
Since we did not directly use IRT for the AES task but for (1)~modifying grammatical features or (2)~the auxiliary task in MTL, we decided not to exclude items suspected of local dependence.

Therefore, we applied IRT to grammatical items in Table \ref{tab:number-of-item-weighted-irt} and obtained item parameters.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%S4.2.2
\subsubsection{AES model training}
\label{sssec:aes-model-training-settings}

We normalized the holistic scores of essays into the range of $[-1, 1]$ in the training time of all our experiments, while we rescaled the normalized scores back to the original range when calculating QWK scores.
As described in Section \ref{ssec:model-architecture}, our AES models were developed based on BERT.
We used \texttt{bert-base-uncased} from Huggingface's transformers library.\footnote{\url{https://github.com/huggingface/transformers}}
We set the maximum input length to 512.


%%%%%
\paragraph{Baseline}
We fine-tuned BERT on the training data for 10 epochs with MSE loss.
We used the Adam optimizer \cite{kingma-2015} with a learning rate of 1e-5.
We trained the models with the batch size $\{4, 8, 16, 32\}$ and selected one for each prompt based on the QWK scores on the development set.


%%%%%
\paragraph{Models that take grammatical features as inputs}
We employed MSE loss for the \texttt{cat} and \texttt{net} models, and the loss function defined in Formula \ref{equation-combined-loss-mtl} for the \texttt{multi} and \texttt{dual} models, which combines MSE losses from the main and auxiliary tasks.
We updated the parameters for the FFNN(s) and BERT layers.

$\rm{FFNN^{gra}}$ consisted of three layers, and the number of nodes in each layer was set to one-half the dimension of the input grammatical features.
For $\rm{FFNN^{top}}$, we set the number of nodes in each layer to the sum of the dimensions of the essay and grammar representations (\emph{i.e.}, the dimension of \texttt{[CLS]} $+$ the nodes of $\rm{FFNN^{gra}}$), while we explored the optimal number of layers from $\{1, 2, 3, 4, 5, 7, 10\}$.
For all layers of $\rm{FFNN^{gra}}$ and the hidden layers of $\rm{FFNN^{top}}$, we used ReLU as the activation function and set the dropout ratio to 0.2.
We did not apply an activation function to the output layer of $\rm{FFNN^{top}}$.
When the output scores from the models were larger than $1$ or smaller than $-1$, the scores were converted into the maximum or minimum scores of their essay prompt, respectively.
In \texttt{multi} and \texttt{dual}, we also tested $\{0.8, 0.6\}$ for $\beta$, \emph{i.e.}, the weights of the loss function for the main task.
We selected the optimal values for the number of layers for $\rm{FFNN^{top}}$ and loss weight based on the QWK scores on the development set for Prompt~1.


%%%%%
\paragraph{Models that reconstruct grammatical features}
The \texttt{reconstruct} models were optimized with the loss function defined in Formula \ref{eq18}, which employs MSE for the main task and BCE for the auxiliary task.
Similar to other model architectures, we updated the parameters for $\rm{FFNN^{top}}$ and BERT layers.

We employed sigmoid as the activation function for the final layer of $\rm{FFNN^{top}}$ and ReLU for the other layers.
Each layer of $\rm{FFNN^{top}}$ consisted of 768 nodes (\emph{i.e.}, the dimension of \texttt{[CLS]}).
We explored the number of layers for $\rm{FFNN^{top}}$ from $\{1, 2, 3, 4, 5, 7, 10\}$ and the loss weight $\gamma$ from $\{0.8, 0.6\}$.
We determined the optimal values based on the QWK scores on the development set for Prompt 1.


%%%%%
\paragraph{Settings common to all proposed models}
We normalized grammar scores in the range of \mbox{$[-1, 1]$}.
We normalized the IRT's $b$ parameters in the range of \mbox{$[0, 1]$} when we used them to obtain our grammatical feature \texttt{multiply\_b}, while we did not normalize IRT parameters, including the $b$ parameters, when we used them for calculating $P_{ij}(\hat{\theta}_i)$ to obtain our other IRT-weighted features, \emph{i.e.}, \texttt{prob}, \texttt{multiply\_prob}, and \texttt{add\_prob}.
However, when the IRT ability parameter $\theta$ was used as a label for the auxiliary task, \emph{i.e.}, Section \ref{ssec:results-irt-parameter-aux-task}, $\theta$ was normalized in the range of \mbox{$[-1, 1]$} in accordance with grammar scores.
When IRT-weighted grammatical features were used as the labels for auxiliary tasks, \emph{i.e.}, Section \ref{ssec:results-reconstruct}, the features were normalized in the range of \mbox{$[0, 1]$} to match \texttt{type256}.
We trained models on the training data for 10 epochs using the Adam optimizer with a learning rate of 1e-5.

All the models were trained with the batch size $\{4, 8, 16, 32\}$.
In Section \ref{sec:results}, we present the test set scores for the batch size that yielded the highest QWK on the development set for each essay prompt.
The scores are the average of three experiments conducted with different seed values.



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%S4.2.3
\subsubsection{Optimal hyperparameters for each model architecture}
\label{sssec:hyperparameters-for-models}

To determine the optimal hyperparameters for each model architecture, we trained models while varying the number of layers in $\rm{FFNN^{top}}$ and the loss weights for the main task.
We trained the models on the Prompt 1 data using \texttt{type256} as the grammar features.
Table \ref{tab:compare-num-hidden} presents the QWK results on the development set of Prompt 1.



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%T5
\begin{table}[t]
\input{02table05.tex}
\hangcaption{QWK scores on the development set for Prompt 1 for different number of layers in $\rm{FFNN^{top}}$. The values in the parentheses following the model names represent the weights of the loss function for the main task. Proposed models were trained using \texttt{type256}.}
\label{tab:compare-num-hidden}
\end{table}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



%%%%%
\paragraph{Models that take grammatical features as inputs}
When the number of layers was set to 1, the QWK scores for \texttt{cat} and \texttt{net} were lower than that for the baseline (\texttt{cat}~=~.792, \texttt{net}~=~.812, and \texttt{baseline}~=~.813).
In \texttt{cat}, the QWK score was the highest when the number of layers was set to 2, while the scores decreased as the number of layers increased.
In \texttt{net}, the QWK score was also the highest when the model had two layers.
In both \texttt{multi-hum} and \texttt{dual-hum}, the highest QWK scores were achieved 
when the models had three layers, and $\beta$ was set to 0.8.


%%%%%
\paragraph{Models that reconstruct grammatical features}
The results were similar to those of the models that used grammatical features as inputs.
The QWK score became the highest when the number of layers was set to three and $\gamma$ to 0.8.

In our experiments, the models were trained with these hyperparameters.



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%S5
\section{Experimental Results}
\label{sec:results}

To examine the effectiveness of our methods for incorporating grammatical features into BERT-based AES models, we conduct experiments with the following steps.
First, we develop models that use grammatical features as additional model inputs in Section \ref{ssec:results-model-using-features-as-input}.
Using \texttt{type256} as input features, we compare four architectures: \texttt{cat}, \texttt{net}, \texttt{multi}, and \texttt{dual} in Section \ref{sssec:compare-model}.
Next, we compare our different grammatical features, including IRT-weighted features, using the model architecture that achieved the highest performance in the previous step in Section \ref{ssec:results-comparison-grammatical-features}.
To examine the contributions of grammatical features, we also train models that jointly predict the holistic scores and grammar scores of essays without using grammatical features as additional model inputs in Section \ref{ssec:results-analysis}, which is denoted as follows:
%%%%%
\begin{equation}
    \hat{s}_{i}^{hol}, \hat{s}_i^{gra}=f(\bm{h}_i^{[\mathit{CLS}]}).
\end{equation}
%%%%%
Then, we train \texttt{multi-irt} and \texttt{dual-irt} models and compare the results with those of models trained with human-annotated labels in Section \ref{ssec:results-irt-parameter-aux-task}.
Finally, we train \texttt{reconstruct} models using the grammatical features identified as effective in the experiments comparing different grammatical features in Section \ref{ssec:results-reconstruct}.
We compare the results with those of the models that use grammatical features as additional model inputs.



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%S5.1
\subsection{Using Grammatical Features as Model Inputs}
\label{ssec:results-model-using-features-as-input}

In this section, we show that incorporating grammatical features as additional model inputs improved AES performance.



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%S5.1.1
\subsubsection{Model architectures}
\label{sssec:compare-model}

We compared the four model architectures, \emph{i.e.}, \texttt{cat}, \texttt{net}, \texttt{multi-hum}, and \texttt{dual-hum}, by training models using \texttt{type256}.
The QWK results on the test set are listed in Table \ref{tab:compare-models}.
\texttt{type256} improved the average QWK score for all prompts in all proposed models, compared to the baseline (see Avg. in Table \ref{tab:compare-models}).



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%T6
\begin{table}[b]
\input{02table06.tex}
\hangcaption{Comparison among model architectures (QWK on the test set for each prompt). Proposed models were trained using \texttt{type256}.}
\label{tab:compare-models}
\end{table}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



In \texttt{cat}, however, no improvement was observed in three prompts, Prompt 4, 6, and 8, suggesting that simply concatenating essay representations with grammatical features was not sufficiently effective to fully utilize the information provided by grammatical features.
In \texttt{net}, only Prompt~6 showed no improvement from the baseline.
The results support the effectiveness of feeding grammatical features into an FFNN before concatenating them with essay representations.

The model architectures that employed MTL (\texttt{multi-hum} and \texttt{dual-hum}) achieved higher QWK scores than the others.
Even when examining each prompt individually, the QWK scores improved in all prompts.
These results indicate that MTL with grammar scores is an effective approach to take advantage of grammatical features.

The best performance was achieved by \texttt{dual-hum} among the four proposed architectures.
In \texttt{dual-hum}, grammar scores were predicted from the final layer of the FFNN for grammatical features (see Figure \ref{fig:model}), which might have enabled the models to learn better representations for grammatical features.

We conducted the subsequent experiments using the \texttt{dual-hum} setting since this architecture achieved the best performance.



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%S5.1.2
\subsubsection{Grammatical features}
\label{ssec:results-comparison-grammatical-features}

This section compares the differences in the effects of different grammatical features.
We trained models using different grammatical features under the \texttt{dual-hum} setting, which performed the best in Section \ref{sssec:compare-model}, and compared their effectiveness.
The QWK results on the test sets are listed in Table \ref{tab:dual-results} (see Appendix \ref{sec:appendix-aux-task} for the QWK results for the auxiliary task).



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%T7
\begin{table*}[b]
{\vspace{-4pt}}
\input{02table07.tex}
\hangcaption{Comparison of grammatical features (dual-hum, QWK test). The numbers in parentheses indicate the improvement from the baseline. The numbers in parentheses for \protect\citeA{yang-etal-2020-enhancing} and \protect\citeA{cao-2020-domain} are the improvement from their baseline, which is equivalent to ours (\texttt{RegressionOnly} and \texttt{BERT (individual)}, respectively; n/a for \protect\citeA{wang-etal-2022-use}).}
\label{tab:dual-results}
\end{table*}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



%%%%%
\paragraph{PFs and NFs}
Section \ref{sssec:compare-model} demonstrated that incorporating positive linguistic features (PFs; \texttt{type256}) improved the AES performance.
The results of the models trained using \texttt{err54} indicate that incorporating negative linguistic features (NFs) also improved the AES performance (see Avg. of \texttt{err54} in Table \ref{tab:dual-results}).
Even when we compared the score differences from the baseline for each prompt, the QWK scores improved in all prompts.

Combining PFs and NFs also improved the AES performance (see \texttt{type256 \!\!+ \!\!err54} in Table~\ref{tab:dual-results}).
However, the average QWK score (.775) was almost the same as those for \texttt{type256} and \texttt{err54}, and the use of both PFs and NFs did not produce a synergistic effect.
This is probably because we simply concatenated the vectors of the two features before passing them into $\rm{FFNN^{gra}}$.
More effective methods of combining them should be investigated in future studies.


%%%%%
\paragraph{PFs weighted using IRT parameters}
We further investigated the effectiveness of considering the characteristics of each grammatical item by weighting them using IRT parameters (see Section \ref{sssec:weighted-pf}).
The QWK results of the models trained using IRT-weighted features are also listed in Table \ref{tab:dual-results}.
Considering the difficulties of individual grammatical items (\texttt{multiply\_b}) resulted in the highest QWK score among all settings.

However, adjusting \texttt{type256} with the probability that a writer with a certain grammar ability uses the grammatical item correctly did not contribute to improving the AES performance.
Although the average QWK scores (.772, .772, and .771 for \texttt{prob}, \texttt{multiply\_prob}, and \texttt{add\_prob}, respectively) were higher than that for the baseline (.760), they were lower than that for \texttt{type256} (.775).
These results suggest that it is more crucial to focus on grammatical items that the writer actually used in the essay rather than those that the writer seemed able to use.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%S5.1.3
\subsubsection{Analysis}
\label{ssec:results-analysis}

%%%%%
\paragraph{Effect of grammatical features}
To ensure that the score improvement was attributed to incorporating grammatical features rather than employing MTL, we trained models that jointly predicted the holistic scores and grammar scores of essays without using grammatical features.
We set the number of layers in $\rm{FFNN^{top}}$ to 1 (\texttt{multi-ffnn1}; same as the baseline) and 3 (\texttt{multi-ffnn3}; the optimal parameter for \texttt{multi-hum}; see Section \ref{sssec:hyperparameters-for-models}).

Although the \texttt{multi-ffnn1} and \texttt{multi-ffnn3} surpassed the baseline in the average QWK scores (\texttt{multi-ffnn1}~=~.762, \texttt{multi-ffnn3}~=~.772, and \texttt{baseline}~=~.760, respectively), their scores were not as high as those of models with grammatical features (\emph{e.g.}, \texttt{type256}~=~.775; see Table \ref{tab:dual-results}).
These results indicate that both MTL and grammatical features contributed to the improvement in AES performance.
In addition, the significant improvement in \texttt{multi-ffnn3} suggests that introducing additional layers on top of BERT would be effective in MTL. 


%%%%%
\paragraph{Scoring examples}
Examples of scoring from Fold 4 of Prompt 1 are shown in Table \ref{tab:scoring-example}.
The four essays were written with approximately the same number of words, and their true scores were 10.



%%%%%%%%%%%%%%%%%%%%%%%%%%%%T8
\begin{table}[t]
\input{02table08.tex}
\hangcaption{Scoring examples. The true scores of the four examples are 10. The \# words and \# type represent the number of words and different grammar items used in the essays, respectively.}
\label{tab:scoring-example}
\end{table}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\texttt{ID~87} was written with a relatively wide variety of grammatical items (50 items) compared to the average for essays with true score of 10 in the Fold 4 test set (48.10 items).
The model trained using \texttt{type256} successfully recognized the characteristic and made the correct prediction.

However, the \texttt{type256} model assigned lower scores than the baseline to \texttt{ID~1419} and \texttt{1283}, although they had a limited variety of grammatical items.
Note that the model prediction for \texttt{ID~1419} improved, while that for \texttt{ID~1283} worsened.

In \texttt{ID~1194}, the prediction of the \texttt{type256} model was worse than that of the baseline model.
Although a relatively limited variety of grammatical items were used in the essay, the \texttt{type256} model assigned a higher score than the baseline.\footnote{See Appendix \ref{sec:appendix-confusion-matrix} for the confusion matrix on all the data points.}


%%%%%
\paragraph{Grammatical items contributing to the score predictions}
The analysis in the previous section was based on the number of different grammatical items used in the essays.
However, it could not fully explain the model behavior in some cases (\emph{e.g.}, the scoring example of \texttt{ID~1194}).
One possible reason is that we did not distinguish which grammatical items were used; each item was counted as one regardless of its characteristics, such as the difficulty.
In this section, we focused on individual grammatical items and analyzed which items were actually important for score predictions.
Specifically, we computed Integrated Gradients \cite{Sundararajan-2017-integrated-gradients} for the model inputs \emph{i.e.}, essay representations and grammatical items, using Captum.\footnote{\url{https://captum.ai/}}

Table \ref{tab:integrated-gradients} shows the attribution scores by Integrated Gradients for essay representations and grammatical items in the \texttt{type256} and \texttt{multiply\_b} models.
We took the absolute values of the Integrated Gradients and summed them for each input type.
The results indicate that essay representations were the dominant feature in score predictions.



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%T9
\begin{table}[t]
\input{02table09.tex}
\hangcaption{Integrated Gradients for essay representations (Essay rep.) and grammatical items (Gra. items). The values are the average from three experiments. The values in the parentheses represent percentages. Prompt 2 has scores in two different domains, for which we trained models independently.}
\label{tab:integrated-gradients}
\end{table}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%T10
\begin{table}[t]
\input{02table010.tex}
\hangcaption{Grammatical items contributing to the score predictions}
\label{tab:important-grammar-items}
\end{table}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%




Although the Integrated Gradients for grammatical features were significantly smaller than those for essay representations, our experimental results demonstrated that incorporating grammatical features improved the model performance (see Table \ref{tab:dual-results}).
To identify grammatical items contributing to score predictions, we extracted the top 20 grammatical items with the highest contribution in each experiment.

We found that some grammatical items were commonly important across different essay prompts.
Table \ref{tab:important-grammar-items} lists such grammatical items that were important in five or more prompts.
In \texttt{type256}, basic grammatical items, whose CEFR-J levels were A1.1-A1.3, had a large impact on the predictions, and some of them were items that increased sentence complexity \cite<\emph{e.g.}, relative pronouns and subordinate clause; see>{Wolfe-Quintero_1998}.
The list also includes items necessary for linking phrases or sentences (\emph{e.g.}, coordinating conjunctions) and those related to tense and aspect (\emph{e.g.}, past tense).
The abilities to write a connected text and describe an event or experience correspond to the A2-B1 levels in the CEFR \cite<see the scales for written production:>{Council_of_Europe2001_cefr}.
In addition, articles and present tense third-person singular are grammatical items that do not contribute significantly to the communication of meaning.
It would be reasonable to consider that correctly using the grammatical items listed in Table \ref{tab:important-grammar-items} reflects the development of writing skills.


In \texttt{multiply\_b}, advanced items (generally, the CEFR-J A2.2 level or higher) were identified as contributing to score predictions.
The list includes many items related to complex tense and aspect (\emph{e.g.}, to-infinitive: to have \emph{done}) and word-order manipulations (\emph{e.g.}, passive and accusative relative pronouns).
We can assume that learners who used these items had high grammar competence.
These results also suggest that weighting grammatical items based on difficulty parameters estimated using IRT worked appropriately.


%%%%%
\paragraph{Comparison with existing models}
Finally, we compared the performance of our models with those of state-of-the-art AES models, whose QWK scores are also presented in Table \ref{tab:dual-results}.
The average QWK scores of our models (.779 at the highest) were not as high as those of the existing models.
In some prompts, our baseline QWK scores did not match those reported in the previous studies, and we compared the results based on the improvement from each baseline.\footnote{We re-implemented $\text{R}^2$ BERT \cite{yang-etal-2020-enhancing}, but the performance of our re-implemented model did not match that reported in their paper \cite<similar issues were reported in>{wang-etal-2022-use}. We also trained models using grammatical features with the loss combination proposed by them (\emph{i.e.}, regression and ranking loss), but their QWK scores were lower than those of our baseline.}

In Prompts 1, 3, 7, and 8, our proposed models demonstrated a greater improvement in the QWK scores compared to \citeA{yang-etal-2020-enhancing} and \citeA{cao-2020-domain}.
In these four prompts, our models achieved competitive QWK scores with the existing models.
\citeA{cao-2020-domain} achieved state-of-the-art performance in Prompts 3, 4, and 7, but the improvements over their baselines were relatively small in the other prompts.

However, incorporating grammatical features was less effective in Prompts 2, 4, 5, and 6.
As a result, the average QWK scores of our models were lower than those of the existing models.
To identify when our proposed methods were effective, we analyzed the characteristics of the essays, including the type of essays, the average number of words in essays, the correlation coefficient between holistic scores and the grammar ability parameter $\theta$, the correlation coefficient between human-annotated grammar scores and $\theta$, and the variance of $\theta$.
However, none of them were able to offer a satisfactory explanation.
Further investigation of this point would be important because it could help improve the performance on prompts where our methods were less successful.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%S5.2
\subsection{Using the IRT Ability Parameter for the Auxiliary Task}
\label{ssec:results-irt-parameter-aux-task}

We showed that the \texttt{dual-hum} model outperformed the other three architectures that use grammatical features as additional inputs in Section \ref{sssec:compare-model}, but the \texttt{dual-hum} model requires human-annotated grammar scores.
Therefore, we estimated grammar abilities using IRT and employed them as teacher signals for the auxiliary task in the \texttt{dual} architecture.
It is worth noting again that no human-annotated labels are required to estimate IRT parameters.

Table \ref{tab:irt-multi-dual} shows that the \texttt{multi-irt} and \texttt{dual-irt} models achieved comparable QWK scores to those of the models that used human-annotated scores.
This motivated us to investigate the relationship between IRT-based grammar abilities and human-annotated grammar scores.
Table \ref{tab:correlation-irt-grammar-ability-human-grammar-score} lists Pearson's correlation coefficients between them for the training sets.
The moderate correlations suggest that there were some differences in the grammatical abilities expressed by the two values.
While IRT-based grammar abilities were estimated using information on grammatical items that writers used correctly in their essays, human-annotated grammar scores also considered other aspects of grammar abilities such as errors (see rubrics in essay set descriptions provided in the ASAP dataset).



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%T11
\begin{table}[b]
\input{02table011.tex}
\caption{QWK results of the models using the IRT ability parameter for the auxiliary task}
\label{tab:irt-multi-dual}
\end{table}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%T12
\begin{table}[t]
\input{02table012.tex}
\hangcaption{Pearson's correlation coefficient between IRT-based grammar abilities and human-annotated grammar scores}
\label{tab:correlation-irt-grammar-ability-human-grammar-score}
\end{table}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



Even if IRT-based grammar abilities do not perfectly match human-annotated grammar scores, there are advantages to using the IRT.
Analytical scoring is generally more time-consuming and expensive than holistic scoring. 
In fact, grammar scores, which are one of the analytical scores, are not always available in a dataset.
A method that improves AES performance without relying on additional human-annotated labels has practical value.
Another advantage of employing IRT for AES models is that we can present the characteristics of grammatical items (\emph{i.e.}, discrimination and difficulty) as well as essay scores.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%S5.3
\subsection{Reconstructing Grammar Usage}
\label{ssec:results-reconstruct}

Although we demonstrated that using grammatical features as model inputs improved AES performance (see Section \ref{ssec:results-model-using-features-as-input}), such models require explicit extraction of grammatical features even at the test time.
From a practical viewpoint, it would be convenient if we could run a trained model on the test data without part-of-speech tagging and subsequent feature extraction.
Therefore, we developed models that jointly predicted holistic scores and grammar usage patterns of the essays.

Table \ref{tab:results-reconstruct} shows that the \texttt{reconstruct} models achieved comparable QWK scores to those of  \texttt{dual} models.
The results suggest that the \texttt{reconstruct} approach can eliminate the need to extract grammatical features at test time, which offers practical advantages.
However, \texttt{dual} models would be more suitable for providing detailed feedback to learners because the available information on grammar usage patterns in \texttt{reconstruct} models is based on model predictions.
It has also become increasingly challenging to identify grammatical items that contribute to score predictions.
We need to select the appropriate approach depending on the purpose of the writing tasks.



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%T13
\begin{table}[b]
\input{02table013.tex}
\caption{QWK results for the models reconstructing grammatical features.}
\label{tab:results-reconstruct}
\end{table}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%S6
\section{Conclusions}

This study examined the effectiveness of incorporating grammatical features into BERT-based AES models.
Our proposed methods include (1)~using grammatical features as additional inputs to a model, (2)~training a model to jointly predict the holistic scores and grammar scores while using grammatical features as additional inputs,
and (3)~reconstructing grammatical features through MTL with holistic scores.
We showed that these approaches improved AES performance and have their own advantages and disadvantages.
The experimental results suggest that our MTL frameworks were effective in taking advantage of the information contained in grammatical features.
Future research may involve incorporating our grammatical features into AES using an LLM.
This potentially improves the scoring performance in zero- and/or few-shot settings \cite{mizumoto-2023}.

We also weighted PFs in several ways using IRT parameters.
The experimental results demonstrated that considering the difficulties of grammatical items improved the model performance.
In addition, the ability parameter $\theta$ was employed as teacher signals for the auxiliary task in MTL.
Although no human-annotated labels were required for the estimation of IRT parameters, the model trained using the ability parameter achieved a comparable performance to the model trained with human-annotated grammar scores.
While we applied IRT only to PFs in this study, we can also apply it to both PFs and NFs to model writers' grammar abilities in the future.
In addition, we ignored grammatical item pairs that potentially violated the assumption of local independence.
Future studies may involve treating these with the testlet IRT model \cite{Wainer_Bradlow_Wang_2007} or polytomous IRT model \cite{Thissen-1989-testlet-irt}.
Another possible way to apply IRT to grammatical features is to use the ability parameter $\theta$ as an additional model input instead of the \texttt{type256} vector.
However, we used the IRT to reflect the characteristics of individual grammatical items to address the problem of traditional grammatical complexity measures.
Using $\theta$ as an additional model input seems to be a method going in the opposite direction of this study; however it can improve AES model performance because $\theta$ can serve as a compact representation of the \texttt{type256}.

Despite several advantages, our approach also has some limitations.
Our proposed methods were less effective on some essay prompts in the ASAP dataset, and further investigations are required to identify what types of essays our proposed methods would be effective for.

There are also some limitations associated with the extraction of grammatical features.
First, the toolkit provided by the CEFR-J Grammar Profile extracts grammatical items based on sophisticated regular expression patterns written by a linguist.
It would be quite challenging to develop one for other languages.
An alternative method is to extract grammatical features based on cross-linguistically consistent annotations such as Universal Dependencies.
This facilitates cross-lingual applications, but extracting grammatical items related to parts of speech and/or morphological features rather than dependencies (\emph{e.g.}, present perfect in English) would be challenging.
The second problem is related to errors in the feature extraction.
Errors are inevitable in the automatic extraction of grammatical items and correction of grammatical errors.
Experiments using human-annotated grammatical features would help evaluate the influence of errors in feature extraction.



% Start Acknowledgment
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\acknowledgment

A part of this work was supported by JSPS KAKENHI Grant Number JP21H05054 and by JST SPRING Grant Number JPMJSP2140.



% Start bibliography
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bibliographystyle{jnlpbbl_1.7}
\bibliography{02refs}



\appendix
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%SA
\section{QWK Results for the Auxiliary Task}
\label{sec:appendix-aux-task}

The QWK scores for the auxiliary task (\emph{i.e.}, predicting grammar score) are listed in Table \ref{tab:qwk-aux}.
The scores were generally low, with some falling into the negative value.
We observed that the models tended to predict scores close to the mode value for each prompt.
One possible reason for this is the relatively low weight assigned to the loss function for the auxiliary task (\emph{i.e.}, 0.2); however the QWK scores for the main task worsened when we assigned a higher weight for the auxiliary task (\emph{i.e.}, 0.4).
Further consideration is required to predict multiple essay traits simultaneously \cite<e.g.,>{Ridley_He_Dai_Huang_Chen_2021,shibata-uto-2022-analytic}.



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%T14
\begin{table*}[ht]
\input{02table014.tex}
\caption{QWK results for the auxiliary task on the test set (models shown in Table \ref{tab:dual-results})}
\label{tab:qwk-aux}
\end{table*}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%SB
\section{Detailed Results of Model Predictions}
\label{sec:appendix-confusion-matrix}

Figure \ref{fig:confusion-matrix} shows the detailed scoring performance of the model trained using \texttt{type256}.
The values in the confusion matrices are the sum of all experiments (\emph{i.e.}, five-fold cross-validation and three experiments with different seed values).

\clearpage

%%%%%%%%%%%%%%%%%%%%%F4
\setcounter{figure}{3}
\begin{figure*}[ht]
\begin{center}
\includegraphics{32-2ia2f04-1.eps}
\end{center}
\caption {Scoring performance of the model trained using \texttt{type256}}
\label{fig:confusion-matrix}
\end{figure*}

\clearpage

\setcounter{figure}{3}
\begin{figure*}[ht]
\begin{center}
\includegraphics{32-2ia2f04-2.eps}
\end{center}
\caption {Scoring performance of the model trained using \texttt{type256} (\emph{cont.})}
\end{figure*}

\clearpage

\setcounter{figure}{3}
\begin{figure*}[t]
\begin{center}
\includegraphics{32-2ia2f04-3.eps}
\end{center}
\caption {Scoring performance of the model trained using \texttt{type256} (\emph{cont.})}
\end{figure*}
%%%%%%%%%%%%%%%%%%%%%%



% Start biography
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{biography}

\bioauthor[:]{Kosuke Doi}{%
He is a Ph.D. student at the Nara Institute of Science and Technology.
He received his Bachelor of Arts degree from Tokyo University of Foreign Studies in 2010.
He received his Master's degree in linguistics from Tokyo University of Foreign Studies in 2012 and that in engineering from the Nara Institute of Science and Technology in 2022.
He previously worked with Eikoh Inc. from 2012 to 2016 and with Z-kai Inc. from 2016 to 2020.
}

\bioauthor[:]{Katsuhito Sudoh}{%
He is a professor at Nara Women's University.
He received his bachelor's degree in engineering in 2000, and his master's and Ph.D. degrees in informatics in 2002 and 2015, respectively, from Kyoto University.
He worked with the NTT Communication Science Laboratories from 2002 to 2017 and the Nara Institute of Science and Technology from 2017 to 2024.
He works on machine translation and natural language processing.
He is a member of ACL, ISCA, ANLP, IPSJ, ASJ, and JSAI.
}

\bioauthor[:]{Satoshi Nakamura}{%
He is a Professor Emeritus at the Nara Institute of Science and Technology NAIST, a full professor at the Chinese University of Hong Kong, Shenzhen CUHKSZ, and an honorary professor at the Karlsruhe Institute of Technology, Germany.
He received his B.S. degree from the Kyoto Institute of Technology in 1981 and a Ph.D. from the Kyoto University in 1992.
He was the Director of the ATR SLC laboratory from 2000 to 2008 and the Director General of Keihanna Research Laboratories, NICT.
He was a professor and Director of the AHC Laboratory at NAIST from 2011 to 2023.
He is currently a full professor at CUHKSZ.
He was an elected board member of the ISCA in the period of June 2011--2019, an IEEE Signal Processing Magazine Editorial Board member in the period 2012--2015, and an IEEE SPS Speech and Language Technical Committee Member in the period 2013--2015.
He is an ATR Fellow, IPSJ Fellow, IEEE Fellow, and ISCA Fellow.
}

\bioauthor[:]{Taro Watanabe}{%
He received his B.E. and M.E. degrees in information science from Kyoto University in 1994 and 1997, respectively, and obtained an M.S. degree in Language and Information Technologies from the School of Computer Science, Carnegie Mellon University in 2000.
In 2004, he received a Ph.D. in informatics from Kyoto University.
After working as a researcher at ATR, NTT and NICT, and as a software engineer at Google, he is a professor at the Nara Institute of Science and Technology starting in 2020.
His research interests include natural language processing, machine learning, language modeling and machine translation.
}

\end{biography}

\biodate   %%%% Following settings will be edited by editors.


\end{document}



