text:
\section{Introduction}
\label{sec:Introduction}
Automated Human Activity Recognition (HAR) has achieved considerable attention for application in multifarious domains like automated surveillance and security system in healthcare monitoring, smart home, old home, baby care center, day care center for children with special needs (i.e. autism and related disorders), assisted living for impaired people, dormitories, military out-of-bounds area, criminal detection and digital-forensic investigation, prison cells etc. In view of the fact that manual surveillance by human operator is costly and not always feasible, multitude of Commercial Off the Shelf Wireless Local Area Network (COTS-WLAN), Computer Vision, Wearable Sensor, Radar, Bluetooth based artificial intelligence systems for automated indoor-outdoor human gesture and activity detection have already been proposed. Many emerging research projects are still in progress with a view to developing ways of point-of-care service for assuring safety, security and well-being.

Ranasinghe et al. \cite{comboreview1}, Zhang et al. \cite{comboreview2} and Beddiar et al. \cite{comboreview3} conducted an extensive survey on 130, 170 and 230 research articles respectively that worked on popular human activity recognition datasets involving spatio-temporal data collected by sensors like accelerometer-gyroscope-RFID-fiberoptic-wearables etc., computer vision, and multimodal audio-visual-sensor based recognition and notification system to the corresponding supervisor or caregiver situated nearby. Authors reviewed the adopted feature extraction techniques and artificial intelligence driven classification models. They enlisted comparison of HAR approaches along with automated HAR application domains  including commercially funded projects on active-assisted living for elderly and disabled in smart homes, patient monitoring in medical environments, airport-subway-metrorail surveillance, sport and outdoor, tele-immersion, and so on.

Golestani et al. \cite{MIsensor} designed a wearable magnetic induction (MI) transmitter-receiver coil. The MI coil is facilitated with L-reversed impedance matching network that uses magnetic induction signals for artificial intelligence dependent human activity recognition. The study necessitated to wear on one receiver MI coil in the subject's waist and eight transmitter MI coils in the subject's skeleton bones.  Long-Short Term Memory (LSTM) outperformed in MI signal variation classification compared to other five machine learning algorithms used in the study.

However, computer vision incorporates imaging techniques using video camera that might not be suitable in all circumstances for personal privacy \cite{camprivacy1, camprivacy2} reasons especially in indoor residential environments. Moreover, it demands for high power, necessary infrastructure, data traffic and memory usage that might not be economical, perhaps wastage in many situations. Wearable sensor for human activity detection often times fall short on ensuring proper security \cite{sensorprivacy} since it might expose GPS location or personal health data. In addition, it's not possible to make obliged everyone to wear such gadget all the time due to discomfort, health-risks, unwillingness and battery longevity. Radar and ultrasonic technology for human activity detection in indoor environment requires additional electronic devices \cite{radar1, radar2, ultrasonic} to be equipped with, which is consistently not being used in regular standard of living.

In such context, radio frequency inspection from WLAN network such as Wi-Fi channel perturbation analysis offers a better economical choice \cite{csibetter} for human activity recognition since Wi-Fi communication is extensively used nowadays in daily life which is already in the palm of our hand. A Wi-Fi communication device transmits radio signal as electromagnetic waves modulated on an integer number of frequency division multiplexed carriers which are orthogonal to each other. Intuitively, human activities and mutual interactions performed within the line-of-sight Wi-Fi coverage area create distinct changes to the transmitted signal due to unique pattern of signal reflections from human-body that is performing unique activities. Those activities or mutual interactions can be detected and classified through analysis of correlation between the signal changes and body movement using signal attributes of a Wi-Fi transceiver pair such as packet delay, coarse-grained Received Signal Strength Indicator (RSSI), accumulated noise, automatic gain control parameter of the receiver circuit, and fine-grained Channel State Information (CSI). The unique distinction among the parametric pattern caused by various human-activities can be better detected via artificial intelligence techniques. The overall procedure is neither intrusive nor obtrusive because it does not capture visual data and the entire process runs contactless for safeguarding privacy.

A survey report \cite{csi_review} discussed on the pros and cons of different Internet-of-Things (IoT) protocols with research advancements in RF based gesture or activity recognition. Authors compared the performance of recent state-of-the-art proposals on body-sensor, video camera, WLAN Received Signal Strength Indicator (RSSI) and Channel State Information (CSI) based single or multiple human independent activity recognition models incorporating various signal processing dependent pre-processing and feature extraction techniques with their application and performance. Authors of the survey report confined their maximum focus on the WLAN approaches due to its immense potential \cite{CSI5G} and narrated that the recognition accuracy with CSI is way higher than RSSI of Wi-Fi signal because CSI provides amplitude and phase information for each subcarrier frequency of OFDM modulation per packet of the multiple-input multiple-output (MIMO) transmission. But RSSI provides only single magnitude value per packet. The article further shed light on both the processed and raw CSI data analysis using mathematical model-based approaches \cite{modelbasedcsi_review} like CSI speed-activity-mobility-ratio-quotient model, Angle of Arrival model, Fresnel Zone model along with learning-based approaches dependent on feature extraction, machine and deep learning. Deep learning approaches, especially Convolutional Neural Network, have lately become much popular due to their automated ability of feature extraction from raw CSI data with large volume of data handling capacity even though it is observed to have more publications with machine learning in earlier era. Recurrent Neural Network (RNN) models like vanilla RNN, LSTM are also being adopted \cite{ieeelstm1, ieeelstm2} nowadays by few researchers because of their time-sequence classifying propensity.

Damodaran et al. \cite{ubuntucsi} conducted a study on walk-run-sit-stand-fall-empty room detection, and human occupancy (the number of people in the room) counting at living room and hallway environment using two laptops running on 64 Bit Ubuntu operating system equipped with Intel 5300 NIC served as 1x3 Tx-Rx system. Authors extracted CSI values using Linux 802.11n CSI Tool and only the CSI amplitude is considered for analysis. They proposed two models for activity recognition, viz. Support Vector Machine (pre-processing done using discrete wavelet transform for noise reduction, principal component analysis for dimensionality reduction and feature extraction conducted using power spectral density, frequency of center of energy, Haart wavelet analysis), and LSTM (raw data used after denoising via discrete wavelet transform).

Nonetheless, Ashleibta et al. \cite{CSI5G} pointed out, also reported by Damodaran et al. \cite{ubuntucsi}, a major drawback of Network Interface Cards (NIC) used for controlling flow of the data over Wi-Fi link and channel data estimation. IEEE 802.11n compliant Wi-Fi access points use 56 subcarriers during OFDM modulation but Intel 5300 NIC at the receiver side can report data for utmost 30 subcarriers while CSI information of remaining 26 subcarriers is lost. Simultaneous use of NIC for networking function and CSI estimation using external tools for human activity recognition may hamper the reliability of NIC's long-term performance as well. To avoid these problems, Ashleibta et al. \cite{CSI5G} claimed to be the pioneering developer of human occupancy (the number of people in the room) counting and their parallel multi-activity (performing at 4 distinct positions of the room) recognition deep 1D-CNN model using CSI (amplitude only) generated by two Universal Software Radio Peripheral (USRP) \cite{usrp1, usrp2} formed Single-Input Single-Output (SISO) communication system operated at 3.75 GHz carrier frequency which falls under the 5G frequency band (3.4-3.8 GHz). Their generated dataset consists a total of 1,777 trials having 16 combinations of 3 distinct activities (sitting, standing, walking) along with empty room performed by 4 subjects in a lab setting. The developed recognizer model comprises a data pre-processing step formed of mean CSI amplitude finder across all 51 subcarriers, fourth order Butterworth lowpass filter for noise reduction, 3-level discrete wavelet transform calculator followed by the classifier model formed of 13 1D-CNN layers and 5 max pooling layers. Authors reported the accuracy of parallel multi-activity recognition experiment to be around 80\% and accuracy of occupancy experiment ranging between 86\%-95\%. They also justified the superiority of their USRP formed 5G enabled SISO system because of more discernible CSI pattern formation compared to a WiFi-NIC system operating at 5 GHz frequency band.

Despite plausible advances in the HAR domain, all the existing studies using WLAN RSSI-CSI data are focused solely on recognizing independent activities performed by single or multiple subjects. But the recognition of reciprocal gestures or interactions between two individuals using WLAN RSSI-CSI data still remains obscure. A few computer-vision \cite{videoh2hi1, videoh2hi2, videoh2hi3} and ultra-wideband-radar \cite{radarh2hi} based frameworks for recognizing two-human interactions have been proposed however. Cases of physical abuse by babysitters against toddler or teenagers \cite{babysit}, maltreatment with teenagers in residential care along with forced criminalization \cite{carecenter, youthviolence}, parental control over children left at home by employed parents, incidents of hazing at colleges and dorms \cite{hazing1, hazing2, hazing3}, monitoring at cleanroom of manufacturing lab \cite{cleanroom1, cleanroom2}, monitoring of suspicious and aggressive behavior in a constrained area like prison or restricted zone for servicemembers necessitate continuous surveillance of human-to-human physical interactions while securing the personal privacy and minimizing monetary cost.

\vspace{2mm}
\noindent Considering the facts mentioned above,

\vspace{2mm}

\begin{itemize}[noitemsep, topsep=0pt, leftmargin=*]
    \item[i.] To the best of the authors' knowledge, this is the \textbf{first time} that this study has been undertaken on deep-learning based \textbf{human-to-human mutual interaction recognition} utilizing \textbf{first-ever published and publicly available relevant Wi-Fi dataset} \cite{dataset}.

    \item[ii.] Li et al. \cite{radarBiGRU} delineated the superiority of Bidirectional Gated Recurrent Neural Network Unit (BiGRU) model on single-human independent-activity recognition compared to RNN, BiRNN and GRU model; though the authors used `wideband radar waveform' obtained from RADAR High Resolution Range Profile signal. Because the BiGRU deep learning algorithm accompanied by the Attention mechanism has recently gained considerable attraction for time-sequence data classification such as https traffic classification \cite{grutrend1}, eeg-based emotion classification \cite{grutrend2}, P300 EEG signal classification \cite{grutrend3}  and because the model has certain strengths as mentioned in section-\ref{sec:methodology}, this experiment took the chance to investigate the potential of the Attention-BiGRU deep learning model for \textbf{`human-to-human'} \textbf{`mutual interaction'} classification in an indoor setting using \textbf{`Wi-Fi data'}.

    \item[iii.] First, the investigation was conducted on a single subject-pair in order to develop a greater understanding of the influence of channel metrics diversity of the dataset features. Our proposed deep-learning model demonstrated a high performing mutual interaction recognition results on single human subject-pair.

    \item[iv.] The study was further conducted on ten subject pairs for validating the high performance under influence of variegated subject-pairs and clearly this also exhibited reasonable classification performance indicating that the model can be trained and applied for upto ten subject pairs.

    \item[v.] But the cross-test experiment on new subject-pairs produced worse results which indicates that profiling of mutual interaction features from untrained subject-pairs protrudes more complicated channel metrics diversity.

    \item[vi.] Alongside the proposed solution, further discussion on such worse result in cross-test experiment pointed out the possible pitfalls and provided suggestions that need to be taken care of in further research.

    \item[vii.] To develop an overall software framework and visually depict the classifications, the study eventually developed a graphical user interface (GUI) executable (not standalone) software designed using PyQt5 \cite{pyqt5} GUI app builder Python module.
\end{itemize}

\vspace{2mm}
Remaining of the article is organized as follows: Section-\ref{sec:data_desc} delivers an overview of the dataset and challenges with the recorded pattern of the time-series data values for different mutual interactions. Section-\ref{sec:wlan_theory} describes the feature variables provided with the dataset. Experimental framework, proposed deep-learning model description and executable GUI software description are introduced in section-\ref{sec:methodology}. Research outcomes and perceived hindrances are discussed in section-\ref{sec:result}. Future research prospects are narrated in section-\ref{sec:scopes}. The article is concluded with section-\ref{sec:conclusion} delivering the supplementary materials in section-\ref{sec:supp_link}.

\section{Dataset Description}
\label{sec:data_desc}

To explore the philosophy of human-to-human interaction recognition via Wi-Fi data classification using Artificial Intelligence (AI), this study opted to take advantage of \textit{`the only available first-ever published Wi-Fi-based human-to-human interaction dataset'} by Alazrai et al. \cite{dataset} contemplating 13 activities performed by two individuals in the central area between 4.3 meters apart Wi-Fi access point and Network Interface Card (NIC) kept in Line-of-Sight (LOS) manner targeting each other in an indoor environment (5.3 square meters furnished room). A publicly available CSI tool \cite{csi_tool} had been used to record Wi-Fi data and the device configurations are depicted in Figure \ref{fig: MIMO}.

The dataset comprises 40 folders for interactions performed by 40 different subject-pairs. Each folder contains 12 sub-folders for 12 different interactions. Each sub-folder contains 10 different data (*.mat) files containing Wi-Fi packet data [viz. Wi-Fi packet arrival timestamp, number of transmit and receive antennas (NTx, NRx), channel noise, automatic gain control (AGC in dB), received signal strength indicator (RSSI in dB) at the 3 receive antennas, complex valued channel state information (CSI) and interaction label] for 10 trials of each interaction. The complex valued CSI array is of order (NTx, NRx, NSc) = (2, 3, 30) where, NSc = Number of Subcarriers used during OFDM modulation.

It's to be noted that each trial is composed of 2 interactions (steady-state and any of the 12 interactions), that's how 13-interactions altogether. The 13 human-to-human interactions are: steady-state, approaching, departing, handshaking, high-five, hugging, kicking (left-leg), kicking (right-leg), pointing (left-hand), pointing (right-hand), punching (left-hand), punching (right-hand), and pushing.

It's also to be noted that, the data files are of unequal time-series length, i.e. time-series data ranging upto 1040-2000+ Wi-Fi packets and packet arrival time-difference are also seen unequal. This occurred due to the following data acquisition time-length:

\begin{itemize}
\setlength\itemsep{0em}
    \item[--] 2.00 second for steady-state + 3.00 second for hugging or kicking or punching
    \item[--] 3.50 second for approaching + 2.00 second for steady-state (Note that, steady-state performed at the end portion only for approaching action)
    \item[--] 2.00 second for steady-state + 3.50 second for departing
    \item[--] 2.00 second for steady-state + 4.00 second for handshaking or high-five or pushing
    \item[--] 2.00 second for steady-state + 4.50 second for pointing
\end{itemize}

Such kind of time-length inequality, two interactions merged in each trial, steady-state either at the beginning or at the end portion of the trial, the difference in height-weight of 66 subjects added an extra layer of complexity to the LOS-faded Wi-Fi signal pattern-recognition AI challenge.

\section{Description of the Dataset's Feature Variables}
\label{sec:wlan_theory}

To attain the dataset, an IEEE 802.11n standard \cite{ IEEE80211n} (released in 2009) compliant 2x3 MIMO-OFDM (\ref{appendix:mimo_ofdm}) wireless LAN communication system had been used during data collection. Figure \ref{fig: MIMO} offers an exposition on the system configuration used during data collection \cite{dataset}.

\begin{figure*}[ht]
\centering
\resizebox{16cm}{!}{\includegraphics{figures/fig1_MIMO_Room.pdf}}
\caption{{Conceptualization of the 2x3 MIMO-OFDM indoor WLAN transmission system in case of two-human line-of-sight interaction. WiFi AP specifications are 2.4GHz frequency band, wireless channel no.-06, 20MHz channel bandwidth, modulation coding scheme index-08, MIMO OFDM (30 subcarriers) and IEEE 802.11n compliant device. Here, S3 represents Line-of-Sight (LOS) signal fading due to two human mutual interaction and Non-Line-of-Sight (NLOS) signals are reflected from Ceiling (S1), Wall (S2), Indoor Object (S4), Floor (S5)}}
\label{fig: MIMO}
\end{figure*}

This section provides a brief overview of the feature variables included to the dataset, the environmental factors that affect and underlie the pattern changes of those feature values when applied to indoor WLAN environments, the mathematical representation of some of those features, and some observations on a few variables in recent WLAN research works. These also illustrate the significance of using these feature variables in the experiments of this research work in order to make use of feature pattern changes to classify 13 distinct mutual human-to-human interactions using the proposed Attention-BiGRU deep learning model.

\subsection{Signal Fading and Noise}
\label{subsec:sig_fad_noise}

Unlike this particular experiment where the Line-of-Sight (LOS) faced transmitter and receiver are stationary at fixed distance (4.5 meter apart), the transmitted electromagnetic (EM) signal encounters attenuation (amplitude deviation, phase change and delay spread from multipath time-delay) due to large-scale fading (i.e. indoor path loss) and small-scale fading (i.e. absorption-reflection-diffraction-scattering-interference during multipath indoor propagation and speed of surrounding objects viz. movement of two human during interaction) across the propagation range of Wi-Fi signal from transmitter to receiver. The wavelength ($\lambda = 125$ mm, eq$^{tn}$-1) of the Wi-Fi signal with $f = 2.4 GHz$ carrier frequency is too small compared to 4.5m Tx-Rx distance such that EM wave propagation phenomena and equations sustain for the indoor environment.
	\[\tag{1}\lambda =\frac{c}{f}=\frac{3\times {{10}^{8}}m{{s}^{-1}}}{2.4GHz}=\frac{3\times {{10}^{11}}mm{{s}^{-1}}}{2.4\times {{10}^{9}}{{s}^{-1}}}=125mm\text{\;\; ;\; here,\;}c=\text{\;speed\;of\;EM\;wave}\]

Mean received power logarithmically reduces with distance in case of indoor path loss; hence if path loss is denoted by $P_{Loss}$, path loss exponent by n, transmitter-receiver separation by ${{d}_{Tx\leftrightarrow Rx}}$ and 1m-100m reference distance by $d_{ref}$, then free-space indoor path loss for single room can be equated from log-distance path loss model as,
\[\tag{2}{{P}_{Loss}}\left( dB \right)={{P}_{Loss}}\left( {{d}_{ref}} \right)+10n\log \left( \frac{{{d}_{Tx\leftrightarrow Rx}}}{{{d}_{ref}}} \right)\text{\;\; ;\; here,\;}n=2\text{\;for\;free\;space}\]

Transmitted EM wave strength sometimes gets partially absorbed by indoor objects like spongy-foamy couch, soft curtains, water (if any, e.g. aquarium), concrete-wall, brick-wall, metal-wall, electronic appliances (computer, refrigerator, microwave oven etc.). While obstructed by ceiling, floor, wall, humans with different weight-height and flat indoor objects, EM signal gets reflected and a trifling amount of wave bounces towards any other direction than the receiver, thus reducing received signal energy. Both partial absorption and reflection may occur simultaneously in varying amount depending on material composition and texture of the obstacle and incident angle of the signal on the obstacle.

Multiple Lambertian reflected waves generate after the EM wave gets scattered from uneven rough surface like indoor ornamental plant leaves, curly short human-hairs along direct LOS path, dust or smoke or micro-water-droplets present in the air etc. Secondary wavelets originate maintaining Huygen's principle while the transmitted EM beam gets diffracted at sharp edges (corner of walls, desk, tables, chair, ceiling fan etc.) and propagate along their split direction curving around that obstacle. These multipath propagated signals exhibit signal amplitude deviation and phase shift while received by the receiving antennas.

Transmitted signal might also encounter interference with any other radio wave (signal from another Wi-Fi router in other room, microwave oven, cellphone etc. if operating at 2.4 GHz carrier frequency band with unique modulation frequency). This also adds Additive White Gaussian Noise (AWGN) to the transmitted signal. \cite{rappaport, daniel, IndoorWLAN}

Since the Tx-Rx has LOS path (eventhough sometimes partially and randomly obstructed due to two human interactions), the small-scale fading can be simplistically expressed in a generalized fashion using Rician Fading model \cite{shankar} considering sinusoidal transmission signal having amplitude A, at a carrier frequency of $f = 2.4 GHz$ as follows,

\vspace{6pt}
\noindent Received Signal,
\[\tag{3}\begin{array}{l}
  {{R}_{Rician}}(t)={{A}_{LOS}}\cos (\omega t)+\sum\limits_{i=1}^{\#multipaths}{{{A}_{i}}\cos (\omega t+{{\phi }_{i}})}\text{\; ; \;here,\;angular freq, \;}\omega =2\pi f\text{\;and\;}\phi = \text{signal\;phase\; difference} \\

 \;\;\;\;\;\;\;\;\;\;\;\;\;={{A}_{LOS}}\cos (\omega t)+\cos (\omega t)\sum\limits_{i=1}^{\#multipaths}{{{A}_{i}}\cos ({{\phi }_{i}})}-\sin (\omega t)\sum\limits_{i=1}^{\#multipaths}{{{A}_{i}}\sin ({{\phi }_{i}})} \\

 \;\;\;\;\;\;\;\;\;\;\;\;\;=(M+{{A}_{LOS}})\cos (\omega t)-N\sin (\omega t)\text{\;\; ; \;here,\;}M =\sum\limits_{i=1}^{\#multipaths}{{{A}_{i}}\cos ({{\phi }_{i}})}\text{\;\;and\;\;}N = \sum\limits_{i=1}^{\#multipaths}{{{A}_{i}}\sin ({{\phi }_{i}})}
\end{array}\]

\noindent Received Power, \[\tag{4}P={{(M+{{A}_{LOS}})}^{2}}+{{N}^{2}}\]

\noindent Average Received Power,
\[\tag{5}\bar{P}=2{{\sigma }^{2}}+A_{LOS}^{2}\text{\;\;\; ; \;here,\; variance}:\text{\;}{{\sigma }^{2}}=\frac{\sum\limits_{i=1}^{\#multipaths}{{{({{x}_{i}}-\bar{x})}^{2}}}}{\#multipaths};\text{\;}{{x}_{i}}={{A}_{i}}\cos \left( \omega +{{\phi }_{i}} \right)\]

\noindent Rician factor, \[\tag{6}K=\frac{A_{LOS}^{2}}{2{{\sigma }^{2}}}\]

\noindent If B(.) is the modified Bessel function of first kind \cite{besselfn1, besselfn2}, U(.) is the unit step function, the Probability Density Function (PDF) of the Received Power,
\[\tag{7}PD{{F}_{Rician}}(p)=\frac{K+1}{{\bar{P}}}\exp \left( -K\left( K+1 \right)\frac{p}{{\bar{P}}} \right)B\left( 2\sqrt{\frac{K\left( K+1 \right)}{{\bar{P}}}}p \right)U\left( p \right)\]

Andjamba et al. \cite{namibiainterference} published a report on inter-network interference suffered by on-campus IEEE 802.11 standard access point operating at both 2.4 and 5 GHz carrier frequency band after two months of monitoring due to over 345 IEEE 802.11b/g/n/ac access points surrounded off-campus. Liu et al. \cite{InterNetworkInterference} proposed a novel mathematical architecture via theoretical analysis and developed an opensource program for IEEE 802.11 standard one-to-one Wi-Fi network's throughput ascertainment under the repercussion of inter-network-interference due to Wi-Fi devices of similar kind. Authors verified the analytical expressions along with the developed program using three network structures (string topology with 3 and 4 one-to-one networks, grid topology with 9 one-to-one networks) wherein they used `airtime concept' for finding out each network throughput which Wan et al. \cite{airtimeconcpet} believe handy for divulging the packet sensing duration at each node and frame collisions due to hidden nodes.

Chandaliya et al. \cite{BTInterference} observed the effect of signal interference on IEEE 802.11n standard Wi-Fi device throughput due to 2-pairs of Bluetooth devices sharing data in the vicinity of Wi-Fi range at right-angled spatial position with respect to Wi-Fi LOS link, all operating at 2.4 GHz carrier frequency band. Practical presence of Bluetooth devices decreased the Wi-Fi throughput by 6.27 dB, increased packet-arrival-time-difference by 0.26 second and increased packet-drop-rate by 2.73 times compared to ideal software simulation of Wi-Fi data sharing alone. Natarajan et al. \cite{multiInterference} also performed mathematical analysis, physical layer analysis and Medium Access Control (MAC) layer analysis on the cross-technology signal interference while in coexistence among IEEE 802.15.4, Bluetooth Low Energy (BLE) and IEEE 802.11 technologies.

\subsection{Packet Arrival Time Difference}
\label{subsec:timediff}
Sarker et al. \cite{peoplemovement} conducted an investigation using IEEE 802.11 technology at multitude of environments (office room, library, laboratory, bedroom, lunch room, lounge, garage) in order to explore the effect of empty space, two human movement (walking towards each other and random movement) on Wi-Fi link throughput originated from file sharing between two wireless laptops concluding that the average throughput performance is $2.3\pm 0.3$ Mbps. Authors also reported that the noticeable throughput deviation ($\sim 0.3$ Mbps) is seen when two human movement is introduced rather than the empty space. But the throughput deviation due to different activities performed by two humans (walking towards each other vs random movement) is $\pm 0.07$ Mbps on average which is insignificant.

This suggests that Wi-Fi packets don't arrive after constant time interval, hence there exists variational packet-arrival-time-difference caused by multipath propagation effects. This also reminds that, detection of 13 two-human-interactions from Wi-Fi signal using AI is a very much arduous task due to negligible throughput deviation for different activities performed by two humans.

\subsection{Received Signal Strength Indicator (RSSI)}
\label{subsec:rssi}
Transmitted radio EM wave encounters fading, path loss, destructive interference during multipath propagation hence loses signal power over distance or attains power in case of noise addition and constructive interference. Received Signal Strength Indicator (RSSI) is a relative measurement of the signal power received at each receive antenna and the range of the RSSI value along with calculation depends on NIC manufacturer since there is no fixed standard for RSSI calculation. The RSSI value is observed to be greatly affected in different environments in a field study \cite{RSSI} on the characteristics of RSSI, especially with the presence of objects in signal path. Recently, RSSI has also been intended to be used for applications like human localization in indoor environment \cite{RSSIlocalization}.

Therefore, RSSI values create unique variational pattern with the unique movement during different human-to-human interactions performed along signal LOS path that might be translated into meaningful classification using deep learning techniques.

\subsection{Automatic Gain Control (AGC)}
\label{subsec:agc}
Multipath propagation affects the transmitted signal amplitude (hence power) resulting to be either high, low, or just the exact at the receiving antenna. However, translatable-stable signal amplitude is an imperative for further processing of the signal using the receiver electronic circuits at which point the Automatic Gain Control (AGC) concept steps in. Delayed AGC is a feedback-controlled operational amplifier circuit including electronic switches (e.g. diode, relay etc.) aiming to dynamically adapt the output signal voltage to a set-point creating suitable DC voltage-bias using variable-gain-amplifier (VGA) and error-amplifier circuit-network so that the downstream circuit at the receiver chain gets a stable signal in the radio-frequency (RF) and intermediate-frequency (IF) stages irrespective of the varying received signal amplitude. Frequency bandwidth of the AGC circuit is defined by the operating bandwidth of the transmitter. \cite{AGC1, AGC2, AGC3}

AGC value (in dB) supplements the RSSI (in dB) deficit, that's why kept as an important feature for the proposed deep-learning model.

\subsection{Channel State Information (CSI)}
\label{subsec:csi}
Transmitted analog EM wave reaches to the receiver passing through the overall spatial environment (e.g. free space) is referred to as transmission channel. Channel conditions and properties accumulate the overall combination of signal fading (reflection, absorption, interference, scattering, path loss, packet delay etc.) due to multipath propagation and unique human-to-human interactions along LOS path. Channel State Information (CSI) (Figure \ref{fig: MIMO_CSI}) describes how the transmitted EM beam of each Wi-Fi packet passes through the channel encountering those effects and mimics the overall channel properties of a MIMO-OFDM system in the form of a (NTx, NRx, NSc)-sized array (H matrix) formed of complex elements describing magnitude and phase information of the channel impulse response which can be estimated both at the transmitter and receiver side using various channel estimation methods \cite{ChE1, ChE2}; here, NTx, NRx = Number of Transmit and Receive antennas and NSc = Number of Subcarriers used during OFDM modulation.

This experiment used (2, 3, 30)-sized complex valued CSI array that was estimated at the receiver side using a publicly available CSI tool \cite{csi_tool}.

\begin{figure*}[ht]
\centering
\resizebox{10cm}{!}{\includegraphics{figures/fig1a_CSI.pdf}}
\caption{{Intuition of CSI array for single subcarrier}}
\label{fig: MIMO_CSI}
\end{figure*}

Each Wi-Fi packet is received within very small period of time after transmission, thus, quasi-static fading and a linear-time-invariant channel is assumed. If for a multipath channel, ${{\alpha }_{k}}$ be the channel attenuation over $k_{th}$ path, $d(\tau -{{\tau }_{k}})$ be the signal propagation delay along $k_{th}$ path at ${{\tau }_{k}}$ delay index of the channel impulse response, then each element $h_{T,R,S}$ of the H matrix for $T_{th}$ transmit antenna, $R_{th}$ receive antenna and $S_{th}$ subcarrier can be expressed as \cite{IEEE80211n, phdthesis, csi},

\[\tag{8}{{h}_{T,R,S}}(\tau )=\sum\limits_{k=1}^{N}{{{\alpha }_{k}}{exp\left({-j\omega {{\tau }_{k}}}\right)}d(\tau -{{\tau }_{k}})\text{\;\;\; ; \; here,\;angular\;frequency,\;}\omega =2\pi {{f}_{subcarrier}}}\]

\noindent CSI array for each Wi-Fi packet,
\[\begin{array}{l}\tag{9}
H={{\left[ \begin{matrix}
   \left[ \begin{matrix}
   \left[ \begin{matrix}
   {{h}_{1,1,1}} & {{h}_{1,1,2}} & \ldots  & {{h}_{1,1,30}}  \\
\end{matrix} \right]  \\ \\
   \left[ \begin{matrix}
   {{h}_{1,2,1}} & {{h}_{1,2,2}} & \ldots  & {{h}_{1,2,30}}  \\
\end{matrix} \right]  \\ \\
   \left[ \begin{matrix}
   {{h}_{1,3,1}} & {{h}_{1,3,2}} & \ldots  & {{h}_{1,3,30}}  \\
\end{matrix} \right]  \\ \\
\end{matrix} \right]  \\
   \left[ \begin{matrix}
   \left[ \begin{matrix}
   {{h}_{2,1,1}} & {{h}_{2,1,2}} & \ldots  & {{h}_{2,1,30}}  \\
\end{matrix} \right]  \\ \\
   \left[ \begin{matrix}
   {{h}_{2,2,1}} & {{h}_{2,2,2}} & \ldots  & {{h}_{2,2,30}}  \\
\end{matrix} \right]  \\ \\
   \left[ \begin{matrix}
   {{h}_{2,3,1}} & {{h}_{2,3,2}} & \ldots  & {{h}_{2,3,30}}  \\
\end{matrix} \right]  \\
\end{matrix} \right]  \\
\end{matrix} \right]}_{\left( NTx,\;NRx,\;NSc \right)}}
\end{array}\]

\vspace{5mm}
\noindent Received sequence for each Wi-Fi packet at the receiving antennas,
\[\begin{array}{l}\tag{10}
 {{\left[ Y \right]}_{\left( NRx,\;NSc \right)}}=\sum\limits_{sum\_along\_Tx}{\left( {{\left[ H \right]}_{\left( NTx,\;NRx,\;NSc \right)}}*{{\left[ X \right]}_{\left( NTx,\;NSc \right)}} \right)}+{{\left[ AWGN \right]}_{\left( NRx,\;NSc \right)}} \\

 \;\;\;\;\;\;\;\;\;={{\left[ \begin{matrix}
   \left[ \begin{matrix}
   {{h}_{1,1,1}}{{x}_{1,1}}+{{h}_{2,1,1}}{{x}_{2,1}} & {{h}_{1,1,2}}{{x}_{1,2}}+{{h}_{2,1,2}}{{x}_{2,2}} & \ldots  & {{h}_{1,1,30}}{{x}_{1,30}}+{{h}_{2,1,30}}{{x}_{2,30}}  \\
\end{matrix} \right]  \\ \\
   \left[ \begin{matrix}
   {{h}_{1,2,1}}{{x}_{1,1}}+{{h}_{2,2,1}}{{x}_{2,1}} & {{h}_{1,2,2}}{{x}_{1,2}}+{{h}_{2,2,2}}{{x}_{2,2}} & \ldots  & {{h}_{1,2,30}}{{x}_{1,30}}+{{h}_{2,2,30}}{{x}_{2,30}}  \\
\end{matrix} \right]  \\ \\
   \left[ \begin{matrix}
   {{h}_{1,3,1}}{{x}_{1,1}}+{{h}_{2,3,1}}{{x}_{2,1}} & {{h}_{1,3,2}}{{x}_{1,2}}+{{h}_{2,3,2}}{{x}_{2,2}} & \ldots  & {{h}_{1,3,30}}  \\
\end{matrix}{{x}_{1,30}}+{{h}_{2,3,30}}{{x}_{2,30}} \right]  \\
\end{matrix} \right]}_{\left( NRx,\;NSc \right)}}+{{\left[ AWGN \right]}_{\left( NRx,\;NSc \right)}}
\end{array}\]

In an indoor environment having static surrounding objects at fixed position but two humans performing different mutual interactions along LOS path creates idiosyncratic channel variation over the total time period that appear to be a classifiable pattern to the proposed deep learning model.

\section{Methodology and Framework}
\label{sec:methodology}

The human-to-human mutual interaction recognition from Wi-Fi data is a time-series classification problem and for that, this study proposes an auspicious Attention Bidirectional Gated Recurrent Neural Network Unit (Attention-BiGRU) model with executable Graphical User Interface (GUI) software implementation. The proposed solution utilizes WiFi signal noise, packet arrival time difference, RSSI value of three receive antennas, AGC and CSI array data features for thirteen distinct human-to-human mutual interaction classification performed in an indoor environment within the line-of-sight Wi-Fi coverage area of the transmitted signal. The cognitive ability of the developed GUI software solution possesses significant potential for indoor activity monitoring, surveillance system, smart health monitoring systems and independent assisted living because the software can alongside plot and save the time-series data classification results with a satisfactory accuracy having minimal interaction-transition region classification errors. The overall project structure is illustrated as block diagram in the Figure \ref{fig: BlockDiagram}.

\subsection{Data Pre-processing}
\label{subsec:dat_preproc}

During data pre-processing, data were split into $60:20:20$ ratio for training-validation-test set. The algorithm at first detects the number of available Wi-Fi packets of a given sequence. Unequal length of data sequences are made equal to 1560 Wi-Fi packets by either clipping or padding of required samples because the deep learning model requires a fixed number of input data size. Then feature extraction is performed according to Figure \ref{fig: BlockDiagram}. Packet Arrival Time Difference feature is calculated from the Time-Stamp column of the original dataset. CSI array of each Wi-Fi packet of the original dataset is of $2\times3\times30$ size which is unwrapped into a 2D array, then magnitude and phase angle is calculated. Other feature values (Time Difference, Noise, AGC, RSSI of three receive antennas) are concatenated alongside the CSI array magnitude and phase. This is done for all 1560 Wi-Fi packets of each *.mat file which produces $1560\times366$ 2D array in *.csv format for each *.mat file.

\begin{figure*}[htp]
\centering
\resizebox{!}{21.3cm}{\includegraphics{figures/fig2_BlockDiagram.pdf}}
\caption{{Overall Project Structure}}
\label{fig: BlockDiagram}
\end{figure*}

The array is then undergone through Robust Scaler for standardization. Deep learning models exhibit dire performance on snaggy dataset due to outliers present in the data-features or skewed data-distribution that demands for methodical data standardization during data pre-processing step. Robust scaler takes care of the outliers present in individual feature vector by removing median, scales the values within specific range and centers-up the vector to form Gaussian distribution maneuvering $25^{th}$ to $75^{th}$ interquartile range \cite{sklearn}. Target values are encoded with One Hot Encoder for making suitable for further processing.

\subsection{Attention-BiGRU Model Design, Training and Test}
\label{subsec:model_train_test}

With the pre-processed data, model training was performed using the proposed Attention-BiGRU deep learning architecture. The proposed deep-learning architecture is a functional-type architecture comprised of an input layer, a positional embedding adder layer, two BiGRU layers having 1024 and 512 units respectively, one self-attention layer, one skip connection adder layer, two dense layers having 512 and 13 units, three dropout layers having 0.3 and 0.2 dropout ratios in order  to stay clear of overfitting issue, and one concatenation layer. Followed by the BiGRU operations, the under-processing array is fed to a Self-Attention layer having 8-heads with 64 key-dimension size. $30\%$ weighted self-attention values are added to the $70\%$ weighted previous-to-attention-values in the skip connection layer. This array is then passed through a dense layer and then the array is concatenated with the previous-to-attention layer values. Finally, this array is passed through the output dense layer having Softmax activation function that produces the time-series classification result. Whether GRU should be used as the Recurrent Neural Network, whether GRU layers should be bi-directional or uni-directional, how many BiGRU and dense layers need to be used, how many units of those layers need to be used, how many (multi-)heads and key-dimension of the self-attention layer should be used, how much weight should be given to the input threads of skip-connection layer, the arrangement and accurate placement of all the layers one after another are determined through trial and error process. The best combination is chosen for the finally proposed deep-learning model which had given the best possible outcome.

It is stated in Dataset Description (Section \ref{sec:data_desc}) that trial files for different interaction classes have time-length inequalities. Primarily, they were made of equal length by either clipping or padding required WiFi packet data from/to the steady-state portion during data pre-processing step. But, each trial file consists of two interactions (steady-state and another out of remaining 12 mutual-interactions) merged together. Steady-state interaction was performed either at the beginning or at the last portion of each trial. The 13 mutual human-to-human interactions performed by various subject pairs had different height, weight and might have slightly different body-posture for a specific interaction which contributed micro-variation in CSI array for that interaction. Again, clipping/padding steady-state portion solved the overall trial file length inequality problem but still the time-length of steady-state interaction remains unequal. All of these challenges are mitigated by using Positional Embedding, Self-Attention, Skip Connection, and Custom Test Prediction Smoother layers. BiGRU and Dense layers mainly took care of the task of time-series classification.

\vspace{8pt}
\noindent Basic layers used in the proposed deep learning Attention-BiGRU model are described as follows.

\subsubsection{Positional Embedding}
\label{subsec:pos_embd}

To deal with the interaction-transition region and satisfactory persistent labeling of the timeseries samples, it is essential to attain some essence of positional knowledge \cite{posembd} by the trained model for learning body-posture sequence-order since the dataset comprises interactions of variable data acquisition time-length and each interaction might have small chunk of body-posture correlating another interaction (e.g. `Punching/Pointing with left/right hand' has similar state until just before punched/pointed-with-finger). Positional embedding is frequently being used in transformer-based models in natural language processing. However, such embedding layer also shows promising aspects in case of Attention-RNN models latterly in trend, as well, explored through this experiment.

\subsubsection{Bidirectional Gated Recurrent Unit (BiGRU)}
\label{subsec:bigru}
Analysis of time-bounded 1560 Wi-Fi packets per trial falls under sequence learning task and Gated Recurrent Neural Network Unit (GRU) \cite{gru} is scrutinized to be performing best in this experiment compared to Long-Short-Term-Memory (LSTM) which is another early variant of Recurrent Neural Network.

Being neoteric, GRU offers some computational advantages over Vanilla-RNN and LSTM. While learning long term dependencies, GRU resolved the issue of vanishing and exploding gradient problem faced by Vanilla-RNN \cite{grufin}. On top of that, GRU incorporates fewer computational-states with less gates that provide faster computation with reduced complexity compared to LSTM. Each GRU unit intakes particular input along with previous hidden state corresponding to time-sample $t$, finds out whether the input is a potential hidden-state to be stored by using hyperbolic tangent and sigmoid activation function in candidate hidden state and reset gate thus serving as short-term-memory, and finally produces the current hidden state value (also final output value at the end) through reckoning of short-term-memory information from candidate state with previous hidden state value by using another sigmoid activation function in update gate thus serving as long-term-memory. On the whole, each GRU unit has two gates which maintain only the hidden state. The hidden-state at time $t$ of a fully-gated GRU unit can be expressed as,
\[\begin{array}{l}\tag{11}
  H\left( t \right)=H\left( t-1 \right)\odot {{\left[ 1+{exp\left({W_{1}^{u}x\left( t \right)+W_{2}^{u}H\left( t-1 \right)+{{B}^{u}}}\right)} \right]}^{-1}}+ \\
 \;\;\;\;\;\;\;\;\;\;\;\; \left[ 2{{\left[ 1+{exp\left({-2W_{1}^{h}x\left( t \right)-2W_{2}^{h}\left[ H\left( t-1 \right)\odot {{\left[ 1+{exp\left({-W_{1}^{r}x\left( t \right)-W_{2}^{r}H\left( t-1 \right)-{{B}^{r}}}\right)} \right]}^{-1}} \right]-2{{B}^{h}}}\right)} \right]}^{-1}}-1 \right]\odot \\
 \;\;\;\;\;\;\;\;\;\;\;\; {{\left[ 1+{exp\left({-W_{1}^{u}x\left( t \right)-W_{2}^{u}H\left( t-1 \right)-{{B}^{u}}}\right)} \right]}^{-1}}; \\
 \text{here,\; x = input, t = time, u = update gate, r = reset gate, h = candidate hidden state, H = hidden state value, } \\
 \text{W}_{n}^{g}\text{ = }{{\text{n}}_{th}}\text{ weight matrix of gate/state g, }{{\text{B}}^{g}}\text{ = bias of gate/state g, }\odot \text{ = Hadamard Product}
\end{array}\]

Bidirectional \cite{bidirectional} operation of such sequence-processing unit accumulates both the preceding hidden-state information during forward propagation and succeeding hidden-state information during backward propagation so as to produce single output for the corresponding single input, and pledges more accurate output than unidirectional layer for the dataset of this experiment since information from both past and future is preserved. Bidirectional outputs for default backward layer were being concatenated in this experiment, however, output for other available merge-modes and custom backward layer as well are yet to be explored.

\subsubsection{Multi-Head Self Attention}
\label{subsec:attention}
Self attention \cite{attention} is a scoring mechanism for each sample of an input sequence with respect to that particular sequence based on a context in which input samples interrelate with each other using Query, Key, Value matrices with a view to finding out valuable portions and give attention score to each sample accordingly. Multi-Head (say, number of heads = N) Self Attention gives the opportunity to score based on N representation contexts or subspaces using N-sets of Query, Key, Value matrices and final scores from each head are concatenated together. If X be the input array to an attention layer and W be the weight matrices, then Multi-Head Self Attention Score can be expressed as,
\[\tag{12}\text{Score}=\left[ {{W}_{Final}} \right]\times \underset{\text{for Head = 1\;to\; }\!\!\#\!\!\text{ Heads}}{\mathop{\text{Concatenate}}}\,\left( \frac{{exp\left({\frac{\left[ \left[ X \right]\times \left[ W_{Query}^{Head} \right] \right]\times {{\left[ \left[ X \right]\times \left[ W_{Key}^{Head} \right] \right]}^{Transpose}}}{\sqrt{\text{Key-array dimension}}}}\right)}}{\sum\limits_{\text{array element}=1}^{N}{{exp\left({\frac{\left[ \left[ X \right]\times \left[ W_{Query}^{Head} \right] \right]\times {{\left[ \left[ X \right]\times \left[ W_{Key}^{Head} \right] \right]}^{Transpose}}}{\sqrt{\text{Key-array dimension}}}}\right)}}}\times \left[ \left[ X \right]\times \left[ W_{Value}^{Head} \right] \right] \right)\]

\subsubsection{Skip Connection}
\label{subsec:skip_connection}
In the proposed model, 30\% of each array element of the multi-head self-attention score is added to the 70\% of that particular corresponding element of the input array to attention layer for which the score is calculated. In other words, attention score array is given 30\% weight, input array to attention layer is given 70\% weight, and then added together.

\subsubsection{Dense Layer}
\label{subsec:dense}
A dense layer consists of a number of nodes, also known as neurons, wherein each node takes input from all or most (controlled by dropout ratio) of the nodes of the preceding neural network layer for calculation of probabilities using specified activation function.

\subsubsection{Dropout Layer}
\label{subsec:dropout}
To control the data overfitting, dropout layer randomly disconnects certain nodes of a neural network layer by setting input values to 0 during each step of the model training procedure. Percentage of dropped out node is controlled by the user defined parameter dropout-ratio. Thus, the weights are trained to be immune to overfitting. However, this layer only works during model training but stays dormant during model test-phase and in application.

\subsubsection{Custom Test Prediction Smoother}
\label{subsec:smoother}
Few very-small chunks of oscillatory predictions were being observed in the test prediction that was changing within nano-seconds especially during interaction transition and other parts. But human-to-human interaction cannot change abruptly within nanoseconds. A custom smoother was designed using 1 moving point and 20 mode point in order to rectify the problem. If the mode of the classifications of 20 sample-points preceding and 20 sample-points succeeding to a single sample-point is similar, then the classification of that single sample-point is set equal to the mode classification; if not, then left as it is.

\vspace{8pt}
\noindent The overall training is performed through 4-Fold cross-validation and thus four trained model weights have been generated and saved. During Test-phase, each of the test *.mat file is classified using all those four trained model weights separately and the mode of the classification of each Wi-Fi packet (i.e. time-stamp) is considered as the classified interaction. Then again, the classified array is rectified using a custom Test Prediction Smoothening process having 20 mode point and 1 sliding point. This classified array is considered as the final time-series classification of 1560 Wi-Fi packets of each data *.mat file. Thus, the highly accurate and minimal interaction-transition region error (Figure-\ref{fig: GUI}) is ensured by the proposed solution. The model was optimized using Adam optimizer, 300 epochs with early stopping criterion and mini-batch size 12. Reliable learning rate was adapted using ReduceLROnPlateau function.

\vspace{8pt}
\noindent It is to be mentioned that, the performance metrics (accuracy, precision, recall, loss) reported for training are obtained from model training and test-loss during model test using Keras evaluation metrics but the performance metrics (accuracy, precision, recall, F1-score) reported for test are obtained after test prediction smoothening and then using weighted average Scikit-learn metrics.

\subsection{Executable Graphical User Interface Software Design}
\label{subsec:gui_app}

To make the proposed solution user-friendly, an executable (not standalone) graphical user interface (GUI) software has been developed using PyQt5 \cite{pyqt5} GUI app builder Python module so that the user can provide particular input file to the software and within a while can get the classified results directly plotted on-screen in a time-series fashion, the classification results are being saved to the computer simultaneously for later use. With this executable software, a user can classify either a particular trial file or an entire folder containing multiple trial files that will be fetched by QFileDialog box and the selected directory-path will be displayed on a text-label. The application is designed such that it will search for how many trained models (*.h5 file) are present in a folder named `cloverleaf', use all of them and calculate the mode during classification of the trial file. This gives full control over the user to download and use as many trained models as desired (higher, the better). The software can automatically detect and activate the GPU (if present) of the user device for faster calculation, however, it will calculate at a slower speed if GPU is missing in the device. The procedural progress will simultaneously be displayed on a progress bar and on an inactive push-button label. Following completion, the classified trials will be saved as a *.csv file in a datetime-bearing folder in the working directory, the path of which will be displayed on a text label. Finally, the classified trials will be plotted on QtWebEngine using the Plotly Offline python module and the plots can be switched back and forth by rotating a knob on the right-screen. A user notification will also appear at the bottom of the screen with instructions on graphics control. The program is made capable to scan the data file for the true target labels, plot them alongside the classified labels, and omit true label plots if they are not found.

\vspace{0.6cm}
\noindent Model training and test-evaluation were performed using Google Colaboratory free plan (used scipy v1.7.2 and TensorFlow framework) but GUI software was designed and evaluated using personal laptop having following configurations: $8^{th}$ Generation Intel\textsuperscript{\textregistered} Core\textsuperscript{TM} i5-8250U processor, 8GB DDR4 RAM, 4GB DDR3 NVIDIA GeForce 940MX CUDA-enabled graphics card, Python v3.9.3 with PyCharm Community Edition v2021.3 IDE running on Windows 10 operating system.

\section{Result and Discussion}
\label{sec:result}

The contribution to this human-to-human mutual interaction recognition study is structured within three experiments.

\vspace{2mm}

\begin{itemize}[noitemsep, topsep=0pt, leftmargin=*]
    \item[i.] The first experiment is focused on determining whether and to what extent the Wi-Fi signal along with channel parameters used in analysis are capable of mutual interaction recognition via the proposed deep-learning model. Experiment-1 involves training and model evaluation using the first pair of subjects (S1-S47), i.e. single folder containing 120 trials.

    \item[ii.] Micro-variation is introduced to the feature pattern describing similar interaction in case of multiple subject-pairs because of their diversified height, weight, gesture-style and clothing. Such physiological varieties are the source of slightly different pattern of body-reflected signal for the similar interaction performed by different subject-pairs that results in the aforementioned micro-variation of the feature pattern. The second experiment explores whether the proposed model can withstand these micro-variational pattern changes and whether the model gives satisfactory performance on test-data involving multiple subject-pairs if the model is properly trained with data from those specific subject-pairs. Experiment-2 is conducted on the first-ten pair of subjects (S1-S47 to S16-S41), i.e. 10 folders containing 1200 trials.

    \item[iii.] To explore the pertinent obstructions and the usage feasibility of the trained models obtained from experiment-2 in case of an unknown situation, a cross-test is performed in experiment-3 on the second-ten pair of subjects (S18-S57 to S34-S30).
\end{itemize}

\vspace{2mm}

\noindent All the three experiments are set to be involved in classifying thirteen distinct mutual interaction target-classes. Learning curves obtained during the proposed deep-learning model training-phase are depicted in Figure \ref{fig: learningperformance}, the confusion matrices are portrayed in Figure \ref{fig: confusionmatrix}, and the performance metrics of the three experiments are tabulated in Table \ref{tab: PerformanceMatrices}.

\begin{figure*}[htbp]
\centering

\resizebox{!}{20.7cm}{\includegraphics{figures/fig3_learningperformance.pdf}}

\caption{{Training and cross-validation performance: (a) Fold-3 of Experiment-1, (b) Fold-2 of Experiment-2. Vertical line and legend values correspond to the best epoch based on the best validation accuracy. Learning performance of the remaining folds can be viewed from \textbf{Supplementary Materials}}}
\label{fig: learningperformance}
\end{figure*}

\vspace{4pt}
\noindent \textbf{Experiment 1:} It is observed that, whilst in training with $60:20$ $training:validation$ data for four folds, the model performed best on the third fold of cross-validation data showcasing more than 95\% performance metrics in case of single human-pair interaction, around 90\% performance metrics were being observed for another two folds, and the minimal performance metrics were found to be around 80\%. Trained models of all the remaining folds exhibited more than 90\% test benchmark on the remaining 20\% data except for the poor-performing fold which showed 88\% metric-value in the test-phase of experiment-1. Generalized classification from the mode of the predicted targets in the test-phase using the four trained models achieved around 94\% test benchmark which is the best in experiment-1 and also identical to its second fold. Confusion matrix Figure \ref{fig: confusionmatrix}(a) also validates the underlying reason behind such high performance. Misclassifications observed in case of `steady-state' are especially around the transition points from steady-state to another state or vice versa in a particular trial since Wi-Fi packets arrive within nanoseconds and thus the model gets blindfolded around the transition-points that produces swift dangling classification for few vicinal Wi-Fi packets. Apart from that there is almost no misclassification as can be verified from the confusion matrix of experiment-1. These findings prompted the study to continue investigation for the higher number of subject-pairs that the available RAM could accommodate.

\begin{figure*}[htbp]
\centering

\resizebox{!}{20.7cm}{\includegraphics{figures/fig4_confusionmatrix.pdf}}

\caption{{Confusion matrix after test evaluation (a) Experiment-1: Mode Prediction of 4 Folds on 24 trial test-files, (b) Experiment-2: Mode Prediction of 4 Folds on 240 trial test-files, (c) Experiment-3 on new 1200 trial test-files. Remaining confusion matrices can be viewed from \textbf{Supplementary Materials}}}
\label{fig: confusionmatrix}
\end{figure*}

\vspace{4pt}
\noindent \textbf{Experiment 2:} On the next step for the experiment-2, ten subject-pairs had been considered at once and further processing was carried out in the same way as experiment-1. Cross-validation performance in this case was noticed to be ranging between 80\% to 88\%, whereas the second fold of data performed the best with 87.1\% accuracy, 88.65\% precision, 85.82\% recall, and sparse categorical cross-entropy loss was minimized to 0.3997. Even though the trained model from third-fold data achieved the best individual test benchmark (86.5\%), generalized classification via mode-calculation of the predicted targets from four trained models outperformed each of the individual test performance metrics manifested with 88.3\% accuracy, 88.7\% precision, 88.3\% recall and 88.4\% F1-score. It is quite remarkable that inclusion of human-to-human interaction data performed by ten subject-pairs reached 88.5\% test benchmark which is relatively near to that for single human-pair. The test classification plot reveals that after training with huge amount of data from ten subject-pairs, the rapid oscillatory classification around transition points reduced noticeably to a trifling amount compared to experiment-1. A small number of misclassifications on few particular classes except steady state as seen from confusion matrix Figure \ref{fig: confusionmatrix}(b) are due to either partial or infrequent complete misclassification of a particular trial. It is worth noting that the misclassified interactions have certain portions that are quite symmetrical to one another. For example, pointing or punching with right/left hand and high-five produces similar type of signal reflections from human body starting at the beginning of the interaction until just before pointed or punched either with right or left hand or given high-five.

\vspace{4pt}
\noindent \textbf{Experiment 3:} So far, everything has worked out well because we are able to classify time-sequence data and can even observe for how long the human-to-human interaction had been performed. Now comes the difficult part. Is the trained deep learning model capable of doing well on completely new subject-pairs for which it has never been trained? If not, what are the issues that the next research perspective should address? To reach these points, experiment-3 was carried out as a cross-test on the second-ten pair of subjects (S18-S57 to S34-S30). The four trained models from experiment 2 on 720 trials were used to test on 1200 subsequent trials, however the outcome was not satisfactory showing 50\% test benchmark. The confusion matrix of experiment-3 is given in Figure \ref{fig: confusionmatrix}(c), and performance metrics of the three experiments are tabulated in Table \ref{tab: PerformanceMatrices}.

\begin{table*}[t]
\caption{Performance metrics for three experiments conducted on the whole}
\centering

{\begin{tabular}{cccccccccccc} \toprule
\multicolumn{12}{l}{\textbf{Experiment-1: Single Pair (S1-S47)}}  \\ \midrule
\multirow{2}{*}{Fold} & & \multicolumn{4}{c}{Cross-Validation Set} & &  \multicolumn{5}{c}{Test Set}   \\ \cmidrule{3-6} \cmidrule{8-12}
& & Accuracy & Precision & Recall & Loss & & Accuracy & Precision & Recall & F1-Score & Loss   \\ \midrule
1 && 0.8018 & 0.8143 & 0.7965 & 0.9837 && 0.883 & 0.905 & 0.883 & 0.880 & 0.716 \\
2 && 0.9365 & 0.9413 & 0.9335 & 0.2637 && \textbf{0.937} & 0.943 & \textbf{0.937} & \textbf{0.935} & \textbf{0.259} \\
3 && \textbf{0.9547} & \textbf{0.9566} & \textbf{0.9524} & \textbf{0.1626} && 0.913 & 0.920 & 0.913 & 0.912 & 0.412 \\
4 && 0.8984 & 0.9079 & 0.8939 & 0.3782 && 0.911 & 0.926 & 0.911 & 0.909 & 0.504 \\
Mode$^*$ && -- & -- & -- & -- && 0.936 & \textbf{0.944} & 0.936 & \textbf{0.935} & -- \\ \midrule \\ \midrule

\multicolumn{12}{l}{\textbf{Experiment-2: First Ten Pairs (S1-S47 to S16-S41)}}  \\ \midrule
\multirow{2}{*}{Fold} & & \multicolumn{4}{c}{Cross-Validation Set} & &  \multicolumn{5}{c}{Test Set}   \\ \cmidrule{3-6} \cmidrule{8-12}
& & Accuracy & Precision & Recall & Loss & & Accuracy & Precision & Recall & F1-Score & Loss   \\ \midrule
1 && 0.8030 & 0.8179 & 0.7927 & 0.7288 && 0.830 & 0.835 & 0.830 & 0.830 & 0.635 \\
2 && \textbf{0.8710} & \textbf{0.8865} & \textbf{0.8582} & \textbf{0.3997} && 0.858 & 0.862 & 0.858 & 0.859 & 0.452 \\
3 && 0.8601 & 0.8793 & 0.8393 & 0.4090 && 0.865 & 0.872 & 0.865 & 0.866 & \textbf{0.422} \\
4 && 0.8258 & 0.8407 & 0.8146 & 0.6439 && 0.829 & 0.832 & 0.829 & 0.828 & 0.607 \\
Mode$^*$ && -- & -- & -- & -- && \textbf{0.883} & \textbf{0.887} & \textbf{0.883} & \textbf{0.884} & -- \\ \midrule \\ \midrule

\multicolumn{12}{l}{\textbf{Experiment-3: Cross Test. Saved Models of four folds from Experiment-2 used to Test Whole Second}} \\
&& \multicolumn{10}{l}{\textbf{Ten Pairs (S18-S57 to S34-S30).}}  \\ \midrule
\multirow{2}{*}{Fold} & & \multicolumn{4}{c}{Cross-Validation Set} & &  \multicolumn{5}{c}{Test Set}   \\ \cmidrule{3-6} \cmidrule{8-12}
& & Accuracy & Precision & Recall & Loss & & Accuracy & Precision & Recall & F1-Score & Loss   \\ \midrule
Mode$^*$ && -- & -- & -- & -- && 0.506 & 0.501 & 0.506 & 0.489 & -- \\

\bottomrule
\multicolumn{12}{r}{\small *Classified using the four trained models and used their `Mode' as final classified label}
\end{tabular}}
\label{tab: PerformanceMatrices}
\end{table*}

According to Ashleibta et al. \cite{CSI5G} and Damodaran et al. \cite{ubuntucsi}, IEEE 802.11n compatible Wi-Fi access points employ 56 subcarriers while modulation, however the Intel 5300 NIC only reports 30. Channel State Information data of remaining 26 subcarriers are lost and hence 46\% of the data were not involved in analysis. Again, the whole dataset contains 4800 trial files for 40 distinct subject-pairs, but because this study was conducted using the Google Colaboratory free plan, only 720 trials (60\% training data of 1200 in-total) from 10 subject-pairs could be used for the proposed deep-learning model training at once due to RAM limits. As a result, a bulk of micro-variation of CSI patterns from different subject-pairs (caused by different subject-specific style of gestures and variational signal fading due to unique lossy human body medium for different height and weight) were missed during the training phase. On a broad scale, these could be the possible reasons behind Domain-Shift Problem \cite{domain_shift} encountered in experiment-3. To reduce the difficulties seen in experiment 3, various Domain-Adaptation \cite{domain_adaptation1, domain_adaptation2} strategies along with sophisticated signal pre-processing techniques and inclusion of CSI data for all 56 subcarriers should be incorporated in future study.

\vspace{4pt}
\noindent \textbf{Executable GUI Software Demonstration:} Experiment-2 demonstrates that the proposed classifier model can recognize human-to-human interactions with reasonable performance metrics having upto ten subject-pairs if the model is well-trained with the data regarding those specific subject-pairs. So in the end, a PyQt5 \cite{pyqt5} graphical user interface (GUI) software (Figure-\ref{fig: GUI}) was developed to conclude this study utilizing the trained models from experiment-2. A video showcasing the software demonstration along with the software itself can be obtained from \textbf{Supplementary Materials}.

\begin{figure*}[h]
\centering
\resizebox{16cm}{!}{\includegraphics{figures/fig5_GUI.pdf}}
\caption{{Graphical User Interface (GUI) software designed using PyQt5. A video showcasing the software along with the software itself can be obtained from \textbf{Supplementary Materials}}}
\label{fig: GUI}
\end{figure*}

\section{Future Scope}
\label{sec:scopes}
This research work developed the mutual interaction recognition model based on the dataset collected in a laboratory setting. Public deployment of such a recognition model still requires to overcome enormous challenges to achieve the pinnacle. One such obstacle is to explore and overcome the interclass pattern similarity problem due to different interactions having almost similar gesture-style. Another one is intraclass pattern variation due to dissimilar height-weight-clothing-gesture style of different subject pairs involved in mutual interaction. Sensitive environmental conditions such as weather, noise, inter-device interference, occlusions due to indefinite indoor objects, transmitter-receiver separation and location of the interaction occurrences within the room also contribute a lot to the intraclass pattern variation in real-world scenario.

To reach the goal, more efficient pattern diversities might be discovered in future via extraction of additional informative features through incorporation of advanced signal processing techniques. Simultaneous inclusion of model-based approaches along with the deep learning approaches and inheriting domain adaptation techniques can be a promising remedy to the changes in the data distribution problem. Discovering alternative to network interface card for CSI data acquisition containing information of all the 56 subcarriers and calibrating the model with a large volume of training instances characterized by wide-ranging environmental and fabricated factors are still a few paramount areas of investigation that need to be unfolded. Another promising successor of this proposed article can be indoor human-pair occupancy counting. To get the ultimate implications of this study, future research work could also address concurrent recognition of spontaneous (another interaction whilst in the middle of a particular interaction, e.g. sudden kick while departing) and multiple mutual interactions performed by any number of subject-pairs present in the room or by more than two individuals in a group.

\section{Conclusion}
\label{sec:conclusion}
This paper presents a comprehensive Wi-Fi-based deep learning solution for recognizing a sequence of human-to-human reciprocal interactions based on unique spatio-temporal pattern of continuous channel information data-stream. The early stage illustration highlights the ambient and synthetic attenuation factors which influence Wi-Fi signal propagation regardless of any human presence. While performing interpersonal interactions in an indoor environment, signal is reflected from the human body due to line-of-sight human existence. Investigations reveal that the proposed Attention-BiGRU deep learning solution can be applied to recognize reciprocal interactions performed by minimal subject-pairs with around 94\% fidelity. The evaluations are as well 88\% authenticated upon proper training with data from ten subject-pairs, indicating that the suggested model can endure subtle physiological variations. In fact, it is also possible to observe the temporal extent of mutual interactions performed by a specific subject-pair using the developed executable GUI software. These achievements prove that there is a strong link between human interactions and Wi-Fi channel parameters. Moreover, the entire method protects the privacy of residents of an interior environment by operating in a contactless mode that does not use any imaging technique. The cognitive ability of this technology possesses significant potential for indoor activity monitoring, surveillance system, smart health monitoring systems and independent assisted living.

\section{Supplementary Materials}
\label{sec:supp_link}

\begin{itemize}
    \item[-] All Learning Curves and Confusion Matrices: supplementary\_materials/sup1\_All\_Performance\_Figures.pdf
    \item[-] GUI Application Demonstration Video: supplementary\_materials/sup2\_App\_Demo.mp4
    \item[-] GUI Application GitHub Repository: Link will be included to the Accepted Camera Ready Version of the Article
\end{itemize}

\section{Author Statements}
\label{sec:auth_contr}
\textit{Abdullah Bin Shams and Mohsin Sarker Raihan:} Idea generation, Research validation, Project administration and Supervision, Writing - Quality control.

\textit{Md. Mohi Uddin Khan:} Methodology, Software, Formal analysis, Research validation, Visualization, Writing - Original Draft and Editing.

Finally all authors reviewed and discussed on the article, provided critical feedback and contributed to the final manuscript.

\section{Research Funding}
\label{sec:funding}
This research did not receive any specific grant from funding agencies in the public, commercial, or
not-for-profit sectors.

\section{Declaration of Competing Interest}
\label{sec:interest}
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this article.

\bibliographystyle{elsarticle-num}

\section{Introduction}
\label{sec:Introduction}
Automated Human Activity Recognition (HAR) has achieved considerable attention for application in multifarious domains like automated surveillance and security system in healthcare monitoring, smart home, old home, baby care center, day care center for children with special needs (i.e. autism and related disorders), assisted living for impaired people, dormitories, military out-of-bounds area, criminal detection and digital-forensic investigation, prison cells etc. In view of the fact that manual surveillance by human operator is costly and not always feasible, multitude of Commercial Off the Shelf Wireless Local Area Network (COTS-WLAN), Computer Vision, Wearable Sensor, Radar, Bluetooth based artificial intelligence systems for automated indoor-outdoor human gesture and activity detection have already been proposed. Many emerging research projects are still in progress with a view to developing ways of point-of-care service for assuring safety, security and well-being.

Ranasinghe et al. \cite{comboreview1}, Zhang et al. \cite{comboreview2} and Beddiar et al. \cite{comboreview3} conducted an extensive survey on 130, 170 and 230 research articles respectively that worked on popular human activity recognition datasets involving spatio-temporal data collected by sensors like accelerometer-gyroscope-RFID-fiberoptic-wearables etc., computer vision, and multimodal audio-visual-sensor based recognition and notification system to the corresponding supervisor or caregiver situated nearby. Authors reviewed the adopted feature extraction techniques and artificial intelligence driven classification models. They enlisted comparison of HAR approaches along with automated HAR application domains  including commercially funded projects on active-assisted living for elderly and disabled in smart homes, patient monitoring in medical environments, airport-subway-metrorail surveillance, sport and outdoor, tele-immersion, and so on.

Golestani et al. \cite{MIsensor} designed a wearable magnetic induction (MI) transmitter-receiver coil. The MI coil is facilitated with L-reversed impedance matching network that uses magnetic induction signals for artificial intelligence dependent human activity recognition. The study necessitated to wear on one receiver MI coil in the subject's waist and eight transmitter MI coils in the subject's skeleton bones.  Long-Short Term Memory (LSTM) outperformed in MI signal variation classification compared to other five machine learning algorithms used in the study.

However, computer vision incorporates imaging techniques using video camera that might not be suitable in all circumstances for personal privacy \cite{camprivacy1, camprivacy2} reasons especially in indoor residential environments. Moreover, it demands for high power, necessary infrastructure, data traffic and memory usage that might not be economical, perhaps wastage in many situations. Wearable sensor for human activity detection often times fall short on ensuring proper security \cite{sensorprivacy} since it might expose GPS location or personal health data. In addition, it's not possible to make obliged everyone to wear such gadget all the time due to discomfort, health-risks, unwillingness and battery longevity. Radar and ultrasonic technology for human activity detection in indoor environment requires additional electronic devices \cite{radar1, radar2, ultrasonic} to be equipped with, which is consistently not being used in regular standard of living.

In such context, radio frequency inspection from WLAN network such as Wi-Fi channel perturbation analysis offers a better economical choice \cite{csibetter} for human activity recognition since Wi-Fi communication is extensively used nowadays in daily life which is already in the palm of our hand. A Wi-Fi communication device transmits radio signal as electromagnetic waves modulated on an integer number of frequency division multiplexed carriers which are orthogonal to each other. Intuitively, human activities and mutual interactions performed within the line-of-sight Wi-Fi coverage area create distinct changes to the transmitted signal due to unique pattern of signal reflections from human-body that is performing unique activities. Those activities or mutual interactions can be detected and classified through analysis of correlation between the signal changes and body movement using signal attributes of a Wi-Fi transceiver pair such as packet delay, coarse-grained Received Signal Strength Indicator (RSSI), accumulated noise, automatic gain control parameter of the receiver circuit, and fine-grained Channel State Information (CSI). The unique distinction among the parametric pattern caused by various human-activities can be better detected via artificial intelligence techniques. The overall procedure is neither intrusive nor obtrusive because it does not capture visual data and the entire process runs contactless for safeguarding privacy.

A survey report \cite{csi_review} discussed on the pros and cons of different Internet-of-Things (IoT) protocols with research advancements in RF based gesture or activity recognition. Authors compared the performance of recent state-of-the-art proposals on body-sensor, video camera, WLAN Received Signal Strength Indicator (RSSI) and Channel State Information (CSI) based single or multiple human independent activity recognition models incorporating various signal processing dependent pre-processing and feature extraction techniques with their application and performance. Authors of the survey report confined their maximum focus on the WLAN approaches due to its immense potential \cite{CSI5G} and narrated that the recognition accuracy with CSI is way higher than RSSI of Wi-Fi signal because CSI provides amplitude and phase information for each subcarrier frequency of OFDM modulation per packet of the multiple-input multiple-output (MIMO) transmission. But RSSI provides only single magnitude value per packet. The article further shed light on both the processed and raw CSI data analysis using mathematical model-based approaches \cite{modelbasedcsi_review} like CSI speed-activity-mobility-ratio-quotient model, Angle of Arrival model, Fresnel Zone model along with learning-based approaches dependent on feature extraction, machine and deep learning. Deep learning approaches, especially Convolutional Neural Network, have lately become much popular due to their automated ability of feature extraction from raw CSI data with large volume of data handling capacity even though it is observed to have more publications with machine learning in earlier era. Recurrent Neural Network (RNN) models like vanilla RNN, LSTM are also being adopted \cite{ieeelstm1, ieeelstm2} nowadays by few researchers because of their time-sequence classifying propensity.

Damodaran et al. \cite{ubuntucsi} conducted a study on walk-run-sit-stand-fall-empty room detection, and human occupancy (the number of people in the room) counting at living room and hallway environment using two laptops running on 64 Bit Ubuntu operating system equipped with Intel 5300 NIC served as 1x3 Tx-Rx system. Authors extracted CSI values using Linux 802.11n CSI Tool and only the CSI amplitude is considered for analysis. They proposed two models for activity recognition, viz. Support Vector Machine (pre-processing done using discrete wavelet transform for noise reduction, principal component analysis for dimensionality reduction and feature extraction conducted using power spectral density, frequency of center of energy, Haart wavelet analysis), and LSTM (raw data used after denoising via discrete wavelet transform).

Nonetheless, Ashleibta et al. \cite{CSI5G} pointed out, also reported by Damodaran et al. \cite{ubuntucsi}, a major drawback of Network Interface Cards (NIC) used for controlling flow of the data over Wi-Fi link and channel data estimation. IEEE 802.11n compliant Wi-Fi access points use 56 subcarriers during OFDM modulation but Intel 5300 NIC at the receiver side can report data for utmost 30 subcarriers while CSI information of remaining 26 subcarriers is lost. Simultaneous use of NIC for networking function and CSI estimation using external tools for human activity recognition may hamper the reliability of NIC's long-term performance as well. To avoid these problems, Ashleibta et al. \cite{CSI5G} claimed to be the pioneering developer of human occupancy (the number of people in the room) counting and their parallel multi-activity (performing at 4 distinct positions of the room) recognition deep 1D-CNN model using CSI (amplitude only) generated by two Universal Software Radio Peripheral (USRP) \cite{usrp1, usrp2} formed Single-Input Single-Output (SISO) communication system operated at 3.75 GHz carrier frequency which falls under the 5G frequency band (3.4-3.8 GHz). Their generated dataset consists a total of 1,777 trials having 16 combinations of 3 distinct activities (sitting, standing, walking) along with empty room performed by 4 subjects in a lab setting. The developed recognizer model comprises a data pre-processing step formed of mean CSI amplitude finder across all 51 subcarriers, fourth order Butterworth lowpass filter for noise reduction, 3-level discrete wavelet transform calculator followed by the classifier model formed of 13 1D-CNN layers and 5 max pooling layers. Authors reported the accuracy of parallel multi-activity recognition experiment to be around 80\% and accuracy of occupancy experiment ranging between 86\%-95\%. They also justified the superiority of their USRP formed 5G enabled SISO system because of more discernible CSI pattern formation compared to a WiFi-NIC system operating at 5 GHz frequency band.

Despite plausible advances in the HAR domain, all the existing studies using WLAN RSSI-CSI data are focused solely on recognizing independent activities performed by single or multiple subjects. But the recognition of reciprocal gestures or interactions between two individuals using WLAN RSSI-CSI data still remains obscure. A few computer-vision \cite{videoh2hi1, videoh2hi2, videoh2hi3} and ultra-wideband-radar \cite{radarh2hi} based frameworks for recognizing two-human interactions have been proposed however. Cases of physical abuse by babysitters against toddler or teenagers \cite{babysit}, maltreatment with teenagers in residential care along with forced criminalization \cite{carecenter, youthviolence}, parental control over children left at home by employed parents, incidents of hazing at colleges and dorms \cite{hazing1, hazing2, hazing3}, monitoring at cleanroom of manufacturing lab \cite{cleanroom1, cleanroom2}, monitoring of suspicious and aggressive behavior in a constrained area like prison or restricted zone for servicemembers necessitate continuous surveillance of human-to-human physical interactions while securing the personal privacy and minimizing monetary cost.

\vspace{2mm}
\noindent Considering the facts mentioned above,

\vspace{2mm}

\begin{itemize}[noitemsep, topsep=0pt, leftmargin=*]
    \item[i.] To the best of the authors' knowledge, this is the \textbf{first time} that this study has been undertaken on deep-learning based \textbf{human-to-human mutual interaction recognition} utilizing \textbf{first-ever published and publicly available relevant Wi-Fi dataset} \cite{dataset}.

    \item[ii.] Li et al. \cite{radarBiGRU} delineated the superiority of Bidirectional Gated Recurrent Neural Network Unit (BiGRU) model on single-human independent-activity recognition compared to RNN, BiRNN and GRU model; though the authors used `wideband radar waveform' obtained from RADAR High Resolution Range Profile signal. Because the BiGRU deep learning algorithm accompanied by the Attention mechanism has recently gained considerable attraction for time-sequence data classification such as https traffic classification \cite{grutrend1}, eeg-based emotion classification \cite{grutrend2}, P300 EEG signal classification \cite{grutrend3}  and because the model has certain strengths as mentioned in section-\ref{sec:methodology}, this experiment took the chance to investigate the potential of the Attention-BiGRU deep learning model for \textbf{`human-to-human'} \textbf{`mutual interaction'} classification in an indoor setting using \textbf{`Wi-Fi data'}.

    \item[iii.] First, the investigation was conducted on a single subject-pair in order to develop a greater understanding of the influence of channel metrics diversity of the dataset features. Our proposed deep-learning model demonstrated a high performing mutual interaction recognition results on single human subject-pair.

    \item[iv.] The study was further conducted on ten subject pairs for validating the high performance under influence of variegated subject-pairs and clearly this also exhibited reasonable classification performance indicating that the model can be trained and applied for upto ten subject pairs.

    \item[v.] But the cross-test experiment on new subject-pairs produced worse results which indicates that profiling of mutual interaction features from untrained subject-pairs protrudes more complicated channel metrics diversity.

    \item[vi.] Alongside the proposed solution, further discussion on such worse result in cross-test experiment pointed out the possible pitfalls and provided suggestions that need to be taken care of in further research.

    \item[vii.] To develop an overall software framework and visually depict the classifications, the study eventually developed a graphical user interface (GUI) executable (not standalone) software designed using PyQt5 \cite{pyqt5} GUI app builder Python module.
\end{itemize}

\vspace{2mm}
Remaining of the article is organized as follows: Section-\ref{sec:data_desc} delivers an overview of the dataset and challenges with the recorded pattern of the time-series data values for different mutual interactions. Section-\ref{sec:wlan_theory} describes the feature variables provided with the dataset. Experimental framework, proposed deep-learning model description and executable GUI software description are introduced in section-\ref{sec:methodology}. Research outcomes and perceived hindrances are discussed in section-\ref{sec:result}. Future research prospects are narrated in section-\ref{sec:scopes}. The article is concluded with section-\ref{sec:conclusion} delivering the supplementary materials in section-\ref{sec:supp_link}.

\section{Dataset Description}
\label{sec:data_desc}

To explore the philosophy of human-to-human interaction recognition via Wi-Fi data classification using Artificial Intelligence (AI), this study opted to take advantage of \textit{`the only available first-ever published Wi-Fi-based human-to-human interaction dataset'} by Alazrai et al. \cite{dataset} contemplating 13 activities performed by two individuals in the central area between 4.3 meters apart Wi-Fi access point and Network Interface Card (NIC) kept in Line-of-Sight (LOS) manner targeting each other in an indoor environment (5.3 square meters furnished room). A publicly available CSI tool \cite{csi_tool} had been used to record Wi-Fi data and the device configurations are depicted in Figure \ref{fig: MIMO}.

The dataset comprises 40 folders for interactions performed by 40 different subject-pairs. Each folder contains 12 sub-folders for 12 different interactions. Each sub-folder contains 10 different data (*.mat) files containing Wi-Fi packet data [viz. Wi-Fi packet arrival timestamp, number of transmit and receive antennas (NTx, NRx), channel noise, automatic gain control (AGC in dB), received signal strength indicator (RSSI in dB) at the 3 receive antennas, complex valued channel state information (CSI) and interaction label] for 10 trials of each interaction. The complex valued CSI array is of order (NTx, NRx, NSc) = (2, 3, 30) where, NSc = Number of Subcarriers used during OFDM modulation.

It's to be noted that each trial is composed of 2 interactions (steady-state and any of the 12 interactions), that's how 13-interactions altogether. The 13 human-to-human interactions are: steady-state, approaching, departing, handshaking, high-five, hugging, kicking (left-leg), kicking (right-leg), pointing (left-hand), pointing (right-hand), punching (left-hand), punching (right-hand), and pushing.

It's also to be noted that, the data files are of unequal time-series length, i.e. time-series data ranging upto 1040-2000+ Wi-Fi packets and packet arrival time-difference are also seen unequal. This occurred due to the following data acquisition time-length:

\begin{itemize}
\setlength\itemsep{0em}
    \item[--] 2.00 second for steady-state + 3.00 second for hugging or kicking or punching
    \item[--] 3.50 second for approaching + 2.00 second for steady-state (Note that, steady-state performed at the end portion only for approaching action)
    \item[--] 2.00 second for steady-state + 3.50 second for departing
    \item[--] 2.00 second for steady-state + 4.00 second for handshaking or high-five or pushing
    \item[--] 2.00 second for steady-state + 4.50 second for pointing
\end{itemize}

Such kind of time-length inequality, two interactions merged in each trial, steady-state either at the beginning or at the end portion of the trial, the difference in height-weight of 66 subjects added an extra layer of complexity to the LOS-faded Wi-Fi signal pattern-recognition AI challenge.

\section{Description of the Dataset's Feature Variables}
\label{sec:wlan_theory}

To attain the dataset, an IEEE 802.11n standard \cite{ IEEE80211n} (released in 2009) compliant 2x3 MIMO-OFDM (\ref{appendix:mimo_ofdm}) wireless LAN communication system had been used during data collection. Figure \ref{fig: MIMO} offers an exposition on the system configuration used during data collection \cite{dataset}.

\begin{figure*}[ht]
\centering
\resizebox{16cm}{!}{\includegraphics{figures/fig1_MIMO_Room.pdf}}
\caption{{Conceptualization of the 2x3 MIMO-OFDM indoor WLAN transmission system in case of two-human line-of-sight interaction. WiFi AP specifications are 2.4GHz frequency band, wireless channel no.-06, 20MHz channel bandwidth, modulation coding scheme index-08, MIMO OFDM (30 subcarriers) and IEEE 802.11n compliant device. Here, S3 represents Line-of-Sight (LOS) signal fading due to two human mutual interaction and Non-Line-of-Sight (NLOS) signals are reflected from Ceiling (S1), Wall (S2), Indoor Object (S4), Floor (S5)}}
\label{fig: MIMO}
\end{figure*}

This section provides a brief overview of the feature variables included to the dataset, the environmental factors that affect and underlie the pattern changes of those feature values when applied to indoor WLAN environments, the mathematical representation of some of those features, and some observations on a few variables in recent WLAN research works. These also illustrate the significance of using these feature variables in the experiments of this research work in order to make use of feature pattern changes to classify 13 distinct mutual human-to-human interactions using the proposed Attention-BiGRU deep learning model.

\subsection{Signal Fading and Noise}
\label{subsec:sig_fad_noise}

Unlike this particular experiment where the Line-of-Sight (LOS) faced transmitter and receiver are stationary at fixed distance (4.5 meter apart), the transmitted electromagnetic (EM) signal encounters attenuation (amplitude deviation, phase change and delay spread from multipath time-delay) due to large-scale fading (i.e. indoor path loss) and small-scale fading (i.e. absorption-reflection-diffraction-scattering-interference during multipath indoor propagation and speed of surrounding objects viz. movement of two human during interaction) across the propagation range of Wi-Fi signal from transmitter to receiver. The wavelength ($\lambda = 125$ mm, eq$^{tn}$-1) of the Wi-Fi signal with $f = 2.4 GHz$ carrier frequency is too small compared to 4.5m Tx-Rx distance such that EM wave propagation phenomena and equations sustain for the indoor environment.
	\[\tag{1}\lambda =\frac{c}{f}=\frac{3\times {{10}^{8}}m{{s}^{-1}}}{2.4GHz}=\frac{3\times {{10}^{11}}mm{{s}^{-1}}}{2.4\times {{10}^{9}}{{s}^{-1}}}=125mm\text{\;\; ;\; here,\;}c=\text{\;speed\;of\;EM\;wave}\]

Mean received power logarithmically reduces with distance in case of indoor path loss; hence if path loss is denoted by $P_{Loss}$, path loss exponent by n, transmitter-receiver separation by ${{d}_{Tx\leftrightarrow Rx}}$ and 1m-100m reference distance by $d_{ref}$, then free-space indoor path loss for single room can be equated from log-distance path loss model as,
\[\tag{2}{{P}_{Loss}}\left( dB \right)={{P}_{Loss}}\left( {{d}_{ref}} \right)+10n\log \left( \frac{{{d}_{Tx\leftrightarrow Rx}}}{{{d}_{ref}}} \right)\text{\;\; ;\; here,\;}n=2\text{\;for\;free\;space}\]

Transmitted EM wave strength sometimes gets partially absorbed by indoor objects like spongy-foamy couch, soft curtains, water (if any, e.g. aquarium), concrete-wall, brick-wall, metal-wall, electronic appliances (computer, refrigerator, microwave oven etc.). While obstructed by ceiling, floor, wall, humans with different weight-height and flat indoor objects, EM signal gets reflected and a trifling amount of wave bounces towards any other direction than the receiver, thus reducing received signal energy. Both partial absorption and reflection may occur simultaneously in varying amount depending on material composition and texture of the obstacle and incident angle of the signal on the obstacle.

Multiple Lambertian reflected waves generate after the EM wave gets scattered from uneven rough surface like indoor ornamental plant leaves, curly short human-hairs along direct LOS path, dust or smoke or micro-water-droplets present in the air etc. Secondary wavelets originate maintaining Huygen's principle while the transmitted EM beam gets diffracted at sharp edges (corner of walls, desk, tables, chair, ceiling fan etc.) and propagate along their split direction curving around that obstacle. These multipath propagated signals exhibit signal amplitude deviation and phase shift while received by the receiving antennas.

Transmitted signal might also encounter interference with any other radio wave (signal from another Wi-Fi router in other room, microwave oven, cellphone etc. if operating at 2.4 GHz carrier frequency band with unique modulation frequency). This also adds Additive White Gaussian Noise (AWGN) to the transmitted signal. \cite{rappaport, daniel, IndoorWLAN}

Since the Tx-Rx has LOS path (eventhough sometimes partially and randomly obstructed due to two human interactions), the small-scale fading can be simplistically expressed in a generalized fashion using Rician Fading model \cite{shankar} considering sinusoidal transmission signal having amplitude A, at a carrier frequency of $f = 2.4 GHz$ as follows,

\vspace{6pt}
\noindent Received Signal,
\[\tag{3}\begin{array}{l}
  {{R}_{Rician}}(t)={{A}_{LOS}}\cos (\omega t)+\sum\limits_{i=1}^{\#multipaths}{{{A}_{i}}\cos (\omega t+{{\phi }_{i}})}\text{\; ; \;here,\;angular freq, \;}\omega =2\pi f\text{\;and\;}\phi = \text{signal\;phase\; difference} \\

 \;\;\;\;\;\;\;\;\;\;\;\;\;={{A}_{LOS}}\cos (\omega t)+\cos (\omega t)\sum\limits_{i=1}^{\#multipaths}{{{A}_{i}}\cos ({{\phi }_{i}})}-\sin (\omega t)\sum\limits_{i=1}^{\#multipaths}{{{A}_{i}}\sin ({{\phi }_{i}})} \\

 \;\;\;\;\;\;\;\;\;\;\;\;\;=(M+{{A}_{LOS}})\cos (\omega t)-N\sin (\omega t)\text{\;\; ; \;here,\;}M =\sum\limits_{i=1}^{\#multipaths}{{{A}_{i}}\cos ({{\phi }_{i}})}\text{\;\;and\;\;}N = \sum\limits_{i=1}^{\#multipaths}{{{A}_{i}}\sin ({{\phi }_{i}})}
\end{array}\]

\noindent Received Power, \[\tag{4}P={{(M+{{A}_{LOS}})}^{2}}+{{N}^{2}}\]

\noindent Average Received Power,
\[\tag{5}\bar{P}=2{{\sigma }^{2}}+A_{LOS}^{2}\text{\;\;\; ; \;here,\; variance}:\text{\;}{{\sigma }^{2}}=\frac{\sum\limits_{i=1}^{\#multipaths}{{{({{x}_{i}}-\bar{x})}^{2}}}}{\#multipaths};\text{\;}{{x}_{i}}={{A}_{i}}\cos \left( \omega +{{\phi }_{i}} \right)\]

\noindent Rician factor, \[\tag{6}K=\frac{A_{LOS}^{2}}{2{{\sigma }^{2}}}\]

\noindent If B(.) is the modified Bessel function of first kind \cite{besselfn1, besselfn2}, U(.) is the unit step function, the Probability Density Function (PDF) of the Received Power,
\[\tag{7}PD{{F}_{Rician}}(p)=\frac{K+1}{{\bar{P}}}\exp \left( -K\left( K+1 \right)\frac{p}{{\bar{P}}} \right)B\left( 2\sqrt{\frac{K\left( K+1 \right)}{{\bar{P}}}}p \right)U\left( p \right)\]

Andjamba et al. \cite{namibiainterference} published a report on inter-network interference suffered by on-campus IEEE 802.11 standard access point operating at both 2.4 and 5 GHz carrier frequency band after two months of monitoring due to over 345 IEEE 802.11b/g/n/ac access points surrounded off-campus. Liu et al. \cite{InterNetworkInterference} proposed a novel mathematical architecture via theoretical analysis and developed an opensource program for IEEE 802.11 standard one-to-one Wi-Fi network's throughput ascertainment under the repercussion of inter-network-interference due to Wi-Fi devices of similar kind. Authors verified the analytical expressions along with the developed program using three network structures (string topology with 3 and 4 one-to-one networks, grid topology with 9 one-to-one networks) wherein they used `airtime concept' for finding out each network throughput which Wan et al. \cite{airtimeconcpet} believe handy for divulging the packet sensing duration at each node and frame collisions due to hidden nodes.

Chandaliya et al. \cite{BTInterference} observed the effect of signal interference on IEEE 802.11n standard Wi-Fi device throughput due to 2-pairs of Bluetooth devices sharing data in the vicinity of Wi-Fi range at right-angled spatial position with respect to Wi-Fi LOS link, all operating at 2.4 GHz carrier frequency band. Practical presence of Bluetooth devices decreased the Wi-Fi throughput by 6.27 dB, increased packet-arrival-time-difference by 0.26 second and increased packet-drop-rate by 2.73 times compared to ideal software simulation of Wi-Fi data sharing alone. Natarajan et al. \cite{multiInterference} also performed mathematical analysis, physical layer analysis and Medium Access Control (MAC) layer analysis on the cross-technology signal interference while in coexistence among IEEE 802.15.4, Bluetooth Low Energy (BLE) and IEEE 802.11 technologies.

\subsection{Packet Arrival Time Difference}
\label{subsec:timediff}
Sarker et al. \cite{peoplemovement} conducted an investigation using IEEE 802.11 technology at multitude of environments (office room, library, laboratory, bedroom, lunch room, lounge, garage) in order to explore the effect of empty space, two human movement (walking towards each other and random movement) on Wi-Fi link throughput originated from file sharing between two wireless laptops concluding that the average throughput performance is $2.3\pm 0.3$ Mbps. Authors also reported that the noticeable throughput deviation ($\sim 0.3$ Mbps) is seen when two human movement is introduced rather than the empty space. But the throughput deviation due to different activities performed by two humans (walking towards each other vs random movement) is $\pm 0.07$ Mbps on average which is insignificant.

This suggests that Wi-Fi packets don't arrive after constant time interval, hence there exists variational packet-arrival-time-difference caused by multipath propagation effects. This also reminds that, detection of 13 two-human-interactions from Wi-Fi signal using AI is a very much arduous task due to negligible throughput deviation for different activities performed by two humans.

\subsection{Received Signal Strength Indicator (RSSI)}
\label{subsec:rssi}
Transmitted radio EM wave encounters fading, path loss, destructive interference during multipath propagation hence loses signal power over distance or attains power in case of noise addition and constructive interference. Received Signal Strength Indicator (RSSI) is a relative measurement of the signal power received at each receive antenna and the range of the RSSI value along with calculation depends on NIC manufacturer since there is no fixed standard for RSSI calculation. The RSSI value is observed to be greatly affected in different environments in a field study \cite{RSSI} on the characteristics of RSSI, especially with the presence of objects in signal path. Recently, RSSI has also been intended to be used for applications like human localization in indoor environment \cite{RSSIlocalization}.

Therefore, RSSI values create unique variational pattern with the unique movement during different human-to-human interactions performed along signal LOS path that might be translated into meaningful classification using deep learning techniques.

\subsection{Automatic Gain Control (AGC)}
\label{subsec:agc}
Multipath propagation affects the transmitted signal amplitude (hence power) resulting to be either high, low, or just the exact at the receiving antenna. However, translatable-stable signal amplitude is an imperative for further processing of the signal using the receiver electronic circuits at which point the Automatic Gain Control (AGC) concept steps in. Delayed AGC is a feedback-controlled operational amplifier circuit including electronic switches (e.g. diode, relay etc.) aiming to dynamically adapt the output signal voltage to a set-point creating suitable DC voltage-bias using variable-gain-amplifier (VGA) and error-amplifier circuit-network so that the downstream circuit at the receiver chain gets a stable signal in the radio-frequency (RF) and intermediate-frequency (IF) stages irrespective of the varying received signal amplitude. Frequency bandwidth of the AGC circuit is defined by the operating bandwidth of the transmitter. \cite{AGC1, AGC2, AGC3}

AGC value (in dB) supplements the RSSI (in dB) deficit, that's why kept as an important feature for the proposed deep-learning model.

\subsection{Channel State Information (CSI)}
\label{subsec:csi}
Transmitted analog EM wave reaches to the receiver passing through the overall spatial environment (e.g. free space) is referred to as transmission channel. Channel conditions and properties accumulate the overall combination of signal fading (reflection, absorption, interference, scattering, path loss, packet delay etc.) due to multipath propagation and unique human-to-human interactions along LOS path. Channel State Information (CSI) (Figure \ref{fig: MIMO_CSI}) describes how the transmitted EM beam of each Wi-Fi packet passes through the channel encountering those effects and mimics the overall channel properties of a MIMO-OFDM system in the form of a (NTx, NRx, NSc)-sized array (H matrix) formed of complex elements describing magnitude and phase information of the channel impulse response which can be estimated both at the transmitter and receiver side using various channel estimation methods \cite{ChE1, ChE2}; here, NTx, NRx = Number of Transmit and Receive antennas and NSc = Number of Subcarriers used during OFDM modulation.

This experiment used (2, 3, 30)-sized complex valued CSI array that was estimated at the receiver side using a publicly available CSI tool \cite{csi_tool}.

\begin{figure*}[ht]
\centering
\resizebox{10cm}{!}{\includegraphics{figures/fig1a_CSI.pdf}}
\caption{{Intuition of CSI array for single subcarrier}}
\label{fig: MIMO_CSI}
\end{figure*}

Each Wi-Fi packet is received within very small period of time after transmission, thus, quasi-static fading and a linear-time-invariant channel is assumed. If for a multipath channel, ${{\alpha }_{k}}$ be the channel attenuation over $k_{th}$ path, $d(\tau -{{\tau }_{k}})$ be the signal propagation delay along $k_{th}$ path at ${{\tau }_{k}}$ delay index of the channel impulse response, then each element $h_{T,R,S}$ of the H matrix for $T_{th}$ transmit antenna, $R_{th}$ receive antenna and $S_{th}$ subcarrier can be expressed as \cite{IEEE80211n, phdthesis, csi},

\[\tag{8}{{h}_{T,R,S}}(\tau )=\sum\limits_{k=1}^{N}{{{\alpha }_{k}}{exp\left({-j\omega {{\tau }_{k}}}\right)}d(\tau -{{\tau }_{k}})\text{\;\;\; ; \; here,\;angular\;frequency,\;}\omega =2\pi {{f}_{subcarrier}}}\]

\noindent CSI array for each Wi-Fi packet,
\[\begin{array}{l}\tag{9}
H={{\left[ \begin{matrix}
   \left[ \begin{matrix}
   \left[ \begin{matrix}
   {{h}_{1,1,1}} & {{h}_{1,1,2}} & \ldots  & {{h}_{1,1,30}}  \\
\end{matrix} \right]  \\ \\
   \left[ \begin{matrix}
   {{h}_{1,2,1}} & {{h}_{1,2,2}} & \ldots  & {{h}_{1,2,30}}  \\
\end{matrix} \right]  \\ \\
   \left[ \begin{matrix}
   {{h}_{1,3,1}} & {{h}_{1,3,2}} & \ldots  & {{h}_{1,3,30}}  \\
\end{matrix} \right]  \\ \\
\end{matrix} \right]  \\
   \left[ \begin{matrix}
   \left[ \begin{matrix}
   {{h}_{2,1,1}} & {{h}_{2,1,2}} & \ldots  & {{h}_{2,1,30}}  \\
\end{matrix} \right]  \\ \\
   \left[ \begin{matrix}
   {{h}_{2,2,1}} & {{h}_{2,2,2}} & \ldots  & {{h}_{2,2,30}}  \\
\end{matrix} \right]  \\ \\
   \left[ \begin{matrix}
   {{h}_{2,3,1}} & {{h}_{2,3,2}} & \ldots  & {{h}_{2,3,30}}  \\
\end{matrix} \right]  \\
\end{matrix} \right]  \\
\end{matrix} \right]}_{\left( NTx,\;NRx,\;NSc \right)}}
\end{array}\]

\vspace{5mm}
\noindent Received sequence for each Wi-Fi packet at the receiving antennas,
\[\begin{array}{l}\tag{10}
 {{\left[ Y \right]}_{\left( NRx,\;NSc \right)}}=\sum\limits_{sum\_along\_Tx}{\left( {{\left[ H \right]}_{\left( NTx,\;NRx,\;NSc \right)}}*{{\left[ X \right]}_{\left( NTx,\;NSc \right)}} \right)}+{{\left[ AWGN \right]}_{\left( NRx,\;NSc \right)}} \\

 \;\;\;\;\;\;\;\;\;={{\left[ \begin{matrix}
   \left[ \begin{matrix}
   {{h}_{1,1,1}}{{x}_{1,1}}+{{h}_{2,1,1}}{{x}_{2,1}} & {{h}_{1,1,2}}{{x}_{1,2}}+{{h}_{2,1,2}}{{x}_{2,2}} & \ldots  & {{h}_{1,1,30}}{{x}_{1,30}}+{{h}_{2,1,30}}{{x}_{2,30}}  \\
\end{matrix} \right]  \\ \\
   \left[ \begin{matrix}
   {{h}_{1,2,1}}{{x}_{1,1}}+{{h}_{2,2,1}}{{x}_{2,1}} & {{h}_{1,2,2}}{{x}_{1,2}}+{{h}_{2,2,2}}{{x}_{2,2}} & \ldots  & {{h}_{1,2,30}}{{x}_{1,30}}+{{h}_{2,2,30}}{{x}_{2,30}}  \\
\end{matrix} \right]  \\ \\
   \left[ \begin{matrix}
   {{h}_{1,3,1}}{{x}_{1,1}}+{{h}_{2,3,1}}{{x}_{2,1}} & {{h}_{1,3,2}}{{x}_{1,2}}+{{h}_{2,3,2}}{{x}_{2,2}} & \ldots  & {{h}_{1,3,30}}  \\
\end{matrix}{{x}_{1,30}}+{{h}_{2,3,30}}{{x}_{2,30}} \right]  \\
\end{matrix} \right]}_{\left( NRx,\;NSc \right)}}+{{\left[ AWGN \right]}_{\left( NRx,\;NSc \right)}}
\end{array}\]

In an indoor environment having static surrounding objects at fixed position but two humans performing different mutual interactions along LOS path creates idiosyncratic channel variation over the total time period that appear to be a classifiable pattern to the proposed deep learning model.

\section{Methodology and Framework}
\label{sec:methodology}

The human-to-human mutual interaction recognition from Wi-Fi data is a time-series classification problem and for that, this study proposes an auspicious Attention Bidirectional Gated Recurrent Neural Network Unit (Attention-BiGRU) model with executable Graphical User Interface (GUI) software implementation. The proposed solution utilizes WiFi signal noise, packet arrival time difference, RSSI value of three receive antennas, AGC and CSI array data features for thirteen distinct human-to-human mutual interaction classification performed in an indoor environment within the line-of-sight Wi-Fi coverage area of the transmitted signal. The cognitive ability of the developed GUI software solution possesses significant potential for indoor activity monitoring, surveillance system, smart health monitoring systems and independent assisted living because the software can alongside plot and save the time-series data classification results with a satisfactory accuracy having minimal interaction-transition region classification errors. The overall project structure is illustrated as block diagram in the Figure \ref{fig: BlockDiagram}.

\subsection{Data Pre-processing}
\label{subsec:dat_preproc}

During data pre-processing, data were split into $60:20:20$ ratio for training-validation-test set. The algorithm at first detects the number of available Wi-Fi packets of a given sequence. Unequal length of data sequences are made equal to 1560 Wi-Fi packets by either clipping or padding of required samples because the deep learning model requires a fixed number of input data size. Then feature extraction is performed according to Figure \ref{fig: BlockDiagram}. Packet Arrival Time Difference feature is calculated from the Time-Stamp column of the original dataset. CSI array of each Wi-Fi packet of the original dataset is of $2\times3\times30$ size which is unwrapped into a 2D array, then magnitude and phase angle is calculated. Other feature values (Time Difference, Noise, AGC, RSSI of three receive antennas) are concatenated alongside the CSI array magnitude and phase. This is done for all 1560 Wi-Fi packets of each *.mat file which produces $1560\times366$ 2D array in *.csv format for each *.mat file.

\begin{figure*}[htp]
\centering
\resizebox{!}{21.3cm}{\includegraphics{figures/fig2_BlockDiagram.pdf}}
\caption{{Overall Project Structure}}
\label{fig: BlockDiagram}
\end{figure*}

The array is then undergone through Robust Scaler for standardization. Deep learning models exhibit dire performance on snaggy dataset due to outliers present in the data-features or skewed data-distribution that demands for methodical data standardization during data pre-processing step. Robust scaler takes care of the outliers present in individual feature vector by removing median, scales the values within specific range and centers-up the vector to form Gaussian distribution maneuvering $25^{th}$ to $75^{th}$ interquartile range \cite{sklearn}. Target values are encoded with One Hot Encoder for making suitable for further processing.

\subsection{Attention-BiGRU Model Design, Training and Test}
\label{subsec:model_train_test}

With the pre-processed data, model training was performed using the proposed Attention-BiGRU deep learning architecture. The proposed deep-learning architecture is a functional-type architecture comprised of an input layer, a positional embedding adder layer, two BiGRU layers having 1024 and 512 units respectively, one self-attention layer, one skip connection adder layer, two dense layers having 512 and 13 units, three dropout layers having 0.3 and 0.2 dropout ratios in order  to stay clear of overfitting issue, and one concatenation layer. Followed by the BiGRU operations, the under-processing array is fed to a Self-Attention layer having 8-heads with 64 key-dimension size. $30\%$ weighted self-attention values are added to the $70\%$ weighted previous-to-attention-values in the skip connection layer. This array is then passed through a dense layer and then the array is concatenated with the previous-to-attention layer values. Finally, this array is passed through the output dense layer having Softmax activation function that produces the time-series classification result. Whether GRU should be used as the Recurrent Neural Network, whether GRU layers should be bi-directional or uni-directional, how many BiGRU and dense layers need to be used, how many units of those layers need to be used, how many (multi-)heads and key-dimension of the self-attention layer should be used, how much weight should be given to the input threads of skip-connection layer, the arrangement and accurate placement of all the layers one after another are determined through trial and error process. The best combination is chosen for the finally proposed deep-learning model which had given the best possible outcome.

It is stated in Dataset Description (Section \ref{sec:data_desc}) that trial files for different interaction classes have time-length inequalities. Primarily, they were made of equal length by either clipping or padding required WiFi packet data from/to the steady-state portion during data pre-processing step. But, each trial file consists of two interactions (steady-state and another out of remaining 12 mutual-interactions) merged together. Steady-state interaction was performed either at the beginning or at the last portion of each trial. The 13 mutual human-to-human interactions performed by various subject pairs had different height, weight and might have slightly different body-posture for a specific interaction which contributed micro-variation in CSI array for that interaction. Again, clipping/padding steady-state portion solved the overall trial file length inequality problem but still the time-length of steady-state interaction remains unequal. All of these challenges are mitigated by using Positional Embedding, Self-Attention, Skip Connection, and Custom Test Prediction Smoother layers. BiGRU and Dense layers mainly took care of the task of time-series classification.

\vspace{8pt}
\noindent Basic layers used in the proposed deep learning Attention-BiGRU model are described as follows.

\subsubsection{Positional Embedding}
\label{subsec:pos_embd}

To deal with the interaction-transition region and satisfactory persistent labeling of the timeseries samples, it is essential to attain some essence of positional knowledge \cite{posembd} by the trained model for learning body-posture sequence-order since the dataset comprises interactions of variable data acquisition time-length and each interaction might have small chunk of body-posture correlating another interaction (e.g. `Punching/Pointing with left/right hand' has similar state until just before punched/pointed-with-finger). Positional embedding is frequently being used in transformer-based models in natural language processing. However, such embedding layer also shows promising aspects in case of Attention-RNN models latterly in trend, as well, explored through this experiment.

\subsubsection{Bidirectional Gated Recurrent Unit (BiGRU)}
\label{subsec:bigru}
Analysis of time-bounded 1560 Wi-Fi packets per trial falls under sequence learning task and Gated Recurrent Neural Network Unit (GRU) \cite{gru} is scrutinized to be performing best in this experiment compared to Long-Short-Term-Memory (LSTM) which is another early variant of Recurrent Neural Network.

Being neoteric, GRU offers some computational advantages over Vanilla-RNN and LSTM. While learning long term dependencies, GRU resolved the issue of vanishing and exploding gradient problem faced by Vanilla-RNN \cite{grufin}. On top of that, GRU incorporates fewer computational-states with less gates that provide faster computation with reduced complexity compared to LSTM. Each GRU unit intakes particular input along with previous hidden state corresponding to time-sample $t$, finds out whether the input is a potential hidden-state to be stored by using hyperbolic tangent and sigmoid activation function in candidate hidden state and reset gate thus serving as short-term-memory, and finally produces the current hidden state value (also final output value at the end) through reckoning of short-term-memory information from candidate state with previous hidden state value by using another sigmoid activation function in update gate thus serving as long-term-memory. On the whole, each GRU unit has two gates which maintain only the hidden state. The hidden-state at time $t$ of a fully-gated GRU unit can be expressed as,
\[\begin{array}{l}\tag{11}
  H\left( t \right)=H\left( t-1 \right)\odot {{\left[ 1+{exp\left({W_{1}^{u}x\left( t \right)+W_{2}^{u}H\left( t-1 \right)+{{B}^{u}}}\right)} \right]}^{-1}}+ \\
 \;\;\;\;\;\;\;\;\;\;\;\; \left[ 2{{\left[ 1+{exp\left({-2W_{1}^{h}x\left( t \right)-2W_{2}^{h}\left[ H\left( t-1 \right)\odot {{\left[ 1+{exp\left({-W_{1}^{r}x\left( t \right)-W_{2}^{r}H\left( t-1 \right)-{{B}^{r}}}\right)} \right]}^{-1}} \right]-2{{B}^{h}}}\right)} \right]}^{-1}}-1 \right]\odot \\
 \;\;\;\;\;\;\;\;\;\;\;\; {{\left[ 1+{exp\left({-W_{1}^{u}x\left( t \right)-W_{2}^{u}H\left( t-1 \right)-{{B}^{u}}}\right)} \right]}^{-1}}; \\
 \text{here,\; x = input, t = time, u = update gate, r = reset gate, h = candidate hidden state, H = hidden state value, } \\
 \text{W}_{n}^{g}\text{ = }{{\text{n}}_{th}}\text{ weight matrix of gate/state g, }{{\text{B}}^{g}}\text{ = bias of gate/state g, }\odot \text{ = Hadamard Product}
\end{array}\]

Bidirectional \cite{bidirectional} operation of such sequence-processing unit accumulates both the preceding hidden-state information during forward propagation and succeeding hidden-state information during backward propagation so as to produce single output for the corresponding single input, and pledges more accurate output than unidirectional layer for the dataset of this experiment since information from both past and future is preserved. Bidirectional outputs for default backward layer were being concatenated in this experiment, however, output for other available merge-modes and custom backward layer as well are yet to be explored.

\subsubsection{Multi-Head Self Attention}
\label{subsec:attention}
Self attention \cite{attention} is a scoring mechanism for each sample of an input sequence with respect to that particular sequence based on a context in which input samples interrelate with each other using Query, Key, Value matrices with a view to finding out valuable portions and give attention score to each sample accordingly. Multi-Head (say, number of heads = N) Self Attention gives the opportunity to score based on N representation contexts or subspaces using N-sets of Query, Key, Value matrices and final scores from each head are concatenated together. If X be the input array to an attention layer and W be the weight matrices, then Multi-Head Self Attention Score can be expressed as,
\[\tag{12}\text{Score}=\left[ {{W}_{Final}} \right]\times \underset{\text{for Head = 1\;to\; }\!\!\#\!\!\text{ Heads}}{\mathop{\text{Concatenate}}}\,\left( \frac{{exp\left({\frac{\left[ \left[ X \right]\times \left[ W_{Query}^{Head} \right] \right]\times {{\left[ \left[ X \right]\times \left[ W_{Key}^{Head} \right] \right]}^{Transpose}}}{\sqrt{\text{Key-array dimension}}}}\right)}}{\sum\limits_{\text{array element}=1}^{N}{{exp\left({\frac{\left[ \left[ X \right]\times \left[ W_{Query}^{Head} \right] \right]\times {{\left[ \left[ X \right]\times \left[ W_{Key}^{Head} \right] \right]}^{Transpose}}}{\sqrt{\text{Key-array dimension}}}}\right)}}}\times \left[ \left[ X \right]\times \left[ W_{Value}^{Head} \right] \right] \right)\]

\subsubsection{Skip Connection}
\label{subsec:skip_connection}
In the proposed model, 30\% of each array element of the multi-head self-attention score is added to the 70\% of that particular corresponding element of the input array to attention layer for which the score is calculated. In other words, attention score array is given 30\% weight, input array to attention layer is given 70\% weight, and then added together.

\subsubsection{Dense Layer}
\label{subsec:dense}
A dense layer consists of a number of nodes, also known as neurons, wherein each node takes input from all or most (controlled by dropout ratio) of the nodes of the preceding neural network layer for calculation of probabilities using specified activation function.

\subsubsection{Dropout Layer}
\label{subsec:dropout}
To control the data overfitting, dropout layer randomly disconnects certain nodes of a neural network layer by setting input values to 0 during each step of the model training procedure. Percentage of dropped out node is controlled by the user defined parameter dropout-ratio. Thus, the weights are trained to be immune to overfitting. However, this layer only works during model training but stays dormant during model test-phase and in application.

\subsubsection{Custom Test Prediction Smoother}
\label{subsec:smoother}
Few very-small chunks of oscillatory predictions were being observed in the test prediction that was changing within nano-seconds especially during interaction transition and other parts. But human-to-human interaction cannot change abruptly within nanoseconds. A custom smoother was designed using 1 moving point and 20 mode point in order to rectify the problem. If the mode of the classifications of 20 sample-points preceding and 20 sample-points succeeding to a single sample-point is similar, then the classification of that single sample-point is set equal to the mode classification; if not, then left as it is.

\vspace{8pt}
\noindent The overall training is performed through 4-Fold cross-validation and thus four trained model weights have been generated and saved. During Test-phase, each of the test *.mat file is classified using all those four trained model weights separately and the mode of the classification of each Wi-Fi packet (i.e. time-stamp) is considered as the classified interaction. Then again, the classified array is rectified using a custom Test Prediction Smoothening process having 20 mode point and 1 sliding point. This classified array is considered as the final time-series classification of 1560 Wi-Fi packets of each data *.mat file. Thus, the highly accurate and minimal interaction-transition region error (Figure-\ref{fig: GUI}) is ensured by the proposed solution. The model was optimized using Adam optimizer, 300 epochs with early stopping criterion and mini-batch size 12. Reliable learning rate was adapted using ReduceLROnPlateau function.

\vspace{8pt}
\noindent It is to be mentioned that, the performance metrics (accuracy, precision, recall, loss) reported for training are obtained from model training and test-loss during model test using Keras evaluation metrics but the performance metrics (accuracy, precision, recall, F1-score) reported for test are obtained after test prediction smoothening and then using weighted average Scikit-learn metrics.

\subsection{Executable Graphical User Interface Software Design}
\label{subsec:gui_app}

To make the proposed solution user-friendly, an executable (not standalone) graphical user interface (GUI) software has been developed using PyQt5 \cite{pyqt5} GUI app builder Python module so that the user can provide particular input file to the software and within a while can get the classified results directly plotted on-screen in a time-series fashion, the classification results are being saved to the computer simultaneously for later use. With this executable software, a user can classify either a particular trial file or an entire folder containing multiple trial files that will be fetched by QFileDialog box and the selected directory-path will be displayed on a text-label. The application is designed such that it will search for how many trained models (*.h5 file) are present in a folder named `cloverleaf', use all of them and calculate the mode during classification of the trial file. This gives full control over the user to download and use as many trained models as desired (higher, the better). The software can automatically detect and activate the GPU (if present) of the user device for faster calculation, however, it will calculate at a slower speed if GPU is missing in the device. The procedural progress will simultaneously be displayed on a progress bar and on an inactive push-button label. Following completion, the classified trials will be saved as a *.csv file in a datetime-bearing folder in the working directory, the path of which will be displayed on a text label. Finally, the classified trials will be plotted on QtWebEngine using the Plotly Offline python module and the plots can be switched back and forth by rotating a knob on the right-screen. A user notification will also appear at the bottom of the screen with instructions on graphics control. The program is made capable to scan the data file for the true target labels, plot them alongside the classified labels, and omit true label plots if they are not found.

\vspace{0.6cm}
\noindent Model training and test-evaluation were performed using Google Colaboratory free plan (used scipy v1.7.2 and TensorFlow framework) but GUI software was designed and evaluated using personal laptop having following configurations: $8^{th}$ Generation Intel\textsuperscript{\textregistered} Core\textsuperscript{TM} i5-8250U processor, 8GB DDR4 RAM, 4GB DDR3 NVIDIA GeForce 940MX CUDA-enabled graphics card, Python v3.9.3 with PyCharm Community Edition v2021.3 IDE running on Windows 10 operating system.

\section{Result and Discussion}
\label{sec:result}

The contribution to this human-to-human mutual interaction recognition study is structured within three experiments.

\vspace{2mm}

\begin{itemize}[noitemsep, topsep=0pt, leftmargin=*]
    \item[i.] The first experiment is focused on determining whether and to what extent the Wi-Fi signal along with channel parameters used in analysis are capable of mutual interaction recognition via the proposed deep-learning model. Experiment-1 involves training and model evaluation using the first pair of subjects (S1-S47), i.e. single folder containing 120 trials.

    \item[ii.] Micro-variation is introduced to the feature pattern describing similar interaction in case of multiple subject-pairs because of their diversified height, weight, gesture-style and clothing. Such physiological varieties are the source of slightly different pattern of body-reflected signal for the similar interaction performed by different subject-pairs that results in the aforementioned micro-variation of the feature pattern. The second experiment explores whether the proposed model can withstand these micro-variational pattern changes and whether the model gives satisfactory performance on test-data involving multiple subject-pairs if the model is properly trained with data from those specific subject-pairs. Experiment-2 is conducted on the first-ten pair of subjects (S1-S47 to S16-S41), i.e. 10 folders containing 1200 trials.

    \item[iii.] To explore the pertinent obstructions and the usage feasibility of the trained models obtained from experiment-2 in case of an unknown situation, a cross-test is performed in experiment-3 on the second-ten pair of subjects (S18-S57 to S34-S30).
\end{itemize}

\vspace{2mm}

\noindent All the three experiments are set to be involved in classifying thirteen distinct mutual interaction target-classes. Learning curves obtained during the proposed deep-learning model training-phase are depicted in Figure \ref{fig: learningperformance}, the confusion matrices are portrayed in Figure \ref{fig: confusionmatrix}, and the performance metrics of the three experiments are tabulated in Table \ref{tab: PerformanceMatrices}.

\begin{figure*}[htbp]
\centering

\resizebox{!}{20.7cm}{\includegraphics{figures/fig3_learningperformance.pdf}}

\caption{{Training and cross-validation performance: (a) Fold-3 of Experiment-1, (b) Fold-2 of Experiment-2. Vertical line and legend values correspond to the best epoch based on the best validation accuracy. Learning performance of the remaining folds can be viewed from \textbf{Supplementary Materials}}}
\label{fig: learningperformance}
\end{figure*}

\vspace{4pt}
\noindent \textbf{Experiment 1:} It is observed that, whilst in training with $60:20$ $training:validation$ data for four folds, the model performed best on the third fold of cross-validation data showcasing more than 95\% performance metrics in case of single human-pair interaction, around 90\% performance metrics were being observed for another two folds, and the minimal performance metrics were found to be around 80\%. Trained models of all the remaining folds exhibited more than 90\% test benchmark on the remaining 20\% data except for the poor-performing fold which showed 88\% metric-value in the test-phase of experiment-1. Generalized classification from the mode of the predicted targets in the test-phase using the four trained models achieved around 94\% test benchmark which is the best in experiment-1 and also identical to its second fold. Confusion matrix Figure \ref{fig: confusionmatrix}(a) also validates the underlying reason behind such high performance. Misclassifications observed in case of `steady-state' are especially around the transition points from steady-state to another state or vice versa in a particular trial since Wi-Fi packets arrive within nanoseconds and thus the model gets blindfolded around the transition-points that produces swift dangling classification for few vicinal Wi-Fi packets. Apart from that there is almost no misclassification as can be verified from the confusion matrix of experiment-1. These findings prompted the study to continue investigation for the higher number of subject-pairs that the available RAM could accommodate.

\begin{figure*}[htbp]
\centering

\resizebox{!}{20.7cm}{\includegraphics{figures/fig4_confusionmatrix.pdf}}

\caption{{Confusion matrix after test evaluation (a) Experiment-1: Mode Prediction of 4 Folds on 24 trial test-files, (b) Experiment-2: Mode Prediction of 4 Folds on 240 trial test-files, (c) Experiment-3 on new 1200 trial test-files. Remaining confusion matrices can be viewed from \textbf{Supplementary Materials}}}
\label{fig: confusionmatrix}
\end{figure*}

\vspace{4pt}
\noindent \textbf{Experiment 2:} On the next step for the experiment-2, ten subject-pairs had been considered at once and further processing was carried out in the same way as experiment-1. Cross-validation performance in this case was noticed to be ranging between 80\% to 88\%, whereas the second fold of data performed the best with 87.1\% accuracy, 88.65\% precision, 85.82\% recall, and sparse categorical cross-entropy loss was minimized to 0.3997. Even though the trained model from third-fold data achieved the best individual test benchmark (86.5\%), generalized classification via mode-calculation of the predicted targets from four trained models outperformed each of the individual test performance metrics manifested with 88.3\% accuracy, 88.7\% precision, 88.3\% recall and 88.4\% F1-score. It is quite remarkable that inclusion of human-to-human interaction data performed by ten subject-pairs reached 88.5\% test benchmark which is relatively near to that for single human-pair. The test classification plot reveals that after training with huge amount of data from ten subject-pairs, the rapid oscillatory classification around transition points reduced noticeably to a trifling amount compared to experiment-1. A small number of misclassifications on few particular classes except steady state as seen from confusion matrix Figure \ref{fig: confusionmatrix}(b) are due to either partial or infrequent complete misclassification of a particular trial. It is worth noting that the misclassified interactions have certain portions that are quite symmetrical to one another. For example, pointing or punching with right/left hand and high-five produces similar type of signal reflections from human body starting at the beginning of the interaction until just before pointed or punched either with right or left hand or given high-five.

\vspace{4pt}
\noindent \textbf{Experiment 3:} So far, everything has worked out well because we are able to classify time-sequence data and can even observe for how long the human-to-human interaction had been performed. Now comes the difficult part. Is the trained deep learning model capable of doing well on completely new subject-pairs for which it has never been trained? If not, what are the issues that the next research perspective should address? To reach these points, experiment-3 was carried out as a cross-test on the second-ten pair of subjects (S18-S57 to S34-S30). The four trained models from experiment 2 on 720 trials were used to test on 1200 subsequent trials, however the outcome was not satisfactory showing 50\% test benchmark. The confusion matrix of experiment-3 is given in Figure \ref{fig: confusionmatrix}(c), and performance metrics of the three experiments are tabulated in Table \ref{tab: PerformanceMatrices}.

\begin{table*}[t]
\caption{Performance metrics for three experiments conducted on the whole}
\centering

{\begin{tabular}{cccccccccccc} \toprule
\multicolumn{12}{l}{\textbf{Experiment-1: Single Pair (S1-S47)}}  \\ \midrule
\multirow{2}{*}{Fold} & & \multicolumn{4}{c}{Cross-Validation Set} & &  \multicolumn{5}{c}{Test Set}   \\ \cmidrule{3-6} \cmidrule{8-12}
& & Accuracy & Precision & Recall & Loss & & Accuracy & Precision & Recall & F1-Score & Loss   \\ \midrule
1 && 0.8018 & 0.8143 & 0.7965 & 0.9837 && 0.883 & 0.905 & 0.883 & 0.880 & 0.716 \\
2 && 0.9365 & 0.9413 & 0.9335 & 0.2637 && \textbf{0.937} & 0.943 & \textbf{0.937} & \textbf{0.935} & \textbf{0.259} \\
3 && \textbf{0.9547} & \textbf{0.9566} & \textbf{0.9524} & \textbf{0.1626} && 0.913 & 0.920 & 0.913 & 0.912 & 0.412 \\
4 && 0.8984 & 0.9079 & 0.8939 & 0.3782 && 0.911 & 0.926 & 0.911 & 0.909 & 0.504 \\
Mode$^*$ && -- & -- & -- & -- && 0.936 & \textbf{0.944} & 0.936 & \textbf{0.935} & -- \\ \midrule \\ \midrule

\multicolumn{12}{l}{\textbf{Experiment-2: First Ten Pairs (S1-S47 to S16-S41)}}  \\ \midrule
\multirow{2}{*}{Fold} & & \multicolumn{4}{c}{Cross-Validation Set} & &  \multicolumn{5}{c}{Test Set}   \\ \cmidrule{3-6} \cmidrule{8-12}
& & Accuracy & Precision & Recall & Loss & & Accuracy & Precision & Recall & F1-Score & Loss   \\ \midrule
1 && 0.8030 & 0.8179 & 0.7927 & 0.7288 && 0.830 & 0.835 & 0.830 & 0.830 & 0.635 \\
2 && \textbf{0.8710} & \textbf{0.8865} & \textbf{0.8582} & \textbf{0.3997} && 0.858 & 0.862 & 0.858 & 0.859 & 0.452 \\
3 && 0.8601 & 0.8793 & 0.8393 & 0.4090 && 0.865 & 0.872 & 0.865 & 0.866 & \textbf{0.422} \\
4 && 0.8258 & 0.8407 & 0.8146 & 0.6439 && 0.829 & 0.832 & 0.829 & 0.828 & 0.607 \\
Mode$^*$ && -- & -- & -- & -- && \textbf{0.883} & \textbf{0.887} & \textbf{0.883} & \textbf{0.884} & -- \\ \midrule \\ \midrule

\multicolumn{12}{l}{\textbf{Experiment-3: Cross Test. Saved Models of four folds from Experiment-2 used to Test Whole Second}} \\
&& \multicolumn{10}{l}{\textbf{Ten Pairs (S18-S57 to S34-S30).}}  \\ \midrule
\multirow{2}{*}{Fold} & & \multicolumn{4}{c}{Cross-Validation Set} & &  \multicolumn{5}{c}{Test Set}   \\ \cmidrule{3-6} \cmidrule{8-12}
& & Accuracy & Precision & Recall & Loss & & Accuracy & Precision & Recall & F1-Score & Loss   \\ \midrule
Mode$^*$ && -- & -- & -- & -- && 0.506 & 0.501 & 0.506 & 0.489 & -- \\

\bottomrule
\multicolumn{12}{r}{\small *Classified using the four trained models and used their `Mode' as final classified label}
\end{tabular}}
\label{tab: PerformanceMatrices}
\end{table*}

According to Ashleibta et al. \cite{CSI5G} and Damodaran et al. \cite{ubuntucsi}, IEEE 802.11n compatible Wi-Fi access points employ 56 subcarriers while modulation, however the Intel 5300 NIC only reports 30. Channel State Information data of remaining 26 subcarriers are lost and hence 46\% of the data were not involved in analysis. Again, the whole dataset contains 4800 trial files for 40 distinct subject-pairs, but because this study was conducted using the Google Colaboratory free plan, only 720 trials (60\% training data of 1200 in-total) from 10 subject-pairs could be used for the proposed deep-learning model training at once due to RAM limits. As a result, a bulk of micro-variation of CSI patterns from different subject-pairs (caused by different subject-specific style of gestures and variational signal fading due to unique lossy human body medium for different height and weight) were missed during the training phase. On a broad scale, these could be the possible reasons behind Domain-Shift Problem \cite{domain_shift} encountered in experiment-3. To reduce the difficulties seen in experiment 3, various Domain-Adaptation \cite{domain_adaptation1, domain_adaptation2} strategies along with sophisticated signal pre-processing techniques and inclusion of CSI data for all 56 subcarriers should be incorporated in future study.

\vspace{4pt}
\noindent \textbf{Executable GUI Software Demonstration:} Experiment-2 demonstrates that the proposed classifier model can recognize human-to-human interactions with reasonable performance metrics having upto ten subject-pairs if the model is well-trained with the data regarding those specific subject-pairs. So in the end, a PyQt5 \cite{pyqt5} graphical user interface (GUI) software (Figure-\ref{fig: GUI}) was developed to conclude this study utilizing the trained models from experiment-2. A video showcasing the software demonstration along with the software itself can be obtained from \textbf{Supplementary Materials}.

\begin{figure*}[h]
\centering
\resizebox{16cm}{!}{\includegraphics{figures/fig5_GUI.pdf}}
\caption{{Graphical User Interface (GUI) software designed using PyQt5. A video showcasing the software along with the software itself can be obtained from \textbf{Supplementary Materials}}}
\label{fig: GUI}
\end{figure*}

\section{Future Scope}
\label{sec:scopes}
This research work developed the mutual interaction recognition model based on the dataset collected in a laboratory setting. Public deployment of such a recognition model still requires to overcome enormous challenges to achieve the pinnacle. One such obstacle is to explore and overcome the interclass pattern similarity problem due to different interactions having almost similar gesture-style. Another one is intraclass pattern variation due to dissimilar height-weight-clothing-gesture style of different subject pairs involved in mutual interaction. Sensitive environmental conditions such as weather, noise, inter-device interference, occlusions due to indefinite indoor objects, transmitter-receiver separation and location of the interaction occurrences within the room also contribute a lot to the intraclass pattern variation in real-world scenario.

To reach the goal, more efficient pattern diversities might be discovered in future via extraction of additional informative features through incorporation of advanced signal processing techniques. Simultaneous inclusion of model-based approaches along with the deep learning approaches and inheriting domain adaptation techniques can be a promising remedy to the changes in the data distribution problem. Discovering alternative to network interface card for CSI data acquisition containing information of all the 56 subcarriers and calibrating the model with a large volume of training instances characterized by wide-ranging environmental and fabricated factors are still a few paramount areas of investigation that need to be unfolded. Another promising successor of this proposed article can be indoor human-pair occupancy counting. To get the ultimate implications of this study, future research work could also address concurrent recognition of spontaneous (another interaction whilst in the middle of a particular interaction, e.g. sudden kick while departing) and multiple mutual interactions performed by any number of subject-pairs present in the room or by more than two individuals in a group.

\section{Conclusion}
\label{sec:conclusion}
This paper presents a comprehensive Wi-Fi-based deep learning solution for recognizing a sequence of human-to-human reciprocal interactions based on unique spatio-temporal pattern of continuous channel information data-stream. The early stage illustration highlights the ambient and synthetic attenuation factors which influence Wi-Fi signal propagation regardless of any human presence. While performing interpersonal interactions in an indoor environment, signal is reflected from the human body due to line-of-sight human existence. Investigations reveal that the proposed Attention-BiGRU deep learning solution can be applied to recognize reciprocal interactions performed by minimal subject-pairs with around 94\% fidelity. The evaluations are as well 88\% authenticated upon proper training with data from ten subject-pairs, indicating that the suggested model can endure subtle physiological variations. In fact, it is also possible to observe the temporal extent of mutual interactions performed by a specific subject-pair using the developed executable GUI software. These achievements prove that there is a strong link between human interactions and Wi-Fi channel parameters. Moreover, the entire method protects the privacy of residents of an interior environment by operating in a contactless mode that does not use any imaging technique. The cognitive ability of this technology possesses significant potential for indoor activity monitoring, surveillance system, smart health monitoring systems and independent assisted living.

\section{Supplementary Materials}
\label{sec:supp_link}

\begin{itemize}
    \item[-] All Learning Curves and Confusion Matrices: supplementary\_materials/sup1\_All\_Performance\_Figures.pdf
    \item[-] GUI Application Demonstration Video: supplementary\_materials/sup2\_App\_Demo.mp4
    \item[-] GUI Application GitHub Repository: Link will be included to the Accepted Camera Ready Version of the Article
\end{itemize}

\section{Author Statements}
\label{sec:auth_contr}
\textit{Abdullah Bin Shams and Mohsin Sarker Raihan:} Idea generation, Research validation, Project administration and Supervision, Writing - Quality control.

\textit{Md. Mohi Uddin Khan:} Methodology, Software, Formal analysis, Research validation, Visualization, Writing - Original Draft and Editing.

Finally all authors reviewed and discussed on the article, provided critical feedback and contributed to the final manuscript.

\section{Research Funding}
\label{sec:funding}
This research did not receive any specific grant from funding agencies in the public, commercial, or
not-for-profit sectors.

\section{Declaration of Competing Interest}
\label{sec:interest}
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this article.

\bibliographystyle{elsarticle-num}

redpajama_set_name: RedPajamaArXiv