A general learning rule for network modeling of neuroimmune interactome