We consider the spectrum sharing problem between a set of device-to-device (D2D) links and multiple co-located cellular networks. Each cellular network is controlled by an operator which can provide service to a number of subscribers. Each D2D link can either access a sub-band occupied by a cellular subscriber or obtain an empty sub-band for its exclusive use. We introduce a new spectrum sharing mode for D2D communications in cellular networks by allowing two or more D2D links with exclusive use of sub-bands to share their sub-bands with each other without consulting the operators. We establish a new game theoretic model called Bayesian non-transferable utility overlapping coalition formation (BOCF) game. We show that our proposed game can be used to model and analyze the above spectrum sharing problem. However, we observe that the core of the BOCF game can be empty, and we derive a sufficient condition for which the core is non-empty. We propose a hierarchical matching algorithm which can detect whether the sufficient condition is satisfied and, if it is satisfied, achieve a stable and unique matching structure which coincides with the overlapping coalition agreement profile in the core of the BOCF game. .sg) L. A. DaSilva is with CTVR, Trinity College Dublin, Ireland (e-mail: dasilval@tcd.ie). L. A. DaSilva is also with Virginia Tech, VA, USA.infrastructure (e.g., base station) even when the sources and destinations are close to each other. This not only increases communication delay and energy consumption but also reduces the reliability of the networks. For example, in cellular networks, failure of a base station can lead to mobile service outage for the entire coverage area of the corresponding cell. Device-to-device (D2D) communication without relying on the base station to forward the traffic provides an efficient way to increase the network capacity and reliability. Another issue is that the traditional exclusive spectrum ownership model used in existing cellular networks has resulted in inefficient spectrum utilization for a significant portion of the time [2], [3]. One technique that promises to address this problem is spectrum sharing, which allows under-utilized licensed spectrum to be shared by unlicensed devices. Allowing both D2D communication and spectrum sharing in cellular networks can improve network capacity, reliability and spectrum utilization efficiency. However, D2D links are generally established autonomously and cannot be fully controlled by the base station. In addition, choosing the wrong spectrum sharing pair of D2D links and cellular subscribers can result in high cross-interference, which may adversely affect both D2D links and cellular subscribers.This motivates the work in this paper, where we investigate the joint optimization of spectrum sharing approaches and sub-band allocation problem for a set of D2D links in an area with multiple co-located cellular networks. Each cellular network is controlled by an operator. We propose a general analytical framework in which each D2D link...