SlowGuess/NAACL_2022_OCR huggingface dataset:
Ramit Sawhney†, Shivam Agarwal‡, Vivek Mittal†,
Paolo Rosso $^{\triangle}$ , Vikram Nanda $^{\star}$ , Sudheer Chava $^{\dagger}$
† Financial Services Innovation Lab, Georgia Institute of Technology,
†University of Illinois at Urbana-Champaign, †Universitat Politécnica de València,
$^{\star}$ University of Texas at Dallas
shivama2@illinois.edu, {rsawhney31,schava6}@gatech.edu
The rapid spread of information over social media influences quantitative trading and investments. The growing popularity of speculative trading of highly volatile assets such as cryptocurrencies and meme stocks presents a fresh challenge in the financial realm. Investigating such "bubbles" - periods of sudden anomalous behavior of markets are critical in better understanding investor behavior and market dynamics. However, high volatility coupled with massive volumes of chaotic social media texts, especially for underexplored assets like cryptocoins pose a challenge to existing methods. Taking the first step towards NLP for cryptocoins, we present and publicly release CryptoBubbles, a novel multi-span identification task for bubble detection, and a dataset of more than 400 cryptocoins from 9 exchanges over five years spanning over two million tweets. Further, we develop a set of sequence-to-sequence hyperbolic models suited to this multi-span identification task based on the power-law dynamics of cryptocurrencies and user behavior on social media. We further test the effectiveness of our models under zero-shot settings on a test set of Reddit posts pertaining to 29 "meme stocks", which see an increase in trade volume due to social media hype. Through quantitative, qualitative, and zero-shot analyses on Reddit and Twitter spanning cryptocoins and meme-stocks, we show the practical applicability of CryptoBubbles and hyperbolic models.
Cryptocurrency (crypto) trading presents a new investment opportunity (Chuen et al., 2017) for maximizing profits. The rising ubiquity of speculative trading of cryptocurrencies over social media has lead to sentiment driven "bubbles" (Chohan, 2021; Hu et al., 2021). Such a bubble is characterized by rapid escalation of price in a short period of
Figure 1: We present market moving tweets by influential users about DogeCoin. Such tweets induce social media hype which leads to creation of bubbles.
time typically driven by exuberant investor behavior (Fry and Cheah, 2016) and may be tied with enormous risks. Analyzing such anomalous behaviors can be useful for forecasting speculative risks. However, it is not trivial to use existing NLP methods (Sawhney et al., 2020a) for forecasting crypto bubbles as they are designed for simple assets such as equities that are  $10\mathrm{x}$  less volatile than crypto (Liu and Serletis, 2019). Also, crypto behavior is more strongly tied to user sentiment and social media usage as opposed to conventional stocks and equities, rendering both conventional financial models and contemporary ML models weak as they are not geared towards dealing with large volumes of unstructured, user-generated text.
Theories (Chen and Hafner, 2019) suggest that financial bubbles are often driven by social media hype and the intensity of contagion among users. As shown in Figure 1, posts from highly influential personalities often cause a growing chain reaction leading to a short squeeze and the creation of a bubble. However, analyzing such large volumes of chaotic texts poses several challenges (Sawhney et al., 2021). Market moving events, as shown in Figure 1 are rare (Zhao et al., 2010) and their impact on market variables exhibit power-law dis
Human Language Technologies, pages 5531 - 5545
tributions (Plerou et al., 2004; Malevergne* et al., 2005). This power-law dynamics in online streams indicate the presence of scale free and hierarchical properties in the time domain (Feng et al., 2020).
Existing works (Hu et al., 2018; Du and Tanaka-Ishii, 2020) that adopt RNN methods to model financial text (typically equities) do not factor in the inherent scale-free nature in online streams leading to distorted representations (Ganea et al., 2018a). Advances in hyperbolic learning (Shimizu et al., 2021) motivates us to use the hyperbolic space, which better represents the scale-free nature of online text streams. Further, online texts pose a diverse influence on cryptoprices based on their content (Kraaijeveld and De Smedt, 2020; Beck et al., 2019), for example, posts from a reliable source influences future trends, as opposed to noise like vague comments as shown in Figure 1.
Building on these prospects, we present CryptoBubbles, a novel multi-bubble forecasting task (§3), and a dataset comprising tweets, financial data, and speculative bubbles (§4) along with hyperbolic methods to model the intricate power-law dynamics associated with crypto and online user behavior pertaining to stock markets.
- We formulate CryptoBubbles, a novel multi-span prediction task and publicly release a text dataset of  $400+$  crypto from over seven exchanges spanning over five years accompanied by over 2 million tweets.
- We explore the power-law dynamics that exist in such user-generated text streams, and propose MBHN: Multi Bubble Hyperbolic Network (§5) along with other hyperbolic baselines which leverages the Riemannian manifold to model the intricate dynamics associated with crypto.
- We curate and release a test set corresponding to over 25,000 Reddit posts of 29 meme-stocks that show similar speculative user-driven dynamics (\$4) for evaluating MBHN under zero-shot settings (\$4.1) across asset classes (Crypto → Equities) and social media platforms (Twitter → Reddit).
- Through ablative ( $\S 7.1$ ) and qualitative experiments ( $\S 7.5$ ) we show the practical applicability of CryptoBubbles and hyperbolic learning. We
find that MBHN generalizes to cold-start scenarios (§7.3) and provides qualitative insights.
Cryptocurrency and Financial Bubbles Cryptocurrencies are recent digital assets that have been in use since 2008 (Nakamoto et al., 2008) and rely on distributed cryptographic protocols, rather than a centralized authority to operate (Krafft et al., 2018). These assets significantly differ from traditional equities (Febrero, 2019) which have been in use since the  $17^{\text{th}}$  century (Sobel, 2000) and have very distinct risk-return trade-offs (Chuen et al., 2017). Recently, crypto trading gained popularity (Stieg, 2021) given their low fees (King, 2013), easy access (Chepurnoy et al., 2019), and high profit (Bunjaku et al., 2017) However, crypto trading is very challenging since it shows high volatility (Aloosh and Ouzan, 2020), power-law bubble dynamics (Fry and Cheah, 2016) and effect other markets (Andrianto and Diputra, 2017).
Financial NLP Conventional forecasting methods rely on numeric features like historical prices (Kohara et al., 1997), and technical indicators (Shynkevich et al., 2017). These include continuous (Andersen, 2007), and neural approaches (Feng et al., 2019a). Despite their improvements, a limitation is that they do not account for price influencing factors from text (Lee et al., 2014). Recent methods are based on the Efficient Market Hypotheses (Malkiel, 1989) which leverage language from earnings calls (Qin and Yang, 2019), online news (Du and Tanaka-Ishii, 2020) and social media (Tabari et al., 2018). However, a limitation is that they focus on simple assets like equities (Sawhney et al., 2020a) and formulate forecasting as regression (Kogan et al., 2009) or ranking (Sawhney et al., 2021) task. Such simple methods do not scale to highly stochastic crypto (Liu and Serletis, 2019) that show power-law dynamics (Kyriazis et al., 2020).
Hyperbolic Learning has proved to be effective in representing power-law dynamics (Ganea et al., 2018b), hierarchical relations (Aldecoa et al., 2015) and scale-free characteristics (Chami et al., 2019a). Hyperbolic learning has been applied to various NLP (Dhingra et al., 2018), and computer vision tasks (Khrulkov et al., 2020a). However, modeling crypto texts is complex as crypto prices are driven by social media hype (Stevens, 2021) and involve influential users (Ante, 2021). The intersection
$^{1}$ Code and Data at: https://github.com/gtfintechlab/CryptoBubbles-NAACL
Dataset Statistics
No. of Coins	456
No. of Bubbles	1,869
Len of Bubble in days	6.76 ± 6.96
Figure 2: Yearly exchange-wise Tweet activity statistics
Figure 3: Frequency distribution over length of bubbles
Table 1: Overall CryptoBubbles data statistics
Train	Validation	Test
Date Range	03/16 - 07/20	07/20 - 12/20	12/20 - 04/21
Split Ratio	48%	29%	23%
No. of Coins	307	357	364
No. of Tweets	1.15 M	730 K	561 K
% Bubbles	8.27%	7.93%	23.30%
Table 2: Sample level CryptoBubble dataset statistics along with its chronological date splits.
of modeling scale-free financial text streams with hyperbolic learning presents an underexplored yet promising research avenue.
Let  $C = \{c_1, \ldots, c_N\}$  denote a set of  $N$  cryptos, where for each crypto  $c_i$  there is an associated closing price  $p_t^i$  on day  $t$ . Following (Phillips and Shi, 2019), we define the bubble  $w$  for each crypto  $c_i$  in the lookahead  $T$  as the period characterized by rapid price escalation. Formally, the logarithmic price change  $(\log p_t^i - \log p_{t-1}^i)$  takes the form,
$$
\log p _ {t} ^ {i} - \log p _ {t - 1} ^ {i} = \left\{ \begin{array}{l l} - L _ {t} + \epsilon_ {t}, & \text {B u b b l e b u r s t} \\ L _ {t} + \epsilon_ {t}, & \text {B u b b l e b o o m} \end{array} \right. \tag {1}
$$
where,  $\epsilon_{t}$  are martingale difference innovations and  $L_{t}$  given by  $L_{t} = Lb_{t}$ . Where,  $L$  measures the shock intensity and  $b_{t}$  is uniform over a small negative quantity  $-\epsilon$  to unity. We formulate financial bubble prediction as a multi-span prediction task since a variable number of bubbles can exist during a lookahead period  $T$ . Our goal is to predict all such bubble periods  $w$  in the lookahead  $T$ . Formally, given a variable number of historic texts  $[d_1,\ldots ,d_\tau ]$  (or other sequences like prices) for each crypto  $c_{i}$  over a lookback of  $\tau$  days, MBHN first outputs the number of bubbles  $B$  to support multi-bubble prediction. Followed by identifying  $B$  non-overlapping bubble periods.
4 Dataset Curation and Processing
Data Mining To create CryptoBubbles dataset, we select the top 9 crypto exchanges such as Binance, Gateio, etc and choose around 50 most traded cryptos by volume from each exchange and obtain 456 cryptos in total. For these cryptos we mine 5 years of daily price data consisting of opening, closing, highest and lowest prices from  $1^{\text{st}}$  Mar'16 to  $7^{\text{th}}$  Apr'21 using CryptoCompare. Next, we extract crypto related tweets under Twitter's official license. Following (Xu and Cohen, 2018a), we extract crypto-specific tweets by querying regex ticker symbols, for instance, "$DOGGE\b" for DogeCoin. We mine tweets for the same date range as the price data and obtain 2.4 million tweets. We detail the yearly number of tweets from each exchange in Figure 2 and observe that the number of tweets increases every year, indicating the growing popularity of speculative trading via social media.
Bubble Creation To identify bubbles, we use the PSY model (Phillips et al., 2015b) which is a widely used bubble detection method in financial time-series analysis (Cheung et al., 2015; Harvey et al., 2016). Following (Corbet et al., 2018) we feed the closing prices of each asset  $c_{i}$  to the PSY model, which outputs date spans for each bubble. To further review the ground-truth annotations produced by the PSY model, all annotations were reviewed by five experienced financial analysts achieving a Cohen's  $\kappa$  of 0.93. We find that the reviewers agree with the annotations for  $90\%$  of the bubbles. During reviewer disagreement  $(5\%$  bubbles), we took the majority of all annotators. For  $5\%$  of the bubbles all reviewers agreed that the annotations were incorrect, during which we considered the annotations proposed by the analysts.
2We provide extensive data creation steps along with details on bubble creation in the Appendix.
<sup>3</sup>https://www.cryptocompare.com/
Cryptocurrency	Equity
No. of Posts	30.69 ± 29.48	30.08 ± 30.26
No. of Tokens per post	34.50 ± 34.87	23.06 ± 23.62
No. of Bubbles	0.16 ± 0.42	0.22 ± 0.45
Length of Bubbles in days	4.28 ± 2.73	4.60 ± 2.93
Table 3: Zero-shot Reddit data statistics for cryptocoins and equities along with their bubble statistics.
We provide overall dataset and bubble statistics in Table 1 and Figure 3, respectively.
Sample Generation To generate data samples, we use a sliding window of length  $\tau$  and consider all texts posted within this window for making predictions over the next  $T$  days. Next, we temporally split all the data samples into train, validation, and test as shown in Table 2. We note that our data is heavily skewed; our evaluation set contains new cryptos and spans the COVID-19 period suggesting that CryptoBubbles is challenging.
4.1 Zero Shot Reddit Data
We curate zero-shot Reddit data to test our model's ability to generalize across different asset classes and social media platforms. We analyze 12 meme cryptos and 17 meme equities (for instance, GameStop, and DOGE) selected based on social media activity over 15 months from  $15^{\mathrm{th}}$  Jan'20 to  $3^{\mathrm{rd}}$  April'21. We mine Reddit posts and comments from top trading subreddits such as r/wallstreetbets using the PushshiftAPI.4 We scrape daily price data using Yahoo Finance for equities and CoinGecko for crypto and use the PSY model (Phillips et al., 2015b) to identify bubbles. We follow the same process used for Twitter and summarize the statistics in Table 3. We note that zero-shot data establishes a challenging environment for evaluating Crypto-Bubbles since it contains varied post lengths and unseen assets.
5 Methodology: MBHN
5.1 Preliminaries on the Hyperbolic Space
We implement MBHN on the Poincaré ball model, defined as  $(\mathcal{B},g_x^{\mathcal{B}})$ , where the manifold  $\mathcal{B} = \{\pmb {x}\in$ $\mathbb{R}^n:||\pmb {x}|| < 1\}$ , with the Riemannian metric  $g_{\pmb{x}}^{\mathcal{B}} =$ $\lambda_{\pmb{x}}^{2}g^{E}$ , where the conformal factor  $\lambda_{\pmb{x}} = \frac{2}{1 - ||\pmb{x}||^2}$  and  $g^{E} = \mathrm{diag}[1,\dots,1]$  is the Euclidean metric tensor. We denote the tangent space centered at point  $\pmb{x}$  as  $\mathcal{T}_x\mathcal{B}$ . Following (Ungar, 2001), we generalize
Euclidean operations to the hyperbolic space using the Möbius operations.
Mobius Addition  $\oplus$  for a pair of points  $x,y\in \mathcal{B}$
$$
\boldsymbol {x} \oplus \boldsymbol {y} = \frac {\left(1 + 2 \langle \boldsymbol {x} , \boldsymbol {y} \rangle + | | \boldsymbol {y} | | ^ {2}\right) \boldsymbol {x} + \left(1 - | | \boldsymbol {x} | | ^ {2}\right) \boldsymbol {y}}{1 + 2 \langle \boldsymbol {x} , \boldsymbol {y} \rangle + | | \boldsymbol {x} | | ^ {2} | | \boldsymbol {y} | | ^ {2}} \tag {2}
$$
where,  $\langle .,.\rangle$  denotes the inner product and  $||\cdot ||$  denotes the norm. To perform operations in the hyperbolic space, we define the exponential and logarithmic map to project Euclidean vectors to the hyperbolic space, and vice versa.
Exponential Mapping maps a tangent vector  $\pmb{v} \in \mathcal{T}_{\pmb{x}}\mathcal{B}$  to a point  $\exp_{\pmb{x}}(\pmb{v})$  in the hyperbolic space,
$$
\exp_ {\boldsymbol {x}} (\boldsymbol {v}) = \boldsymbol {x} \oplus \left(\tanh  \left(\frac {| | \boldsymbol {v} | |}{1 - | | \boldsymbol {x} | | ^ {2}}\right) \frac {\boldsymbol {v}}{| | \boldsymbol {v} | |}\right) \tag {3}
$$
Logarithmic Mapping maps a point  $\pmb{y} \in \mathcal{B}$  to a point  $\log_{\pmb{x}}(\pmb{y})$  on the tangent space at  $\pmb{x}$ ,
$$
\log_ {\boldsymbol {x}} (\boldsymbol {y}) = (1 - \left| \left| \boldsymbol {x} \right| \right| ^ {2}) \tanh  ^ {- 1} (| | - \boldsymbol {x} \oplus \boldsymbol {y} | |) \frac {- \boldsymbol {x} \oplus \boldsymbol {y}}{| | - \boldsymbol {x} \oplus \boldsymbol {y} | |} \tag {4}
$$
Mobius Multiplication  $\otimes$  multiplies features  $\pmb{x} \in \mathcal{B}^C$  with matrix  $\pmb{W} \in \mathbb{R}^{C' \times C}$ , defined as,
$$
\boldsymbol {W} \otimes \boldsymbol {x} = \exp_ {o} (\boldsymbol {W} \log_ {o} (\boldsymbol {x})) \tag {5}
$$
We present an overview of MBHN in Figure 4. We first explain temporal feature (price or text) extraction using hyperbolic GRU and the temporal attention ( $\S 5.2$ ), followed by the decoder architecture to predict multiple bubble spans ( $\S 5.3$ ).
5.2 Hyperbolic Temporal Encoder
Temporal dependencies in crypto data show power-law dynamics and scale-free nature (Zhang et al., 2018; Gabaix et al., 2003). As shown in Figure 4 to capture the hierarchical and temporal dependencies in temporal crypto data (online texts or asset prices), we implement a Gated Recurrent Unit (GRU) in the hyperbolic space (Ganea et al., 2018a) which better models the scale-free dynamics of online streams (Chami et al., 2019b).
As shown in Figure 4, the input to MBHN can be any temporal sequence  $[d_1,\dots ,d_\tau ]$  such as prices or texts. We use a data encoder to encode each item  $d_{t}$  as features  $q_{t}$ . Specifically, we use Bidirectional Encoder Representations from Transformers (BERT) (Devlin et al., 2019) for encoding texts as  $q_{t} = \mathrm{BERT}(d_{t})$ . While we feed raw price vectors
4https://github.com/pushshift/api
Figure 4: An overview of MBHN, hyperbolic mappings, hyperbolic GRU, and multi-span extraction. Data Encoder is used to encode any temporal sequence (historic prices or texts). The data encoder in case of texts is BERT.
comprising of a cryptos's closing price  $p_c^t$ , highest price  $p_h^t$  and lowest price  $p_l^t$  for day  $t$  for encoding historic prices as  $q_t = [p_c^t, p_h^t, p_l^t]$ . For encoding both prices and texts together we concatenate the price and text features. To apply the hyperbolic operations, we first map these Euclidean features  $\mathbf{q}_t$  to hyperbolic features  $\mathbf{x}_t \in \mathcal{B}^C$  for each crypto  $c_i$  via the exponential map, given by,  $\mathbf{x}_t = \exp_o(\mathbf{q}_t)$ . We define the hyperbolic GRU on features  $\mathbf{x}_t$  as,
$$
z _ {t} = \sigma \log_ {\mathcal {O}} \left(\boldsymbol {W} ^ {z} \otimes \boldsymbol {h} _ {t - 1} \oplus \boldsymbol {U} ^ {z} \otimes \boldsymbol {x} _ {t} \oplus \boldsymbol {b} ^ {z}\right) \quad (\text {U p d a t e g a t e})
$$
$$
\boldsymbol {r} _ {t} = \sigma \log_ {\boldsymbol {o}} \left(\boldsymbol {W} ^ {r} \otimes \boldsymbol {h} _ {t - 1} \oplus \boldsymbol {U} ^ {r} \otimes \boldsymbol {x} _ {t} \oplus \boldsymbol {b} ^ {r}\right) \quad (\text {R e s e t g a t e})
$$
$$
\bar {h} _ {t} = \psi^ {\otimes} \left(\boldsymbol {W} ^ {h} \operatorname {d i a g} (\boldsymbol {r} _ {t}) \otimes \boldsymbol {h} _ {t - 1} \oplus \boldsymbol {U} ^ {h} \otimes \boldsymbol {x} _ {t} \oplus \boldsymbol {b} ^ {h}\right) (\text {C u r r e n t s t a t e})
$$
$$
\boldsymbol {h} _ {t} = \boldsymbol {h} _ {t - 1} \oplus \operatorname {d i a g} \left(\boldsymbol {z} _ {t}\right) \otimes \left(- \boldsymbol {h} _ {t - 1} \oplus \bar {\boldsymbol {h}} _ {t}\right) \quad (\text {F i n a l s t a t e})
$$
where,  $\Psi^{\otimes}$  denotes hyperbolic non-linearity (Ganea et al., 2018a) and  $W, U, b$  are learnable weights. We denote the Hyperbolic GRU as HGRU( $\cdot$ ) which takes temporal crypto features  $X = \{q_1, \ldots, q_{\tau c_i}\}$  as input and outputs features  $K = \{h_1, \ldots, h_{\tau c_i}\}$ , which is the concatenation of all hidden states  $h_t$  of crypto  $c_i$ , given by,
$$
\boldsymbol {K} = \operatorname {H G R U} \left(\exp_ {\boldsymbol {o}} (\boldsymbol {X})\right) \tag {6}
$$
All texts (or prices) released in the lookback  $\tau$  may not be equally informative and have diverse influence over a crypto's trend (Kraaijeveld and De Smedt, 2020). We use a temporal attention mechanism (Luong et al., 2015) to emphasize streams likely to have a substantial influence on the bubble. The attention mechanism learns attention weights  $\{\gamma_j\}_{j=1}^{\tau c_i}$  to adaptively aggregate hidden states of
HGRU into a crypto information vector  $\pmb{u}_i$
$$
\boldsymbol {u} _ {i} = \sum_ {j} \gamma_ {j} \log_ {\boldsymbol {o}} (\boldsymbol {h} _ {j}) \tag {7}
$$
$$
\gamma_ {j} = \operatorname {S o f t m a x} _ {j} \left(\log_ {\boldsymbol {o}} \left(h _ {j}\right) ^ {\mathrm {T}} \left(\boldsymbol {W} \log_ {\boldsymbol {o}} (\boldsymbol {K})\right)\right) \tag {8}
$$
where,  $\pmb{W}$  are learnable weights.
5.3 Multi-Span Extraction and Optimization
Span Prediction To extract the bubble spans in the lookahead  $T$ , we take inspiration from (Sutskever et al., 2014) and use a GRU based decoding network. We use the outputs of the encoder  $\pmb{u}_i$  for each crypto  $c_i$  as the initial state of the GRU. For each day  $t \in [1, \dots, T]$ , we predict the probability of day  $t$  being a starting or an ending day denoted by  $p_{\mathrm{start}}^t$  and  $p_{\mathrm{end}}^t$  respectively, given by,
$$
p _ {\text {s t a r t}} ^ {t} = \operatorname {S i g m o i d} \left(\boldsymbol {W} ^ {S} \operatorname {G R U} \left(\boldsymbol {u} _ {i}\right)\right) \tag {9}
$$
$$
p _ {\text {e n d}} ^ {t} = \operatorname {S i g m o i d} \left(\boldsymbol {W} ^ {E} \operatorname {G R U} \left(\boldsymbol {u} _ {i}\right)\right) \tag {10}
$$
where  $\pmb{W}^{S}, \pmb{W}^{E}$  are learnable weights.
Multi-Span Extraction To identify multiple bubble spans, we first predict the number of bubbles  $B$  for each cryptocoin  $c_{i}$  in the lookahead  $T$  and model it as a classification task, given by,
$$
B = \operatorname {a r g m a x} \left(\operatorname {S o f t m a x} \left(\operatorname {M L P} \left(\boldsymbol {u} _ {i}\right)\right)\right) \tag {11}
$$
As shown in Figure 4, we extract  $B$  nonoverlapping bubbles for each coin  $c_{i}$  using the nonmaximum suppression (NMS) algorithm (Rosenfeld and Thurston, 1971). For the  $j^{th}$  bubble our model predicts a starting index  $s_{j}$  and an ending index  $e_{j}$ , where  $s_{j} < e_{j} \leq T$ ,  $j \in [1, \ldots, B]$ . We first extract top- $K$  bubble spans  $\mathbf{S}$  based on the bubble
Figure 5: Distribution of MBHN performance on bubble span prediction with price (violet), text (green) and price+text (blue) inputs along with confidence intervals.
Model	Task
Bubble Span	Number of Bubbles
F1↑	MCC↑	EM↑	Acc (%)↑	F1↑
EGRU	0.48±2e-4	0.15±6e-5	0.47±3e-4	56.70±2e-4	0.22±1e-2
EGRU+Attn	0.50±3e-5	0.18 ±1e-4	0.49±5e-4	59.48±6e-5	0.25 ±3e-4
HGRU	0.52*† ±1e-4	0.20*† ±3e-4	0.50*† ±4e-4	60.32*† ±2e-4	0.27*† ±3e-4
MBHN	0.53*† ±1e-3	0.23*† ±4e-4	0.52*† ±2e-3	62.01*† ±3e-4	0.29*† ±1e-3
Table 4: Ablation over MBHN components (over 10 independent runs). Bold, italics represent best and second-best results, respectively. * and † indicate significant  $(p < 0.01)$  improvement over EGRU (Euclidean GRU) and EGRU+Attn (Euclidean GRU with Attention), respectively under Wilcoxon's Signed Rank Test.
scores, calculated as  $p_{start}^{s_j} \times p_{end}^{e_j}$  for the  $j^{\text{th}}$  bubble starting at index  $s_j$  and ending at index  $e_j$ . Next, we initialize an empty set  $\overline{\mathbf{S}}$  and add the bubble  $(s_j, e_j)$  that posses the maximum bubble score to the set  $\overline{\mathbf{S}}$ , and remove it from the set  $\mathbf{S}$ . We also delete any remaining bubble spans  $(s_k, e_k)$  having an overlap with bubble  $(s_j, e_j)$ . This process is repeated for all the remaining spans in  $\mathbf{S}$ , until  $\mathbf{S}$  is empty or we get  $B$  bubble spans in the set  $\overline{\mathbf{S}}$ .
Network Optimization We optimize MBHN using a combination of losses corresponding to the three tasks; 1) Bubble start date prediction, 2) Bubble end date prediction and 3) Number of bubble prediction. We optimize MBHN using binary cross entropy loss over both bubble start date and end date prediction. For optimizing over the number of bubbles, we use the Focal loss (Lin et al., 2017). The net loss is the sum of the three losses.