Factor sums over factor function multplied by messages