
paper
problem : ๋จ์ํ ํธ๋ ์ด๋ ๋ฐ์ดํฐ์ ์๋ ๊ธ๊ท๋ฅผ ๋ชจ๋ธ์ด ์ธ์ ๋ค๊ณ ๋ฌธ์ ์ผ๊น? ๋ง์ด ๋์จ ๋ฌธ๊ตฌ๋ผ๋ฉด ๊ทธ๋ด์ ์์ง ์๋? ๋ฌธ์ ๋ ์ ๋์ค์ง ์๋(rare)ํ ๋ฐ์ดํฐ๋ฅผ ์ธ์ ์ ๋๋ค.
solution : ๋ฐ์ดํฐ๋ฅผ subset์ผ๋ก ๋๋๊ณ ํน์ ์ํ์ด ํด๋น sample์ ์๊ณ ์๊ณ ์ ๋ฐ๋ผ ๋ชจ๋ธ ์ฑ๋ฅ์ด ๋ง์ด ๋ฐ๋๋ฉด ๊ทธ๊ฑธ ๋์ memorization์ ํ๋ค๊ณ ์ ์ํ์
Counterfactual memorization measures the expected change in a modelโs prediction when a particular example is excluded from the training set.
์ด๋ฅผ ๊ตฌํ๊ธฐ ์ํด์, ์ ์ฒด ํธ๋ ์ด๋ ๋ฐ์ดํฐ๋ฅผ ์ํ๋ง ํ๋ค ๋
๋ฆฝ์ ์ผ๋ก ํ์ต ์ํจ๋ค. ๊ฐ ๋ชจ๋ธ๋ค์ ๋ํด ํน์ ์ํ x๊ฐ ์๋ ๋ชจ๋ธ(์ดํ IN ๋ชจ๋ธ)์์ next token prediction์ ํ ์ ํ๋์ ์ํ x๊ฐ ์๋ ๋ชจ๋ธ(์ดํ OUT ๋ชจ๋ธ)์์ ๊ฐ์ ํ์คํฌ๋ฅผ ํ์ ๋์ ์ ํ๋ ์ฐจ์ด๋ฅผ ์ธก์ ํ๋ค.
More formally, we say a training example x is counterfactually memorized, when the model predicts x accurately if and only if the model was trained on x.
- We define counterfactual memorization in neural LMs which gives us a principled perspective to distinguish โrareโ (episodic) memorization from โcommonโ (semantic) memorization in neural LMs (Section 2).
- We estimate counterfactual memorization on several standard text datasets, and confirm that rare memorized examples exist in all of them. We study common patterns across memorized text in all datasets and the memorization profiles of individual internet domains. (Section 3).
- We extend the definition of counterfactual memorization to counterfactual influence, and study the impact of memorized examples on the test-time prediction of the validation set examples and generated examples (Section 4).
Generation-Time Memorization์ ์ธก์ ํ๊ธฐ ์ํด์ generated ๋ ์ํ์ค๊ฐ training data์ ์๋์ง ํ์ธํ๊ฑฐ๋ training data๋ฅผ ๊ตฌํ๊ธฐ ์ด๋ ค์ฐ๋ฉด LM์ perplexity๋ฅผ ๋น๊ตํ๋ค. ์ด๋ฌํ memorization๊ณผ ์ฐ๋ฆฌ๊ฐ ์ ์ํ๋ Counterfactual memorization์ ๋ค๋ฅธ ์ ์, ํธ๋ ์ด๋ ๋ฐ์ดํฐ์ near-duplicate ๋ฐ์ดํฐ๊ฐ ๋ง๋ค๋ฉด, ์ฐ๋ฆฌ์ training set์์ subset์ ์ ๊ฑฐํ๊ณ ๋์๋ ๋ง์ด ๋จ์์์ ๊ฒ์ด๊ธฐ ๋๋ฌธ์ memorization์ผ๋ก ์ธก์ ๋์ง ์๋๋ค๋ ์ ์ด๋ค.
counterfactual memorization์ด ๋ฎ๊ฒ ์ธก์ ๋ ํธ๋ ์ด๋ ์ํ์ ๊ฒฝ์ฐ ๋ฐ๋ณต๋๋ ๋ฌธ๊ตฌ(๋ง์ง๋ง block์์ ๋
ธ๋์ highlight๋ฅผ ์ ์ธํ text๋ค)๊ฐ ๋ง์ ๊ฒ์ ํ์ธ ํ ์ ์์์.
In summary, generation-time memorization measures how likely a trained model would directly copy from the training examples, while counterfactual memorization aims to discover rare information that is memorized.
๋ชจ๋ธ์ T5์ ์ฌ์ฉํ๊ณ , C4, RealNews, Wiki๋ฅผ ์ฌ์ฉํ๋ค. training data์ 25%์ฉ subset์ผ๋ก ๋ชจ๋ธ์ ๋ง๋ค์๋ค.
์คํ ๊ฒฐ๊ณผ๋ ์์ ๊ฐ๋ค. ๊ทธ๋ฅ ์ค๊ธ๋ณด๋ค ํน์ํ ํ
์คํธ๋ค(์ ์ฒด ๋๋ฌธ์, table, bullet list, multilingual texts)์์ ๋ ๋ง์ด ์ธ์ฐ๋ ์ฑํฅ์ด ์์๋ค.
memorization๊ณผ ์ ์ฌํ๊ฒ ํ sample์ด ๋ชจ๋ธ์ ์ผ๋ง๋ ์ํฅ์ ๋ฏธ์ณค๋ ์ธก์ ํ ์ ์๋๋ฐ Counterfactual Influence๋ผ๊ณ ํ๋ค.
์ด๋ฅผ ์ธก์ ํ๊ธฐ ์ํด์
์ด๋ ๊ฒ ํ๋ฉด ๋๋ค. ์์ ์์๊ณผ ๋ค๋ฅธ์ ์, x๊ฐ x’์ ๋ผ์น ์ํฅ์ ์ธก์ ํ๊ธฐ ์ํด์ x๊ฐ ์๋ subset๊ณผ x๊ฐ ์๋ subset์ ๋ํด x’์ ๋ํด ์ธก์ ํ๋ค๋ ์ ์ด๋ค. ์ฆ ์์ memorization์ x๊ฐ x์ ์ค์ค๋ก influence๋ฅผ ์ฃผ๋ ๊ฒ์ ์ธก์ ํ๋ค๊ณ ๋ณผ ์ ์๋ค.
๋ณดํต์ ๊ฒฝ์ฐ memorization์ด ๋์ผ๋ฉด influence๋ ๋์์ผ๋, ๋ชจ๋๊ฐ ๊ทธ๋ ์ง ์์๋๋ฐ, 0.4์ด์์ memorization์ ๊ฐ์ง ๋ฐ์ดํฐ์ ๋ํด์๋ influence๊ฐ ๋์ ๋๊ฒ ๋ฎ์์ก๋ค. ๊ทธ ์ด์ ๋ ๋์ memorization์ ๊ฐ์ง ๋ฐ์ดํฐ ์ค ๋์ ๋น์จ์ด ์ฐ๋ ๊ธฐ ํ ์คํธ ๋ฐ์ดํฐ(์๋ฏธ์๋ ์ผ๊บ ๊บ ๋ถ์ ์ด๋ฐ๊ฑฐ ๋งํ๋๋ฏ?) ์ด๊ธฐ ๋๋ฌธ์ ํ์ต์ ํ๊ธฐ ์ํด์ ์ธ์์ผํ์ง๋ง ํฅ๋ฏธ๋ก์ด ์ ๋ณด๋ฅผ ๋ฐฐ์ฐ์ง ์์์ influenceํ ์ ๋ณด๊ฐ ์์๋ ๊ฒ์ด๋ค.
infl์ด ํด์๋ก train(x๊ฐ ์๋ subset)์ ์๋ ๋ฌธ์ฅ์ด ๊ทธ๋๋ก valid(x๊ฐ ์๋ subset)์ ์๋ ๊ฒฝํฅ์ ๋ณผ ์ ์์์. ์ฆ valid์ ๋๊ฐ์ ์
์ด ์์๊ธฐ ๋๋ฌธ์, train์ ๋ํ influence๊ฐ ์ปธ์ ๊ฒ์.

์ค์ ๋ก influence์ memorization ์ด ํฐ sample์ ๋ํ generation ๊ฒฐ๊ณผ๋ฅผ ๋ณด๋ ์๋์ ๊ฐ์์.
