Phil 12.15.20

Rolls-Royce’s Aletheia Framework is a practical toolkit that helps organizations to consider the impacts on people of using artificial intelligence prior to deciding whether to proceed. It looks across 32 facets of societal impact, governance and trust, and transparency and requires executives and boards to provide evidence that these have been rigorously considered.

10:00 – 1:00 Meeting with Mike D


  • Finish least-squares transform of embeddings to see what it looks like
  • I don’t see a straightforward way to produce and use a 4×4, so I’m starting with quaternions. Translation could be averaging the position of the points to calculate the center of the point cloud. The offset could be applied before the angle finding
  • I wound up using scipy.spatial.transform.Rotation. To apply the results of the matrix directly. Here’s the relevent code:
from scipy.spatial.transform import Rotation as R
import numpy as np

kv = we.create_embedding_from_query("select content from table_output where experiment_id = 2 and probe = '{}' and tag = 'tweet';".format(probe), key_list)

# calculate the rotations to map one embedding onto the other
mapping = False
if len(kv_list) > 0:
    kv0 = kv_list[0]
    intersect = list(set(kv.index2word) & set(kv0.index2word))
    primary = []
    secondary = []
    for w in intersect:
        pi = kv0.index2word.index(w)
        si = kv.index2word.index(w)
    A, res, rank, s = np.linalg.lstsq(primary, secondary, rcond=None)
    r = R.from_matrix(A)
    mapping = True
  • And it seems to work pretty well! Different embeddings seem to line up pretty well, and the February embedding seems to be farther away from the July embedding, with words like “Mike” and “Pence” in Feb, and coronavirus and @govcuomo in July
  • I can also do this with the regular data as well. Just limit the number of returns
  • 2:00 Meeting with Mike
  • 3:30 Meeting COVID meeting


  • Back to trying to figure out what’s going on.
  • Ok, I made some(?) progress. One of the really important things is for the rotation not to overshoot. If it does, there is a lot of oscillation as the algorithm overshoots, then overshoots as it comes back:
  • But when you fix that, everything looks pretty good!
  • Vadim thinks he may have fixed it, based on the behavior between the calculated and ‘physical’ vectors?


  • 4:30 resource discussion