paper
problem :
๋ชจ๋ธ์ด ์ปค์ง์ ๋ฐ๋ผ training data๋ฅผ ์ธ์ฐ๋ ์ผ์ด ์๊ธด๋ค. ์ด๋ฌํ ํ์์ด 1) ๋ชจ๋ธ ํฌ๊ธฐ 2) ๋ฐ์ดํฐ ๋ฐ๋ณต ํ์ 3) ์ฃผ์ด์ง๋ context์ ๊ธธ์ด์ ๋ฐ๋ผ ์ผ๋ง๋ ์ฆ๊ฐํ๋์ง๋ฅผ ์ ๋์ ์ผ๋ก ํ๊ฐํด๋ณธ๋ค.
conclusion :

- Model scale: Within a model family, larger models memorize 2-5ร more data than smaller models.
- Data duplication: Examples repeated more often are more likely to be extractable.
- Context: It is orders of magnitude easier to extract sequences when given a longer surrounding context. -> ์ข์ ์ชฝ์ผ๋ก ํด์ํ๋ฉด ๊ทธ๋งํผ adversarial attack์ ํ๊ธฐ ์ด๋ ต๋ค๋ ๋ป์. Practitioners building language generation APIs could (until stronger attacks are developed) significantly reduce extraction risk by restricting the maximum prompt length available to users.
details :
- ์ด์ ๋ ผ๋ฌธ์์ ํ์ต ๋ฐ์ดํฐ๋ฅผ memorization ํ๋ ๋น์จ์ด ํ์ต ๋ฐ์ดํฐ์ 0.00000015%๋ผ๊ณ ํ์ง๋ง, ์ด ๋ ผ๋ฌธ์ ํตํด ์ต์ 1%์ ํ์ต ๋ฐ์ดํฐ๋ฅผ memorization ํ ๊ฒ์ ํ์ธํ๋ค.
- memorization์ ์ ์ํ๋ ๊ฑด ๋์ถฉ ์ธ๊ฐ์ง๊ฐ ์๋๋ฏ
- One leading general memorization definition is differential privacy (Dwork et al., 2006), which is formulated around the idea that removing any userโs data from the training set should not change the trained model significantly.
- counterfactual memorization (Feldman and Zhang, 2020; Zhang et al., 2021)
- k๊ฐ์ context token์ด ์ฃผ์ด์ก์ ๋, greedy decoding์ ํตํด ๋์ค๋ string s๊ฐ training data๋ด์ ์๋ ๊ฒฝ์ฐ <- ๋ณธ ๋ ผ๋ฌธ์์ ์ฑํํ ์ ์ if a modelโs training dataset contains the sequence โMy phone number is 555-6789โ, and given the length k = 4 prefix โMy phone number isโ, the most likely output is โ555-6789โ, then we call this sequence extractable (with 4 words of context).
- ์ ์ฒด sequence๋ฅผ query๋ก ์ฌ์ฉํ๋๊ฒ์ ์ฌ์ค์ ๋ถ๊ฐ๋ฅ ํ๋ฏ๋ก 5๋ง ์ฟผ๋ฆฌ๋ฅผ ๋ฝ์๋๋ฐ ์ด๋, ๊ธธ์ด๊ฐ 50, 100, … 500์ธ ์ํ์ค์ ๋ํด ๋ฐ๋ณต๋ ์ํ์ค์ ๊ธธ์ด ๋ณ๋ก 1000๊ฐ์ฉ ๋ฝ์๋ค.
- ๋ชจ๋ธ์ GPT-Neo(125M, 1.3B, 2.7B, 6B), ๋ฐ์ดํฐ์ ์ Pile dataset(825GB, ์ฑ , ์น, ์คํ์์ค ์ฝ๋)์ ์ฌ์ฉํ์๋ค. ๋ชจ๋ธ๊ณผ ๋ฐ์ดํฐ์ ์ ๊ณต๊ฐ๋ ๊ฒ๋ค ์ค ๊ฐ์ฅ ํฐ ๊ฒ๋ค์ด๋ค. ์ด ๋, ๋ชจ๋ธํฌ๊ธฐ - memorization ๊ด๊ณ๋ log-linearํจ.
- beam search(b=100)์ ํด๋ ์์ฃผ ์กฐ๊ธ extracted memorization์ด ๋์๋ค. (ํ๊ท 2%, ์ต๋ 5.6%) 45%์ ๊ฒฝ์ฐ beam search์ greedy๋ ๊ฐ์ ๊ฒฐ๊ณผ๋ฅผ ๋๋ค.
- T5์ C4๋ก๋ ์คํ์ ์งํ. ์ด๋๋ masked LM์ ์๋ฒฝํ๊ฒ ๋ณต๊ตฌํ์ ๊ฒฝ์ฐ memorizationํ๋ค๊ณ ์ ์ํ๋ค. ์ ์ฒด์ ์ธ ๊ฒฝํฅ์ GPT-Neo์ ๊ฐ์๋ค. ๊ทธ๋ฌ๋ ๋ชจ๋ธํฌ๊ธฐ - memorization์ non-linearํ์ง ์์๊ณ , 140๋ฒ ์ดํ๋ก ๋ฐ๋ณต๋ ์ํ์ค๊ฐ (๋ ๋ฐ๋ณต๋ ์ํ์ค๋ณด๋ค) ์ ์๋ฏธํ๊ฒ ์ธ์์ง ํ๋ฅ ์ด ๋์๋ค. ๊ทธ๋ฌ๋ ์ด๋ ํด๋น ์ํ์ค์ ๊ณต๋ฐฑ์ด ๋ง์์ ๋ ์ฌ์์ ๊ทธ๋ฌ๋ค(…)
- 50 ํ ํฐ ์ด์์ ์ํ์ค์ ๋ํด ๋ฐ๋ณต์ ์ ๊ฑฐํ C4๋ก๋ ํ์ต์ ํ๋๋ฐ ์ธ์ธ ํ๋ฅ ์ด 1/3 ์ค์ด๋ค์๋ค.
next papers :
- training data extraction attacks (adversarial attack in LM)
- GitHub Copilot: Parrot or crow?
- Membership inference attacks against machine learning models.
- Understanding unintended memorization in federated learning.
- Calibrating noise to sensitivity in private data analysis
thinkings :
- GAN๊ณผ ๋น์ทํ ๋ฐฉ์์ผ๋ก extraction์ ๋ชปํ๊ฒ ํ๋ ๋ชจ๋ธ ์ ์ง ์์ ๊ฒ ๊ฐ๋ค.
- privacy๋ ๋ณดํต ์ซ์์ ๊ด๋ จ๋์ด ์์ง ์์๊น….
- ๊ฒฐ๊ตญ augmentation์ผ๋ก ํด๊ฒฐํ ์ ์์ ๊ฒ ๊ฐ๊ธฐ๋ ํ๋ฐ..๊ทผ๋ณธ์ ์ธ ํด๊ฒฐ๋ฒ์ ์๊ฐํด๋ณผ๊น
- memorization != overfitting์ด๋ผ๊ณ ํ๋ค https://bair.berkeley.edu/blog/2019/08/13/memorization/
- decoding ๋ฐฉ์์ ๋ฐ๊ฟ์ ๋ฐ๋ผ tackleํ ์ ์์๊น?
- ๋๋ teacher force๋ฅผ ์ฌ์ฉํจ์ ๋ฐ๋ผ ๋ memorization?