-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
240 lines (219 loc) · 10.1 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
<html>
<head>
<title>Training Data Attribution for Diffusion Models</title>
<link rel="stylesheet" href="style.css">
<style>
.mainContainer {
display: flex;
flex-direction: column;
align-content: center;
}
.splash {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 100vh;
margin-left: 10vw;
margin-right: 10vw;
}
.abstract {
margin: 1em;
padding: 2em;
padding-bottom: 4em;
padding-top: 0.5em;
margin-top: 0;
margin-bottom: 0.5em;
background-color: rgba(0,0,0,0.1);
transition: color 0.25s linear, background-color 0.25s linear, scale 0.25s ease-in-out;
color: rgb(64,64,64);
scale: 0.99;
}
.abstract:hover {
background-color: rgba(0,0,0,0.05);
scale: 1;
color: black;
}
.abstract>p{
text-align: justify;
margin-top: 0.1em;
margin-bottom: 1em;
font-family: Arial, Helvetica, sans-serif;
font-size: 0.9em;
padding-left: 1em;
padding-right: 1em;
}
.abstract>h3{
margin-bottom: 0.1em;
border-bottom: double 5px rgba(0,0,0,0.2);
font-variant: small-caps;
font-size: 1.25em;
font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
}
.button {
text-align: center;
background-color: black;
position: relative;
width: 30vw;
border-radius: 0.5em;
margin: 0;
padding: 1em;
color: white;
border: solid 1px black;
box-shadow: 0 0 rgba(0,0,0,0.25);
font-weight: 900;
font-variant: small-caps;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
transition: box-shadow 0.2s linear, background-color 0.2s linear;
height: calc(100% - 2em);
}
.button:hover {
background-color: coral;
box-shadow: 0.5em 0.5em rgba(0,0,0,1);
}
a:link { text-decoration: none; }
a:visited { text-decoration: none; }
a:hover { text-decoration: none; }
a:active { text-decoration: none; }
.titleText {
text-align: center;
}
.titleText>h1 {
margin-bottom: 0.5em;
font-size: 3em;
font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
}
.titleText>h4 {
margin-top: 0;
margin-bottom: 0.2em;
font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
}
.titleText>h5 {
margin-top: 0;
margin-bottom: 2em;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
font-weight: 100;
opacity: 0.5;
}
.coverScreen {
z-index: 10;
height: max(100vh, 100vw);
width: max(100vh, 100vw);
position: fixed;
background-color: black;
pointer-events: none;
}
.coverScreen>canvas {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
</style>
</head>
<body style="margin: 0; padding: 0;">
<div class="coverScreen" id="cover">
<canvas id="canvas" width="256" height="256"></canvas>
</div>
<div class="mainContainer" style="filter: blur(10px);" id="mainContainer">
<div class="splash">
<div class="titleText">
<h1>Training Data Attribution for Diffusion Models</h1>
</div>
<div class="titleText">
<h4>Zheng Dai<sup>1</sup>, David K Gifford<sup>1</sup></h4>
</div>
<div class="titleText">
<h5><sup>1</sup>Computer Science and Artificial Intelligence Laboratory, Massachusetts Institute of Technology</h5>
</div>
<div style="border-top: solid 2px rgba(0,0,0,1); height: 0.5em; width: 100%;"></div>
<div class="abstract">
<h3>Overview</h3>
<p>
The use of <b>generative diffusion models</b> for creative uses has sparked serious ethical and legal discussions, in particular surrounding the sourcing and use of <b>training data</b>. Yet the role that training data plays in producing these models, a <em>key element of this discussion</em>, remains poorly understood. To address this, we tackle the technical challenge of attributing the output of generative diffusion models to specific training data.
</p>
<h3>Technical Details</h3>
<p>
We show how a collection of diffusion models trained on different (yet potentially overlapping) batches of training data can be used to collaboratively generate a picture. The influence of a given piece of training data can then be removed from the generated picture by removing the contributions of all the models that have seen that piece of data. This gives a <em>counterfactual picture</em>, which captures what the original picture would have looked like had the original training data not contained the removed training data. The counterfactual picture can then be compared with the original picture to obtain some qualitative or quantitative measure of influence.
</p>
<h3>Main Contributions</h3>
<p>
We provide to our knowledge the first method of attributing the samples produced by generative diffusion models to training data.
</p>
</div>
<div style="border-bottom: solid 2px rgba(0,0,0,1); height: 0.1em; width: 100%;"></div>
<div style="border-bottom: solid 1px rgba(0,0,0,1); height: 0.5em; width: calc(100% - 2em);"></div>
<div style="display: flex; flex-direction: row; justify-content: center; padding-top: 3em;">
<a href="https://arxiv.org/pdf/2306.02174.pdf">
<div class="button">
Check out the preprint here
</div>
</a>
<div style="width:2em;"></div>
<a href="https://github.com/zheng-dai/GenEns">
<div class="button">
Code and data availabile here
</div>
</a>
</div>
<div style="height:3em;"></div>
</div>
</div>
<script>
var animate = -3;
var cover = document.getElementById("cover");
cover.style.setProperty("opacity", 1);
var canvas = document.getElementById("canvas");
var ctx = canvas.getContext("2d");
var w = canvas.width;
var h = canvas.height;
ctx.fillStyle = "gray";
var mainContainer = document.getElementById("mainContainer");
var idata = ctx.createImageData(512, 512); // create image data
var buffer32 = new Uint32Array(idata.data.buffer); // get 32-bit view
var bufferFloat = []; // keeps continuous brownian motion data
for (let i = 0; i < buffer32.length; i++) bufferFloat.push(0);
function noise(ctx, sigma) {
var len = buffer32.length - 1;
while(len--){
//draw normal rv
const u = 1 - Math.random();
const v = Math.random();
const z = Math.sqrt( -2.0 * Math.log( u ) ) * Math.cos( 2.0 * Math.PI * v )
//brownian motion
bufferFloat[len] = Math.max(Math.min( ((bufferFloat[len] + (z*sigma) - 0.5)*0.95) + 0.5, 0.8 ), 0.2);
const intBuffer = ( (Math.floor(bufferFloat[len] * 256)) % 256 ) >>> 0;
buffer32[len] = (intBuffer<<0) | (intBuffer<<16) | (intBuffer<<8) | ((255>>>0)<<24);
}
ctx.putImageData(idata, 0, 0);
}
function initnoise(ctx) {
var len = buffer32.length - 1;
while(len--){
bufferFloat[len] = (Math.random()*0.1) + 0.45;
const intBuffer = ( (Math.floor(bufferFloat[len] * 256)) % 256 ) >>> 0;
buffer32[len] = (intBuffer<<0) | (intBuffer<<16) | (intBuffer<<8) | ((255>>>0)<<24);
}
ctx.putImageData(idata, 0, 0);
}
initnoise(ctx);
(function loop() {
noise(ctx, 0.1);
animate = animate + 0.25;
if (animate > 5)
{
animate = 5;
mainContainer.style.setProperty("filter", "blur(0px)");
cover.style.setProperty("opacity", 0);
}
else
{
const alpha = 1/(1 + Math.exp(animate));
cover.style.setProperty("opacity", alpha);
if (animate > -2) mainContainer.style.setProperty("filter", "blur(" + Math.max(6-(2*animate),0) + "px)");
setTimeout( () => requestAnimationFrame(loop), 50 );
}
})();
</script>
</body>
</html>