# Modeling pedestrian fundamental diagram based on
Directional Statistics111Preprint submitted to an international journal

Keiichiro Fujiya, Kota Nagasaki, Toru Seo222Department of Civil and
Environmental Engineering, School of Environment and Society, Tokyo Institute
of Technology; The corresponding author. Email<EMAIL_ADDRESS>
###### Abstract

Understanding pedestrian dynamics is crucial for appropriately designing
pedestrian spaces. The pedestrian fundamental diagram (FD), which describes
the relationship between pedestrian flow and density within a given space,
characterizes these dynamics. Pedestrian FDs are significantly influenced by
the flow type, such as uni-directional, bi-directional, and crossing flows.
However, to the authors’ knowledge, generalized pedestrian FDs that are
applicable to various flow types have not been proposed. This may be due to
the difficulty of using statistical methods to characterize the flow types.
The flow types significantly depend on the angles of pedestrian movement;
however, these angles cannot be processed by standard statistics due to their
periodicity. In this study, we propose a comprehensive model for pedestrian
FDs that can describe the pedestrian dynamics for various flow types by
applying Directional Statistics. First, we develop a novel statistic
describing the pedestrian flow type solely from pedestrian trajectory data
using Directional Statistics. Then, we formulate a comprehensive pedestrian FD
model that can be applied to various flow types by incorporating the proposed
statistics into a traditional pedestrian FD model. The proposed model was
validated using actual pedestrian trajectory data. The results confirmed that
the model effectively represents the essential nature of pedestrian dynamics,
such as the capacity reduction due to conflict of crossing flows and the
capacity improvement due to the lane formation in bi-directional flows.

##  1 Introduction

Understanding pedestrian dynamics is essential for appropriately designing
pedestrian spaces, such as corridors and public squares. Flow, density, and
speed are the most basic state variables of pedestrian flow. A fundamental
diagram (FD), which is the relationships between these variables,
characterizes pedestrian flow and determines the important features such as
the flow capacity. In addition, FDs are useful for evaluating pedestrian flow
models and developing dynamic simulation models [1]. For these reasons, FDs
are important and form the basis for the design of pedestrian spaces.

The specific natures of pedestrian flow should be taken into account in the
modeling of the pedestrian FD, since FD was initially developed for vehicular
flow. May [2] showed similarities and differences between pedestrian and
vehicular flows. One of the most essential differences is that pedestrian flow
is not unidirectional. Thus, pedestrians often conflict with others’ movement,
and their collective behavior becomes very complicated.

The multi-directionality of pedestrian flow gives rise to complicated
phenomena. Let us consider a unidirectional pedestrian flow as a reference.
For example, if two pedestrian flows intersect at a 90-degree angles, capacity
and speed will decrease due to potential collisions. However, if two
pedestrian flows pass each other at a 180-degrees angles, capacity and speed
will remain the same or even increase due to the self-organization phenomena
called lane formation [3]. If pedestrian flows with various angles intersects,
it is not easy to predict the resulting flow. Vanume et al. [1] reviewed that
this kind of flow type of pedestrian affects pedestrian FDs in a complicated
manner.

Flow types might be quantitatively distinguished by the angle of the
pedestrians movement direction. The histograms in figure 1 show the
distributions of the pedestrians movement direction obtained from the actual
data. Uni/bi-directional flow means the flow passing through a corridor
uni/bi-directionally. Crossing-A flow is defined as the flow through a
crossing bi-directionally, and crossing-B flow is defined as the flow through
a crossing uni-directionally. It is clear that the distribution shape of the
angle is different for each flow type. Therefore, at least in qualitatively,
flow types can be classified by the shape of the distribution of the angle of
the pedestrians movement direction.

Figure 1: Four examples of flow types and their histograms. The data is a
10-second sample for each flow type from the data used in the case study.

However, angle is difficult to analyze quantitatively or statistically due to
its periodicity. For example, the meaningful average of 1-degree and
359-degree angles should be 0-degree, not 180 that is the arithmetic mean of 1
and 359. This poses us significant difficulty for computing statistics of
pedestrian moving direction such as the mean and variance of moving angles,
which could be a useful statistics to characterize the flow type.

To tackle this challenge, this study employs Directional Statistics [4]
specifically designed for analyzing angles. It has been applied to several
research fields such as wind direction [5] and animal movement direction [6].
Recently, it is also applied to analyze transportation maps [7][8][9].
However, to the authors’ knowledge, its application in dynamical
transportation phenomena such as pedestrian flow is unseen.

This study aims to develop a pedestrian FD model that can be applied to
various flow types regardless of its configuration. The proposed model can
capture the complicated pedestrian phenomena associated with flow types in a
simple and straightforward manner by leveraging the Directional Statistics. To
achieve this, we propose a novel statistic termed $p$th angular variance to
effectively characterize pedestrian flow. The features of the proposed model
is validated by applying it to actual pedestrian trajectory data.

##  2 Literature review

Pedestrian FDs have been studied widely in the literature. The simplest
studies on pedestrian FDs are those on uni-directional flows. Based on data
obtained from experiments or observations, many FD models of uni-directional
flow have been proposed.

One of the earliest model is that proposed by Fruin [10]. He formulated the
flow $J$ as a function of density $\rho$ in the form of an equation as

$\displaystyle J=\frac{A\rho-B}{\rho^{2}},$ (1)

where $A$ and $B$ are parameters. Virkler and Elayadath [11] applied several
FD models that had been applied to vehicular flows to pedestrian flows.
Seyfried et al. [12] showed from observation that a linear relationship
between speed and the inverse of density can be established for single-row
pedestrian flows. Furthermore, they showed that the same relationship can be
applied to general uni-directional flows by comparison with literature values.
Existing studies about uni-directional flows mostly modeled flow (or speed) as
a function of density only.

Bi-directional flow is compared with uni-directional flow by pedestrian flow
data in some studies. Zhang and Seyfried [13] showed that the flow rate of bi-
directional flow is significantly lower than that of uni-directional flow at
high densities. Lam et al. [14] showed that the capacity of a pedestrian space
decreases in bi-directional flows. These studies showed that bi-directional
flow is less efficient than uni-directional flow.

On the other hand, an efficient condition of bi-directional flow, named lane
formation, has also been studied [3][15]. Jia et al. [16] proposed a parameter
that represents the degree of deviation from the lane generated by lane
formation and examined its correlation with the pedestrian’s egress time from
the exit. The results showed that there was a positive correlation between the
degree of deviation and the egress time, which suggests that the occurrence of
lane formation makes the pedestrian flow more efficient. Lee et al. [17]
showed the capacity is improved by occurrence of lane formation in the
simulation.

Multi-directional flows other than bi-directional flows have also been
observed by researchers. Zhang et al. [18] compared uni-directional and
T-junction flows and found that their FDs were different. Cao et al. [19] and
Zhang et al. [13] compared uni-directional, bi-directional, and crossing
flows. Both studies found that the capacities of bi-directional and crossing
flows were smaller than those of uni-directional flows. Iryo and Nagashima
[20] showed that flows crossing angles of 45∘ and 135∘ tended to have lower
flow than flows at 90∘, even at the same density.

Multi-directional flows are often described using physical models. A well-
known example is the social force model developed by Helbing and Molnar [21].
In this model, the pedestrian is regarded as a point mass. The motivation of
the pedestrian moving to the desired direction, the influence between
pedestrians, and the influence of walls are regarded as forces acting on the
point mass. The forced pedestrians’ moves are based on the equations of
motion. The social force model has been extended in various ways [22][23] and
has been successful in terms of reproducing the pedestrian flows. Nakanishi
and Fuse [24] analyzed pedestrian movements by focusing on their moving
direction. They regarded pedestrian trajectories as data consisting of the
pedestrian’s position and angle of moving direction at each time. A
correlation between pedestrian position and direction of travel was discovered
by basic analysis of pedestrian trajectories in front of ticket gates, and a
regression model was constructed. However, these studies were not performed on
modeling pedestrian FD.

There are few studies modeling the FDs of pedestrian flows other than uni-
directional flows. Flötteröd and Lämmel [25] formulated a parametric FD for
bi-directional flow based on cellular automata. Feliciani et al. [26] modeled
an FD for bi-directional flow by applying the flow ratio, which is defined as
the ratio of flow in one direction and flow in the other direction. However,
these models cannot be applied to flow types other than bi-directional or uni-
directional flow. Moustaid and Flötteröd [27] proposed an FD model for multi-
directional flow by extending a macroscopic node model [28] for vehicular
traffic flow. However, it requires pre-processing of pedestrian data to
decompose the flow into specific number of directions. It limits the
generality of the model (i.e., an estimated model is specialized for a
specific location with specific node-link configuration). A model of
pedestrian FDs comprehensively applicable to multiple flow types has not been
developed.

##  3 Model

We formulate a comprehensive pedestrian FD model that can represent the
effects of pedestrian avoidance of conflicts and lane formation. The proposed
model is formulated by extending a simple functional form of FD using the
angular variance.

Note that in the following discussion, the unit of angle is radian.

###  3.1 Angular variance

Angular variance [4] is a statistic that describes the degree of dispersion
for angular data. The angular variance $\nu_{1}$ for $N$ angular data
$\theta_{j}(j=1,2,\ldots,N)$ is defined by

$\displaystyle\nu_{1}=1-\bar{R}_{1},$ (2)

where,

$\displaystyle\bar{R}_{1}=\sqrt{\bar{C}_{1}^{2}+\bar{S}_{1}^{2}},$ (3)
$\displaystyle\bar{C}_{1}=\frac{1}{N}\sum_{j=1}^{N}\cos\theta_{j},\quad\bar{S}_{1}=\frac{1}{N}\sum_{j=1}^{N}\sin\theta_{j}.$
(4)

For the $j$th angular data $\theta_{j}$,
$(\cos\theta_{j},\sin\theta_{j})^{\top}$ represents the unit vector for that
angle, where ⊤ means the transpose of vector. Therefore,
$(\bar{C}_{1},\bar{S}_{1})^{\top}$ is the composite of $N$ unit vectors
divided by its data size $N$. $\bar{R}_{1}$ is the norm of
$(\bar{C}_{1},\bar{S}_{1})^{\top}$, which takes a value between $0$ and $1$,
and it varies depending on the degree of dispersion of the data.

The definition of the angular variance ${\nu}_{1}$ is $1-\bar{R}_{1}$. The
value of ${\nu}_{1}$ gets larger when the data is scattered, which is
consistent with the conventional statistics.

For example, as shown in the left of Figure 2(a), when the angular data are
concentrated in a close direction, $\nu_{1}$ takes a value close to 0. On the
other hand, when the angular data are dispersed in opposite directions, as the
example shown in the right of Figure 2(a), $\nu_{1}$ takes a value close to 1
because unit vectors cancel each other out.

Figure 2: The comparison of angular variance and second angular variance.

###  3.2 $p$th angular variance

The angular variance cannot distinguish data with two peaks and four peaks in
opposite directions as shown in the right two examples of Figure 2(a).

To distinguish these data quantitatively, we define a novel statistic, the
$p$th angular variance, $\nu_{p}$ as

$\displaystyle\nu_{p}=1-\bar{R}_{p},$ (5)

where,

$\displaystyle\bar{R}_{p}=\sqrt{\bar{C}_{p}^{2}+\bar{S}_{p}^{2}},$ (6)
$\displaystyle\bar{C}_{p}=\frac{1}{N}\sum_{j=1}^{N}\cos
p\theta_{j},\quad\bar{S}_{p}=\frac{1}{N}\sum_{j=1}^{N}\sin p\theta_{j}.$ (7)

$p$ is an exogenous variable that can take any natural number.

$\nu_{p}$ is derived by multiplying the angular data by $p$ and calculating
the angular variance. $\nu_{p}$ gets a smaller value for the distribution with
peaks every period $2\pi/p$. For example, as shown in Figure 2(b), the second
angular variance is $0$ for data with two peaks, while it is still 1 for the
data with four peaks.

Table 1 shows the value of $p$th angular variance $\nu_{p}$ $(p=1,2,3,4)$ for
each flow type. The flow type and its distribution of movement directions were
shown in Figure 1. The angular variance $\nu_{1}$ of uni-directional flow
takes a value close to 0. In contrast, ones of bi-directional flow and
crossing-A flow takes values close to 1. In addition, the one of crossing-B
flow has a relatively smaller value than bi-directional flow and crossing-A
flow because the interval between peaks is narrow. The second angular variance
$\nu_{2}$ of bi-directional flow and the fourth angular variance $\nu_{4}$ of
crossing-A flow take small values while the angular variances $\nu_{1}$ of
these flows are large. Therefore, the $p$th angular variance can be confirmed
to take a small value when the angular data had peaks every $2\pi/p$ period.

The four flow types can be distinguished by a combination of $\nu_{1}$ and
$\nu_{2}$ without using a higher degree of angular variances. The uni-
directional flow has small angular variance $\nu_{1}$ and a small second
angular variance $\nu_{2}$, bi-directional flow has large $\nu_{1}$ and small
$\nu_{2}$, crossing-A flow has large $\nu_{1}$ and large $\nu_{2}$ and
crossing-B flow has relatively small $\nu_{1}$ and large $\nu_{2}$. Therefore,
the four flow types can be distinguished by the angular variance $\nu_{1}$ and
the second angular variance $\nu_{2}$.

Table 1: Angular variance of the distribution of pedestrian movement directions for each flow type shown in Figure 1. Flow type | $\nu_{1}$ | $\nu_{2}$ | $\nu_{3}$ | $\nu_{4}$
---|---|---|---|---
Uni-directional | 0.013 | 0.052 | 0.112 | 0.187
bi-directional | 0.958 | 0.166 | 0.975 | 0.514
Crossing-A | 0.958 | 0.947 | 0.931 | 0.459
Crossing-B | 0.303 | 0.944 | 0.407 | 0.245

###  3.3 Formulation of FD

Note that in the following discussion, $J$ is the flow, $u$ is the free flow
speed, $\rho$ is the density and $C$ is the capacity.

####  3.3.1 Base function

In free flow state where $u\rho<C$, the flow $J$ equals $u\rho$ and increases
linearly with the density $\rho$. In congested state where $u\rho>C$, the flow
$J$ equals the capacity $C$ which is constant to simplify the model. Under
these conditions, the simple pedestrian FD models can be described as

$\displaystyle J=\min(u\rho,C).$ (8)

This simplification is justified by the fact that the slopes of FDs in
congested state are smaller than that of free flow state in many models [11].
The extreme congestion state where flow decreases as density increases is
omitted because it cannot be seen in data.

Note that in this study, the flow $J$ is assumed to be constant in the
congested state independent of the density $\rho$. In other words, the FDs
like triangular FDs where the flow $J$ decreases as the density $\rho$
increases are not discussed. In the flow-density plots of pedestrians, the
decline of flow $J$ in the congested state is not observed for multi-
directional flow [11][18][19][25], and the same tendency is observed in the
data used in this study. Therefore, the flow rate $J$ in the congested state
is assumed to be constant in this study modeling FD of pedestrian flows,
including multi-directional flows.

####  3.3.2 Incorporating $p$th angular variance into FD function

In the following, angular variance is incorporated into the model to represent
the effects of the avoidance of conflicts on pedestrian flows. When pedestrian
flows cross, the flow decreases due to the avoidance. The avoidance is
expected to occur primarily at high density, i.e., in congested state.
Therefore, the avoidance of conflicts is assumed to affect capacity $C$.

First, the effect of avoidance of conflicts is modeled. If pedestrians flow
uni-directional, the effect seems to be small. In this case, the distribution
of the direction of pedestrians has a single peak. On the other hand, if
pedestrians flow multi-directional, the effect seems to be large. In this
case, the distribution of the direction of pedestrians does not have a single
peak clearly. As described in section 3.1, the degree of dispersion in the
direction of the pedestrian can be described by angular variance $\nu_{1}$.
Therefore, the magnitude of the capacity $C$ reduction due to avoidance of
conflicts is controlled by angular variance $\nu_{1}$ in the proposed model.

Next, the effect of lane formation is modeled. Lane formation occurs in bi-
directional flow. For bi-directional flow, the second angular variance
$\nu_{2}$ takes a small value because the distribution of the direction of
pedestrians has two peaks with a period of $\pi$. Since the capacity $C$ is
expected to decrease when lane formation does not occur, the capacity $C$
decreases as the second angular variance $\nu_{2}$.

####  3.3.3 Incorporating the effects of the walls into FD function

Additionally, the model incorporates the effect of surrounding walls within
the observation area. When walls are placed in the travel area, pedestrians
move to avoid conflicting walls. Therefore, movement in an area surrounded by
walls is expected to be less efficient. To quantify the effect of walls, we
defined a metric termed the wall ratio $r$ as,

$\displaystyle r=\frac{L-l}{L},$ (9)

where $L$ denotes the total perimeter of the measurement area and $l$ denotes
the length of the passable pedestrian section within it. For example, as shown
in Figure 3 when square measurement areas are assumed, $r$ equals 0.5 for a
corridor and $r$ equals 0 for a crossing. In the model, the capacity $C$ is
assumed to decrease with the wall ratio $r$ increasing.

Figure 3: Examples of wall ratio $r$.

####  3.3.4 Proposed FD model

Based on the discussion in section 3.3.2 and 3.3.3, the capacity $C$ is
assumed to decrease due to angular variance $\nu_{1}$, the second angular
variance $\nu_{2}$, and wall ratio $r$. Therefore, the capacity is expressed
as

$\displaystyle
C=C_{0}(1-\gamma_{1}\nu_{1}-\gamma_{2}\nu_{2})(1-\gamma_{\mathrm{wall}}r),$
(10)

where $C_{0}$ represents the capacity without the effects of $\nu_{1}$,
$\nu_{2}$ and $r$. $\gamma_{1},\gamma_{2}$ and $\gamma_{\mathrm{wall}}$ are
parameters. From now on, the term of
$(1-\gamma_{1}\nu_{1}-\gamma_{2}\nu_{2})(1-\gamma_{\mathrm{wall}}r)$ is called
capacity penalty.

Substituting Eq. (10) into Eq. (8), an FD model of the pedestrian flows that
takes into account the effects of flow types and the wall is obtained as

$\displaystyle
J=\min(u\rho,C_{0}(1-\gamma_{1}\nu_{1}-\gamma_{2}\nu_{2})(1-\gamma_{\mathrm{wall}}r)).$
(11)

Since Eq. (11) uses the minimum function, there are indifferentiable points.
To simplify handling in numerical processing such as estimation, Eq. (11) is
smoothed by applying the log-sum-exp (LSE) function [29] defined as

$\displaystyle\mathrm{LSE}(x_{1},x_{2},\ldots,x_{n})$
$\displaystyle\equiv\log\left(\sum_{j=1}^{i}\exp(x_{i})\right)$
$\displaystyle\thickapprox\max(x_{1},x_{2},\ldots,x_{n}).$ (12)

LSE function is a smooth approximation of the maximum function. It can also
approximate the minimum function by interchanging the signs as

$\displaystyle-\mathrm{LSE}(-x_{1},-x_{2},\ldots,-x_{n})$
$\displaystyle\thickapprox-\max(-x_{1},-x_{2},\ldots,-x_{n})$
$\displaystyle=\min(x_{1},x_{2},\ldots,x_{n}).$ (13)

The pedestrian FD model proposed in this study is completed by applying the
LSE function with the signs switched to Eq. (11) as

$\displaystyle
J(\rho,\nu_{1},\nu_{2},r)=-\log\\{\exp(-u\rho)+\exp\left(-C_{0}(1-\gamma_{1}\nu_{1}-\gamma_{2}\nu_{2})(1-\gamma_{\mathrm{wall}}r)\right)\\}.$
(14)

Figure 4 shows a schematic diagram of the models described in this section.

Figure 4: Schematic diagram of the models.

##  4 Case study

###  4.1 Data

We used “Unidirectional pedestrian flow in a corridor” dataset (DOI:
10.34735/ped.2013.6), “Bidirectional pedestrian flow in a corridor” dataset
(DOI: 10.34735/ped.2013.5) and “Pedestrian flow at a 90 degree crossing”
dataset (DOI: 10.34735/ped.2013.4). They are provided by a German research
institute, Forschungszentrum Jülich. These three datasets correspond to four
flow types: uni-directional flow, bi-directional flow, crossing-A flow, and
crossing-B flow, defined in Section 1. The data contains the pedestrian’s
coordinates and ID for each frame. The frame rates are 25 fps or 16 fps,
depending on the dataset.

Figure 5: Top view photograph of one of the bi-directional flow experiment
(Source: https://ped.fz-juelich.de/da/doku.php?id=corridor6).

The flow $J$ and the density $\rho$ are calculated from the trajectory data.
They were obtained by applying the Edie’s definition [30] as

$\displaystyle J=\frac{\sum_{s}d_{s}}{A},$ (15)

and

$\displaystyle\rho=\frac{\sum_{s}t_{s}}{A},$ (16)

respectively. $A$ is the spatio-temporal region in which the flow and density
are measured. The time region was set to 10 seconds, and the spatial region
was set to square areas in the center of the corridor or crossing. $d_{s}$
represents the distance that pedestrian $s$ has traveled in spatio-temporal
region $A$, and $t_{s}$ represents the travel time in the region. The flow $J$
and the density $\rho$ at time $\tau$ were calculated in the following way.

  1. 1.

The coordinates of the pedestrians in the measurement area at time $\tau$ are
obtained from the data.

  2. 2.

The number of pedestrians in the measurement area multiplied by the interval
for calculating (1 second) was added to $\sum_{s}t_{s}$.

  3. 3.

The displacements for all pedestrians in the measurement area were calculated
from the coordinates of the pedestrians after 1 second. They were added to
$\sum_{s}d_{s}$.

  4. 4.

Steps 1 to 3 were repeated for 10 seconds while increasing the time by 1
second.

  5. 5.

The flow $J$ and density $\rho$ were calculated by Eq. (15) and Eq. (16)

The interval for calculating the displacement was set as long as 1 second. By
taking a long interval, short movements in unintended directions due to the
avoidance of conflicts were not added to the flow.

Figure 6 shows a scatter plot of the calculated flow $J$ and density $\rho$
for four flow types. The capacity of the FD is different depending on the flow
types. Therefore, explaining this data with a single equation is difficult
with existing models.

Figure 6: Flow-density plots of calculated data.

The angular variance $\nu_{1}$ and the second angular variance $\nu_{2}$ at
time $\tau$ were calculated in the following way.

  1. 1.

The coordinates of the pedestrians in the measurement area at time $\tau$ are
obtained from the data.

  2. 2.

Angles of pedestrians were calculated by comparing with the coordinates after
0.2 (for 25 fps data) or 0.25 (for 16 fps data) seconds.

  3. 3.

Steps 1 to 2 were repeated for 10 seconds while increasing the time by 0.2 or
0.25 seconds.

  4. 4.

$\nu_{1}$ and $\nu_{2}$ were calculated using all the angles computed during
the 10 seconds by Eq. (2) and Eq. (5).

In order to evaluate the avoidance of conflicts by angular variance, the
intervals were set to short enough to pick up small movements.

The wall ratio $r$ was calculated according to the definition given in Eq.
(9), with $r=0.5$ for uni-directional and bi-directional flows and $r=0$ for
crossing flows.

The flow $J$, the density $\rho$, the angular variance $\nu_{1}$, the second
angular variance $\nu_{2}$, and the wall ratio $r$ were calculated every 10
seconds according to the above procedure. For each flow type, 80 sets of the
variables at random time intervals were sampled, of which 50 were set as
training data and 30 as test data.

###  4.2 Parameter estimation

The parameters of the model were estimated using the training data. The data
for all flow types were applied simultaneously to obtain the parameters that
fit all flow types. The least squares method was employed for the estimation.
Table 2 shows the parameter estimation results.

Table 2: Estimation results. | Coefficient |  $t$ value |  $p$ value
---|---|---|---
$u$[m/s] | 3.092 | 18.541 | $<10^{-10}$
$C_{0}$[ped/(m$\cdot$s)] | 1.527 | 15.243 | $<10^{-10}$
$\gamma_{1}$ | 0.224 | 6.199 | $3.345\times 10^{-9}$
$\gamma_{2}$ | 0.210 | 3.372 | $8.992\times 10^{-4}$
$\gamma_{\mathrm{wall}}$ | 0.435 | 4.736 | $4.204\times 10^{-6}$

Table 3 shows the value of the coefficients of determination $R^{2}$ and
adjusted coefficients of determination $\bar{R}^{2}$ for the training and test
data. The coefficient of determination was approximately 0.6, indicating that
this model can explain flow $J$ of different flow types to some extent.

Table 3: Coefficient of determination of the proposed model. | $R^{2}$ | $\bar{R}^{2}$
---|---|---
Train data | 0.654 | 0.646
Test data | 0.615 | 0.599

###  4.3 Discussion

According to the estimation results in Table 2, the signs of the estimates of
$\gamma_{1}$, $\gamma_{2}$, and $\gamma_{\mathrm{wall}}$ were positive. This
is consistent with the assumption in Section 3 that the larger angular
variance $\nu_{1}$, the second angular variance $\nu_{2}$, and the wall ratio
$r$ decrease the capacity $C$. In addition, all parameters were significant
according to the $t$ values and $p$ values.

Figure 7 shows the estimated FD and plots of samples on the flow-density
plane. The FD drawn as the solid line is the case without any capacity penalty
where the angular variance $\nu_{1}$, the second angular variance $\nu_{2}$,
and wall ratio $r$ are all $0$, i.e., the capacity $C$ equals $C_{0}$. As the
capacity penalty increases, the FD moves down from the solid line. The domain
is colored according to the magnitude of the capacity penalty. On the other
hand, the dots indicating the samples with the flow and density for a
particular 10-second period are also colored by their capacity penalty.
Therefore, when the color of a dot and the surrounding area are similar, it
implies a favorable estimation result for that sample.

According to Figure 7, most light-colored dots with a small penalty are
located in the light domain, and most dark-colored dots with a large penalty
are located in the dark domain. In addition, the results for each flow type
identified by the dots’ shapes also show a similar color match between the
dots and the surrounding domain for all four types. This indicates that the
proposed model performs well for data with a mixture of several flow types.

Figure 7: Flow-density plots of (the 50 training data) $\times$ (4 flow types)
and the estimated FD colored according to the value of capacity penalty
$(1-\gamma_{1}\nu_{1}-\gamma_{2}\nu_{2})(1-\gamma_{\mathrm{wall}}r)$.

Figure 8 compares the estimated flow and the actual flow for each sample. In
the left figure, the estimated flow is derived by the model without angular
variance $\nu_{1}$ and second angular variance $\nu_{2}$, which corresponds to
the equation

$\displaystyle
J=-\log\\{\exp(-u\rho)+\exp\left(-C_{0}(1-\gamma_{\mathrm{wall}}r)\right)\\}.$
(17)

From now on, the model Eq. (17) is called simple model. Each sample is colored
by the value of angular variance $\nu_{1}$ in Figure 8(a) and the one of
second angular variance $\nu_{2}$ in Figure 8(b).

Flows that were estimated to be close to $1.0$ in the simple model are
separated in the proposed model, and the accuracy of the fit becomes
relatively improved. This is also confirmed by comparing the coefficient of
determination for the simple model shown in Table 4 and the proposed models
shown in Table 3. In concrete, uni-directional flows with an actual flow
distributed between $1.0$ and $1.5$ colored by blue in both figures are
separated from the other flow types. The flow is estimated to be larger in the
uni-directional flow because the angular variance $\nu_{1}$ and the second
angular variance $\nu_{2}$ are smaller. Furthermore, Figure 7(b) shows that
the bi-directional flow drawn by the triangular dots is concentrated around
$(\text{Actual flow},\text{Estimated flow})=(0.6,1)$ in the simple model,
while they are separated by the value of second angular variance $\nu_{2}$ in
the proposed model. This implies that the lane formation of the bi-directional
flow can be represented to a certain extent by the second angular variance
$\nu_{2}$. These indicate that incorporating the angular variance $\nu_{1}$
and the second angular variance $\nu_{2}$ contribute to simultaneously
estimating the pedestrian FD of several flow types.

Table 4: Coefficient of determination of the simple model. | $R^{2}$ | $\bar{R}^{2}$
---|---|---
Train data | 0.451 | 0.443
Test data | 0.484 | 0.470
Figure 8: Scatter plots with actual flow on the horizontal axis and the
estimated flow on the vertical axis for each model with colored by the value
of angular variance $\nu_{1}$ or that of second angular variance $\nu_{2}$.

##  5 Conclusion

We proposed a comprehensive model of pedestrian FDs that can be applied to
various flow types. Specifically, we employ the angular variance to
characterize the flow types, such as uni-directional, bi-directional, and
crossing flow. It enables the FDs to explain the effect of flow types on flow
performance, such as efficient bi-directional flows and inefficient crossing
flows. The model was estimated and validated using actual pedestrian
trajectory data. The estimated values of the parameters were consistent with
the assumptions of the modeling. The capacities of estimated FD varied based
on the effect of avoidance of conflicts, measured by angular variance and the
second angular variance. This implies that pedestrian flow characteristics can
be depicted using Directional Statistics.

The current model is still simple and has several limitations, as it is the
first attempt of this kind. First, the proposed model does not describe the
congested part of an FD. This is because congested pedestrian flow is
completely different from free-flowing or saturated flows, and experimental
data is very limited. Second, although it predict average flow based on
directional-dependent flow, it does not predict direction-dependent flow
itself (i.e., input is directional-dependent, but the output is not). To
extend the proposed model to directional-dependent flow prediction, the
approach developed by Nagasaki and Seo [8] could be utilized. Case studies
with other datasets with different geometries such as in T-junctions or open
spaces are also considerable to confirm the generality of the proposed
methodology.

## CRediT author statement contribution statement

Keiichiro Fujiya: Conceptualization; Data curation; Formal analysis;
Investigation; Methodology; Validation; Visualization; Writing - original
draft. Kota Nagasaki: Conceptualization; Formal analysis; Investigation;
Methodology; Validation; Visualization; Writing - review & editing. Toru Seo:
Conceptualization; Funding acquisition; Methodology; Project administration;
Resources; Supervision; Visualization; Writing - review & editing.

## Declaration of competing interest

The authors declare that there are no known competing interest.

## Declaration of generative AI and AI-assisted technologies in the writing
process

During the preparation of this work the authors used GPT-4 for a grammatical
proofreading purpose. After using this tool/service, the authors reviewed and
edited the content as needed and takes full responsibility for the content of
the publication.

## Acknowledgement

This work is partially supported by a JSPS KAKENHI Grant-in-Aid for Scientific
Research 20H02267.

## References

  * [1] L. D. Vanumu, K. Ramachandra Rao, G. Tiwari, Fundamental diagrams of pedestrian flow characteristics: A review, European Transport Research Review 9 (4) (2017) 1–13.  doi:10.1007/s12544-017-0264-6.
  * [2] A. D. May, Traffic Flow Fundamentals, Prentice Hall, New Jersey, 1989.
  * [3] C. Feliciani, K. Nishinari, Empirical analysis of the lane formation process in bidirectional pedestrian flow, Physical Review E 94 (3) (2016) 032304.  doi:10.1103/PhysRevE.94.032304.
  * [4] K. V. Mardia, P. E. Jupp, K. V. Mardia, Directional Statistics (1999).
  * [5] R. A. Johnson, T. E. Wehrly, Some Angular-Linear Distributions and Related Regression Models, Journal of the American Statistical Association 73 (363) (1978) 602–606.  arXiv:2286608, doi:10.2307/2286608.
  * [6] J. T. Schnute, K. Groot, Statistical analysis of animal orientation data, Animal Behaviour 43 (1) (1992) 15–33.  doi:10.1016/S0003-3472(05)80068-5.
  * [7] G. Boeing, Urban spatial order: Street network orientation, configuration, and entropy, Applied Network Science 4 (1) (2019) 67.  doi:10.1007/s41109-019-0189-1.
  * [8] K. Nagasaki, T. Seo, Understanding Impact of Angle in Urban Transportation (Oct. 2023).  arXiv:2310.16470, doi:10.48550/arXiv.2310.16470.
  * [9] K. Nagasaki, W. Nakanishi, Y. Asakura, Application of the rose diagram to road network analysis, in: 24th International Conference of Hong Kong Society for Transportation Studies, Hong Kong, 2019.
  * [10] J. J. Fruin, DESIGNING FOR PEDESTRIANS: A LEVEL-OF-SERVICE CONCEPT, in: Highway Research Record, no. HS-011 999, 1971.
  * [11] M. R. Virkler, S. Elayadath, Pedestrian speed-flow-density relationships, Transportation research record 1438 (1994) 51–58.
  * [12] A. Seyfried, B. Steffen, W. Klingsch, M. Boltes, The fundamental diagram of pedestrian movement revisited, Journal of Statistical Mechanics: Theory and Experiment 2005 (10) (2005) P10002.  doi:10.1088/1742-5468/2005/10/P10002.
  * [13] J. Zhang, A. Seyfried, Empirical Characteristics of Different Types of Pedestrian Streams, Procedia Engineering 62 (2013) 655–662.  doi:10.1016/j.proeng.2013.08.111.
  * [14] W. H. K. Lam, J. Y. S. Lee, C. Y. Cheung, A study of the bi-directional pedestrian flow characteristics at Hong Kong signalized crosswalk facilities, Transportation 29 (2) (2002) 169–192.  doi:10.1023/A:1014226416702.
  * [15] C.-J. Jin, R. Jiang, S. C. Wong, S. Xie, D. Li, N. Guo, W. Wang, Observational characteristics of pedestrian flows under high-density conditions based on controlled experiments, Transportation Research Part C: Emerging Technologies 109 (2019) 137–154.  doi:10.1016/j.trc.2019.10.013.
  * [16] X. Jia, H. Murakami, C. Feliciani, D. Yanagisawa, K. Nishinari, Pedestrian lane formation and its influence on egress efficiency in the presence of an obstacle, Safety Science 144 (2021) 105455.  doi:10.1016/j.ssci.2021.105455.
  * [17] J. Lee, T. Kim, J.-H. Chung, J. Kim, Modeling lane formation in pedestrian counter flow and its effect on capacity, KSCE Journal of Civil Engineering 20 (3) (2016) 1099–1108.  doi:10.1007/s12205-016-0741-9.
  * [18] J. Zhang, A. Seyfried, Comparison of intersecting pedestrian flows based on experiments, Physica A: Statistical Mechanics and its Applications 405 (2014) 316–325.  doi:10.1016/j.physa.2014.03.004.
  * [19] S. Cao, A. Seyfried, J. Zhang, S. Holl, W. Song, Fundamental diagrams for multidirectional pedestrian flows, Journal of Statistical Mechanics: Theory and Experiment 2017 (3) (2017) 033404.  doi:10.1088/1742-5468/aa620d.
  * [20] M. Iryo, A. Nagashima, Performance Evaluation of Pedestrian Crossing Flow, Seisan-kenkyu 67 (4) (2015) 369–373.  doi:10.11188/seisankenkyu.67.369.
  * [21] D. Helbing, P. Molnár, Social force model for pedestrian dynamics, Physical Review E 51 (5) (1995) 4282–4286.  doi:10.1103/PhysRevE.51.4282.
  * [22] M. Asano, T. Iryo, M. Kuwahara, A Pedestrian Model Considering Anticipatory Behaviour for Capacity Evaluation, in: W. H. K. Lam, S. C. Wong, H. K. Lo (Eds.), Transportation and Traffic Theory 2009: Golden Jubilee: Papers Selected for Presentation at ISTTT18, a Peer Reviewed Series since 1959, Springer US, Boston, MA, 2009, pp. 559–581.  doi:10.1007/978-1-4419-0820-9_28.
  * [23] M. Moussaïd, D. Helbing, S. Garnier, A. Johansson, M. Combe, G. Theraulaz, Experimental study of the behavioural mechanisms underlying self-organization in human crowds, Proceedings of the Royal Society B: Biological Sciences 276 (1668) (2009) 2755–2762.  doi:10.1098/rspb.2009.0405.
  * [24] W. Nakanishi, T. Fuse, A preliminary study on analysis of pedestrian traffic line using angular data, JSTE Journal of Traffic Engineerin 1 (4) (2015) A$\\_$18–A$\\_$23\.
  * [25] G. Flötteröd, G. Lämmel, Bidirectional pedestrian fundamental diagram, Transportation Research Part B: Methodological 71 (2015) 194–212.  doi:10.1016/j.trb.2014.11.001.
  * [26] C. Feliciani, H. Murakami, K. Nishinari, A universal function for capacity of bidirectional pedestrian streams: Filling the gaps in the literature, PLOS ONE 13 (12) (2018) e0208496.  doi:10.1371/journal.pone.0208496.
  * [27] E. Moustaid, G. Flötteröd, Macroscopic model of multidirectional pedestrian network flows, Transportation Research Part B: Methodological 145 (2021) 1–23.  doi:10.1016/j.trb.2020.12.004.
  * [28] G. Flötteröd, J. Rohde, Operational macroscopic modeling of complex urban road intersections, Transportation Research Part B: Methodological 45 (6) (2011) 903–922.
  * [29] F. Nielsen, K. Sun, Guaranteed bounds on information-theoretic measures of univariate mixtures using piecewise log-sum-exp inequalities, Entropy 18 (12).  doi:10.3390/e18120442.
  * [30] L. Edie, Discussion of traffic stream measurements and definitions, in: 2nd International Symposium on the Theory of Traffic Flow, London, 1963\.


# PePe: Personalized Post-editing Model utilizing User-generated Post-edits

Jihyeon Lee*
<EMAIL_ADDRESS>&Taehee Kim*
<EMAIL_ADDRESS>&Yunwon Tae*
<EMAIL_ADDRESS>Cheonbok Park
<EMAIL_ADDRESS>&Jaegul Choo
<EMAIL_ADDRESS>
###### Abstract

Incorporating personal preference is crucial in advanced machine translation
tasks. Despite the recent advancement of machine translation, it remains a
demanding task to properly reflect personal style. In this paper, we introduce
a personalized automatic post-editing framework to address this challenge,
which effectively generates sentences considering distinct personal behaviors.
To build this framework, we first collect post-editing data that connotes the
user preference from a live machine translation system. Specifically, real-
world users enter source sentences for translation and edit the machine-
translated outputs according to the user’s preferred style. We then propose a
model that combines a discriminator module and user-specific parameters on the
APE framework. Experimental results show that the proposed method outperforms
other baseline models on four different metrics (i.e., BLEU, TER, YiSi-1, and
human evaluation).

##  1 Introduction

Language usage is strongly influenced by the state of the individual, which
can be considered by multiple attributes such as age, gender, socioeconomic
status, and occupation (Tannen et al., 1991; Pennebaker et al., 2003). Taking
these aspects into account in the machine translation task, we need
personalized translations to reflect individual characteristics that vary from
person to person; thus, the translation system should consider not only
fluency and content preservation, but also personal style.

However, most existing neural machine translation (NMT) models ignore personal
style (Mirkin et al., 2015). Previous studies attempt to address this problem
by personalizing the NMT models, but in these studies the definition of
personal style is often over-simplified. For example, Rabinovich et al. (2017)
and Sennrich et al. (2016) define the personal style as politeness and gender
respectively, which is not sufficient to tackle the multifarious character of
an individual. Namely, previous works defined the personal style in a
constrained form.

Figure 1: Example of a personal post-editing triplet (i.e., source (src),
machine translation (mt), and post-edit (pe)) given the source text in English
and the translated text in Korean. A post-edited sentence does not only
contain error correction of an initial machine translation result but also
reflects individual preference. For instance, a human post-editor modifies the
word ”primarily” to ”primary,” but also change ”공헌” to its synonym ”기여” while
keeping the rest as it is (e.g., ”research”).

In contrast with previous studies, we propose a method based on an APE
framework and newly utilize post-editing data to capture diverse personal
traits in translation. Originally, the need for post-editing data is to
improve the quality of machine-translated sentences in an APE task (Simard et
al., 2007; Pal et al., 2016; Correia and Martins, 2019). However, we suggest
that the post-editing data can also be adequate references for personalized
translation if various users post-edit sentences according to their
preferences. In this respect, we collect a user-generated post-editing dataset
called USP through a live translation system. After the system translates a
source sentence (src) to a target sentence, i.e., machine-translated sentence
(mt), each user edits the translated result according to their purpose or
preferences, i.e., post-edited sentence (pe). We collect (src, mt, pe)
triplets called personalized post-editing triplets for each user and an
example is depicted in Fig 1.

Along with the personalized post-editing data, we develop a model which
utilizes user parameter and a discriminator module. The user-specific
parameters allow the model to adapt to each user in that the model can
consider inter-personal variations. These parameters are aggregated with the
output word probability such that the generation word probability distribution
differs by each particular user. Moreover, since the prevalence of pre-trained
language models encourages significant performance improvements on various
natural language generation tasks (Song et al., 2019; Lewis et al., 2019;
Correia and Martins, 2019), we exploit the pre-trained language model (LM) but
do not fully lean on it. We assume that not all the features from the pre-
trained LM contribute to capturing the distinct taste of users that are
departing from the neutral and standardized patterns. Thus, our discriminator
module, inspired by adversarial training (Goodfellow et al., 2014), attempts
to dismantle the unnecessary features from a pre-trained LM, while tuning the
model to incorporate a personal style. The details will discuss in Section 3.

Experiments on our dataset and speaker annotated TED talks dataset (Michel and
Neubig, 2018) (SATED) demonstrate that the proposed approach generates diverse
translations for different users.

In summary, our contributions include the following:

  * •

To the best of our knowledge, this is the first work that leverages the APE
framework to a personalized translation task.

  * •

We propose a personalized post-editing model based on user-generated post-
edits, which is able to capture the inter-personal variations that consist of
multiple attributes.

  * •

Extensive experimental results show that the proposed method robustly reflects
personal traits and consistently outperforms baselines in three different
quantitative metrics and human evaluation results.

Figure 2: An overview of our proposed method. PePe consists of two parts: 1)
Clustering module that relies on pre-trained LM encoder and Gaussian mixture
model. 2) APE architecture that includes an auxiliary discriminator and user-
specific parameters.

##  2 Related Work

Our work is closely related to the recent work on personalized neural machine
translation and automatic post-editing.

#### Personalized neural machine translation.aaaa

Standard NMT systems are not able to consider the personal preference in a
machine-translated output (Mirkin et al., 2015). Mima et al. (1997) is the
early paper that proposes a concept of reflecting an author’s properties, such
as gender, dialog domain, and role in the translation. However, including Mima
et al. (1997), most studies conduct a limited range of personalized
translations, which address only a single attribute (e.g., politeness)
(Sennrich et al., 2016; Rabinovich et al., 2017).

Turchi et al. (2017) and Karimova et al. (2018) fine-tune the model on the
human post-edits to improve the NMT quality, which can be viewed as a naive
approach to handle the personalized translation without attribute labels.
Wuebker et al. (2018) extend this approach to adjust only a small number of
parameters, but still requires extensive training resources. Meanwhile, Michel
and Neubig (2018) and Huan et al. (2021) propose a generalized form of a
personalized translation method, which are closely related work with ours.
Michel and Neubig (2018) cast this problem as an extreme form of domain
adaptation, while Huan et al. (2021) introduce cache module and contrastive
learning to increase the diversity on dissimilar users. However, the reference
sentences for personalized translation were constructed by a few professional
translators, not by a variety of people with diverse characteristics; personal
preferences reflected in the dataset are limited. Our user-generated post-
edits are edited by a large number of people who provide the original
sentences.

#### Automatic post-editing.

Prior to the emergence of the transformer (Vaswani et al., 2017), RNN based
APE models (Pal et al., 2016; Junczys-Dowmunt et al., 2016; Junczys-Dowmunt
and Grundkiewicz, 2017) are actively studied. Subsequently, as self-attention
based models show significant improvements on various downstream tasks,
transformer based models also prevail in the APE task. Specifically, a popular
approach is to set a separate encoder for the source and machine-translated
(MT) output. Separately encoded representations are joined in the following
encoder (Pal et al., 2018) or fused in the decoder (Tebbifakhr et al., 2018;
Junczys-Dowmunt and Grundkiewicz, 2018a). More recently, Correia and Martins
(2019) improve the performance of APE tasks by leveraging a pre-trained LM.
Compared to these studies, our work is the first attempt to examine the neural
network based APE model for personalized translation. There is a study where
they use an APE module for domain adaptation (Isabelle et al., 2007), but the
explored one is based on a statistical machine translation system.

(a) Data points colorized with user label

(b) Data points colorized with GMM cluster label

Figure 3: Source sentences of USP embedded with the pre-trained LM. (a) and
(b) shows the discrepancy between the user data distribution and the
contextual similarity-based data distribution.

##  3 Proposed Method

#### Overview:

It is challenging to generate appropriate translations that impose personal
variations. To address such a demanding problem, we take a detour by applying
an APE framework. We propose PePe, a personalized post-editing model utilizing
user-generated post-edits. PePe includes a discriminator module to allow the
model to dismantle the pre-trained LM features. Specifically, we maximize the
discriminator loss to encourage the encoder to throw away irrelevant pre-
trained LM features, while minimizing the APE loss to guide the model to
utilize the pre-trained LM features that are useful for personalization. In
addition, PePe utilizes user-specific parameters to capture the personal
style. User-specific parameters are combined at the end of the decoder layer
to adjust the prediction of the word probability, i.e., the word choice based
on a user preference. Our strategy does not require expensive supervision on
the personal style, such as explicit attribute labeling or an attribute-
tailored model architecture.

The overall architecture of PePe is illustrated in Fig. 2. The two following
subsections will describe the modules shown in Fig. 2-(a), (b), (c), (d), and
(e), respectively.

###  3.1 Contextual Similarity vs. User-specific Style

The pre-trained LM is well known for capturing the contextual similarity that
is useful to define the label for in-domain data (e.g., sports, IT, and
economy). However, the user-specific style is far from those domains; it does
not coincide with contextual similarity yet involves somewhat arbitrary traits
(i.e., user preferences). Hence, we argue that some of the features from a
pre-trained LM distract personalized translation, which rather requires
generating biased results to meet the individuals’ needs. Fig. 3 demonstrates
the discrepancy between the user data distribution and the contextual
similarity-based data distribution.

We map the sampled sentences from USP to the embedding space of the pre-
trained LM. Each sentence is encoded with RoBERTa (Liu et al., 2019) and
visualized using t-SNE van der Maaten and Hinton (2008). The data on both
sides show the same embedding representations obtained from the same set of
sentences, but labeling is different. The data items in Fig. 3(a) are color-
coded by the users, whereas those in Fig. 3(b) are color-coded by the semantic
cluster labels obtained from the Gaussian mixture model (GMM) (Rasmussen,
2000), which allocates the similar sentences to the same label based on the
RoBERTa embedding of each.

In Fig. 3(b), semantically similar points, which are close in embedding space,
belong to the same clusters. However, the red and blue points in Fig. 3(a),
which indicate sentence representations from two different users, are
distributed unruly instead of being grouped by semantic similarity. In other
words, the fine-grained style differences of each user are somewhat distant
from the contextual similarity of the sentences; thus it is hard to
distinguish user-specific preferences when the model is highly oriented to
learning the contextual similarity.

###  3.2 Generating Cluster Labels based on Pre-trained LM

Inspired by the finding in Section 3.1, we devise a discriminator module that
uses the semantic cluster labels to unlearn the features from the pre-trained
LM that are unnecessary to reflect the personal styles. Before introducing the
details about PePe, we describe how to generate the semantic cluster labels
from a pre-trained LM in an unsupervised manner. We first encode src into
encoded vectors using a pre-trained LM111Though we use RoBERTa as a pre-
trained LM to generate cluster labels, other pre-trained LMs can also be used
in our approach. as shown in Fig 2-(a). Based on these encoded vectors,
semantic cluster labels are generated by GMM (Rasmussen, 2000) as illustrated
in Fig 2-(b). A Gaussian mixture is a function made up of the $k$ number of
Gaussian components, where $k$ is the number of clusters222Ten clusters are
used for all the experiments in the main paper. and is a hyperparameter.
Specifically, in GMM, $\sum^{k}_{i=1}\pi_{i}p_{i}(\mathbf{h}|\theta_{i})$
represents the distribution of data point $\mathbf{h}$, where $\mathbf{h}$ is
an encoded vector of the first token of src, i.e., [CLS] token, $\pi_{i}$ is
the probability of each Gaussian fitting the data, and $p_{i}$ is the Gaussian
density function parameterized by $\theta_{i}$. We assign each sentence to a
Gaussian that best describes the data, and the Gaussian corresponds to the
semantic cluster label. The label, i.e., $T={t_{1},...,t_{k}}$, is then used
as a classification label for our discriminator, which is described in the
following subsection.

###  3.3 PePe: Personalized Post-editing Model utilizing User-generated Post-
edits

We adopt BERT-based Encoder-Decoder APE model (Correia and Martins, 2019)
called Dual-Source BERT (DS-BERT) as our backbone, which is based on
transformer (Vaswani et al., 2017) with pre-trained multilingual BERT (Devlin
et al., 2019). This approach is shown to outperform existing APE models
(Tebbifakhr et al., 2018; Junczys-Dowmunt and Grundkiewicz, 2018b; Huang et
al., 2019). DS-BERT uses a single encoder which is used to encode both the src
and the mt by concatenating them with the specialized token $[SEP]$ as
described in Fig 2-(c).

Our model also learns to generate $y=[y_{1},...,y_{n}]$, i.e., pe, from $x$,
i.e., src, and $\tilde{y}=[\tilde{y}_{1},...,\tilde{y}_{m}]$, i.e., mt, by
maximizing the likelihood,

$P(y|x,\tilde{y};\theta_{\textit{APE}})=\prod^{n}_{i=1}P(y_{i}|x,\tilde{y},y_{<i};\theta_{\textit{APE}}),$

where $y_{i}$ is the i-th target word and $y_{<i}=y_{1}...y_{i-1}$ is the
partial translation result. $\theta_{\textit{APE}}$ represents the parameters
for translating source sentence into post-edited sentence with machine-
translated result $\tilde{y}$.

In order to adapt user-specific linguistic styles, we add user-specific
parameters before the softmax layer in the decoder as shown in Fig 2-(d),
i.e.,

$P(y_{i}|x,\tilde{y},y_{<i};\theta_{\textit{APE}},\theta_{user})=f(FFN(o_{i})+\theta_{user}),$

where FFN and $f$ are a feed-forward network and softmax function,
respectively. $o_{i}$ is the output for the i-th target word from the decoder.
$\theta_{user}\in\mathbb{R}^{V}$ is a user-specific embedding vector from a
set of trainable user embedding matrix $U\in\mathbb{R}^{N\times{V}}$ where $N$
is the number of users and $V$ is the size of vocabulary.

The model is then optimized by minimizing $\mathcal{L}_{APE}$ defined as

$\mathcal{L}_{\textit{APE}}=-\sum^{n}_{i=1}logP(y_{i}|x,\tilde{y};\theta_{\textit{APE}},\theta_{user}).$

Furthermore, as shown in Fig 2-(e), we introduce a discriminator module to
unlearn the contextual similarity feature learned from a pre-trained LM. To
train the discriminator, we compute the discriminator loss
$\mathcal{L}_{\textit{Disc}}$ defined as

$\mathcal{L}_{\textit{Disc}}=\sum^{k}_{i}t_{i}log(\tilde{t}_{i}),$

where $k$ is the number of classes (i.e., the number of Gaussians we pre-
defined) and $t_{i}$ is the ground-truth label of the semantic cluster.
$\tilde{t}_{i}$ represents the output from the discriminator which is a
single-layer feed-forward network for the classification of semantic cluster
labels. We use the first token of a source sentence to extract a sentence
representation from the encoder and pass it to the discriminator as an input.
Note that we use the gradient ascent method to prevent the encoder from
classifying the clusters. In this way, we diminish the unnecessary feature
from pre-trained LM, while our APE loss function incorporated with user-
specific parameters leads the model to capture the user-specific style.

Finally, PePe optimizes a combination of two losses,
$\mathcal{L}_{\textit{Disc}}$ and $\mathcal{L}_{\textit{APE}}$, with a
adjustment rate $\mathcal{\beta}$, i.e.,

$\mathcal{L}_{\textit{Train}}=\mathcal{\beta}\cdot\mathcal{L}_{\textit{Disc}}+(1-\mathcal{\beta})\cdot\mathcal{L}_{\textit{APE}}.$

Methods en$\rightarrow$ko ko$\rightarrow$en BLEU$\uparrow$ TER$\downarrow$
YiSi-1$\uparrow$ BLEU$\uparrow$ TER$\downarrow$ YiSi-1$\uparrow$ (1)
Uncorrected 64.9 (-5.6) 21.1 (+1.2) 87.3 (-1.1) 75.1 (-3.5) 17.7 (+1.4) 88.9
(-0.8) (2) DS-BERT 68.4 (-2.1) 21.1 (+1.2) 87.6 (-0.8) 77.1 (-1.5) 17.6 (+1.3)
89.1 (-0.6) (3) DS-BERT + Full Bias 68.6 (-1.9) 20.9 (+1.0) 88.0 (-0.4) 78.0
(-0.6) 16.9 (+0.6) 89.6∗ (-0.1) (4) DS-BERT + Factor Cell 67.5 (-3.0) 22.1
(+2.2) 88.0 (-0.4) 76.5 (-2.1) 18.4 (+2.1) 89.2 (-0.5) (5) DS-BERT + User CLS
69.0 (-1.5) 20.9 (+1.0) 87.1 (-1.3) 78.1 (-0.5) 16.5 (+0.2) 89.4 (-0.3) (6)
DS-BERT + User Token 68.8 (-1.7) 20.5 (+0.6) 87.0 (-1.4) 74.3 (-4.3) 21.6
(+5.3) 88.5 (-1.2) (7) PePe 70.5 19.9 88.4 78.6 16.3 89.7 (8) -discriminator
68.6 (-1.9) 20.9 (+1.0) 88.0 (-0.4) 78.0 (-0.6) 16.9 (+0.6) 89.6∗ (-0.1) (9)
-(8) & user bias 68.4 (-2.1) 21.1 (+1.2) 87.6 (-0.8) 77.1 (-1.5) 17.6 (+1.3)
89.1 (-0.6) (10) -(9) & pre-training 60.2 (-10.3) 31.9 (+12.0) 86.3 (-2.1)
67.6 (-11.0) 28.7 (+12.4) 87.6 (-2.1)

Table 1: Quantitative comparison with the baselines on the USP dataset that
contains en$\rightarrow$ko language pairs and vice versa. (8) to (10) denotes
the ablation results. The ablation study is designed to verify each module in
PePe. User bias in (9) denotes the user-specific parameters located at the end
of the decoder, and pre-training in (10) denotes the task-adaptive pre-
training stage. The bold represents the significant difference ($p<0.05$)
against other baselines. We conduct the t-test with five runs and report the
average score of it. ∗ means that there is no significant difference in the
scores between the model and PePe.

##  4 Experiments

In this section, we qualitatively and quantitatively demonstrate the
effectiveness of our proposed method. We validate PePe, described in Section
3, against other baseline methods using a real-world user dataset USP. We also
provide a detailed explanation for the dataset. Moreover, through extensive
experiments and analyses, we show that PePe can incorporate inter-personal
variations into a target sentence. We provide training details in Appendix A.

###  4.1 Dataset

We collect the user-generated post-editing dataset, USP, from a publicly
available online translation system333We collected data only from users who
consent to the data collection for research purposes. In addition, there is no
privacy issue because de-identification had taken for the collected data.
(e.g., Google Translate). Fig 4 illustrates the user experience flow. The
users enter the sentences they want to translate, and the system provides the
corresponding outputs that are generated by the high-quality commercialized
machine translator. From the machine-translated outputs, users can start to
edit the translated sentences according to their preference by clicking the
“post-edit” button. Consequently, when the users click the “Finish” button
after completing the changes, a triplet of the source sentence, machine-
translated output, and personalized post-edit is sent to our database. Note
that the origin of post-edited sentences is each particular user, which makes
USP contains inter-personal variation, unlike existing APE datasets.

Figure 4: Illustration of the user experience flow for post-edit log
generation.

Since we collect USP from the real-world users’ inputs that contain various
noises (e.g., unedited, duplicated, or meaningless examples), we preprocess
the data to eliminate these noises. Furthermore, most users only edited few
examples, which are not sufficient to represent their style. Therefore, we
select the users who left more than 100 samples, i.e., 30 users with 7K
sentences and 70 users with 9K sentences for en$\rightarrow$ko and
ko$\rightarrow$en USP dataset, respectively. For users who left less than 100
samples, we aggregate the samples (i.e., 0.12M sentences) and utilize them as
training data for the task-adaptive pre-training (Gururangan et al., 2020).
The discriminator module and user-specific parameters are not used in the
task-adaptive pre-training and only the parameters for DS-BERT are utilized
for the pre-training stage. Details of data preprocessing are in Appendix A.

Additionally, we adopt a Speaker Annotated TED (SATED) dataset (Michel and
Neubig, 2018) containing more than 2,000 sets of speaker style-contained
source sentences, which is publicly available. We select the dataset to show
the robustness of our model regarding different datasets and languages.

###  4.2 Experimental Setup

#### Evaluation metric.

We use three different metrics to evaluate how well our proposed model
preserves the content and incorporates the personal preferences. BLEU
(Papineni et al., 2002) and TER (Snover et al., 2006) scores are considered to
assess the translated sentence where the ground-truth sentence is a pe
sentence. We also leverage YiSi-1 (Lo, 2019) that computes the semantic
similarity of phrases between the model output and pe, which can be sensitive
to detailed styles. We also conduct a human evaluation, which will be
described in the following section.

#### Baseline Methods.

We compare the performance of our method with the following baselines. Since
this is the first attempt to personalize the translation using post-edits, we
newly adjust existing personalized translation methods onto the APE framework
for comparisons.

1) Uncorrected is the same as mt in personalized post-editing data, which is
generated from the online MT system. No correction was made on it. 2) DS-BERT
is a transformer based post-editing model (Correia and Martins, 2019) that we
adopt as our backbone in the method section. This approach is shown to
outperform existing APE models (Tebbifakhr et al., 2018; Junczys-Dowmunt and
Grundkiewicz, 2018b; Huang et al., 2019), even in the absence of additional
large-scale artificial data that competing models have used. 3) DS-BERT + Full
bias (Michel and Neubig, 2018) utilizes additional user bias vectors on the
decoder’s output. 4) DS-BERT + Factor bias (Michel and Neubig, 2018) uses
factorized user bias on the output of the decoder. User-independent biases are
shared with all users. However, the user-specific vector can adjust each user-
independent vector’s magnitude. 5) DS-BERT + User CLS is a multi-task composed
of a user classification and APE task. The first token of an encoder input is
used to stand for user identity. The corresponding output vector is used to
classify a ground-truth user label. A single layer of a feed-forward neural
network is used for the classifier. 6) DS-BERT + User Token (Sennrich et al.,
2016) adds a token at the start of each post-edited sentence to indicate the
user for each sentence. We train the model in a teacher-forcing manner.

###  4.3 Quantitative Evaluation

Results using automatic metrics and human evaluation are presented in this
section. PePe consistently outperforms the baselines on all datasets we
considered. We also show the robustness of PePe regarding the different number
of users, data distributions, and language pairs.

#### Performance of PePe against other baselines.

(1) to (7) in Table 1 shows the personalized translation results of varied
baselines. Our proposed method outperforms the six baselines with the non-
trivial margin both on en$\rightarrow$ko and ko$\rightarrow$en USP dataset.
For instance, BLEU score increased in the range of 1.7 to 5.6, YiSi-1
increased in the range of 0.4 to 1.4, and TER decreased in the range of 0.6 to
2.2 over baselines, in en$\rightarrow$ko dataset. Consistent results from
these three different metrics verify that PePe easily figure out distinct
taste of users while preserving source contents. Especially, experiments in
en$\rightarrow$ko dataset show the most outstanding performance gains since
the data mostly come from the users whose first language is Korean; the users
can reflect the linguistic preference more naturally on this dataset.

#### Ablation study.

The comparison between PePe and (8) in Table 1 shows the importance of the
discriminator module. When we exclude the discriminator module, the BLEU and
TER scores are decreased on both en$\rightarrow$ko and ko$\rightarrow$en. The
results of the vanilla APE model (i.e., (9) in Table 1) show that the user-
specific parameters are also significant for personalized translation.
Moreover, when we do not adopt the APE task-adaptive pre-training (i.e., (10)
in Table 1), the performance of the model drops even further. Overall, our
ablation study demonstrates that each component is essential for the task.

Metrics | PePe | DS-BERT | Uncorr.
---|---|---|---
Style - 1st | 59.6 | 18.1 | 22.2
Style - 2nd | 21.0 | 39.1 | 39.9
Style - 3rd | 19.5 | 42.6 | 37.9
Non-Style | 3.94(1.08) | 3.60(1.19) | 3.82(1.16)
Table 2: Human evaluation on en$\rightarrow$ko USP dataset. Style and non-
style factors are both surveyed. For the style factor, each score represents
the proportion. For instance, 59.6% of evaluators choose PePe as the first
place among other models. For the non-style factor, a Likert scale from 1 to 5
evaluates fluency and source contents preservation. We report the average
score and the standard deviation.

Model en$\rightarrow$de en$\rightarrow$fr BLEU$\uparrow$ BLEU$\uparrow$ Michel
and Neubig (2018) 27.2 38.5 DS-BERT 30.4 42.2 PePe 31.2 43.7

Table 3: Experiments on the SATED dataset. PePe outperforms DS-BERT on
different language pairs even for a synthetic post-editing dataset. The bold
represents the best score among the baselines and significantly ($p<0.05$)
outperforms DS-BERT.

#### Human evaluation.

To validate the advantage of our approach, we conduct human evaluations. Human
evaluation can be a reasonable measurement choice to evaluate the
personalization task because even sophisticated evaluation metrics can fail to
capture the abstract (i.e., high-level) user behavior reflected in the pe
sentence. We hired 20 Korean-English who are bilingual and engaged in the
fields of linguistics and machine learning for human evaluation. We randomly
select 30 source sentences and generate corresponding target sentences from
Uncorrected, DS-BERT, and PePe before carrying out two types of questions to
compare different metrics. 1) We ask participants to annotate generated
sentences along with fluency and content preservation. Sentences are measured
on a Likert scale from 1 to 5. 2) We take three sentences generated from three
different models. Participants rank these sentences from first to third, i.e.,
asking which sentence is most similar to the ground-truth pe that contains
distinct writing styles.

As reported in Table 2, PePe is ranked 1st by most evaluators. PePe not only
achieved the best score on style evaluation but also on non-style factors
(i.e., fluency and contents preservation), which is essential for the
translation task. DS-BERT achieves the lowest score on both measures,
indicating that the ambiguous reflection of style is worse than none. The
human evaluation results are consistent with our quantitative results measured
by automatic metrics.

Figure 5: Robustness on the number of users. The dark squares denote the BLEU
score, and the light circles denote the TER score. The number of clusters is
equally adopted as ten for all cases. The users are randomly selected from the
USP dataset.

en$\rightarrow$ko src Immediately provide non-monetary benefits as required.
mt 필요에 따라 즉시 비화폐성 편익을 제공하십시오. PePe 요구된대로 비화폐성 혜택을 즉시 제공한다. pe 요구되어진 비화폐성 혜택을
즉시 제공한다. src Choose this option to make the current preset load whenever a new
multi Instrument is created. mt 새 멀티 계측기가 생성될 때마다 현재 사전 설정된 로드를 만들려면 이 옵션을
선택하십시오. PePe 새 multi instrument가 생성될 때마다 현재 preset을 만들려면 이 옵션을 선택하십시오. pe 새
multi instrument가 생성될 때마다 현재 preset load를 만들려면 이 옵션을 선택하십시오. ko$\rightarrow$en
src 겨울왕국 2 속에 나오는 장면이 있다. mt there is a scene in winter kingdom 2. PePe there
is a scene in frozen 2. pe there is a scene in frozen 2. src 관사 아래에 있는 모음코드가
이렇게 바뀌어진다. mt the vowel code under the official building changes like this.
PePe the vowel code under the article changes like this. pe the vowel code
under the article changes like this.

Table 4: Qualitative examples of post-edited sentences generated from PePe.
User-specific parts in pe and corresponding parts in mt are colored. We
highlight the post-edited words in PePe with bold if the words are identical
to pe. Corresponding parts in src are underlined. Our model finds an
appropriate combination of attributes in accordance with sentences and users.

#### Robustness of our model.

Table 3 shows the personalized translation results on en$\rightarrow$de and
en$\rightarrow$fr SATED dataset. Since the dataset is initially constructed
for the machine translation task where post-edited sentences do not exist, we
utilize target sentence (i.e., mt) in the place of pe and independently
generate mt from a particular translation model (i.e., pre-trained transformer
based NMT model). Regardless of the language, the results demonstrate that
PePe and DS-BERT, which leverages triplets (src, mt, pe), outperform Michel
and Neubig (2018) that relies on paired sentences (src, mt). In addition, the
results also show that even if pe is not edited from the mt, PePe translates
the source sentence close to the ground-truth target sentence that connotes
the speaker’s characteristics.

Fig. 5 shows that our model works well regardless of the number of users.
Grey-colored lines are the performance of the baseline model, and colored
lines are the performance of PePe. TER axis is reversed on the graph to make
consistency with the BLEU score. Note that the higher points denote a better
score than the lower points.

Furthermore, we conduct additional experiments that show the robustness of our
approach regarding the number of clusters and adjustment rates, which are
hyperparameters. We represent the results in Appendix B.

###  4.4 Qualitative Analysis

To understand how user-specific preferences are incorporated into the
sentences, we qualitatively analyze the post-edited results of our model as
shown in Table 4. A typical example of the multi-attribute correction appears
in the first row, which changes the sentence structure and the preferred word
choices. Our model tends to retain the overall meaning of the source sentence
while precisely treating an abstractive personal behavior. The output of PePe
in the second row tends to keep loanwords in English instead of translating
them into Korean (i.e., “multi instrument”, “preset load”), while mt suffers
from generating sentences that consider those preferences. An example of
changing a homonym to a suitable word is shown in the last row. Since
“official building” and “article” are homonyms in Korean, PePe chooses the
word that is appropriate for the semantic meaning of the sentence. We further
provide several examples that consider the multidimensional attributes in
Appendix C. In either a single attribute or a multi attributes case, our model
properly reflects distinct preferences.

##  5 Conclusion

In this work, we propose a personalized post-editing method, PePe, utilizing
user-generated post-edits. Based on the APE framework, PePe leverages two
modules, 1) user-specific parameters and 2) a semantic cluster-based
discriminator module. These modules lead to reflect the multifarious inter-
personal variations, where the former allows the model to learn user-dependent
probabilities for each word while the latter unlearns the detrimental features
in a pre-trained language model and maintains advantageous effects of the
transfer learning. We empirically demonstrate that PePe reflects fine-grained
user preference in a variety of settings. To the best of our knowledge, this
work is the first attempt to utilize the APE framework with the user-generated
post-edits for personalized translation. We believe that our work can draw
more attention toward personalized translation, which is the ultimate
direction that the neural translation model should go forward.

## References

  * Correia and Martins (2019) Gonçalo M. Correia and André F. T. Martins. 2019.  A simple and effective approach to automatic post-editing with transfer learning.  In _Proc. the Annual Meeting of the Association for Computational Linguistics (ACL)_ , pages 3050–3056.
  * Devlin et al. (2019) Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019.  BERT: Pre-training of deep bidirectional transformers for language understanding.  In _Proc. of The Annual Conference of the North American Chapter of the Association for Computational Linguistics (NAACL)_ , pages 4171–4186.
  * Goodfellow et al. (2014) Ian J Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. 2014.  Generative adversarial networks.  In _Proc. the Advances in Neural Information Processing Systems (NeurIPS)_ , pages 2672–2680.
  * Gururangan et al. (2020) Suchin Gururangan, Ana Marasović, Swabha Swayamdipta, Kyle Lo, Iz Beltagy, Doug Downey, and Noah A Smith. 2020.  Don’t stop pretraining: Adapt language models to domains and tasks.  _arXiv preprint arXiv:2004.10964_.
  * Huan et al. (2021) Lin Huan, Yao Liang, Yang Baosong, Liu Dayiheng, Zhang Haibo, Luo Weihua, Huang Degen, and Su Jinsong. 2021.  Towards user-driven neural machine translation.  In _Proc. the Annual Meeting of the Association for Computational Linguistics (ACL)_.
  * Huang et al. (2019) Xuancheng Huang, Yang Liu, Huanbo Luan, Jingfang Xu, and Maosong Sun. 2019.  Learning to copy for automatic post-editing.  In _Proc. of the Conference on Empirical Methods in Natural Language Processing (EMNLP)_ , pages 6122–6132.
  * Isabelle et al. (2007) P. Isabelle, Cyril Goutte, and Michel Simard. 2007.  Domain adaptation of mt systems through automatic postediting.  _Proc. of Machine Translation Summit_.
  * Junczys-Dowmunt et al. (2016) Marcin Junczys-Dowmunt, Tomasz Dwojak, and Rico Sennrich. 2016.  The amu-uedin submission to the wmt16 news translation task: Attention-based nmt models as feature functions in phrase-based smt.  In _Proc. of the Conference on Machine Translation (WMT)_ , pages 319–325.
  * Junczys-Dowmunt and Grundkiewicz (2017) Marcin Junczys-Dowmunt and Roman Grundkiewicz. 2017.  An exploration of neural sequence-to-sequence architectures for automatic post-editing.  In _Proc. of the International Joint Conference on Natural Language Processing (IJCNLP)_ , pages 120–129.
  * Junczys-Dowmunt and Grundkiewicz (2018a) Marcin Junczys-Dowmunt and Roman Grundkiewicz. 2018a.  Ms-uedin submission to the wmt2018 ape shared task: Dual-source transformer for automatic post-editing.  In _Proc. of the Conference on Machine Translation (WMT)_ , pages 822–826.
  * Junczys-Dowmunt and Grundkiewicz (2018b) Marcin Junczys-Dowmunt and Roman Grundkiewicz. 2018b.  MS-UEdin submission to the WMT2018 APE shared task: Dual-source transformer for automatic post-editing.  In _Proc. of the Conference on Machine Translation (WMT)_ , pages 822–826.
  * Karimova et al. (2018) Sariya Karimova, Patrick Simianer, and Stefan Riezler. 2018.  A user-study on online adaptation of neural machine translation to human post-edits.  _Machine Translation_ , 32:309–324.
  * Kingma and Ba (2015) Diederik P. Kingma and Jimmy Ba. 2015.  Adam: A method for stochastic optimization.  In _Proc. the International Conference on Learning Representations (ICLR)_.
  * Lewis et al. (2019) Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Ves Stoyanov, and Luke Zettlemoyer. 2019.  Bart: Denoising sequence-to-sequence pre-training for natural language generation, translation, and comprehension.  _arXiv preprint arXiv:1910.13461_.
  * Liu et al. (2019) Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2019.  Roberta: A robustly optimized bert pretraining approach.  _Computing Research Repository (CoRR)_ , abs/1907.11692.
  * Lo (2019) Chi-kiu Lo. 2019.  Yisi-a unified semantic mt quality evaluation and estimation metric for languages with different levels of available resources.  In _Proc. of the Conference on Machine Translation (WMT)_ , pages 507–513.
  * Loshchilov and Hutter (2019) Ilya Loshchilov and Frank Hutter. 2019.  Decoupled weight decay regularization.  In _Proc. the International Conference on Learning Representations (ICLR)_.
  * Michel and Neubig (2018) Paul Michel and Graham Neubig. 2018.  Extreme adaptation for personalized neural machine translation.  In _Proc. the Annual Meeting of the Association for Computational Linguistics (ACL)_ , pages 312–318.
  * Mima et al. (1997) Hideki Mima, Osamu Furuse, and Hitoshi Iida. 1997.  Improving performance of transfer-driven machine translation with extra-linguistic informatioon from context, situation and environment.  In _Proc. the International Joint Conference on Artificial Intelligence (IJCAI)_ , pages 983–989.
  * Mirkin et al. (2015) Shachar Mirkin, Scott Nowson, Caroline Brun, and Julien Perez. 2015.  Motivating personality-aware machine translation.  In _Proc. of the Conference on Empirical Methods in Natural Language Processing (EMNLP)_ , pages 1102–1108.
  * Pal et al. (2018) Santanu Pal, Nico Herbig, Antonio Krüger, and Josef van Genabith. 2018.  A transformer-based multi-source automatic post-editing system.  In _Proc. of the Conference on Machine Translation (WMT)_ , pages 827–835.
  * Pal et al. (2016) Santanu Pal, Sudip Kumar Naskar, Mihaela Vela, and Josef van Genabith. 2016.  A neural network based approach to automatic post-editing.  In _Proc. the Annual Meeting of the Association for Computational Linguistics (ACL)_ , pages 281–286.
  * Papineni et al. (2002) Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. 2002.  Bleu: a method for automatic evaluation of machine translation.  In _Proc. the Annual Meeting of the Association for Computational Linguistics (ACL)_ , pages 311–318.
  * Pennebaker et al. (2003) James W Pennebaker, Matthias R Mehl, and Kate G Niederhoffer. 2003.  Psychological aspects of natural language use: Our words, our selves.  _Annual review of psychology_ , 54(1):547–577.
  * Rabinovich et al. (2017) Ella Rabinovich, Raj Nath Patel, Shachar Mirkin, Lucia Specia, and Shuly Wintner. 2017.  Personalized machine translation: Preserving original author traits.  In _Proc. of the Annual Conference of the European Chapter of the Association for Computational Linguistics (EACL)_ , pages 1074–1084.
  * Rasmussen (2000) Carl Edward Rasmussen. 2000.  The infinite gaussian mixture model.  In _Proc. the Advances in Neural Information Processing Systems (NeurIPS)_ , pages 554–560.
  * Sennrich et al. (2016) Rico Sennrich, Barry Haddow, and Alexandra Birch. 2016.  Controlling politeness in neural machine translation via side constraints.  In _Proc. of The Annual Conference of the North American Chapter of the Association for Computational Linguistics (NAACL)_ , pages 35–40.
  * Simard et al. (2007) Michel Simard, Nicola Ueffing, Pierre Isabelle, and Roland Kuhn. 2007.  Rule-based translation with statistical phrase-based post-editing.  In _Proc. of the Workshop on Statistical Machine Translation (WMT)_ , pages 203–206.
  * Snover et al. (2006) Matthew Snover, Bonnie Dorr, Richard Schwartz, Linnea Micciulla, and John Makhoul. 2006.  A study of translation edit rate with targeted human annotation.  In _Proc. of the association for machine translation in the Americas (AMTA)_ , pages 223–231.
  * Song et al. (2019) Kaitao Song, Xu Tan, Tao Qin, Jianfeng Lu, and Tie-Yan Liu. 2019.  Mass: Masked sequence to sequence pre-training for language generation.  _arXiv preprint arXiv:1905.02450_.
  * Tannen et al. (1991) Deborah Tannen et al. 1991.  _You just don’t understand: Women and men in conversation_.  Virago London.
  * Tebbifakhr et al. (2018) Amirhossein Tebbifakhr, Ruchit Agrawal, Matteo Negri, and Marco Turchi. 2018.  Multi-source transformer with combined losses for automatic post editing.  In _Proc. of the Conference on Machine Translation (WMT)_ , pages 846–852.
  * Turchi et al. (2017) Marco Turchi, Matteo Negri, M Amin Farajian, and Marcello Federico. 2017.  Continuous learning from human post-edits for neural machine translation.  _The Prague Bulletin of Mathematical Linguistics (PBML)_ , 108:233–244.
  * van der Maaten and Hinton (2008) Laurens van der Maaten and Geoffrey Hinton. 2008.  Visualizing data using t-sne.  _Journal of Machine Learning Research (JMLR)_ , 9:2579–2605.
  * Vaswani et al. (2017) Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. 2017.  Attention is all you need.  In _Proc. the Advances in Neural Information Processing Systems (NeurIPS)_ , pages 5998–6008.
  * Wuebker et al. (2018) Joern Wuebker, Patrick Simianer, and John DeNero. 2018.  Compact personalized models for neural machine translation.  In _Proc. of the Conference on Empirical Methods in Natural Language Processing (EMNLP)_ , pages 881–886.

## Supplementary Material

This material complements our paper with additional experimental results and
miscellaneous details. Section A provides the implementation details. Section
B addresses the additional experiments that show the robustness of our model
against a varied number of clusters and adjustment rates. In Section C, we
demonstrate the variety of qualitative examples of post-edited sentences
generated from PePe.

##  Appendix A Training Details

#### Data Prepossessing.

For the data preprocessing, we first filter out the duplicate lines and
normalize the data such that each line represents a single sentence. Also, we
exclude sentence that is longer than 100 words. Then, we utilize term
frequency inverse document frequency (TF-IDF) to compute the user similarity
score and filter out the noisy users. To be specific, we form a document for
each user by aggregating src. If a particular user has a lower than 0.1
similarity score, we exclude those users. We assume that if a user has a lower
similarity score with others, then those users may contain noisy sentences.
After prepossessing noisy data for USP, we divide the dataset into
train/valid/test, which results in 5,207, 1,001, and 1,125 samples for Korean
to English language pair, and 6,330, 1,360, and 1,357 samples for English to
Korean. Since we split into train/valid/test for each user, the user appearing
in the train dataset guarantees to appear in the test dataset.

#### Training and Inference Procedures.

The main difference between training and inference procedures is the existence
of a discriminator module. In other words, the clustering module and the
discriminator are not utilized during the inference procedure. However,
similar to the training procedure, we utilize the trained user-specific bias
vector that corresponds to the user ID of each input sentence while generating
a post-edited sentence.

#### Evaluation and HyperParameter Details.

We evaluate all experiments based on
SacreBLEU444https://github.com/mjpost/sacrebleu,
TER555https://www.statmt.org/wmt18/ape-task.html, and
YiSi-1666https://github.com/chikiulo/yisi scores. Since YiSi-1 requires pre-
trained word embedding vectors, we utilize
fastText777https://github.com/facebookresearch/fastText to pretrain word
embeddings. For the hyper-parameter settings, we use 10 clusters with 0.3
adjustment rates for all the experiments in the main paper. We select the
combination of hyperparameters by manual tuning, which achieves the highest
performance in the validation set based on the TER metric. Conditions for
early-stopping and decoding are equally applied to the baselines. We follow
the settings of hyperparameters in Correia and Martins (2019) except sharing
the weight of the encoder and the decoder. We conducted all the experiments
five times, and the random seeds used were 42, 1215, 101, 909, and 1129. We
selected the highest performance learning rate value between 0.00005 and
0.0001. We report the configuration of our best model in Table 5.

#### Environment Details.

All experiments in Table 1 is examined with CentOS Linux release 7.8.2003,
Tesla P40 GPU, and Intel Xeon CPU E5-2630. Results in Table 3 are examined
with Ubuntu 16.04.6, Intel Xeon processor, and Tesla V100-PCIE-32GB GPU. The
versions of the libraries we used in all experiments are 3.7.6 for Python and
1.4.0 for Pytorch.

Hyperparameters | Value
---|---
Pre-trained LM | BERT-base-multilingual
Learning rate | 0.00005
Batch size | 512
Accumulation step | 2
Optimizer | AdamW
Dropout | 0.1
Label smoothing | 0.1
Random seed | 42, 101, 1215, 1129, 909
Decoding strategy | Beam search
Beam size | 3
Table 5: Hyperparameter settings. AdamW (Loshchilov and Hutter, 2019) is the Adam Kingma and Ba (2015) optimizer with weight decay. Models | BLEU$\uparrow$ | TER$\downarrow$
---|---|---
Uncorrected | 64.9 | 21.1
DS-BERT | 68.5 | 21.1
PePe (k30, m0.1) | 70.2 | 20.2
PePe (k30, m0.2) | 69.7 | 20.3
PePe (k30, m0.3) | 69.9 | 19.9
PePe (k30, m0.4) | 69.0 | 20.8
PePe (k30, m0.5) | 70.2 | 20.3
Table 6: Experiments on various hyperparameter settings on a USP dataset. $k$
denotes the number of clusters and $m$ denotes the adjustment rate.

##  Appendix B Robustness to the number of cluster and hyperparameter

In the main paper, we conduct all experiments with 10 cluster labels. However,
to be useful for the varied settings, it is crucial to demonstrate the model’s
robustness to the number of clusters and adjustment rate. Here we provide the
results trained on 30 cluster labels with various adjustment rates from 0.1 to
0.5. Identical with Table 1, we utilize en$\rightarrow$ko dataset of 30 users.
Table 6 indicates that PePe consistently generates high-quality sentences,
regardless of the hyperparameters.

##  Appendix C Additional Qualitative Examples

This section provides additional qualitative examples from PePe. We choose the
samples from the inference results of USP dataset, and both ko$\rightarrow$en
and en$\rightarrow$ko language pairs are reported. As shown in Table 7, Table
8, Table 9, Table 10, Table 11, and Table 12, the tables are organized
according to the typical personalization cases (i.e., error correction, word
choice, politeness, and multiple attributes). Red color represents error
correction case, Yellow color represents word choice case, and Green color
represents politeness case. Each case also accompanies the insertion and
deletion of the words (i.e., tokens). Sentences inferred from PePe show that
it well reflects the personal traits of each user and the characteristics of
each language.

Error Correction (en$\rightarrow$ko)
---
src | Begin the stroke by moving the hand , while the elbow remains still and high.
mt | 팔꿈치가 가만히 있고 높게 유지되는 동안 손을 움직이면서 뇌졸중을 시작한다.
PePe | 팔꿈치가 가만히 있고 높게 유지되는 동안 손을 움직이면서 팔동작을 시작한다.
pe | 팔꿈치가 가만히 있고 높게 유지되는 동안 손을 움직이면서 팔동작을 시작한다.
src | Periodically check on her progress.
mt | 정기적으로 진행 상황을 확인합니다.
PePe | 정기적으로 그녀의 진행 상황을 확인합니다.
pe | 정기적으로 그녀의 진행 상황을 확인합니다.
src | All manual checks unclaimed for more than 6 months shall be canceled.
mt | 6개월 이상 청구되지 않은 모든 수동 점검은 취소된다.
PePe | 6개월 이상 청구되지 않은 모든 수동 수표는 취소된다.
pe | 6개월 이상 청구되지 않은 모든 수동 수표는 취소된다.
src | If a signal has finite power its energy will be infinite.
mt | 만약 어떤 신호가 한정된 힘을 가지고 있다면 그 에너지는 무한할 것이다.
PePe | 만약 어떤 신호가 한정된 전력을 가지고 있다면 그 에너지는 무한할 것이다.
pe | 만약 어떤 신호가 한정된 전력을 가지고 있다면 그 에너지는 무한할 것이다.
src | The historical cost of the intangible fixed assets transferred shall be the historical cost recorded in the accounting
| records of the receiver.
mt | 이전하는 무형고정자산의 역사적원가는 수취인의 회계기록에 기록된 역사적원가를 말한다.
PePe | 이전하는 무형고정자산의 취득원가는 수취인의 회계기록에 기록된 취득원가를 말한다.
pe | 이전하는 무형고정자산의 취득원가는 수취인의 회계기록에 기록된 취득원가를 말한다.
src |  Emotional exhaustion is the central quality and the most obvious manifestation of burnout.
mt |  감정 기진맥진은 중심적인 질이고 가장 명백한 소진 증상이다.
PePe |  정서적 소진은 중심적인 질이고 가장 명백한 번아웃 증상이다.
pe |  정서적 소진은 번아웃의 중심특성이자 가장 명백한 징후이다.
Table 7: PePe generates post-edited sentences that corrects the grammar errors
from the machine-translated outputs. Word Choice (en$\rightarrow$ko)
---
src | Hide the layer containing the cutting lines.
mt |  절단선이 들어 있는 레이어를 숨긴다.
PePe |  커팅 라인이 들어 있는 레이어를 숨긴다.
pe |  커팅 라인이 들어 있는 레이어를 숨긴다.
src |  The worker explores cultural diversity factors that may be a part of the problem or situation.
mt |  노동자는 문제나 상황의 일부일 수도 있는 문화적 다양성 요소를 탐구한다.
PePe |  사회복지사는 문제나 상황의 일부일 수도 있는 문화적 다양성 요소를 탐구한다.
pe |  사회복지사는 문제나 상황의 일부일 수도 있는 문화적 다양성 요소를 탐구한다.
src | Exemestane is one of the most potent aromatase inhibitors presently available.
mt | exemestane은 현재 사용 가능한 가장 강력한 방향족 억제제 중 하나이다.
PePe | exemestane은 현재 사용 가능한 가장 강력한 aromatase 억제제 중 하나이다.
pe | exemestane은 현재 사용 가능한 가장 강력한 aromatase 억제제 중 하나이다.
src |  You do not want them drunk and lazy.
mt |  너는 그들이 술에 취해서 게을러지는 것을 원하지 않는다.
PePe |  당신은 그들이 술에 취해서 게을러지는 것을 원하지 않는다.
pe |  당신은 그들이 술에 취해서 게을러지는 것을 원하지 않는다.
src | By combining the two outputs without the external phase shift, a sum signal is provided for range tracking.
mt | 외부 위상 이동 없이 두 출력을 결합함으로써 범위 추적을 위한 합계 신호가 제공된다.
PePe | 외부 위상 이동 없이 두 출력을 결합함으로써 거리 추적을 위한 합계 신호가 제공된다.
pe | 외부 위상 이동 없이 두 출력을 결합함으로써 거리 추적을 위한 합계 신호가 제공된다.
src | What are my needs for developing my capacity and potentiality?
mt | 내 능력과 잠재력을 개발하기 위한 나의 필요성은 무엇인가?
PePe | 내 능력과 잠재력을 개발하기 위한 나의 needs는 무엇인가?
pe | 내 능력과 잠재력을 개발하기 위한 나의 needs는 무엇인가?
Table 8: PePe changes the words that are not suitable for personal style but
are grammatically correct to other candidates, such as synonyms and loanwords.
Politeness (en$\rightarrow$ko)
---
src | Spend some time looking over the meeting agenda in advance and think about some of the key topics.
mt | 회의 안건을 미리 살펴보고 몇 가지 주요 주제에 대해 생각해 보십시오.
PePe | 회의 안건을 미리 살펴보고 몇 가지 주요 주제에 대해 생각해 보라.
pe | 회의 안건을 미리 살펴보고, 몇 가지 주요 주제에 대해 생각해 보라.
src | She wants the assignment.
mt | 그녀는 그 과제를 원한다.
PePe | 그녀는 그 과제를 원합니다.
pe | 그녀는 그 과제를 원합니다.
src |  Watch this video for directions on how to complete the S1 Conversations challenge.
mt | 대화 과제를 완료하는 방법은 이 비디오를 참조하십시오.
PePe | 대화 과제를 완료하는 방법은 이 비디오를 참조하세요.
pe | 대화 과제를 완료하는 방법은 이 비디오를 참조하세요.
src | According to the U.S. Bureau of Census, there are approximately 90 million households in the United States.
mt | 미국 인구조사국에 따르면, 미국에는 약 9천만 가구가 살고 있다고 합니다.
PePe | 미국 인구조사국에 따르면, 미국에는 약 9천만 가구가 살고 있다고 한다.
pe | 미국 인구 조사국에 따르면, 미국에는 약 9천만 가정이 살고 있다고 한다.
src | The store is located inside the Terminal 1.
mt | 그 상점은 터미널 1 안에 있다.
PePe | 지점은 터미널 1 안에 있습니다.
pe | 지점은 터미널 1 내에 있습니다.
src | Maps are also available that show the tract boundaries, making the data readily discernible.
mt | 트랙 경계가 표시된 지도도 사용할 수 있어 데이터를 쉽게 식별할 수 있습니다.
PePe | 트랙 경계가 표시된 지도도 사용할 수 있어 데이터를 쉽게 식별할 수 있다.
pe | 통로 경계를 보여주는지도도 제공되므로 데이터를 쉽게 식별 할 수 있다.
Table 9: PePe controls the level of politeness. The usage of the honorifics
varies from language to language.  Multiple Attributes (en$\rightarrow$ko)
---
src | Our staff will send you back to the airport.
mt |  우리 직원이 너를 공항으로 돌려보낼 것이다.
PePe |  저희 직원이 공항으로 돌려보낼 것입니다.
pe |  저희 직원이 고객님을 공항으로 데려다 줄 것입니다.
src | When the machine receives the data, it automatically reads the crop marks using a sensor, and then starts cutting.
mt |  기계가 데이터를 받으면 자동으로 센서를 이용해 자르기 표시를 읽은 뒤 절단을 시작한다.
PePe |  장비가 데이터를 받으면 자동으로 센서를 이용해 crop mark를 읽은 뒤 커팅을 시작한다.
pe |  장비가 데이터를 받으면 자동으로 센서를 이용해 crop mark를 읽은 뒤 커팅을 시작한다.
src | When transferring major repairs of fixed assets for non-business activities, the following accounts shall be recorded.
mt |  비사업활동용 고정자산의 주요수리를 이전할 때에는 다음 사항을 기재하여야 한다.
PePe |  비영리활동용 고정자산의 주요수리를 이전할 때에는 다음과 같이 회계처리 하여야 한다.
pe |  비영리활동용 고정자산의 주요수리를 이전할 때에는 다음과 같이 회계처리 하여야 한다.
src | The free shuttle bus will come to pick you up around 10 minutes.
mt | 무료 셔틀버스가 약 10분 정도 당신을 데리러 올 것이다.
PePe | 무료 셔틀버스가 약 10분 정도 고객님을 데리러 올 것입니다.
pe | 무료 셔틀버스가 약 10분 정도 고객님을 데리러 올 것입니다.
src | If using 3 crop marks, select 3-point start.
mt | 3개의 자르기 표시를 사용하는 경우 3-point start를 선택하십시오.
PePe | 3개의 crop mark를 사용하는 경우 3-point start를 선택한다.
pe | 3개의 crop mark를 사용하는 경우 3-point start를 선택한다.
src | The following parameters control the display of points-clouds (right).
mt | 다음 매개 변수는 점 구름 (오른쪽) 의 표시를 제어합니다.
PePe | 다음 파라미터는 포인트 클라우드 (오른쪽) 의 표시를 제어합니다.
pe | 다음 파라미터는 포인트 클라우드 (오른쪽) 의 표시를 제어합니다.
Table 10: PePe not only tackles a single attribute but also generates high-
quality sentences with multiple attributes revised. Each attribute is colored
with a corresponding color. Error Correction (ko$\rightarrow$en)
---
src | 그래서 전치사 ‘reo’는 ‘to’와 ‘for’의 의미가 있다.
mt | so the prepositions ‘reo’ have the meaning of ‘to’ and ‘for’.
PePe | so the preposition ‘reo’ has the meaning of ‘to’ and ‘for’.
pe | so the preposition ‘reo’ has the meaning of ‘to’ and ‘for’.
src |  관사 아래에 있는 모음코드가 이렇게 바뀌어진다.
mt | the vowel code under the official building changes like this.
PePe | the vowel code under the article changes like this.
pe | the vowel code under the article changes like this.
src |  professor gasser는 단일한 관리통제 기구보다 상업적 차원, 정부 차원 등 다차원적 모델의 시도를 결합하는 노력이
| 필요하다고 지적한다.
mt | the processor gasser points out that efforts need to be made to combine attempts by multi-dimensional models such as
| commercial and government levels rather than single management and control
organizations.
PePe | the professor gasser points out that efforts need to be made to combine attempts by multi-dimensional models such as
| commercial and government levels rather than single management and control
organizations.
pe | the professor gasser points out that efforts need to be made to combine attempts by multi-dimensional models such as
| commercial and government levels rather than single management and control
organizations.
src | ‘dagesh’가 놓일 수 없다.
mt | ‘dagesh’ can’t be let go.
PePe | ‘dagesh’ can’t be placed.
pe | ‘dagesh’ can’t be placed.
Table 11: PePe generates post-edited sentences that corrects the grammar
errors from the machine-translated outputs. Word Choice (ko$\rightarrow$en)
---
src | 내부배선의 색상은 아래와 같이 구분하여 사용하여야 한다.
mt | the colour of the inner wiring shall be used separately as follows.
PePe | the color of the inner wiring shall be used separately as follows.
pe | the color of the inner wiring shall be used separately as follows.
src | 추정 공시가격이 올해 거래된 urgent sale price를 앞서고 있다.
mt | the estimated official price is ahead of the current sales price traded this year.
PePe | the estimated official price is ahead of the urgent sale price traded this year.
pe | the estimated official price is ahead of the urgent sales price traded this year.
src | 12월 싱가폴,말레이시아지역 패키지 상품 판매 확대
mt | expanding sales of package products in singapore and malaysia in december.
PePe | expanding sales of pkg products in singapore and malaysia in december.
pe | expanding sales of pkg products in singapore and malaysia in december.
src | 한해 전에 쓰고 남은 돈이 1억2천만원 정도였다.
mt | the remaining money was about 120 million won a year ago.
PePe | the remaining money was about krw 120 million a year ago.
pe | the remaining money was about krw 120 million a year ago.
Table 12: PePe changes the words that are not suitable for personal style but
are grammatically correct to other candidates, such as synonyms and loanwords.