Synaptic polarity, that is, whether synapses are inhibitory (−) or excitatory (+), is challenging to map, despite being a key to understand brain function. Here, synaptic polarity is inferred computationally considering three experimental scenarios, depending on the nature of available input data, using the Caenorhabditis elegans connectome as an example. First, the inputs consist of detailed neurotransmitter (NT) and receptor (R) gene expression, integrated through the connectome model (CM). The CM formulates the problem through a wiring rule network that summarizes how NT-R pairs govern synaptic polarity, and resolves 356 synaptic polarities in addition to the 1752 known polarities. Second, known synaptic polarities are considered as an input, in addition to the NT and R gene expression data, but without wiring rules. These data train the spatial connectome model, which infers the polarity of 81% of the CM-resolved connections at > 95% precision, while also inferring 147 of the remaining unknown polarities. Last, without known expression or wiring rules, polarities are inferred through a network sign prediction problem. As an illustration of high performance in this case, the generalized CM is introduced. These results address imminent challenges in unveiling large-scale synaptic polarities, an essential step toward more realistic brain models.