A low reconstruction error says a sparse autoencoder (SAE) fits the activations. It does not say that its features are reliable units of analysis. The survey asks for failure-mode metrics to be reported next to reconstruction. Implement three of them.
Decoders are arrays of shape (n, d): row is feature 's decoder direction. Cosines always use unit-normalised rows and keep their sign: a feature only fires with positive activation, so a direction and its negative are different features.
duplicate_pairs(W_dec, threshold)
[i, j, cos] for every pair i < j whose decoder cosine is greater than threshold, with cos rounded to 4 decimals, sorted by cosine (highest first), ties by (i, j).absorption_report(Z, W_dec, probe_scores, parent, overlap)
Z: (N, n) feature activations. probe_scores: (N,) scores of a linear probe for the concept that feature parent is supposed to detect; the concept is present where the score is positive.Z[r, parent] <= 0). A missed row is absorbed when some other feature is active in it and its decoder cosine with the parent is greater than overlap."present", "missed", "absorbed" (ints), "recall" (fraction of present rows where the parent fires), "absorption_rate" (absorbed / present), both rounded to 4, and "absorbers": the sorted list of feature indices that absorbed the parent in at least one row.match_features(W_a, W_b)
n <= 8, trained with different seeds. Find the one-to-one matching, feature i of W_a with feature perm[i] of W_b, that maximises the total cosine (the assignment Hungarian matching solves).[perm, cosines]: perm a list of ints and the matched cosines rounded to 4.seed_stability(W_list, threshold)
K >= 2 dictionaries, average over all ordered pairs i != j: "seed_stability", the mean matched cosine, and "shared_fraction", the fraction of matched pairs whose cosine is greater than threshold. Return both, rounded to 4, in a dict.n <= 8 you can try every permutation, or run a dynamic program over subsets of used columns.