text:
\section{Background}
\vspace{0pt}

For clarity, we consider the following simplified scenario. Let $D \sim p_{\theta}$ be a discrete random variable $D \in \{0, 1\}^n$ in a one-hot encoding, $\sum D_i = 1$, with distribution given by  $p_{\theta}(D) \propto \exp(D^T \theta)$ where $\theta \in \R^n$. Given a continuously differentiable $f : \R^{2n} \to \R$, we wish to minimize,
\begin{align}
    \label{eq:problem} \min_{\theta} \mathbb{E}[f(D, \theta)],
\end{align}
where the expectation is taken over all of the randomness. In general $\theta$ may be computed with some neural network, so our aim is to derive estimators of the total derivative of the expectation with respect to $\theta$ for use in stochastic gradient descent. This framework covers most simple discrete latent variable models, including variational autoencoders \citep{kingma2013vae, rezende2014stochastic}.

The {\em REINFORCE estimator} \citep{glynn1990likelihood, williams1992simple} is { unbiased} (under certain smoothness assumptions) and given by:
\begin{align}
\label{eq:def_reinforce}
    \estimator{\mathrm{REINF}} := f(D, \theta) \frac{\partial  \log p_{\theta}(D)}{\partial \theta} + \frac{\partial f(D, \theta)}{\partial \theta} .
\end{align}
\looseness -1 Without careful use of control variates \citep{mnih2014neural, tucker2017rebar, grathwohl2018backpropagation}, the REINFORCE estimator tends to have { prohibitively high variance}. To simplify exposition we assume henceforth that $f(D, \theta) = f(D)$ does not depend on $\theta$, because the dependence of $f(D, \theta)$ on $\theta$ is accounted for in the second term of \eqref{eq:def_reinforce}, which is shared by most estimators and generally has low variance.

One strategy for reducing the variance is to introduce {bias} through a relaxation \citep{jang2017categorical, maddison2017concrete}. Define the tempered softmax $\softmax_{\tau} : \R^n \to \R^n$ by $\softmax_{\tau}(x)_i = \exp(x_i/\tau) / \sum_{j=1}^n \exp(x_j/\tau)$. The relaxations are based on the observation that the sampling of $D$ can be reparameterized using Gumbel random variables and the zero-temperature limit of the tempered softmax under the coupling:
\begin{align}
\label{eq:coupling} D = \lim_{\tau \to 0} S_{\tau}; \qquad S_{\tau} = \softmax_{\tau}(\theta + G)
\end{align}
where $G$ is a vector of i.i.d. $G_i \sim \Gumbel$ random variables. At finite temperatures $S_{\tau}$ is known as a Gumbel-Softmax (GS) \citep{jang2017categorical} or concrete \citep{maddison2017concrete} random variable, and the relaxed loss $\mathbb{E}[f(S_{\tau}, \theta)]$ admits the following reparameterization gradient estimator for $\tau > 0$:\footnote{For a function $f(x_1, x_2)$, $\partial f(z_1, z_2) / \partial x_1$ is the partial derivative (e.g., a gradient vector) of $f$ in the first variable evaluated at $z_1, z_2$. For a function $g(\theta)$, $d g / d \theta$ is the total derivative of $g$ in $\theta$. For example, $ d \softmax_{\tau}(\theta + G)/ d\theta$ is the Jacobian of the tempered softmax evaluated at the random variable $\theta + G$.}
\begin{align}
    \estimator{\mathrm{GS}} := \frac{\partial  f(S_{\tau})}{\partial S_{\tau}} \frac{d  \softmax_{\tau}(\theta + G)}{d \theta}.
\end{align}
This is an unbiased estimator of the gradient of  $\mathbb{E}[f(S_{\tau}, \theta)]$, but a biased estimator of our original problem (\ref{eq:problem}). For this to be well-defined $f$ must be defined on the interior of the simplex (where $S_{\tau}$ sits). This estimator has the advantage that it is easy to implement and generally low-variance, but the disadvantage that it modifies the forward computation of $f$ and is biased.  Henceforth, we assume $D, S_{\tau},$ and $G$ are coupled almost surely through (\ref{eq:coupling}).

Another popular family of estimators are the so-called {\em straight-through estimators} \citep[c.f.,][]{bengio2013straightthrough, chung2017hierarchical}. In this family, the forward computation of $f$ is unchanged, but backpropagation is computed ``through'' a surrogate. One popular variant takes as a surrogate the tempered probabilities of $D$, resulting in the \textit{slope-annealed straight-through estimator (ST)}:
\begin{align}
    \estimator{\mathrm{ST}} := \frac{\partial  f(D)}{\partial D} \frac{d \softmax_{\tau}(\theta)}{d \theta}.
\end{align}
The most popular variant \citep{jang2017categorical} is known as the {\em straight-through Gumbel-Softmax (ST-GS)}. The surrogate for ST-GS is $S_{\tau}$, whose Gumbels are coupled to $D$ through \eqref{eq:coupling}:
\begin{align}
\label{eq:def_stgs}
    \estimator{\mathrm{STGS}} := \frac{\partial  f(D)}{\partial D} \frac{d \softmax_{\tau}(\theta + G)}{d \theta}.
\end{align}
The straight-through family has the advantage that they tend to be low-variance and $f$ need not be defined on the interior of the simplex (although $f$ must be differentiable at the corners). This family has the disadvantage that they are not known to be unbiased estimators of \emph{any} gradient. These estimators are quite popular in practice, because they preserve the forward computation of $f$, which prevents the forward propagation of errors and maintains sparsity \citep{choi2017unsupervised, chung2017hierarchical, bengio2013straightthrough}.

All of the estimators discussed in this paper can be computed by any of the standard automatic differentiation software packages using a single evaluation of $f$ on a realization of $D$ or some underlying randomness. We present implementation details for these and our Gumbel-Rao estimator in the Appendix, emphasizing the surrogate loss framework \citep{schulman2015gradient, weber2019credit} and considering the multiple stochastic layer case not covered by \eqref{eq:problem}.

\section{Conclusion}
\vspace{0pt}
We introduced the Gumbel-Rao estimator, a new single-evaluation non-relaxing gradient estimator for models with discrete random variables. Our estimator is a Rao-Blackwellization of the state-of-the-art straight-through Gumbel-Softmax estimator. It enjoys lower variance and can be implemented efficiently using Monte Carlo methods. In particular and in contrast to most other work, it does not require additional function evaluations. Empirically, our estimator improved final test set performance in an unsupervised parsing task and on a variational auto-encoder loss. It accelerated convergence on the objective and compared favorably to other standard gradient estimators. Even though the gains were sometimes modest, they were persistent and particularly pronounced when models were trained at low temperatures or with small batch sizes. We expect that our estimator will be most effective in such settings and that further gains may be uncovered when combining our Rao-Blackwellisation scheme with an annealing schedule for the temperature. Finally, we hope that our work inspires further exploration of the use of Rao-Blackwellisation for gradient estimation.

\section*{Acknowledgements}
MBP gratefully acknowledges support from the Max Planck ETH Center for Learning Systems. CJM is grateful for the support of the James D. Wolfensohn Fund at the Institute of Advanced Studies in Princeton, NJ. Resources used in preparing this research were provided, in part, by the Sustainable Chemical Processes through Catalysis (Suchcat) National Center of Competence in Research (NCCR), the Province of Ontario, the Government of Canada through CIFAR, and companies sponsoring the Vector Institute.

\section{Related Work}
\vspace{0pt}
The idea of using Rao-Blackwellization to reduce the variance of gradient estimators for discrete latent variable models has been explored in machine learning. For example, \citet{liu2018rao} describe a sum-and-sample style estimator that analytically computes part of the expectation to reduce the variance of the gradient estimates. The favorable properties of their estimator are due to the Rao-Blackwell theorem. \citet{Kool2020Estimating} describe a gradient estimator based on sampling without replacement. Their estimator emerges naturally as the Rao-Blackwell estimator of  the importance-weighted estimator \citep{vieira2017estimating} and the estimator described by \citet{liu2018rao}. Both of these estimators rely on {\em multiple} function evaluations to compute a gradient estimate. In contrast, our work is the first to consider Rao-Blackwellisation in the context of a {\em single-evaluation} estimator.
\section{Introduction}
\vspace{0pt}

\looseness -1 Models with discrete latent variables are common in machine learning. Discrete random variables provide an effective way to parameterize multi-modal distributions, and some domains naturally have latent discrete structure (e.g, parse trees in NLP). Thus, discrete latent variable models can be found across a diverse set of tasks, including conditional density estimation, generative text modelling \citep{yang2017improved}, multi-agent reinforcement learning \citep{mordatch2017emergence, lowe2017multi} or conditional computation \citep{bengio2013straightthrough, davis2013low}.

\looseness -1 The majority of these models are trained to minimize an expected loss using gradient-based optimization, so the problem of gradient estimation for discrete latent variable models has received considerable attention over recent years. Existing estimation techniques can be broadly categorized into two groups, based on whether they require one loss evaluation \citep{glynn1990likelihood, williams1992simple, bengio2013straightthrough, mnih2014neural, chung2017hierarchical, maddison2017concrete, jang2017categorical, grathwohl2018backpropagation} or multiple loss evaluations \citep{gu2015muprop, mnih2016variational, tucker2017rebar} per estimate. These estimators reduce variance by introducing bias or increasing the computational cost with the overall goal being to reduce the total mean squared error.

\looseness -1 Because loss evaluations are  {costly} in the modern deep learning age,  {single evaluation} estimators are particularly desirable. This family of estimators can be further categorized into those that relax the discrete randomness in the forward pass of the model \citep{maddison2017concrete, jang2017categorical} and those that leave the loss computation unmodified \citep{glynn1990likelihood, williams1992simple, bengio2013straightthrough, chung2017hierarchical, mnih2014neural, grathwohl2018backpropagation}. The ones that do not modify the loss computation are preferred, because they avoid the accumulation of errors in the forward direction and they allow the model to exploit the sparsity of discrete computation. Thus, there is a particular need for {single evaluation estimators that do not modify the loss computation}.

In this paper we introduce such a method. In particular, we propose a {Rao-Blackwellization} scheme for the straight-through variant of the Gumbel-Softmax estimator \citep{jang2017categorical, maddison2017concrete}, which comes at a minimal cost, and does not increase the number of function evaluations. The {\em straight-through Gumbel-Softmax estimator}\citep[ST-GS,][]{jang2017categorical} is a lightweight state-of-the-art single-evaluation estimator based on the Gumbel-Max trick  \citep[see][and references therein]{maddison2014astar}. The ST-GS uses the argmax over Gumbel random variables to generate a discrete random outcome in the forward pass. It computes derivatives via backpropagation through a tempered \textit{softmax} of the same Gumbel sample. Our Rao-Blackwellization scheme is based on the key insight that there are {\em many} configurations of Gumbels corresponding to the {\em same} discrete random outcome and that these can be {marginalized} over with Monte Carlo estimation. By design, there is no need to re-evaluate the loss and the additional cost of our estimator is linear only in the number of Gumbels needed for a single forward pass. As we show, the Rao-Blackwell theorem implies that our estimator has lower mean squared error than the vanilla ST-GS. We demonstrate the effectiveness of our estimator in unsupervised parsing on the ListOps dataset \citep{nangia2018listops} and on a variational autoencoder loss \citep{kingma2013vae, rezende2014stochastic}. We find that in practice our estimator trains {\em faster} and achieves {\em better test set performance}. The magnitude of the improvement depends on several factors, but is particularly pronounced at small batch sizes and low temperatures.

\section{Experiments}
\label{sec:exp}
\vspace{0pt}

\subsection{Protocol}
In this section, we study the effectiveness of our gradient estimator in practice. In particular, we evaluate its performance with respect to the temperature $\tau$, the number of MC samples $K$ and the batch size $B$. We measure the variance reduction and improvements in MSE our estimator achieves in practice, and assess whether its lower variance gradient estimates accelerate the convergence on the objective or improve final test set performance. Our focus is on single-evaluation gradient estimation and we compare against other non-relaxing estimators (ST, ST-GS and REINFORCE with a running mean as a baseline) and relaxing estimators (GS), where permissible. Experimental details are given in Appendix \ref{appendix:exp_details}.

First, we consider a toy example which allows us to explore and visualize the variance of our estimator and suggests that it is particularly effective at low temperatures. Next, we evaluate the effect of $\tau$ and $K$ in a latent parse tree task which does not permit the use of relaxed gradient estimators. Here, our estimator facilitates training at low temperatures to improve overall performance and is effective even with few MC samples. Finally, we train variational auto-encoders with discrete latent variables \citep{kingma2013vae, rezende2014stochastic}. Our estimator yields improvements at small batch sizes and obtains competitive or better performance than the GS estimator at the largest arity.

\subsection{Quadratic Programming on the Simplex}

\input{figures/figure_toy.tex}

As a toy problem, we consider the problem of minimizing a quadratic program $(p-c)^\intercal Q (p-c)$ over the probability simplex $\Delta^{n-1} = \{ p \in R^n : p_i \geq 0, \sum_{i=1}^n p_i = 1\}$ for $Q \in R^{n \times n}$ positive-definite and $c	\in R^n$. This problem may be reframed as the following stochastic optimization problem,
\begin{align*}
	\min_{p \in \Delta^{n-1}} \mathbb{E}[ (D-c)^\intercal A(p) (D-c) ],
\end{align*}
where $D \sim \text{Discrete}(p)$ and $A_{ii}(p)=\frac{(p_i - c_i)^2}{p_i - 2 p_i c_i + c_i^2} Q_{ii}$ and $A_{ij}(p)=\frac{(p_i - c_i)(p_j - c_j)}{c_i c_j - p_i c_j - c_i p_j} Q_{ij}$ for $i \neq j$.
While solving the above problem is simple using standard methods, it provides a useful testbed to evaluate the effectiveness of our variance reduction scheme. For this purpose, we consider $Q_{ij} = \exp\left(-2|i-j|\right)$  and $c_i = \frac{1}{3}$ in three dimensions.

Our estimator reduces the variance in the gradient estimation over the entire simplex and is particularly effective at low temperatures in this problem. In Figure \ref{fig:toy}, we compare the log10-trace of the covariance matrix of ST-GS and GR-MC1000 at three different temperatures and display their difference over the entire domain. The improvement is universal. The pattern is not always intuitive (oval bull's eyes), despite the simplicity of the objective function. Compared with ST-GS, our estimator on this example appears more effective closer to the corners and edges, which is important for learning discrete distributions. At lower temperatures, the difference between the two estimators becomes particularly acute. This suggests that our estimator may train better at lower temperatures and be more responsive to optimizing over the temperature to successfully trade off bias and variance.

\subsection{Unsupervised Parsing on ListOps}

Straight-through estimators feature prominently in NLP \citep{martins-etal-2019-latent} where latent discrete structure arises naturally, but the use of relaxations is often infeasible. Therefore, we evaluate our estimator in a latent parse tree task on subsets of the ListOps dataset \citep{nangia2018listops}. This dataset contains sequences of prefix arithmetic expressions $x$ (e.g., \texttt{max[ 3 min[ 8 2 ]]}) that evaluate to an integer $y \in \{0, 1, \ldots 9\}$. The arithmetic syntax induces a latent parse tree $T$. We consider the model by \citep{choi2017unsupervised} that learns a distribution over plausible parse trees of a given sequence to maximize
\begin{align*}
	\expect_{q_{\theta}(T|x)}
	\left[
	\log
	p_{\phi}(y|T, x)
	\right].
\end{align*}
Both the conditional distribution over parse trees $q_{\theta}(T|x)$ and the classifier $p_{\phi}(y|T, x)$ are parameterized using neural networks. In this model, a parse tree $T \sim q_{\theta}(T | x)$ for a given sentence is sampled bottom-up by successively combining the embeddings of two tokens that appear in a given sequence until a single embedding for the entire sequence remains. This is then used for performing the subsequent classification. Because it is computationally infeasible to marginalize over all trees, \citet{choi2017unsupervised} rely on the ST-GS estimator for training. We compare this estimator against our estimator GR-MC$K$ with $K \in \{10, 100, 1000\}$. We consider temperatures $\tau \in \{0.01, 0.1, 1.0\}$ and experiment with shallow and deeper trees by considering sequences of length $L$ up to 10, 25 and 50. All models are trained with stochastic gradient descent with a batch size equal to the maximum $L$. Details are in Appendix \ref{appendix:exp_nlp}.

Our estimator facilitates training at lower temperatures and achieves  better final test set accuracy than ST-GS (Table \ref{table:listops:results}). Increasing $K$ improves the performance at low temperatures, where the differences between the estimators are most pronounced. Overall, across all temperatures this results in modest improvements, particularly for shallow trees and small batch sizes. We also find evidence for diminishing returns: The differences between ST-GS and GR-MC$10$ are larger than between GR-MC$100$ or GR-MC$1000$, suggesting that our estimator is effective even with few MC samples.

\input{tables/listops_table.tex}

\input{figures/figure_vae_triple.tex}

\subsection{Generative Modeling with Discrete Variational Auto-Encoders}
Finally, we train variational auto-encoders \citep{kingma2013vae, rezende2014stochastic} with discrete latent random variables on the MNIST dataset of handwritten digits \citep{lecun2010mnist}. We used the fixed binarization of \citep{salakhutdinov2008quantitative} and the standard split into train, validation and test sets. Our objective is to maximize the following variational lower bound on the log-likelihood,
\begin{align*}
	\log p(x) >
	\expect_{q_{\theta}(D^i|x)}
	\left[
	\log
	\left(
	\frac{1}{M}
	\sum_{j=1}^{M}
	\frac{p_{\phi}(x, D^i)}{ q_{\theta}(D^j|x)}
	\right)
	\right]
\end{align*}
where $x$ denotes the input image and $D^i \sim q_{\theta}(D^i | x)$ denotes a vector of discrete latent random variables. This objective takes a form in equation (\ref{eq:problem}). For training, the bound is approximated using only a single sample ($M=1$). For final validation and testing, we use 5000 samples ($M=5000$). Both the generative model $p_{\phi}(x, D)$ and the variational distributions $q_{\theta}(D|x)$ were parameterized using neural networks. We experiment with different batch sizes and discrete random variables of arities in $\{2, 4, 8, 16\}$ as in \citet{maddison2017concrete}. To facilitate comparisons, we do not alter the total dimension of the latent space and train all models for 50,000 iterations using stochastic gradient descent with momentum. Hyperparameters are optimised for each estimator using random search \citep{bergstra2012random} over twenty independent runs. More details are given in Appendix \ref{appendix:exp_vae}.

Our estimator effectively reduces the variance over the entire training trajectory (Figure \ref{fig:vae_varmse:var}). Even a small number of MC samples ($K=10$) results in sizable variance reductions. The variance reduction compares favorably to the magnitude of the mini-batch variance (Appendix \ref{appendix:add_fig}). As a result, our estimator facilitates training at lower temperatures and features a lower MSE (Figure \ref{fig:vae_varmse:mse}). During training our estimator can trade off bias and variance to improve the gradient estimation. Empirically, we observed that on this task, the best models using ST-GS trained at an average temperature of $0.65$, while the best models using GR-MC1000 trained at an average temperature of $0.35$. This is interesting, because it indicates that our estimator may make the use of temperature annealing during training more effective. We find lower variance gradient estimates improve convergence of the objective (Figure \ref{fig:vae_varconv_n16}). GR-MC1000 reaches various performance thresholds on the validation set with reliably fewer iterations than ST or ST-GS. This effect is observable at different arities and persistent over the entire training trajectory.

	For final test set performance, our estimator outperforms ST and REINFORCE (Table \ref{table:vae:results}). The improvements over ST-GS extend up to two nats (for batch size 20, 16-ary) at small batch sizes and are more modest at large batch sizes as expected (also see Appendix \ref{appendix:add_fig}). This confirms that our estimator might be particularly effective in settings, where training at high batch sizes is prohibitively expensive. The improvements from increasing the number of MC samples tend to saturate at $K=100$ on this task. Further, our results suggest that relaxed estimators may be preferred (if they can be used) for discrete random variables of smaller arity. For example, the GS estimator outperforms all straight-through estimators for binary variables for both batch sizes. For large arities however, we find that straight-through estimators can perform competitively: Our estimator GR-MC1000 achieves the best performance overall and outperforms the GS estimator for 16-ary variables.

\input{tables/iwae_table.tex}
\section{Gumbel-Rao Gradient Estimator}
\vspace{0pt}

\vspace{0pt}
\subsection{Rao-Blackwellization of ST-Gumbel-Softmax}
\vspace{0pt}

We now derive our Rao-Blackwelization scheme for the ST-GS estimator. Our approach is based on the observation that there is a {\em many-to-one} relationship between realizations of $\theta + G$ and $D$ in the coupling described by \eqref{eq:coupling} and that the variance introduced by $\theta + G$ can be marginalized out. The resulting estimator, which we call the {\em Gumbel-Rao (GR)} estimator, is guaranteed by the Rao-Blackwell theorem to have lower variance than ST-GS. In the next subsection we turn to the practical question of carrying out this marginalization.

In the Gumbel-max trick \eqref{eq:coupling}, $D$ is a one-hot indicator of the index of $\arg\max_{i} \left\{ \theta_i + G_i\right\}$. Because this argmax operation is non-invertible, there are { many} configurations of $\theta + G$ that correspond to a { single} $D$ outcome. Consider an alternate factorization of the joint distribution of $(\theta + G, D)$: first sample $D \sim p_{\theta}$, and then $\theta + G$ given $D$. In this view, the Gumbels are auxillary random variables, at which the Jacobian of the tempered softmax is evaluated and which locally increase the variance of the estimator. This local variance can be removed by marginalization. This is the key insight of our GR estimator, which is given by,
\begin{align}
\label{eq:def_stgr}
    \estimator{\mathrm{GR}} := \frac{\partial  f(D)}{\partial D} \mathbb{E}\left[\frac{d \softmax_{\tau}(\theta + G)}{d \theta} \middle | D \right].
\end{align}
It is not too difficult to see that $\estimator{\mathrm{GR}} = \expect\left[\estimator{\mathrm{STGS}} | D \right]$. By the tower rule of expectation, GR has the same expected value as ST-GS and is an instance of a {Rao-Blackwell estimator} \citep{blackwell1947conditional, Rao1992information}. Thus, it has the same mean as ST-GS, but a lower variance. Taken together, these facts imply that GR enjoys a lower mean squared error (\emph{not} a lower bias) than ST-GS.
\begin{prop}
\label{prop:gr_mse}
Let $\estimator{\mathrm{STGS}}$ and $\estimator{\mathrm{GR}}$ be the estimators defined in \eqref{eq:def_stgs} and \eqref{eq:def_stgr}. Let $\nabla_{\theta} := d \mathbb{E}[f(D)]/d\theta$ be the true gradient that we are trying to estimate. We have
\begin{align}
\label{eq:gr_mse}
\expect
\left[
\left\lVert \estimator{\mathrm{GR}} - \nabla_{\theta} \right\rVert^2
\right]
\leq
\expect
\left[
\left\lVert \estimator{\mathrm{STGS}} - \nabla_{\theta} \right\rVert^2
\right].
\end{align}
\end{prop}
\begin{proof}
The proposition follows from Jensen's inequality and the linearity of expectations, see \ref{appendix:proofs_gr_mse}.
\end{proof}

While GR is only guaranteed to reduce the variance of ST-GS, Proposition \ref{prop:gr_mse} guarantees that, as a function of $\tau$, the MSE of GR is a pointwise lower bound on ST-GS. This means GR can be used for estimation at lower temperatures, where ST-GS has high variance and low bias. Empirically, we observe that our estimator indeed facilitates training at lower temperatures and thus results in an estimator that improves in both bias and variance over ST-GS. Thus, this estimator retains the favourable properties of the ST-GS (single, unmodified evaluation of $f$) while improving its performance.

\vspace{0pt}
\subsection{Monte Carlo Approximation}
\vspace{0pt}

The GR estimator requires computing the expected value of the Jacobian of the tempered softmax over the distribution $\theta + G | D$. Unfortunately, an analytical expression for this is only available in the simplest cases.\footnote{For example, in the case of $n=2$ (binary) and $\tau=1$ an analytical expression for the GR estimator is available.} In this section we provide a simple Monte Carlo (MC) estimator with sample size $K$ for $\mathbb{E}[d S_{\tau} / d \theta | D]$, which we call the \textit{Gumbel-Rao Monte Carlo Estimator (GR-MC$K$)}. This estimator can be computed locally at a cost that only scales like $nK$ (the arity of $D$ times $K$).

They key property exploited by GR-MC$K$ is that $\theta + G | D$ can be reparameterized in the following closed form. Given a realization of $D$ such that $D_i = 1$, $Z(\theta) = \sum_{i=1}^n \exp(\theta_i)$, and $E_j \sim \exponential$ i.i.d., we have the following equivalence in distribution \citep{maddison2014astar, maddison2016ppmontecarlo, tucker2017rebar}.
\begin{align}
\label{eq:gumbel_reparam}
	\theta_j + G_j | D \overset{d}{=}
	\begin{cases}
-\log\left(E_j\right) + \log Z(\theta) & \text{if } j = i \\
-\log\left(\frac{E_j}{\exp(\theta_j)} + \frac{E_i}{Z(\theta)}\right) & \text{o.w.}
\end{cases}
\end{align}
With this in mind, we define the GR-MC$K$ estimator:
\begin{align}
\label{eq:def_grmc}
\GRMC{K} := \frac{\partial  f(D)}{\partial D} \left[ \frac{1}{K}\sum_{k=1}^K \frac{d \softmax_{\tau}(\theta + G^k)}{d \theta}\right],
\end{align}
where $G^k \sim \theta + G | D$ i.i.d. using the reparameterization \eqref{eq:gumbel_reparam}. Note that the total derivative $d \softmax_{\tau}(\theta + G^k)/d \theta$ is taken through both $\theta$ and $G^k$. For the case $K=1$, our estimator reduces to the standard ST-GS estimator. The cost for drawing multiple samples $G^k \sim \theta + G | D$ scales only {\em linearly} in the arity of $D$ and is usually negligible in modern applications, where the bulk of computation accrues from the computation of $f$. Moreover, drawing multiple samples of $\theta + G | D$ can easily be parallelised on modern workstations (GPUs, etc.). Our estimator remains a single-evaluation estimator under this scheme, because the loss function $f$ is still only evaluated at $D$. Finally, as with GR, the GR-MC$K$ is guaranteed to improve in MSE over ST-GS for any $K \geq 1$, as confirmed in Proposition \ref{prop:grmc_mse}.

\begin{prop}
\label{prop:grmc_mse}
Let $\estimator{\mathrm{STGS}}$ and $\GRMC{K}$ be the estimators defined in \eqref{eq:def_stgs} and \eqref{eq:def_grmc}. Let $\nabla_{\theta} := d \mathbb{E}[f(D)]/d\theta$ be the true gradient that we are trying to estimate. For all $K \geq 1$, we have
\begin{align}
\label{eq:grmc_mse}
\expect
\left[
\left\lVert \GRMC{K} - \nabla_{\theta} \right\rVert^2
\right]
\leq
\expect
\left[
\left\lVert \estimator{\mathrm{STGS}} - \nabla_{\theta} \right\rVert^2
\right].
\end{align}
\end{prop}
\begin{proof}
	The proposition follows from Jensen's inequality and the linearity of expectations, see \ref{appendix:proofs_grmc_mse}.
\end{proof}

\subsection{Variance Reduction in Minibatches}
\label{gumbel_rao:mb}
The variance of GR-MC$K$ can be reduced by increasing $K$ or by averaging $B$ i.i.d. samples of the GR-MC$K$ estimator. An average of i.i.d. samples $\GRMC{K}^b$ for $b \in \{1, \ldots, B\}$ is an generalization of minibatching by sampling data points with replacement. In this subsection, we consider the effect of increasing $K$ and $B$ separately.

\newcommand{\GRMCMB}[2]{\overline{\nabla}_{\mathrm{GRMC}#1}^{1:#2}}

Let $\GRMC{K}^b$ be i.i.d. as $\GRMC{K}$ for $b \in \{1, \ldots, B\}$ and define the following ``minibatched'' GR-MC$K$ estimator:
\begin{align}
\label{eq:grmck_minibatched}
\GRMCMB{K}{B} := \frac{1}{B}\sum_{b=1}^B\GRMC{K}^b.
\end{align}
Proposition \ref{prop:grmc_var} summarizes the scaling of the variance of \eqref{eq:grmck_minibatched}, and is an elementary application of the law of total variance.
\begin{prop}
\label{prop:grmc_var}
Let $\estimator{\mathrm{STGS}}$, $\estimator{\mathrm{GR}}$ and $\GRMCMB{K}{B}$ be the estimators defined in \eqref{eq:def_stgs}, \eqref{eq:def_stgr} and \eqref{eq:grmck_minibatched}. We have
\begin{align}
\label{eq:grmc_var}
\var\left[\GRMCMB{K}{B}\right]
&=
\frac{\expect
\left[
\var
\left[
\estimator{\mathrm{STGS}} | D
\right]
\right]}{BK}
+
\frac{\var
\left[
\estimator{\mathrm{GR}}
\right]}{B}
\end{align}
where $\var$ is the trace of the covariance matrix.
\end{prop}
\begin{proof}
	The proposition follows directly from the law of total variance, see \ref{appendix:proofs_grmc_var}.
\end{proof}
As expected the total variance of $\GRMCMB{K}{B}$ decreases like $1/B$. The key point of Proposition \ref{prop:grmc_var} is that the component of the variance that $K$ reduces can also be reduced by increasing the batch size $B$. This suggests that the effect of GR-MC$K$ will be most pronounced at small batch sizes. Proposition \ref{prop:grmc_var} also indicates that there are diminishing returns to increasing $K$ for a fixed batch size $B$, such that the variance of GR-MC$K$ will eventually be dominated by the right-hand term of \eqref{eq:grmc_var}. In our experimental section, we explore various $K$ and study the effect on gradient estimation in more detail.

\looseness -1 Finally, we note that the choice of a Monte Carlo scheme to approximate $\expect\left[d S_{\tau}/d \theta|D\right]$ permits the use of additional well-known variance reduction methods to improve the estimation properties of our gradient estimator. For example, antithetic variates or importance sampling are sensible methods to explore in this setting \citep{kroese2013handbook}. For low-dimensional discrete random variables, Gaussian quadrature or other numerical methods could be employed. However, we found the simple Monte Carlo scheme described above effective in practice and report results based on this procedure in the experimental section.

\section{Additional Figures}
\label{appendix:add_fig}
\input{figures/figure_vae_big_panel.tex}
\input{figures/figure_vae_bs_k_panel.tex}
\input{tables/batchsize_table.tex}
\section{Experimental Details}
\label{appendix:exp_details}
\subsection{Unsupervised Parsing on ListOps}
\label{appendix:exp_nlp}
For our unsupervised parsing expeiment on ListOps, we use the basic version of the model described in \cite{choi2017unsupervised} with an embedding dimension and hidden dimension of $128$. We do not use the \emph{leaf-rnn}. We do not use the \emph{intra-attention module}. We do not use dropout, but set weight decay to be $1e-4$. Because our interest is in using this experiment primarily as a testbed to evaluate the effectiveness of different gradient estimators for this model at different temperatures and for trees of different depth, we use a very simple experimental set-up. We rely on stochastic gradient descent without momentum to train all models. We use grid search to determine an optimal learning rate from $\{0.1, 0.2, \ldots 1.0\}$ and set the temperature $\tau$ to be in $\{0.01, 0.1, 1.0\}$. We repeat five independent random runs at each setting and report the mean over the five runs. We train for ten epochs and set the batch size to be equal to the maximum sequence length $L$.

\subsection{Generative Modelling with Variational Auto-Encoders}
\label{appendix:exp_vae}
We trained variational auto-encoders with $n$-ary discrete random variables with values on the corners of the hypercube $\{-1, 1\}^{\log_2(n)}$. The model with arity $\{2, 4, 8, 16\}$ included $\{240, 120, 80, 60\}$ random variables respectively.

All models were optimized using stochastic gradient descent with momentum for 50000 steps on minibatches of size 20 and 200 respectively. Hyperparameters were randomly sampled and the best setting was selected from twenty independent runs. Learning rate and momentum were randomly sampled from $\{5, 6, \ldots 50\} \times 10^{-4}$ and $(0,1)$ respectively. We did not anneal the learning rate during training. For regularising the network, we used weight-decay, which was randomly sampled from $\{0, 10^{-1}, 10^{-2} \ldots, 10^{-6}\}$. The temperature was randomly sampled from $[0.1, 1.0]$ and not annealed throughout training.

All models were evaluated on the validation and test set using the importance-weighted bound on the log-likelihood described in \cite{burda2015importance} with 5000 samples.

To estimate the variance of a gradient estimator in the VAE experiment we used 5000 randomly sampled mini-batches of size 20, for each of which we performed 100 independent forward passes and then computed the associated gradient for the parameters of the inference network. We then summed the variance to get a singe scalar measurement.

To estimate the bias of a gradient estimator in the VAE experiment, we proceeded as above to approximate the expectation for a gradient estimator. We approximated the true gradient by following this procedure for the REINFORCE algorithm.

To assess training speed, we measured the average number of iterations needed to achieve a prespecified loss threshold on the validation set. In particular, we ran multiple independent runs under the same experimental conditions for all gradient estimators. Among only runs that achieved the threshold within the total budget, we report the average number of iterations taken to cross the threshold.

\section{Implementing Gradient Estimators by Modifying Backpropagation}

An advantage of the GRMC-K estimator is the ease with which it can be implemented using automatic differentiation software. Here, we provide a pseudo code template for such an implementation.

\begin{lstlisting}
class GRMCK(Function):

	def forward(logits, tau, k):
		sample = sampleOnehotCategorical(logits)
		save_for_backward(sample, logits, tau, k)
		return sample

	def backward(grad_output):
		sample, logits, tau, k = self.saved_objects
		logZ = logsumexp(logits)
		maxgumbel = getGumbel(logZ, k)
		tgumbels = getTruncatedGumbel(
			logits, k, sample, maxgumbel)
		gumbels = mergeGumbels(
			maxgumbel, tgumbels, sample)
		J = getSmaxJacobian(gumbels + logits).mean(0)
		return grad_output.matmul(J)
\end{lstlisting}

\section{Implementing Gradient Estimators with the Surrogate Loss Framework}
In this section, we consider an alternative framework for implementing  the gradient estimators presented in the main body. This framework is due to \citep{schulman2015gradient} and known as the surrogate loss framework. The key idea is that after the forward pass through a stochastic computation graph, all sampling decisions have been taken. Therefore, any gradient can be written as resulting from the differentiation of a surrogate objective in a deterministic computation graph.

Our exposition in the main body only considered a simplified scenario with a single discrete random variable. Therefore, we present here two cases, involving a layer of multiple and a cascade of discrete random variables. These two cases are general, because any case can be reduced to either of these two or a combination of them.

For ease of exposition, we again do not consider any direct dependence of $f$ on the parameters of interest $\theta$. The extension to this case is straight-forward and follows from basic calculus.

We also introduce the following notation to denote the stop of gradient flow. For $X^* = \texttt{stop\_gradient}(X)$ indicates that the gradient flow is interrupted at $X$ and no gradient information is passed backward.

\subsection{Parallel Case}
 Let $D^1, \ldots, D^m$ be a sequence of independent random variables. For $j \leq m$, let $D^j$ be a discrete random variable $D^j \in \{0, 1\}^n$ in a one-hot encoding, $\sum D_i^j = 1$, with distribution given by  $p_{\theta^j}(D^j) \propto \exp({D^j}^T \theta)$ where $\theta^j \in \R^n$. Further, let $S_{\tau}^j$ be defined analogously to equation \eqref{eq:coupling}. Given a continuously differentiable $f : \R^{mn} \to \R$, we wish to minimize
\begin{align}
    \label{eq:parallel}
    \min_{\theta}
    \mathbb{E}\left[
    f(D^1, \ldots D^m)
    \right],
\end{align}
where the expectation is taken over all $m$ random variables.
\newline
\newline
In this setting, $\estimator{\mathrm{REINF}}$ can be computed by differentiating the following surrogate objective,
\begin{align}
f(D^{1*}, \ldots D^{m*}) \sum_{j=1}^m \log p_{\theta^j}(D^j)
\end{align}
\newline
\newline
In this setting, $\estimator{\mathrm{GS}}$ can be computed by differentiating the following surrogate objective,
\begin{align}
f(S_{\tau}^{1}, \ldots S_{\tau}^{m})
\end{align}
\newline
\newline
In this setting, $\estimator{\mathrm{ST}}$ can be computed by differentiating the following surrogate objective,
\begin{align}
\sum_{j=1}^m
\left(
\frac{
\partial
f(D^{1}, \ldots D^{m})
}
{
\partial
D^{j}
}
\right)^*
\softmax_{\tau}(\theta^j)
\end{align}
\newline
\newline
In this setting, $\estimator{\mathrm{STGS}}$ can be computed by differentiating the following surrogate objective,
\begin{align}
\sum_{j=1}^m
\left(
\frac{
\partial
f(D^{1}, \ldots D^{m})
}
{
\partial
D^{j}
}
\right)^*
S_{\tau}^j
\end{align}
In this setting, $\GRMC{K}$ can be computed by differentiating the following surrogate objective,
\begin{align}
\sum_{j=1}^m
\left(
\frac{
\partial
f(D^{1}, \ldots D^{m})
}
{
\partial
D^{j}
}
\right)^*
\left[\frac{1}{K}
\sum_{k=1}^{K}
S_{\tau}^{jk}\right]
\end{align}

\subsection{Sequential Case}
Let $D^1, \ldots, D^m$ be a sequence of non-independent random variables. For $j \leq m$, let $D^j$ be a discrete random variable $D^j \in \{0, 1\}^n$ in a one-hot encoding, $\sum D_i^j = 1$, with distribution given by  $p_{\theta^j}(D^j) \propto \exp({D^j}^T \theta^j)$ where $\theta^j \in \R^n$. For $2 \leq j \leq m$, let $\theta^j = h(D^{j-1})$, where $h : \R^{n} \to \R^{n}$ is a continuously differentiable function. Given a continuously differentiable $f : \R^{mn}\to \R$, we wish to minimize
\begin{align}
\label{eq:sequential}
\min_{\theta}
\mathbb{E}\left[
f(D^1, \ldots, D^m)
\right]
\end{align}
In this setting, $\estimator{\mathrm{REINF}}$ and $\estimator{\mathrm{GS}}$ can be computed by differentiating the surrogate objective given in the parallel case. \\
In this setting, $\estimator{\mathrm{ST}}$ can be computed by differentiating the following surrogate objective,
\begin{align}
L_m &\coloneqq
\left(\frac{\partial  f(D^1, \ldots, D^m)}{\partial D^m} \right)^*
\softmax_{\tau}(\theta^{m}) \\
L_j &\coloneqq
\left(
\left(\frac{d L_{j+1}(D^1, \ldots, D^m)}{d D^{j}} \right)^*
+
\left(\frac{\partial  f(D^1, \ldots, D^m)}{\partial D^j} \right)^*
\right)
\softmax_{\tau}(\theta^{j})
\end{align}
In this setting, $\estimator{\mathrm{STGS}}$ can be computed by differentiating the following surrogate objective,
\begin{align}
L_m &\coloneqq
\left(\frac{\partial  f(D^1, \ldots, D^m)}{\partial D^m} \right)^*
\softmax_{\tau}(\theta^{m} + G^m) \\
L_j &\coloneqq
\left(
\left(\frac{d L_{j+1}(D^1, \ldots, D^m)}{d D^{j}} \right)^*
+
\left(\frac{\partial  f(D^1, \ldots, D^m)}{\partial D^j} \right)^*
\right)
\softmax_{\tau}(\theta^{j}+ G^j)
\end{align}
In this setting, $\GRMC{K}$ can be computed by differentiating the following surrogate objective,
\begin{align}
L_m &\coloneqq
\left(\frac{\partial  f(D^1, \ldots, D^m)}{\partial D^m} \right)^*
\left[\frac{1}{K}
\sum_{k=1}^{K}
\left(
\softmax_{\tau}(\theta^{m} + G^{mk})
\right)\right] \\
L_j &\coloneqq
\left(
\left(\frac{d L_{j+1}(D^1, \ldots, D^m)}{d D^{j}} \right)^*
+
\left(\frac{\partial  f(D^1, \ldots, D^m)}{\partial D^j} \right)^*
\right)
\left[\frac{1}{K}
\sum_{k=1}^{K}
\left(
\softmax_{\tau}(\theta^{j}+ G^{jk})
\right)\right]
\end{align}

\section{Proofs for the Propositions}
\label{appendix:proofs}
In this section, we provide derivations for all the propositions given in the main body.
\subsection{Proposition \ref{prop:gr_mse}}
\label{appendix:proofs_gr_mse}
The derivation is based on Jensen's inequality and the law of iterated expectations.
\begin{proof}
\begin{align}
\expect
\left[
\left\lVert \estimator{\mathrm{GR}} - \nabla_{\theta} \right\rVert^2
\right]
&=
\expect
\left[
\left\lVert
\expect\left[\estimator{\mathrm{STGS}} | D \right] - \nabla_{\theta}
\right\rVert^2
\right] \\
&=
\expect
\left[
\left\lVert
\expect\left[\estimator{\mathrm{STGS}} - \nabla_{\theta} | D \right]
\right\rVert^2
\right] \\
&\leq
\label{eq:prop1_jensen}
\expect
\left[
\expect
\left[
\lVert
\estimator{\mathrm{STGS}} - \nabla_{\theta}
\rVert^2
| D \right]
\right]  \\
&=
\label{eq:prop1_iterated}
\expect
\left[
\lVert
\estimator{\mathrm{STGS}} - \nabla_{\theta}
\rVert^2
\right]
\end{align}
\end{proof}
The inequality is strict whenever $\var\left[\estimator{\mathrm{STGS}} | D \right] > 0$, which is the case if $\tau < \infty$ and $\left|\theta_i\right| < \infty$ for all $i \leq n$.
\subsection{Proposition \ref{prop:grmc_mse}}
\label{appendix:proofs_grmc_mse}
The derivation is based on Jensen's inequality and the linearity of expectations. For ease of exposition, denote by $\estimator{\mathrm{STGS}} \left(S^k| D\right)$ a particular realization of the ST-GS estimator for a given $D$.
\begin{proof}
\begin{align}
\expect
\left[
\left\lVert \GRMC{K} - \nabla_{\theta} \right\rVert^2
\right]
&=
\expect
\left[
\left\lVert
\frac{1}{K}
\sum_{k=1}^K
\estimator{\mathrm{STGS}} \left(S^k| D\right) - \nabla_{\theta}
\right\rVert^2
\right] \\
&\leq
\label{eq:prop2_jensen}
\expect
\left[
\frac{1}{K}
\sum_{k=1}^K
\lVert
\estimator{\mathrm{STGS}} \left(S^k| D\right) - \nabla_{\theta}
\rVert^2
\right]  \\
&=
\label{eq:prop2_linear}
\frac{1}{K}
\sum_{k=1}^K
\expect
\left[
\lVert
\estimator{\mathrm{STGS}} \left(S^k| D\right) - \nabla_{\theta}
\rVert^2
\right]  \\
&=
\expect
\left[
\lVert
\estimator{\mathrm{STGS}} - \nabla_{\theta}
\rVert^2
\right]
\end{align}
\end{proof}
The inequality is strict whenever $K > 1$ and $\var\left[\estimator{\mathrm{STGS}} | D \right] > 0$, which is the case if $\tau < \infty$ and $\left|\theta_i\right| < \infty$ for all $i \leq n$.
\subsection{Proposition \ref{prop:grmc_var}}
\label{appendix:proofs_grmc_var}
The derivation is based on the law of total variance.
\begin{proof}
\begin{align}
\var\left[\GRMCMB{K}{B}\right]
 &=
	\expect
\left[
\var
\left[
\GRMCMB{K}{B} | D
\right]
\right]
+
\var
\left[
\expect
\left[
\GRMCMB{K}{B} | D
\right]
\right] \\
 &=
	\expect
\left[
\var
\left[
\frac{1}{B}\sum_{b=1}^B\GRMC{K}^b \middle| D
\right]
\right]
+
\var
\left[
\expect
\left[
\frac{1}{B}\sum_{b=1}^B\GRMC{K}^b \middle| D
\right]
\right] \\
 &=
	\expect
\left[
\frac{1}{B}
\var
\left[
\GRMC{K} | D
\right]
\right]
+
\var
\left[
\frac{1}{B}\sum_{b=1}^B
\expect
\left[
\GRMC{K} | D
\right]
\right] \\
&=
\frac{1}{B}
\expect
\left[
\frac{1}{K}
\var
\left[
\estimator{\mathrm{STGS}} | D
\right]
\right]
+
\frac{1}{B}
\var
\left[
\expect
\left[
\GRMC{K} | D
\right]
\right] \\
&=
\frac{1}{BK}
\expect
\left[
\var
\left[
\estimator{\mathrm{STGS}} | D
\right]
\right]
+
\frac{1}{B}
\var
\left[
\estimator{\mathrm{GR}}
\right]
\end{align}
\end{proof}


This January has been Australian Literature Month, hosted by Kim at Reading Matters, and the interweb has been alive with Aussie Lit.
My first reaction to the book was it's so dense! There is so much packed into O&L's 500+ pages, that it reads like a book that is far longer. That's not a bad thing though in a really good novel, and this is one. The density is in the dazzling detail which has a Dickensian quality to it, making it a book to be savoured and not rushed. I read it more slowly than I usually do taking nearly the full month, reading several short chapters, of which it has 111, most mornings.
The story was not at all what I expected. The playing cards on the front of the original cover would have you think that O&L are an Australian Bonnie & Clyde conning their way through the bush, however, the later cover with its church and praying hands is ultimately much closer to the heart of the story. I'm not going to outline the plot in detail as Lizzy's post captures its essence admirably.
Needless to say it's epic in scope. We alternate between Oscar and Lucinda's stories in the first half of the book. Both are parentless as young adults, Oscar through estrangement and Lucinda's mother died leaving her a small fortune. Despite having developed a flair for winning on the horse, Oscar decides to emigrate to Australia on a whim, and must overcome his phobia of crossing water for the long voyage. Lucinda meanwhile buys a glassworks and, while trying to integrate into Sydney society, gets addicted to playing cards for money.
So it's chapter 46 before they are on the same page of the book, and several chapters later before they say a word to each other on board the ocean liner taking Oscar to Oz.
There were two doors. She chose the right-hand one. Ahead of her was a red-headed clergyman sitting on a plush red settee. It was the second-class promenade. She felt herself 'nabbed', 'caught in the act'. She thought it undignified to turn back. She held up her head and straightened her shoulders. She came forward. She walked directly towards him. She introduced herself to him, and when he said his name, she did not hold it.
'I wonder then, she blurted, 'if you might not oblige me at a time convenient to you.' And then, not quite knowing what she had done, and certainly not why, she fled to those regions of the ship where Oscar dare not follow.
There's an instant attraction, but neither are capable of acting upon it. Hidebound by society rules, theirs is a relationship that will be two steps forward, and mostly two steps back, as misunderstandings and the inability to speak their minds always get in the way, until Oscar gets his chance, but what will he do?
This is a slow-burning book that, until the last fifty or so pages, plots a leisurely course through the lives of its protagonists. I can imagine getting very frustrated with both of them if I had read it faster – I still wanted to knock their heads together. Having been on their own since they were teenagers, with few friends of their own age, Oscar and Lucinda are innocents in the ways of romance, and it was this hope that they would actually realise their love that kept me mesmerised from start to finish.
← Mostly Bookbrains III – what a night!
I read 'Oscar and Lucinda' several years ago, long before I'd heard of blogs, and whilst my memory of it is vague – transporting a lass church comes to mind – I know that I thought it was excellent.
I haven't had much luck with his other books, though. I did like 'Theft', but not as much as 'Oscar and Lucinda' and I began to read 'True History of the Kelly Gang' but gave up. I've looked at few others when I've seen them in shops or the library, but none made me want to read them – shame, maybe it wasn't the right time for me then.
oops – should read 'glass church'!!
I knew what you meant Margaret! A lot of people seem to get on with some of Carey's books and not others it seems, so I hit lucky with the first one certainly.
So glad you managed to read this one, Annabel. It's such a dense book. I read it more than a decade ago and what I remember most is that it was so visual. That's probably why it made such a great film, too.
I had to laugh at your reference to Let's Talk Strine. We had a copy of that in my childhood home. Don't think I ever read it though.
It was a great introduction to Carey. Which to read next though … I'll look out for the DVD of O&L too – being a fan of Kate Blanchett and Voldemort.
I really enjoyed O&L Stu. it was all the folly of their lives that got me, (plus the will-they-won't-they romance of course).


text:
Dec 1, 2021·15 min read
Here are my top wishes for developments in quantum computing for Christmas in 2021. Okay, that's too tall an order with too little time left, so this informal paper lists the quantum computing developments I really want to see in the coming year, 2022. It's a fun list, but it's also a real list — these are advances that have a realistic chance of occurring over the coming year. It also gives a sense of how much work remains before quantum computing will really be ready to finally tackle practical real-world problems at production scale.
For reference, here are my Christmas wish lists from the past two years:
I still want everything from my 2019 and 2020 wish lists since so few of my wishes came true, but this year I tried to come up with a more abbreviated list which was a little more practical and achievable.
And may 2022 bring great tidings of comfort and joy!
Topics discussed in this paper:
My top ten Christmas 2021 and New Year 2022 wishes
A few additional wishes
A special additional wish
I know it's Christmas, but enough with the toy algorithms
My top five Christmas 2021 wishes?
No, I'm not wishing for more qubits!
But… we do need dramatic physical qubit growth to eventually support quantum error correction (QEC)
I'd rather see better qubits for a smaller quantum computer
Yes, I want to see more qubits, but not as the highest priority
Yes, quantum error correction (QEC) is an urgent research priority but near-perfect qubits are a more-urgent near-term priority
Quantum error correction (QEC) will no longer be high on my wish list until after we get near-perfect qubits
Of course it will be interesting to see progress with Quantum Volume
My non-wishes for Christmas 2021 and New Year 2022
Variational methods are a technical dead-end and unlikely to ever achieve any significant quantum advantage
My top Christmas 2021 wish
Quantum Fourier transform (QFT) and quantum phase estimation (QPE) to support quantum parallelism are the Holy Grail for quantum computing
My alternative top Christmas 2021 wish
My other alternative top Christmas 2021 wish
Some successes on my 2019 and 2020 wishes
Some notable failures on my 2019 and 2020 wishes
Still a mere laboratory curiosity of interest primarily to The Lunatic Fringe
Still in pre-commercialization, still years from commercialization
State of the art for quantum computing
Changes to my wishes?
My top ten Christmas 2021 and New Year 2022 wishes, not in any strict order per se:
Qubit fidelity of 3.5 nines. Approaching near-perfect qubits. I really want to see four nines (99.99%) within two years, but even IBM is saying that they won't be able to deliver that until 2024. Trapped-ions may do better.
Hardware capable of supporting quantum Fourier transform (QFT) and quantum phase estimation (QPE). Hopefully for at least 20 to 30 qubits, but even 16 or 12 or 10 or even 8 qubits would be better than nothing. Support for 40 to 50 if not 64 qubits would be my more ideal wish, but just feels way too impractical at this stage. QFT and QPE are the only viable path to quantum parallelism and ultimately to dramatic quantum advantage.
Fine granularity of phase. Any improvement or even an attempt to characterize phase granularity at all. My real wish is for at least a million to a billion gradations — to support 20 to 30 qubits in a single QFT or QPE, but I'm not holding my breath for this in 2022.
At least a handful of automatically scalable 40-qubit algorithms. And plenty of 32-qubit algorithms. Focused on simulation rather than real hardware since qubit quality is too low. Hopefully using quantum Fourier transform (QFT) and quantum phase estimation (QPE).
Simulation of 44 qubits. I really want to see 48-qubit simulation — and plans for research for 50 and 54-qubit simulation. Including support for deeper circuits, not just raw qubit count. And configurability to closely match real and expected quantum hardware over the next few to five to seven years.
At least a few programming model improvements. Or at least some research projects initiated.
At least a handful of robust algorithmic building blocks. Which are applicable to the majority of quantum algorithms.
At least one new qubit technology. At least one a year until we find one that really does the job.
At least some notable progress on research for quantum error correction (QEC) and logical qubits. Possibly a roadmap for logical qubit capacity. When can we see even a single logical qubit and then two logical qubits, and then five logical qubits and then eight logical qubits?
A strong uptick in research spending. More new programs and projects as well as more spending for existing programs and projects.
Some items that I really want but didn't fit in the count:
At least a paper proposal for an application to reach The ENIAC Moment.
Greater transparency. What's really going on under the hood of these quantum computers?! And why can't the trapped-ion vendors be much more transparent?!
Better documentation and specifications.
Better roadmaps. More technical details and milestone metrics. See my critique of IBM's quantum roadmap.
Some fruit from Amazon's research. More than just AWS hosting services for quantum computers from other vendors. An actual quantum computer.
Trapped-ion vendors catch up with transmon vendors. I'd like to see 27 and 32-qubit trapped-ion quantum computers. And a clear and detailed roadmap for 40, 48, 50, 64, 72, 80, 96, and 128-qubit trapped-ion quantum computers. And transparency on qubit fidelity, fine granularity of phase, circuit depths, and gate execution times.
Analytic tools to detect scalability problems for algorithms. Be able to detect coding patterns in algorithms which won't scale to run on particular hardware configurations expected over the next few to five to seven years. Scaling for both up to 48 to 50 qubits and in the over-50 qubit range as well. Including circuit depth and coherence time. And this includes fine granularity of phase and probability amplitude to detect overly-ambitious use of quantum Fourier transform (QFT) and quantum phase estimation (QPE), and quantum amplitude estimation (QSE) as well.
More a wish for me personally:
I'd like to learn more about how quantum logic gates are implemented at the firmware and hardware level. Especially the actual physics. I'd like to understand theoretically how fine-grained rotations of phase angles and probability amplitudes can really be — how much is a theoretical limit vs. how much is just a limit of the current firmware, digital logic, and analog control logic. My motivation is to understand the implementation and limitations of quantum Fourier transform (QFT) and quantum phase estimation (QPE) in support of quantum computational chemistry and other applications for QFT and QPE.
Very small algorithms can be illustrious for beginners, but the field is plagued by tiny algorithms. I don't care what you can do with five or seven or even eleven qubits. If your algorithm isn't using at least 24 qubits, then I don't want to hear about it. Okay, maybe that's a bit extreme, but at least 20 qubits or maybe 16 qubits at a minimum. I'm at least comfortable saying that anything less than a 16-qubit quantum algorithm is definitely a toy algorithm.
Granted, current hardware may not support algorithms over six, seven, eight, or ten qubits (Quantum Volume of 64, 128, 256, or 1024), but I'd rather see a simulation of a significant algorithm than an actual run of a mediocre algorithm on current hardware.
We need to be preparing for the hardware which will be available in two to three years, not proving that current hardware is mediocre.
To be clear, I'm promoting scalable quantum algorithms — automatically scalable quantum algorithms. It's okay if you want to demonstrate that your 24 or 32-qubit algorithm can also scale down to 20, 16, 12, or even 8 qubits to run on current hardware, but it is scaling up to 32, 36, and 40 qubits which really matters most.
I really tried to whittle my wish list down from ten to five, but I really can't. You can pick any five of my top ten at random, but I can't do any better than that.
Sure, a 256-qubit quantum computer, or 160 qubits, would be great, but the simple fact is that we have reached the point where raw qubit count is not the limiting factor. The main limiting factors are:
Qubit fidelity. Really need four nines to do anything substantial.
Coherence time and circuit depth. Too short to do much of value.
Gate fidelity. Gate error rate is still too high.
Measurement fidelity. Qubit results mean nothing if you can't accurately measure them.
Connectivity. Full any to any connectivity is needed. Or at least something much closer than nearest neighbor.
Automatically scalable 40-qubit algorithms. See we need even larger and more complex algorithms, but we can't even muster 40 qubits at this time.
So, unless there is dramatic (or even moderate) progress on all of those technical criteria, any increase in qubits (we already have 53, 65, and now 127 qubits) will be moot.
Seriously, although both Google and IBM achieved 53 qubits and IBM achieved 65 qubits, there is no evidence that the availability of this hardware has advanced algorithm design, although Google themselves did post several papers, but they used no more than 23 qubits.
Until we achieve major advances on all of those fronts, even 48 qubits are more than we need at this time.
Although additional noisy qubits aren't helpful to algorithm designers and application developers, we do need to eventually get to much larger numbers of physical qubits, even if still somewhat noisy, to support quantum error correction (QEC) and logical qubits.
For example, if each logical qubit required 65 physical qubits (one IBM approach), even 48 logical qubits would require 48 x 65 or 3,120 physical qubits. With only 1,121 physical qubits, IBM Condor would support only 1,121 / 65 or 17 logical qubits, which wouldn't be terribly useful. To support 40-qubit algorithms, 40 x 65 or 2,600 physical qubits would be needed.
So, I do indeed wish to see dramatic qubit growth over the coming year, but not as high a priority as pushing towards the near-perfect qubits which will be more useful over the next few years.
This is an example of research being at different time scales — near term, medium term, and longer term. We need near-perfect qubits in the near and medium term but logical qubits in the medium to longer term.
Rather than larger qubit counts, such as more 100-qubit machines and even a 256-qubit machine, I'd rather see a 48-qubit machine with better qubits. And even refinements for 28 and 32-qubit machines.
Eventually we will indeed need 256 and 1,000-qubit machines, and even 4K-qubit machines, but until qubit quality permits larger and more complex quantum algorithms, those higher qubit counts will not be used effectively.
Quantum error correction (QEC) is still years away. Yes, research is needed and I expect progress in research over the coming year, but I expect nothing to put in the hands of users for another couple of years. Quantum algorithms need significant near-term improvements in qubit quality, so I would give near-perfect qubits a higher near-term priority.
Besides, higher-quality physical qubits make it easier to achieve quantum error correction — with significantly fewer physical qubits per logical qubit.
Progress on quantum error correction (QEC) and logical qubits, also known as fault-tolerant quantum computing, was previously high on my Christmas wish lists, and yes, quantum error correction (QEC) must remain a high research priority, but as a longer-term goal, without usable results in the next couple of years. It won't be high on my wish list until after we have near-perfect qubits available, such as four nines of 40 qubits.
This is consistent with my interest in focusing quantum algorithms on simulation rather than real hardware for the next few years, and even then, focusing on near-perfect qubits until QEC becomes a mainstream feature of quantum computers.
It's kind of a slam dunk for IBM to achieve a Quantum Volume (QV) of 256 in 2022 — they're at 128 now. I would hope they could easily hit 512 (9 qubits). Maybe even 1K (10 qubits). But 2K or 4K or higher are probably out of reach this coming year, or maybe even the following year.
I do worry a bit about IBM since they have only very weak connectivity. Their achievement of QV of 128 — basically 7 qubits — relies on their heavy-hexagon topology. Moving to higher QV will incur long SWAP networks, which will require significantly greater qubit fidelity.
What Quantum Volume is reached by the trapped-ion vendors is another matter. But, again, Quantum Volume isn't a priority on my wish list. It's just a curiosity.
And, to be clear, whatever Quantum Volume that gets reported should be measured, not merely estimated.
IonQ announced a 32-qubit trapped-ion quantum computer with 22 algorithmic qubits (AQ) which they estimated would have a Quantum Volume "of at least 4,000,000." Benchmarks must be measured, not estimated.
Honeywell measured QV of 1024 with 10 trapped-ion qubits. I expect they will improve on that in 2022.
Just to recap, here are perfectly reasonable achievements which quantum computing could make in the coming year, but they simply aren't in my personal top ten priorities at this time:
More qubits.
Progress in Quantum Volume (QV). Not a particularly helpful metric at this stage. The focus should be on enhancing qubit quality and qubit-specific metrics such as nines of qubit fidelity and connectivity.
Progress on quantum error correction (QEC) and logical qubits. Research, yes, but nothing to put in the hands of users for a few more years.
More hardware vendors. Nominally I do still want to see more hardware vendors, but I want to see more hardware progress from the existing hardware vendors first as the higher priority.
Although variational methods are quite popular, they are unlikely to ever achieve any significant quantum advantage. Without a significant quantum advantage, they are a technical dead-end.
They only succeed by breaking a problem down into much smaller pieces, but that also reduces any advantage by reducing the extent of any quantum parallelism.
My point here is that I would like to see advances in quantum algorithms and quantum applications, but use of variational methods will undermine if not absolutely eliminate the advantages of such quantum algorithms and quantum applications.
Quantum algorithm design should focus primarily on quantum Fourier transform (QFT) and quantum phase estimation (QPE), not variational methods. Sure, this means running on simulators rather than real quantum computers, but this is the approach which will eventually achieve dramatic quantum advantage, not variational methods.
So my wish for Christmas and the New Year is for algorithm designers to move away from use of variational methods on current limited hardware in favor of quantum Fourier transform (QFT) and quantum phase estimation (QPE) on simulators.
If I could have only one wish, what would it be? I'd wish for…
This wish would greatly facilitate support for quantum computational chemistry and allow us to move away from the unproductive distraction of variational methods, which would never achieve dramatic quantum advantage anyway.
This is actually a clever wish because achieving it requires dramatic advances on a number of fronts:
Qubit fidelity. Low error rate.
Qubit connectivity. Much better than only nearest neighbor. Sorry, SWAP networks don't cut it.
Gate fidelity. Low error rate. Especially 2-qubit gates.
Measurement fidelity. Low error rate.
Coherence time and circuit depth. Can't do much with current hardware.
Fine granularity of phase. At least a million to a billion gradations — to support 20 to 30 qubits in a single QFT or QPE.
So far, quantum Fourier transform (QFT) and quantum phase estimation (QPE) are the best known technical approach to achieving quantum parallelism. That makes them the Holy Grail of quantum computing. QFT and QPE are the only viable path to quantum parallelism and ultimately to dramatic quantum advantage.
Maybe some other approaches will be surfaced by research in the coming years, but for now they are the best we have. But they are not getting enough attention.
Since my top wish may seem more like a cheat since I'm supposed to be asking for only one wish, I'd replace that wish with:
That's still a fairly clever wish since achieving it might result in many of the other qualities required for QFT and QPE being achieved as a side effect of general improvement of qubit fidelity.
And if even that seems like too much of a cheat, I'd wish for simply:
Although most of my wishes from prior years have not been granted, there have been a few successes:
100+ qubits. At least one machine in the 100+ qubit range. IBM just announced the 127-qubit Eagle. Another 100+ machine, Atom Computing Phoenix, has been "unveiled", but its actual availability is unclear. And another, ColdQuanta Hilbert, is expected early in 2022.
Additional hardware vendors. More than a few have popped up.
Another qubit technology. Two vendors of neutral atom qubits have surfaced.
Much more fundamental R&D. A palpable increase and announcement of new programs and projects. Not as much as I wanted, but some progress.
Honeywell has made notable progress with QV of 1024. That at least demonstrates that trapped-ion qubits have superior connectivity compared to superconducting transmon qubits.
No quantum computer from Microsoft.
No quantum computer from Intel.
No new quantum computer from Google.
Rigetti still hasn't gotten past 32 qubits.
IonQ hasn't gotten past 32 qubits.
Xanadu is still far from a practical photonic quantum computer. Great promise, but we're trying to move past mere promises.
Haven't gotten to three nines of qubit fidelity. IBM did announce something recently, but it was "best" case, not nominal case.
No improvement in qubit connectivity. For superconducting transmon qubits. Trapped-ion qubits seem all set.
Simulators haven't gotten past 32 or 40 qubits.
People are still touting Grover search and Shor's factoring algorithm. Time to move on! Focus on practical algorithms for the three to five year horizon.
Limited transparency.
Mediocre documentation.
Mediocre roadmaps.
No apparent progress on fine granularity of phase or quantum Fourier transform (QFT) or quantum phase estimation (QPE).
I know people are working really hard and great progress is being made, but even with all of my Christmas and New Year wishes, quantum computing will still remain a mere laboratory curiosity of interest primarily to The Lunatic Fringe — who will work with any technology no matter how limited or how far from completion it is — even as 2022 ends and 2023 begins.
We probably need another two or three years. Or four or five. Or more.
And we probably need full, automated, transparent quantum error correction (QEC) — or near-perfect qubits (four to five nines) which are close enough to perfect that QEC is not needed for many algorithms and applications.
Much research, prototyping, and experimentation is still required until we have sufficient technical knowledge and capabilities to even begin commercialization of quantum computing, which itself will take years.
All of my Christmas and New Year wishes are made in the spirit of pre-commercialization — none are intended to imply immediate or even eventual availability in commercial products.
For more on research needed, see my paper:
https://jackkrupansky.medium.com/essential-and-urgent-research-areas-for-quantum-computing-302172b12176
For more on pre-commercialization, see my paper:
https://jackkrupansky.medium.com/model-for-pre-commercialization-required-before-quantum-computing-is-ready-for-commercialization-689651c7398a
Or for a summary of both:
https://jackkrupansky.medium.com/prescription-for-advancing-quantum-computing-much-more-rapidly-hold-off-on-commercialization-but-28d1128166a
My list of wishes can also be read as a summary of the state of the art for quantum computing — not so much how much has been done, but how much work remains until quantum computing will be ready for development and deployment of production-scale practical real-world applications which can routinely achieve dramatic quantum advantage.
Hint: Much work remains.
I reserve the right to make changes to my wishes right up until 11:59 PM on December 24, 2021 — Christmas Eve. And I expect Santa's elves to be responsive to such late-breaking requests!
Alexa, Where Are We Going With This?
Richard Yao in IPG Media Lab
Why hasn't augmented reality invade our offices yet?
Team Guild in The Guild Journal
From Idea to Startup: Lawrence Livermore's Tech Transfer
Sabrina Canepa in Investing in Deep Technology — Dissected
Thanks for Democratizing VR/AR — Intel, HTC Vive, Futuremark, SpringboardVR, Mixcast and Leapmotion…
VR First in XR Bootcamp
Technological rationality 1
Where is Wearable Tech Headed?
Fliptin Editor in Fliptin
The Pixel 5 or the iPhone 12: The right choice for you
Best upcoming technological trends 2019 in government and public sector tips you will
CrimsonCobalt Digital

redpajama_set_name: RedPajamaCommonCrawl


text:
Q: Displaying specific records in a queryset from within Django template Is it possible to access a specific record of a QuerySet based on a value in one of its fields -- from within the template?
Let's say I have the following models:
Parent:
    someField

Child:
    parentFK = ForeignKey(Parent)
    bar = CharField

If Parent has many children, and I pass the QuerySet of Parent.objects.all() to my template, is it possible to access something like: Parent.someField.bar where foo=4?
In otherwords, access and display the field bar for the record where foo holds the value 4? I only want to pass the Parent QuerySet to the template.
Thanks!

A: You can do it using custom template tag.
P.S. Is your model description correct? If you have Parent with many children is it ok, that parent contains a link to child, not vice-versa?

redpajama_set_name: RedPajamaStackExchange


text:
Tag: Molly Ringwald
A sobering mid-life crisis fuels dissatisfaction in Philip Dimitrius, to the extent where the successful architect trades his marriage and career in for a spiritual exile on a remote Greek island where he hopes to conjur...
The Wives He Forgot (2006) (TV)
Into the small law offices of unlucky-in-love Charlotte St. John stumbles a handsome stranger, bloodied and battered, suffering amnesia. The good Samaritan, she cares for him, nurses him to health ... and falls hard for ...
For Keeps? (1988)
Darcy, editor at her high school paper, and her long-term boyfriend Stan are in their last months of school and already have found places in good colleges. Recently they started to sleep with each other and, surprise, su...
The Giving Tree (2000)
Nine former schoolmates, staying at a secluded mountain cabin for a reunion, try to figure out why one of their friends and their hostess would invite them there and commit suicide which prompts them to look into the mys...
Elle Evans (Joey King) just had the most romantic summer of her life with her reformed bad-boy boyfriend Noah Flynn (Jacob Elordi). But now Noah's off to Harvard, and Elle's headed back to high school for her senior year...
Malicious-1995
A medical student, obsessed with her school's star baseball player, pursues him and finally manages to get him to spend the weekend with her. However, when he soon returns to his girlfriend, her anger at his "betrayal" c...
An American Girl on the Home Front-2006
Based on several of the "Molly; An American Girl" books, this story is set in 1943 in the fictional town of Jefferson, Illinois during World War II. Molly McIntire and her family are learning to cope with the changes the...
SPF-18-2017
Five high school grads on the cusp of adulthood have their summer of discovery while surfing and house-sitting at Keanu Reeves' elegant beach house. Penny seeks to finally lose her virginity with Johnny. Johnny, in the w...
Fresh Horses-1988
hd movie	 1 year ago
A Cincinnati college student breaks off his engagement to his wealthy fiancée after he falls in love with a backwoods Kentucky girl he meets at a party. She claims to be 20 years old, but he learns that she's actually ju...
Cut-2000
A group of film students attempt to finish a horror movie that stopped production years earlier when the director was killed. Unaware that every attempt to complete the pic coincided with the murders of those involved, t...
Cowboy Up-2001
Two brothers, One is a bull rider, the other a rodeo bullfighter/stock contractor, clash over the love of barrel racer Celia Jones, while each comes into their own in their respective field in the rodeo world.::Anonymous...
Sixteen Candles-1984
Samantha's life is going downhill fast. The sixteen-year-old has a crush on the most popular boy in school, and the geekiest boy in school has a crush on her. Her sister's getting married, and with all the excitement the...
Jem and the Holograms-2015
As a small-town girl Jerrica lives an unexceptional life until she takes on a secret identity inspired by her music. She becomes Jem: the bold, stunning and absolutely fearless singer that catapults from an underground v...
Pretty in Pink-1986
Teenager Andie is one of the not-so-popular girls in high school. She usually hangs out with her friends Iona or Duckie. Duckie has always had a crush on her, but now she has met a new guy at school, Blane. He's one of t...
The Breakfast Club-1985
Beyond being in the same class at Shermer High School in Shermer, Illinois, Claire Standish, Andrew Clark, John Bender, Brian Johnson and Allison Reynolds have little in common, and with the exception of Claire and Andre...
Teaching Mrs. Tingle-1999
Leigh Ann is salutatorian when she needs to be valedictorian to get her scholarship to Harvard. The only class she is worse than the leader in is history, taught by Mrs. Tingle, and the teacher hates her. When an attempt...
King Cobra-2016
This ripped-from-the-headlines drama covers the early rise of gay porn headliner Sean Paul Lockhart (a.k.a. Brent Corrigan) before his falling out with the producer who made him famous. When Sean decides he'd be better o...
All These Small Moments-2018
A teenage boy's infatuation with a woman he sees on the bus further complicates his already tumultuous adolescence.::anonymous...
Spacehunter: Adventures in the Forbidden Zone-1983
Three women make an emergency landing on a planet plagued with a fatal disease, but are captured by dictator Overdog. Adventurer Wolff goes there to rescue them and meets Niki, the only Earthling left from a medical expe...
The Pick-up Artist-1987
In New York City, Jack Jericho, an elementary school teacher who lives with and takes care of his ailing grandmother Nellie, is a bit of a scammer, most notably demonstrated by he continually rehearsing his corny pick-up...
this is good...
Why is there so many movies in arabe?...
me too we frends...
The audio is not original. It is a kind of interview with producers and actors....
ENG CAP WHEN FOREN LANG...
death murder United States Canada based-on-novel flashback tv series 2007 psychotronic-film 2011 Italy 2016 two-word-title new-york-city Japan United Kingdom China 2010 family-relationships 2019 dog bare-breasts violence character-name-as-title 2009 2012 Germany 2006 nudity police female-frontal-nudity one-word-title South Korea father-daughter-relationship f-rated Spain revenge Hong Kong male-nudity 2015 independent-film France 2017 2018 2013 blood mother-son-relationship sequel 2020 2014 female-nudity female-protagonist love friendship India 2008 father-son-relationship Australia bare-chested-male husband-wife-relationship


I'll keep updating this page, as I flip through my memory Rolodex, or hear one again that makes me say "Chips LOVED that!" There were also pieces he hated (opinionated pony) that would make him trot off in frustration. I wasn't a big fan of Erik Satie myself.
Sure to bring on a wild bucking pony: (oops, it wasn't the Beethovan's 9th (Ode to Joy), it was Beethovan's 5th. Duh, some musician, can't keep the numbers straight.
Mr. Chips liked almost anything by Clementi. It was the first thing he ever heard live on a piano, so I wonder if that has something to do with it? This wasn't the first Clementi piece he heard, but it's a lovely interpretation of one he liked. Or hung around for. Whatever we want to call it!
The first piece of piano music Mr. Chips heard in person. Couldn't find any pro's on YouTube playing this, it's a very popular kids recital piece. But I liked her touch. It's difficult, especially for a kid, not to get carried away and play it at train wreck speed.
Beethoven's Moonlight Sonata: Mr. Chips favorite late summer evening music when it hasn't yet cooled off enough to make a pony frisky and comfortable. It put him in a trance.
Claire de Lune, as long as were on the romantics, we may as well go into some romantic impressionism. Van Cliburn performing: amazing restraint and delicacy. Mr. Chips seemed to only like sections of this…probably because it was a piece I played (NOT like this…) and worked certain sections over and over again until I felt happier with it. He seemed to perk up at the runs and key changes.
M. Chips also liked Gershwin, which cracked me up, for some reason. What's not to like, right? He intensely disliked the honking horns in American in Paris, but loved the second section. He'd listen to American in Paris, unsure about it: pinning his hears at the honking horns and discordant notes, and then wait for the part he liked. Definitely into melodic, this pony. But something About A in P brought out excitement in him, and he'd frequently trot around tossing his head. I picked this version because it's fun to watch as well as listen. These are real pianists, who really played this piece with four pianos, then recorded themselves "playing" the piece on a table. Super fun, and very well done.
This is SO weird – I just started listening to Mr. Chips' favorite, and when I looked out the window, our half-Shetland painted pony, Apache Moon, is standing in the front field staring into my window, eyes and ears riveted!
I've opened the window and am giving him the full playlist. LOL.
Now I want to find the rest of them so we can do a double blind pony music study!


text:
Q: Xcode 11.1: Test indicators not shown With the latest Xcode AppStore version (11.1), and a freshly configured project & workspace, the test indicators are not updated after testing. This means: the remain black and empty, as shown in the attachement.
Does anyone else have this problem? Has anyone any idea how to fix this (if not to be fixed by Apple because it's a bug)? (Cleaning up project, removing derived data folder etc. had no effect; it's also independent of classic project or SwiftUI project.)

[Edit:] This is also true for the newest Xcode Beta 11.2 beta (11B41).


Published on the 12th of September, 2015.
There's a playlist on Spotify I love called Discover Weekly. It's updated every Monday with a mix of songs, some I know and some I've never heard, crossing into almost every genre with no discernible pattern. Like magic, it just knows what I want to hear.
Fool us once, shame on you; fool us a hundreds times in a row, and now we've got ourselves a working journalism business model here. We were all Henry Hill with an eye on the Chartbeat numbers. We ran everything. We didn't check sources. We didn't verify. We scraped Twitter for screenshots. Everybody had their hands out. Everything was for the taking.
2013 was a terrible year for Internet news. 2015 is worse.
We are going to start recording and automatically transcribing most of what we say. Instead of evaporating into memory, words spoken aloud will calcify as text, into a Record that will be referenced, searched, and mined. It will happen by our standard combination of willing and allowing. It will happen because it can. It will happen sooner than we think.


text:
Q: Executing a ping from a remote server Using VS 2015 and VB.net.
I have a web application and I want to execute a ping from a remote server.  The server is running windows Server R2 2012.
The server has a router connected to it that goes to sleep periodically and at the moment we log in to the server and start a ping to the router to wake it up.  The web application will be accessed by various users and on a button click the ping would start.  The web application is hosted on our web server (not the remote server) and the ping must come from the remote server as the IP address of the router is local to the remote server and not visible to ping from anywhere else.
From my application I want to do this in code but I don't know where to start (been searching for a while).
I am not asking for the code I just want to know what I should be looking at.

A: using a scheduled task as @Nkosi pointed in his comment is not a bad idea, but the most professional and stable way is to write a windows Service that will handle this task. a service is different than a process, its always runs on the background and NT User is not have to be logged in. you can setup timers to schedule the pinging inside the service application.  Creating a Windows Service Application


text:
Q: XCUITest pointing to Unit Test target I'm working on adding UITest to my iOS app. I've gone through the steps to create the new UI Test Target, but when I try to even run the sample test, it seems to be pointing to the same target as my Unit Test (which inevitably fails)
Where do I go in Xcode to configure the target for UI tests?
Thanks!


text:
Coniston – wieś w Anglii, w hrabstwie East Riding of Yorkshire. Leży 9 km na północny wschód od miasta Hull i 255 km na północ od Londynu. W 2001 miejscowość liczyła 266 mieszkańców.

Przypisy

Wsie w hrabstwie East Riding of Yorkshire

redpajama_set_name: RedPajamaWikipedia


text:
Michio Kaku (jap. 加來 道雄 [Kaku Mičio], * 24. ledna 1947) je americký fyzik, profesor teoretické fyziky na City University of New York, spoluzakladatel strunové teorie pole a popularizátor vědy. Napsal několik knih o fyzice a s ní spojených tématech a často se objevuje v radiu, televizi a dokumentárních filmech.

Biografie
Narodil se v San José v Kalifornii japonským přistěhovalcům. Jeho děd přijel do Spojených států, aby pomáhal při pracích po zemětřesení v San Franciscu 1906.

Na začátku šedesátých let chodil na Cubberley High School v Palo Altu, kde hrál šachy. V roce 1968 získal titul bakaláře věd summa cum laude (s nejvyšší pochvalou) na Harvard University. Poté studoval v Berkeley Radiation Laboratory na University of California, Berkeley, kde v roce 1972 získal titul Ph.D. Během války ve Vietnamu se připojil k americké armádě, ale než byl povolán do akce, válka skončila.

Nyní se zabývá formulováním teorie všeho, která má spojit čtyři základní síly ve vesmíru: silnou interakci, slabou interakci, gravitaci a elektromagnetickou interakci.

Publikoval přes 170 článků o teorii superstrun, supergravitaci, supersymetrii a hadronech. V roce 1974 spolu s profesorem K. Kikkawou poprvé napsal článek o strunové teorii pole, která spojuje všech pět teorií strun do jedné rovnice. Také napsal několik populárně-vědeckých knih: Visions, Hyperprostor, Einsteinův vesmír a Paralelní světy a s Jennifer Thompson napsal knihu Dále než Einstein. Hyperprostor se stal bestsellerem a deníky The New York Times i The Washington Post ho zařadily mezi nejlepší vědecké knihy roku. Ve Fyzice nemožného zkoumá např. neviditelnost, teleportaci, předpovídání budoucnosti, vesmírné lodě, stroje na antihmotu, cestování v čase a další záležitosti, které rozděluje do kategorií podle toho, kdy (a jestli vůbec) by se mohly uskutečnit. V březnu 2008 se Fyzika nemožného dostala na seznam bestsellerů magazínu The New York Times.

Filmografie
 We Are the Guinea Pigs (1980)
 Borders (1989)
 Synthetic Pleasures (1995)
 Odhalený Einstein (1996)
 Future Fantastic (1996)
 Vesmír Stephena Hawkinga  (1997)
 Bioperfection: Building a New Human Race (1998)
 Exodus Earth (1999)
 Me & Isaac Newton (1999)
 Space: The Final Junkyard (1999)
 Big Questions (2001)
 Paralelní světy (2001)
 Horizon: "Time travel" (2003)
 Robo sapiens (2003)
 Brilliant Minds: Secret Of The Cosmos (2003)
 Nova: "The Elegant Universe" (2003)
 Hawking (2004)
 The Screen Savers (2004)
 Unscrewed with Martin Sargent (2004)
 Život na jiné planetě (2005)
 ABC News "UFOs: Seeing Is Believing" (2005)
 HARDtalk Extra (2005)
 Last Days on Earth (2005)
 Obsessed & Scientific (2005)
 Horizon: "Einstein's Unfinished Symphony" (2005)
 Proroci science fiction (2006)
 Time (2006)
 Svět za padesát let (nebo 2057) (2007)
 The Universe (2007)
 Futurecar (2007)
 Attack of the Show! (2007)
 Co nás čeká v budoucnu (2008)
 Horizon: "The President's Guide to Science" (2008)
 Stephen Hawking: Master of the Universe (2008)
 Horizon: "Who's Afraid of a Big Black Hole" (2009–2010)
 Sci Fi Science: Physics of the Impossible (2009–2010)
 Horizon: "What Happened Before the Big Bang?" (2010)
 GameTrailers TV With Geoff Keighley: "The Science of Games" (2010)
 How the Universe Works (2010)

Výběr z bibliografie
 Hyperprostor, 2008, Argo (Hyperspace, 1994) je o čtyřech silách vesmíru a o vyšších dimenzích.
 Dále než Einstein, 2009, Argo (Beyond Einstein, 1995) je hlavně o Albertu Einsteinovi a jeho cestě za hledáním teorie všeho.
 Einsteinův vesmír, 2005, Argo (Einstein's Cosmos, 2004) je kniha o Albertu Einsteinovi.
 Paralelní světy, 2007, Argo (Parallel Worlds, 2004) líčí možnost existence paralelních světů. Kaku v ní také píše o černých dírách a dalších často kladených otázkách pokročilé fyziky.
 Fyzika nemožného, 2008, Argo (Physics of the Impossible, 2008) představuje vědu, o které lidé sní. Kaku zkoumá myšlenky, které se lidem zdají nemožné. Kniha je rozdělena na nemožnosti I. řádu, II. řádu a III. řádu podle toho, kdy si Kaku myslí, že by tyto myšlenky mohly být uskutečněny.
 Physics of the Future (2011) nabízí možný vývoj technologického pokroku v příštích 100 letech.
 Budoucnost lidstva, 2019, Prostor (The future of Humanity) líčí kam by lidstvo mohlo dospět v oblasti kosmických letů, zlepšování člověka a osidlování vesmíru.

Odkazy

Reference

Externí odkazy

 Oficiální stránka dr. Kaku
 Getting Physical: Dr. Michio Kaku Explains Einstein's Genius
 Russia Takes Aim at Asteroids, op-ed on asteroid defense, Wall St. Journal, 5. ledna 2010
 Rozhovor The Skeptics' Guide To The Universe

Američtí fyzici
Futurologové
Absolventi Harvardovy univerzity
Američané japonského původu
Aktivisté za lidská práva
Narození v roce 1947
Narození v San José (Kalifornie)
Žijící lidé
Muži
Popularizátoři vědy
Absolventi Kalifornské univerzity v Berkeley


By implementing our flu vaccination program into your workplace, not only will you help protect your team from contracting the flu virus, you will also help to prevent your team from spreading the flu to other employees and to your clients.
You will also be supporting other Australian businesses by purchasing an Australian-made vaccine.
Our Flu Vaccination Program is a fully managed and coordinated service and best of all, we come to you!
Read more about what services are offered under our Flu Vaccination Program here.
1a. World Health Organization, Influenza Seasonal fact sheet no.211, April 2009. Found at: http://www.who.int/mediacentre/factsheets/fs211/en/ (accessed 8 July 2013). bioCSL (Australia) Pty Ltd. 63 Poplar Road, Parkville, VIC 3052. ABN 66 120 398 067.
Keech M and Beardsworth P. The impact of influenza on working days lost. PharmacoEconomics: 2008;26(11):911–924.
Keech M et al. The impact of influenza and influenza-like illness on productivity and healthcare resource utilization in a working population. Occup. Med. 1998, Vol 48, 85–90.
Smith AP et al. Effect of influenza B virus infection on human performance. BMJ 1993; 306 (6880):760–1.
Influenza Fast Facts, Influenza Specialist Group. Found at: http://www.isg.org.au/index.php/clinical-information/influenza-fast-facts-/ Accessed July 2013.
NHMRC. The Australian Immunisation Handbook, 10th Edition 2013, page 256.
Cohen et al. J Occup Health Safety 2003;19(2):167–182.
Some of the information in this report has been produced with permission from CSL Medical Information: 1800 642 865. ® bioCSL is a registered trademark of CSL Limited. Date of preparation: July 2013. 12201-ACH. DC5994.


Discussion in 'General Talk' started by Charlie_M, Mar 24, 2015.
Hi everyone can some on tell what size allen wrench fits the 20 mm pulley set screw? I think is either 1.5mm or .5 . Thanks.
The 20T pulley requires a 1.5mm.


Welcome to one of Seaburn best Indian takeaways.
We are pleased to be one of the best Indian takeaways in Seaburn with incredible food, polite and friendly staff, and great value for money. We highly recommend our Indian takeaway and know you will enjoy every taste.


text:
Welcome to The Surya Group
The Surya Group was founded in 1963 as a textile company in Dubai. We now have offices in Moscow, Minsk, and Shaoxing. Starting in textiles, we have grown to become a multi-channel company, working in retail, distribution and real estate industries. Creating enviable retail environments on a global scale, we act as brand guardians for our partners, ensuring unparalleled shopping and customer service experiences.
CEO Ravi Navlani has played a key role in The Surya Group's international growth and development. After joining the company in 2001, he was instrumental in expanding and evolving The Surya Group, while still preserving it as one of the most respected brands in textiles. Noted as one of Russia's top entrepreneurs, Ernst & Young awarded Ravi "Entrepreneur of the Year" in 2013 for all of Russia. He also served as the president of Russia's Entrepreneur's Organization.
Under Ravi's leadership, we're eager to see how the Surya Group continues to expand and evolve as a company and brand.


text:
BGS Home » Discovering geology » Geology of Britain » Limestone landscapes » Limestone topography » Topographical features created by erosion » Waterfalls
Waterfalls in areas of massive limestone are usually found at swallow holes, where a stream or river cascades down into subterranean drainage systems. Massive limestones do not support rivers and waterfalls over long distances.
Surface rivers in Yorkshire are usually confined to non-limestone rocks, such as the area of shale, sandstone and grit that overlies the limestones of the Pennines of the Dales. These streams flow over the edge of the impermeable rock onto the limestones, but quickly disappear into the cave system below.
However, in some areas such as Wensleydale and Dentdale, several rivers flow across the limestone landscape and drop over waterfalls and rapids. In fact it is often the limestone that creates the waterfalls. How can we explain this?
Aysgarth Falls
Middle Force at Aysgarth Falls, Wensleydale.
© NERC P005471
In Wensleydale there are rocks that geologists call the 'Yoredale facies'. Here, layers (beds) of sandstone and shale are found sandwiched between beds of limestone.
The sandstones and shales are less permeable than limestone, and the River Ure can flow over and erode them.
The limestone beds are harder than the sandstone and shales, withstand erosion and form steps in the river's course, creating waterfalls.
Aysgarth Falls is one of the more famous, and here the River Ure tumbles over three flights of small waterfalls.
Hardraw Force, at Hawes at the head of Wensleydale.
Hardraw Force, at Hawes at the head of Wensleydale, is another famous waterfall. Here the river flows over the sandstones and shales of the Yoredale facies until it reaches a thick, hard limestone, which creates a spectacular waterfall, said to be the highest unbroken waterfall in Britain.
Hardraw Force is not as high as some waterfalls, like Gaping Gill, but they are subterranean features.
The water plunges 30 m over the limestone onto more sandstones and shales below.
Goredale Scar
Goredale Scar and Goredale Beck, near Malham Cove, showing the natural rock arch.
Goredale Scar formed a high waterfall at the end of the last ice age, where a huge step had been created by movement of the Craven Fault.
This step is at the end of a deep gorge, which was eroded at the time when the glaciers were in retreat.
Today the much smaller Goredale Beck cascades down the ravine in two waterfalls, one of which pours through a natural arch. It is interesting that tufa is being deposited here.
Malham Cove
Face of original waterfall with stream issuing at the cliff base, Malham Cove.
Some of the most spectacular waterfalls would have been seen towards the end of the last ice age, when the ground was frozen or when the water table was high.
Water from melting ice fields and glaciers cut deep gorges, some of which end at huge steps in the hillside like at Malham Cove. This is where the Craven Fault runs through the rocks.
Movement along the fault has created these high cliffs over which the water once flowed. The valleys around the cliffs are now dry, their river systems having found an alternative route underground.
Thornton Force
Thornton Force, on the River Twiss, near Ingleborough.
Thornton Force is located on the River Twiss, near Ingleborough, where the waterfall plunges over Carboniferous limestone onto Ordovician sandstones below.
Here, earth movement along the Craven Fault has created a large, cliff-like step over which the water tumbles.
The Craven Fault is a series of geological fault lines which cut through the rocks along the southern part of the Yorkshire Dales National Park.
The fault often marks the boundary between the higher limestone area and the lower ground to the south and west. Movement along this fault is also reponsible for the high cliffs at Malham Cove and Goredale Scar.
What is limestone?
Classification of limestones
Limestone formation
Water and limestone
Limestone topography
Karst in the Yorkshire Dales
Chemical weathering features
Erosion features
Underground features
Karst processes
Solution features
Precipitation features
Gaping Gill cave system
Resources, conflicts, quarrying and sustainability
Building stones and the landscape
Conflicts of land use
Managing the environment
Quarrying, community and environment
Quarrying and sustainability
UK geology research