## 1 Introduction  
Cellular Internet of Things (IoT) is an important research topic within beyond fifth-generation (B5G) networks [1]. Typical applications involve wireless sensor networks, smart cities, smart grids, smart factories, and connected vehicles [2, 3]. The number of IoT devices has been explosively increasing recently, while most devices are low-power nodes whose batteries are expected to be usable for years. Furthermore, such IoT devices are usually distributed over a long range. Therefore, we can point out the main requirements of cellular IoT in B5G networks: massive connectivity, low power consumption, and broad coverage [1]. Exploiting new wireless technologies, such as massive multiple-input multiple-output (MIMO), intelligent reflecting surfaces, and others, is essential to achieve such goals. Massive MIMO is already a successful technology [4]. Its fundamental idea is to equip base stations (BSs) with many antennas to serve single-antenna users scattered in the cell. It benefits from the fact that the effects of uncorrelated noise and fast fading disappear as the number of BS antennas grows to infinity, remaining only the inter-cellular interference that results from pilot contamination [5]. Massive MIMO systems usually employ a time-division duplex scheme that demands the transmission of only uplink (UL) pilot signals to acquire channel state information, since the downlink (DL) channel can be estimated by channel reciprocity [6]. However, while the number of devices is continually increasing, motivated by the wide spread of IoT applications, the number of resources the cellular network offers remains scarce. This fact gives rise to performance issues such as pilot collisions when two or more users choose the same pilot trying to access BS resources. Therefore, establishing an effective random-access (RA) policy is mandatory. Several methods have been presented to enhance the traditional random access performance, such as access class barring (ACB), slotted access, and backoff [7]. Among several proposed solutions for the congestion problem resulting from massive access, there are, for instance, (**a**) [7], which investigates an efficient random access procedure based on ACB to decrease the access delay and the power consumption under wireless network congestion resulting from massive access; (**b**) the _strongest-user collision resolution_ (SUCRe) protocol from [8]. The SUCRe protocol is a grant-based, four-step RA approach whose main idea consists of allowing just the strongest pilot competitor to access the BS resources each time. Numerical results indicate that the SUCRe protocol can solve about 90% of all collisions. However, the four-step procedure required for the BS to grant exclusive communication resources to devices could result in a performance bottleneck, being a source of excessive delay and signaling overhead. Therefore, it is not the ideal choice for massive machine-type communication (mMTC) systems, where accessing devices usually have small data packets to transmit sporadically. Other works such as [9; 10; 11; 12] present proposals for optimization of the SUCRe protocol, showing promising results. However, they are also grant-based protocols that introduce extra complexity or overhead to the SUCRe protocol. B5G RA schemes should achieve high scalability under latency and reliability constraints to support new use cases. For this purpose, grant-free (GF) RA protocols have gained increasing interest, as they can drastically reduce control signaling for connection establishment [1]. Many GF RA protocols available in the literature are derived from the contention resolution diversity slotted ALOHA [13] and irregular repetition slotted ALOHA [14]. The idea behind such schemes is to repeat the transmission of data packets in several randomly chosen slots, including the indices of the chosen slots as side information [15; 16].