{ "task": { "id": "case_24", "name": "first_occurrence", "summary": "Copies each token in the sequence to the output unchanged.", "examples": [ { "input": [ "BOS", "b", "b", "a", "a", "b", "b", "a", "a", "a" ], "output": [ "BOS", "b", "b", "a", "a", "b", "b", "a", "a", "a" ] }, { "input": [ "BOS", "c", "c", "a", "c", "a", "c", "c", "a", "a" ], "output": [ "BOS", "c", "c", "a", "c", "a", "c", "c", "a", "a" ] }, { "input": [ "BOS", "c", "a", "c", "c", "a", "a", "c", "b", "c" ], "output": [ "BOS", "c", "a", "c", "c", "a", "a", "c", "b", "c" ] }, { "input": [ "BOS", "c", "c", "c", "b", "c", "b", "b", "c", "b" ], "output": [ "BOS", "c", "c", "c", "b", "c", "b", "b", "c", "b" ] }, { "input": [ "BOS", "c", "c", "c", "a", "c", "b", "a", "b", "b" ], "output": [ "BOS", "c", "c", "c", "a", "c", "b", "a", "b", "b" ] } ], "is_categorical": true }, "program": "first_occurrence = rasp.Aggregate(rasp.Select(rasp.indices, rasp.indices, rasp.Comparison.EQ), sop, default=None).named(\"first_occurrence\"); return first_occurrence", "components": [ { "id": "L0H0_ATTN", "hook": "blocks.0.attn.hook_result[0]", "role": { "tag": "ROUTER", "note": "Routes each position's token value to itself via an identity attention pattern. Each query position attends exclusively to its own key position, acting as a pass-through." }, "rasp_vars": [ "first_occurrence" ], "labels": [ "first_occurrence_1" ] } ] }