Skip to main content
Challenges Transformer lock
Artificial Intelligence Impossible Mechanistic interpretability: reverse engineering a transformer lock Solves: 2

Transformer lock

Author: CyberSamSU
Points
380

"Neural lock": a code of 16 hex characters gives ACCEPT for only one sequence. The lock is a small transformer, in model.json (tensors); all weights are integers, and the computation is exact (in integers, without rounding). It is impossible to try all 1616 variants — analyse the lock from the inside.

Model: T = 16 positions, token x[p] ∈ 0..15 (a hex digit), d_model = 49, d_head = 24, d_mlp = meta.d_mlp. All vectors are row vectors, and v·M is the multiplication of a row vector by a matrix. Forward pass:

h0[p] = W_E[x[p]] + W_P[p]
q[p]  = h0[p]·W_Q ;  k[p] = h0[p]·W_K ;  v[p] = h0[p]·W_V
s[p][r] = q[p]·k[r]                        (butun son, skalyar ko'paytma)
r*(p)   = argmax_r s[p][r]                 (hard attention; teng bo'lsa eng kichik r)
h1[p] = h0[p] + v[r*(p)]·W_O
m[p]  = ReLU(h1[p]·W_in + b_in)            (element bo'yicha max(0, .))
h2[p] = h1[p] + m[p]·W_out
z     = (sum_p h2[p])·W_U + b_U            (2 ta logit: [REJECT, ACCEPT])
ACCEPT  <=>  z[1] > z[0]

To make the lock harder: (1) the residual stream is rotated by an unknown unimodular (det = ±1) integer matrix R (W_E, W_P, W_O, W_out ← ·R; W_Q, W_K, W_V, W_in, W_U ← R−1·). (2) Attention directs each position to a different position. (3) At each position the MLP checks the pair (its own token, the token it attended to).

Find the only accepted sequence x[0..15]; the flag is these 16 hex digits (lowercase): BAYROQ{TRANSFORMER_QULF_<x[0]..x[15]>}.

Attached files
model.json Log in to download
Hints 3
Opening a hint reduces the points you get for solving this challenge.
Hint 1 −38 pts Log in
Hint 2 −76 pts Log in
Hint 3 −114 pts Log in
To submit a flag, log in.

First solvers

1. Mirjaxon Qaxxarov 24.11.2026
2. Odam 25.11.2026