## 1 Introduction  
In 2019, 280 million individuals were affected by depressive disorder (depression), including 23 million children and adolescents [1]. In this regard, the World Health Organization (WHO) reported that in 2020, during the COVID-19 pandemic, the number of individuals experiencing depressive disorder increased by 28% [2]. Depression refers to a condition that manifests differently from the typical fluctuations in mood and sentiments associated with the changes in daily life [3]. This disorder can impact all facets of an individual's life, including familiar, social, and communal relationships; those who have experienced abuse, severe loss, or stressful events are susceptible to suffering depression. During a depressive episode, the individual may experience a depressed mood, characterized by feelings of sadness, irritability, or emptiness, or a loss of pleasure or interest in activities [4, 5]. Individuals may manifest several other symptoms, including difficulty concentrating, a sense of overwhelming guilt or low self-esteem, a lack of hope regarding the future, recurrent thoughts of death or suicide, sleep disturbances, changes in appetite or weight, and feelings of profound fatigue or lack of energy. It is important to note that individuals with depression are at an increasing risk of suicide [6]. The above facts point out that early depression detection is essential because this illness can generate high economic costs to health systems [7]. Processing social network data from Twitter, Reddit, and Weibo with Machine Learning (ML), Deep Learning (DL), and Natural Language Processing (NLP) techniques has been used for early depression detection; it has been facilitated since users usually express their sentiments through publications with words related to depression in social networks. The works [8,9] analyzed sentiment in social network data to raise statistics about depression-related messages; they do not focus on classifying tweets as depressive or non-depressive. The investigations [10, 11, 12, 13, 14] used Random Forest (RF) [15], Support Vector Machines (SVM) [16], Extreme Gradient Boosting Machines (XGBoost) [17], Recurrent Neural Networks (RNN) [18], Convolutional Neural Networks (CNN) [19], and Hierarchical Attention Networks (HAN) [20] to detect depression and other mental diseases; notably, these works employ few depression-related data. The work [21] classified depression, anxiety, suicide, and bipolar behavior in a large dataset collected before the COVID-19 pandemic in the Reddit social network, using the Bidirectional Encoder Representations from Transformers (BERT) [22]; this BERT-based solution did not focus on depression classification and, consequently, involved few depression data. This paper introduces the Depression dEtcion Based on Encoder-oNly Transformer (DEENT), an approach for binary depression detection from Twitter data collected during the COVID-19 pandemic. DEENT includes a tweets dataset labeled as non-depressive and depressive with BERT and K-means, and two flavors: DEENT-Generic and DEENT-Bert. The flavors leverage the encoder-only architecture of Transformers to detect depressive tweets on high-dimensional data by processing depression-related words effectively through attention mechanisms. DEENT-Bert is based on a pre-trained model built for classifying tweets, while DEENT-Generic uses the encoder-only architecture without previous training. An extensive evaluation using labeled depressive tweets reveals that DEENT outperforms RF, XGBoost, SVM, RNN, and CNN in detecting depression disease. In particular, DEENT-Generic achieved higher accuracy, balanced accuracy, precision, recall, and f1-score than RF, XGBoost, SVM, RNN, and CNN. In turn, DEENT-Bert outperforms DEENT-Generic and MentalBERT regarding accuracy, balanced accuracy, precision, and f1-score. The results reveal that DEENT is a promising solution for depression detection expressed in tweets.