← All work

Research, 2026

Representation alignment

A toy-scale test of unsupervised alignment between two independently trained encoders, with controls and held-out retrieval checks.

Role
Research design, implementation, and analysis.
Stack
Python, PyTorch, NumPy, SciPy, scikit-learn
Protocol
Held-out retrieval, unrelated-encoder control, and diagnostics.
Scope
Synthetic scenes and independently trained toy encoders.

01

Start with the reference

Before changing the setup, I reproduced the reference alignment pipeline on its real embedding pair. My run reached 96.37% top-1 retrieval accuracy. The recorded published result was 96.01%, and the official run in the project log was 96.008%.

The implementation centers and normalizes each space, constructs relative representations, obtains an initial correspondence with clustered similarity structure and QAP restarts, then fits an orthogonal Procrustes map. Two refinement stages alternate nearest-neighbor matches and map updates.

02

Independent encoders

I trained two encoders on the same toy scene distribution with different objectives, then evaluated only on a held-out split. The first non-overlapping alignment result was a null: 0.0% top-1 retrieval, mean matched-pair cosine -0.0067, and 1.25% shape accuracy. The unrelated control was similarly null.

The diagnostic identified mean-centering as the main failure mode for these embeddings. With L2 normalization only and paired training rows, stage-one mean cosine was 0.6629, with 93.1% above 0.5. The full held-out result reached mean matched-pair cosine 0.4988 and 71.83% shape accuracy, while the unrelated control reached 0.0067 cosine and 23.67% shape accuracy.

I then tested relative representations with parallel anchors. Its best independent-encoder run reached 77.31% shape accuracy and 0.7103 mean cosine, compared with 19.89% shape accuracy and 0.00009 mean cosine for its unrelated control. Exact top-1 retrieval remained low at 0.39%, so the result is evidence of recovered category structure rather than item identity.

03

Checks before interpreting it

Leakage

Split and control checks

The train and evaluation scene indices were separated, and an unrelated-encoder control was carried through each alignment run. The write verification recorded a clean result.

Anchors

Procrustes was not enough for identity retrieval

With 1,000 anchors, direct Procrustes alignment averaged 1.72% exact top-1 retrieval but 95.03% shape accuracy and 0.6902 mean cosine. It recovered coarse structure, not individual identity.

Self alignment

Known rotation behaved differently

Aligning an encoder to a rotated copy produced 32.5% top-1, 0.8553 mean cosine, and 100% shape accuracy. An unrelated control remained at 0.0% top-1 and 0.0055 cosine.

Refinement

The proxy was not the outcome

Across refinement iterations, the best-match proxy had Pearson r = 0.4378 with held-out functional cosine and first diverged at iteration 10. I treated it as a diagnostic, not a stopping criterion.

04, Result

Evidence for correspondence at toy scale.

96.37%

reference reproduction top-1 accuracy

77.31%

best independent-encoder shape accuracy with relative representations

0.7103

mean cosine for that aligned pair

19.89%

shape accuracy for the corresponding unrelated control

Next case study Savings score stress test →