Singh*1,2 Pandey1 Yadava2 ]1Aryabhatta Research Institute of observational
sciencES, Manora Peak, Nainital, 263001, India
2Deen Dayal Upadhyaya Gorakhpur University, Gorakhpur, 273009, India
<EMAIL_ADDRESS>
# Coronal modulation in the ultra-fast rotator LO Peg

Gurpreet  Jeewan Chandra  Umesh  [

###### Abstract

We present coronal imaging of the ultra-fast rotator, LO Peg, using the X-ray
observations from XMM-Newton. The X-ray light curves show one strong flare at
the end of observation, as reported in an earlier study. On removal of flaring
events, the quiescent state light curve shows rotational modulations, which
are modelled using a maximum likelihood model. The results obtained from
modelling show the corona of LO Peg is not uniform. Active regions are
concentrated around two longitudes, where one active region appears to be
compact. The large coronal area that covers almost 60 degrees along longitude
from the poles to the equator does not consist of active regions.

###### keywords:

Stellar activity  — Stellar Coronae  — X-ray star  — X-ray astronomy — Stellar
imaging

##  1 Introduction

The light curves of late-type active stars exhibit a wide range of temporal
variability across the electromagnetic spectrum, spanning from minutes to
decades. This variability can be categorized into short-term variability (STV)
and long-term variability (LTV), which are manifestations of different
magnetic activities. STV, lasting from a few minutes to a few days, is
primarily attributed to flaring activity and rotational modulation caused by
inhomogeneities in the corona. Extensive studies and modelling of STVs due to
flares have been conducted, shedding light on the extreme physical conditions
of solar-type stars (e.g. Haisch et al., 1991; Reale, 2007; Pandey and Singh,
2008, 2012). Several techniques have been employed to extract information from
periodic STVs resulting from rotational modulations of active regions in
stellar atmospheres. These include Doppler imaging using X-ray data
(Brickhouse et al., 2001), extrapolation of surface magnetic maps (Hussain et
al., 2007; Johnstone et al., 2010; Cohen et al., 2010, etc), and light curve
inversion techniques (Siarkowski, 1992; Siarkowski et al., 1996; Drake et al.,
2014; Singh and Pandey, 2022). However, each technique has its limitations.
Doppler imaging of X-ray data requires high-spectral resolution, often
unavailable due to instrumental and observing constraints. Inferring coronal
structures based on magnetic surface maps necessitates simultaneous
observations in optical and X-ray bands. Light-curve inversion techniques
(LCITs) pose a mathematically ill-posed problem, extracting 3-D information
from 1-D time-series data. Despite these challenges and reasonable inputs, the
LCITs have gained popularity due to the increasing availability of time-series
data. This paper presents the results obtained by an X-ray LCIT for an ultra-
fast rotator (UFR) LO Peg. LO Peg is a K5-8V type UFR with a rotation period
of 0.423 d (Karmakar et al., 2016). The active nature of LO Peg in optical and
X-ray bands has been studied in detail in the past (e.g. Jetsu et al., 1994;
Eibe et al., 1999; Pandey et al., 2005, 2009; Karmakar et al., 2016). The
Doppler imaging of LO Peg has shown high-latitude spots (Lister et al., 1999;
Piluso et al., 2008). Based on long-term optical data, Karmakar et al. (2016)
has shown an excess of X-ray emission in spotted regions where the spotted
regions can cover the stellar surface from 9 to 26%. They have also found
evidence of the presence of the flip-flop-like phenomenon. We organise our
paper as follows: Section 2 shows observations and data reduction, and Section
3 presents the analysis and results. The coronal imaging method is described
in Section 4, and application to this method is shown in Section 5. We
conclude in Section 6 with the key findings from this research.

##  2 Observations and data reduction

The XMM-Newton observatory observed LO Peg for 42 ks on 30 November 2014. XMM-
Newton is equipped with three X-ray telescopes featuring five detectors: 2 MOS
(Turner et al., 2001), 1 PN (Strüder et al., 2001), and 2 RGS (den Herder et
al., 2001). These detectors cover an energy range of 0.15–15 keV. In addition
to the X-ray detectors, XMM-Newton also includes an optical monitor payload
(OM; Mason et al., 2001), enabling simultaneous observations in the UV and
optical bands. The raw data obtained from the observation was processed using
the Science Analysis System (SAS) v18.0.0 software
(https://www.cosmos.esa.int/web/xmm-newton/sas). Standard procedures provided
by the software were applied to generate the science products. The source
light curves were created by considering the X-ray counts within a circular
region of radius 42". Similarly, background light curves were generated from
source-free regions in the same CCD, utilizing an extracted area similar to
the source. Subsequently, the background subtraction and detector response
effects were corrected using the epiclccorr task.

Figure 1: EPIC-PN X-ray light curve of LO Peg with a time bin size of 300 sec.
Panel (A) shows an X-ray light curve in 0.3–10.0 keV, with panels (B) and (C)
showing soft (0.3–2.0 keV) and hard (2.0-10.0 keV) bands. The lowermost panel
(D) shows the hardness ratio (HR). The blue-shaded regions correspond to
flaring episodes.

##  3 Analysis and results

The background corrected light curves for LO Peg are shown in Figure 1 in
three energy bands, namely a broad band which covers 0.3-10.0 keV energy
range, a soft band with an energy band of 0.3-2.0 keV, and a hard band
containing photons of energy 2.0-10.0 keV. The light curves in all three bands
show one standard flare-like time profile marked as blue-shaded regions in
Figure 1. This detected flare also shows temperature variations indicated by
the hardness ratio (HR) plot and shown in the lowermost panel of Figure 1. The
HR is defined as Hard-Soft/Hard+Soft, where Hard and Soft are count rates in
2.0-10.0 keV and 0.3-2.0 keV energy bands, respectively. From the HR plot, the
mean value of HR $\sim$ -0.9 indicates that LO Peg’s corona is predominantly
populated by low-energy photons with energy less than 2 keV. The ratio of
median values of soft counts and total band counts shows that photons with
energy less than 2 keV contribute 96% of the total band energy spectrum. Thus,
the quiescent corona of LO Peg predominantly consists of plasma with a
temperature of less than 2 keV. If we exclude the flaring part from the light
curve, the quiescent state light curve appears variable in the time scale of
its rotation period. Therefore, we have phase-folded the quiescent light curve
to check for the rotationally modulated signal with ephemeris given by Dal and
Tas (2003) with the rotational period obtained by Karmakar et al. (2016). The
phase folded light curve is shown in Figure 2 (a), and rotational modulation
was found to be present with an amplitude of >20% about the mean value.
Estimating rotational modulation from a single rotation period is prone to
small-scale fluctuations. However, it is essential to note that the rotational
modulation for the same observation was previously reported by Lalitha et al.
(2017). Additionally, to mitigate the influence of short-term stochastic
variability in the folded light curve, we have phase-folded the light curve
into 30 bins, corresponding to a 1.22 ks time interval. This process allows
for averaging stochastic variability caused by micro- and nano-flares,
emphasising only the large-scale variations. The phase-folded quiescent light
curve was modelled using a maximum likelihood algorithm, which is discussed
briefly as follows.

##  4 Coronal imaging: Model

We have assumed that the coronal plasma is optically thin and rotates rigidly,
and the variability seen in quiescent emission is mainly due to the active
regions in the corona, which are being eclipsed by the cylindrical shadow cast
by the stellar photosphere during observation. Further, we divide the volume
around the star into a total of $B$ cubical boxes, each associated with an
emission density $f$. The boxes around the star are distributed up to a height
$h$ above the stellar photosphere. The number of photons emitted by a cubical
box ($b$) follows a Poisson distribution with a mean value of $f(b)$, which is
given as

$P(n(b)=k)=e^{-f(b)}\frac{f(b)^{k}}{k!}\quad;k=0,1,2,...$

We aim to find each box’s $f(b)$. For instance, there are ’N’ observations
during one rotational phase, and then different parts of the star become
visible with the progressing rotational phase. As the plasma is assumed to be
optically thin at any given phase value $(\phi)$, the total emission can be
calculated by adding all the visible cubical boxes. To calculate which box is
visible at any given phase, we assume that the only occulter to the corona is
the stellar photosphere, which casts a cylindrical shadow on the corona. We
calculate an occultation matrix $M(b,\phi)$ consisting of weights assigned to
each box equal to 1 if visible and 0 if occulted. So, the total emission at
any given phase is given by

$F(\phi)=\sum_{b}f(b)M(b,\phi)db$

Due to the inclination angle of the star, some boxes are never seen during the
whole observation, and some boxes are always visible. The boxes not seen
should be excluded from the solution grid as they do not contribute to any of
the variability seen in the light curves if we assume the emission from each
box is stable during the observation. The conditional probability of observing
counts $F_{o}(\phi_{i})$ at phase $\phi_{i}$ with known emissions in each box
$f(b)$ and occultation matrix $M(b,\phi_{i})$ can be written as

$P_{i}(F_{o}(\phi_{i})|f,M(\phi_{i}))=e^{-\lambda}\frac{\lambda^{F_{o}(\phi_{i})}}{F_{o}(\phi_{i})!};\quad\lambda=\sum_{b}f(b)M(b,\phi_{i})db$

The log-likelihood function can be written as

$log(L)=\sum_{i}log(P_{i})=\sum_{i}-\lambda+F_{o}(\phi_{i})log(\lambda)-log(\Gamma(F_{o}(\phi_{i})+1))\quad\quad...(1)$

Figure 2:  Results from coronal imaging of LO Peg. (a) Observed and the best
fit modelled X-ray light curves, (b) $\Delta log(L)$ vs iteration showing
likelihood is strictly increasing in each iteration, and (c) Projected coronal
image of LO Peg. Here, the colour bar shows emission values at each latitude
and longitude. The black-shaded regions correspond to latitudes which do not
contribute to rotational modulation.

We now describe an iterative scheme that maximises the above-said setup’s
likelihood.

$f^{n+1}(b)=f^{n}(b)\frac{\sum_{i}\frac{F_{o}(\phi_{i})}{\sum_{b}f^{n}(b)M(b,\phi)db}M(b,\phi_{i})}{\sum_{i}M(b,\phi_{i})}\quad\quad...(2)$

The above equation updates the old estimate for emission in box $b$ by
considering the previous value of $f$ at point $b$, scaling it based on the
ratio of $F_{o}(\phi_{i})$ to the weighted average of $F_{o}$ for the all $b$
boxes, and then normalising it by the sum of the weighting function $M$ for
all phases $\phi_{i}$.

##  5 Coronal imaging of LO Peg

For the current solution, we have used a resolution of
0.05$\times$0.05$\times$0.05$R_{\odot}$, with an inclination angle fixed to
45∘ and radius of 0.72$R_{\odot}$ for LO Peg (Pandey et al., 2005) with
coronal height upto 1 $R_{*}$. We start with a uniform emission in each box
for the first iteration step, which is then updated according to equation (2).
At each iteration step, we also calculate the log-likelihood as per equation
(1). The iteration was stopped when observed, and modelled count rates were
fitted well as per the standard $\chi^{2}$ scheme. The coronal image and
modelled light curves are shown in Figure 2. In the same Figure, we plot the
log-likelihood function’s positive difference, showing that each iteration
strictly increases the likelihood. From Figure 2 (c), the corona of LO Peg
shows active regions are not uniformly distributed across the corona. Active
regions are located between the longitudes -120∘ to +120∘ with brighter active
regions around +60∘. Around -90 to -60∘ longitude, the corona has a fainter
active region. Similar longitudinal distribution in the photosphere is also
reported for LO Peg during the year 2014-2015 (Savanov et al., 2016). Active
regions appear to be absent around the longitudes +120∘ to +180∘, which may be
an indication of a coronal hole.

##  6 Conclusions

We have found that the quiescent emission of LO Peg is not constant but shows
rotational modulation with an amplitude of >20% about the mean value. This
modulation is modelled by a maximum-likelihood method, revealing that the
corona of LO Peg is not uniform but is concentrated towards two longitudes.
Active regions are concentrated in the two different longitudes.

###### Acknowledgements.

This work is based on observations obtained with XMM-Newton, an ESA science
mission with instruments and contributions directly funded by ESA Member
States and NASA.

0009-0002-6580-3931GurpreetSingh 0000-0002-4331-1867Jeewan C.Pandey All
authors contributed significantly to the work presented in this paper. The
authors declare no conflict of interest.

## References

  * Brickhouse et al. (2001) Brickhouse, N. S., Dupree, A. K. and Young, P. R. (2001) X-Ray Doppler Imaging of 44i Bootis with Chandra.  ApJ, 562(1), L75–L78.  https://doi.org/10.1086/338121.
  * Cohen et al. (2010) Cohen, O., Drake, J. J., Kashyap, V. L., Hussain, G. A. J. and Gombosi, T. I. (2010) The Coronal Structure of AB Doradus.  ApJ, 721(1), 80–89.  https://doi.org/10.1088/0004-637X/721/1/80.
  * Dal and Tas (2003) Dal, H. A. and Tas, G. (2003) New Photoelectric Photometry of the Young Star LO Pegasi.  IBVS, 5390, 1.
  * den Herder et al. (2001) den Herder, J. W., Brinkman, A. C., Kahn, S. M., Branduardi-Raymont, G., Thomsen, K., Aarts, H., Audard, M., Bixler, J. V., den Boggende, A. J., Cottam, J., Decker, T., Dubbeldam, L., Erd, C., Goulooze, H., Güdel, M., Guttridge, P., Hailey, C. J., Janabi, K. A., Kaastra, J. S., de Korte, P. A. J., van Leeuwen, B. J., Mauche, C., McCalden, A. J., Mewe, R., Naber, A., Paerels, F. B., Peterson, J. R., Rasmussen, A. P., Rees, K., Sakelliou, I., Sako, M., Spodek, J., Stern, M., Tamura, T., Tandy, J., de Vries, C. P., Welch, S. and Zehnder, A. (2001) The Reflection Grating Spectrometer on board XMM-Newton.  A&A, 365, L7–L17.  https://doi.org/10.1051/0004-6361:20000058.
  * Drake et al. (2014) Drake, J. J., Ratzlaff, P., Kashyap, V., Huenemoerder, D. P., Wargelin, B. J. and Pease, D. O. (2014) A 33 Yr Constancy of the X-Ray Coronae of AR Lac and Eclipse Diagnosis of Scale Height.  ApJ, 783(1), 2.  https://doi.org/10.1088/0004-637X/783/1/2.
  * Eibe et al. (1999) Eibe, M. T., Byrne, P. B., Jeffries, R. D. and Gunn, A. G. (1999) Evidence for large-scale, global mass inflow and flaring on the late-type fast rotator BD+22 deg 4409.  A&A, 341, 527–538.
  * Haisch et al. (1991) Haisch, B., Strong, K. T. and Rodono, M. (1991) Flares on the Sun and other stars.  ARA&A, 29, 275–324.  https://doi.org/10.1146/annurev.aa.29.090191.001423.
  * Hussain et al. (2007) Hussain, G. A. J., Jardine, M., Donati, J. F., Brickhouse, N. S., Dunstone, N. J., Wood, K., Dupree, A. K., Collier Cameron, A. and Favata, F. (2007) The coronal structure of AB Doradus determined from contemporaneous Doppler imaging and X-ray spectroscopy.  MNRAS, 377(4), 1488–1502.  https://doi.org/10.1111/j.1365-2966.2007.11692.x.
  * Jetsu et al. (1994) Jetsu, L., Tuominen, I., Grankin, K. N., Mel’Nikov, S. Y. and Schevchenko, V. S. (1994) New “flip-flop” of FK Comae Berenices.  A&A, 282, L9–L12.
  * Johnstone et al. (2010) Johnstone, C., Jardine, M. and Mackay, D. H. (2010) Modelling stellar coronae from surface magnetograms: the role of missing magnetic flux.  MNRAS, 404(1), 101–109.  https://doi.org/10.1111/j.1365-2966.2010.16298.x.
  * Karmakar et al. (2016) Karmakar, S., Pandey, J. C., Savanov, I. S., Taş, G., Pandey, S. B., Misra, K., Joshi, S., Dmitrienko, E. S., Sakamoto, T., Gehrels, N. and Okajima, T. (2016) LO Peg: surface differential rotation, flares, and spot-topographic evolution.  MNRAS, 459(3), 3112–3129.  https://doi.org/10.1093/mnras/stw855.
  * Lalitha et al. (2017) Lalitha, S., Schmitt, J. H. M. M. and Singh, K. P. (2017) Structure and variability in the corona of the ultrafast rotator LO Pegasi.  A&A, 602, A26.  https://doi.org/10.1051/0004-6361/201629482.
  * Lister et al. (1999) Lister, T. A., Collier Cameron, A. and Bartus, J. (1999) Doppler imaging of BD+22 deg4409 (LO Peg) using least-squares deconvolution.  MNRAS, 307(3), 685–694.  https://doi.org/10.1046/j.1365-8711.1999.02662.x.
  * Mason et al. (2001) Mason, K. O., Breeveld, A., Much, R., Carter, M., Cordova, F. A., Cropper, M. S., Fordham, J., Huckle, H., Ho, C., Kawakami, H., Kennea, J., Kennedy, T., Mittaz, J., Pandel, D., Priedhorsky, W. C., Sasseen, T., Shirey, R., Smith, P. and Vreux, J. M. (2001) The XMM-Newton optical/UV monitor telescope.  A&A, 365, L36–L44.  https://doi.org/10.1051/0004-6361:20000044.
  * Pandey et al. (2009) Pandey, J. C., Medhi, B. J., Sagar, R. and Pandey, A. K. (2009) LO Pegasi: an investigation of multiband optical polarization.  MNRAS, 396(2), 1004–1011.  https://doi.org/10.1111/j.1365-2966.2009.14762.x.
  * Pandey and Singh (2008) Pandey, J. C. and Singh, K. P. (2008) A study of X-ray flares - I. Active late-type dwarfs.  MNRAS, 387(4), 1627–1648.  https://doi.org/10.1111/j.1365-2966.2008.13342.x.
  * Pandey and Singh (2012) Pandey, J. C. and Singh, K. P. (2012) A study of X-ray flares - II. RS CVn-type binaries.  MNRAS, 419(2), 1219–1237.  https://doi.org/10.1111/j.1365-2966.2011.19776.x.
  * Pandey et al. (2005) Pandey, J. C., Singh, K. P., Drake, S. A. and Sagar, R. (2005) Optical and X-Ray Studies of Chromospherically Active Stars: FR Cancri, HD 95559, and LO Pegasi.  AJ, 130(3), 1231–1246.  https://doi.org/10.1086/432539.
  * Piluso et al. (2008) Piluso, N., Lanza, A. F., Pagano, I., Lanzafame, A. C. and Donati, J. F. (2008) Doppler imaging of the young late-type star LO Pegasi (BD+22°4409) in 2003 September.  MNRAS, 387(1), 237–246.  https://doi.org/10.1111/j.1365-2966.2008.13153.x.
  * Reale (2007) Reale, F. (2007) Diagnostics of stellar flares from X-ray observations: from the decay to the rise phase.  A&A, 471(1), 271–279.  https://doi.org/10.1051/0004-6361:20077223.
  * Savanov et al. (2016) Savanov, I. S., Puzin, V. I., Dmitrienko, E. S., Karpov, S. V., Beskin, G. M., Biryukov, A. V., Bondar, S. F., Ivano, E. A., Katkova, E. V., Orekhova, N., Perkov, A. V., Sasyuk, V. V., Romanyuk, I. I., Semenko, E. A., Kudryavtsev, D., Karmakar, S., Pandey, J. C., Pandey, S. B., Joshi, S. and Misra, K. (2016) Photometric Observations of LO Peg in 2014-2015.  AcA, 66(3), 381–390.
  * Siarkowski (1992) Siarkowski, M. (1992) Three-dimensional deconvolution of X-ray emission from AR Lac.  MNRAS, 259, 453–456.  https://doi.org/10.1093/mnras/259.3.453.
  * Siarkowski et al. (1996) Siarkowski, M., Pres, P., Drake, S. A., White, N. E. and Singh, K. P. (1996) Corona(e) of AR Lacertae. II. The Spatial Structure.  ApJ, 473, 470.  https://doi.org/10.1086/178159.
  * Singh and Pandey (2022) Singh, G. and Pandey, J. C. (2022) An X-Ray Study of Coronally Connected Active Eclipsing Binaries.  ApJ, 934(1), 20.  https://doi.org/10.3847/1538-4357/ac7716.
  * Strüder et al. (2001) Strüder, L., Briel, U., Dennerl, K., Hartmann, R., Kendziorra, E., Meidinger, N., Pfeffermann, E., Reppin, C., Aschenbach, B., Bornemann, W., Bräuninger, H., Burkert, W., Elender, M., Freyberg, M., Haberl, F., Hartner, G., Heuschmann, F., Hippmann, H., Kastelic, E., Kemmer, S., Kettenring, G., Kink, W., Krause, N., Müller, S., Oppitz, A., Pietsch, W., Popp, M., Predehl, P., Read, A., Stephan, K. H., Stötter, D., Trümper, J., Holl, P., Kemmer, J., Soltau, H., Stötter, R., Weber, U., Weichert, U., von Zanthier, C., Carathanassis, D., Lutz, G., Richter, R. H., Solc, P., Böttcher, H., Kuster, M., Staubert, R., Abbey, A., Holland, A., Turner, M., Balasini, M., Bignami, G. F., La Palombara, N., Villa, G., Buttler, W., Gianini, F., Lainé, R., Lumb, D. and Dhez, P. (2001) The European Photon Imaging Camera on XMM-Newton: The pn-CCD camera.  A&A, 365, L18–L26.  https://doi.org/10.1051/0004-6361:20000066.
  * Turner et al. (2001) Turner, M. J. L., Abbey, A., Arnaud, M., Balasini, M., Barbera, M., Belsole, E., Bennie, P. J., Bernard, J. P., Bignami, G. F., Boer, M., Briel, U., Butler, I., Cara, C., Chabaud, C., Cole, R., Collura, A., Conte, M., Cros, A., Denby, M., Dhez, P., Di Coco, G., Dowson, J., Ferrando, P., Ghizzardi, S., Gianotti, F., Goodall, C. V., Gretton, L., Griffiths, R. G., Hainaut, O., Hochedez, J. F., Holland, A. D., Jourdain, E., Kendziorra, E., Lagostina, A., Laine, R., La Palombara, N., Lortholary, M., Lumb, D., Marty, P., Molendi, S., Pigot, C., Poindron, E., Pounds, K. A., Reeves, J. N., Reppin, C., Rothenflug, R., Salvetat, P., Sauvageot, J. L., Schmitt, D., Sembay, S., Short, A. D. T., Spragg, J., Stephen, J., Strüder, L., Tiengo, A., Trifoglio, M., Trümper, J., Vercellone, S., Vigroux, L., Villa, G., Ward, M. J., Whitehead, S. and Zonca, E. (2001) The European Photon Imaging Camera on XMM-Newton: The MOS cameras.  A&A, 365, L27–L35.  https://doi.org/10.1051/0004-6361:20000087.


# Sentiment and Sarcasm Classification with Multitask Learning

Navonil Majumder
Instituto Politécnico Nacional
Soujanya Poria
Nanyang Technological University
Haiyun Peng
Nanyang Technological University
Niyati Chhaya
Adobe Research
Erik Cambria
Nanyang Technological University
Alexander Gelbukh
Instituto Politécnico Nacional
Editor:
Erik Cambria
Nanyang Technological University

AFFECTIVE COMPUTING AND SENTIMENT ANALYSISIEEE INTELLIGENT SYSTEMSDEPARTMENT

Sentiment classification and sarcasm detection are both important natural
language processing (NLP) tasks. Sentiment is always coupled with sarcasm
where intensive emotion is expressed. Nevertheless, most literature considers
them as two separate tasks. We argue that knowledge in sarcasm detection can
also be beneficial to sentiment classification and vice versa. We show that
these two tasks are correlated, and present a multi-task learning-based
framework using a deep neural network that models this correlation to improve
the performance of both tasks in a multi-task learning setting. Our method
outperforms the state of the art by 3–4% in the benchmark dataset.

The surge of Internet has enabled large-scale text-based opinion sharing on a
wide range of topics. This has led to the opportunity of mining user sentiment
on various subjects from the data publicly available over the Internet. The
most important task in the analysis of users’ opinions is sentiment
classification: determining whether a given text, such as a user review,
comment, or tweet, carries positive or negative polarity.

When expressing their opinions, users often use sarcasm for emphasizing their
sentiment. In a sarcastic text, the sentiment intended by the author is the
opposite of its literal meaning. For example, the sentence “ _Thank you alarm
for never going off_ ” is literally positive (“ _Thank you_ ”), however, the
intended sentiment is negative “ _alarm never going off_.” Unless this
sentiment shift is detected with semantics, the classifier may fail to spot
sarcasm.

Currently, most researchers focus on either sentiment classification or
sarcasm detection,1, 2 without considering the possibility of mutual influence
between the two tasks. However, one can observe that the two tasks are
correlated: people often use sarcasm as a device for the expression of
emphatic negative sentiment. This observation can lead to a simple way in
which one of the two tasks can help improve the other, i.e., if an expression
can be detected as sarcastic, its sentiment can be assumed negative; if the
expression can be classified as positive, then it can be assumed not
sarcastic.

Here, we show that while this logic does lead to a slight improvement, there
is a better way of combining the two tasks. Namely, in this paper, we train a
classifier for both sarcasm and sentiment in a single neural network using
multi-task learning, a novel learning scheme that has gained recent
popularity3, 4. We empirically show that this method outperforms the results
obtained with two separate classifiers and, in particular, outperforms the
current state of the art by Mishra et al.5

The remainder of the paper is organized as follows: Section 1 outlines related
work; Section 2 presents our approach; Section 3 lists the baselines; Section
4 discusses results; finally, Section 5 concludes the paper.

##  1 Related Work

Machine learning methods and deep neural networks, such as convolutional,
recursive, recurrent, and memory networks, have shown good performance for
sentiment detection.6, 7, 8, 9 Knowledge-based methods explore syntactic
patterns10 and employ sentiment resources.11 However, sarcasm detection
currently focuses on extracting features, such as syntactic,12 surface
pattern-based,13 or personality-based features,1 as well as contextual
incongruity.2

Mishra et al.5 extracted multimodal cognitive features for both sentiment
classification and sarcasm detection, without modeling the two tasks in a
single system. However, recently multi-task learning has been successfully
applied in many NLP tasks, such as implicit discourse relationship
identification4 and key-phrase boundary classification.3 In this paper, we
apply it to sentiment classification and sarcasm detection.

##  2 Method

According to Riloff et al.,14 most sarcastic sentences carry negative
sentiment. We leverage this to improve both sentiment classification and
sarcasm detection. We use multi-task learning, where a single neural network
is used to perform more than one classification task (in our case, sentiment
classification and sarcasm detection). This network facilitates synergy
between the two tasks, resulting in improved performance on both tasks in
comparison with their standalone counterparts.

Figure 1: Our multi-task architecture.

### Task Definition

We solve two tasks with a single network. Given a sentence
$[w_{1},w_{2},\dots,w_{l}]$, where $w_{i}$ are words, we assign it both a
sentiment tag (positive / negative) and a sarcasm tag (yes / no).

### Input Representation

We use $D_{g}$-dimensional ($D_{g}=300$) Glove word-embeddings
$x_{i}\in\mathbb{R}^{D_{g}}$ to represent the words $w_{i}$, padding the
variable-length input sentences to a fixed length with null vectors. Thus, the
input is represented as a matrix $X=[x_{1},x_{2},\dots,x_{L}]$, where $L$ is
the length of the longest sentence.

### Sentence Representation

In the next layers, we obtain sentence representation from $X$ using gated
recurrent unit (GRU) with attention mechanism as explained below.

### Sentence-level word representation

The sentence $X$ is fed to a GRU of size $D_{gru}=500$ with parameters
$W^{[z,r,h]}\in\mathbb{R}^{D_{g}\times D_{gru}}$ and
$U^{[z,r,h]}\in\mathbb{R}^{D_{gru}\times D_{gru}}$ to get context-rich
sentence-level word representations $H=[h_{1},h_{2},\cdots,h_{L}]$,
$h_{t}\in\mathbb{R}^{D_{gru}}$ at the hidden output of the GRU.

We use $H$ for both sarcasm and sentiment. Thus, $H$ is transformed to
$H_{sar}$ and $H_{sen}$ using two different fully-connected layers of size
$D_{t}=300$ in order to accommodate two different tasks, sarcasm detection and
sentiment classification:

$\displaystyle H_{sar}$ $\displaystyle=ReLU(HW_{sar}+b_{sar}),$ $\displaystyle
H_{sen}$ $\displaystyle=ReLU(HW_{sen}+b_{sen}),$

where $W_{[sar,sen]}\in\mathbb{R}^{D_{dru}\times D_{t}}$ and
$b_{[sar,sen]}\in\mathbb{R}^{D_{t}}$.

### Attention network

Word representations in $H_{*}$ are encoded with task-specific sentence-level
context. To aggregate these context-rich representations into the sentence
representation $s_{*}$, we use attention mechanism, due to its ability to
prioritize words relevant for the classification:

$\displaystyle P$ $\displaystyle=\tanh(H_{*}W^{ATT}),$ (1)
$\displaystyle\alpha$ $\displaystyle=softmax(P^{T}W^{\alpha}),$ (2)
$\displaystyle s_{*}$ $\displaystyle=\alpha H_{*}^{T},$ (3)

where $W^{ATT}\in\mathbb{R}^{D_{t}\times 1}$,
$W^{\alpha}\in\mathbb{R}^{L\times L}$, $P\in\mathbb{R}^{L\times 1}$, and
$s_{*}\in\mathbb{R}^{D_{t}}$. In Eq. 2, $\alpha\in[0,1]^{L}$ gives the
relevance of words for the task, multiplied in Eq. 3 by the context-aware word
representations in $H_{*}$.

### Inter-Task Communication

We use neural tensor network (NTN) of size $D_{ntn}=100$ to fuse sarcasm- and
sentiment-specific sentence representations, $s_{sar}$ and $s_{sen}$, to
obtain the fused representation $s_{+}$, where

$\displaystyle\\!\\!s_{+}=\tanh(s_{sar}T^{[1:D_{ntn}]}s_{sen}^{T}+(s_{sar}\oplus
s_{sen})W+b),$

where $T\in\mathbb{R}^{D_{ntn}\times D_{t}\times D_{t}}$,
$W\in\mathbb{R}^{2D_{t}\times D_{ntn}}$, $b,s_{+}\in\mathbb{R}^{D_{ntn}}$, and
$\oplus$ stands for concatenation. The vector $s_{+}$ contains information
relevant to both sentiment and sarcasm. Instead of NTN, we also tried
attention and concatenation for fusion, which resulted in inferior performance
(Section 4).

### Classification

For the two tasks, we use two different softmax layers for classifications.

### Sentiment classification

We use only $s_{sen}$ as sentence representation for sentiment classification,
since we observe best performance without $s_{+}$. We apply softmax layer of
size $C$ ($C=2$ for binary task) on $s_{sen}$ for classification as follows:

$\displaystyle\mathcal{P}_{sen}$
$\displaystyle=\text{softmax}(s_{sen}~{}W_{sen}^{softmax}+b_{sen}^{softmax}),$
$\displaystyle\hat{y}_{sen}$
$\displaystyle=\underset{j}{\text{argmax}}(\mathcal{P}_{sen}[j]),$

where $W_{sen}^{softmax}\in\mathbb{R}^{D_{t}\times C}$,
$b_{sen}^{softmax}\in\mathbb{R}^{C}$, $\mathcal{P}_{sen}\in\mathbb{R}^{C}$,
$j$ is the class value (0 for negative and 1 for positive), and
$\hat{y}_{sen}$ is the estimated class value.

### Sarcasm classification

We use $s_{sar}\oplus s_{+}$ as sentence representation for sarcasm
classification using softmax layer with size $C$ ($C=2$) as follows:

$\displaystyle\\!\\!\mathcal{P}_{sar}$
$\displaystyle=\text{softmax}((s_{sar}\oplus
s_{+})~{}W_{sar}^{softmax}+b_{sar}^{softmax}),$
$\displaystyle\\!\\!\hat{y}_{sar}$
$\displaystyle=\underset{j}{\text{argmax}}(\mathcal{P}_{sar}[j]),$

where $W_{sar}^{softmax}\in\mathbb{R}^{(D_{t}+D_{ntn})\times C}$,
$b_{sar}^{softmax}\in\mathbb{R}^{C}$, $\mathcal{P}_{sar}\in\mathbb{R}^{C}$,
$j$ is the class value (0 for no and 1 for yes), and $\hat{y}_{sar}$ is the
estimated class value.

### Training

We use categorical cross-entropy as the loss function ($J_{*}$; * is $sar$ or
$sen$) for training:

$\displaystyle
J_{*}=-\dfrac{1}{N}\sum_{i=1}^{N}\sum_{j=0}^{C-1}{y^{*}_{ij}~{}\log\mathcal{P}_{*i}[j]},$

where $N$ is the number of samples, $i$ is the index of a sample, $j$ is the
class value, and

$\displaystyle y^{*}_{ij}=\begin{cases}1,\text{ if expected class value of
sample }i\text{ is }j,\\\ 0,\text{ otherwise}.\end{cases}$

For training, we use ADAM,15 an algorithm based on stochastic gradient descent
which optimizes each parameter individually with different and adaptive
learning rates. Also, we minimize both loss functions, namely $J_{sen}$ and
$J_{sar}$, with equal priority, by optimizing the parameter set

$\displaystyle\theta=$
$\displaystyle\\{U^{[z,r,h]},W^{[z,r,h]},W_{*},b_{*},W^{ATT},$ $\displaystyle
W^{\alpha},T,W,b,W^{softmax}_{*},b^{softmax}_{*}\\}.$

##  3 Experiments

### Dataset

The dataset16 consists of 994 samples, each sample containing a text snippet
labeled with sarcasm tag, sentiment tag, and eye-movement data of 7 readers.
We ignored the eye-movement data in our experiments. Of those samples, 383 are
positive and 350 are sarcastic.

### Baselines and Model Variants

We evaluated the following baselines and variations of our model.

### Standalone classifiers

Here, we used

$\displaystyle h_{*}=$ $\displaystyle FCLayer(GRU(X)),$
$\displaystyle\mathcal{P}=$ $\displaystyle SoftmaxLayer(h_{*}),$

where * represents $sar$ or $sen$, $X$ is the input sentence as a list of word
embeddings. We feed $X$ to GRU and pass the final output through a fully-
connected layer ($FCLayer$) to obtain sentence representation $h_{*}$. We
apply final softmax classification ($SoftmaxLayer$) to $h_{*}$.

### Sentiment coerced by sarcasm

In this classifier, the sentences classified as sarcastic are forced to be
considered negative by the sentiment classifier.

### Simple multi-task classifier

The following equations summarize this variant:

$\displaystyle h_{*}=$ $\displaystyle FCLayer_{*}(GRU(X)),$ (4)
$\displaystyle\mathcal{P}_{*}=$ $\displaystyle SoftmaxLayer_{*}(h_{*}),$ (5)

where * represents $sar$ or $sen$. This setting shares the GRU between two
tasks. Final output of GRU is taken as the sentence representation. Sentence
representation is fed to two different task-specific fully-connected layers
($FCLayer_{*}$), giving $h_{*}$. Subsequently, $h_{*}$ are fed to two
different softmax layers $SoftmaxLayer_{*}$ for classification.

### Simple multi-task classifier with fusion

In this variant, we changed Eq. 5 to:

$\displaystyle\mathcal{P}_{sar}=$ $\displaystyle
SoftmaxLayer_{sar}(h_{sar}\oplus F),$ (6) $\displaystyle\mathcal{P}_{sen}=$
$\displaystyle SoftmaxLayer_{sen}(h_{sen}),$ (7)

where $F=NTN(h_{sar},h_{sen})$. Here, $h_{sar}$ and $h_{sem}$ are fed to a NTN
whose output is concatenated with $h_{sar}$ for classification. Sentiment
classification is done with $h_{sen}$ only. We also tried variants with other
methods of fusion (such as fully connected layer or Hadamard product) instead
of NTN, as well as variants with $h_{sen}\oplus F$ instead of, or in addition
to, $h_{sar}\oplus F$, but they did not imprive the results.

### Task-specific GRU with fusion

Here, we used two separate GRUs for the two tasks in Eq. 4:

$\displaystyle h_{*}=$ $\displaystyle FCLayer_{*}(GRU_{*}(X)).$ (8)

We used Eq. 6 and Eq. 7 for $\mathcal{P}_{*}$. Again, we tried concatenating
$F$ with $h_{sen}$, both, or none as in Eq. 5, but this did not improve the
results.

Table 1: Results for various experiments.

Variant | Sentiment | Sarcasm | Average
---|---|---|---
Precision | Recall | F-Score | Precision | Recall | F-Score | F-Score
State of the art5 | 79.89 | 74.86 | 77.30 | 87.42 | 87.03 | 86.97 | 82.13
Standalone classifiers | 79.02 | 78.03 | 78.13 | 89.96 | 89.25 | 89.37 | 83.75
Standalone coerced | 81.57 | 80.06 | 80.38 | – | – | – | –
Multi-Task simple | 80.41 | 79.88 | 79.7 | 89.42 | 89.19 | 89.04 | 84.37
Multi-Task with fusion | 82.32 | 81.71 | 81.53 | 90.94 | 90.74 | 90.67 | 86.10
Multi-Task with fusion and separate GRUs | 80.54 | 80.02 | 79.86 | 91.01 | 90.66 | 90.62 | 85.24
Multi-Task with fusion and shared attention (Section 2) | 83.67 | 83.10 | 83.03 | 90.50 | 90.34 | 90.29 | 86.66

### Best model: shared attention

Here, we added the attention mechanism to the matrix $H_{*}$ in Eq. 4, and
used Eq. 6 and Eq. 7 for $\mathcal{P}_{*}$. This model, described in detail in
Section 2, is the main model we present in this paper since it gave the best
results. We also tried separate GRUs as in Eq. 8, but this did not improve the
results.

##  4 Results and Discussion

The results using 10-fold cross validation are shown in Table 1. As baselines,
we used the standalone sentiment and sarcasm classifiers, as well as the CNN-
based state-of-the-art method by Mishra et al.5 Our standalone GRU-based
sentiment and sarcasm classifiers performed slightly better than the state of
the art, even though this also uses the gaze data present in the dataset but
this is hardly available in any real-life setting. In contrast, our method,
besides improving results, is applied to plain-text documents such as tweets,
without any gaze data.

As expected, the sentiment classifier coerced by sarcasm classifier performed
better than the standalone sentiment classifier. This means that an efficient
sarcasm detector can boost the performance of a sentiment classifier. All our
multi-task classifiers outperformed both standalone classifiers. However, the
margin of improvement for multi-task classifier over the standalone classifier
is greater for sentiment than for sarcasm. Probably this is because sarcasm
detection is a subtask of sentiment analysis.17

Analyzing examples and attention visualization of the multi-task network, we
observed that the multi-task network mainly helps improving sarcasm
classification when there is a strong sentiment shift, which indicates the
possibility of sarcasm in the sentence. The example given in the introduction
was classified incorrectly by the standalone sarcasm classifier but correctly
by the standalone sentiment classifier; coercing one of the classifiers by the
other would not change the result. In the multi-task network, both sentiment
and sarcasm are detected correctly, apparently because the network detected
the sentiment shift in the sentence, which improved sarcasm classification.

Similarly, the sentence “ _Absolutely love when water is spilt on my phone,
just love it_ ” is classified as positive by the standalone sentiment
classifier: “ _Absolutely love_ ” highlighted by the attention scores (not
presented in this short paper). However, the standalone sarcasm classifier
identified it as sarcastic due to “ _water spilt on my phone_ ” (seen from the
attention scores) and in the multi-task network this clue corrected the
sentiment classifier’s output.

Even our standalone GRU-based classifiers outperformed the CNN-based state-of-
the-art method. The multi-task classifiers outperformed the standalone
classifiers because of the shared representation, which serves as additional
regularization for each task from the other task.

Adding NTN fusion to the multi-task classifier further improved results,
giving the best performance for sarcasm detection. Adding an attention network
shared between the tasks further improves the performance for sentiment
classification. As the last column of Table 1 shows, on average the best
results across the two tasks were obtained with the architecture described in
Section 2.

##  5 Conclusion

We presented a classifier architecture that can be trained on sentiment or
sarcasm data and outperforms the state of the art in both cases on the dataset
used by Mishra et al.5 Our architecture uses a GRU-based neural network, while
the state-of-the-art method used a CNN.

Furthermore, we showed that multi-task learning-based methods significantly
outperform standalone sentiment and sarcasm classifiers. This indicates that
sentiment classification and sarcasm detection are related tasks.

Finally, we presented a multi-task learning architecture that gave the best
results, out of a number of variants of the architecture that we tried.

To make our claim more robust, we plan to build a new dataset for rigorous
experimentation. In addition, we intend to incorporate multimodal information
in our network for enhancing its performance.

REFERENCES

## References

  * 1 S. Poria et al., “A Deeper Look into Sarcastic Tweets Using Deep Convolutional Neural Networks,” _COLING_ , 2016, pp. 1601–1612.
  * 2 A. Joshi, V. Sharma, and P. Bhattacharyya, “Harnessing Context Incongruity for Sarcasm Detection.” _ACL_ , 2015, pp. 757–762.
  * 3 I. Augenstein and A. Søgaard, “Multi-Task Learning of Keyphrase Boundary Classification,” _ACL_ , 2017, pp. 341–346.
  * 4 M. Lan et al., “Multi-task Attention-based Neural Networks for Implicit Discourse Relationship Representation and Identification,” _EMNLP_ , 2017, pp. 1299–1308.
  * 5 A. Mishra, K. Dey, and P. Bhattacharyya, “Learning Cognitive Features from Gaze Data for Sentiment and Sarcasm Classification using Convolutional Neural Network,” _ACL_ , 2017, pp. 377–387.
  * 6 A. Zadeh et al., “Multi-attention recurrent network for human communication comprehension,” _AAAI_ , 2018, pp. 5642–5649.
  * 7 N. Majumder et al., “DialogueRNN: An Attentive RNN for Emotion Detection in Conversations,” _AAAI_ , 2019.
  * 8 L. Dong et al., “Adaptive Recursive Neural Network for Target-dependent Twitter Sentiment Classification.” _ACL_ , 2014, pp. 49–54.
  * 9 I. Sutskever, O. Vinyals, and Q. V. Le, “Sequence to sequence learning with neural networks,” _NIPS_ , 2014, pp. 3104–3112.
  * 10 S. Poria et al., “Sentiment data flow analysis by means of dynamic linguistic patterns,” _IEEE Computational Intelligence Magazine_ , vol. 10, no. 4, 2015, pp. 26–36.
  * 11 E. Cambria et al., “SenticNet 5: Discovering conceptual primitives for sentiment analysis by means of context embeddings,” _AAAI_ , 2018, pp. 1795–1802.
  * 12 F. Barbieri, H. Saggion, and F. Ronzano, “Modelling Sarcasm in Twitter, a Novel Approach.” _WASSA@ACL_ , 2014, pp. 50–58.
  * 13 D. Davidov, O. Tsur, and A. Rappoport, “Semi-supervised recognition of sarcastic sentences in Twitter and Amazon,” _CoNLL_ , 2010, pp. 107–116.
  * 14 E. Riloff et al., “Sarcasm as Contrast between a Positive Sentiment and Negative Situation,” _EMNLP_ , 2013, pp. 704–714.
  * 15 D. P. Kingma and J. Ba, “Adam: A Method for Stochastic Optimization,” _CoRR_ , vol. abs/1412.6980, 2014.
  * 16 A. Mishra, D. Kanojia, and P. Bhattacharyya, “Predicting Readers’ Sarcasm Understandability by Modeling Gaze Behavior,” _AAAI_ , 2016, pp. 3747–3753.
  * 17 E. Cambria et al., “Sentiment Analysis is a Big Suitcase,” _IEEE Intelligent Systems_ , vol. 32, no. 6, 2017, pp. 74–80.

ABOUT THE AUTHORS

Navonil Majumder is a PhD Student at Instituto Politécnico Nacional, Mexico.
His research interests include natural language processing, machine learning,
neural networks and deep learning. Contact him at<EMAIL_ADDRESS>
Soujanya Poria is a presidential research fellow at Nanyang Technological
University, Singapore. His research interests lie in sentiment analysis,
multimodal interaction, natural language processing, and affective computing.
Poria received a PhD in Computer Science and Mathematics from University of
Stirling. Contact him at<EMAIL_ADDRESS>
Haiyun Peng is a PhD Student at Nanyang Technological University, Singapore.
His research interests include multilingual sentiment analysis, text
representation learning, dialogue system and deep learning. Contact him at
<EMAIL_ADDRESS>
Niyati Chhaya is a senior research scientist at Adobe Research, India. Her
research interests are in natural language processing and machine learning
with a current research focus on affective content analysis. Chhaya completed
her PhD from the University of Maryland. Contact her at<EMAIL_ADDRESS>
Erik Cambria is an associate professor at Nanyang Technological University,
Singapore. His research interests include natural language understanding,
commonsense reasoning, sentiment analysis, and multimodal interaction. Contact
him at<EMAIL_ADDRESS>
Alexander Gelbukh is a professor at Instituto Politécnico Nacional, Mexico.
His research interests lie in artificial intelligence, computational
linguistics, sentiment and emotion analysis, computational morphology etc.
Gelbukh received a PhD in Computer Science from All-Russian Institute for
Scientific and Technical Information (VINITI). Contact him at
<EMAIL_ADDRESS>