Provided with a non-convex first-order-differentiable loss function over the pairwise distances between a large ordered list of 3d points, I would like to find the optimal coordinates for the points (pairwise loss is invariant to rotations and translations), constrained such that the distance between two consecutive points is exactly 1.
Example: Let the loss be defined as minus the sum over all pairwise distances, the optimal solution for any number of points would be a straight line made out of length 1 segments. As another example, if the loss is the sum over all pairwise distances, the optimal solution would be a curve going back and forth between two points, with the length 1 segments overlapping in opposite directions. Real loss instances would be much more arbitrary, and optimal solutions are expected to take form as some intermediate curve.
I would like an optimization method that is well suited for a significant number of points (think 512-4096), can handle the consecutive distance constraint, and uses the gradient to accelerate the search.
I need to make sure I'm using a good method to approximate it as it will definitely restrict the performance of a downstream algorithm and might render it useless as a result.
I attempted to sample many random initializations, pick the best initial solution and optimize from there with adam. This does improve on just sampling more initializations or just optimizing more steps, but I don't know if this is even somewhat close to a good approximation of an optimal solution.
I also attempted to think on this through the lens of the segments themselves, but this requires representing each distance as a sum of many segments, but this feels like the wrong approach as it wraps the loss with either a deep or a redundent computation graph.