LAGO - Linear Approximation for Graph Optimization