<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>CNN-GRU for Air Quality Index Forecasting</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Van-Tien Nguyen</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Hai-Dang Nguyen</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Minh-Triet Tran</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>John von Neumann Institude</institution>
          ,
          <addr-line>VNU-HCM</addr-line>
          ,
          <country country="VN">Vietnam</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>MediaEval'22: Multimedia Evaluation Workshop</institution>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>University of Science</institution>
          ,
          <addr-line>VNU-HCM</addr-line>
          ,
          <country country="VN">Vietnam</country>
        </aff>
        <aff id="aff3">
          <label>3</label>
          <institution>Vietnam National University</institution>
          ,
          <addr-line>Ho Chi Minh City</addr-line>
          ,
          <country country="VN">Vietnam</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Recently, air pollutant becomes an urgent problem, especially in urban areas; therefore, a system to predict future air properties is demanded to improve the quality of life. By proposing a neural network using weather and air data to perform the Air Quality Index forecasting task, the model shows a reasonable performance instead of traditional regression methods. Moreover, the dependency of the number of input days, and the hour prediction accuracy are also discussed.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
    </sec>
    <sec id="sec-2">
      <title>2. Related Work</title>
      <p>
        In [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], authors use three regression models as feature extractors using preprocessed sensor
data, extract two new features Part-Of-Day (cluster 24 hours of a day into 5 groups) and
Is-RushHour (identify a Part-Of-Day group is rush hour or not), and employ a stack generalization
technique to combine multiple regressions’ results into the final output.
      </p>
      <p>
        In [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], Convolution Neural Network (CNN) [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] is used as a feature extractor. A modified Long
Short-term Memory (LSTM) [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] called ILSTM removes the output gate to improve the hidden
gate and input gate. A CIM gate is introduced to prevent saturation during training.
      </p>
      <p>
        In this work, instead of learning from raw and noisy data, Convolution Neural Network
(CNN) [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] is proposed to learn rich features. By performing 1D convolutions and Rectified
Linear Unit (ReLU) [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], high dimensional features are constructed by linear and non-linear
operations on nearby hour values and other pollutants values. Besides, Gated Recurrent Unit
(GRU) [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] is used as an auto-regression model to avoid the "gradient explosion" and "gradient
vanishing" problems in RNN [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], and reduce the number of parameters in LSTM [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] architecture.
      </p>
    </sec>
    <sec id="sec-3">
      <title>3. Approach</title>
      <sec id="sec-3-1">
        <title>3.1. Data preprocessing</title>
        <p>The sensors are facing many errors during running time. The strategy for data preprocessing
includes three steps. Firstly, handle missing and wrong behavior data records. After that,
resample by hour to calculate the 1-hour-average value, and needed hour-average value for
each pollutant (e.g. 24-hour-average value for PM2.5 and PM10). Then AQI, AQI level, and the
ifnal AQI with the responsible pollutant. The final total dataset is interpolated by 24 hours and
removed invalid records.</p>
      </sec>
      <sec id="sec-3-2">
        <title>3.2. Datasets</title>
        <p>The raw data is crawled from a real-time server. After data preprocessing, subsets of data
(train, validation, and test) are created strategically to optimize the model’s hour-average value
of pollutants. Besides, the target set is constructed for Subtask 1 evaluation metrics, and the
train value set is used for pre-training the model before the train set.</p>
        <p>The target set’s construction is based on the Subtask 1 metric mentioned in Section 3.4. It
aims to use a set of valid records in a diferent number of days starting from ’2022-11-01 00:00:00’
to predict short- (D+1), mid- (D+5), and long-term (D+7) periods respectively. The test set’s
time period is the same as the target set but with a continuous 7-day range to predict. For the
train and validation set, initialization is similar to the test set, but the time period is before
November. The proportion of the train and validation set is 9:1 because of the small number of
valid 7-day periods. For pre-training the model, the train value set contains all record which
has available hour-average value of pollutants for the next 7 days. For explanation, the main
contributor to model performance is the hour-average value of air factors so only these value is
required for the pre-training step.</p>
      </sec>
      <sec id="sec-3-3">
        <title>3.3. Methods</title>
      </sec>
      <sec id="sec-3-4">
        <title>3.4. Metrics</title>
        <p>
          There are two main metrics used for the evaluation of Subtask 1 [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ] for 6 pollutants (PM2.5,
PM10, CO, NO2, SO2, O3): (1) MSE/MAE for the hour-average value of each pollutant. (2)
F1-score for AQI for each pollutant.
        </p>
        <p>The prediction is evaluated in short-, mid- and long-term periods which are 1, 5, and 7 days
in the future respectively.</p>
        <p>For training hour-average values, the only used metric is MSE.</p>
      </sec>
      <sec id="sec-3-5">
        <title>3.5. Model architecture</title>
        <p>There are 3 main components in the architecture: a feature extractor, a recurrent neural
network, and an AQI calculator (Figure 1).</p>
        <p>
          Feature extractor: A convolution neural network [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ] includes 4 layers using 1-D filters to
learn the relative hour-average value from raw hour-average values. The BatchNorm and ReLU
layers are used after each 1D convolution.
        </p>
        <p>
          Autoregressive model: Gated recurrent unit [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ] is used to handle the time-series features
from extractor. The input and output of GRU represent 24-hour features. Each output feature is
re-weighted by a 24x24 matrice, then feed into the GRU model until 7-day output features are
generated.
        </p>
        <p>To achieve the pollutants’ value, each 24-hour feature which is the output of the GRU is
transformed into the value vector representing the hour-value of pollutants.</p>
        <p>AQI calculator use the input and output hour-average values to calculate the AQI value
by the Equation 1 which is mentioned in Technical Assistance Document for the Reporting of
Daily Air Quality – the Air Quality Index (AQI) 1.</p>
        <p>=</p>
        <p>− 
 −</p>
        <p>( − ) + 
Where  : the index of pollutant p
 : the truncated concentration of pollutant p
: the concentration breakpoint that is greater than or equal to 
: the concentration breakpoint that is less than or equal to 
: the AQI value corresponding to 
: the AQI value corresponding to 
(1)</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Experiments and Results</title>
      <sec id="sec-4-1">
        <title>4.1. Baseline</title>
        <p>For the pre-training phase, the configuration includes 1 input day, Adam optimization with
a learning rate of 0.01. The training result is plotted in Figure 2. The best validation loss is
0.00624 (normalized) achieved at epoch 13, then the model enters the saturation period. By
reducing the learning rate to 0.001, the model converges slower and smoother with a minimal
validation loss is 0.00648. The pre-trained model is tested on the test set, and the results are
0.0638 (normalized).
1https://www.airnow.gov/sites/default/files/2020-05/aqi-technical-assistance-document-sept2018.pdf
(a) leaning rate = 0.01
(b) leaning rate = 0.001</p>
        <p>The final model is also evaluated by validation, test, and target sets (Table 1). Although the
test set is smaller than the validation set, the performance is reduced.</p>
      </sec>
      <sec id="sec-4-2">
        <title>4.2. Number of input days</title>
        <p>The model performance in the train value set is tested from 1 to 10 input days (Figure 3).
With 1 input day, the loss is always minimized the best. Furthermore, the model’s convergence
abilities of 2, 3, and 4 input days are the same, nearly as 1 day. There is a noticeable performance
when feeding for 9 days.</p>
      </sec>
      <sec id="sec-4-3">
        <title>4.3. Prediction hour in a day</title>
        <p>By plotting the MSE loss of 24 hours per day in 7 prediction days in the train set (Figure 4),
there is a common trend in the hour accuracy. In all 7 days, the period between 10 a.m. and 8
p.m. keeps the smallest loss. The MSE loss on days 1, 5, and 7 share the same shape.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>5. Conclusion</title>
      <p>Air Quality Index (AQI) forecasting is crucial for improving the quality of smart cities. In
this work, a CNN-GRU model is optimized to predict the hour-average value of six pollutants
by feeding raw input data records. The achieved results are noticeable to improve better with
data preprocessing methods that reduce noisy data, outlines, and sensor problems, solving the
saturation problem.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <article-title>[1] AirNow, Air quality index (aqi) basics</article-title>
          , https://www.airnow.gov/aqi/aqi-basics/,
          <year>2022</year>
          . Accessed:
          <fpage>2022</fpage>
          -11-28.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>M.-S.</given-names>
            <surname>Dao</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.-H.</given-names>
            <surname>Dang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.-L.</given-names>
            <surname>Nguyen-Tai</surname>
          </string-name>
          , T.-
          <string-name>
            <given-names>B.</given-names>
            <surname>Nguyen</surname>
          </string-name>
          ,
          <string-name>
            <surname>D.-T.</surname>
          </string-name>
          Dang-Nguyen,
          <article-title>Overview of mediaeval 2022 urban air: Urban life and air pollution</article-title>
          ,
          <source>MediaEval'22: Multimedia Evaluation Workshop</source>
          (
          <year>2022</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>D.</given-names>
            <surname>Duong</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Q.</given-names>
            <surname>Le</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.-L.</given-names>
            <surname>Nguyen-Tai</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Nguyen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Dao</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Nguyen</surname>
          </string-name>
          ,
          <article-title>An Efective AQI Estimation Using Sensor Data</article-title>
          and
          <string-name>
            <given-names>Stacking</given-names>
            <surname>Mechanism</surname>
          </string-name>
          ,
          <year>2021</year>
          . doi:
          <volume>10</volume>
          .3233/FAIA210040.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>J.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Jin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Q.</given-names>
            <surname>Sun</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <article-title>An air quality index prediction model based on cnn-ilstm</article-title>
          ,
          <source>Scientific Reports</source>
          <volume>12</volume>
          (
          <year>2022</year>
          ).
          <source>doi: 10.1038/s41598-022-12355-6.</source>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>Y.</given-names>
            <surname>LeCun</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Boser</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. S.</given-names>
            <surname>Denker</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Henderson</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. E.</given-names>
            <surname>Howard</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Hubbard</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L. D.</given-names>
            <surname>Jackel</surname>
          </string-name>
          ,
          <article-title>Backpropagation applied to handwritten zip code recognition</article-title>
          ,
          <source>Neural Computation</source>
          <volume>1</volume>
          (
          <year>1989</year>
          )
          <fpage>541</fpage>
          -
          <lpage>551</lpage>
          . doi:
          <volume>10</volume>
          .1162/neco.
          <year>1989</year>
          .
          <volume>1</volume>
          .4.541.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>S.</given-names>
            <surname>Hochreiter</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Schmidhuber</surname>
          </string-name>
          ,
          <article-title>Long short-term memory</article-title>
          ,
          <source>Neural computation 9</source>
          (
          <year>1997</year>
          )
          <fpage>1735</fpage>
          -
          <lpage>80</lpage>
          . doi:
          <volume>10</volume>
          .1162/neco.
          <year>1997</year>
          .
          <volume>9</volume>
          .8.1735.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>V.</given-names>
            <surname>Nair</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G. E.</given-names>
            <surname>Hinton</surname>
          </string-name>
          ,
          <article-title>Rectified linear units improve restricted boltzmann machines</article-title>
          ,
          <source>in: Proceedings of the 27th International Conference on International Conference on Machine Learning</source>
          , ICML'
          <fpage>10</fpage>
          ,
          <string-name>
            <surname>Omnipress</surname>
            , Madison,
            <given-names>WI</given-names>
          </string-name>
          , USA,
          <year>2010</year>
          , p.
          <fpage>807</fpage>
          -
          <lpage>814</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>K.</given-names>
            <surname>Cho</surname>
          </string-name>
          ,
          <string-name>
            <surname>B. van Merrienboer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Bahdanau</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Bengio</surname>
          </string-name>
          ,
          <article-title>On the properties of neural machine translation: Encoder-decoder approaches</article-title>
          ,
          <source>CoRR abs/1409</source>
          .1259 (
          <year>2014</year>
          ). URL: http://arxiv.org/abs/1409.1259. arXiv:
          <volume>1409</volume>
          .
          <fpage>1259</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>D. E.</given-names>
            <surname>Rumelhart</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. L.</given-names>
            <surname>McClelland</surname>
          </string-name>
          ,
          <source>Learning Internal Representations by Error Propagation</source>
          ,
          <year>1987</year>
          , pp.
          <fpage>318</fpage>
          -
          <lpage>362</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>