ZHANGYUXUAN-zR commited on
Commit
b527b78
·
verified ·
1 Parent(s): 1aad59e

Add files using upload-large-folder tool

Browse files
md/train/6vaActvpcp3/6vaActvpcp3.md CHANGED
@@ -165,7 +165,7 @@ Figure 1: Local coverage frequencies for adaptive conformal (blue), a non-adapti
165
 
166
  Daily open prices were obtained from publicly available datasets published by The Wall Street Journal. The realized local coverage frequencies for the non-adaptive and adaptive conformal methods on four different stocks are shown in Figure $1 .$ These stocks were selected out of a total of 12 stocks that we examined because they showed a clear failure of the non-adaptive method. Adaptive conformal inference was found to perform well in all cases (see Figure 9 in the appendix).
167
 
168
- As a visual comparator, the grey curves show the moving average 1500 Pt+250r=t250+1 Ir for sequences $\left\{ I _ { t } \right\} _ { 1 \leq t \leq T }$ that are i.i.d. Bernoulli(0.1). We see that the local coverage frequencies obtained by adaptive conformal inference (blue lines) always stay within the variation that would be expected from an i.i.d. Bernoulli sequence. On the other hand, the non-adaptive method undergoes large excursions away from the target level of $1 - \alpha = 0 . 9$ (red lines). For example, in the bottom right panel we can see that the non-adaptive method fails to cover the realized volatility of Fannie Mae during the 2008 financial crisis, while the adaptive method is robust to this event (see Figure 4 in the Appendix for a plot of the price of Fannie Mae over this time period).
169
 
170
  # 3 Related Work
171
 
@@ -247,9 +247,9 @@ In this setting, $\{ ( \alpha _ { t } , A _ { t } ) \} _ { t \in \mathbb { N } }
247
 
248
  # 4.2.2 Large deviation bound for the errors
249
 
250
- Our first have that $\operatorname { e r r } _ { t }$ orrect aveand since value. More precisely, by is stationary it follows that $\boxed { 4 . 1 }$ weus, ${ \mathrm { l i m } } _ { T \to \infty } T ^ { - 1 } \sum _ { t = 1 } ^ { T } { \mathrm { e r r } } _ { t } \ { \overset { a . s . } { = } } \alpha$ $\operatorname { e r r } _ { t }$ $\mathbb { E } [ \mathsf { e r r } _ { t } ] = \alpha$ to understand the deviation of T 1 PTt= from $\alpha$ we simply need to characterize the dependence structure of $\{ \mathrm { e r r } _ { t } \} _ { t \in \mathbb { N } }$ .
251
 
252
- We accomplish this in Theorem $^ { 4 . 1 , }$ which gives a large deviation bound on $\begin{array} { r } { | T ^ { - 1 } \sum _ { t = 1 } ^ { T } \mathrm { e r r } _ { t } - \alpha | } \end{array}$ The idea behind this result is to decompose the dependence in into two parts. First, there is dependence due to the fact that $\alpha _ { t }$ is a function of $\{ \mathrm { e r r } _ { r } \} _ { 1 \leq r \leq t - 1 }$ . In Section $\boxed { \mathbf { A } . 7 }$ in the Appendix we argue that this dependence induces a negative correlation and thus the errors concentrate around their expectation at a rate no slower than that of an i.i.d. Bernoulli sequence. This gives rise to the first term in $( 6 )$ , which is what would be obtained by applying Hoeffding’s inequality to an i.i.d. sequence. Second, there is dependence due to the fact that $A _ { t }$ depends on $A _ { t - 1 }$ . More specifically, consider a setting in which the distribution of $Y | X$ has more variability in some states than others. The goal of adaptive conformal inference is to adapt to the level of variability and thus return larger prediction sets in states where the distribution of $Y | X$ is more spread. However, this algorithm is not perfect and as a result there may be some states $a \in { \mathcal { A } }$ in which $\mathbb { E } [ \mathbf { e r r } _ { t } | A _ { t } = a ]$ is biased away from $\alpha$ . Furthermore, if the environment tends to spend long stretches of time in more variable (or less variable) states this will induce a positive dependence in the errors and cause T 1 PTt=1 to deviate from $\alpha$ . To control this dependence we use a Bernstein inequality for Markov chains to bound $\begin{array} { r } { | T ^ { - 1 } \sum _ { t = 1 } ^ { T } \mathbb { E } [ \mathrm { e r r } _ { t } | A _ { t } ] - \alpha | } \end{array}$ . This gives rise to the second term in $( 6 )$
253
 
254
  Theorem 4.1 Assume that $\{ A _ { t } \} _ { t \in \mathbb { N } }$ has non-zero absolute spectral gap $1 - \eta > 0$ . Let
255
 
 
165
 
166
  Daily open prices were obtained from publicly available datasets published by The Wall Street Journal. The realized local coverage frequencies for the non-adaptive and adaptive conformal methods on four different stocks are shown in Figure $1 .$ These stocks were selected out of a total of 12 stocks that we examined because they showed a clear failure of the non-adaptive method. Adaptive conformal inference was found to perform well in all cases (see Figure 9 in the appendix).
167
 
168
+ As a visual comparator, the grey curves show the moving average 1500 Pt+250r=t250+1 Ir for sequences $\left\{ I _ { t } \right\} _ { 1 \leq t \leq T }$ that are i.i.d. Bernoulli(0.1). We see that the local coverage frequencies obtained by adaptive conformal inference (blue lines) always stay within the variation that would be expected from an i.i.d. Bernoulli sequence. On the other hand, the non-adaptive method undergoes large excursions away from the target level of $1 - \alpha = 0 . 9$ (red lines). For example, in the bottom right panel we can see that the non-adaptive method fails to cover the realized volatility of Fannie Mae during the 2008 financial crisis, while the adaptive method is robust to this event (see Figure 4 in the Appendix for a plot of the price of Fannie Mae over this time period).
169
 
170
  # 3 Related Work
171
 
 
247
 
248
  # 4.2.2 Large deviation bound for the errors
249
 
250
+ Our first have that $\operatorname { e r r } _ { t }$ orrect aveand since value. More precisely, by is stationary it follows that $\boxed { 4 . 1 }$ weus, ${ \mathrm { l i m } } _ { T \to \infty } T ^ { - 1 } \sum _ { t = 1 } ^ { T } { \mathrm { e r r } } _ { t } \ { \overset { a . s . } { = } } \alpha$ $\operatorname { e r r } _ { t }$ $\mathbb { E } [ \mathsf { e r r } _ { t } ] = \alpha$ to understand the deviation of T 1 PTt= from $\alpha$ we simply need to characterize the dependence structure of $\{ \mathrm { e r r } _ { t } \} _ { t \in \mathbb { N } }$ .
251
 
252
+ We accomplish this in Theorem $^ { 4 . 1 , }$ which gives a large deviation bound on $\begin{array} { r } { | T ^ { - 1 } \sum _ { t = 1 } ^ { T } \mathrm { e r r } _ { t } - \alpha | } \end{array}$ The idea behind this result is to decompose the dependence in into two parts. First, there is dependence due to the fact that $\alpha _ { t }$ is a function of $\{ \mathrm { e r r } _ { r } \} _ { 1 \leq r \leq t - 1 }$ . In Section $\boxed { \mathbf { A } . 7 }$ in the Appendix we argue that this dependence induces a negative correlation and thus the errors concentrate around their expectation at a rate no slower than that of an i.i.d. Bernoulli sequence. This gives rise to the first term in $( 6 )$ , which is what would be obtained by applying Hoeffding’s inequality to an i.i.d. sequence. Second, there is dependence due to the fact that $A _ { t }$ depends on $A _ { t - 1 }$ . More specifically, consider a setting in which the distribution of $Y | X$ has more variability in some states than others. The goal of adaptive conformal inference is to adapt to the level of variability and thus return larger prediction sets in states where the distribution of $Y | X$ is more spread. However, this algorithm is not perfect and as a result there may be some states $a \in { \mathcal { A } }$ in which $\mathbb { E } [ \mathbf { e r r } _ { t } | A _ { t } = a ]$ is biased away from $\alpha$ . Furthermore, if the environment tends to spend long stretches of time in more variable (or less variable) states this will induce a positive dependence in the errors and cause T 1 PTt=1 to deviate from $\alpha$ . To control this dependence we use a Bernstein inequality for Markov chains to bound $\begin{array} { r } { | T ^ { - 1 } \sum _ { t = 1 } ^ { T } \mathbb { E } [ \mathrm { e r r } _ { t } | A _ { t } ] - \alpha | } \end{array}$ . This gives rise to the second term in $( 6 )$
253
 
254
  Theorem 4.1 Assume that $\{ A _ { t } \} _ { t \in \mathbb { N } }$ has non-zero absolute spectral gap $1 - \eta > 0$ . Let
255
 
md/train/BkgrBgSYDS/BkgrBgSYDS.md CHANGED
@@ -637,7 +637,7 @@ Now, we consider the process of transforming $\mathbf { P }$ into a modular-bala
637
  ![](images/a11fbc418e35ae750d3922a0ae3f160b759972fa724560634f39157fd9066c93.jpg)
638
  Figure 8: First step of balancing $8 \times 8$ bit reversal permutation (a component of the $8 \times 8$ DFT). Red signifies edges that must be flipped.
639
 
640
- Lemma G.2. Let M be a $k \times k$ matrix with $I$ non-zero entry per column, such that for each $\textstyle 0 \leq m < { \frac { k } { 2 } }$ , there are exactly 2 columns with non-zero entry in a row with index $\equiv m$ mod $\frac { k } { 2 }$  . Then, there is a butterfly factor $\mathbf { B } _ { k }$ such that $\mathbf { M } \mathbf { B } _ { k } = \mathbf { M } ^ { \prime }$ , where $\mathbf { M } ^ { \prime }$ meets the $\frac { k } { 2 }$ balance condition.
641
 
642
  Proof. We construct a directed graph $G$ with nodes in $\left[ \frac { k } { 2 } \right]$ . For each $\begin{array} { r } { 0 \leq i < \frac { k } { 2 } } \end{array}$ we add a directed edge from node $\left( s \mod \frac { k } { 2 } \right)$  to node $\left( t \mod \frac { k } { 2 } \right)$ if $\mathbf { M } [ : , i ] = \mathbf { e } _ { s }$ and $\begin{array} { r } { \mathbf { M } \left[ : , i + \frac { k } { 2 } \right] = \mathbf { e } _ { t } } \end{array}$ . Each node has (undirected) degree exactly 2 by the structure of M. Hence, $G$ is a union of disjoint (undirected) cycles.
643
 
 
637
  ![](images/a11fbc418e35ae750d3922a0ae3f160b759972fa724560634f39157fd9066c93.jpg)
638
  Figure 8: First step of balancing $8 \times 8$ bit reversal permutation (a component of the $8 \times 8$ DFT). Red signifies edges that must be flipped.
639
 
640
+ Lemma G.2. Let M be a $k \times k$ matrix with $I$ non-zero entry per column, such that for each $\textstyle 0 \leq m < { \frac { k } { 2 } }$ , there are exactly 2 columns with non-zero entry in a row with index $\equiv m$ mod $\frac { k } { 2 }$  . Then, there is a butterfly factor $\mathbf { B } _ { k }$ such that $\mathbf { M } \mathbf { B } _ { k } = \mathbf { M } ^ { \prime }$ , where $\mathbf { M } ^ { \prime }$ meets the $\frac { k } { 2 }$ balance condition.
641
 
642
  Proof. We construct a directed graph $G$ with nodes in $\left[ \frac { k } { 2 } \right]$ . For each $\begin{array} { r } { 0 \leq i < \frac { k } { 2 } } \end{array}$ we add a directed edge from node $\left( s \mod \frac { k } { 2 } \right)$  to node $\left( t \mod \frac { k } { 2 } \right)$ if $\mathbf { M } [ : , i ] = \mathbf { e } _ { s }$ and $\begin{array} { r } { \mathbf { M } \left[ : , i + \frac { k } { 2 } \right] = \mathbf { e } _ { t } } \end{array}$ . Each node has (undirected) degree exactly 2 by the structure of M. Hence, $G$ is a union of disjoint (undirected) cycles.
643
 
md/train/ByJDAIe0b/ByJDAIe0b.md CHANGED
@@ -431,7 +431,7 @@ $$$$
431
  \begin{array} { r l } & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \end{array}
432
  $$
433
 
434
- It is relatively straightforward to show that the lemma holds in this last form. To do so note that except for terms for which $\tilde { T }$ and ${ \tilde { T } } ^ { \prime }$ are identical on the left (which are not possible on the right), each term on the left of the inequality is also present on the right, however the number of repetitions of each term varies between the left and right. In the left sum if a term includes m values shared between $\tilde { T }$ and ${ \tilde { T } } ^ { \prime }$ , this term will appear $\binom { 2 \bar { ( } n - i - 1 - m ) } { n - i - 1 - m }$ times. This is because we can choose $n -$ $i - m$ non-duplicate values to be in $\tilde { T }$ and place the rest in ${ \tilde { T } } ^ { \prime }$ , each of these permutations will correspond to a term in the sum. On the other hand in the left sum if a term includes m values shared between $\tilde { T }$ and ${ \tilde { T } } ^ { \prime }$ , this term will appear 2(n−i−1−m)n−i−2−m  times. Similarly this is because in this case we can choose $n - i - 1 - m$ non-duplicate values to be in $\tilde { T }$ and place the rest in ${ \tilde { T } } ^ { \prime }$ , each of these permutations will correspond to a different term in the sum.
435
 
436
  Since $\binom { 2 N } { N } > \binom { 2 N } { N - 1 }$ , $\forall N$ every term which is present on the right side is present on the left with more repetitions and thus the left side must be greater than the right and the lemma holds. □
437
 
 
431
  \begin{array} { r l } & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \end{array}
432
  $$
433
 
434
+ It is relatively straightforward to show that the lemma holds in this last form. To do so note that except for terms for which $\tilde { T }$ and ${ \tilde { T } } ^ { \prime }$ are identical on the left (which are not possible on the right), each term on the left of the inequality is also present on the right, however the number of repetitions of each term varies between the left and right. In the left sum if a term includes m values shared between $\tilde { T }$ and ${ \tilde { T } } ^ { \prime }$ , this term will appear $\binom { 2 \bar { ( } n - i - 1 - m ) } { n - i - 1 - m }$ times. This is because we can choose $n -$ $i - m$ non-duplicate values to be in $\tilde { T }$ and place the rest in ${ \tilde { T } } ^ { \prime }$ , each of these permutations will correspond to a term in the sum. On the other hand in the left sum if a term includes m values shared between $\tilde { T }$ and ${ \tilde { T } } ^ { \prime }$ , this term will appear 2(n−i−1−m)n−i−2−m  times. Similarly this is because in this case we can choose $n - i - 1 - m$ non-duplicate values to be in $\tilde { T }$ and place the rest in ${ \tilde { T } } ^ { \prime }$ , each of these permutations will correspond to a different term in the sum.
435
 
436
  Since $\binom { 2 N } { N } > \binom { 2 N } { N - 1 }$ , $\forall N$ every term which is present on the right side is present on the left with more repetitions and thus the left side must be greater than the right and the lemma holds. □
437
 
md/train/H1TWfmnNf/H1TWfmnNf.md CHANGED
@@ -113,7 +113,7 @@ $$
113
 
114
  [Comp NN Patches]
115
 
116
- As written, the above procedure is inefficient because features are interpolated (to pixel resolution) before they are matched to the patch database. Instead, it is natural to match features at their native resolution, and then interpolate the matches. This results in significant speed ups. For example, the bottleneck layer has an activation map of size $1 \times 1 \times 5 1 2$ . Matching to bottleneck features in the re y refers to pixels of set S (m⇤) from the nth training image.training set is quite fast because it acts as a compact global descriptor for matching entire images. j The downside is that the matches are not compositional. By matching to convolutional embeddings rse-to-fine nearest-neighbor search: An important special case is the bottleneck feature, whichextracted from later layers, one can compute progressively more compositional matches, that are omputed from an activation map of size 1 ⇥ 1 ⇥ 512. In this case, we posit that the corresponding512initially global, then patch-based, and finally pixel-based (see Fig. 4). In our experiments, we found ure ij (x) 2 R is a good global descriptor of image x. In our experiments, we found thatthat such patch embeddings could be used to prune the NN pixel search, significantly speeding up run-time performance (e.g., we first prune the training database to a shortlist of images with similar bottleneck features, and then search through these images for similar patches, and then search through those patches for similar pixels).
117
 
118
  ![](images/0c1372504d35f1c2317feb5577039d1e3798a26a4860ffdf287db12a4dec58b1.jpg)
119
  Comp-NN in different embedding space: [Deva: Add the input label image on theFigure 4: Adding composition by matching to later layers: We apply compositional nearestneighbor matching to features extracted from different layers, starting with the bottleneck layer 6 2 and progressing to the penultimate deconv2 layer. We match local neighborhoods of convolutional embeddings, which naturally allows for more composition as we use later laters.
@@ -121,7 +121,7 @@ Comp-NN in different embedding space: [Deva: Add the input label image on theFig
121
  ![](images/2f69f8c3f1a1c1a94d612af578ad3b9b81228e2ebe646b107d6af265738d00e4.jpg)
122
  ixels to apply a linear projection. For correctness, considering feature positions i in decoder4Figure 5: Original labels v.s. self-supervised labels: Given the label input on the left, we show reh a shape of 32 ⇤ 32 ⇤ 256, we can rewrite i as (x, y) where x = i/32, y = i%32. Thus, eachsults of Pix2Pix in the Convolutional Neural Networks column, and non-parametric matching to the ure is corresponding to a 8 ⇤ 8 image patch on final output with a shape of 256 ⇤ 256 ⇤ 3. Hence,training set using the original labels and the predicted “self-supervised” labels of the Pix2Pix netj ⇤ ⇤ ⇤ ⇤work. Generating images with the predicted labels looks smoother, though the qualitative behavior ...3]. Thus, one can generate output results by constructing a dataset of training patches withof the network is still explained by the original training labels. We quantify this in our experimental ij n n,Sj (i) results, and include additional qualitative visualizations of the original and self-supervised labels in Figs. 13 and 14.
123
 
124
- Bias modification: Finally, our results suggest that the matching database from Eq.(2) serves as mory by changing the dataset of training images x , labels y , or both. We experimentan explicit “associative memory” of a network (Carpenter, 1989). We can explicitly modify the various modifications in our experimental results. Onememory by changing the dataset of training images $\ { \bar { \{ \{ x } } _ { n } \}$ cation th, labels $\left\{ y _ { n } \right\}$ sistently produced, or both. We experiment other visual results was to refine the training labels to those predicted by a network:with various modifications in our experimental results. One modification that consistently produced smoother visual results was to refine the training labels to those predicted by a network:
125
 
126
  $$
127
  \{ \left( x _ { n } , y _ { n } \right) \} \Rightarrow \{ \left( x _ { n } , C N N ( x _ { n } ) \right) \} .
 
113
 
114
  [Comp NN Patches]
115
 
116
+ As written, the above procedure is inefficient because features are interpolated (to pixel resolution) before they are matched to the patch database. Instead, it is natural to match features at their native resolution, and then interpolate the matches. This results in significant speed ups. For example, the bottleneck layer has an activation map of size $1 \times 1 \times 5 1 2$ . Matching to bottleneck features in the re y refers to pixels of set S (m⇤) from the nth training image.training set is quite fast because it acts as a compact global descriptor for matching entire images. j The downside is that the matches are not compositional. By matching to convolutional embeddings rse-to-fine nearest-neighbor search: An important special case is the bottleneck feature, whichextracted from later layers, one can compute progressively more compositional matches, that are omputed from an activation map of size 1 ⇥ 1 ⇥ 512. In this case, we posit that the corresponding512initially global, then patch-based, and finally pixel-based (see Fig. 4). In our experiments, we found ure ij (x) 2 R is a good global descriptor of image x. In our experiments, we found thatthat such patch embeddings could be used to prune the NN pixel search, significantly speeding up run-time performance (e.g., we first prune the training database to a shortlist of images with similar bottleneck features, and then search through these images for similar patches, and then search through those patches for similar pixels).
117
 
118
  ![](images/0c1372504d35f1c2317feb5577039d1e3798a26a4860ffdf287db12a4dec58b1.jpg)
119
  Comp-NN in different embedding space: [Deva: Add the input label image on theFigure 4: Adding composition by matching to later layers: We apply compositional nearestneighbor matching to features extracted from different layers, starting with the bottleneck layer 6 2 and progressing to the penultimate deconv2 layer. We match local neighborhoods of convolutional embeddings, which naturally allows for more composition as we use later laters.
 
121
  ![](images/2f69f8c3f1a1c1a94d612af578ad3b9b81228e2ebe646b107d6af265738d00e4.jpg)
122
  ixels to apply a linear projection. For correctness, considering feature positions i in decoder4Figure 5: Original labels v.s. self-supervised labels: Given the label input on the left, we show reh a shape of 32 ⇤ 32 ⇤ 256, we can rewrite i as (x, y) where x = i/32, y = i%32. Thus, eachsults of Pix2Pix in the Convolutional Neural Networks column, and non-parametric matching to the ure is corresponding to a 8 ⇤ 8 image patch on final output with a shape of 256 ⇤ 256 ⇤ 3. Hence,training set using the original labels and the predicted “self-supervised” labels of the Pix2Pix netj ⇤ ⇤ ⇤ ⇤work. Generating images with the predicted labels looks smoother, though the qualitative behavior ...3]. Thus, one can generate output results by constructing a dataset of training patches withof the network is still explained by the original training labels. We quantify this in our experimental ij n n,Sj (i) results, and include additional qualitative visualizations of the original and self-supervised labels in Figs. 13 and 14.
123
 
124
+ Bias modification: Finally, our results suggest that the matching database from Eq.(2) serves as mory by changing the dataset of training images x , labels y , or both. We experimentan explicit “associative memory” of a network (Carpenter, 1989). We can explicitly modify the various modifications in our experimental results. Onememory by changing the dataset of training images $\ { \bar { \{ \{ x } } _ { n } \}$ cation th, labels $\left\{ y _ { n } \right\}$ sistently produced, or both. We experiment other visual results was to refine the training labels to those predicted by a network:with various modifications in our experimental results. One modification that consistently produced smoother visual results was to refine the training labels to those predicted by a network:
125
 
126
  $$
127
  \{ \left( x _ { n } , y _ { n } \right) \} \Rightarrow \{ \left( x _ { n } , C N N ( x _ { n } ) \right) \} .
md/train/_WnwtieRHxM/_WnwtieRHxM.md CHANGED
@@ -352,7 +352,7 @@ $$
352
  \begin{array} { r l } & { \bullet \operatorname* { l i m } _ { t \infty } \sum _ { i = 1 } ^ { t } \| \nabla L _ { \lambda } ( \pmb { \theta } ^ { ( t ) } ; \mathbf { w } ) \| < \infty ; } \\ & { \bullet \operatorname* { l i m } _ { t \infty } \nabla L _ { \lambda } ( \pmb { \theta } ^ { ( t ) } ; \mathbf { w } ) = 0 . } \end{array}
353
  $$
354
 
355
- Now we need to show that under appropriate learning rate, which is specified in Lemma A.1, gradient descent converges to the stationary point that corresponds to the zero risk under weak regularization. Using the result from Lemma A.1, notice that if $L _ { \lambda } ( \pmb \theta ^ { ( t ) } ; \mathbf { w } )$ does not decrease to 0, then the denominator Lλ(θ(t); w)2 log 1L (θ(t);w) is bounded from below.
356
 
357
  However, there exists a constant learning rate such that $\textstyle \sum _ { i = t _ { 0 } } ^ { t } \eta _ { i } \to \infty$ as $t \to \infty$ , which leads to contradiction. Therefore, for weighted ERM with weak regularization, gradient descent converges to the stationary point where $L _ { \lambda } ( \pmb \theta ^ { ( \bar { t } ) } ; \mathbf { w } ) = 0$ .
358
 
 
352
  \begin{array} { r l } & { \bullet \operatorname* { l i m } _ { t \infty } \sum _ { i = 1 } ^ { t } \| \nabla L _ { \lambda } ( \pmb { \theta } ^ { ( t ) } ; \mathbf { w } ) \| < \infty ; } \\ & { \bullet \operatorname* { l i m } _ { t \infty } \nabla L _ { \lambda } ( \pmb { \theta } ^ { ( t ) } ; \mathbf { w } ) = 0 . } \end{array}
353
  $$
354
 
355
+ Now we need to show that under appropriate learning rate, which is specified in Lemma A.1, gradient descent converges to the stationary point that corresponds to the zero risk under weak regularization. Using the result from Lemma A.1, notice that if $L _ { \lambda } ( \pmb \theta ^ { ( t ) } ; \mathbf { w } )$ does not decrease to 0, then the denominator Lλ(θ(t); w)2 log 1L (θ(t);w) is bounded from below.
356
 
357
  However, there exists a constant learning rate such that $\textstyle \sum _ { i = t _ { 0 } } ^ { t } \eta _ { i } \to \infty$ as $t \to \infty$ , which leads to contradiction. Therefore, for weighted ERM with weak regularization, gradient descent converges to the stationary point where $L _ { \lambda } ( \pmb \theta ^ { ( \bar { t } ) } ; \mathbf { w } ) = 0$ .
358
 
md/train/rkxmPgrKwB/rkxmPgrKwB.md CHANGED
@@ -286,7 +286,7 @@ Now we should consider other 2-nd order permutation points (at layer $k$ ) givin
286
 
287
  For this case, we have $\textstyle { \frac { n _ { k } ! } { 2 ! ^ { 2 } } }$ permutations given by permuting the neuron indices of layer $k$ instead of the usual $n _ { k }$ ! permutations since we should eliminate the equivalent permutations corresponding to the permutations among the two pairs of duplicated parameter vectors with a division by $2 ! ^ { 2 }$ . Therefore, this 2-nd order permutation point induces a permutation set with cardinality $\begin{array} { r } { | P ( \pmb { \theta } ) | = \frac { 1 } { 2 ! ^ { 2 } } \prod _ { j = 1 } ^ { d - 1 } n _ { j } ! } \end{array}$
288
 
289
- Again, we should consider other 2-nd order permutation points (at layer $k$ ) giving rise to the same network function and corresponding to the same unordered partition. Note that we can choose two parameter vectors to duplicate out of $n _ { k } - 2$ in ${ \binom { n _ { k } - 2 } { 2 } }$ ways and there are 12!2 Qd−1j=1 nj ! many points in each one of the permutation sets. Therefore, we end up having nk−22  12!2 Qd−1j=1 nj ! many 2-nd order permutation points (at layer $k$ ) corresponding to this unordered partition. Overall, we have $\begin{array} { r } { \binom { n _ { k } - 2 } { 1 } \frac { 1 } { 3 ! } \prod _ { j = 1 } ^ { d - 1 } n _ { j } \bar { ! } + \binom { n _ { k } - 2 } { 2 } \frac { \mathrm { i } } { 2 ! ^ { 2 } } \prod _ { j = 1 } ^ { d - 1 } n _ { j } ! } \end{array}$ many 2-nd order permutation points at layer $k$ .
290
 
291
  # (3) The case $K = 3$ :
292
 
@@ -294,7 +294,7 @@ There are three ways to have $n _ { k } - 3$ distinct vectors out of $n _ { k }$
294
 
295
  (i) $n _ { k } = 4 + 1 + . . . + 1$ For this case, we have $\textstyle { \frac { n _ { k } ! } { 4 ! } }$ permutations given by permuting the neuron indices of layer $k$ . Therefore, this 3-rd order permutation point induces a permutation set with cardinality $\begin{array} { r } { | P ( \pmb { \theta } ) | = \frac { 1 } { 4 ! } \prod _ { j = 1 } ^ { d - 1 } n _ { j } ! } \end{array}$ .
296
 
297
- As usual, we should consider other 3-rd order permutation points (at layer $k$ ) giving rise to the same network function and corresponding to the same unordered partition. If we had chosen another parameter vector to replicate four times, this 3-rd order permutation point would induce another permutation set. Note that we can choose the parameter vector to replicate out of nk − 3 in nk−31  ways and there ar e 14! Qd−1j=1 nj ! many points in each one of the permutation sets. Therefore, we end up having $\begin{array} { r } { \left( { \overset { n _ { k } - 3 } { \ 1 } } \right) { \frac { 1 } { 4 ! } } \prod _ { j = 1 } ^ { d - 1 } n _ { j } ! } \end{array}$ many 3-rd order permutation points (at layer $k$ ) corresponding to this unordered partition.
298
 
299
  For this case, we have $\textstyle { \frac { n _ { k } ! } { 3 ! 2 ! } }$ permutations given by permuting the neuron indices of layer $k$ . Therefore, this 3-rd order permutation point induces a permutation set with cardinality $\begin{array} { r } { | P ( \pmb { \theta } ) | = \frac { 1 } { 3 ! 2 ! } \prod _ { j = 1 } ^ { d - 1 } n _ { j } ! } \end{array}$
300
 
@@ -304,7 +304,7 @@ As usual, we should consider other 3-rd order permutation points (at layer $k$ )
304
 
305
  For this case, we have $\frac { n _ { k } ! } { 2 ! ^ { 3 } }$ permutations given by permuting the neuron indices of layer $k$ . Therefore, this 3-rd order permutation point induces a permutation set with cardinality $\begin{array} { r } { | P ( \pmb { \theta } ) | = \frac { 1 } { 2 ! ^ { 3 } } \prod _ { j = 1 } ^ { d - 1 } n _ { j } ! } \end{array}$
306
 
307
- As always, we should consider the other 3-rd order permutation points (at layer $k$ ) giving rise to the same network function and corresponding to the same unordered partition. Note that we can choose three parameter vectors to duplicate out of $n _ { k } - 3$ in $\binom { n _ { k } - 3 } { 3 }$ ways and there are $\begin{array} { r } { { \frac { 1 } { 2 ^ { 3 } } } \prod _ { j = 1 } ^ { d - 1 } n _ { j } ! } \end{array}$ many points in each one of the permutation sets. Therefore, we end up having $\begin{array} { r } { \binom { n _ { k } - 3 } { 3 } \frac { 1 } { 2 ^ { 3 } } \prod _ { j = 1 } ^ { d - 1 } n _ { j } ! } \end{array}$ many 3-rd order permutation points (at layer $k$ ) corresponding to this unordered partition. Overall, we hav e nk−31  14! Qd−1j=1 nj ! + $\begin{array} { r } { \binom { n _ { k } - 3 } { 1 } \frac 1 { 4 ! } \prod _ { j = 1 } ^ { d - 1 } n _ { j } ! + \binom { n _ { k } - 3 } { 2 } \frac 1 { 3 ! } \prod _ { j = 1 } ^ { d - 1 } n _ { j } ! + \binom { n _ { k } - 3 } { 3 } \frac 1 { 2 ! ^ { 3 } } \prod _ { j = 1 } ^ { d - 1 } n _ { j } ! } \end{array}$ nk−33  12!3 Qd−1j=1 nj ! many 3-rd order permutation points at layer $k$ .
308
 
309
  # (4) A note on the general closed form formula for $T ( K , n _ { k } )$ :
310
 
@@ -312,7 +312,7 @@ For a general integer $K$ there is no closed-form formula for the number of part
312
 
313
  # (5) A lower bound for general $K$ :
314
 
315
- For general $K$ , we have $l = n _ { k } - K$ distinct parameter vectors in the small network. There are many ways to partition $n _ { k }$ into $l$ positive integers without respecting order. Since we are interested in a lower bound, we only consider the following unordered partition: $n _ { k } = 2 + . . . + 2 + 1 + . . . + 1$ , i.e. we have $K$ duplicated parameter vectors and $n _ { k } - 2 K$ parameter vectors that appear once. For this unordered partition, we have ${ \binom { n _ { k } - K } { K } }$ ways to choose the duplicated parameter vectors. For each one of these choices, we can permute the neuron indices in $\textstyle { \frac { n _ { k } ! } { 2 ^ { K } } }$ different ways. Including the permutations in other layers j 6= k, we end up with nk−KK  $\begin{array} { r } { \left( { \overset { n _ { k } - K } { K } } \right) { \frac { 1 } { 2 ^ { K } } } \prod _ { j = 1 } ^ { d - 1 } n _ { j } ! } \end{array}$ points in the permutation set. The number is a lower bound of $T ( K , n _ { k } )$ , because other unordered partitions of $n _ { k }$ give rise to other $K ^ { \mathrm { t h } }$ -order permutation points at layer $k$ .
316
 
317
  # C.5 PROOF OF LEMMA 2
318
 
 
286
 
287
  For this case, we have $\textstyle { \frac { n _ { k } ! } { 2 ! ^ { 2 } } }$ permutations given by permuting the neuron indices of layer $k$ instead of the usual $n _ { k }$ ! permutations since we should eliminate the equivalent permutations corresponding to the permutations among the two pairs of duplicated parameter vectors with a division by $2 ! ^ { 2 }$ . Therefore, this 2-nd order permutation point induces a permutation set with cardinality $\begin{array} { r } { | P ( \pmb { \theta } ) | = \frac { 1 } { 2 ! ^ { 2 } } \prod _ { j = 1 } ^ { d - 1 } n _ { j } ! } \end{array}$
288
 
289
+ Again, we should consider other 2-nd order permutation points (at layer $k$ ) giving rise to the same network function and corresponding to the same unordered partition. Note that we can choose two parameter vectors to duplicate out of $n _ { k } - 2$ in ${ \binom { n _ { k } - 2 } { 2 } }$ ways and there are 12!2 Qd−1j=1 nj ! many points in each one of the permutation sets. Therefore, we end up having nk−22  12!2 Qd−1j=1 nj ! many 2-nd order permutation points (at layer $k$ ) corresponding to this unordered partition. Overall, we have $\begin{array} { r } { \binom { n _ { k } - 2 } { 1 } \frac { 1 } { 3 ! } \prod _ { j = 1 } ^ { d - 1 } n _ { j } \bar { ! } + \binom { n _ { k } - 2 } { 2 } \frac { \mathrm { i } } { 2 ! ^ { 2 } } \prod _ { j = 1 } ^ { d - 1 } n _ { j } ! } \end{array}$ many 2-nd order permutation points at layer $k$ .
290
 
291
  # (3) The case $K = 3$ :
292
 
 
294
 
295
  (i) $n _ { k } = 4 + 1 + . . . + 1$ For this case, we have $\textstyle { \frac { n _ { k } ! } { 4 ! } }$ permutations given by permuting the neuron indices of layer $k$ . Therefore, this 3-rd order permutation point induces a permutation set with cardinality $\begin{array} { r } { | P ( \pmb { \theta } ) | = \frac { 1 } { 4 ! } \prod _ { j = 1 } ^ { d - 1 } n _ { j } ! } \end{array}$ .
296
 
297
+ As usual, we should consider other 3-rd order permutation points (at layer $k$ ) giving rise to the same network function and corresponding to the same unordered partition. If we had chosen another parameter vector to replicate four times, this 3-rd order permutation point would induce another permutation set. Note that we can choose the parameter vector to replicate out of nk − 3 in nk−31  ways and there ar e 14! Qd−1j=1 nj ! many points in each one of the permutation sets. Therefore, we end up having $\begin{array} { r } { \left( { \overset { n _ { k } - 3 } { \ 1 } } \right) { \frac { 1 } { 4 ! } } \prod _ { j = 1 } ^ { d - 1 } n _ { j } ! } \end{array}$ many 3-rd order permutation points (at layer $k$ ) corresponding to this unordered partition.
298
 
299
  For this case, we have $\textstyle { \frac { n _ { k } ! } { 3 ! 2 ! } }$ permutations given by permuting the neuron indices of layer $k$ . Therefore, this 3-rd order permutation point induces a permutation set with cardinality $\begin{array} { r } { | P ( \pmb { \theta } ) | = \frac { 1 } { 3 ! 2 ! } \prod _ { j = 1 } ^ { d - 1 } n _ { j } ! } \end{array}$
300
 
 
304
 
305
  For this case, we have $\frac { n _ { k } ! } { 2 ! ^ { 3 } }$ permutations given by permuting the neuron indices of layer $k$ . Therefore, this 3-rd order permutation point induces a permutation set with cardinality $\begin{array} { r } { | P ( \pmb { \theta } ) | = \frac { 1 } { 2 ! ^ { 3 } } \prod _ { j = 1 } ^ { d - 1 } n _ { j } ! } \end{array}$
306
 
307
+ As always, we should consider the other 3-rd order permutation points (at layer $k$ ) giving rise to the same network function and corresponding to the same unordered partition. Note that we can choose three parameter vectors to duplicate out of $n _ { k } - 3$ in $\binom { n _ { k } - 3 } { 3 }$ ways and there are $\begin{array} { r } { { \frac { 1 } { 2 ^ { 3 } } } \prod _ { j = 1 } ^ { d - 1 } n _ { j } ! } \end{array}$ many points in each one of the permutation sets. Therefore, we end up having $\begin{array} { r } { \binom { n _ { k } - 3 } { 3 } \frac { 1 } { 2 ^ { 3 } } \prod _ { j = 1 } ^ { d - 1 } n _ { j } ! } \end{array}$ many 3-rd order permutation points (at layer $k$ ) corresponding to this unordered partition. Overall, we hav e nk−31  14! Qd−1j=1 nj ! + $\begin{array} { r } { \binom { n _ { k } - 3 } { 1 } \frac 1 { 4 ! } \prod _ { j = 1 } ^ { d - 1 } n _ { j } ! + \binom { n _ { k } - 3 } { 2 } \frac 1 { 3 ! } \prod _ { j = 1 } ^ { d - 1 } n _ { j } ! + \binom { n _ { k } - 3 } { 3 } \frac 1 { 2 ! ^ { 3 } } \prod _ { j = 1 } ^ { d - 1 } n _ { j } ! } \end{array}$ nk−33  12!3 Qd−1j=1 nj ! many 3-rd order permutation points at layer $k$ .
308
 
309
  # (4) A note on the general closed form formula for $T ( K , n _ { k } )$ :
310
 
 
312
 
313
  # (5) A lower bound for general $K$ :
314
 
315
+ For general $K$ , we have $l = n _ { k } - K$ distinct parameter vectors in the small network. There are many ways to partition $n _ { k }$ into $l$ positive integers without respecting order. Since we are interested in a lower bound, we only consider the following unordered partition: $n _ { k } = 2 + . . . + 2 + 1 + . . . + 1$ , i.e. we have $K$ duplicated parameter vectors and $n _ { k } - 2 K$ parameter vectors that appear once. For this unordered partition, we have ${ \binom { n _ { k } - K } { K } }$ ways to choose the duplicated parameter vectors. For each one of these choices, we can permute the neuron indices in $\textstyle { \frac { n _ { k } ! } { 2 ^ { K } } }$ different ways. Including the permutations in other layers j 6= k, we end up with nk−KK  $\begin{array} { r } { \left( { \overset { n _ { k } - K } { K } } \right) { \frac { 1 } { 2 ^ { K } } } \prod _ { j = 1 } ^ { d - 1 } n _ { j } ! } \end{array}$ points in the permutation set. The number is a lower bound of $T ( K , n _ { k } )$ , because other unordered partitions of $n _ { k }$ give rise to other $K ^ { \mathrm { t h } }$ -order permutation points at layer $k$ .
316
 
317
  # C.5 PROOF OF LEMMA 2
318
 
md/train/v8b3e5jN66j/v8b3e5jN66j.md CHANGED
@@ -99,7 +99,7 @@ i x ${ \bf \Pi } _ { - } 1 = 1 * 1 \mathbf { e } \mathbf { n }$ ( q u e u e )
99
  i x $\mathbf { u = u * l e n }$ ( q u e u e )
100
  r i n g d p $s =$ a l l d p s [ : , i x l : i x u ]
101
  # n o n p a r a m e t r i c s o f t m a x
102
- l o s s=dps + logsumexp ( r i n g d p s )
103
  l o s s . b a c k w a r d ( )
104
  s t e p ( g q . p a r a m s )
105
  # moco u p d a t e s
 
99
  i x $\mathbf { u = u * l e n }$ ( q u e u e )
100
  r i n g d p $s =$ a l l d p s [ : , i x l : i x u ]
101
  # n o n p a r a m e t r i c s o f t m a x
102
+ l o s s=dps + logsumexp ( r i n g d p s )
103
  l o s s . b a c k w a r d ( )
104
  s t e p ( g q . p a r a m s )
105
  # moco u p d a t e s