Activation patching ek causal intervention technique hai mechanistic interpretability mein jo kisi component (neuron, attention head, layer) ke specific role ko isolate karta hai — ek input ki activations ko doosre input ki activations se replace karke, phir model behavior par downstream effect measure karke.
Attention weights correlation dikhate hain, causation nahi. Ek head pronouns par attend kar sakta hai lekin us information ka actual use nahi karta. Patching test karta hai: "Agar mein is component ki clean input dekhne ki ability hata dun, to kya model ka behavior badlega?"
Poori layer patch mat karo — sirf component A → component B tak ki path patch karo.
Kyun? Direct vs. indirect effects isolate karta hai. Ho sakta hai head 3.2 directly task solve nahi karta, lekin head 5.1 ko feed karta hai jo karta hai.
Technique: Specifically A→B se residual stream contribution replace karo, baaki paths intact rakhho.
Components ko sequence mein patch karo, hamesha previous steps ke best patches rakhte hue. Ek minimal circuit build karta hai jo behavior explain kare.
Socho tumhara dimaag ek math problem solve kar raha hai, lekin ek part galat number deta hai. Tum figure out karna chahte ho: "Mere dimaag ka kaun sa hissa gadbad kar raha tha?"
Yeh karo: Problem do baar solve karo. Pehli baar galat ho jaata hai. Doosri baar, koi tumhare dimaag mein sirf ek step ke liye sahi number whisper karta hai. Agar achanak poori problem sahi ho jaaye, to tum jaante ho: "Aha! Woh step wahi tha jo matter karta tha!"
Yahi hai activation patching. Hum ek robot brain (neural network) ko kuch galat karte hue lete hain, aur secretly use ek tiny hisse ke liye "correct" information dete hain. Agar robot achanak kaam karne lage, to hum jaante hain woh hissa super important tha. Yeh detective banne jaisa hai, lekin robot thoughts ke liye!
#flashcards/ai-ml
Activation patching kya hai? :: Ek causal intervention technique jahan tum ek component ki activations ko corrupted run se clean run ki activations se replace karte ho, phir measure karte ho ki behavior restore hota hai ya nahi — yeh prove karte hue ki woh component sahi behavior ke liye causally responsible tha.
Activation magnitude measure karne se patching behtar kyun hai? :: Activation magnitude correlation dikhati hai (kya saath fire karta hai), lekin patching causation dikhata hai (kya actually necessary hai). Ek neuron strongly activate kar sakta hai lekin redundant ya epiphenomenal ho sakta hai.
Causal effect ka formula likho aur har term explain karo :: ΔC=L(f(xcorrupt))−L(f(xcorrupt∣patch C)). Yeh component C patch karne par loss reduction measure karta hai. Positive Δ matlab patching ne help ki (loss kam hua), bade values matlab stronger causal role.
Patching aur ablation mein kya difference hai?
Ablation ek component remove karta hai (zero/mean par set karta hai), dikhata hai kya hota hai uske bina. Patching ek counterfactual activation se replace karta hai, dikhata hai kya hota hai different information ke saath. Patching cleaner causal attribution deta hai.
Tum head 4.2 patch karte ho aur behavior nahi badlta. Iska kya matlab hai?
Head 4.2 is specific behavior ke liye causally important nahi hai, chahe woh activate bhi kare. Yeh redundant, epiphenomenal, ya kisi doosre task par kaam kar raha ho sakta hai.
Path patching kya hai?
Sirf component A se component B tak ke specific information flow ko patch karna, baaki paths intact rakhte hue. Direct causal effects ko indirect ones se isolate karta hai.
Tum kaise detect karte ho ki do components redundant hain ya synergistic?
Tumhara metric tumhare research question se match kyun karna chahiye?
Generic metrics (jaise overall cross-entropy) saare behaviors par average karte hain. Agar tum toxicity detection study kar rahe ho, to tumhein specific toxic token logit measure karna hoga, na ki saare tokens par average loss.