My plan is to get the overall euclidean distance matrix for all the vectors in N number of dataset. Each dataset is basically an array of n-dimensional points. For e.g: A dataset can be like [[1,2,3,...n],[1,2,3,..n],...[1,2,3,n]]. However, the datasets are not gonna be shared to a single entity for which I cannot compile them and thus will not know all the points to calculate pairwise euclidean distance for some similarity calculation and clustering analysis and modeling. However, I will be only notified what are the common vectors in the datasets and distance of the vectors in any dataset with respect to those common vectors without knowing or passing the point's coordinates. If the dataset could be shared in the same model, I wouldn't have to face this distributed calculation problem.


A and C are two n-dimensional vectors from two different dataset. They have a common vector B. I want to calculate euclidean distance between A and C without exposing A and C, rather using B. Lets say ED(A,B) is calculated in model_1 and ED(B,C) is calculated in model_2, I can easily use ED(A,B) i.e AB and ED(B,C) i.e BC to compute ED(A,C). However, if someone know B they can easily find out A and C. Even if B is a randomly created common point, if it available, A and C can also be found. Is it possible to use B such that A and C cannot be retrieve in anyway. I have looked into differential privacy, PATE, SMPC techniques but they have their limitations in preserving privacy.

Work done so far :



Given the euclidean distance between vector A and vector B, and that between vector B and vector C, how to calculate the euclidean-distance between point A and C such that there is no way to retrieve A and C even if B is known?

Any computation technique I can follow?

Thanks in advance. 🙏

  • 1
    $\begingroup$ I am sure that there are people who can answer this question in scicomp.SE, but it is more appropriate for the computer science stackexchange. $\endgroup$ Aug 1 at 2:24
  • $\begingroup$ I will really appreciate if someone give me some guidance..really stucked on it and thinking about it everyday $\endgroup$ Aug 3 at 8:28
  • $\begingroup$ What is the aggregation operation you are referring to? $\endgroup$
    – nicoguaro
    Aug 4 at 20:44
  • 2
    $\begingroup$ Are you imagining that combining A, B, C will somehow reduce the amount of work you need to do versus computing the combined matrix all at once? I'm not sure how knowing about distances within the small matrices helps you know distances in the big matrix, eg, the distance between point 1 and point n. $\endgroup$
    – Richard
    Aug 5 at 5:16
  • 2
    $\begingroup$ Based on your question on Math.SE you can't get any information beyond the triangle inequality. The trivial case is when $A$ and $C$ are the same and then distance is 0. The other extreme case is when the three points are collinear and the distance is the sum of the distances. So, I guess I don't understand what you're trying to do. $\endgroup$
    – nicoguaro
    Aug 5 at 18:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.