I am trying to solve an unconstrained optimization problem with the following properties: I am given a graph $G=(V,E)$ with functions $f_{ij}:\mathbb{R}^2\to \mathbb{R}$ for each edge $(i,j)$. I am trying to choose scalar variables $x_1,\dots,x_n$ for each vertex to minimize $$\sum_{(i,j)\in E } f_{ij} (x_i, x_j) $$. This is almost a separable problem except that a variable can appear in multiple functions. Are there any papers describing ways to exploit this special structure? The functions are continuous but not necessarily convex or concave.