We investigate the modeling of a polymer melt on large length scale by averaging out fast fluctuating degrees of freedom in the microscopic model. We determine pair interactions in the coarse-grained system that give the best representation of the fine-grained system in a variational sense. Starting from the Gibbs-Bogoliubov inequality we derive a correction to a trial potential that minimizes the variational free energy of the coarse-grained system. By applying this correction repeatedly, pair interactions that are optimal in variational sense are obtained self-consistently. To calculate the potential of mean force in the polymer system, we consult the replica approach. The effective potential results in a radial distribution function for the coarse-grained sites that is less structured than that of the microscopic system. We also found that the soft effective interaction is unable to reproduce the virial distribution of the fine-grained system.