text
stringlengths 14
5.77M
| meta
dict | __index_level_0__
int64 0
9.97k
⌀ |
|---|---|---|
Adjust total server number in browser.
The total number of servers displayed in server browser includes etpro, punkbuster, and facade servers.
Change this total to the effectively available number of servers to legacy clients. The real total could be kept in console for information purpose.
|
{
"redpajama_set_name": "RedPajamaC4"
}
| 3,032
|
{"url":"https:\/\/topepo.github.io\/caret\/subsampling-for-class-imbalances.html","text":"11 Subsampling For Class Imbalances\n\nContents\n\nIn classification problems, a disparity in the frequencies of the observed classes can have a significant negative impact on model fitting. One technique for resolving such a class imbalance is to subsample the training data in a manner that mitigates the issues. Examples of sampling methods for this purpose are:\n\n\u2022 down-sampling: randomly subset all the classes in the training set so that their class frequencies match the least prevalent class. For example, suppose that 80% of the training set samples are the first class and the remaining 20% are in the second class. Down-sampling would randomly sample the first class to be the same size as the second class (so that only 40% of the total training set is used to fit the model). caret contains a function (downSample) to do this.\n\u2022 up-sampling: randomly sample (with replacement) the minority class to be the same size as the majority class. caret contains a function (upSample) to do this.\n\u2022 hybrid methods: techniques such as SMOTE and ROSE down-sample the majority class and synthesize new data points in the minority class. There are two packages (DMwR and ROSE) that implement these procedures.\n\nNote that this type of sampling is different from splitting the data into a training and test set. You would never want to artificially balance the test set; its class frequencies should be in-line with what one would see \u201cin the wild\u201d. Also, the above procedures are independent of resampling methods such as cross-validation and the bootstrap.\n\nIn practice, one could take the training set and, before model fitting, sample the data. There are two issues with this approach\n\n\u2022 Firstly, during model tuning the holdout samples generated during resampling are also glanced and may not reflect the class imbalance that future predictions would encounter. This is likely to lead to overly optimistic estimates of performance.\n\u2022 Secondly, the subsampling process will probably induce more model uncertainty. Would the model results differ under a different subsample? As above, the resampling statistics are more likely to make the model appear more effective than it actually is.\n\nThe alternative is to include the subsampling inside of the usual resampling procedure. This is also advocated for pre-process and featur selection steps too. The two disadvantages are that it might increase computational times and that it might also complicate the analysis in other ways (see the section below about the pitfalls).\n\n11.1 Subsampling Techniques\n\nTo illustrate these methods, let\u2019s simulate some data with a class imbalance using this method. We will simulate a training and test set where each contains 10000 samples and a minority class rate of about 5.9%:\n\nlibrary(caret)\n\nset.seed(2969)\nimbal_train <- twoClassSim(10000, intercept = -20, linearVars = 20)\nimbal_test <- twoClassSim(10000, intercept = -20, linearVars = 20)\ntable(imbal_train$Class) ## ## Class1 Class2 ## 9411 589 Let\u2019s create different versions of the training set prior to model tuning: set.seed(9560) down_train <- downSample(x = imbal_train[, -ncol(imbal_train)], y = imbal_train$Class)\ntable(down_train$Class) ## ## Class1 Class2 ## 589 589 set.seed(9560) up_train <- upSample(x = imbal_train[, -ncol(imbal_train)], y = imbal_train$Class)\ntable(up_train$Class) ## ## Class1 Class2 ## 9411 9411 library(DMwR) set.seed(9560) smote_train <- SMOTE(Class ~ ., data = imbal_train) table(smote_train$Class) \n##\n## Class1 Class2\n## 2356 1767\nlibrary(ROSE)\n\nset.seed(9560)\nrose_train <- ROSE(Class ~ ., data = imbal_train)$data table(rose_train$Class) \n##\n## Class1 Class2\n## 4939 5061\n\nFor these data, we\u2019ll use a bagged classification and estimate the area under the ROC curve using five repeats of 10-fold CV.\n\nctrl <- trainControl(method = \"repeatedcv\", repeats = 5,\nclassProbs = TRUE,\nsummaryFunction = twoClassSummary)\n\nset.seed(5627)\norig_fit <- train(Class ~ ., data = imbal_train,\nmethod = \"treebag\",\nnbagg = 50,\nmetric = \"ROC\",\ntrControl = ctrl)\n\nset.seed(5627)\ndown_outside <- train(Class ~ ., data = down_train,\nmethod = \"treebag\",\nnbagg = 50,\nmetric = \"ROC\",\ntrControl = ctrl)\n\nset.seed(5627)\nup_outside <- train(Class ~ ., data = up_train,\nmethod = \"treebag\",\nnbagg = 50,\nmetric = \"ROC\",\ntrControl = ctrl)\n\nset.seed(5627)\nrose_outside <- train(Class ~ ., data = rose_train,\nmethod = \"treebag\",\nnbagg = 50,\nmetric = \"ROC\",\ntrControl = ctrl)\n\nset.seed(5627)\nsmote_outside <- train(Class ~ ., data = smote_train,\nmethod = \"treebag\",\nnbagg = 50,\nmetric = \"ROC\",\ntrControl = ctrl)\n\nWe will collate the resampling results and create a wrapper to estimate the test set performance:\n\noutside_models <- list(original = orig_fit,\ndown = down_outside,\nup = up_outside,\nSMOTE = smote_outside,\nROSE = rose_outside)\n\noutside_resampling <- resamples(outside_models)\n\ntest_roc <- function(model, data) {\nlibrary(pROC)\nroc_obj <- roc(data$Class, predict(model, data, type = \"prob\")[, \"Class1\"], levels = c(\"Class2\", \"Class1\")) ci(roc_obj) } outside_test <- lapply(outside_models, test_roc, data = imbal_test) outside_test <- lapply(outside_test, as.vector) outside_test <- do.call(\"rbind\", outside_test) colnames(outside_test) <- c(\"lower\", \"ROC\", \"upper\") outside_test <- as.data.frame(outside_test) summary(outside_resampling, metric = \"ROC\") ## ## Call: ## summary.resamples(object = outside_resampling, metric = \"ROC\") ## ## Models: original, down, up, SMOTE, ROSE ## Number of resamples: 50 ## ## ROC ## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's ## original 0.8898125 0.9280562 0.9427854 0.9391471 0.9497858 0.9726760 0 ## down 0.8845159 0.9179641 0.9358661 0.9331412 0.9482814 0.9737144 0 ## up 0.9989373 0.9999989 1.0000000 0.9998931 1.0000000 1.0000000 0 ## SMOTE 0.9691549 0.9753107 0.9795925 0.9795243 0.9838382 0.9912610 0 ## ROSE 0.8760622 0.8880574 0.8961100 0.8955910 0.9008337 0.9129835 0 outside_test ## lower ROC upper ## original 0.9091750 0.9216889 0.9342028 ## down 0.9275022 0.9347344 0.9419665 ## up 0.9304358 0.9390695 0.9477032 ## SMOTE 0.9415236 0.9480615 0.9545995 ## ROSE 0.9350754 0.9424011 0.9497267 The training and test set estimates for the area under the ROC curve do not appear to correlate. Based on the resampling results, one would infer that up-sampling is nearly perfect and that ROSE does relatively poorly. The reason that up-sampling appears to perform so well is that the samples in the majority class are replicated and have a large potential to be in both the model building and hold-out sets. In essence, the hold-outs here are not truly independent samples. In reality, all of the sampling methods do about the same (based on the test set). The statistics for the basic model fit with no sampling are fairly in-line with one another (0.939 via resampling and 0.922 for the test set). 11.2 Subsampling During Resampling Recent versions of caret allow the user to specify subsampling when using train so that it is conducted inside of resampling. All four methods shown above can be accessed with the basic package using simple syntax. If you want to use your own technique, or want to change some of the parameters for SMOTE or ROSE, the last section below shows how to use custom subsampling. The way to enable subsampling is to use yet another option in trainControl called sampling. The most basic syntax is to use a character string with the name of the sampling method, either \"down\", \"up\", \"smote\", or \"rose\". Note that you will need to have the DMwR and ROSE packages installed to use SMOTE and ROSE, respectively. One complication is related to pre-processing. Should the subsampling occur before or after the pre-processing? For example, if you down-sample the data and using PCA for signal extraction, should the loadings be estimated from the entire training set? The estimate is potentially better since the entire training set is being used but the subsample may happen to capture a small potion of the PCA space. There isn\u2019t any obvious answer. The default behavior is to subsample the data prior to pre-processing. This can be easily changed and an example is given below. Now let\u2019s re-run our bagged tree models while sampling inside of cross-validation: ctrl <- trainControl(method = \"repeatedcv\", repeats = 5, classProbs = TRUE, summaryFunction = twoClassSummary, ## new option here: sampling = \"down\") set.seed(5627) down_inside <- train(Class ~ ., data = imbal_train, method = \"treebag\", nbagg = 50, metric = \"ROC\", trControl = ctrl) ## now just change that option ctrl$sampling <- \"up\"\n\nset.seed(5627)\nup_inside <- train(Class ~ ., data = imbal_train,\nmethod = \"treebag\",\nnbagg = 50,\nmetric = \"ROC\",\ntrControl = ctrl)\n\nctrl$sampling <- \"rose\" set.seed(5627) rose_inside <- train(Class ~ ., data = imbal_train, method = \"treebag\", nbagg = 50, metric = \"ROC\", trControl = ctrl) ctrl$sampling <- \"smote\"\n\nset.seed(5627)\nsmote_inside <- train(Class ~ ., data = imbal_train,\nmethod = \"treebag\",\nnbagg = 50,\nmetric = \"ROC\",\ntrControl = ctrl)\n\nHere are the resampling and test set results:\n\ninside_models <- list(original = orig_fit,\ndown = down_inside,\nup = up_inside,\nSMOTE = smote_inside,\nROSE = rose_inside)\n\ninside_resampling <- resamples(inside_models)\n\ninside_test <- lapply(inside_models, test_roc, data = imbal_test)\ninside_test <- lapply(inside_test, as.vector)\ninside_test <- do.call(\"rbind\", inside_test)\ncolnames(inside_test) <- c(\"lower\", \"ROC\", \"upper\")\ninside_test <- as.data.frame(inside_test)\n\nsummary(inside_resampling, metric = \"ROC\")\n##\n## Call:\n## summary.resamples(object = inside_resampling, metric = \"ROC\")\n##\n## Models: original, down, up, SMOTE, ROSE\n## Number of resamples: 50\n##\n## ROC\n## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's\n## original 0.8898125 0.9280562 0.9427854 0.9391471 0.9497858 0.9726760 0\n## down 0.9178149 0.9363213 0.9449264 0.9429522 0.9500614 0.9667861 0\n## up 0.9032493 0.9209617 0.9344671 0.9359775 0.9525208 0.9739639 0\n## SMOTE 0.9288622 0.9442195 0.9520164 0.9507115 0.9570647 0.9707938 0\n## ROSE 0.9340046 0.9480853 0.9534964 0.9536839 0.9609863 0.9696320 0\ninside_test\n## lower ROC upper\n## original 0.9091750 0.9216889 0.9342028\n## down 0.9307554 0.9376978 0.9446401\n## up 0.9352854 0.9431353 0.9509851\n## SMOTE 0.9457426 0.9515517 0.9573609\n## ROSE 0.9379662 0.9453675 0.9527689\n\nThe figure below shows the difference in the area under the ROC curve and the test set results for the approaches shown here. Repeating the subsampling procedures for every resample produces results that are more consistent with the test set.\n\n11.3 Complications\n\nThe user should be aware that there are a few things that can happening when subsampling that can cause issues in their code. As previously mentioned, when sampling occurs in relation to pre-processing is one such issue. Others are:\n\n\u2022 Sparsely represented categories in factor variables may turn into zero-variance predictors or may be completely sampled out of the model.\n\u2022 The underlying functions that do the sampling (e.g. SMOTE, downSample, etc) operate in very different ways and this can affect your results. For example, SMOTE and ROSE will convert your predictor input argument into a data frame (even if you start with a matrix).\n\u2022 Currently, sample weights are not supported with sub-sampling.\n\u2022 If you use tuneLength to specify the search grid, understand that the data that is used to determine the grid has not been sampled. In most cases, this will not matter but if the grid creation process is affected by the sample size, you may end up using a sub-optimal tuning grid.\n\u2022 For some models that require more samples than parameters, a reduction in the sample size may prevent you from being able to fit the model.\n\n11.4 Using Custom Subsampling Techniques\n\nUsers have the ability to create their own type of subsampling procedure. To do this, alternative syntax is used with the sampling argument of the trainControl. Previously, we used a simple string as the value of this argument. Another way to specify the argument is to use a list with three (named) elements:\n\n\u2022 The name value is a character string used when the train object is printed. It can be any string.\n\u2022 The func element is a function that does the subsampling. It should have arguments called x and y that will contain the predictors and outcome data, respectively. The function should return a list with elements of the same name.\n\u2022 The first element is a single logical value that indicates whether the subsampling should occur first relative to pre-process. A value of FALSE means that the subsampling function will receive the sampled versions of x and y.\n\nFor example, here is what the list version of the sampling argument looks like when simple down-sampling is used:\n\ndown_inside$control$sampling\n## $name ## [1] \"down\" ## ##$func\n## function (x, y)\n## downSample(x, y, list = TRUE)\n##\n## $first ## [1] TRUE As another example, suppose we want to use SMOTE but use 10 nearest neighbors instead of the default of 5. To do this, we can create a simple wrapper around the SMOTE function and call this instead: smotest <- list(name = \"SMOTE with more neighbors!\", func = function (x, y) { library(DMwR) dat <- if (is.data.frame(x)) x else as.data.frame(x) dat$.y <- y\ndat <- SMOTE(.y ~ ., data = dat, k = 10)\nlist(x = dat[, !grepl(\".y\", colnames(dat), fixed = TRUE)],\ny = dat\\$.y)\n},\nfirst = TRUE)\n\nThe control object would then be:\n\nctrl <- trainControl(method = \"repeatedcv\", repeats = 5,\nclassProbs = TRUE,\nsummaryFunction = twoClassSummary,\nsampling = smotest)","date":"2018-03-17 20:17:37","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 1, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 1, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.34211331605911255, \"perplexity\": 2779.8038504544074}, \"config\": {\"markdown_headings\": false, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2018-13\/segments\/1521257645310.34\/warc\/CC-MAIN-20180317194447-20180317214447-00358.warc.gz\"}"}
| null | null |
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <fenv.h>
#include "math.h"
#include "math_private.h"
/*
* Fused multiply-add: Compute x * y + z with a single rounding error.
*
* A double has more than twice as much precision than a float, so
* direct double-precision arithmetic suffices, except where double
* rounding occurs.
*/
float
fmaf(float x, float y, float z)
{
double xy, result;
uint32_t hr, lr;
xy = (double)x * y;
result = xy + z;
EXTRACT_WORDS(hr, lr, result);
/* Common case: The double precision result is fine. */
if ((lr & 0x1fffffff) != 0x10000000 || /* not a halfway case */
(hr & 0x7ff00000) == 0x7ff00000 || /* NaN */
result - xy == z || /* exact */
fegetround() != FE_TONEAREST) /* not round-to-nearest */
return (result);
/*
* If result is inexact, and exactly halfway between two float values,
* we need to adjust the low-order bit in the direction of the error.
*/
fesetround(FE_TOWARDZERO);
volatile double vxy = xy; /* XXX work around gcc CSE bug */
double adjusted_result = vxy + z;
fesetround(FE_TONEAREST);
if (result == adjusted_result)
SET_LOW_WORD(adjusted_result, lr + 1);
return (adjusted_result);
}
|
{
"redpajama_set_name": "RedPajamaGithub"
}
| 1,479
|
\section{Introduction}
This paper considers information-theoretic properties of the thinning map,
an operation on the space of discrete random variables, based on random summation.
\begin{definition}[R\'{e}nyi, \cite{R}]
For a discrete random variable $X$ on $\mathbf{Z}_+=\{0, 1, \ldots\}$, the thinning operation $T_\alpha$ is defined by
$$T_\alpha X=\sum_{i=1}^X B_i$$
where $B_i$ are (i) independent of each other and of $X$ and (ii) identically distributed Bernoulli$(\alpha)$ random variables, i.e., $\Pr(B_i=1)=1-\Pr(B_i=0)=\alpha$ for each
$i$.
\end{definition}
Equivalently, if the probability mass function (pmf) of $X$ is $f$, then the pmf of $T_\alpha X$ is
$$(T_\alpha f)_i\equiv \Pr(T_\alpha X=i)=\sum_{j\geq i} bi(i; j, \alpha) f_j,$$
where $bi(i; j, \alpha)=\binom{j}{i} \alpha^i(1-\alpha)^{j-i}$ is the binomial pmf.
(Note that we
write $T_\alpha$ for the map acting on the pmf as well as acting on
the random variable.)
We briefly mention other notation used in this paper.
We use ${\rm Po}(\lambda)$ to denote the Poisson distribution with mean $\lambda$, i.e., the pmf is $po(\lambda)=\{po(i; \lambda),\ i=0, 1, \ldots\},\ po(i;\lambda)=\lambda^i e^{-\lambda}/i!$. The entropy of a discrete random variable $X$ with pmf $f$ is defined as
$$H(X)=H(f)=\sum_i -f_i\log f_i,$$
and the relative entropy between $X$ (with pmf $f$) and $Y$ (with pmf $g$) is defined as
$$D(X||Y)=D(f||g)=\sum_i f_i\log (f_i/g_i).$$
For convenience we write $D(X)=D(X||po(\lambda))$
where $\lambda=EX$.
The thinning operation is intimately associated with the Poisson distribution and Poisson convergence theorems.
It plays a significant role in the derivation of a maximum entropy property for the Poisson distribution (Johnson \cite{J07}). Recently there has been evidence
that, in a number of problems related to information theory,
the operation $T_\alpha$ is the discrete counterpart
of the operation of scaling a random variable by $\sqrt{\alpha}$; see \cite{HJK, HJK2, J07, Y08}. Since scaling arguments can give simple proofs of results such as the Entropy Power Inequality, we believe that improved understanding
of the thinning operation could lead to discrete analogues of such results.
For example, thinning lies at the heart of
the following result (see \cite{HJK, HJK2, Y08}), which is a Poisson limit theorem with an information-theoretic interpretation.
\begin{theorem}[Law of Thin Numbers]
\label{thm1}
Let $f$ be a pmf on $\mathbf{Z}_+$ with mean $\lambda<\infty$. Denote by $f^{*n}$ the $n$th convolution of $f$, i.e., the pmf of $\sum_{i=1}^n X_i$ where $X_i$ are independent and identically distributed (i.i.d.) with pmf $f$. Then
\begin{enumerate}
\item
$T_{1/n}(f^{*n})$ converges point-wise to ${\rm Po}(\lambda)$ as $n\to\infty$;
\item
$H(T_{1/n} (f^{*n}))$ tends to $H(po(\lambda))$ as $n\to\infty$;
\item
as $n\to\infty$, $D(T_{1/n} (f^{*n}))$ monotonically decreases to zero, if it is ever finite;
\item
if $f$ is ultra-log-concave, then $H(T_{1/n} (f^{*n}))$ increases in $n$.
\end{enumerate}
\end{theorem}
For Part (4), we recall that a random variable $X$ on $\mathbf{Z}_+$ is called {\it ultra-log-concave}, or ULC, if its pmf $f$ is such that the sequence $i! f_i,\ i=0, 1, \ldots,$ is log-concave. Examples of ULC random variables include the binomial and the Poisson. In general, a sum of independent (but not necessarily identically distributed) Bernoulli random variables is ULC. Informally, a ULC random variable is less ``spread out'' than a Poisson with the same mean. Note that in Part (4) the ULC assumption is natural since, among ULC distributions with a fixed mean, the Poisson achieves maximum entropy (\cite{J07, Y08}).
Parts (2) and (3) of Theorem \ref{thm1} (see \cite{HJK, HJK2})
resemble the entropic central limit theorem of Barron \cite{B}, in that convergence in relative entropy, rather than the usual weak convergence, is established. The monotonicity statements in Parts (3) and (4), proved in \cite{Y08}, can be seen as the discrete analogue of the
monotonicity of entropy in the central limit theorem, conjectured by Shannon and proved
much later by Artstein et al. \cite{Art}.
In this work we further explore the behavior of entropy under thinning. Our main result is the following concavity property.
\begin{theorem}
\label{thm2}
If $X$ and $Y$ are independent random variables on $\mathbf{Z}_+$ with ultra-log-concave pmfs, then
\begin{equation}
\label{tineq}
H(T_\alpha X+T_\beta Y)\geq \alpha H(X)+\beta H(Y),\quad \alpha,\, \beta\geq 0,\ \alpha+\beta\leq 1.
\end{equation}
\end{theorem}
Theorem \ref{thm2} is interesting on two accounts. Firstly, it can be seen as an analogue of the inequality
\begin{equation}
\label{cont}
h(\sqrt{\alpha} X+\sqrt{1-\alpha} Y)\geq \alpha h(X)+(1-\alpha) h(Y)
\end{equation}
where $X$ and $Y$ are continuous random variables with finite variances and $h$ denotes the differential entropy. The difference between thinning by $\alpha$ in (\ref{tineq}) and scaling by $\sqrt{\alpha}$ in (\ref{cont}) is required to control different moments. In the discrete case, the law of small numbers \cite{HJK} and the corresponding maximum entropy property \cite{J07} both require control of the mean, which is achieved by this thinning factor. In the continuous case,
the central limit theorem \cite{B} requires control of the variance, which is achieved by this choice of scaling. It is well-known that (\ref{cont}) is a reformulation of Shannon's entropy power inequality (\cite{S, Bl}). Thus Theorem \ref{thm2} may be regarded as a first step towards a discrete entropy power inequality (see Section IV for further discussion).
Secondly, Theorem \ref{thm2} is closely related to an open problem of Shepp and Olkin \cite{SO} concerning Bernoulli sums. With a slight abuse of notation let $H(a_1, \ldots, a_n)$ denote the entropy of the sum $\sum_{i=1}^n X_i$, where $X_i$ is an independent Bernoulli random variable with parameter $a_i,\ i=1, \ldots, n$.
\begin{conjecture}[\cite{SO}]
\label{conj}
The function $H(a_1, \ldots, a_n)$ is concave in $(a_1, \ldots, a_n)$, i.e.,
\begin{eqnarray}
\label{shepp}
\lefteqn{H\left(\alpha a_1+ (1-\alpha) b_1, \ldots, \alpha a_n+ (1-\alpha) b_n \right)}
\nonumber \\
& \geq &
\alpha H(a_1, \ldots, a_n)+
(1-\alpha) H(b_1, \ldots, b_n)
\end{eqnarray}
for all $0 \leq \alpha \leq 1$ and $a_i, b_i\in [0,1]$.
\end{conjecture}
As noted by Shepp and Olkin \cite{SO}, $H(a_1, \ldots, a_n)$ is concave
in each $a_i$ and is concave
in the special case where $a_1 = \ldots = a_n$ and $b_1 = \ldots = b_n$. We provide further evidence supporting Conjecture \ref{conj}, by
proving another special case, which is a consequence of Theorem \ref{thm2} when applied to Bernoulli sums.
\begin{corollary}
\label{coro}
Relation (\ref{shepp}) holds if $a_ib_i=0$ for all $i$.
\end{corollary}
Conjecture \ref{conj} remains open. We are hopeful, however, that the techniques introduced here could help resolve this long-standing problem.
In Section II we collect some basic properties of thinning and ULC distributions, which are used in the proof of Theorem \ref{thm2} in Section III. Possible extensions are discussed in Section IV.
\section{Preliminary observations}
Basic properties of thinning include the semigroup relation (\cite{J07})
\begin{equation}
\label{semigroup}
T_\alpha (T_\beta f)=T_{\alpha\beta} f
\end{equation}
and the commuting relation ($*$ denotes convolution)
\begin{equation}
\label{commute}
T_\alpha (f*g)=(T_\alpha f)*(T_\alpha g).
\end{equation}
It is (\ref{commute}) that allows us to deduce Corollary \ref{coro} from Theorem \ref{thm2} easily.
Concerning the ULC property, three important observations (\cite{J07}) are
\begin{enumerate}
\item
a pmf $f$ is ULC if and only if the ratio $(i+1)f_{i+1}/f_i$ is a decreasing function of $i$;
\item
if $f$ is ULC, then so is $T_\alpha f$;
\item
if $f$ and $g$ are ULC, then so is their convolution $f*g$.
\end{enumerate}
A key tool for deriving Theorem \ref{thm2} and related results (\cite{J07, Y1}) is Chebyshev's rearrangement theorem, which states that the covariance of two increasing functions of the same random variable is non-negative. In other words, if $X$ is a scalar random variable, and $g$ and $\tilde{g}$ are increasing functions, then (assuming the expectations
are finite)
$$E[g(X)\tilde{g}(X)]\geq Eg(X) E\tilde{g}(X).$$
\section{Proof of Theorem \ref{thm2}}
The basic idea is to use the decomposition
$$H(X)=-D(X)-L(X)$$
where as before $D(X)=D(X||po(\lambda))$ with $\lambda=EX$, and $L(X)=E\log (po(X; \lambda))$.
The behavior of the relative entropy $D(X)$ under thinning is fairly well-understood. In particular, by differentiating $D(T_\alpha X)$ with respect to $\alpha$ and then using a data-processing argument, Yu \cite{Y08} shows that
\begin{equation}
\label{dthin}
D(T_\alpha X)\leq \alpha D(X).
\end{equation}
Further, for any independent $U$ and $V$, the data-processing inequality shows that $D(U+V) \leq D(U) + D(V).$
By taking $U = T_\alpha X$ and $V = T_{1-\alpha} Y$, one concludes that
\begin{align*}
D(T_\alpha X + T_{1-\alpha} Y) &\leq D(T_\alpha X) + D(T_{1-\alpha} Y) \\
&\leq \alpha D(X) + (1-\alpha) D(Y).
\end{align*}
Therefore we only need to prove the corresponding result for $L$, that is
\begin{equation}
\label{lineq}
L(T_\alpha X + T_{1-\alpha} Y) \leq \alpha L(X) + (1-\alpha) L(Y).
\end{equation}
Unfortunately, matters are more complicated because there is no
equivalent of the data-processing inequality, i.e., the inequality $L(U+V) \leq L(U) + L(V)$
does not always hold. (Consider for example $U$ and $V$ i.i.d.\ Bernoulli
with parameter $p\in (0,1)$. This inequality then reduces to $2 p \leq p^2$, which
clearly fails for all $p$.)
Nevertheless, it is possible to establish (\ref{lineq}) directly. We illustrate the strategy
with a related but simpler result, which involves the equivalent of Equation (\ref{dthin}) for $L$.
\begin{proposition}
\label{prop1}
For any pmf $f$ on $\mathbf{Z}_+$ with mean $\lambda<\infty$, we have $H(T_{\alpha} f)\geq \alpha H(f)$.
\end{proposition}
\begin{IEEEproof}
Let us assume that the support of $f$ is finite; the general case follows by a truncation argument (\cite{Y08}). In view of (\ref{dthin}), we only need to show $l(\alpha)\leq \alpha l(1)$, where
$$l(\alpha)= L(T_\alpha f) =
\sum_{i\geq 0} (T_\alpha f)_i \log \left(po(i; \alpha\lambda)\right).$$
By substituting $f(\alpha) = 0$ in
Equation (8) of \cite{J07}, we obtain that
$$\frac{{\rm d} (T_\alpha f)_i}{{\rm d} \alpha} = \frac{i (T_\alpha f)_i - (i+1) (T_\alpha f)_{i+1}}{\alpha},$$
and hence, using summation by parts,
\begin{align*}
l'(\alpha) &= \lambda \log(\alpha \lambda) -
\sum_{i\geq 0} \frac{{\rm d} (T_\alpha f)_i}{{\rm d} \alpha}
\log i! \\
&= \lambda \log(\alpha \lambda) - \frac{1}{\alpha} \sum_{i\geq 0} (i+1) (T_\alpha f)_{i+1}
\log \left( i+1 \right).
\end{align*}
In a similar way, using the inequality $\log(1+u) \leq u,\ u>-1$,
\begin{align*}
l''(\alpha) &=\frac{\lambda}{\alpha}- \frac{1}{\alpha^2} \sum_{i\geq 0} (T_\alpha f)_{i+2} (i+2)(i+1)
\log
\frac{i+2}{i+1}\\
&\geq \frac{\lambda}{\alpha}- \frac{1}{\alpha^2} \sum_{i\geq 0} (T_\alpha f)_{i+2} (i+2)(i+1)
\frac{1}{i+1}\\
&= \frac{\lambda}{\alpha}- \frac{1}{\alpha^2} \sum_{i \geq 0} (T_\alpha f)_{i+2} (i+2)
\geq 0.
\end{align*}
The last inequality holds since $\sum_{s=0}^\infty s (T_\alpha f)_s=\lambda \alpha$.
Having established the convexity of $l(\alpha)$, we can now deduce the full Proposition
using (\ref{dthin}).
\end{IEEEproof}
Before proving Theorem \ref{thm2}, we note that although (\ref{tineq}) is stated for $\alpha+\beta\leq 1$, only the case $\alpha+\beta=1$ need to be considered. Indeed, if (\ref{tineq}) holds for $\alpha+\beta=1$, then for general $\alpha,\ \beta\geq 0$ such that $\alpha+\beta=\gamma\leq 1$, we have
\begin{align}
\nonumber
H(T_{\alpha} X+T_{\beta} Y) &=H(T_\gamma (T_{\alpha/\gamma} X+T_{\beta/\gamma} Y))\\
\label{ineq:prop1}
&\geq \gamma H(T_{\alpha/\gamma} X+T_{\beta/\gamma} Y)\\
\nonumber
&\geq \alpha H(X)+ \beta H(Y),
\end{align}
where (\ref{semigroup}) and (\ref{commute}) are used in the equality, and Proposition \ref{prop1} is used in (\ref{ineq:prop1}).
\begin{IEEEproof}[Proof of Theorem \ref{thm2}]
Assume $\beta=1-\alpha$, and let $f$ and $g$ denote the pmfs of $X$ and $Y$ respectively. Assume $\lambda=EX>0$ and $\mu=EY>0$ to avoid the trivial case. As noted before, we only need to show that
$$l(\alpha)=\sum_{i\geq 0} (T_\alpha f*T_\beta g)_i\log po(i; \alpha\lambda+\beta\mu)$$
is convex in $\alpha$ (where $\beta=1-\alpha$). The calculations are similar to (but more involved than) those for Proposition \ref{prop1}, and we omit the details. The key is to express $l''(\alpha)$ in the following form suitable for applying Chebyshev's rearrangement theorem.
\begin{align*}
l''(\alpha)
=& \frac{(\lambda-\mu)^2}{\alpha\lambda+\beta\mu}+A+B
\end{align*}
where
$$A = \sum_{i\geq 1, j\geq 0} (T_\alpha f)_i (T_\beta g)_j i a(i,j),$$
$$B = \sum_{i\geq 0, j\geq 1} (T_\alpha f)_i (T_\beta g)_j j b(i,j),$$
and
\begin{align*}
a(i,j) &=
\left( \frac{i+j-1}{\alpha^2} - \frac{\beta \mu j}{(\alpha \lambda + \beta \mu) \alpha^2\beta^2} \right) \log\frac{i+j-1}{i+j}, \\
b(i,j) &= \left(
\frac{i+j-1}{\beta^2} - \frac{\alpha \lambda i}{(\alpha \lambda + \beta \mu)\alpha^2\beta^2} \right)
\log\frac{i+j-1}{i+j}. \end{align*}
Ultra-log-concavity and dominated convergence permit differentiating term-by-term.
For each fixed $j$, since $(i+j-1)\log((i+j-1)/(i+j))$ decreases in $i$
and $\log((i+j-1)/(i+j))$ increases in $i$, we know that $a(i,j)$ decreases in $i$.
Since $T_\alpha f$ is ULC, the ratio $i
(T_\alpha f)_{i}/(T_\alpha f)_{i-1}$ is decreasing in $i$.
Hence we may apply Chebyshev's rearrangement theorem to the sum over $i$ and obtain
\begin{align}
\nonumber
A & =
\sum_{i\geq 1, j\geq 0} (T_\alpha f)_{i-1} (T_\beta g)_j \left( \frac{i
(T_\alpha f)_{i}}{(T_\alpha f)_{i-1}} \right) a(i,j) \\
& \geq \alpha \lambda \sum_{i\geq 1, j\geq 0} (T_\alpha f)_{i-1} (T_\beta g)_j a(i,j)
\nonumber \\
& = \alpha \lambda \sum_{i, j\geq 0} (T_\alpha f)_{i} (T_\beta g)_j a(i+1,j).
\label{ineq1}
\end{align}
Similarly, considering the sum over $j$, since $b(i,j)$ is decreasing in $j$ for
any fixed $i$,
\begin{align}
\label{ineq2}
B &\geq
\beta \mu \sum_{i, j\geq 0} (T_\alpha f)_{i} (T_\beta g)_j b(i,j+1).
\end{align}
Adding up (\ref{ineq1}) and (\ref{ineq2}), and noting that
$$ \alpha \lambda a(i+1,j) + \beta \mu b(i,j+1)
= \frac{(\lambda-\mu)^2}{\alpha\lambda+\beta\mu} (i+j)\log\frac{i+j}{i+j+1},
$$
we get
\begin{align*}
l''(\alpha)\geq &\frac{(\lambda-\mu)^2}{\alpha\lambda+\beta\mu} \\
& + \sum_{i, j\geq 0} (T_\alpha f)_i (T_\beta g)_j \frac{(\lambda-\mu)^2}{\alpha\lambda+\beta\mu} (i+j)\log\frac{i+j}{i+j+1},
\end{align*}
which is nonnegative, in view of the inequality $u\log(u/(u+1))\geq -1,\ u\geq 0$.
\end{IEEEproof}
\section{Towards a discrete Entropy Power Inequality}
In the continuous case, (\ref{cont}) is quickly shown (see \cite{D})
to be equivalent to Shannon's entropy power inequality
\begin{equation}
\label{entpower}
\exp(2h(X+Y)) \geq \exp(2h(X)) + \exp(2h(Y)),
\end{equation}
valid for independent $X$ and $Y$ with finite variances, with equality if and only
if $X$ and $Y$ are normal. We aim to formulate a discrete analogue of (\ref{entpower}),
with the Poisson distribution playing the same role as the normal since it has
the corresponding infinite divisibility and maximum entropy properties.
Observe that the function $\exp(2t)$ appearing in (\ref{entpower})
is (proportional to) the inverse of the
entropy of the normal with variance $t$. That is, if we write $e(t) = h(N(0,t))
= \log(\sqrt{2 \pi t})$
then the entropy power
$v(X) = e^{-1}(h(X)) = \exp(2h(X))/(2 \pi)$, so Equation (\ref{entpower})
can be written as
$$v(X +Y) \geq v(X) + v(Y).$$
Although there does not exist a corresponding closed form expression for the entropy
of a Poisson random variable, we can
denote ${\cal E}(t)=H(po(t))$. Then ${\cal E}(t)$ is increasing and concave. (The proof of Proposition \ref{prop1}, when specialized to the Poisson case, implies this concavity.) Define $$V(X)={\cal E}^{-1}(H(X)).$$
That is, $H(po(V(X)))=H(X)$. It is tempting to conjecture that the natural discrete analogue of Equation (\ref{entpower}) is
$$ V(X+Y) \geq V(X) + V(Y),$$
for independent discrete random variables $X$ and $Y$,
with equality if and only if $X$ and $Y$ are Poisson.
However, this is not true. A counterexample, provided
by an anonymous referee, is the case where $X$ and $Y$
both have the pmf
$p(0) = 1/6$, $p(1) = 2/3$, $p(2) = 1/6.$
Since this pmf even lies within the ULC
class, the conjecture still fails when restricted to this class.
We believe that the discrete counterpart of the entropy power inequality
should involve the thinning operation described above. If so, the
natural conjecture is the following, which we refer to as the thinned
entropy power inequality.
\begin{conjecture}
If $X$ and $Y$ are independent random variables with ULC pmfs on $\mathbf{Z}_+$, then ($0<\alpha<1$)
\begin{equation}
\label{conj2}
V(T_\alpha X+T_{1-\alpha} Y)\geq \alpha V(X)+(1-\alpha) V(Y).
\end{equation}
\end{conjecture}
In a similar way to the continuous case, (\ref{conj2}) easily yields the concavity
of entropy, Equation (\ref{tineq}), as a corollary. Indeed, by (\ref{conj2}) and the concavity of ${\cal E}(t)$, we have
\begin{align*}
H(T_\alpha X+T_{1-\alpha} Y) &\geq {\cal E}(\alpha V(X)+(1-\alpha) V(Y))\\
&\geq \alpha {\cal E} (V(X)) +(1-\alpha) {\cal E} (V(Y))\\
&=\alpha H(X)+(1-\alpha) H(Y)
\end{align*}
and (\ref{tineq}) follows.
Unlike the continuous case, (\ref{tineq}) does not easily yield (\ref{conj2}). The
key issue is the question of scaling. That is, in the continuous case, the
entropy power $v(X)$ satisfies $v( \sqrt{\alpha} X) = \alpha v(X)$ for all $\alpha$
and $X$. It is this result that allows Dembo et al. \cite{D} to deduce
(\ref{entpower}) from (\ref{cont}).
Such an identity does not hold for thinned random variables. However, we conjecture
that \begin{equation} \label{rtepi}
V(T_\alpha X) \geq \alpha V(X) \end{equation} for all $\alpha$ and ULC $X$.
Note that this Equation (\ref{rtepi}), which we refer to as the restricted thinned
entropy power inequality (RTEPI), is simply the case $Y = 0$ of the full thinned entropy
power inequality (\ref{conj2}). If (\ref{rtepi}) holds, we can use the argument
provided by \cite{D} to deduce the following result, which is in some sense close
to the full thinned entropy power inequality, although $\beta + \gamma < 1$ in general.
\begin{proposition}
\label{prop2}
Consider independent ULC random variables $X$ and $Y$.
For any $\beta,\ \gamma\in (0,1)$ such that
$$ \frac{\beta}{1-\gamma} \leq \frac{V(Y)}{V(X)} \leq
\frac{1-\beta}{\gamma},$$
if the RTEPI (\ref{rtepi}) holds then
$$ V(T_\beta X + T_{\gamma} Y) \geq \beta V(X) + \gamma
V(Y).$$
\end{proposition}
\begin{IEEEproof} Note that an equivalent formulation of the RTEPI
(\ref{rtepi})
is that if $X'$ is Poisson with $H(X) = H(X')$ then for any
$\alpha \in (0,1)$, $H(T_\alpha X) \geq H(T_\alpha X').$
Given $X$ and $Y$ we define $X'$ and $Y'$ to be Poisson with
$H(X) = H(X')$ and $H(X) = H(Y')$.
Given $\beta$ and $\gamma$, we pick $\alpha$ such that
$\beta \leq \alpha$ and $\gamma \leq 1-\alpha$ so that:
\begin{eqnarray}
\lefteqn{
H(T_\beta X + T_{\gamma} Y) } \nonumber \\ & = &
H(T_\alpha (T_{\beta/\alpha} X) + T_{1-\alpha} (T_{\gamma/(1-\alpha)} Y)) \nonumber \\
& \geq & \alpha H(T_{\beta/\alpha} X) + (1-\alpha) H (T_{\gamma/(1-\alpha)} Y) \label{eq:pci} \\
& \geq & \alpha H(T_{\beta/\alpha} X') + (1-\alpha) H (T_{\gamma/(1-\alpha)} Y') \label{eq:rtepi} \\
& = & \alpha {\mathcal{E}}( \beta V(X)/\alpha) + (1-\alpha) {\mathcal{E}}( \gamma V(Y)/
(1-\alpha)) \nonumber
\end{eqnarray}
where Equation (\ref{eq:pci}) follows by Theorem \ref{thm2}
and Equation (\ref{eq:rtepi}) follows by the reformulated RTEPI.
Now making the (optimal) choice
$$\alpha = \beta V(X)/(\beta V(X) + \gamma V(Y))$$
this inequality becomes
$$H(T_\beta X + T_{\gamma} Y) \geq {\mathcal{E}}( \beta V(X) + \gamma V(Y)).$$
The result follows by applying ${\mathcal{E}}^{-1}$ to both sides. Note that the restrictions on $\beta$ and $\gamma$ are required to ensure $\beta \leq \alpha$ and $\gamma \leq 1-\alpha$.
\end{IEEEproof}
Again assuming (\ref{rtepi}), Proposition \ref{prop2} yields the following special case of (\ref{conj2}). The reason
this argument works is that, as in \cite{D}, if $X$ is Poisson then (\ref{rtepi}) holds with equality for all $\alpha$.
\begin{corollary}
If RTEPI (\ref{rtepi}) holds then (\ref{conj2}) holds in the special case where $X$ is ULC and
$Y$ is Poisson with mean $\mu$ such that $\mu\leq V(X)$.
\end{corollary}
\begin{IEEEproof}
For $\gamma\in (0,1)$ let $Z$ be Poisson with mean $\mu(1-\alpha)/\gamma$. Then
$V(Z)=\mu(1-\alpha)/\gamma$. The condition $\mu\leq V(X)$ ensures that we can choose
$\gamma$ small enough such that
$$\frac{\alpha}{1-\gamma}\leq \frac{V(Z)}{V(X)}\leq \frac{1-\alpha}{\gamma}.$$
By Proposition \ref{prop2},
$$V(T_\alpha X+T_\gamma Z)\geq \alpha V(X)+\gamma V(Z).$$
The claim follows by noting that $T_\gamma Z$ has the same Poisson distribution as $T_{1-\alpha} Y$.
\end{IEEEproof}
We hope to report progress on (\ref{conj2}) in future work. Given the fundamental importance of (\ref{entpower}), it would also be interesting to see potential applications of (\ref{conj2}) (if true) and (\ref{tineq}).
For example, Oohama \cite{O} used the entropy power inequality (\ref{entpower}) to solve
the multi-terminal source coding problem. This showed the rate at which information could be
transmitted from $L$ sources, producing correlated Gaussian signals but unable to collaborate or
communicate with each other, under the addition of Gaussian noise.
It would be of interest to know whether (\ref{conj2}) could lead to a corresponding
result for discrete channels.
{\bf Note}: Since the submission of this paper to ISIT09, we have found a proof of the restricted thinned
entropy power inequality, i.e., Equation (\ref{rtepi}). The proof, based on \cite{J07}, is somewhat technical
and will be presented in a future work.
|
{
"redpajama_set_name": "RedPajamaArXiv"
}
| 4,428
|
\section{Instantons}
Non-abelian gauge theories like QCD are known to exhibit a rich vacuum
structure. The latter includes {\it topologically} non-trivial
fluctuations of the gauge fields, carrying an integer topological
charge $Q$. The simplest building blocks of topological structure
are instantons ($Q=+1$) and anti-instantons ($Q=-1$) which are well-known
explicit solutions of the euclidean field equations in four
dimensions~\cite{bpst}.
Instantons ($I$) are widely believed to play an important r{\^o}le in various
{\it long-distance} aspects~\cite{ssh} of QCD:
First of all, they may provide a solution of the famous $U_A(1)$
problem~\cite{th} ($m_{\eta^\prime}\gg m_{\eta}$), with the corresponding
pseudoscalar mass splitting related to the topological susceptibility
in the pure gauge theory by the well-known Witten-Veneziano formula~\cite{wv}.
Moreover, a number of authors have attributed a strong
connection of instantons with chiral symmetry breaking~\cite{dia,ssh}
as well as the hadron and glueball spectrum.
However, there are also very important {\it short-distance}
implications~\cite{bb,rs,mrs1,rs-pl,mrs2} of QCD instantons to which the
present report is devoted:
Instantons are known to induce certain processes
which violate {\it chirality} in accord with the general
axial-anomaly relation~\cite{th} and which are forbidden in conventional
perturbation theory. Of particular interest in this context is the
{\it deep inelastic scattering} (DIS) regime. Here,
hard in\-stan\-ton-induced processes may both be {\it
calculated}~\cite{mrs1,rs-pl,mrs2} within {\it instanton-per\-tur\-ba\-tion
theory} and possibly be {\it detected
experimentally}~\cite{rs,grs,rs2,dis97-phen}.
As a key feature it has recently been shown~\cite{mrs1}, that in
deep-inelastic scattering (DIS) the
generic hard scale ${\cal Q}$ cuts off instantons with {\it large size}
$\rho\gg {\cal Q}^{-1}$, over which one has no control theoretically.
Our finalized results~\cite{rs-pl,mrs2} for inclusive instanton-induced DIS
cross-sections are summarized in sections~2 and 4. Their weak residual
renormalization-scale dependence is quite remarkable.
As a second main point of this review (section~3), constraints from
recent lattice simulations will be exploited~\cite{rs-pl,rs-pub}
and translated into a ``fiducial'' kinematical region
for our predictions of the instanton-induced DIS cross-section based
on instanton-perturbation theory. In section~5 we discuss
the expected event signature and search strategies based on our Monte
Carlo generator~\cite{grs} QCDINS 1.60. Finally (section~6), we briefly address
an interesting class of ``fireball'' events, observed in photoproduction,
in the context of instantons and put forward a promising
proposal~\cite{rs-pub} on extending our theoretical predictions beyond
the regime of strict instanton perturbation theory.
\section{DIS cross-sections in instanton-perturbation theory}
In $I$-perturbation theory one expands the relevant Green's functions
about the known, classical instanton solution
$A_\mu=A^{(I)}_\mu+\ldots$ instead of
the usual (trivial) field configuration $A^{(0)}_\mu=0$ and obtains a
corresponding set of modified Feynman rules. Like in conventional
pQCD, the gauge coupling $\alpha_s$ has to be small.
The leading instanton-induced process in the DIS regime of $e^\pm
P$ scattering for large photon virtuality $Q^2$ is illustrated in
figure~\ref{ev-displ}. The dashed box emphasizes the so-called
\begin{figure}[ht]
\begin{center}
\epsfig{file=./drawings/dis-inst-bw,width=12cm}
\caption[dum]{\label{ev-displ}
The leading instanton-induced process in the DIS regime of $e^\pm$\,P
scattering ($n_f=3$).}
\end{center}
\end{figure}
instanton-{\it subprocess} with its own Bjorken variables,
\begin{equation}
Q^{\prime\,2}= -q^{\prime\,2}\ge 0;\hspace{2ex}
{x^\prime}=\frac{Q^{\prime\,2}}{2 p\cdot q^\prime}\le 1.
\end{equation}
It induces a total chirality violation $\Delta\,{\rm chirality} = 2\,n_f$, in
accord with the corresponding axial anomaly~\cite{th}.
In the Bjorken limit of $I$-perturbation theory,
the dominant $I$-induced contribution to the inclusive HERA cross-section
may be shown to take the form~\cite{rs-pl,mrs2}
\begin{equation}
\frac{{\rm d}\sigma_{\rm HERA}^{({I})}}{{\rm d}{x^\prime} {\rm
d}Q^{\prime\,2}}\simeq \frac{{\rm d}{\cal L}_{q\,g}^{({
I})}}{{\rm d}{x^\prime} {\rm d}Q^{\prime\,2}}\cdot
\sigma_{q\,g}^{({I})}(Q^\prime,{x^\prime}).
\label{ePcross}
\end{equation}
The differential luminosity, ${\rm d}{\cal L}_{q\,g}^{(I)}$, accounting
for the number of $q\,g$ collisions per $eP$
collision, has a convolution-like structure. It involves integrations
over the gluon density, the $\gamma$-flux ${\rm
P}_{\gamma}$ and the known $q$-flux ${\rm P}_{q}^{(I)}$
in the $I$-background (c.\,f. figure~\ref{ev-displ}). The crucial
instanton-dynamics resides in the $I$-subprocess total cross-section
$\sigma_{q\,g}^{(I)}(Q^\prime,{x^\prime})$, on which we focus our
attention next~\cite{rs-pl,mrs2}.
Being an observable, $\sigma_{q\,g}^{(I)}(Q^\prime,{x^\prime})$
involves integrations over all $I (\overline{I})$-``collective
coordinates'', including the $I\ (\overline{I})$-sizes
$\rho\ (\overline{\rho})$ and the $\iai$-distance\footnote{Both an
instanton and an anti-instanton enter here,
since cross sections result from taking the {\it modulus squared} of an
amplitude in the single $I$ background.} 4-vector $R_\mu$,
\begin{equation}
\sigma_{q\,g}^{(I)}=
\int\limits_0^\infty d\rho\, D(\rho)
\int\limits_0^\infty d\overline{\rho}\, D(\overline{\rho})
\int d^4 R\, \{\ldots\}
{\rm e}^{-Q^\prime(\rho+\overline{\rho})}\,
{\rm e}^{\ii\, (p+q^\prime)\cdot R}
{\rm e}^{{-\frac{4\pi}{\alpha_s}}\,
\Omega\left(\frac{R^2}{\rho\overline{\rho}},
\frac{\overline{\rho}}{\rho} \right)}.
\label{cs}
\end{equation}
The $\rho (\overline{\rho})$-integrals in (\ref{cs}) involve as generic weight
the $I(\overline{I})$-density
$D(\rho(\overline{\rho}))$~\cite{th,ber,morretal},
\begin{eqnarray}
D({\rho})&=&
\frac{d}{\rho^5} \left(\frac{2\pi}{\alpha_s(\mu_r)}\right)^{2\,N_c}
\exp{\left(-\frac{2\pi}{\alpha_s(\mu_r)}\right)}(\rho\, \mu_r)^{\beta_0+
\frac{\alpha_s(\mu_r)}{4\pi}(\beta_1-4\,N_c\beta_0)}\label{dens}\\
d&=&\frac{2\,{\rm e}^{5/6}}{\pi^2\,(N_c-1)!(N_c-2)!}\,{\rm
e}^{-1.51137\,N_c+0.29175\,n_f}
\ \ (\mbox{$\overline{\rm MS}$ scheme});\nonumber\\
\beta_0&=&\frac{11}{3}N_c-\frac{2}{3}n_f;\ \beta_1=
\frac{34}{3}N_c^2-\left(\frac{13}{3}N_c-\frac{1}{N_c}\right)\,n_f,\nonumber
\end{eqnarray}
with renormalization scale $\mu_r$ and $N_c=3$.
The function $\Omega(R^2/(\rho\overline{\rho}),\ldots)$ in equation
(\ref{cs}), appearing in the exponent with a large numerical
coefficient $4\pi/\alpha_s$, incorporates the effects of final-state
gluons. Within strict $I$-perturbation theory, it is given in form
of a perturbative expansion~\cite{holypert}, while in the so-called
$\iai$-valley approximation~\cite{yung,valley-most-attr-orient}
$\Omega$ is associated with an analytically known
closed expression~\cite{valley-most-attr-orient,valley-gen-orient} for
the interaction between $I$ and $\bar{I}$,
$\Omega\simeq \alpha_s/(4\pi)S[A^{\iai}_\mu]-1$.
With both methods agreeing for larger values of
$R^2/(\rho\overline{\rho})$, we have actually used the valley method
in our quantitative evaluation.
Due to the nonvanishing virtuality $Q^{\prime\,2}$ in
DIS, the ``form factor'' $\exp{[-Q^\prime(\rho+\overline{\rho})]}$ in
(\ref{cs}), being associated with the off-shell quark (zero mode) $q$,
suppresses large-size instantons~\cite{mrs1,rs-pl,mrs2}. Hence, the
integrals in (\ref{cs}) are {\it finite}.
In fact, they are dominated by a unique {\it saddle-point}~\cite{rs-pl,mrs2},
\begin{equation}
\rho^\ast = \overline{\rho}^\ast\sim 1/Q^\prime;\hspace{0.5cm}
R^{\ast 2}\sim 1/(p+q^\prime)^2\ \Rightarrow \
\frac{R^\ast}{\rho^\ast}\sim \sqrt{\frac{{x^\prime}}{1-{x^\prime}}},
\label{saddle}
\end{equation}
from which it becomes apparent that the virtuality $Q^\prime$ controls the
effective $I$-size, while ${x^\prime}$ determines the effective
$\iai$-distance (in units of the size $\rho$).
In figure~\ref{renorm}, the resulting
$I$-subprocess cross-sections~(\ref{cs}) is displayed~\cite{rs-pl} over a {\it
large} range of $\mu_r/Q^\prime$ for fixed ${x^\prime}=0.5$ and
$Q^\prime/\Lambda=30,50,70$.
\begin{figure}[b]
\begin{center}
\epsfig{file=./plots/q2sigkap,angle=270,width=14cm}
\caption[dum]{\label{renorm}
Illustration of the weak residual renormalization-scale ($\mu_r$)
dependence of the resulting $I$-subprocess cross-section
$\sigma_{q\,g}^{(I)}(Q^\prime,{x^\prime})$.}
\end{center}
\end{figure}
Apparently, we have achieved great progress
in stability and hence predictivity by using the improved
expression~(\ref{dens})
of the $I$-density $D(\rho)$, which is renormalization-group (RG) invariant
at the {\it 2-loop } level, i.e. $D^{-1}\,{\rm d}D/{\rm
d}\ln(\mu_r)=\mathcal{O}(\alpha_s^2)$. The residual dependence on the
renormalization scale $\mu_r$ is remarkably flat and turns out to be
strongly reduced as compared to the 1-loop case! Throughout, we
choose as the ``best scale'', $\mu_r = 0.15\ Q^\prime$, for which
$\partial \sigma^{(I)}_{q\,g}/\partial \mu_r \simeq 0$
(c.\,f. figure~\ref{renorm}). This choice agrees well with the
intuitive expectation~\cite{mrs1,bb} $\mu_r \sim 1/\langle \rho
\rangle \sim Q^\prime/\beta_0 ={\cal O}(0.1)\, Q^\prime$.
\begin{figure}[b]
\begin{center}
\parbox{5.3cm}{\epsfig{file=./plots/I-noise,width=5.3cm}}
\parbox{5.725cm}{\epsfig{file=./plots/I-lagrange,width=5.725cm}}
\parbox{5.725cm}{\epsfig{file=./plots/I-topol-charge,width=5.725cm}}
\put(-150,70){\small\bf Topological Charge Density}
\put(-370,70){\small\bf Lagrange Density}
\caption[dum]{\label{lattice-intro}Instanton content of a typical
slice of a gluon configuration at fixed x,y as a function of z and
t~\cite{chu}. (a) Lagrange
density before ``cooling'', with fluctuations of {\it short} wavelength ${\cal
O}(a)$ dominating. After ``cooling'' by 25 steps, 3 $I$'s and 2
$\overline{I}$'s may be clearly identified in the lagrange density (b)
and the topological charge density (c).}
\end{center}
\end{figure}
\section{``Fiducial'' region from lattice simulations}
There has been much recent activity in the lattice
community to ``measure'' topological fluctuations in
lattice simulations~\cite{lattice} of QCD. Being
independent of perturbation theory, such simulations provide
``snapshots'' of the QCD vacuum including all possible
non-perturbative features like instantons (figure~\ref{lattice-intro}).
Let us discuss next, how these lattice results may be exploited to
provide crucial support for the theoretical basis of our calculations
in DIS:
To this end, we first perform a {\it quantitative}
confrontation~\cite{rs-pl,rs-pub} of the
predictions from $I$-perturbation theory with a recent high-quality lattice
simulation~\cite{ukqcd} of QCD (without fermions, $n_f=0$). The
striking agreement which we shall find over a range of $I$-collective
coordinates is a very interesting result by itself.
Next, we recall (c.\,f. (\ref{cs}) and (\ref{saddle})) that the
collective coordinate integrals in our DIS cross-section
$\sigma_{q\,g}^{(I)}(Q^\prime,{x^\prime})$ are dominated by a
unique, calculable saddle-point ($\rho^\ast,R^\ast/\rho^\ast$), in one-to-one
correspondence to the conjugate momentum variables ($Q^\prime ,{x^\prime}$).
This fact then allows us to {\it translate} the extracted range of validity
of $I$-perturbation theory and the dilute $I$-gas approximation,
($\rho\leq \rho_{\rm max}, R/\rho\geq (R/\rho)_{\rm min}$),
directly into a ``fiducial'' kinematical region
($Q^\prime\geq Q^\prime_{\rm min},{x^\prime}\geq x^\prime_{\rm min}$) in
momentum space!
In lattice simulations 4d-Euclidean space-time is made discrete;
specifically, the recent ``data''
from the UKQCD
collaboration~\cite{ukqcd}, which we shall use here, involve a lattice
spacing $a = 0.055 - 0.1$ fm and a volume $V=l_{\rm space}^{\,3}\cdot
l_{\rm time}=[16^3\cdot 48 - 32^3\cdot 64]\,a^4$.
In principle, such a lattice allows to study the properties of an
ensemble of $I$'s and $\overline{I}$'s with sizes $a < \rho < V^{1/4}$.
However, in order to make instanton effects visible, a certain ``cooling''
procedure has to be applied first. It is designed to
filter out (dominating) fluctuations of {\it short} wavelength ${\cal
O}(a)$ (c.\,f. figure~\ref{lattice-intro}~(a)), while affecting the
topological fluctuations of much longer wavelength $\rho \gg a$
comparatively little. After ``cooling'', $I$'s and $\overline{I}$'s
can clearly be seen (and studied) as bumps in the
lagrange density and the topological charge density
(figure~\ref{lattice-intro}~(b), (c)). For a more detailed
discussion of lattice-specific caveats, like possible lattice
artefacts and the dependence of results on ``cooling'' etc., see
Refs.~\cite{lattice,ukqcd}.
Of course, one has to extrapolate the lattice observables to the
continuum ($a\Rightarrow 0$), before a meaningful comparison with
$I$-perturbation theory can be made. This is complicated by
a strong dependence of the various distributions on the number $n_{\rm cools}$
of cooling sweeps for {\it fixed} $\beta=6/g^2_{\rm lat}$. In
ref.~\cite{ukqcd}, however, {\it equivalent} pairs ($\beta,n_{\rm
cools}$) were found, for which {\it shape} and {\it
normalization} of the distributions essentially remain {\it invariant}. For
instance, the continuum extrapolation of the data for the
($I+\overline{I}$)-density $D_{I+\overline{I}}$ at $(\beta,n_{\rm
cools})= (6.0,23),\ (6.2,46),\ (6.4,80)$,
may thus be performed quite reliably~\cite{rs-pub}, by simply
rescaling the arguments
$\rho \Rightarrow\overline{\rho(0)}/\overline{\rho(a)}\cdot
\rho$. Here, $\overline{\rho(0)}$ denotes the continuum limit of the
{\it weakly varying} average $\rho$ values, $\overline{\rho(a)}$, of
$D_{I+\overline{I}}(\rho,a)$. A {\it linear}
extrapolation in $(a/r_0)^2$ was employed. For consistency and minimization of
uncertainties, one should
use only a single dimensionful quantity to relate lattice units and
physical units.
Throughout our analysis, all dimensions are therefore
expressed by the so-called Sommer scale~\cite{sommer,alpha} $r_0$, with
$2\,r_0\simeq 1$ fm, which we prefer over the
string tension~\cite{ukqcd}.
The resulting ``continuum data'' for
$D_{I+\overline{I}}(\rho)$ are displayed in figure~\ref{lattice}. They
scale nicely.
\begin{figure} [b]
\begin{center}
\parbox{6.25cm}{\vspace{-0.3cm}\epsfig{file=./plots/d-rho_2r0,width=6.25cm}}
\parbox{10.65cm}{\vspace{-0.3cm}\epsfig{file=./plots/d-rho-pert_2r0,%
angle=-90,width=10.65cm}}
\end{center}
\caption[dum]{\label{lattice}
Continuum limit~\cite{rs-pub} of ``equivalent'' UKQCD
data~\cite{ukqcd} for the
($I+\overline{I}$)-density at $(\beta,n_{\rm
cools})=(6.0,23)\,[\Box ],\ (6.2,46)\,[\circ ],\
(6.4,80)\,[\triangle ]$. The striking agreement with $2\,D(\rho)$
of $I$-perturbation theory from (\ref{dens}) is
apparent~\cite{rs-pub}. The 3-loop form of
$\alpha_s$ with $\Lambda_{\overline{\rm MS}\,n_f=0}$ from
ALPHA~\cite{alpha} was used.
(a) For $\mu_r=1.2/\rho$, the agreement extends up to the peak;
(b) Log-log plot to exhibit the expected power law $\sim \rho^6$
and the agreement in magnitude for small $\rho$ over a wide
range of $\mu_r$. The dashed error band results from varying
$\Lambda_{\overline{\rm MS}\,n_f=0}$ and $\mu_r$ within its error and
given range, respectively.}
\end{figure}
We are now ready to perform a quantitative comparison with the predictions of
$I$-perturbation theory~\cite{rs-pub}. For reasons of space, let us
concentrate here on the ($I+\overline{I}$)-density
$D_{I+\overline{I}}(\rho)$. The prediction
(\ref{dens}) of $I$-perturbation theory is a power law
for {\it small} $\rho$, i.\,e. approximately $D \sim \rho^6$ for $n_f=0$. Due
to its 2-loop RG-invariance the normalization of
$D_{I+\overline{I}}(\rho)$ is practically
independent of the renormalization scale $\mu_r$ over a wide range.
It is strongly and exclusively dependent on
$r_0\,\Lambda_{\overline{\rm MS}\,n_f=0}$, for which we take the most recent,
accurate result by the ALPHA-collaboration~\cite{alpha},
$ 2\,r_0\,\Lambda_{\overline{\rm MS}\,n_f=0}=(238\pm 19)$ MeV\,fm.
In figure~\ref{lattice}~(b) we display both this parameter-free
prediction from (\ref{dens}) of $I$-perturbation theory and the continuum
limit of the UKQCD data in a log-log
plot, to clearly exhibit the expected power law in $\rho$. The
agreement in shape {\it and} normalization for $\rho\mbox{\,\raisebox{.3ex
0.3\,(2\,r_0)\simeq 0.3$ fm is striking, indeed,
notably in view of the often criticized ``cooling'' procedure and the
strong sensitivity to $\Lambda_{\overline{\rm MS}\,n_f=0}$.
By a similar analysis~\cite{rs-pub}, we were able to infer from the
``equivalent'' UKQCD lattice data a range of validity $R/\rho \mbox{\,\raisebox{.3ex
1$ of the valley expression for the $\iai$-interaction
$\Omega(R^2/(\rho\overline{\rho}),\ldots)$ in
(\ref{cs}). Finally, we have confirmed~\cite{ukqcd,rs-pub} the
approximate validity of the
dilute-gas picture for sufficiently {\it small}
instantons\footnote[2]{Note that the full ($I+\overline{I}$)-ensemble
without the size restriction is known {\it not} to be a dilute
gas~\cite{ukqcd,lattice}.} with $\rho
\mbox{\,\raisebox{.3ex (0.3 - 0.5)$ fm. The latter results are based on the ``packing
fraction''~\cite{ukqcd} being $< 1$ and a test of
the dilute-gas identity: $\langle Q^2\rangle = N_{\rm tot}$. Here Q
is the topological charge and $N_{\rm tot}$ the total number
of charges.
These results strongly support the reliability of
our calculations in DIS.
By means of the discussed
saddle-point correspondence (\ref{saddle}), these lattice constraints
may be converted into a ``fiducial'' region for our
cross-section predictions in DIS~\cite{rs-pl},
\begin{equation}
\left.\begin{array}{lcccl}\rho^\ast&\leq& \rho^\ast_{\rm max}&\simeq&
0.3 {\rm\ fm};\\[1ex]
\frac{R^\ast}{\rho^\ast}&\geq&\left(\frac{R^\ast}{\rho^\ast}\right)_{\rm min}
&\simeq& 1\\
\end{array}\right\}\Rightarrow
\left\{\begin{array}{lclcl}Q^\prime&\geq &Q^\prime_{\rm min}&\simeq&
8 {\rm\ GeV};\\[1ex]
x^\prime&\geq &x^\prime_{\rm min}&\simeq &0.35.\\
\end{array} \right .
\label{fiducial}
\end{equation}
\section{HERA cross-section}
Figure~\ref{cuts} displays our finalized $I$-induced cross-section at
HERA~\cite{rs-pl,mrs2},
as function of the cuts $x^\prime_{\rm min}$ and $Q^\prime_{\rm min}$.
\begin{figure} [h]
\begin{center}
\epsfig{file=./plots/sigHERA,angle=270,width=12.0cm}
\caption[dum]{\label{cuts}
$I$-induced cross-section at HERA as function of
the cuts in (${x^\prime},Q^\prime$).}
\end{center}
\end{figure}
For the minimal cuts (\ref{fiducial}) extracted from the UKQCD lattice
simulation, we obtain a surprisingly large cross-section,
\begin{equation}
\label{minimal-cuts}
\sigma^{(I)}_{\rm HERA}({x^\prime}\ge0.35,Q^\prime\ge 8\, {\rm GeV})
\simeq 126\, {\rm pb};\ x_{\rm Bj}\ge 10^{-3};\ 0.9\ge y_{\rm Bj}\ge 0.1 .
\end{equation}
Hence, with the total luminosity accumulated by experiments at HERA,
${\mathcal L}={\mathcal O}(80)$ pb$^{-1}$, one already expects
${\mathcal O}(10^4)$ $I$-induced events on tape from this kinematical region.
Note also that the cross-section quoted in Eq.~(\ref{minimal-cuts})
corresponds to a fraction of $I$-induced to normal DIS (nDIS) events of
\begin{equation}
f^{(I)} = \frac{\sigma^{(I)}_{\rm HERA}}{\sigma^{({\rm nDIS})}_{\rm HERA}}
={\mathcal O}(1)\, \%;
\hspace{6ex} {\rm for}\ x_{\rm Bj}\ge 10^{-3};\ 0.9\ge y_{\rm Bj}\ge 0.1 .
\end{equation}
This is remarkably close to the published upper limits on the fraction of
$I$-induced events~\cite{limits}, which are also on the one percent
level.
There are still a number of significant uncertainties in our result
for the cross-section.
For {\it fixed} $Q^\prime$ and ${x^\prime}$ cuts, one of the dominant uncertainties
arises from the experimental uncertainty in the QCD scale $\Lambda$.
In the 2-loop expression for $\alpha_s$ with $n_f=3$ (massless)
flavours we used the value $\Lambda_{\overline{\rm MS}}^{(3)}=282$ MeV, corresponding to the central value of the DIS average for $n_f=4$,
$\Lambda_{\overline{\rm MS}}^{(4)}=234$ MeV~\cite{pdg}. If we change
$\Lambda_{\overline{\rm MS}}^{(3)}$ within the allowed range,
$\approx\pm 65$ MeV, the cross-section (\ref{minimal-cuts}) varies
between 26 pb and 426 pb. Minor uncertainties are associated with
the residual renormalization-scale dependence
(c.f. figure~\ref{renorm}) and the choice of the factorization
scale. Upon varying the latter by an order of
magnitude, the changes are in the ${\mathcal O}(20)$ \% range only.
By far the dominant uncertainty in $\sigma^{(I)}_{\rm HERA}$ arises,
however, from the uncertainty in placing the (${x^\prime} ,Q^\prime$) cuts
(c.f. figure~\ref{cuts}). Hence, the constraints (\ref{fiducial}) from
lattice simulations are extremely valuable for making concrete and
reliable predictions of the $I$-induced rate at HERA.
\section{Signatures and searches}
An indispensable tool for investigating the structure of the
$I$-induced final state and for developping optimized search
strategies is our Monte-Carlo generator for $I$-induced DIS-events,
QCDINS 1.60. Besides the matrix element for the $I$-induced hard
subprocess, it provides leading-log parton showers and hadronization
via its interface to HERWIG 5.9.
The characteristic features of the $I$-induced final state are
illustrated in figure~\ref{events}~(a) displaying the lego plot of a
typical event from QCDINS 1.60 (c.\,f. also figure~\ref{ev-displ}):
\begin{figure}[ht]
\vspace{-0.1cm}
\begin{center}
\parbox{7.5cm}{\epsfig{file=./plots/firelego,width=7.5cm}}
\hspace{0.7cm}
\parbox{7.5cm}{\vspace{-0.3cm}\epsfig{file=./plots/fireball,width=7.5cm}}
\caption[dum]{\label{events}
(a) Lego plot of a typical instanton-induced event from QCDINS 1.60.\\
(b) An interesting {\it real} ``fireball'' event in photoproduction
from ZEUS~\cite{fireball} with very large total $E_T$ and multiplicity.}
\end{center}
\end{figure}
Besides a single (not very hard) current-quark jet, one expects an
accompanying densely populated {\it ``hadronic band''}.
For $x_{\rm Bj\,min}\simeq
10^{-3}$, say, it is centered around $ \overline{\eta} \simeq 2$ and
has a width of $\Delta \eta \simeq \pm 1$. The band directly reflects the {\it
isotropic} production of an $I$-induced ``fireball'' of ${\cal
O}(10)$ partons in the $I$-rest system. Both the total transverse
energy $\langle E_T \rangle \simeq 15$ GeV and the charged particle
multiplicity $\langle n_c\rangle \simeq 13$ in the band are far higher than in
normal DIS events. Finally, each $I$-induced event has to contain
strangeness (and possibly also charm) such that the number of $K^0$'s amounts to $\simeq 2.2$/event.
Despite the high expected rate (\ref{minimal-cuts}) of $I$-induced
events at HERA, no {\it single} observable is known (yet) with
sufficient nDIS rejection. Hence, a dedicated multi-observable
analysis seems to be required. Neural network filters are being tried
and exhibit a very good analyzing power if applied to $\mbox{\,\raisebox{.3ex {\cal
O}(5)$ observables~\cite{jgerigk}. Strategies to produce
``instanton-enriched'' data samples and to reconstruct
($Q^{\prime\,2},{x^\prime}$) are under study and look quite
promising~\cite{jgerigk}. Clearly, in all cases, a good
understanding of the perturbative QCD background in the {\it tails} of
the considered distributions is required.
\section{Going beyond instanton-perturbation theory}
A class of striking ``fireball'' events in
photoproduction, with large
total $E_T$ and large multiplicity, has been reported~\cite{wg2wg3}
at this meeting (see e.\,g. figure~\ref{events}~(b)). While the
quantitative analysis is still in an early stage, these events seem
to exhibit all characteristics of $I$-induced events
(c.\,f. figure~\ref{events}~(a)).
However, it appears that -- unlike ordinary QCD perturbation theory -- the
hard photoproduction limit, $Q^2 \Rightarrow 0,\ (E_T)_{\rm jet}$
large, is not within the reach of strict $I$-perturbation theory.
The reason is that in the $Q^2 \Rightarrow 0$ limit, we encounter a
contribution to the photoproduction cross-section, which tends to {\it
diverge}, if integrated over the $I$-size $\rho$. This IR divergence
at large $\rho$ is independent of the $E_T$ of the (current quark) jet and
directly associated with the ``bad'' large-$\rho$ behaviour of the
{\it perturbative} expression (\ref{dens}) for the $I$-density,
$D(\rho) \sim \rho^{6-2/3 n_f}$. In contrast, the {\it actual} form of
$D(\rho)$ (c.\,f. figure~\ref{lattice}) is strongly peaked around
$\rho \simeq 0.5$ fm, and appears to {\it vanish} exponentially fast
for larger $\rho$.
The above ``fireball'' events and more generally, the ongoing $I$-searches
at HERA, provide plenty of motivation for trying to extend our
calculational framework beyond strict $I$-perturbation
theory. We are thus led to make the following promising proposal in
this direction:
One may try and replace the most strongly varying entries in the
perturbative calculations, the $I$-density $D(\rho)$ and the
$\iai$-interaction $\Omega(R^2/(\rho\overline{\rho}),\ldots)$, in
(\ref{cs}), by their {\it actual} form as extracted from the
recent non-perturbative lattice results~\cite{rs-pub}.
The $I$-rates in photoproduction and the $I$-contributions to
further interesting observables may then be calculated, and
the ($Q^{\prime\, 2},{x^\prime}$) cuts in $I$-searches be considerably
relaxed! Due to the strong peaking of $D(\rho)$, only the region around
$\rho \simeq 0.5$ fm enters and the dilute-gas
approximation may well continue to hold up to the peak (c.\,f. section~3).
|
{
"redpajama_set_name": "RedPajamaArXiv"
}
| 6,009
|
Populorum progressio (latín: El desarrollo de los pueblos) es la carta encíclica del papa Pablo VI promulgada el 26 de marzo de 1967.
Estructura
Encíclica dirigida a consagrados, laicos y personas de buena voluntad. Consta de un preámbulo [1-5] y dos partes:
Por un desarrollo integral del hombre [6 - 42]
El desarrollo solidario de la humanidad [43 - 87]
La encíclica está dedicada a la cooperación entre los pueblos y al problema de los países en vías de desarrollo. El papa denuncia que el desequilibrio entre países ricos y pobres se va agravando, critica al neocolonialismo y afirma el derecho de todos los pueblos al bienestar. Además presenta una crítica al capitalismo y al colectivismo marxista. Finalmente propone la creación de un fondo mundial para ayudar a los países en vías de desarrollo.
Es una de las más famosas e importantes de Pablo VI aun cuando en su momento fue objeto de debates (por ejemplo, en cuanto al derecho de los pueblos a rebelarse incluso con la fuerza contra un régimen opresor) y críticas por parte de los ambientes más conservadores. La encíclica fue el motivo de fundación del movimiento MSPTM (Misioneros Siervos de los Pobres del Tercer Mundo)
El desarrollo solidario de la humanidad
En esta primera parte se establece el marco contextual: se describen los "datos del problema" [6 - 11], se habla de la acción de la Iglesia respecto al desarrollo [12 - 21] y de acciones que deben ser emprendidas por la sociedad mundial [22 - 42].
Se habla del "neocolonialismo" como la causa que en ese momento generaba injusticia entre países, pues, si bien se da una independencia de los pueblos respecto a sus colonizadores, sin embargo, se continuaba dando una dependencia injusta de estos respecto de los países ricos.
Se expresa en la encíclica la preocupación que causa ver cómo los países más pobres se van distanciando cada vez más de los países ricos, que se aprovechan de los recursos sin permitirles entrar en una igualdad real.
Otro punto a destacar es la valoración de la industrialización del trabajo, pero la crítica al capitalismo liberal que olvida al trabajador para centrarse en la producción de riqueza.
También se habla sobre la necesidad de unir la idea de progreso no solo a la economía sino al reconocimiento de la dignidad del ser humano y a su desarrollo integral, incluido el espiritual.
Se subraya el peligro que se genera al querer los países ricos imponer un control sobre los países pobres y condicionar la ayuda en función de la obediencia a este control y que esto sucede en el campo económico e incluso demográfico
"Es, pues, grande la tentación de frenar el crecimiento demográfico con medidas radicales".
Se rechaza la violencia como tentación y se advierte que esta puede llegar a convertirse en revolución en casos de ataque a las personas muy graves y continuados, si bien no se la justifica sino en casos de defensa necesaria (habría que añadir, y "sin alternativa posible" para comprender bien lo que la encíclica quiere expresar). Así leemos en la encíclica:
Por un desarrollo integral del hombre
Invitación a los países ricos a ayudar a los pobres de forma no interesada a través de programas concertados y de la constitución de un foro mundial de ayuda a los países pobres.
Para evitar que las ayudas de los países ricos pongan condiciones a los países pobres se propone crear un programa de colaboración fruto del acuerdo internacional.
En Populorum Progressio se concreta que, para evitar que los países pobres puedan buscar ayudas de manera injustificada, a los países que ayuden "se les podrán dar garantías sobre el empleo que se hará del dinero, según el plan convenido y con una eficacia razonable, puesto que no se trata de favorecer a los perezosos y parásitos. Y los beneficiarios podrán exigir que no haya injerencias en su política y que no se perturbe su estructura social" ayudando precisamente a las personas que tienen más necesidad "a quienes hay que convencer que realicen ellos mismos su propio desarrollo y que adquieran progresivamente los medios para ello".
Se critica el liberalismo económico que no tiene en cuenta la desigualdad entre países pobres y ricos y se invita a superar estas desigualdades a través de pactos internacionales que procuren una real justicia de trato con quien está en peor situación industrial y tiene más dificultades.
Se critica el nacionalismo y el racismo como posibles obstáculos que pueden generar que no se de verdadera preocupación solidaria por el resto de países.
En el Llamamiento final de la Encíclica se invita a una real conversión de los corazones desde la oración, situando el problema que existe a nivel mundial como una cuestión que nace de cada individuo y del egoísmo individual. Asimismo, se sugiere la necesidad de constituir una autoridad mundial que pueda coordinar los esfuerzos para conseguir que los países pobres tengan un nivel de vida mínimamente digno.
Se finaliza invitando a la acción concreta para poner en marcha estas medidas de ayuda de unos hacia otros.
Referencias
Enlaces externos
Texto completo en español en página oficial del Vaticano
Encíclicas de Pablo VI
Encíclicas sociales
Iglesia católica en 1967
Iglesia católica y capitalismo
|
{
"redpajama_set_name": "RedPajamaWikipedia"
}
| 1,915
|
{"url":"http:\/\/yerevann.github.io\/2017\/06\/27\/interpreting-neurons-in-an-LSTM-network\/","text":"# Interpreting neurons in an LSTM network\n\nA few months ago, we showed how effectively an LSTM network can perform text transliteration.\n\nFor humans, transliteration is a relatively easy and interpretable task, so it\u2019s a good task for interpreting what the network is doing, and whether it is similar to how humans approach the same task.\n\nIn this post we\u2019ll try to understand: What do individual neurons of the network actually learn? How are they used to make decisions?\n\n## Transliteration\n\nAbout half of the billions of internet users speak languages written in non-Latin alphabets, like Russian, Arabic, Chinese, Greek and Armenian. Very often, they haphazardly use the Latin alphabet to write those languages.\n\n\u041f\u0440\u0438\u0432\u0435\u0442: Privet, Privyet, Priwjet, \u2026\n\u0643\u064a\u0641 \u062d\u0627\u0644\u0643: kayf halk, keyf 7alek, \u2026\n\u0532\u0561\u0580\u0587 \u0541\u0565\u0566: Barev Dzez, Barew Dzez, \u2026\n\nSo a growing share of user-generated text content is in these \u201cLatinized\u201d or \u201cromanized\u201d formats that are difficult to parse, search or even identify. Transliteration is the task of automatically converting this content into the native canonical format.\n\nAydpes aveli sirun e.: \u0531\u0575\u0564\u057a\u0565\u057d \u0561\u057e\u0565\u056c\u056b \u057d\u056b\u0580\u0578\u0582\u0576 \u0567:\n\nWhat makes this problem non-trivial?\n\n1. Different users romanize in different ways, as we saw above. For example, v or w could be Armenian \u057e.\n\n2. Multiple letters can be romanized to the same Latin letter. For example, r could be Armenian \u0580 or \u057c.\n\n3. A single letter can be romanized to a combination of multiple Latin letters. For example, ch could be Cyrillic \u0447 or Armenian \u0579, but c and h by themselves are for other letters.\n\n4. English words and translingual Latin tokens like URLs occur in non-Latin text. For example, the letters in youtube.com or MSFT should not be changed.\n\nHumans are great at resolving these ambiguities. We showed that LSTMs can also learn to resolve all these ambiguities, at least for Armenian. For example, our model correctly transliterated es sirum em Deep Learning into \u0565\u057d \u057d\u056b\u0580\u0578\u0582\u0574 \u0565\u0574 Deep Learning and not \u0565\u057d \u057d\u056b\u0580\u0578\u0582\u0574 \u0565\u0574 \u0534\u0565\u0565\u0583 \u053c\u0567\u0561\u0580\u0576\u056b\u0576\u0563.\n\n## Network architecture\n\nWe took lots of Armenian text from Wikipedia and used probabilistic rules to obtain romanized text. The rules are chosen in a way that they cover most of the romanization rules people use for Armenian.\n\nWe encode Latin characters as one-hot vectors and apply character level bidirectional LSTM. At each time-step the network tries to guess the next character of the original Armenian sentence. Sometimes a single Armenian character is represented by multiple Latin letters, so it is very helpful to align the romanized and original texts before giving them to LSTM (otherwise we should use sequence-to-sequence networks, which are harder to train). Fortunately we can do the alignment, because the romanized version was generated by ourselves. For example, dzi should be transliterated into \u0571\u056b, where dz corresponds to \u0571 and i to \u056b. So we add a placeholder character in the Armenian version: \u0571\u056b becomes \u0571_\u056b, so that now z should be transliterated into _. After the inference we just remove _s from the output string.\n\nOur network consists of two LSTMs (228 cells) going forward and backward on the Latin sequence. The outputs of the LSTMs are concatenated at each step (concat layer), then a dense layer with 228 neurons is applied on top of it (hidden layer), and another dense layer (output layer) with softmax activations is used to get the output probabilities. We also concatenate the input vector to the hidden layer, so it has 300 neurons. This is a more simplified version of the network described in our previous post on this topic (the main difference is that we don\u2019t use the second layer of biLSTM).\n\n## Analyzing the neurons\n\nWe tried to answer the following questions:\n\n\u2022 How does the network handle interesting cases with several possible outcomes (e.g. r => \u0580 vs \u057c etc.)?\n\u2022 What are the problems particular neurons are helping solve?\n\n### How does \u201ct\u201d become \u201c\u056e\u201d?\n\nFirst, we fixed one particular character for the input and one for the output. For example we are interested in how t becomes \u056e (we know t can become \u057f, \u0569 or \u056e). We now that it usually happens when t appears in a bigram ts, which should be converted to \u056e_.\n\nFor every neuron, we draw the histograms of its activations in cases where the correct output is \u056e, and where the correct output is not \u056e. For most of the neurons these two histograms are pretty similar, but there are cases like this:\n\nInput = t, Output = \u056e Input = t, Output != \u056e\n\nThese histograms show that by looking at the activation of this particular neuron we can guess with high accuracy whether the output for t is \u056e. To quantify the difference between the two histograms we used Hellinger distance (we take the minimum and maximum values of neuron activations, split the range into 1000 bins and apply discrete Hellinger distance formula on two histograms). We calculated this distance for all neurons and visualized the most interesting ones in a single image:\n\nThe color of a neuron indicates the distance between its two histograms (darker colors correspond to larger distances). The width of a line between two neurons indicate the mean of the value that the neuron on the lower end of the connection contributes to the neuron on the higher end. Orange and green lines correspond to positive and negative signals, respectively.\n\nThe neurons at the top of the image are from the output layer, the neurons below the output layer are from the hidden layer (top 12 neurons in terms of the distance between histograms). Concat layer comes under the hidden layer. The neurons of the concat layer are split into two parts: the left half of the neurons are the outputs of the LSTM that goes forward on the input sequence and the right half contains the neurons from the LSTM that goes backwards. From each LSTM we display top 10 neurons in terms of the distance between histograms.\n\nIn the case of t => \u056e, it is obvious that all top 12 neurons of the hidden layer pass positive signals to \u056e and \u0581 (another Armenian character that is often romanized as ts), and pass negative signals to \u057f, \u0569 and others.\n\nWe can also see that the outputs of the right-to-left LSTM are darker, which implies that these neurons \u201chave more knowledge\u201d about whether to predict \u056e. On the other hand, the lines between those neurons and the hidden layer are thicker, which means that they have more contribution in activating the top 12 neurons in the hidden layer. This is a very natural result, because we know that t usually becomes \u056e when the next symbol is s, and only the right-to-left LSTM is aware of the next character.\n\nWe did the same analysis for the neurons and gates inside the LSTMs. The results are visualized as six rows of neurons at the bottom of the image. In particular, it is interesting to note that the most \u201cconfident\u201d neurons are the so called cell inputs. Recall that cell inputs, as well as all the gates, depend on the input at the current step and the hidden state of the previous step (which is the hidden state at the next character as we talk about the right-to-left LSTM), so all of them are \u201caware\u201d of the next s, but for some reason cell inputs are more confident than others.\n\nIn the cases where s should be transliterated into _ (the placeholder), the useful information is more likely to come from the LSTM that goes forward, as s becomes _ mainly in case of ts => \u056e_. We see that in the next plot:\n\n### What did this neuron learn?\n\nIn the second part of our analysis we tried to figure out in which ambiguous cases each of the neurons is most helpful. We took the set of Latin characters that can be transliterated into more than one Armenian letters. Then we removed the cases where one of the possible outcomes appears less than 300 times in our 5000 sample sentences, because our distance metric didn\u2019t seem to work well with few samples. And we analyzed every fixed neuron for every possible input-output pair.\n\nFor example, here is the analysis of the neuron #70 of the output layer of the left-to-right LSTM. We have seen in the previous visualization that it helps determining whether s should be transliterated into _. We see that the top input-output pairs for this neuron are the following:\n\nHellinger distance Latin character Armenian character\n0.9482 s _\n0.8285 h \u0570\n0.8091 h _\n0.6125 o \u0585\n\nSo this neuron is most helpful when predicting _ from s (as we already knew), but it also helps to determine whether Latin h should be transliterated as Armenian \u0570 or the placeholder _ (e.g. Armenian \u0579 is usually romanized as ch, so h sometimes becomes _).\n\nWe visualize Hellinger distances of the histograms of neuron activations when the input is h and the output is _, and see that the neuron #70 is among the top 10 neurons of the left-to-right LSTM for the h=>_ pair.\n\n## Visualizing LSTM cells\n\nInspired by this paper by Andrej Karpathy, Justin Johnson and Fei-Fei Li, we tried to find neurons or LSTM cells specialised in some language specific patterns in the sequences. In particular, we tried to find the neurons that react most to the suffix \u0569\u0575\u0578\u0582\u0576 (romanized as tyun).\n\nThe first row of this visualization is the output sequence. Rows below show the activations of the most interesting neurons:\n\n1. Cell #6 in the LSTM that goes backwards,\n2. Cell #147 in the LSTM that goes forward,\n3. 37th neuron in the hidden layer,\n4. 78th neuron in the concat layer.\n\nWe can see that Cell #6 is active on tyuns and is not active on the other parts of the sequence. Cell #144 of the forward LSTM behaves the opposite way, it is active on everything except tyuns.\n\nWe know that t in the suffix tyun should always become \u0569 in Armenian, so we thought that if a neuron is active on tyuns, it may help in determining whether the Latin t should be transliterated as \u0569 or \u057f. So we visualized the most important neurons for the pair t => \u0569.\n\nIndeed, Cell #147 in the forward LSTM is among the top 10.\n\n## Concluding remarks\n\nInterpretability of neural networks remains an important challenge in machine learning. CNNs and LSTMs perform well for many learning tasks, but there are very few tools to understand the inner workings of these systems. Transliteration is a pretty good problem for analyzing the impact of particular neurons.\n\nOur experiments showed that too many neurons are involved in the \u201cdecision making\u201d even for the simplest cases, but it is possible to identify a subset of neurons that have more influence than the rest. On the other hand, most neurons are involved in multiple decision making processes depending on the context. This is expected, since nothing in the loss functions we use when training neural nets forces the neurons to be independent and interpretable. Recently, there have been some attempts to apply information-theoretic regularization terms in order to obtain more interpretability. It would be interesting to test those ideas in the context of transliteration.","date":"2018-12-17 00:19:03","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 0, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 1, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.7336537837982178, \"perplexity\": 1500.656400632446}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2018-51\/segments\/1544376828018.77\/warc\/CC-MAIN-20181216234902-20181217020902-00492.warc.gz\"}"}
| null | null |
This morning, Joaquin announced that he wanted us to shop in the playroom, so I enthusiastically decided to create a new shop for our game. He asked for it to have monsters and balls, and a new person named "Serdino". I took note of all these requests, and decided to build more enthusiasm for our game by building a surprise store with some surprise items, and a new funny character: Madame Bovary (she wore oversized sunglasses and a scarf).
The challenge in this game was that, instead of money, Madame Bovary and her assistant Serdino, request customers to act out the items they're buying as payment. So, rather than giving Joaquin a shopping basket (as usual), for every item he picked, he needed to give a performance for Madame Bovary, then –after consulting with Serdino– they'd put the item in the shopping box calling it purchased.
I built a stage (Joaquin likes new props) and filled the store with items displaying different facial expressions and body postures. I had the monsters he built some weeks ago, CDs (empty jewel cases with magazine cuttings as covers), books, animals, the balls he requested, and a few household items I thought he'd enjoy.
In case that he didn't perform, I had a blank notepad with which I was planning to issue vouchers for items (to give him a prize and help him feel successful, in case he didn't feel he was). But I never had to use it. Joaquin was more than willing to act at the stage, and he did a very good job imitating the pictures.
He asked to check out a couple times, so Madame Bovary – great salesperson she is – quickly directed him to see some items he might not have seen. Joaquin stayed in the game for 33 minutes, after which he communicated clearly that he was finally done shopping, and picked up his box of purchases ready to leave.
|
{
"redpajama_set_name": "RedPajamaC4"
}
| 5,910
|
{"url":"https:\/\/clima.github.io\/ClimateMachine.jl\/latest\/GettingStarted\/Terminology\/","text":"Terminology\n\nThe ClimateMachine documentation uses terminology from several disciplines. Below are some definitions of some of these terms. Please let us know via a github issue if there are other terms that are unclear or confusing to you.\n\nSoftware terms\n\n\u2022 Driver file: a julia script which (a) specifies which BalanceLaw is being used, (b) specifies changes to the default version of that model, (c) specifies initial and boundary conditions, (d) specifies numerical details related to timestep, grid, and frequency of output, and (e) runs the integration. Examples can be found in tutorials and experiments.\n\u2022 Source file: a julia file containing code involved in implementing the choices made in a driver file. This is where the numerical methods related to solving the equations (e.g. the ODE time steppers, or the creation of the grid) are defined. Users typically only interact with functions defined in source code within a driver file by using arguments to those functions, unless they wish to develop the source code itself.\n\u2022 Kernel: Functions which are launched on the compute device (i.e., the CPU or GPU) and run with an array of workitems or threads. ClimateMachine.jl uses KernelAbstractions.jl as its kernel language.\n\u2022 Callback: Functions executed by the ODE integrator after each time step; see solve!. This allows the ability to inject custom behavior into the ODE integrators, such as diagnostic output, visualization, and apply filtering to the numerical solution. Several convenience functions exists specifying callback frequency: number of simulation steps, every X simulation time, and every X wall clock seconds. The callback mechanism is inspired by the callback mechanism of DifferentialEquations.jl.\n\nNumerics\n\n\u2022 Balance Law: The system of PDEs being solved. Please see the how-to-guide or the API.\n\u2022 Courant number: The ratio of the distance sound waves, diffusion, and other physical processes in your model travel or carry information in a timestep, relative to the resolution of your spatial discretization. This can typically be written in terms of physical constants, the grid size, and the time step, and is used for determining stability of ODE time steppers.\n\u2022 CFL limit: A maximum value for the Courant number in order to guarantee convergence to the true solution. Given a spatial discretization, this determines the maximum timestep that can be used. The value of the CFL limit depends on the ODE solving algorithm used.\n\nPhysics\n\n\u2022 Diurnal variation: A periodic variation in Earth processes driven by the rotation of the Earth. Examples include heating of the Earth's surface due to solar radiation, or the semi-diurnal tidal cycle.\n\u2022 Shortwave radiation: This refers to solar radiation, with intensity peaking in the visible part of the spectrum.\n\u2022 Longwave radiation: This refers to the emitted infrared radiation of the Earth surface or atmosphere.\n\u2022 Advection\/advective flux: Advection is movement of some material\/quantity by the bulk velocity of a fluid. In the BalanceLaw language, the advective flux of a prognostic variable is a first order flux.\n\u2022 Diffusion\/diffusive flux: Diffusion describes a process in which a material or quantity is moved, or approximated as moved, due to random motion of particles. More generally, a diffusive flux is one generated by a gradient in concentration, temperature, or another quantity. A diffusive flux is a second order flux in the BalanceLaw framework.\n\u2022 Hyperdiffusion: an explicit higher-order flux term representing horizontal diffusion. The ClimateMachine hyperdiffusive flux uses a fourth-order derivative, but it is included in a second order flux. It enforces the flow of enstrophy absorption at the smallest resolution, and models dissipation effects.\n\nDocumentation\n\n\u2022 APIs: This section details the parts of the source code that are visible to users wanting to run models and explains how to interact with and call them. API stands for application programming interface; from Wikipedia, \"It defines the kinds of calls or requests that can be made, how to make them, the data formats that should be used, the conventions to follow, etc.\"\n\u2022 Tutorials: Driver files with concrete examples showing how to run simple land, ocean, and atmosphere models, or how to use certain numerical functions.\n\u2022 Experiments: Driver files with more complex models. These could be considered the starting point for research; they are not a part of the docs as they are constantly being updated.\n\u2022 How-to-guide: Code and explanations for components used in models.","date":"2021-12-03 01:49:02","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 0, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 1, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.39910414814949036, \"perplexity\": 1346.638873367689}, \"config\": {\"markdown_headings\": false, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.3, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2021-49\/segments\/1637964362571.17\/warc\/CC-MAIN-20211203000401-20211203030401-00271.warc.gz\"}"}
| null | null |
Duckworth, Durbin Call for Senate Hearings on Gun Violence Prevention Legislation
[WASHINGTON, D.C.] – U.S. Senators Tammy Duckworth (D-IL) and Dick Durbin (D-IL) joined U.S. Senator Chris Murphy (D-CT) and 34 of their colleagues in calling on U.S. Senate Judiciary Committee Chairman Lindsey Graham (R-SC) to quickly hold a hearing on legislation to expand federal background checks to all firearm sales. The Senators asked Graham to hold a hearing on the Background Check Expansion Act – which Duckworth and Durbin helped reintroduce earlier this year – and is similar to legislation that passed the U.S. House of Representatives last week.
"We know that universal background checks save lives, and we know that 97% of Americans support them. We noted with interest your statement in the press that you intended to have the Committee work on 'red flag' legislation and potentially also background checks, both actions we would strongly support," the Senators wrote. "We respectfully request that you hold a hearing on this critical legislation as soon as possible."
Under current federal law, unlicensed or private sellers are not required to conduct a background check prior to transferring a firearm. Research indicates that as many as a quarter of all gun owners in the United States may have obtained their firearms without a background check.
In addition to Duckworth and Durbin, the letter was also signed by U.S. Senators Tammy Baldwin (D-WI), Michael Bennet (D-CO), Richard Blumenthal (D-CT), Cory Booker (D-NJ), Sherrod Brown (D-OH), Ben Cardin (D-MD), Tom Carper (D-DE), Bob Casey (D-PA), Chris Coons (D-DE), Catherine Cortez Masto (D-NV), Dianne Feinstein (D-CA), Kirsten Gillibrand (D-NY), Kamala Harris (D-CA), Maggie Hasan (D-NH), Martin Heinrich (D-NM), Mazie Hirono (D-HI), Tim Kaine (D-VA), Amy Klobuchar (D-MN), Patrick Leahy (D-VT), Edward Markey (D-MA), Bob Menendez (D-NJ), Jeff Merkley (D-OR), Chris Murphy (D-CT), Patty Murray (D-WA), Jack Reed (D-RI), Jacky Rosen (D-NV), Brian Schatz (D-HI), Chuck Schumer (D-NY), Jeanne Shaheen (D-NH), Tina Smith (D-MN), Tom Udall (D-NM), Mark Warner (D-VA), Elizabeth Warren (D-MA), Sheldon Whitehouse (D-RI), Ron Wyden (D-OR), and Chris Van Hollen (D-MD).
The text of the letter is available below:
Dear Chairman Graham:
Last week, in a huge bipartisan vote, the House of Representatives passed H.R. 8, the Bipartisan Background Checks Act, by a vote of 240-190.
A similar bill, S. 42, the Background Check Expansion Act, is currently pending in the Judiciary Committee. Statistics demonstrate that universal background checks save lives, and polls show that 97% of Americans support the implementation of these checks. We noted with interest your statements that you intended to have the Committee work on 'red flag' legislation and potentially also background checks, both actions we strongly support.
As cosponsors of S. 42, we respectfully request that you hold a hearing on this critical legislation as soon as possible.
|
{
"redpajama_set_name": "RedPajamaCommonCrawl"
}
| 4,294
|
Michael Torres is Vice President, Corporate Affairs, Americas, based in Atlanta, Georgia.
In this role, Michael is responsible for providing strategic counsel that protects and enhances the reputation of IHG® and its family of brands for the region. As the senior communications leader, Michael oversees internal and external communications, including employee, crisis/issues management, corporate and marketing communications, strategic communications and media relations.
Michael joined IHG from PepsiCo where, as Senior Director of global corporate communications, he provided strategic internal and external corporate and executive communications as well as reputation risk/issues management counsel for PepsiCo's Global R&D Division. Michael's role as the Chief Communications Officer for the division included the development and execution of the first global R&D communications plan. Michael also served as Senior Director for Tropicana and Naked Emerging Brands Group.
Before joining PepsiCo, Michael held several leadership positions at Anheuser-Busch and AB InBev, the world's largest brewer. He initially oversaw communications for Anheuser-Busch's international subsidiary and then was promoted to direct the company's North America Brand/Sports and Entertainment Marketing Communications teams before leading global external communications for AB InBev. Michael began his career in the public affairs practice at Fleishman-Hillard.
Michael is an alumnus of the Coro Foundation. A native of Los Angeles, Michael holds a bachelor`s degree in sociology from the University of California Los Angeles (UCLA) and is an alumnus of Anheuser-Busch`s Leadership Development program, the AB InBev/Stanford University Graduate School of Business Advanced Marketing Executive Program and the AFL-CIO Organizing Institute.
|
{
"redpajama_set_name": "RedPajamaC4"
}
| 4,279
|
Q: CLLocationManager didstartregionMonitoring not being called I am creating a plugin for unity3d to use region monitoring. However the CllocationManager events are not not firing up. After searching a lot I read that this CLLocationManager needs to initialized in the main loop. However I am not sure how to do that when I am using the plugin.
Plugin code:
RegionMonitoring.h
#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
@interface RegionMonitoringPlugin : NSObject <CLLocationManagerDelegate>
{
CLLocationManager *locationManager;
}
-(void)enterRegionNotify;
-(void)leaveRegionNotify;
-(void)startMonitor:(float)latitude longitude:(float)longitude radius:(float)raduis;
@end
RegionMonitoring.mm
#import "RegionMonitoringPlugin.h"
@implementation RegionMonitoringPlugin
- (id) init
{
if (self = [super init]){
if (locationManager==nil){
locationManager = [[CLLocationManager alloc] init];
locationManager.delegate = self;
[locationManager setDistanceFilter:kCLDistanceFilterNone];
[locationManager setDesiredAccuracy:kCLLocationAccuracyBest];
}
}
return self;
}
-(void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region
{
[self enterRegionNotify];
}
-(void)locationManager:(CLLocationManager *)manager didExitRegion:(CLRegion *)region
{
[self leaveRegionNotify];
}
- (void)locationManager:(CLLocationManager *)manager monitoringDidFailForRegion:(CLRegion *)regionwithError:(NSError *)error
{
NSLog(@"Location error %@, %@", error, @"Fill in the reason here");
}
- (void)locationManager:(CLLocationManager *)manager didStartMonitoringForRegion:(CLRegion *)region
{
NSLog (@"Started monitoring");
}
-(void)leaveRegionNotify
{
UILocalNotification *note = [[UILocalNotification alloc] init];
note.alertBody= @"Region Left"; // ToAsk: What should be displayed
note.soundName = UILocalNotificationDefaultSoundName;
[[UIApplication sharedApplication] presentLocalNotificationNow:note];
[note release];
}
-(void)enterRegionNotify
{
UILocalNotification *note = [[UILocalNotification alloc] init];
note.alertBody= @"Region Left"; //ToAsk: what should be displayed ?
note.soundName = UILocalNotificationDefaultSoundName;
[[UIApplication sharedApplication] presentLocalNotificationNow:note];
[note release];
}
-(void)startMonitor:(float)latitude longitude:(float)longitude radius:(float)radius
{
[self leaveRegionNotify];
CLLocationCoordinate2D home;
home.latitude = latitude;
home.longitude = longitude;
CLRegion* region = [[CLRegion alloc] initCircularRegionWithCenter:home radius:radius identifier:@"region"];
[locationManager startMonitoringForRegion:region desiredAccuracy:kCLLocationAccuracyBest];
[region release];
}
@end
extern "C" {
static RegionMonitoringPlugin *regionMonitor;
// Unity callable function to start region monitoring
BOOL _startRegionMonitoring(float m_latitude,float m_longitude, float m_radius)
{
if (![CLLocationManager regionMonitoringAvailable] || ![CLLocationManager regionMonitoringEnabled]){
NSLog (@"Region Monitoring not configured");
return NO;
}
if (regionMonitor == nil){
regionMonitor = [[RegionMonitoringPlugin alloc] init] ;
}
[regionMonitor startMonitor:m_latitude longitude:m_longitude radius:m_radius];
return YES;
}
void _showNotification (char *msg){
if ([UIApplication sharedApplication].applicationState == UIApplicationStateActive) {
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Region Monitor Notification" message:[NSString stringWithUTF8String:(char *)msg] delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alertView show];
[alertView release];
}
}
}
Unity Code:
using UnityEngine;
using System.Collections;
using System.Runtime.InteropServices;
public class RegionMonitoringMediator {
/*Interface to native implementation */
[DllImport ("__Internal")]
private static extern bool _startRegionMonitoring (float m_latitude,float m_longitude, float m_radius);
[DllImport ("__Internal")]
private static extern void _showNotification(string mes);
public static void showNotification(string message){
if (Application.platform != RuntimePlatform.OSXEditor)
_showNotification(message);
}
public static bool startRegionMonitoring (float latitude,float longitude, float radius)
{
/*Call plugin only when running on real device*/
if (Application.platform != RuntimePlatform.OSXEditor)
return _startRegionMonitoring ( latitude , longitude , radius);
else return false;
}
}
Place where I am calling in unity:
private void callFourSquare (string queryURL)
{
WWW www = new WWW(queryURL);
StartCoroutine(WaitForRequest(www));
}
IEnumerator WaitForRequest(WWW www)
{
yield return www;
Debug.Log(WWW.UnEscapeURL (www.text));
bool started = RegionMonitoringMediator.startRegionMonitoring((28.023234f,77.232134F,10.0f);
if (!started)
Debug.LogError( "Could not start region monitoring"); }
}
A: I might be that you don't have run loop on that thread. So if your code is running on background thread you have to have run loop there.
More here:
https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/Multithreading/RunLoopManagement/RunLoopManagement.html
Check section configuring run loop.
|
{
"redpajama_set_name": "RedPajamaStackExchange"
}
| 624
|
KSHB - Kansas City Scripps
Making masks and giving back
Charlie Hustle will continue to sell face masks to protect the community.
U.S. Senate approves Haines as Director of National Intelligence
The U.S. Senate on Wednesday approved Avril Haines as the Director of National Intelligence, the nation's top intelligence job, making her the first of President Joe Biden's nominees to be approved. The vote was 84-10, with all the "no" votes coming from Republicans. Both Democrats and leading Republicans issued statements praising the nominee.
Biden's homeland security nominee pledges to tackle domestic extremism and prevent another attack on the Capitol
Less than two weeks after a violent mob of Trump supporters stormed the U.S. Capitol, Alejandro Mayorkas, President-elect Joe Biden's nominee for Homeland Security Secretary, assured senators that, if confirmed, he will "tackle the threat of domestic extremism" and prevent future attacks.
Pharmacist charged in attempt to ruin COVID-19 vaccine
A Wisconsin pharmacist accused of trying to defrost and spoil dozens of vials of COVID-19 vaccine was charged Tuesday with attempted misdemeanor property damage, and prosecutors warned more serious charges could follow if tests show the doses were ruined. Police arrested 46-year-old Steven Brandenburg on Dec. 31 as part of an investigation into how 57 vials of the Moderna vaccine were left for hours outside a refrigerator at Advocate Aurora Health in Grafton, a Milwaukee suburb. The vials contained enough vaccine to inoculate more than 500 people.
Eugene Goodman, who diverted Capitol riot mob, escorted Kamala Harris to the inaugural platform
Capitol Police Officer Eugene Goodman was named an acting deputy Senate sergeant-at-arms to escort the vice president-elect
Months-old embers from a deadly California fire were blown back to life Tuesday by powerful winds that raked the state and prompted safety blackouts to tens of thousands of people. Firefighters chased wind-driven blazes up and down the state, trees and trucks were toppled, Yosemite National Park was forced to close and two coronavirus vaccination centers were shut down. Two were within the area burned by last year's CZU Lightning Complex inferno.
EU lawmakers call for halt to Nord Stream 2 after Navalny arrest
European Union lawmakers passed a resolution on Thursday calling for the bloc to stop the completion of the Nord Stream 2 gas pipeline to take Russian natural gas to Europe, in response to the arrest of Kremlin critic Alexei Navalny. Navalny, Russian President Vladimir Putin's most prominent critic, was detained at the weekend and later jailed for alleged parole violations after flying back to Russia for the first time since being poisoned by a military grade nerve agent. German Chancellor Angela Merkel, who has continued to back the pipeline between Germany and Russia despite criticism elsewhere in the EU, said on Thursday her view of the project had not changed despite the Navalny case.
'So proud of you': Barack Obama and Kamala Harris bump fists in 'remarkable' Inauguration Day photo
First Black president's special moment with the first Black vice president quickly goes viral during inaugural ceremonies
President Biden's inaugural address has won some high praise on Fox News.Fox News anchor Chris Wallace on Wednesday praised Biden's "great" inaugural address, going as far as to deem it the best he's ever watched in his life."I thought it was a great speech," Wallace said. "I've been listening to these inaugural addresses since 1961 -- John F. Kennedy, 'ask not.' I thought this was the best inaugural address I ever heard."Biden during his first address as president declared that "democracy has prevailed" and urged unity, saying politics "doesn't have to be a raging fire destroying everything in its path." Wallace noted the speech and the ceremony itself was especially meaningful coming exactly two weeks after a mob of former President Donald Trump's supporters stormed the Capitol building in an attempt to disrupt Congress' certification of the election results."It was a less an inaugural address and more part sermon, part pep talk," Wallace said.The Fox News anchor also called for those in the media to particularly take note of Biden's comment that "there is truth and there are lies, lies told for power and for profit, and each of us has a duty and a responsibility ... to defend the truth and defeat the lies.""Now he's gotta turn words, rhetoric into reality and action," Wallace added. "But I thought it was a great start." > Fox News's Chris Wallace: "This was the best inaugural address I ever heard." pic.twitter.com/W2tauGp5g5> > -- Washington Examiner (@dcexaminer) January 20, 2021More stories from theweek.com 7 brutally funny cartoons about Trump's White House exit Bernie Sanders steals the inauguration with his grumpy chic outfit Voting to convict Trump would cost McConnell his Senate leadership, GOP faction warns
26 major 'Breaking Bad' deaths, ranked from least to most heartbreaking
Inauguration Day was the easy part, now come the challenges for Biden
USA TODAY Opinion
Appealing to 'kind angels' China strikes optimistic tone with Biden administration
Michael Flynn's brother was present on a call discussing the military response to the Capitol siege, despite the Army denying it for days: WaPo
Biden Signs Executive Orders Ending Trump's Travel Ban, Stopping Border Wall Construction
|
{
"redpajama_set_name": "RedPajamaCommonCrawl"
}
| 144
|
using Xunit;
using System;
using PTrampert.AppArgs.Attributes;
using PTrampert.AppArgs.Exceptions;
namespace PTrampert.AppArgs.Test
{
public class OptionParserParseTests
{
protected OptionParser<SampleOpts> Subject { get; set; }
public OptionParserParseTests()
{
Subject = new OptionParser<SampleOpts>();
}
[Fact]
public void AllOptsAreOptional()
{
var args = new string[0];
var opts = Subject.Parse(args, new SampleOpts());
Assert.Null(opts.StringArg);
Assert.Equal(0, opts.IntArg);
Assert.Equal(0m, opts.DecimalArg);
Assert.Equal(false, opts.BoolArg);
Assert.Equal(default(DateTime), opts.DateTimeArg);
Assert.Equal(default(SampleEnum), opts.EnumArg);
}
[Fact]
public void ThrowsForUnrecognizedOption()
{
var args = new []{"-test"};
Assert.Throws<UnrecognizedOptionException>(() => Subject.Parse(args, new SampleOpts()));
}
[Fact]
public void CanParseOnPropertyName()
{
var args = new []{"-EnumArg", "Test2"};
var opts = Subject.Parse(args, new SampleOpts());
Assert.Equal(SampleEnum.Test2, opts.EnumArg);
}
[Fact]
public void CanParseOnGivenName()
{
var args = new [] {"-string", "some value"};
var opts = Subject.Parse(args, new SampleOpts());
Assert.Equal("some value", opts.StringArg);
}
[Fact]
public void CanParseOnShortName()
{
var args = new [] {"-i", "42"};
var opts = Subject.Parse(args, new SampleOpts());
Assert.Equal(42, opts.IntArg);
}
[Fact]
public void CanParseFlagsAmongOtherOptions()
{
var args = new [] {"-i", "42", "-BoolArg", "-string", "some value"};
var opts = Subject.Parse(args, new SampleOpts());
Assert.Equal(42, opts.IntArg);
Assert.Equal(true, opts.BoolArg);
Assert.Equal("some value", opts.StringArg);
}
}
public class SampleOpts
{
[Option(Name = "string")]
public string StringArg { get; set; }
[Option(ShortName = "i")]
public int IntArg { get; set; }
[Option]
public bool BoolArg { get; set; }
[Option(Name = "decimal", ShortName = "d")]
public decimal DecimalArg { get; set; }
[Option]
public DateTime DateTimeArg { get; set; }
[Option]
public SampleEnum EnumArg { get; set; }
}
}
|
{
"redpajama_set_name": "RedPajamaGithub"
}
| 2,165
|
package counter
import (
"fmt"
abci "github.com/tendermint/abci/types"
"github.com/tendermint/basecoin/types"
"github.com/tendermint/go-wire"
)
type CounterPluginState struct {
Counter int
TotalFees types.Coins
}
type CounterTx struct {
Valid bool
Fee types.Coins
}
//--------------------------------------------------------------------------------
type CounterPlugin struct {
}
func (cp *CounterPlugin) Name() string {
return "counter"
}
func (cp *CounterPlugin) StateKey() []byte {
return []byte(fmt.Sprintf("CounterPlugin.State"))
}
func New() *CounterPlugin {
return &CounterPlugin{}
}
func (cp *CounterPlugin) SetOption(store types.KVStore, key, value string) (log string) {
return ""
}
func (cp *CounterPlugin) RunTx(store types.KVStore, ctx types.CallContext, txBytes []byte) (res abci.Result) {
// Decode tx
var tx CounterTx
err := wire.ReadBinaryBytes(txBytes, &tx)
if err != nil {
return abci.ErrBaseEncodingError.AppendLog("Error decoding tx: " + err.Error()).PrependLog("CounterTx Error: ")
}
// Validate tx
if !tx.Valid {
return abci.ErrInternalError.AppendLog("CounterTx.Valid must be true")
}
if !tx.Fee.IsValid() {
return abci.ErrInternalError.AppendLog("CounterTx.Fee is not sorted or has zero amounts")
}
if !tx.Fee.IsNonnegative() {
return abci.ErrInternalError.AppendLog("CounterTx.Fee must be nonnegative")
}
// Did the caller provide enough coins?
if !ctx.Coins.IsGTE(tx.Fee) {
return abci.ErrInsufficientFunds.AppendLog("CounterTx.Fee was not provided")
}
// TODO If there are any funds left over, return funds.
// e.g. !ctx.Coins.Minus(tx.Fee).IsZero()
// ctx.CallerAccount is synced w/ store, so just modify that and store it.
// Load CounterPluginState
var cpState CounterPluginState
cpStateBytes := store.Get(cp.StateKey())
if len(cpStateBytes) > 0 {
err = wire.ReadBinaryBytes(cpStateBytes, &cpState)
if err != nil {
return abci.ErrInternalError.AppendLog("Error decoding state: " + err.Error())
}
}
// Update CounterPluginState
cpState.Counter += 1
cpState.TotalFees = cpState.TotalFees.Plus(tx.Fee)
// Save CounterPluginState
store.Set(cp.StateKey(), wire.BinaryBytes(cpState))
return abci.OK
}
func (cp *CounterPlugin) InitChain(store types.KVStore, vals []*abci.Validator) {
}
func (cp *CounterPlugin) BeginBlock(store types.KVStore, hash []byte, header *abci.Header) {
}
func (cp *CounterPlugin) EndBlock(store types.KVStore, height uint64) (res abci.ResponseEndBlock) {
return
}
|
{
"redpajama_set_name": "RedPajamaGithub"
}
| 8,946
|
Q: указатель this от временного объекта есть такой надуманный класс для примера
class Example
{
public:
int x = 0;
Example& get_ref()
{
return *this;
}
};
такая строчка естественно вызывает ошибку, так как берем неконстантную ссылку на rvalue
Example& example = Example();
но почему такой пример не вызывает ошибок и мы можем даже менять состояние по этой ссылке, если это тоже самое? (или не тоже самое?)
Example& example = Example().get_ref();
и каким образом указатель this берет адрес временных объектов? я себе представлял это так под капотом Example* this = &(объект вызывающий метод) и не задумывался особо, так как никогда не вызывал методы от rvalue или вызывал и не думал об этом...
A: Во втором примере временный объект сразу же удаляется, потому если дальше работать со ссылкой, то будет UB.
каким образом указатель this берет адрес временных объектов?
Ну просто берет. Невозможность напрямую взять адрес rvalue1 - это защита от дурака, искусственное ограничение.
Еще, полезно понять разницу между объектами и выражениями.
Объект создается во время выполнения (где-то в памяти), а выражение - это надпись в коде, ссылающаяся на этот объект.
Вот вы выполнили Example().get_ref();, и в памяти создался временный объект. Выражение Example() ссылается на этот объект, и это выражение является rvalue.
Внутри метода get_ref(), выражение *this ссылается на тот же самый объект, это выражение является lvalue.
Категории (lvalue/rvalue/...) есть только у выражений, у объектов их нет. Адреса есть у всех объектов2, даже у временных.
1 Точнее, взять адрес xvalue. У prvalue адреса как такового нет, но его можно материализовать в xvalue, у которого адрес есть. У вас prvalue Example() материализуется, когда на нем дергают метод.
2 Тут можно поспорить, а что есть объект в регистре? Стандарт разрешает получить адрес любого объекта (даже временного - но не напрямую, а например внутри метода, как вы сделали). Для вас все объекты как будто бы находятся в памяти. Компилятор может засовывать их в регистры только по as-if rule - то есть если компилятор решил поместить объект в регистр, то он должен делать это незаметно для вас.
A: Выражением Example& example = Example(); вы ссылаетесь на несуществующий объект, то есть левый операнд есть ссылка, а правый _ объект. А в выражении:
Example& example = Example().get_ref();
И первое и второе выражение есть ссылки, поэтому это не то же самое и не является ошибкой. Другое дело, что объекта нет после этого выражения. Ну это как бы то же самое, что написать:
Example* pex = new Example;
Example& example = *pex; // *pex тоже является ссылкой на объект
delete pex;
Как вы понимаете, после этого кода ссылка становится недействительной
|
{
"redpajama_set_name": "RedPajamaStackExchange"
}
| 4,245
|
{"url":"http:\/\/www.chegg.com\/homework-help\/questions-and-answers\/from-census-data-it-is-known-that-the-average-income-of-households-in-wake-county-is-58500-q3654778","text":"STATISTICS\n\nFrom census data it is known that the average income of households in Wake County is $58,500. It is also known that the distribution of household income in Wake County is skewed to the right with a standard deviation of$14,000. A researcher is going to randomly select a sample of 15 households from Wake County. Which of the following is true? Select all that apply. Choose at least one answer. 1-We know that the shape of the sampling distribution of the mean will be approximately symmetric. 2-The sampling distribution of the mean will have a smaller standard deviation than the population. 3-The sampling distribution of the mean will have a larger standard deviation than the population. 4-We know that the shape of the sampling distribution of the mean will be right skewed. 5-The sampling distribution of the mean will have the same standard deviation as the population. 6-We can not tell what the shape sampling distribution of the mean will look like.","date":"2013-05-20 16:21:57","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 1, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 0, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.6138615608215332, \"perplexity\": 336.27632635759585}, \"config\": {\"markdown_headings\": false, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.3, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2013-20\/segments\/1368699068791\/warc\/CC-MAIN-20130516101108-00038-ip-10-60-113-184.ec2.internal.warc.gz\"}"}
| null | null |
\section{Introduction}
\label{sec:intro}
Quantum Key Distribution (QKD) is a technology that uses the properties of quantum mechanics to realize an important cryptographic primitive: key distribution~\footnote{More accurately, the primitive is that of secret key agreement using a public quantum channel and a public authenticated classical channel.}. Unlike the techniques used in traditional ``classical'' cryptography, for which the security relies on the conjectured computational hardness of certain mathematical problems, QKD security can be formally proven. Secret keys established via QKD are information-theoretically secure, which implies that any adversary trying to eavesdrop cannot obtain any information on the transmitted keys at any point in the future, even if she possesses extremely large computational resources.
The communication channels needed to perform QKD consist in an optical channel, on which well-controlled quantum states of light are exchanged, and a classical channel that is used for signaling during the quantum exchanges and for the classical post-processing phase, namely key reconciliation. Their combination forms a communication link, over which quantum key distribution allows two distant users to exchange a specific type of data, in particular secret keys. In this sense, QKD is by nature a telecommunication technology, and so \emph{QKD links} can be combined with appropriately designed nodes to form \emph{QKD networks}.
The performance of QKD links has rapidly improved in the last years. Starting from pioneering experiments in the 90s~\cite{bennett:jcrypto92}, important steps have been taken to bring QKD from the laboratory to the open field. Thanks to the continuous efforts invested in developing better QKD protocols and hardware, in parallel to the advancement of security proofs (see~\cite{gisin:rmp02,dusek:pino06,scarani:qp08} for reviews), the performance that can now be achieved, in terms of attainable communication distance, secret key generation rate and reliability, positions QKD as the first quantum information processing technology reaching a level of maturity sufficient to target deployment over real-world networks. Indeed, off-the-shelf QKD systems are now commercially available~\cite{idsqmagiq}, and the first QKD networks have recently been implemented~\cite{elliott:njp02,elliott:qp05,secoqc}.
Up till now, research in QKD has focused on building and optimizing individual systems to reach the longest possible distance and/or the highest possible secret bit rate, without taking into account the cost of such systems. However, as the perspective of deploying QKD networks becomes a reality, the question of optimal resource allocation, intrinsically linked to cost considerations, becomes relevant and important, as is the case for any telecommunication network infrastructure. It becomes therefore necessary to consider QKD from a cost perspective, and in particular study the potential trade-offs of cost and performance that can occur in this context.
Following the above arguments, we consider in this work the design of QKD networks from a topology viewpoint, and present techniques and analytical models that can be used to optimize the spatial distribution of QKD devices and QKD nodes within specific network architectures in order to guarantee a given level of service to the network users, at a minimum cost. We also study how cost minimization arguments influence the optimal working points of QKD links. We show in particular that, in the perspective of QKD networks, individual QKD links should be operated at an optimal working distance that can be significantly shorter than their maximum attainable distance.
The paper is structured as follows. In section~\ref{sec:QKDnetworks}, we define a QKD network and discuss the topology and characteristics of the network architecture that we consider in this work. We also introduce the concept of a backbone network structure. In section~\ref{sec:Optimization}, we present our calculations and results on network topological optimization based on cost arguments. In particular, we provide a comprehensive set of modeling tools and cost function calculations in specific network configurations, and discuss the effect of our results on the design of practical QKD networks. Finally, in section~\ref{sec:perspectives}, we discuss open questions and future perspectives for QKD networks.
\section{QKD networks}
\label{sec:QKDnetworks}
\noindent \emph{Definition and types of QKD networks}
\noindent Extending the range of quantum key distribution systems to very long distances, and allowing the exchange of secret keys between multiple users necessitates the development of a network infrastructure connecting multiple individual QKD links. Indeed, QKD links are inherently only adapted to point-to-point key exchange between the two endpoints of a quantum channel, while the signal-to-noise ratio decrease occurring with propagation loss ultimately limits their attainable range. It is then natural to consider QKD networks as a means to overcome these limitations.
A QKD network is an infrastructure composed of QKD links, \emph{i.e.} pairs of QKD devices linked by a quantum and a classical communication channel connecting two separate locations, or nodes. These links are then used to connect multiple distant nodes. Based on these resources and using appropriate protocols, this infrastructure can enable the unconditionally secure distribution of symmetric secret keys between any pair of legitimate users accessing the network.
QKD networks can be categorized in two general groups~\cite{salvail:jcs09}: networks that create an end-to-end quantum channel between the two users, and networks that require a transport of the key over many intermediate trusted nodes. In the first group, we find networks in which a classical optical function such as switching or multiplexing is applied at the node level on the quantum signals sent over the quantum channel. This approach allows multi-user QKD but cannot be used to extend the key distribution distance. Much more advanced members of this group are the quantum repeater based QKD networks. Quantum repeaters~\cite{briegel:prl98} can create a perfect end-to-end quantum channel by distributing entanglement between any two network users. The implementation of quantum repeaters, however, requires complex quantum operations and quantum memories, whose realization remains an experimental challenge. The same is true for the simpler version of quantum repeaters, namely quantum relays~\cite{collins:jmo05}, which on the one hand do not require a quantum memory but on the other cannot arbitrarily extend the QKD communication distance.\\
\noindent \emph{Trusted repeater QKD networks: characteristics and assumptions}
\noindent In this work, we are interested in the second group of networks, which we call \emph{trusted repeater QKD networks}. In these networks, the nodes act as trusted relays that store locally QKD-generated keys in classical memories, and then use these keys to perform long-distance key distribution between any two nodes of the network. Therefore, trusted repeater QKD networks do not require nodes equipped with quantum memories; they only require QKD devices and classical memories as well as processing units placed within secure locations, and can thus be deployed with currently available technologies. Indeed, the implementation of such networks has been the subject of several international projects~\cite{elliott:qp05,secoqc,dianati:scn08, peev:inprep09}.
As we will see in detail in the following section, the analysis of trusted repeater QKD networks from a topology viewpoint and with the goal of achieving optimization based on cost considerations involves modeling several characteristics of such a network, namely the \emph{user distribution}, the \emph{node distribution}, the \emph{call traffic}, and the \emph{traffic routing}. The user and node distributions, denoted by $\Pi$ and $M$ respectively, will be considered as Poisson stochastic point processes, and will be thus modeled using convenient stochastic geometry tools. Modeling the traffic demand is particularly subtle because of the variation with respect to time and distance that this traffic may feature in a real network. Calculations here will neglect these variations and will be performed under the assumption of a uniform call volume between any pair of users, denoted as $V$.
Finally, routing in trusted repeater QKD networks is performed according to the following general principle: First, local keys are generated over QKD links and are stored in nodes that are placed on both ends of each link. Global key distribution is then performed over a QKD path, \emph{i.e.} a one-dimensional chain of trusted relays connected by QKD links, establishing a connection between two end nodes. Secret keys are forwarded, in a hop-by-hop fashion, along these QKD paths. To ensure their secrecy, one-time pad encryption and information-theoretically secure authentication, both realized with a local QKD key, are performed. End-to-end information-theoretic security is thus obtained between the end nodes, provided that the intermediate nodes can be trusted.\\
\noindent \emph{Quantum backbone network architecture}
\noindent Introducing hierarchy into network design can be an extremely convenient architectural tool because it allows to break complex structures into smaller and more flexible ensembles. Indeed, such hierarchical levels offer an efficient way to help solve resource allocation problems arising in networks, ranging from network routing to network deployment planning. In this work, we will associate the notion of hierarchy in QKD networks with the existence of what we will call a \emph{quantum backbone network}.
In classical networks and especially the Internet, a backbone line is a larger transmission line that carries data gathered from smaller lines that interconnect with it. By analogy with this definition, the backbone QKD network is an infrastructure for key transport that gathers the traffic of secret key from many individual QKD links. QKD backbone links and nodes clearly appear as mutualized resources shared to provide service to many pairs of users. Keeping the fruitful analogy with classical networks, we will call \emph{access QKD links} the point-to-point links used to connect QKD end users to their nearest QKD backbone node.
The principle of traffic routing that we described above can be conveniently transposed in the context of backbone networks. In this case, traffic from individual users is gathered locally to backbone QKD nodes. This mutualized traffic is then routed hop-by-hop over the backbone structure. Furthermore, it is important to note that the node and user point process distributions are distinct when a backbone network is considered, which might not be the case in a network without backbone.\\
In the following, we will derive cost functions for different QKD network configurations, under the above assumptions regarding the topology and the way traffic is routed in these networks, and as a function of the characteristics of individual QKD links. We will then use the results to discuss how QKD networks should be dimensioned, the optimal working points of QKD links, as well as the interest of adopting a hierarchical architecture, materialized by the existence of a backbone, in QKD networks.
\section{Topological optimization based on cost arguments}
\label{sec:Optimization}
\subsection{QKD links: characterizing the rate versus distance}
\label{subsec:qkdlinkrate}
The main element underlying the cost optimization related to the deployment of quantum networks is the intrinsic performance of QKD links. This performance can essentially be summarized by the function $R(\ell)$, which gives the rate, in bit/s, of secret key that can be established over a QKD link of length $\ell$.
Clearly, this secret key bit rate varies from system to system and comparisons between systems are thus difficult to establish. Moreover, comparisons have to be related to the security proofs for which the secret key bit rates have been derived. Security proofs are not yet fully categorized, although important steps in this direction have been taken~\cite{scarani:qp08}.
As shown on figure~\ref{fig:RateQKDLink}, the typical curve describing the variation with distance of the logarithm of the mean rate of secret bit establishment $R(\ell)$ can be essentially separated into two parts:
\begin{figure}[!h]
\begin{center}
\includegraphics[width=11.5cm]{RateQKDLink2.eps}
\caption{Typical profile of the Rate versus Distance curve for a single QKD link. }
\label{fig:RateQKDLink}
\end{center}
\end{figure}
\begin{itemize}
\item A {\bf linear} part that is the region where the rate of secret key establishment varies as a given power of the propagation attenuation. Since the attenuation $\eta(\ell)$ is exponentially increasing with distance, $\log R(\ell)$ is linear in $\ell$.
\item An {\bf exponential drop-off} at longer distances, where the error rate rapidly increases due to the growing contribution of detection dark counts. In this region, the decrease of the secret key rate is multi-exponential with distance. The slope of the curve representing $\log R(\ell)$ is thus becoming increasingly steep until a maximum distance is reached.
\end{itemize}
For completeness, it is also important to mention the possibility that, for short distances, the secret bit rate could be limited by a saturation of the detection setup. This will be the case if the repetition rate at which the quantum signals are sent in the quantum channel exceeds the bandwidth of the detector. We will however not investigate this possibility any further in the remaining of this work.
The behavior of the secret bit rate function $R(\ell)$ can be described using essentially three parameters, schematically shown on figure~\ref{fig:RateQKDLink}:
\begin{enumerate}
\item The secret bit rate at zero distance, $R_0$;
\item The scaling parameter $\lambda_{\textrm{\tiny QKD}}$ in the linear region such that $R(\ell)= R_0 \, e^{-\ell/\lambda_{\textrm{\tiny QKD}}}$;
\item The distance at which the scaling of the rate becomes exponential, which is comparable to the maximum attainable distance, $D_{\textrm{\tiny drop}} \sim D_{\textrm{\tiny max}}$.
\end{enumerate}
$R_0$ is determined by the maximum clock rate of the QKD system. In QKD relying on photon-counting detection setups, $R_0$ is limited by the performance of the detectors, and is usually in the Mbit/s range. Clearly, the solutions allowing to improve the performance of the detectors have a direct impact on $R_0$~\cite{diamanti:pra05,yuan:apl07,hadfield:oe05,ma:ieeecl07}. For QKD systems relying on continuous variables~\cite{grosshans:nature03}, based on homodyne detection performed with fast photodiodes, the experimental bound on $R_0$ can be significantly higher, potentially in the Gbit/s range. The computational complexity of the reconciliation however currently limits $R_0$ in the Mbit/s range in the practical demonstrations performed so far~\cite{lodewyck:pra07}.
The scaling parameter $\lambda_{\textrm{\tiny QKD}}$ is essentially determined by the attenuation $\eta(\ell)$ over a quantum channel of length $\ell$, and by a coefficient $r$ that is mainly related to the security proof that can be applied to the experimental system. In the case of a typical network based on optical fibers, the attenuation $\eta(\ell)$ can be parametrized by an attenuation coefficient $\alpha$ (in dB/km) as $\eta(\ell)= 10^{- \alpha \ell/10}$ (for scaling of the attenuation in free space, see~\cite{scarani:qp08}). In the linear part of the curve shown on figure~\ref{fig:RateQKDLink}, the rate $R(\ell)$ varies as a given power $r$ of the attenuation, $R(\ell)= R_0 \, \eta(\ell)^r$. We can thus define the scaling parameter as $\lambda_{\textrm{\tiny QKD}} = 10/(\alpha \,r\,\log(10))$. For QKD performed at telecom wavelengths, with protocols optimized for long distance operation, we can take $\alpha = 0.22$~dB/km and $r=1$, which leads us to $\lambda_{\textrm{\tiny QKD}} = 19.7$~km, as the typical scaling distance for such QKD systems. This parameter is important since, as we shall see in the following, the optimal working distance of QKD links will essentially scale as $\lambda_{\textrm{\tiny QKD}}$.
Finally, the existence of a rapid drop-off of the secret key rate at distances around $D_{\textrm{\tiny drop}}$ arises when the probability to detect some signal sent in the quantum channel, $p_s$, becomes comparable to the probability to detect a dark count per detection time slot, $p_d$. This occurs around the distance $D_{\textrm{\tiny drop}}$, for which we have $p_s \simeq \exp(-D_{\textrm{\tiny drop}}/\lambda_{\textrm{\tiny QKD}}) \times \eta_{d}$, where $\eta_{d}$ represents the detector efficiency. We thus find $D_{\textrm{\tiny drop}} \simeq \lambda_{\textrm{\tiny QKD}} \, \log(\eta_d/p_d)$. In practice, when working with InGaAs single-photon avalanche photodiodes (SPADs) operating at 1550~nm, the ratio $\eta_d/p_d$ is optimized by varying the different external parameters of the detector such as the temperature, gate voltage or time slot duration. The best published performances for InGaAs SPADs \cite{zbinden:apb98,kosaka:el03} report values of the dark counts $p_d \simeq 10^{-7} \, \textrm{to} \, 10^{-6}$ for a detection efficiency $\eta_d$ around $10 \%$, which leads to $D_{\textrm{\tiny drop}} \sim D_{\textrm{\tiny max}} \sim 100-120$~km for QKD systems employing such detectors. For a similar detection efficiency, the best available superconducting single-photon detectors (SSPDs) present dark counts $p_d \simeq 10^{-8} \, \textrm{to} \, 10^{-6}$ ~\cite{korneev:jstqe07}, leading to a maximum distance that can reach 140~km.
\subsection{Toy model for QKD network cost derivation: a linear chain between two users}
\label{subsec:chain}
\emph{The linear chain as a simple asymptotic model of a quantum backbone network}
\noindent As a first example of QKD network cost derivation and optimization, we will consider what we will call the linear chain scenario. In particular, we consider two users, A and B, that want to rely on QKD to exchange secret keys in a scenario that imposes the use of several QKD links:
\begin{itemize}
\item The two QKD users are \emph{very far away}: their distance is $L = ||AB||$ with $L \gg D_{\textrm{\tiny max}}$.
\item The two QKD users are exchanging secret bits at a \emph{very high rate}. We will call $V$ the volume of calls between the two users A and B (units of $V$: bits of secret key), and will assume $V \gg R_0$.
\end{itemize}
Because of the first condition, many intermediate nodes have to be used as trusted key relays to ensure key transport over QKD links from A to B. Because of the second condition, many QKD links have to be deployed in parallel to reach a secret key distribution rate capacity at least equal to the traffic volume.
The linear chain QKD network scenario is in a sense the simplest situation in which an infrastructure such as a quantum backbone network, described in section~\ref{sec:QKDnetworks}, is required. It therefore provides an interesting toy model for cost optimization and topological considerations.\\
\noindent \emph{Cost model: assumptions and definitions}
\noindent The generic purpose of cost optimization is to ensure a given objective in terms of service, at the minimum cost. In the case of the linear chain scenario, this objective is to be able to offer a secret bit rate of $V$~bit/s between two users A and B separated by a distance $L$, while minimizing the cost of the network infrastructure to be deployed.
In this and all subsequent models, we will consider as the total cost $\mathcal{C}$ of a QKD network, the cost of the equipment to be deployed to build the network. This can be seen as a simplifying assumption, since it is common, in network planning, to differentiate between capital and operating expenditures. We have chosen here to restrict our models to capital expenditures of QKD networks and will consider that their cost is arising from two sources:
\begin{itemize}
\item The cost of QKD link equipment to be deployed. We will denote as $C_{\textrm{\tiny QKD}}$ the unit cost per QKD link. $C_{\textrm{\tiny QKD}}$ essentially corresponds to the cost of a pair of QKD devices. Note that here we implicitly assume that the deployment of optical fibers is \emph{for free}, or more precisely that it is done independently and prior to the deployment of a QKD network.
\item The cost of node equipment, which we denote as $C_{\textrm{\tiny node}}$. $C_{\textrm{\tiny node}}$ typically corresponds to the hardware cost (for example some specific kind of routers need to be deployed inside QKD nodes), as well as the cost of the security infrastructure that is needed to make a QKD node a trusted and secure location.
\end{itemize}
As explained before and shown on figure~\ref{fig:1DQKDChain}, a linear chain QKD network is composed of a one-dimensional chain where adjacent QKD nodes are connected by QKD chain segments, each segment being potentially composed of multiple QKD links to ensure that a capacity equal to the traffic volume is reached.\\
\begin{figure}[!h]
\begin{center}
\includegraphics[width=13cm]{1DChainQKD.eps}
\end{center}
\caption{The one-dimensional QKD chain linking two QKD users, Alice and Bob, over a distance $L$. Since $L$ is considered much longer than the maximum span of a QKD link, $D_{\textrm{\tiny max}}$, intermediate QKD nodes are needed to serve as trusted relays.}
\label{fig:1DQKDChain}
\end{figure}
\noindent \emph{Total cost of the linear chain QKD network}
\noindent For convexity reasons, discussed in more detail at the end of this section, the topology ensuring the minimum cost will correspond to place QKD nodes at regular intervals between A and B. We denote by $\ell$ the distance between two intermediate nodes, which then corresponds to the distance over which QKD links are operated within the linear chain QKD network. As we shall see, the question of cost minimization will reduce to finding the optimum value of QKD link operational distance, $\ell^{\textrm{\tiny opt}}$, for the linear chain QKD network.
There are clearly two antagonistic effects in the dependence of the total cost of the considered network on $\ell$:
\begin{itemize}
\item On the one hand, if QKD links are operated over long distances, their secret bit capacity $R(\ell)$ decreases. This will impose the deployment of more QKD links in parallel, on each chain segment linking two adjacent QKD nodes, and thus tends to increase the total cost.
\item On the other hand, it is clear that increasing the operating distance $\ell$ allows to decrease the required number of intermediate trusted relay nodes, which leads to a decreased cost.
\end{itemize}
The optimum operating distance $\ell^{\textrm{\tiny opt}}$ corresponds to the value of $\ell$ that minimizes the total cost function $\mathcal{C}$:
\begin{equation}
\mathcal{C} = C_{\textrm{\tiny QKD}} \, \frac{L}{\ell} \, \frac{V}{R(\ell)} + C_{\textrm{\tiny node}} \frac{L}{\ell}
\label{eq:C1D}
\end{equation}
It is important to note that, in the above equation, we have made the assumption that we can neglect the effects of discretisation. This means that the length of the chain, $L$, can be considered much longer than the length of individual QKD links, $\ell$, and that the traffic volume $V$ can be considered as a continuous quantity, neglecting the discrete jumps associated to variations in the number of calls.
\vspace{0.5cm}
\noindent \emph{Cost minimization and optimum working distance of QKD links}
\noindent In the asymptotic limit of very high traffic volume $V$, the cost of nodes can be neglected in comparison with the cost of QKD devices. The expression of the total cost in equation~(\ref{eq:C1D}) then reduces to the first term, and we have the following interesting properties:
\begin{itemize}
\item The total cost is directly proportional to the product of the traffic volume $V$ and the total distance $L$.
\item Optimizing the total cost $\mathcal{C}$ is equivalent to minimizing $C(\ell)/\ell$ where $C(\ell) = C_{\textrm{\tiny QKD}}/R(\ell)$ is
the per-bit cost of one unit of secret key rate.
\end{itemize}
Furthermore, assuming that QKD links are operated in the linear part of their characteristic (see figure~\ref{fig:RateQKDLink}), we can write $C(\ell) = \frac{C_{\textrm{\tiny QKD}}}{R_0} e^{\, \ell/\lambda_{\textrm{\tiny QKD}}}$. Then, the value of $\ell^{\textrm{\tiny opt}}$ that minimizes the quantity $C(\ell)/\ell$ can be explicitly derived as
\begin{equation}
\ell^{\textrm{\tiny opt}} = \lambda_{\textrm{\tiny QKD}} \; ,
\end{equation}
where $\lambda_{\textrm{\tiny QKD}}$ was defined in section \ref{subsec:qkdlinkrate} as the natural scaling parameter of the function $R(\ell)$.
In the general case, the second term of the cost function in equation~(\ref{eq:C1D}), corresponding to the cost of nodes, cannot be neglected. This second term does not depend on the volume of traffic $V$, and is always decreasing with $\ell$. As a consequence, the optimum operating distance that minimizes $\mathcal{C}$ will always be greater than $\lambda_{\textrm{\tiny QKD}}$, the value minimizing the first term in equation~(\ref{eq:C1D}).
Under the assumption that the optimum distance will remain in the linear part of the function $\log R(\ell)$, we can derive the following implicit relation for $\ell^{\textrm{\tiny opt}}$:
\begin{equation}
\ell^{\textrm{\tiny opt}} = \lambda_{\textrm{\tiny QKD}} \, \Big( 1 + \frac{C_{\textrm{\tiny node}} }{C_{\textrm{\tiny QKD}}} \, \frac{R_0}{V} e^{\, -\ell^{\textrm{\tiny opt}}/\lambda_{\textrm{\tiny QKD}}} \Big)
\label{eq:LoptWithNode}
\end{equation}
The above equation allows for a quantitative discussion of the ``weight'' of the nodes in the behavior of the cost function. Indeed, we can see that the influence of the node cost is potentially important and can lead to an optimum working distance that can be significantly greater than $\lambda_{\textrm{\tiny QKD}}$ when $ \frac{C_{\textrm{\tiny node}} }{C_{\textrm{\tiny QKD}}} \, \frac{R_0}{V} \gg 1$.\\
\noindent \emph{Existence of an optimum working distance and convexity of $C(\ell)$}
\noindent In most of the explicit derivations performed in this work, we assume a purely linear dependency of $\log R(\ell)$ on $\ell$. This assumption is convenient but remains an approximation since it does not take into account the drop-off of $R(\ell)$ occurring around $D_{\textrm{\tiny drop}}$.
It is however possible to demonstrate the existence of an optimum working distance for QKD links in a more general case, by solely relying on the assumption that the function $R(\ell)$ is log-concave, \emph{i.e.} that $\log R(\ell)$ is concave. The log-concavity of $R(\ell)$ can be checked on a simple model inspired by the secret key rate formula for the BB84 QKD protocol with perfect single photons~\cite{scarani:qp08}. In particular, in this case we have $R(p)= 1 - 2 h(p)$, where $h(p)$ is the entropy associated to a quantum bit error rate $p$, and assume that the dependence of the error rate $p$ on the distance is of the form $p = a + b / \eta(\ell) = a + b ^{\, \ell/\lambda_{\textrm{\tiny QKD}}} $, where $a$ and $b$ are parameters linked to the detection system. In this setup, it is straightforward to verify numerically that $\log R(\ell)$ is concave for all reasonable values of $a$ and $b$.
Since $C(\ell)$, the per-unit cost of secret bit rate on a QKD link, is proportional to $1/R(\ell)$, the log-concavity of $R(\ell)$ implies the log-convexity of $C(\ell)$, which itself implies the convexity of $C(\ell)$. Finally, we can write the total cost of the linear chain QKD network as the sum of the cost of each chain segment and the cost of the node equipment, namely
$$
\mathcal{C}(\ell_0,\dots,\ell_n) = V \, \sum_{i=0}^{n} C(\ell_i) + n\, C_{\textrm{\tiny node}} \;.
$$
In the above equation, $\ell_0$ denotes the distance between A and the first node, $\ell_k$, $k=1,\dots n-1$, the distance between the $k$th node and the $k+1$th node, and $\ell_n$ the distance between the last node and B. For a convex function $C$, the minimization of $\sum_{i=0}^{n} C(\ell_i)$ under the constraint $\sum_{i=0}^{n} \ell_i=L$, where $L$ is the distance between A and B, is obtained with $\ell_i=L/(n+1)$ for all $i$. Once we set $\ell_i=L/(n+1)$, the cost expression in the above equation only depends on $n$, or equivalently on $\ell=L/(n+1)$. For large $L$, we can disregard the fact that $\ell$ is an integer divider of $L$ and approximate $(n+1)/n$ by 1, which then leads to equation~(\ref{eq:C1D}).
\subsection{Cost of QKD networks: towards more general models}
\label{subsec:costgeneral}
The linear chain toy model developed in section~\ref{subsec:chain} provides an interesting intuition into the behavior of the cost function. The most important result is that, in the limit of large traffic rates and/or low cost of QKD nodes, the QKD network cost optimization reduces to the minimization of $C(\ell)/\ell \sim 1 / (R(\ell) \ell)$. This leads to the existence of an optimum working distance, $\ell^{\textrm{\tiny opt}}$, at which QKD links need to be operated in order to minimize the global cost of the network deployment.
The linear chain QKD network model is however too restrictive in many aspects: it is one-dimensional and limited to the description of a network providing service to two users. We will now consider more general models, which allow us to study the more realistic case of QKD networks spanning a two-dimensional area, and providing service to a large number of users.\\
\noindent \emph{Modeling network spatial processes with stochastic geometry}
\noindent Stochastic geometry is a very useful mathematical tool for modeling telecommunication networks. It has the advantage of being able to describe the essential spatial characteristics of a network using a small number of parameters~\cite{baccelli:ts97}. It thus allows to study some general characteristics of a given network, like the behavior of its cost function, under a restricted set of assumptions. This approach fits well with the objectives of this work, and so we have employed stochastic tools to model a QKD backbone network.
As we shall see, instead of calculating the cost of a QKD network for fixed topologies and traffic usage, we will try to understand the general behavior of the cost function by calculating the \emph{average} cost function, where the average will be taken over some probability distributions of spatial processes modeling QKD users and QKD node locations.
The collection of spatial locations of the QKD nodes over the plane will be represented by a spatial point process $M=\{ X_i\}$. Then, as illustrated in figure~\ref{fig:Voronoi}, we define a corresponding partition of the plane~\footnote{More accurately, the geometrical object we consider here is a tesselation, the boundaries of which are neglected.} as the ensemble of the convex polygons $\{ D_i\}$, known as the Vorono\"{\i} cells of nucleus $\{ X_i\}$. Each Vorono\"{\i} cell $ D_i$ is constructed by taking the intersection of the half-planes bounded by the bisectors of the segment $[X_i, X_j]$ and containing $ X_i$. The system of all the cells creates the so-called Vorono\"{\i} partition. Finally, we define the Delaunay graph as the graph, whose vertices are the $\{ X_i\}$ and whose edges are formed by connecting each Vorono\"{\i} cell nucleus $\{ X_i\}$ with the nuclei of the adjacent Vorono\"{\i} cells.\\
\begin{figure}[!h]
\begin{center}
\includegraphics[width=9cm]{VoronoiMarkov.eps}
\caption{Thick black lines: Vorono\"{\i} partition associated to a given distribution of nodes. Thin black lines: the Delaunay graph, connecting the center of neighboring Vorono\"{\i} cells. In the backbone QKD network model, backbone QKD links will indeed correspond to the Delaunay graph, while backbone nodes correspond to the nucleus of the Vorono\"{\i} cells. We have also represented on the same figure a typical end-to-end path, between two QKD users $u$ and $v$, under the Markov-path routing policy (see text in section~\ref{subsec:stochasticQBB} for details).}
\label{fig:Voronoi}
\end{center}
\end{figure}
\noindent \emph{User distribution and traffic}
\noindent In the remaining of this paper, and in contrast to the linear chain toy model developed in section~\ref{subsec:chain}, we will consider QKD networks providing secret key distribution service to a large number of users, distributed over a two-dimensional area.
The user distribution will be modeled by a Poisson stochastic point process, $\Pi=\{U_i\}$, defined over the support $D$ of size $L \times L$, while the average number of QKD users will be denoted by $\mu$. The point process $\Pi$ will also be assumed to have an intensity density $f$ satisfying $\mu=\int f <\infty$, which means that for every set $E$ the number of users within $E$ is a Poisson random variable with mean $\int_E f$.
Finally, whenever this additional assumption will prove to be useful to perform the desired calculations, we will consider that the distribution of users is homogeneous over $D$, \emph{i.e.} that the intensity function $f$ is constant over $D$. We will denote this constant user density by $1/\alpha_{\textrm{\tiny u}}^2$ so that $\alpha_{\textrm{\tiny u}}$ corresponds to a distance (it can be shown that for large $L$, $\alpha_{\textrm{\tiny u}}/2$ is the average distance between the origin and the point $U_i$ closest to the origin). We will have in this case:
\begin{equation}
\label{eq:mudef}
\mu=\int f = \left(L/\alpha_{\textrm{\tiny u}}\right)^2 \; .
\end{equation}
For the traffic model, we will generalize the assumption made for the linear chain QKD network model: the traffic between any pair of QKD users will be seen as an aggregate volume of calls (expressed in units of secret key exchange rate). The volume of traffic will be assumed to be the same between any pair of users, and will be denoted by $V$.\\
\noindent \emph{QKD networks with or without a hierarchical architecture}
\noindent As was discussed in section~\ref{sec:QKDnetworks}, it is interesting to study to which extent deploying a structure such as a backbone, which is synonymous to the existence of hierarchy in a network, would be advantageous in the case of QKD networks. To this end, continuing to place ourselves in the perspective of cost optimization, we will derive cost functions for QKD network models with or without a quantum backbone. The obtained results will then allow us to establish comparisons and thus discuss the interest of hierarchy in quantum networks.
\subsection{Cost function for a two-dimensional network without backbone: the generalized QKD chain model}
\label{subsec:2Dchain}
A direct way to generalize the two-user one-dimensional chain model presented in section~\ref{subsec:chain} is simply to assume that a chain of QKD links and intermediate nodes will be deployed between each pair of users $u$ and $v$ within the QKD network. Each chain will therefore be dimensioned in order to accommodate a volume $V$ of calls. The routing of calls is trivial on such a network. The distance between the intermediate nodes on a chain will be denoted by $\ell$, as in section~\ref{subsec:chain}.
Here as well, we neglect the effects of discretisation, \emph{i.e.} the length of the chains, $||u-v||$, will be considered much longer than the length of individual QKD links, $\ell$, and the traffic volume $V$ will be considered a continuous quantity. Under these assumptions, we know that the cost associated with a pair of users located respectively at positions $u$ and $v$ and exchanging a volume $V$ of calls is (see equation~(\ref{eq:C1D}))
\begin{equation}
\mathcal{C}^{\textrm{\tiny pair}}(u,v) = V \, ||u-v|| \, C(\ell)/\ell \,+ \, (||u-v||/\ell) C_{\textrm{\tiny node}}
\label{eq:Cchain}
\end{equation}
Recall that the distribution of users is described by a Poisson point process $\Pi=\{U_i\}$. Then, we can calculate the average total cost of the QKD network, $\mathcal{C}$, by summing up the costs $\mathcal{C}^{\textrm{\tiny pair}}(U_k,U_l)$ associated with the QKD chains deployed between each pair of users over $k\neq l$ and then average this sum over the stochastic user point process $\Pi$:
\begin{eqnarray}
\label{eq:Cchaintotal}
\mathcal{C} & = \mathbb E \left[\sum_{k \neq l} \mathcal{C}^{\textrm{\tiny pair}}(U_k, U_l)\right] \nonumber \\
& = \mathbb E \left[\sum_{k \neq l} V \, ||U_k-U_l|| \, C(\ell)/\ell \,+ \, ||U_k-U_l|| C_{\textrm{\tiny node}}\right] \nonumber \\
& = ( V \, C(\ell)/\ell \, + C_{\textrm{\tiny node}}/\ell ) \,\delta \;,
\end{eqnarray}
where $\delta$ is the average sum of distances over all pairs of two different users, namely
\begin{equation}
\label{eq:deltaDef}
\delta=\mathbb E \left[\sum_{k \neq l} ||U_k-U_l||\right] \;.
\end{equation}
For a homogeneous Poisson point process $\Pi$ with spatial density of users $\alpha_{\textrm{\tiny u}}^{-2}$ over a square domain $D$ of size $L\times L$, it is possible to perform the exact integral calculation of $\delta$, yielding
\begin{equation}
\label{eq:deltaVal}
\delta=\gamma \,L^5/\alpha_{\textrm{\tiny u}}^{4}\quad\textrm{with}\quad\gamma = \frac{1}{3} \log ( 1+ \sqrt2) + \frac{2 + \sqrt2}{15} \simeq 0.5214\;.
\end{equation}
\subsection{Cost function for a two-dimensional QKD network with backbone}
\label{subsec:cost2Dbackbone}
The backbone architectures we will consider in this work are \emph{topological}: for a given distribution of QKD nodes, which will be either deterministic (section~\ref{subsec:square}) or stochastic (section~\ref{subsec:stochasticQBB}), the backbone cells and backbone links will strictly coincide with the Vorono\"{\i} cells and the edges of the corresponding Delaunay graph defined above, respectively.\\
\noindent \emph{Routing traffic over a QKD backbone network}
\noindent The backbone hierarchical structure provides a convenient way to solve the routing problem that we have adopted in our cost calculations. For a given origin-destination pair of users (A,B) wishing to exchange a volume of calls $V_{AB}$, the traffic is routed in the following way:
\begin{itemize}
\item The traffic goes from A to its nearest QKD backbone node $X_A$ (center of the backbone cell containing A), through a single QKD link (an access link).
\item The traffic is routed through the {\bf optimal (less costly) path} over the backbone QKD network from $X_A$ to $X_B$ (QKD node closer to B).
\item The traffic goes from $X_B$ to B.
\end{itemize}
The routing rule defined above can be characterized as \emph{geographical}, in the sense that it is driven by distance considerations. However, determining the optimal path in a given backbone network of arbitrary topology may not be a tractable problem. Even in standard networks, where the optimal path is the shortest one, an analytic computation of the average length/cost is not always possible. In the context of backbone nodes distributed as a Poisson point process, an alternative suboptimal routing policy, the so called \emph{Markov path}, has been proposed, and leads to analytic computation of the average path length. In QKD networks, the cost is a non-linear function of the length and some adjustments are required. We consider two different geometries for the backbone:
\begin{enumerate}
\item A square backbone QKD network (section~\ref{subsec:square}), \emph{i.e.} a regular structure where nodes and links form a regular graph of degree 4. In this case finding the length of the shortest path between two nodes is trivial: backbone nodes $X_A$, $X_B$ can be designated by cartesian coordinates $(x_A, y_A)$, $(x_B, y_B)$ and the shortest path length is simply $|x_A - x_B| + |y_A - y_B| $. Moreover, cost calculations are simplified using the fact that the links between two neighbor nodes of the backbone all have the same length.
\item A stochastic backbone network (section~\ref{subsec:stochasticQBB}), where backbone nodes are distributed following a random point process
and backbone cells are the corresponding Vorono\"{\i} partition. For this stochastic backbone, we have used a routing technique called \emph{Markov-path routing} for which, as previously established by Tchoumatchenko \emph{et al.}~\cite{tchoumatchenko:phd99,baccelli:aap00}, the average length of routes can be calculated. In the following, we will adapt these calculations to our cost function $C(\ell)$.\\
\end{enumerate}
\noindent \emph{Generic derivation of the cost function for QKD backbone networks}
\noindent For a QKD network with a backbone structure, we define $M=\{X_i\}$ as the point process of the network node distribution, and $\Pi=\{U_i\}$ as the point process of the network user distribution, with intensity density $f$. Each node $X_i$ is connected to some nodes in its neighborhood and to the clients belonging to the associated cell $D_i$. In the following, we will assume that $M$ is statistically independent of $\Pi$, and that the cells $D_i$ are the Vorono\"i cells associated to $M$, that is
\begin{equation}
\label{eq:voronoiCell}
D_i= \left\{x\;:\;\|x-X_i\|\leq \inf_{j\neq i}\|x-X_j\|\right\}\;.
\end{equation}
In the case of the QKD backbone network, our routing policy allows to calculate $C^{\textrm{\tiny pair}}(u,v;M)$, the QKD equipment cost associated with sending one unit of call between users $u$ and $v$, over a network whose backbone nodes are described by the point process $M$:
\begin{equation*}
C^{\textrm{\tiny pair}}(u,v;M) = \left\{ \begin{array}{ll}
C(\|u-X_i\|)+C(\|v-X_i\|) \\
\;\;\;\;\;\;\;\;\textrm{ if } u,v\in D_i \\
C(\|u-X_i\|)+C(\|v-X_j\|)+ C^{\textrm{\tiny hop}}(i,j;M) \\
\;\;\;\;\;\;\;\;\textrm{ if } u\in D_i\textrm{ and }v\in D_j\textrm{ with } i\neq j \;,
\end{array} \right.
\end{equation*}
where $C(\ell)$ is the cost spent to send a secret bit on a QKD link over a distance $\ell$ and $C^{\textrm{\tiny hop}}(i,j;M)$ is the cost to send a secret bit between the nodes $X_i$ and $X_j$ of the backbone for the given routing policy.
Given that the volume between each pair of users is $V$, the average total cost $\mathcal{C}$ of the QKD network then reads
\begin{equation*}
\mathcal{C} = \mathcal{C}^{\textrm{\tiny QKD}} + \mathcal{C}^{\textrm{\tiny node}} = V \times \mathbb E \left[\sum_{k\neq l} C^{\textrm{\tiny pair}}(U_k,U_l;M)\right] + C_{\textrm{\tiny node}}\,N^2 \;,
\end{equation*}
where $N^2$ is the average number of nodes of the backbone deployed in the domain $D$ of size $L\times L$. Here $\mathbb E$ denotes the average cost over the spatial distributions of users and backbone nodes, that is over the realizations of $\Pi$ and $M$. Since $M$ and $\Pi$ are supposed independently distributed, we may compute this average successively with respect to $M$ and $\Pi$. The total cost, averaged only over $\Pi$, can be decomposed as follows:
\begin{eqnarray*}
\fl \mathbb E \left[\sum_{k\neq l} C^{\textrm{\tiny pair}}(U_k,U_l;M) \right] & = \int C^{\textrm{\tiny pair}}(u,v;M) \, f(u)\,f(v) \,du\,dv \\
& = \sum_k \int_{D_k\times D_k} \left\{C(\|u-X_k\|)+C(\|v-X_k\|)\right\}\, f(u)\,f(v) \,du\,dv \\
& \hspace{0.1cm} + \sum_{k\neq l}\int_{D_k\times D_l} \left\{C(\|u-X_k\|)+C(\|v-X_l\|)+ C^{\textrm{\tiny hop}}(k,l;M)\right\}\,f(u)\,f(v) \,du\,dv \\
& = \sum_k\sum_l \int_{D_k\times D_l} \left\{C(\|u-X_k\|)+C(\|v-X_l\|)\right\}\, f(u)\,f(v) \,du\,dv \\
& \hspace{0.1cm} + \sum_{k\neq l}\int_{D_k\times D_l} C^{\textrm{\tiny hop}}(k,l;M)\,f(u)\,f(v) \,du\,dv \\
\end{eqnarray*}
As we can see from the last expression, the total cost $\mathcal{C}$ can be separated in three terms:
\begin{equation}
\label{eq:totalCost}
\mathcal{C} =: \Iloc +\Ibb\ + \mathcal{C}^{\textrm{\tiny node}}\;,
\end{equation}
where $\Iloc$ takes into account all connections from one client to the closest backbone node, $\Ibb$ all connections from one backbone node to another, and $\mathcal{C}^{\textrm{\tiny node}}$ is the cost of node equipment. The explicit models that we will study will allow us to compare the behavior of these different terms and thus to understand how QKD network backbone topologies can be optimized.
\subsection{Cost calculations for two explicit quantum backbone models}
\label{subsec:costcalc}
\subsubsection{Cost of the square backbone QKD network}
\label{subsec:square}
\paragraph{Network model:} We consider, as a first simple example, the case of a QKD backbone network that has a perfectly regular topology, and for which the shortest path length between two backbone nodes is easily determined.
The architecture we consider is the following: users are distributed as previously over a large area $D$ of size $L\times L$ and the backbone QKD network is a regular graph of degree 4, \emph{i.e.} the backbone QKD nodes and links constitute a square network. The structure of the square backbone QKD network and the way a call is routed is summarized on figure~\ref{fig:SquareBB}. The free parameter with respect to which we will perform the cost optimization is the size of backbone cells $\alpha_{\textrm{\tiny bb}}$. We will also make the assumption that the user density function $f$ is uniform over $D$.
\begin{figure}[!h]
\begin{center}
\includegraphics[ width= 11 cm]{SquareQKDBB.eps}
\caption{Structure of a two-dimensional regular square backbone network: a regular array of cells of dimension $\alpha_{\textrm{\tiny bb}}$ spans
a region of size $L\times L$. The user distribution is described by a random point process. In each cell, a central node collects all the local traffic. Every user in the cell is thus connected via a QKD link to the central node of its cell. On top of this array of cells, a backbone network connects first-neighbor QKD nodes with a QKD trunk. Traffic on the backbone network is routed trough the shortest path. The dotted blue line describes the path followed for the communication between two users A and B (see text for more details).}
\label{fig:SquareBB}
\end{center}
\end{figure}
\paragraph{Computation of $\Ibb $ for the square network:} We set $X_k=k\alpha_{\textrm{\tiny bb}}$ and $D_k=X_k+\alpha_{\textrm{\tiny bb}}[-1/2,1/2]^2$ with $k\in\mathbb Z^2$ and, for all $k\neq l$,
\begin{equation*}
C^{\textrm{\tiny hop}}(k,l;M) = \|k-l\|_1\, C(\alpha_{\textrm{\tiny bb}}) \; .
\end{equation*}
Here, $\|k-l\|_1$ corresponds to the number of hops between $X_k$ and $X_l$ and $C(\alpha_{\textrm{\tiny bb}})$ to the per bit cost of one hop.
Calling $\mu_i$ the average number of QKD users in a backbone cell $i$, we have:
\begin{equation}
\label{eq:Ibb}
\Ibb = V \sum_{k\neq l}\mu_k\mu_l \, C^{\textrm{\tiny hop}}(k,l;M)
\end{equation}
Hence,
\begin{equation*}
\Ibb = V C(\alpha_{\textrm{\tiny bb}}) \, \boldsymbol{\mu}^T\Gamma\boldsymbol{\mu} \;,
\end{equation*}
where $\boldsymbol{\mu}$ is the column vector with entries $\mu_k$, $k\in\mathbb Z^2$, and $\Gamma$ is the Toeplitz array indexed on $\mathbb Z^2$ with entries $\Gamma_{k,l}=\|k-l\|_1$.
Since the density of users $f$ is constant and equal to $\sigma$ on its support $D$, where
$D:=\bigcup_{k\in\{0,\dots,N-1\}^2} D_k$, $\mu_k$ is the same for all cells $D_k$: $\mu_k= \mu/ N^2$, with $N^2$ denoting
the total number of backbone cells, and $\mu=(L/\alpha_{\textrm{\tiny u}})^2$ the mean number of users over $D$ (see
equation~(\ref{eq:mudef})). Hence, we find
\begin{equation*}
\Ibb= V C(\alpha_{\textrm{\tiny bb}})\, \mu^2/N^{4}\,\sum_{k,l\in\{0,\dots,N-1\}^2}\|k-l\|_1 \; .
\end{equation*}
Now, we compute
\begin{eqnarray*}
\sum_{k,l\in\{0,\dots,N-1\}^2}\|k-l\|_1 &
= & \sum_{k_1,l_1=0}^{N-1}\sum_{k_2,l_2=0}^{N-1}\sum_{i=1}^2 |k_i-l_i| \\
& = & 2 \sum_{k_1,l_1=0}^{N-1}\sum_{k_2,l_2=0}^{N-1} |k_1-l_1| = 2 \,N^{2}\,\sum_{k,l=0}^{N-1} |k-l|\\
& = & 4 \,N^{2}\,\sum_{k=0}^{N-1} \sum_{l<k} |k-l| = 4 \,N^{2}\,\sum_{k=0}^{N-1} \sum_{l<k} |k-l|\\
& \sim & \frac{2}3 \,N^{5}\,
\end{eqnarray*}
where the asymptotic equivalence holds as $N\to\infty$.
Using $N\sim L/\alpha_{\textrm{\tiny bb}}$ and equation~(\ref{eq:mudef}), we obtain, as $N\to\infty$,
\begin{equation}
\label{eq:CbbSquare}
\Ibb\sim V \, \frac{\mu^2}{N^4} C(\alpha_{\textrm{\tiny bb}}) \, \frac{2}3 \,N^{5} = \frac 23 \, \frac{C(\alpha_{\textrm{\tiny bb}}\alpha_{\textrm{\tiny u}}^4)}\alpha_{\textrm{\tiny bb}} \, L^5 \,V = \frac 23 \, \frac{C(\alpha_{\textrm{\tiny bb}})}\alpha_{\textrm{\tiny bb}} \, \mu^2 V \,L \;.
\end{equation}
In the latter expression, we have four multiplicative terms:
\begin{enumerate}
\item $2/3$, a constant depending only on the dimension and the geometry of the backbone network (for a cube of dimension $d$, we could generalize our calculation and would find $d/3$);
\item $C(\alpha_{\textrm{\tiny bb}})/\alpha_{\textrm{\tiny bb}}$, a cost function depending only on the distance $\alpha_{\textrm{\tiny bb}}$ between the nodes of the backbone;
\item $\mu^2 \, V$, the square of the mean number of users times the volume of call per pair of users, \emph{i.e.} in our communication model, the total volume of the communications over which the total cost is computed;
\item $L$, the size of the support of $f$, that is of the domain where the users lie.
\end{enumerate}
To understand better the derived expression for $\Ibb$, it is interesting to compare it with $ \Iloc $ and $\mathcal{C}^{\textrm{\tiny node}}$. Indeed, we can show that $\Iloc \simeq \mu^2 \,\overline{C}$, where $\overline{C}$ stands for the per-bit cost function $C$ averaged over one cell. In the case of the square network with $\alpha_{\textrm{\tiny bb}}\times\alpha_{\textrm{\tiny bb}}$ square cells, these cells are contained between two circles of radius $\alpha_{\textrm{\tiny bb}}/2$ and $ \alpha_{\textrm{\tiny bb}} \, \sqrt{2}/2 < \alpha_{\textrm{\tiny bb}}$. Since $C$ is an increasing function of distance we have $\overline{C} < C(\alpha_{\textrm{\tiny bb}})$, and we can thus derive the important following property: {\bf In the limit of large networks, \emph{i.e.} for $L \gg \alpha_{\textrm{\tiny bb}}$, the backbone cost is dominant over the local cost.} We will see in the following section that this property is preserved for a backbone with randomly positioned nodes and an appropriate routing policy. Furthermore, we will see that for large $L$, the backbone node equipment cost $\mathcal{C}^{\textrm{\tiny node}}$ is negligible. Therefore, to optimize the cost~(equation~\ref{eq:totalCost}), we only need to minimize $\Ibb$. Assuming a square regular backbone, this means choosing $\alpha_{\textrm{\tiny bb}}$ so as to minimize $C(\alpha_{\textrm{\tiny bb}})/\alpha_{\textrm{\tiny bb}}$, exactly as in the case of the linear chain QKD network model of section~\ref{subsec:chain}.
Hence, if we take $C(\ell) = \frac{C_{\textrm{\tiny QKD}}}{R_0} e^{\, \ell/\lambda_{\textrm{\tiny QKD}}}$, the cost is minimized for
\begin{equation}
\label{eq:alphaOptSquareBB}
\alpha_{\textrm{\tiny bb}}^{\textrm{\tiny opt}} = \lambda_{\textrm{\tiny QKD}}\;.
\end{equation}
\subsubsection{Cost calculation for a stochastic QBB with Markov-path routing}
\label{subsec:stochasticQBB}
\paragraph{} We now compute $\Iloc$ and $\Ibb$ in the case where the routing policy is the so called Markov path, as proposed in~\cite{baccelli:aap00}, where some general formulae are given for computing average costs in a general framework (see also \cite{tchoumatchenko:phd99}). The routing policy is defined as follows. First, all pairs of nodes whose cells share a common edge are connected. The corresponding graph is a Delaunay graph. Next, given two users A and B with respective positions $u$ and $v$, we define a finite sequence of the nodes $X_{k_0},X_{k_1},\dots,X_{k_n}$ in the successive cells encountered when drawing a line from $u$ to $v$. This routing policy is illustrated on figure~\ref{fig:Voronoi}.
By definition, $X_{k_0}$ and $X_{k_n}$ are the centers of the cells containing $u$ and $v$ respectively and
\begin{eqnarray}
\label{eq:ClocStationaryM}
\Iloc & = & V \times\int_{D\times D}\mathbb E\left[C(\|u-X_{k_0}\|)+C(\|v-X_{k_n}\|)\right]\,f(u)\,f(v) \,du\,dv \nonumber \\
& = & V\;\mu^2\;\kappa^{\textrm{\tiny loc}}\;,
\end{eqnarray}
where $\mu:=\int f$ is the average total number of users and, by stationarity of the point process $M$,
\begin{equation*}
\kappa^{\textrm{\tiny loc}}= \mathbb E\left[C(\|u-X_{k_0}\|)\right]+ \mathbb E\left[C(\|v-X_{k_n}\|)\right]= 2\;\mathbb E\left[C(\|X_0\|)\right]
\end{equation*}
with $X_0$ defined as the center of the cell containing the origin. Note that $\kappa^{\textrm{\tiny loc}}$ denotes the average local cost per secret bit and per pair of users. If $M$ is a Poisson point process with intensity $\alpha_{\textrm{\tiny bb}}^{-2}$, we further have
\begin{equation*}
\mathbb P(\|X_0\| > t)=\mathbb P(\#\{X_k\;:\;\|X_k\|\leq t\}=0)=\exp(-\pi t^2\alpha_{\textrm{\tiny bb}}^{-2})\;,
\end{equation*}
and hence
\begin{equation}
\label{eq:kappalocHomPoissonM}
\fl \;\;\;\; \kappa^{\textrm{\tiny loc}} = 4\pi\alpha_{\textrm{\tiny bb}}^{-2} \; \int_{\mathbb R_+} C(t) \; t \; \exp(-\pi t^2\alpha_{\textrm{\tiny bb}}^{-2}) dt = 4\pi \; \int_{\mathbb R_+} C(\alpha_{\textrm{\tiny bb}} u) \; u \; \exp(-\pi u^2) du \; .
\end{equation}
For $\Ibb$, we can write
\begin{equation*}
\Ibb=V\times\int_{D\times D}\mathbb E\left[\sum_{i=1}^n C(\|X_{k_{i}}-X_{k_{i-1}}\|)\right]\,f(u)\,f(v) \,du\,dv\;.
\end{equation*}
Applying~\cite[Theorem~2]{baccelli:aap00} or the results (in particular Theorem~2.41 and Remark~2.4.2) in section~2.4 of \cite{tchoumatchenko:phd99} (as done in Corollaries~2.5.1 and~2.5.2 in~\cite{tchoumatchenko:phd99}), we obtain
\begin{equation*}
\mathbb E\left[\sum_{i=1}^n C(\|X_{k_{i}}-X_{k_{i-1}}\|)\right]= \kappa^{\tiny bb}\, \|u-v\| \, ,
\end{equation*}
where
\begin{equation}
\label{eq:kappaBBHomPoissonM}
\fl \kappa^{\tiny bb} := 2\alpha_{\textrm{\tiny bb}}^{-1} \int_{(r,\psi,\phi)\in\mathcal{A}} C\left(2\alpha_{\textrm{\tiny bb}} r\sin(\{\psi-\phi\}/2)\right) \,\{\cos(\phi)-\cos(\psi)\}\,r^2\,\mathrm{e}^{-\pi\,r^2}\,d\psi\,d\phi\,dr \; ,
\end{equation}
and $\mathcal{A}=\mathbb R_+\times\{(\psi,\phi):\,0<|\phi|\leq\psi<\pi\}$.
Finally we find that
\begin{equation}
\label{eq:CBBStationaryM}
\Ibb=V\,\kappa^{\textrm{\tiny bb}}\, \delta\;,
\end{equation}
where $\delta$ is the average total distance between two different users defined in equation~(\ref{eq:deltaDef}) and computed in equation~(\ref{eq:deltaVal}), and $\kappa^{\textrm{\tiny bb}}$ denotes the average backbone cost per secret bit and per length unit of the distance separating a pair of users.
From equations~(\ref{eq:totalCost}),~(\ref{eq:ClocStationaryM}) and~(\ref{eq:CBBStationaryM}), and observing that here
the average total number of backbone cells $N^2=(L/\alpha_{\textrm{\tiny bb}})^2$, we find
\begin{equation}
\label{eq:totalCostStationary}
\mathcal{C} =: \Iloc +\Ibb + \mathcal{C}^{\textrm{\tiny node}}=V\times\left[\mu^2\kappa^{\textrm{\tiny loc}}+\delta\kappa^{\textrm{\tiny bb}}\right] + C_{\textrm{\tiny node}}(L/\alpha_{\textrm{\tiny bb}})^{2}\ \;,
\end{equation}
where $\mu^2$ and $\delta$ are related to the spatial distribution of the users, and $\kappa^{\textrm{\tiny loc}}$ and $\kappa^{\textrm{\tiny bb}}$ are constants related to the geometry of the backbone and to the routing policy. For users uniformly distributed in a square of side length $L$ with intensity $\alpha_{\textrm{\tiny u}}^{-2}$, we have $\mu^2\simeq (L/\alpha_{\textrm{\tiny u}})^4$ and $\delta\simeq L^5/\alpha_{\textrm{\tiny u}}^4$.
Using~(\ref{eq:kappalocHomPoissonM}),~(\ref{eq:kappaBBHomPoissonM}),~(\ref{eq:totalCostStationary}) and the above
approximations of $\mu^2$ and $\delta$, we see that the total cost $\mathcal{C}$ only depends on $L$, $\alpha_{\textrm{\tiny u}}$ and $\alpha_{\textrm{\tiny bb}}$.
Now, for given $\alpha_{\textrm{\tiny u}}$ and $L$, we take $\alpha_{\textrm{\tiny bb}}$ so that $\mathcal{C}$ is minimized and examine
which term in the right-hand side of~(\ref{eq:totalCostStationary}) dominates the total cost $\mathcal{C}$ as $L\to\infty$ in this
context. To this end, we first study each term separately. We let $c$ denote a constant not depending on $L,\alpha_{\textrm{\tiny bb}}$ in the following
reasoning. Observe that since $C$ is convex and increasing, $C(\ell)\geq
c\times \ell$. Using this in~(\ref{eq:kappalocHomPoissonM}) and in~(\ref{eq:kappaBBHomPoissonM}),
we get $\Iloc\geq c\,\alpha_{\textrm{\tiny bb}} L^4$ and $\Ibb\geq c\, L^5$, respectively. Concerning the last
term, we have $\mathcal{C}^{\textrm{\tiny node}}\approx c\, L^2/\alpha_{\textrm{\tiny bb}}^2$. It follows that at fixed $L$, $\Iloc\to\infty$ as
$\alpha_{\textrm{\tiny bb}}\to\infty$ and $\mathcal{C}^{\textrm{\tiny node}}\to\infty$ as $\alpha_{\textrm{\tiny bb}}\to0$, from which we can deduce that the optimal
$\alpha_{\textrm{\tiny bb}}$ stays away of 0 and $\infty$. Now, clearly, if $\alpha_{\textrm{\tiny bb}}$ stays away from 0 and $\infty$, the above bounds show that
$\Ibb$ dominates as $L\to\infty$. Hence, for large $L$, the optimal intensity $\alpha_{\textrm{\tiny bb}}$ is the one that minimizes $\Ibb$
or, equivalently, $\kappa^{\textrm{\tiny bb}}$. To find this optimal intensity, the following result is useful for an exponential cost $C(\ell)
= \frac{C_{\textrm{\tiny QKD}}}{R_0} e^{\, \ell/\lambda_{\textrm{\tiny QKD}}}$:
\begin{lem}
\label{lem:kappaLocComp}
Define $\kappa^{\textrm{\tiny bb}}$ as in equation~(\ref{eq:kappaBBHomPoissonM}) with $C(\ell) = \frac{C_{\textrm{\tiny QKD}}}{R_0} e^{\, \ell/\lambda_{\textrm{\tiny QKD}}}$. Then the following analytical formula holds
\begin{equation*}
\kappa^{\textrm{\tiny bb}}=C_{\textrm{\tiny QKD}} R_0^{-1} \lambda_{\textrm{\tiny QKD}}^{-1}
\frac4\pi\left[ \mathrm{e}^{\alpha_{\textrm{\tiny bb}}^2/(\pi \lambda_{\textrm{\tiny QKD}}^2)}\{1+\mathrm{erf}(\alpha_{\textrm{\tiny bb}}/(\sqrt{\pi}\lambda_{\textrm{\tiny QKD}}))\}+
\lambda_{\textrm{\tiny QKD}}/\alpha_{\textrm{\tiny bb}}\right]\;,
\end{equation*}
where
\begin{equation*}
\mathrm{erf}(x)=\frac{2}{\sqrt{\pi}}\int_0^x\mathrm{e}^{-t^2}\,dt\;.
\end{equation*}
\end{lem}
\noindent \emph{Proof.} Let $s= \lambda_{\textrm{\tiny QKD}}/\alpha_{\textrm{\tiny bb}}$. We have
\begin{eqnarray*}
& & \int_{(r,\psi,\phi)\in\mathcal{A}} \exp\left(2s^{-1} r\sin(\{\psi-\phi\}/2)\right)
\,\{\cos(\phi)-\cos(\psi)\}\,r^2\,\mathrm{e}^{-\pi\,r^2}\,d\psi\,d\phi\,dr \\
& & = 8\int_{v=0}^{\pi/2}\int_{r=0}^{\infty}\exp(2s^{-1}r\sin(v)-\pi r^2)\,r^2\,\sin(v)\,dv\,dr .
\end{eqnarray*}
Integrating with respect to $r$ yield
\begin{eqnarray*}
\fl \kappa^{\textrm{\tiny bb}} & = C_{\textrm{\tiny QKD}} R_0^{-1} \lambda_{\textrm{\tiny QKD}}^{-1} \\
\fl & \times\left[\frac2\pi+\frac{4s}{\pi} \int_{v=0}^{\pi/2}\sin(v)\{1+2\sin^2(v)/(\pi s^2)\}\exp(\sin^2(v)/(\pi s^2))(1+\mathrm{erf}(\sin(v)/(\sqrt{\pi}s)\,dv\right]\;.
\end{eqnarray*}
Further computations yiel
\begin{equation*}
\kappa^{\textrm{\tiny bb}}=C_{\textrm{\tiny QKD}} R_0^{-1} \lambda_{\textrm{\tiny QKD}}^{-1}
\frac4\pi\left[ \mathrm{e}^{1/(\pi s^2)}\{1+\mathrm{erf}(1/(s\sqrt{\pi}))\}+s\right]\;,
\end{equation*}
which is the desired expression.\\
Using Lemma~\ref{lem:kappaLocComp}, the $\alpha_{\textrm{\tiny bb}}$ minimizing $\kappa^{\textrm{\tiny bb}}$, denoted as $\alpha_{\textrm{\tiny bb}}^{\textrm{\tiny opt}}$ below, can easily be calculated using a numerical procedure. We find
\begin{equation}
\alpha_{\textrm{\tiny bb}}^{\textrm{\tiny opt}} \approx 1.2490 \, \lambda_{\textrm{\tiny QKD}} \;.
\end{equation}
This result should be compared with the result of equation~(\ref{eq:alphaOptSquareBB}), where the backbone geometry is deterministic and also characterized by the node intensity $1/ \alpha_{\textrm{\tiny bb}}^2$. The two results show that the choice of the backbone and routing policy does influence the optimal node intensity, albeit in a modest way.
\subsection{From cost optimization results to QKD network planning}
\label{subsec:QKDnetplanning}
\noindent \emph{Matching QKD network topology with QKD links optimum working distance}
\noindent The calculations in sections~\ref{subsec:square} and \ref{subsec:stochasticQBB} point to one common result: it appears that, for large networks, the costs associated with the QKD devices that have to be deployed in backbone nodes to serve the demand are always dominant over the local costs, associated to the end connections between QKD users and backbone nodes.
Moreover, the optimization of backbone costs indicates that minimum cost will be reached when the typical distance between backbone nodes is of the order of $\lambda_{\textrm{\tiny QKD}}$, the scaling parameter of the curve $R(l)$.
These results lead to the following statements:
\begin{itemize}
\item When a QKD network deployment is planned, is seems optimal to choose the location of network nodes so that QKD links will be operated over distances comparable to the optimal distance $\ell^{\textrm{\tiny opt}}$. As we have seen in our different models, $\ell^{\textrm{\tiny opt}}$ is always lower bounded by a pre-factor times $\lambda_{\textrm{\tiny QKD}}$. Indeed, when the total cost of node equipment can be neglected compared to the cost of QKD devices, as it is the case for large networks, then the optimum distance $\ell^{\textrm{\tiny opt}}$ is indeed comparable to $\lambda_{\textrm{\tiny QKD}}$, which is roughly equal to 20~km. This indicates that current QKD technologies, for which $D_{\textrm{\tiny max}}$ is already significantly larger than 20~km, are well suited for metropolitan operation. On the other hand, the typical distance between amplifiers, in optical wide area networks, is of the order of 80~km. If we wanted to deploy trusted QKD networks with the current generation of QKD devices, the QKD links would have to be operated close to their maximum distance, where the unit of secret bit rate becomes very expensive. Although technically already feasible, the deployment of wide area QKD networks thus remains a challenge. We can however anticipate that this challenge will be overcome within the next years, as new generations of QKD protocols and devices, able to generate keys at higher rates, and with larger maximum distances are already being presented~\cite{stucki:qp08, leverrier:qp08, dixon:qp08}.
\item The results on cost minimization that we have obtained could provide some helpful guidelines for QKD device developers: they may help promoting the idea that what will really matter, in the perspective of real network deployment, will be to focus on the optimization of their systems around typical network-optimum working distances. Optimizing QKD devices in this regime means reducing the cost of a unit bit rate at a \emph{reasonable} distance, where the throughput of the QKD link is not considerably smaller than $R_0$. It will be of course always profitable to design QKD devices that can reach very long distances, but as discussed in~\cite{alleaume:inprep09}, from a system development point of view it can be significantly different to optimize QKD devices to reach the longest possible distance $D_{\textrm{\tiny max}}$, and to optimize them so that the cost of unit of bit rate is as low as possible, around the distance $\ell^{\textrm{\tiny opt}}$ minimizing network costs.\\
\end{itemize}
\noindent \emph{In which regime are backbones useful?}
\noindent We would like now to use our calculation results to analyze in which regime QKD backbones become \emph{economically interesting}, \emph{i.e.} under which conditions it is interesting to introduce some hierarchy and resource mutualization in QKD networks, in order to decrease the total deployment cost.
In the previous sections we have performed cost calculations that can be used to establish some quantitative comparisons between:
\begin{itemize}
\item The cost of a QKD network with no hierarchy as in the generalized linear chain QKD network, whose cost calculations have been performed in section~\ref{subsec:2Dchain}.
\item The cost of a QKD network with one level of hierarchy, which is the case of the square backbone QKD network studied in section~\ref{subsec:square}.
\end{itemize}
Since these two cost calculations have been performed under the same assumptions regarding user distribution and traffic demand, we can use the results given in equations~(\ref{eq:Cchaintotal}) and (\ref{eq:CbbSquare}) to compare the total network deployment costs, respectively for the generalized linear chain model and for a QKD network with a square backbone (for which we have seen that we could neglect the cost of the local access network).
The condition under which it will be more cost effective to deploy a quantum backbone than to connect all pair of users by one-dimensional chains of QKD links can be described by the following inequality between the respective optimal costs
\begin{eqnarray}
\fl \mathcal{C}_{\textrm{\tiny 2D,chain}}^{\textrm{\tiny opt,chain}} \geq \mathcal{C}_{\textrm{\tiny 2D,square}}^{\textrm{\tiny opt,square}} \nonumber \\
\fl \Leftrightarrow \Big( V \, C(\ell^{\textrm{\tiny opt}})/\ell^{\textrm{\tiny opt}} + C_{\textrm{\tiny node}}/\ell^{\textrm{\tiny opt}} \Big) \gamma \sigma^2 L^5 \, \geq \, \frac{2}{3} \, C(\alpha_{\textrm{\tiny bb}}^{\textrm{\tiny opt}})/\alpha_{\textrm{\tiny bb}}^{\textrm{\tiny opt}} \, \sigma^2 L^5 \, V + \, C_{\textrm{\tiny node}} \, {L^2}/{{\alpha_{\textrm{\tiny bb}}^{\textrm{\tiny opt}}}^2} \label{ineq:chainsquare1}
\end{eqnarray}
The above equation is not very convenient to handle because in general $ \alpha_{\textrm{\tiny bb}}^{\textrm{\tiny opt}} \neq \ell^{\textrm{\tiny opt}} $. However,
\begin{eqnarray}
\mathcal{C}_{\textrm{\tiny 2D,chain}}^{\textrm{\tiny opt,chain}} \geq \mathcal{C}_{\textrm{\tiny 2D,square}}^{\textrm{\tiny opt,square}} \Rightarrow \mathcal{C}_{\textrm{\tiny 2D,chain}}^{\textrm{\tiny opt,square}} \geq \mathcal{C}_{\textrm{\tiny 2D,square}}^{\textrm{\tiny opt,square}} \label{implication:chainsquare1}
\end{eqnarray}
Thus, we can derive a necessary condition under which the deployment of a backbone for a QKD network is a better solution than a design that would solely rely on the generalized linear chain of QKD links to transport the traffic:
\begin{eqnarray}
\fl \mathcal{C}_{\textrm{\tiny 2D,chain}}^{\textrm{\tiny opt,square}} \geq \mathcal{C}_{\textrm{\tiny 2D,square}}^{\textrm{\tiny opt,square}} \Leftrightarrow \, C_{\textrm{\tiny node}} \, ( \sigma^2 L^3 \alpha_{\textrm{\tiny bb}}^{\textrm{\tiny opt}} \, \gamma - 1 ) \, \geq \, C(\alpha_{\textrm{\tiny bb}}^{\textrm{\tiny opt}}) V \, \sigma^2 L^3 \alpha_{\textrm{\tiny bb}}^{\textrm{\tiny opt}} \, (\frac{2}{3} - \gamma) \nonumber \\
\fl \Leftrightarrow \,C_{\textrm{\tiny node}} \, ( \sigma^2/ {\sigma^\ast}^2 - 1) \, \geq \, C(\alpha_{\textrm{\tiny bb}}^{\textrm{\tiny opt}}) \, V \, \sigma^2/ {\sigma^\ast}^2 \, ( \frac {2}{3 \gamma} - 1) \label{implication:chainsquare2}
\end{eqnarray}
with $\sigma^{\ast} = 1/ \sqrt{ L^3 \alpha_{\textrm{\tiny bb}}^{\textrm{\tiny opt}} \, \gamma}\; .$\\
Keeping in mind that $\frac {2}{3 \gamma} - 1$ is a positive number, we can use the last inequality to make the following observations:
\begin{itemize}
\item First, it appears that, if the user density $\sigma$ is smaller than $\sigma^{\ast}$, which we can qualify as a \emph{critical user density}, then equation~(\ref{implication:chainsquare2}) can never be verified. This means that below $\sigma^\ast$ it will never be interesting to deploy a backbone. This result has a clear interpretation: backbone infrastructures can only be interesting in the case where sharing resources offers a cost reduction. And the incentive to share a backbone infrastructure can only exist if there are enough users. The minimum total number of users required to have a cost incentive towards backbone deployment is $\sigma^{\ast}\, L^2 = \sqrt{ L / (\gamma \alpha_{\textrm{\tiny bb}}^{\textrm{\tiny opt}})} $.
\item In case $\sigma$ is larger than the critical user density $\sigma^{\ast}$, we enter a regime where there will be an incentive to deploy a quantum backbone essentially if the cost of a node $C_{\textrm{\tiny node}}$ dominates over the cost of QKD link equipment to be deployed, which scales as $C(\alpha_{bb}^{\textrm{\tiny opt}}) V$. This also has a clear interpretation: if we take the extreme case where building a node (and installing node equipment inside it) is zero, we can foresee that there will be no incentive to build a backbone: it will always be cheaper to deploy direct chains between each pair of users. The motivation to build a backbone arises when efforts associated to opening a QKD node are important. This will of course be the case if QKD node equipment is expensive, as we can see from equation~(\ref{implication:chainsquare2}), but it is also intuitive that, in case significant efforts are required to build new QKD nodes, mutualization of nodes through a backbone structure will be a cost effective solution.
\end{itemize}
\section{Conclusion and Perspectives}
\label{sec:perspectives}
In this paper, we performed a topological analysis of quantum key distribution networks with trusted repeater nodes. In particular, under specific assumptions on the user and node distributions as well as the call traffic and routing in such networks, we derived cost functions for different network architectures. We first considered a linear chain network as a basic model that served the purpose of illustrating the main techniques and ideas that we used, and then moved on to more advanced network configurations that were in some cases enhanced with a backbone structure. Using cost minimization arguments, we obtained results on the optimal working points of QKD links and spatial distribution of QKD nodes, and examined the importance of introducing hierarchy into QKD networks.
Our results indicate that, in the context of QKD networks, it is more cost-effective and therefore advantageous to operate individual QKD links at their optimal working point, which is in general significantly shorter than the maximum span of such links. This conclusion motivates the research of new experimental compromises in practical QKD systems, and can be illustrated by considering examples of such systems where the characteristics of either a hardware component (for example a single-photon detector) or a software algorithm (for example a reconciliation code) can be experimentally manipulated as a function of distance~\cite{alleaume:inprep09}.
In general, it is clear that, as the realization of more and more advanced QKD networks approaches the realm of actual deployment, it becomes necessary to orient the research on QKD devices and links towards cost-related directions, and extend the techniques we have presented here to more sophisticated network technologies and architectures.
\ack
We acknowldge financial support from the Integrated European Project SECOQC (Grant No. IST-2002-506813). R. A. and E. D. acknowledge financial support from the French National Research Agency Projects PROSPIQ (ANR-06-NANO-041-05) and SEQURE (ANR-07-SESU-011-01). N. L. acknowledges support from the NSERC Innovation Platform QuantumWorks, a NSERC Discovery Grant, and the Ontario Centers of Excellence.
\section*{References}
|
{
"redpajama_set_name": "RedPajamaArXiv"
}
| 6,434
|
is a Japanese shōjo manga series by Nana Haruta. Love-Berrish! was serialized in the monthly manga magazine Ribon from August 2005 to May 2007. During the series' run, a drama CD was released in 2005.
Plot
Yūya Fukushima decides to enroll in Natsuka Academy, a boarding high school, but is reassigned to live in Raspberry Dorm with five other students: Azusa Chiba, Nagisa Takamatsu, Emika Muto, Ame Yamanashi, and Kon Miyagi. Yūya is initially offended by her dormmates' quirkiness, but she is encouraged to stay by Azusa and falls in love with him. At the same time, she discovers that the occupants of the Raspberry Dorm are socially ostracized from the school, and she decides to support and defend her dormmates from the bullying.
Characters
Voiced By: Hitomi Nabatame
15-year-old Yūya Fukushima initially finds the people in her dorm strange and wanted to transfer out, but after a talk with Azusa, she chooses to stay and begins befriending her dormmates. Yūya is touched by Azusa's watchful and genuine kindness, which leads to her falling in love with him. In contrast, she is often personally annoyed by Nagisa's indifferent and rude behaviour. However, as the story progresses afterwards, Yūya falls in love with Nagisa, only realising it after a long time and confessing at the end.
She is a single child; her mother died when Yuya was in the first year of middle school. Yuya initially thought that her father sent her away to boarding school to get her out of the way, but later finds out that it was because both her parents had attended there before, and that her mother wanted Yuya to go there too.
Voiced By: Akira Ishida
The eldest of four siblings, the indifferent Nagisa also lives in Raspberry Dorm and attends Natsuka Academy. Despite being temperamental and sometimes physically violent, he is popular at school. Although he talks cryptically and rudely to Yūya, the rest of the Raspberry Dorm insist that he is good at heart. Because he keeps quiet about his thoughts, Yūya often has trouble figuring out his motives. He has been friends with Chiba since middle school. He quickly realized Yūya has a crush on Azusa but it was unclear whether he was trying to hinder a relationship between them or encourage it. Nagisa develops feelings for Yūya and clearly demonstrates his jealousy towards the fact that Yuya still has lingering feelings for Azusa, even after he got back together with Ako. He gets together with Yūya in the end.
He was transferred to Raspberry Dorm due to a violent incident involving a teacher. He did not get expelled as Azusa believed Nagisa would not have done that without a good reason, so talked the teachers into letting him stay.
Voiced By: Kenji Nojima
Azusa is extremely popular and many girls, including Yūya, tend to think of him as a "Prince" due to his good looks and kind nature. He is the student representative at Natsuka Academy, and is at the top of his class. He was the dorm president in middle school. He does his best to help keep the peace in the Raspberry Dorm, especially between Nagisa and Yūya. Azusa and Nagisa appear to be close friends, but Nagisa dislikes his self-sacrificing nature. This was demonstrated when Azusa broke up with his girlfriend in middle school, Ako, because he believed she was truly in love with Nagisa.
He transferred to Raspberry Dorm due to an agreement with teachers, where he was to watch over Nagisa.
Voiced By: Yukari Tamura
Quirky and outgoing, Emika is a bubbly and childish illeist, often referring to herself as "Emi." Her curiosity leads her to asking strange questions, although she is naive and innocent about the whole situation. She is particularly amazed with Yūya's bra size and wistfully wishes to have a bust as large as hers. On the contrary, when Emika first attended Natsuka Academy, she was quiet, shy, and was unable to make friends until Kon began talking to her. However, she transferred to the Raspberry Dorm to escape Yukino's bullying advances. She is very close friends with Kon, but is naively unaware about his feelings towards her, until the end.
Voiced By: Takahiro Mizushima
16-year-old Kon is a close friend of Emika's. He has been in the same class with her for five consecutive years and is in love with Emika. He believed his love was unrequited, until the end when Emika realised how she felt about Kon.
He transferred to Raspberry Dorm after breaking an expensive vase in the teacher's lounge.
Although described as a graceful beauty and won the school's beauty contest. She's also a transgender girl. Yūya suspects that Ame and Azusa are in a relationship, and Ame comes out to her, which ease her worries. Ame met Azusa and Nagisa in junior high, when she had to dress as a guy, and lived in the Watermelon Dormitory, the dorm for boys. She began dressing as a girl in her third year and applied for the girls dorm, White Peach, but many of the teachers rejected the idea and made her live in the Raspberry Dorm instead. She always skips PE because she was registered as a male and is required to take PE with the guys.
Voiced By: Sayori Ishizuka
Michelle is the Raspberry Dorm's cat. She scratches Yūya the first time she meets her, and seems to take a liking only to Azusa. Azusa and Yuuya are the only ones who call her ; the rest dub her "Fugly".
Voiced By: Megumi Toyoguchi
The head of the Raspberry Dorm.
A classmate of Yūya, she is scornful and rude towards all the members of the Raspberry Dorm except for Azusa, whom she adores. Although she bullied Yūya, Yūya tries to befriend her when Azusa proposes a sports festival idea. During practise for the festival, Shimizu defends Yūya when others gave up on her and eventually gets along with Yūya in her own way. She seems to dislike Nagisa.
Ako is a friend of Nagisa and Azusa from middle school, and was Nagisa's childhood friend. She dated Azusa, though Nagisa was also in love with her. After an incident regarding Nagisa, Azusa broke up with her because he believed that Ako loved Nagisa more than she loved him. Ako gradually began to pretend to herself that she loved Nagisa, though deep in her heart she still knew that the one she loved was Azusa. At the Summer Festival, Nagisa confessed to Ako that he liked her to make her realize that she actually loved Azusa. He then reassured her that Azusa still loved her too and that they should get back together.
Yukino is the first friend Emika made at Natsuka Academy when the two were in middle school. Although they grew close, at the same time, Yukino felt more possessive towards Emika when she began making other friends. In a desperate attempt to save their friendship, Yukino often threatened to hurt Emika's new friend unless she broke off that friendship. When she returns to Emika's life and develops a jealousy towards Yūya and Ame, she tries to keep Emika to herself by locking her in an empty classroom. However, Emika is rescued by the efforts of Yūya, Ame, and Kon. Reminded by Kon that she used to be as lonely as Yukino was, Emika forgives her.
Media
Manga
Love-Berrish! is written and illustrated by Nana Haruta. It was serialized in the monthly magazine Ribon from August 2004 to May 2007. The chapters were later released in bound volumes by Shueisha for a total of 5 volumes under the Ribon Mascot Comics imprint. Moe Yukimaru, the author of Hiyokoi, was one of Haruta's assistants in working on the manga.
Drama CD
A drama CD adaptation featuring Love-Berrish!, along with ChocoMimi and Animal Yokochō, was released as a mail-order gift with the December 2005 issue of Ribon.
References
External links
Official site
Love-Berrish! Game
Shōjo manga
2005 manga
Tokyopop titles
Sharp Point Press titles
|
{
"redpajama_set_name": "RedPajamaWikipedia"
}
| 7,803
|
@implementation ATMessageSender
@dynamic apptentiveID;
@dynamic name;
@dynamic emailAddress;
@dynamic profilePhotoURL;
@dynamic sentMessages;
@dynamic receivedMessages;
+ (ATMessageSender *)findSenderWithID:(NSString *)apptentiveID {
ATMessageSender *result = nil;
@synchronized(self) {
NSPredicate *fetchPredicate = [NSPredicate predicateWithFormat:@"(apptentiveID == %@)", apptentiveID];
NSArray *results = [ATData findEntityNamed:@"ATMessageSender" withPredicate:fetchPredicate];
if (results && [results count]) {
result = [results objectAtIndex:0];
}
}
return result;
}
+ (ATMessageSender *)newOrExistingMessageSenderFromJSON:(NSDictionary *)json {
if (!json) return nil;
NSString *apptentiveID = [json at_safeObjectForKey:@"id"];
if (!apptentiveID) return nil;
ATMessageSender *sender = [ATMessageSender findSenderWithID:apptentiveID];
if (!sender) {
sender = (ATMessageSender *)[ATData newEntityNamed:@"ATMessageSender"];
sender.apptentiveID = apptentiveID;
} else {
[sender retain];
}
NSString *senderEmail = [json at_safeObjectForKey:@"email"];
NSString *senderName = [json at_safeObjectForKey:@"name"];
NSString *profilePhoto = [json at_safeObjectForKey:@"profile_photo"];
if (senderEmail) {
sender.emailAddress = senderEmail;
}
if (senderName) {
sender.name = senderName;
}
if (profilePhoto) {
sender.profilePhotoURL = profilePhoto;
}
return sender;
}
- (NSDictionary *)apiJSON {
return @{@"email":self.emailAddress, @"id":self.apptentiveID, @"name":self.name};
}
@end
|
{
"redpajama_set_name": "RedPajamaGithub"
}
| 35
|
{"url":"http:\/\/en.wikipedia.org\/wiki\/Kulkarni%e2%80%93Nomizu_product","text":"# Kulkarni\u2013Nomizu product\n\nIn the mathematical field of differential geometry, the Kulkarni\u2013Nomizu product (named for Ravindra Shripad Kulkarni and Katsumi Nomizu) is defined for two (0,2)-tensors and gives as a result a (0,4)-tensor.\n\nIf h and k are symmetric (0,2)-tensors, then the product is defined via:\n\n$(h {~\\wedge\\!\\!\\!\\!\\!\\!\\bigcirc~} k)(X_1,X_2,X_3,X_4) := h(X_1,X_3)k(X_2,X_4) + h(X_2,X_4)k(X_1,X_3) - h(X_1,X_4)k(X_2,X_3) - h(X_2,X_3)k(X_1,X_4)$\n\nwhere the Xj are tangent vectors.\n\nNote that $h {~\\wedge\\!\\!\\!\\!\\!\\!\\bigcirc~} k = k {~\\wedge\\!\\!\\!\\!\\!\\!\\bigcirc~} h$. The Kulkarni\u2013Nomizu product is a special case of the product in the graded algebra\n\n$\\bigoplus_{p=1}^n S^2(\\Omega^p M),$\n\nwhere, on simple elements,\n\n$(\\alpha\\cdot\\beta) {~\\wedge\\!\\!\\!\\!\\!\\!\\bigcirc~} (\\gamma\\cdot\\delta) = (\\alpha\\wedge\\gamma)\\cdot(\\beta\\wedge\\delta)$\n\n(the dot denotes the symmetric product).\n\nThe Kulkarni\u2013Nomizu product of a pair of symmetric tensors has the algebraic symmetries of the Riemann tensor. It is thus commonly used to express the contribution that the Ricci curvature (or rather, the Schouten tensor) and the Weyl tensor each makes to the curvature of a Riemannian manifold. This so-called Ricci decomposition is useful in differential geometry.\n\nWhen there is a metric tensor g, the Kulkarni\u2013Nomizu product of g with itself is the identity endomorphism of the space of 2-forms, \u03a92(M), under the identification (using the metric) of the endomorphism ring End(\u03a92(M)) with the tensor product \u03a92(M)\u00a0\u2297\u00a0\u03a92(M).\n\nA Riemannian manifold has constant sectional curvature k if and only if the Riemann tensor has the form\n\n$R = \\frac{k}{2}g {~\\wedge\\!\\!\\!\\!\\!\\!\\bigcirc~} g$\n\nwhere g is the metric tensor.\n\n## References\n\n\u2022 Besse, Arthur L. (1987), Einstein manifolds, Ergebnisse der Mathematik und ihrer Grenzgebiete (3) [Results in Mathematics and Related Areas (3)], vol. 10, Berlin, New York: Springer-Verlag, pp.\u00a0xii+510, ISBN\u00a0978-3-540-15279-8.\n\u2022 Gallot, S., Hullin, D., and Lafontaine, J. (1990). Riemannian Geometry. Springer-Verlag.","date":"2014-07-22 23:00:01","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 0, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 0, \"img_math\": 5, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.9419902563095093, \"perplexity\": 641.5736848673722}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2014-23\/segments\/1405997865523.12\/warc\/CC-MAIN-20140722025745-00074-ip-10-33-131-23.ec2.internal.warc.gz\"}"}
| null | null |
Q: Does fsync/FlushFileBuffers wait for outstanding asynchronous IOs to finish? The background is developing DBMS kernel, specifically database checkpoint processing. Rules of the game are such that we need to wait for outstanding asynchronous IOs on the file to finish, before issuing fsync().
Current solution we deploy, is to count asynchronous IOs in-flight, manually, wait for this count to go own to 0, before fsyncing or FlushFileBuffer-ing. The question is whether we really have to do that, perhaps kernels/filesystems do it by themselves?
The OS in questions are Windows and Linux, mainly, although I'm also curious how BSD based OS handle that, too.
On Linux, we'e using libaio, for asynchronous IO.
A: On Windows: Yes, for a given HANDLE instance, the current asynchronous i/o queue is drained before FlushFileBuffers() is executed. If you are writing a database, you really ought to use NtFlushBuffersFileEx() instead, it offers far finer granularity of synchronisation, makes a huge difference.
On FreeBSD: Certainly with ZFS, yes. I can't say I've tested UFS, but I'd be surprised if it were not the same. FreeBSD implements cached async i/o as a kernel thread pool in any case, only uncached async i/o is truly async.
On Mac OS: No idea, and worse, disk i/o semantics have been all over the place last few releases. It was once very good, like BSD, but recently it's been downhill. Async file i/o was always nearly unusable on Mac OS in any case, the maximum 16 depth queue limit plus the requirement to use signals for async i/o completion is very hard to mix well with threaded code.
On Linux: For synchronous i/o, yes fsync() enforces a total ordering, per inode, if your filesystem guarantees that (all the popular ones do). For libaio, which only really works right for O_DIRECT i/o in any case, I believe that the block storage layer does flush all enqueued i/o before telling the device to barrier, unless you have disabled barriers. For io_uring (which you ought to be using instead of libaio), for non-O_DIRECT i/o, the ordering is whatever the filesystem enforces for per-inode i/o once io_uring has processed the submission. For io_uring with O_DIRECT i/o, the block storage layer is a singleton, and should enforce ordering across the whole system, once io_uring has processed the submission.
I keep mentioning "once io_uring has processed the submission" because io_uring works with ring buffered queues. If you add an entry to the submission queue, it will get processed in order of submission by io_uring (i.e. the queue gets drained). From the moment of submission to the moment of io_uring consuming the submission, there is no ordering. But once io_uring has consumed the submission, the destination filesystem has been told of the i/o, and whatever ordering guarantees it implements it will apply to the ordering of completions it emits back to io_uring. So, when using io_uring, do not proceed after i/o submission until io_uring has drained your i/o submission request from the submission queue. This happens naturally using the syscall to tell io_uring to drain the queue, or for polling drains, you can watch the "last drained item" offset the kernel atomically updates as it consumes submission items.
Source: I am the author of the reference library for the WG21 C++ standardisation of low level i/o. Caveat: all of the above is purely from my memory and experience, and may be bitrotted or wrong.
|
{
"redpajama_set_name": "RedPajamaStackExchange"
}
| 245
|
Q: How does the "Random Walk" algorithm work? The algorithm below is written in pseudocode and for simplicity the storage of the actual route in the Data structure is not included.
LengthFromSrc = 0;
LengthFromDest = 0;
TotalNumberHops = 0;
X = SRC; /*Last Node Visited from Random walk starting at SRC;*/
Y = DEST; /*Last Node Visited from Random walk starting at DEST;*/
/* Randomly select a route length */
do {
Length = rand( ) % Max;
while( Length < Min );
while( TotalNumberHops < Length ) {
Next = Toss Coin to Pick Random Walk from Src or from Dest;
if( Next == RandWalkFromSrc ) {
Z = Randomly select an adjacent node to X;
TotalNumberHops = 1 + LengthFromSrc + LengthFromDest
+ shortest-path from Z to Y;
if( TotalNumberHops > Length )
break;
X = Z; /*include the node in the route*/
Store X in the route data structure
LengthFromSrc++;
}
else { /* Next = RandWalkFromDest */
Z = Randomly select an adjacent node to Y;
TotalNumberHops = 1 + LengthFromSrc + LengthFromDest
+ shortest-path from Z to X;
if( TotalNumberHops > Length )
break;
Y = Z;
Store Y in the route data structure
LengthFromDest++;
}
}
Would someone give me a brief analysis of the algorithm/or walk me through the code, as I would like to understand it better? My main problem is understanding the first part:
do {
Length = rand( ) % Max;
while( Length < Min );
while( TotalNumberHops < Length )
PS: my source is http://www.onion-router.net/Archives/Route/
A: I'd say that code is missing a } (although it is pseudo-code, so anything goes really)
do {
Length = rand() % Max;
}
while( Length < Min );
rand() is a function is C++ which generates an integer between 0 and at least 32767 (although, for the purposes of this, I think we should assume that the maximum number than can be generated is greater than Max).
% Max gives the remaining of the number divided by Max, so Length will be between 0 and Max-1 (inclusive).
Then you repeat this until Length >= Min, so, at the end, Length will between Min and Max-1 (inclusive).
We can completely avoid the loop with this code:
Length = Min + rand() % (Max - Min);
Or, since this is pseudo-code:
Length = random number in the range [Min, Max)
The rest of the code generates two paths at the same time from the source and destination, and then stops when linking them (using the shortest possible path) would result in a walk longer than Length.
|
{
"redpajama_set_name": "RedPajamaStackExchange"
}
| 513
|
{"url":"https:\/\/labs.tib.eu\/arxiv\/?author=Brock%20Tweedie","text":"\u2022 ### Electroweak Splitting Functions and High Energy Showering(1611.00788)\n\nJan. 18, 2018 hep-ph, hep-ex\nWe derive the electroweak (EW) collinear splitting functions for the Standard Model, including the massive fermions, gauge bosons and the Higgs boson. We first present the splitting functions in the limit of unbroken SU(2)xU(1) and discuss their general features in the collinear and soft-collinear regimes. We then systematically incorporate EW symmetry breaking (EWSB), which leads to the emergence of additional \"ultra-collinear\" splitting phenomena and naive violations of the Goldstone-boson Equivalence Theorem. We suggest a particularly convenient choice of non-covariant gauge (dubbed \"Goldstone Equivalence Gauge\") that disentangles the effects of Goldstone bosons and gauge fields in the presence of EWSB, and allows trivial book-keeping of leading power corrections in the VEV. We implement a comprehensive, practical EW showering scheme based on these splitting functions using a Sudakov evolution formalism. Novel features in the implementation include a complete accounting of ultra-collinear effects, matching between shower and decay, kinematic back-reaction corrections in multi-stage showers, and mixed-state evolution of neutral bosons (gamma\/Z\/h) using density-matrices. We employ the EW showering formalism to study a number of important physical processes at O(1-10 TeV) energies. They include (a) electroweak partons in the initial state as the basis for vector-boson-fusion; (b) the emergence of \"weak jets\" such as those initiated by transverse gauge bosons, with individual splitting probabilities as large as O(30%); (c) EW showers initiated by top quarks, including Higgs bosons in the final state; (d) the occurrence of O(1) interference effects within EW showers involving the neutral bosons; and (e) EW corrections to new physics processes, as illustrated by production of a heavy vector boson (W') and the subsequent showering of its decay products.\n\u2022 ### Exotic Decays of the 125 GeV Higgs Boson(1312.4992)\n\nOct. 9, 2017 hep-ph, hep-ex\nWe perform an extensive survey of non-standard Higgs decays that are consistent with the 125 GeV Higgs-like resonance. Our aim is to motivate a large set of new experimental analyses on the existing and forthcoming data from the Large Hadron Collider (LHC). The explicit search for exotic Higgs decays presents a largely untapped discovery opportunity for the LHC collaborations, as such decays may be easily missed by other searches. We emphasize that the Higgs is uniquely sensitive to the potential existence of new weakly coupled particles and provide a unified discussion of a large class of both simplified and complete models that give rise to characteristic patterns of exotic Higgs decays. We assess the status of exotic Higgs decays after LHC Run 1. In many cases we are able to set new nontrivial constraints by reinterpreting existing experimental analyses. We point out that improvements are possible with dedicated analyses and perform some preliminary collider studies. We prioritize the analyses according to their theoretical motivation and their experimental feasibility. This document is accompanied by a website that will be continuously updated with further information: http:\/\/exotichiggs.physics.sunysb.edu.\n\u2022 ### Top-Tagging at the Energy Frontier(1707.06741)\n\nJuly 21, 2017 hep-ph, hep-ex\nAt proposed future hadron colliders and in the coming years at the LHC, top quarks will be produced at genuinely multi-TeV energies. Top-tagging at such high energies forces us to confront several new issues in terms of detector capabilities and jet physics. Here, we explore these issues in the context of some simple JHU\/CMS-type declustering algorithms and the N-subjettiness jet-shape variable tau_32. We first highlight the complementarity between the two tagging approaches at particle-level with respect to discriminating top-jets against gluons and quarks, using multivariate optimization scans. We then introduce a basic fast detector simulation, including electromagnetic calorimeter showering patterns determined from GEANT. We consider a number of tricks for processing the fast detector output back to an approximate particle-level picture. Re-optimizing the tagger parameters, we demonstrate that the inevitable losses in discrimination power at very high energies can typically be ameliorated. For example, percent-scale mistag rates might be maintained even in extreme cases where an entire top decay would sit inside of one hadronic calorimeter cell and tracking information is completely absent. We then study three novel physics effects that will come up in the multi-TeV energy regime: gluon radiation off of boosted top quarks, mistags originating from g -> tt, and mistags originating from q -> (W\/Z)q collinear electroweak splittings with subsequent hadronic decays. The first effect, while nominally a nuisance, can actually be harnessed to slightly improve discrimination against gluons. The second effect can lead to effective O(1) enhancements of gluon mistag rates for tight working points. And the third effect, while conceptually interesting, we show to be of highly subleading importance at all energies.\n\u2022 ### Revealing Compressed Stops Using High-Momentum Recoils(1506.07885)\n\nJune 25, 2015 hep-ph, hep-ex\nSearches for supersymmetric top quarks at the LHC have been making great progress in pushing sensitivity out to higher mass, but are famously plagued by gaps in coverage around lower-mass regions where the decay phase space is closing off. Within the common stop-NLSP \/ neutralino-LSP simplified model, the line in the mass plane where there is just enough phase space to produce an on-shell top quark remains almost completely unconstrained. Here, we show that is possible to define searches capable of probing a large patch of this difficult region, with S\/B ~ 1 and significances often well beyond 5 sigma. The basic strategy is to leverage the large energy gain of LHC Run 2, leading to a sizable population of stop pair events recoiling against a hard jet. The recoil not only re-establishes a MET signature, but also leads to a distinctive anti-correlation between the MET and the recoil jet transverse vectors when the stops decay all-hadronically. Accounting for jet combinatorics, backgrounds, and imperfections in MET measurements, we estimate that Run 2 will already start to close the gap in exclusion sensitivity with the first few 10s of inverse-fb. By 300\/fb, exclusion sensitivity may extend from stop masses of 550 GeV on the high side down to below 200 GeV on the low side, approaching the \"stealth\" point at m(stop) = m(top) and potentially overlapping with limits from top pair cross section and spin correlation measurements.\n\u2022 ### The Fate of Long-Lived Superparticles with Hadronic Decays after LHC Run 1(1503.05923)\n\nMarch 19, 2015 hep-ph, hep-ex\nSupersymmetry searches at the LHC are both highly varied and highly constraining, but the vast majority are focused on cases where the final-stage visible decays are prompt. Scenarios featuring superparticles with detector-scale lifetimes have therefore remained a tantalizing possibility for sub-TeV SUSY, since explicit limits are relatively sparse. Nonetheless, the extremely low backgrounds of the few existing searches for collider-stable and displaced new particles facilitates recastings into powerful long-lived superparticle searches, even for models for which those searches are highly non-optimized. In this paper, we assess the status of such models in the context of baryonic R-parity violation, gauge mediation, and mini-split SUSY. We explore a number of common simplified spectra where hadronic decays can be important, employing recasts of LHC searches that utilize different detector systems and final-state objects. The LSP\/NLSP possibilities considered here include generic colored superparticles such as the gluino and light-flavor squarks, as well as the lighter stop and the quasi-degenerate Higgsino multiplet motivated by naturalness. We find that complementary coverage over large swaths of mass and lifetime is achievable by superimposing limits, particularly from CMS's tracker-based displaced dijet search and heavy stable charged particle searches. Adding in prompt searches, we find many cases where a range of sparticle masses is now excluded from zero lifetime to infinite lifetime with no gaps. In other cases, the displaced searches furnish the only extant limits at any lifetime.\n\u2022 ### Better Hadronic Top Quark Polarimetry(1401.3021)\n\nNov. 3, 2014 hep-ph, hep-ex\nObservables sensitive to top quark polarization are important for characterizing or even discovering new physics. The most powerful spin analyzer in top decay is the down-type fermion from the W, which in the case of leptonic decay allows for very clean measurements. However, in many applications it is useful to measure the polarization of hadronically decaying top quarks. Usually it is assumed that at most 50% of the spin analyzing power can be recovered in this case. This paper introduces a simple and truly optimal hadronic spin analyzer, with a power of 64% at leading-order. The improvement is demonstrated to be robust at next-to-leading order, and in a handful of simulated measurements including the spins and spin correlations of boosted top quarks from multi-TeV top-antitop resonances, the spins of semi-boosted tops from chiral stop decays, and the potentially CP-violating spin correlations induced in continuum top pairs by color dipole operators. For the boosted studies, we explore jet substructure techniques that exhibit improved mapping between subjets and quarks.\n\u2022 ### Pulling Out All the Stops: Searching for RPV SUSY with Stop-Jets(1309.6631)\n\nSept. 25, 2013 hep-ph, hep-ex\nIf the lighter stop eigenstate decays directly to two jets via baryonic R-parity violation, it could have escaped existing LHC and Tevatron searches in four-jet events, even for masses as small as 100 GeV. In order to recover sensitivity in the face of increasingly harsh trigger requirements at the LHC, we propose a search for stop pairs in the highly-boosted regime, using the approaches of jet substructure. We demonstrate that the four-jet triggers can be completely bypassed by using inclusive jet-H_T triggers, and that the resulting QCD continuum background can be processed by substructure methods into a featureless spectrum suitable for a data-driven bump-hunt down to 100 GeV. We estimate that the LHC 8 TeV run is sensitive to 100 GeV stops with decays of any flavor at better than 5-sigma level, and could place exclusions up to 300 GeV or higher. Assuming Minimal Flavor Violation and running a b-tagged analysis, exclusion reach may extend up to nearly 400 GeV. Longer-term, the 14 TeV LHC at 300\/fb could extend these mass limits by a factor of two, while continuing to improve sensitivity in the 100 GeV region.\n\u2022 ### Transverse Top Quark Polarization and the ttbar Forward-Backward Asymmetry(1303.1200)\n\nJuly 3, 2013 hep-ph, hep-ex\nThe forward-backward asymmetry in top pair production at the Tevatron has long been in tension with the Standard Model prediction. One of the only viable new physics scenarios capable of explaining this anomaly is an s-channel axigluon-like resonance, with the quantum numbers of the gluon but with significant axial couplings to quarks. While such a resonance can lead to a clear bump or excess in the ttbar or dijet mass spectra, it may also simply be too broad to cleanly observe. Here, we point out that broad ttbar resonances generally lead to net top and antitop polarizations transverse to the production plane. This polarization is consistent with all discrete spacetime symmetries, and, analogous to the forward-backward asymmetry itself, is absent in QCD at leading order. Within the parameter space consistent with the asymmetry measurements, the induced polarization can be sizable, and might be observable at the Tevatron or the LHC.\n\u2022 ### Cornering Light Stops with Dileptonic mT2(1211.6106)\n\nJan. 21, 2013 hep-ph, hep-ex\nSupersymmetric spectra with a stop NLSP and a neutralino or gravitino LSP present a special challenge for collider searches. For stop pairs directly produced from QCD, the visible final-state particles are identical to those of top quark pair production, giving very similar kinematics but often with much smaller rates. The situation is exacerbated for compressed spectra with m(stop) ~ m(top) + m(LSP), as well as for lighter stops which can suffer from low acceptance efficiencies. In this note, we explore the power of a direct stop search using dileptonic mT2, similar to the one recently performed by ATLAS, but more optimized to cover these difficult regions of the (m(stop),m(LSP)) plane. Our study accounts for the effects of stop chirality and LSP identity, which can be significant. In particular, our estimates suggest that m(stop) ~ m(top) with a massless LSP is excludable for right-handed stops with bino-like (gravitino) LSP with 2012 (2011) data, but remains largely unobservable in the case of a higgsino-like singlino LSP. For each of these cases we map out the regions of parameter space that can be excluded with 2012 data, as well as currently allowed regions that would yield discovery-level significance. We also comment on the prospects of a precision mT2 shape measurement, and consider the potential of ATLAS's dileptonic stop -> b chi^+ searches when re-interpreted for light stops decaying directly to the LSP.\n\u2022 ### Boosting Searches for Natural SUSY with RPV via Gluino Cascades(1211.4025)\n\nJan. 11, 2013 hep-ph, hep-ex\nIn the presence of even minuscule baryonic R-parity violation, the stop can be the lightest superpartner and evade LHC searches because it decays into two jets. In order to cover this interesting possibility, we here consider new searches for RPV stops produced in gluino cascades. While typical searches for gluinos decaying to stops rely on same-sign dileptons, the RPV cascades usually have fewer hard leptons, less excess missing energy, and more jets than R-parity conserving cascades. If the gluino is a Dirac fermion, same-sign dilepton signals are also often highly depleted. We therefore explore search strategies that use single-lepton channels, and combat backgrounds using HT, jet counting, and more detailed multijet kinematics or jet substructure. We demonstrate that the stop mass peaks can be fully reconstructed over a broad range of spectra, even given the very high jet multiplicities. This would not only serve as a \"double-discovery\" opportunity, but would also be a spectacular confirmation that the elusive top-partner has been hiding in multijets.\n\u2022 ### A New Twist on Top Quark Spin Correlations(1212.4888)\n\nDec. 20, 2012 hep-ph, hep-ex\nTop-antitop pairs produced at hadron colliders are largely unpolarized, but their spins are highly correlated. The structure of these correlations varies significantly over top production phase space, allowing very detailed tests of the Standard Model. Here, we explore top quark spin correlation measurement from a general perspective, highlighting the role of azimuthal decay angles. By taking differences and sums of these angles about the top-antitop production axis, the presence of spin correlations can be seen as sinusoidal modulations resulting from the interference of different helicity channels. At the LHC, these modulations exhibit nontrivial evolution from near-threshold production into the boosted regime, where they become sensitive to almost the entire QCD correlation effect for centrally produced tops. We demonstrate that this form of spin correlation measurement is very robust under full kinematic reconstruction, and should already be observable with high significance using the current LHC data set. We also illustrate some novel ways that new physics can alter the azimuthal distributions. In particular, we estimate the power of our proposed measurements in probing for anomalous color-dipole operators, as well as for broad resonances with parity-violating couplings. Using these methods, the 2012 run of the LHC may be capable of setting simultaneous limits on the top quark's anomalous chromomagnetic and chromoelectric dipole moments at the level of 3*10^{-18}cm (0.03\/m_t).\n\u2022 ### Diboson-Jets and the Search for Resonant Zh Production(1204.0525)\n\nApril 2, 2012 hep-ph, hep-ex\nNew particles at the TeV-scale may have sizeable decay rates into boosted Higgs bosons or other heavy scalars. Here, we investigate the possibility of identifying such processes when the Higgs\/scalar subsequently decays into a pair of W bosons, constituting a highly distinctive \"diboson-jet.\" These can appear as a simple dilepton (plus MET) configuration, as a two-prong jet with an embedded lepton, or as a four-prong jet. We study jet substructure methods to discriminate these objects from their dominant backgrounds. We then demonstrate the use of these techniques in the search for a heavy spin-one Z' boson, such as may arise from strong dynamics or an extended gauge sector, utilizing the decay chain Z' -> Zh -> Z(WW^(*)). We find that modes with multiple boosted hadronic Zs and Ws tend to offer the best prospects for the highest accessible masses. For 100\/fb luminosity at the 14 TeV LHC, Z' decays into a standard 125 GeV Higgs can be observed with 5-sigma significance for masses of 1.5-2.5 TeV for a range of models. For a 200 GeV Higgs (requiring nonstandard couplings, such as fermiophobic), the reach may improve to up to 2.5-3.0 TeV.\n\u2022 ### Discriminating Top-Antitop Resonances using Azimuthal Decay Correlations(1104.2043)\n\nAug. 27, 2011 hep-ph, hep-ex\nTop-antitop pairs produced in the decay of a new heavy resonance will exhibit spin correlations that contain valuable coupling information. When the tops decay, these correlations imprint themselves on the angular patterns of the final quarks and leptons. While many approaches to the measurement of top spin correlations are known, the most common ones require detailed kinematic reconstructions and are insensitive to some important spin interference effects. In particular, spin-1 resonances with mostly-vector or mostly-axial couplings to top cannot be easily discriminated from one another without appealing to mass-suppressed effects or to more model-dependent interference with continuum Standard Model production. Here, we propose to probe the structure of a resonance's couplings to tops by measuring the azimuthal angles of the tops' decay products about the production axis. These angles exhibit modulations which are typically O(0.1-1), and which by themselves allow for discrimination of spin-0 from higher spins, measurement of the CP-phase for spin-0, and measurement of the vector\/axial composition for spins 1 and 2. For relativistic tops, the azimuthal decay angles can be well-approximated without detailed knowledge of the tops' velocities, and appear to be robust against imperfect energy measurements and neutrino reconstructions. We illustrate this point in the highly challenging dileptonic decay mode, which also exhibits the largest modulations. We comment on the relevance of these observables for testing axigluon-like models that explain the top quark A_FB anomaly at the Tevatron, through direct production at the LHC.\n\u2022 ### Multivariate discrimination and the Higgs + W\/Z search(1010.3698)\n\nJune 21, 2011 hep-ph, hep-ex\nA systematic method for optimizing multivariate discriminants is developed and applied to the important example of a light Higgs boson search at the Tevatron and the LHC. The Significance Improvement Characteristic (SIC), defined as the signal efficiency of a cut or multivariate discriminant divided by the square root of the background efficiency, is shown to be an extremely powerful visualization tool. SIC curves demonstrate numerical instabilities in the multivariate discriminants, show convergence as the number of variables is increased, and display the sensitivity to the optimal cut values. For our application, we concentrate on Higgs boson production in association with a W or Z boson with H -> bb and compare to the irreducible standard model background, Z\/W + bb. We explore thousands of experimentally motivated, physically motivated, and unmotivated single variable discriminants. Along with the standard kinematic variables, a number of new ones, such as twist, are described which should have applicability to many processes. We find that some single variables, such as the pull angle, are weak discriminants, but when combined with others they provide important marginal improvement. We also find that multiple Higgs boson-candidate mass measures, such as from mild and aggressively trimmed jets, when combined may provide additional discriminating power. Comparing the significance improvement from our variables to those used in recent CDF and DZero searches, we find that a 10-20% improvement in significance against Z\/W + bb is possible. Our analysis also suggests that the H + W\/Z channel with H -> bb is also viable at the LHC, without requiring a hard cut on the W\/Z transverse momentum.\n\u2022 ### Ditau-Jet Tagging and Boosted Higgses from a Multi-TeV Resonance(1011.4523)\n\nNov. 19, 2010 hep-ph, hep-ex\nNew TeV-scale physics processes at the LHC can produce Higgs bosons with substantive transverse Lorentz boost, such that the Higgs's decay products are nominally contained in a single jet. In the case of a light Higgs decaying predominantly to bb, previous studies have shown that these Higgs-jets can be identified by capitalizing on jet substructure techniques. In this work, we explore the possibility of also utilizing the subdominant but very distinctive decay h -> tau tau. To this end, we introduce the concept of a ditau-jet,'' or a jet consisting of two semi-collinear taus where one or both decay hadronically. We perform simple modifications to ordinary tau tagging methods to account for this configuration, and estimate tag rates of order 50% and QCD mistag rates of order 0.1%-0.01% for p_T TeV, even in the presence of pileup. We further demonstrate the feasibility of reconstructing the ditau invariant mass by using traditional MET projection techniques. Given these tools, we estimate the sensitivity of the LHC for discovery of a multi-TeV Z' decaying to Zh, utilizing both leptonic and hadronic Z decay channels. The leptonic Z channel is limited due to low statistics, but the hadronic Z channel is potentially competitive with other searches.\n\u2022 ### Jet Substructure and the Search for Neutral Spin-One Resonances in Electroweak Boson Channels(1010.5253)\n\nOct. 25, 2010 hep-ph, hep-ex\nStrongly coupled models at the TeV scale often predict one or more neutral spin-one resonances (Z') which have appreciable branching fractions to electroweak bosons, namely the Higgs and longitudinal W and Z. These resonances are usually believed to have multi-TeV mass due to electroweak precision constraints, placing them on the edge of LHC discovery reach. Searching for them is made particularly challenging because hadronically decaying electroweak bosons produced at such high energy will appear very similar to QCD jets. In this work we revisit the possibility of discovering these resonances at the LHC, taking advantage of recently developed jet substructure techniques. We make a systematic investigation of substructure performance for the identification of highly Lorentz-boosted electroweak bosons, which should also be applicable to more general new physics searches. We then estimate the model-independent Z' discovery reach for the most promising final-state channels, and find significant improvements compared to previous analyses. For modes involving the Higgs, we focus on a light Higgs decaying to b quarks. We further highlight several other novelties of these searches. In the case that vertex-based b-tagging becomes inefficient at high p_T, we explore the utility of a muon-based b-tag, or no b-tag at all. We also introduce the mode Z' -> Zh -> (invisible)(bb) as a competitive discovery channel.\n\u2022 ### Efficient Identification of Boosted Semileptonic Top Quarks at the LHC(1007.2221)\n\nJuly 13, 2010 hep-ph, hep-ex\nTop quarks produced in multi-TeV processes will have large Lorentz boosts, and their decay products will be highly collimated. In semileptonic decay modes, this often leads to the merging of the b-jet and the hard lepton according to standard event reconstructions, which can complicate new physics searches. Here we explore ways of efficiently recovering this signal in the muon channel at the LHC. We perform a particle-level study of events with muons produced inside of boosted tops, as well as in generic QCD jets and from W-strahlung off of hard quarks. We characterize the discriminating power of cuts previously explored in the literature, as well two new ones. We find a particularly powerful isolation variable which can potentially reject light QCD jets with hard embedded muons at the 10^3 level while retaining 80~90% of the tops. This can also be fruitfully combined with other cuts for O(1) greater discrimination. For W-strahlung, a simple pT-scaled maximum \\Delta R cut performs comparably to a highly idealized top-mass reconstruction, rejecting an O(1) fraction of the background with percent-scale loss of signal. Using these results, we suggest a set of well-motivated baseline cuts for any physics analysis involving semileptonic top quarks at TeV-scale momenta, using neither b-tagging nor missing energy as discriminators. We demonstrate the utility of our cuts in searching for resonances in the top-antitop invariant mass spectrum. For example, our results suggest that 100 fb^{-1} of data from a 14 TeV LHC could be used to discover a warped KK gluon up to 4.5 TeV or higher.\n\u2022 ### Leptophilic Signals of a Sneutrino (N)LSP and Flavor Biases from Flavor-Blind SUSY(1003.5664)\n\nJune 24, 2010 hep-ph\nAlthough the sneutrino is a viable NLSP candidate with gravitino LSP, spectra of this type occupy a part of SUSY parameter space in which collider signatures are poorly studied. In this paper we will extend previous work on this topic to include sneutrino NLSP spectra with non-minimal phenomenology. Generally, these spectra exhibit very leptophilic behavior, which can be easily observed at the LHC. We show that a variety of such spectra can be analysed with similar techniques, leading in each case to very suggestive evidence for complicated decay chains that end in sneutrinos. Amongst the variations considered, we find a simple class of spectra that produce signals with strong electron-muon asymmetries. These signals could naively be interpreted as evidence for lepton flavor violation, but can occur even with flavor-blind SUSY.\n\u2022 ### Signals of a Sneutrino (N)LSP at the LHC(0911.4132)\n\nFeb. 16, 2010 hep-ph\nThe sneutrino is a viable candidate for the NLSP in SUSY spectra with gravitino LSP. In this work we study the collider implications of this possibility. In particular, we investigate whether the LHC can distinguish it (at least, in some cases) from alternative spectra, such as those with a neutralino LSP. We show that there exists a complete family of experimentally allowed and theoretically motivated spectra with sneutrino NLSP, which exhibit very distinctive multilepton signals that are difficult to fake within the MSSM. We study these signals in detail, including the techniques necessary to find them. We demonstrate our analysis approach on simulations incorporating backgrounds.\n\u2022 ### A Simple Explanation for DAMA with Moderate Channeling(0910.0007)\n\nOct. 1, 2009 hep-ph\nWe consider the possibility that the DAMA signal arises from channeled events in simple models where the dark matter interaction with nuclei is suppressed at small momenta. As with the standard WIMP, these models have two parameters (the dark matter mass and the size of the cross-section), without the need to introduce an additional energy threshold type of parameter. We find that they can be consistent with channeling fractions as low as about ~ 15%, so long as at least ~70% of the nuclear recoil energy for channeled events is deposited electronically. Given that there are reasons not to expect very large channeling fractions, these scenarios make the channeling explanation of DAMA much more compelling.\n\u2022 ### Top-tagging: A Method for Identifying Boosted Hadronic Tops(0806.0848)\n\nSept. 11, 2008 hep-ph\nA method is introduced for distinguishing top jets (boosted, hadronically decaying top quarks) from light quark and gluon jets using jet substructure. The procedure involves parsing the jet cluster to resolve its subjets, and then imposing kinematic constraints. With this method, light quark or gluon jets with pT ~ 1 TeV can be rejected with an efficiency of around 99% while retaining up to 40% of top jets. This reduces the dijet background to heavy t-tbar resonances by a factor of ~10,000, thereby allowing resonance searches in t-tbar to be extended into the all-hadronic channel. In addition, top-tagging can be used in t-tbar events when one of the tops decays semi-leptonically, in events with missing energy, and in studies of b-tagging efficiency at high pT.\n\u2022 ### Density Perturbations in Chain Inflation(hep-ph\/0611286)\n\nDec. 6, 2006 hep-ph\nWe consider the model of Chain Inflation,'' in which the period of inflation in our universe took the form of a long sequence of quantum tunneling events. We find that in the simplest such scenario, in which the tunneling processes are uniform, approximately 10^4 vacua per e-folding of inflation are required in order that the density perturbations produced are of an acceptable size. We arrive at this conclusion through a combination of analytic and numerical techniques, which could also serve as starting points for calculations with more general sets of assumptions.\n\u2022 ### Holographic Grand Unification(hep-ph\/0605014)\n\nMay 7, 2006 hep-th, hep-ph\nWe present a framework for grand unification in which the grand unified symmetry is broken spontaneously by strong gauge dynamics, and yet the physics at the unification scale is described by (weakly coupled) effective field theory. These theories are formulated, through the gauge\/gravity correspondence, in truncated 5D warped spacetime with the UV and IR branes setting the Planck and unification scales, respectively. In most of these theories, the Higgs doublets arise as composite states of strong gauge dynamics, corresponding to degrees of freedom localized to the IR brane, and the observed hierarchies of quark and lepton masses and mixings are explained by the wavefunction profiles of these fields in the extra dimension. We present several realistic models in this framework. We focus on one in which the doublet-triplet splitting of the Higgs fields is realized within the dynamical sector by the pseudo-Goldstone mechanism, with the associated global symmetry corresponding to a bulk gauge symmetry in the 5D theory. Alternatively, the light Higgs doublets can arise as a result of dynamics on the IR brane, without being accompanied by their triplet partners. Gauge coupling unification and proton decay can be studied in these models using higher dimensional effective field theory. The framework also sets a stage for further studies of, e.g., proton decay, fermion masses, and supersymmetry breaking.\n\u2022 ### Minimally Fine-Tuned Supersymmetric Standard Models with Intermediate-Scale Supersymmetry Breaking(hep-ph\/0509243)\n\nApril 4, 2006 hep-ph\nWe construct realistic supersymmetric theories in which the correct scale for electroweak symmetry breaking is obtained without significant fine-tuning. We consider two classes of models. In one class supersymmetry breaking is transmitted to the supersymmetric standard model sector through Dirac gaugino mass terms generated by a D-term vacuum expectation value of a U(1) gauge field. In the other class the supersymmetry breaking sector is separated from the supersymmetric standard model sector in an extra dimension, and the transmission of supersymmetry breaking occurs through gauge mediation. In both these theories the Higgs sector contains two Higgs doublets and a singlet, but unlike the case for the next-to-minimal supersymmetric standard model the singlet field is not responsible for generating the supersymmetric or supersymmetry breaking mass for the Higgs doublets. These masses, as well as the mass for the singlet, are generated through gravitational-strength interactions. The scale at which the squark and slepton masses are generated is of order (1-100) TeV, and the generated masses do not respect the unified mass relations. We find that electroweak symmetry breaking in these theories is caused by an interplay between the top-stop radiative correction and the holomorphic supersymmetry breaking mass for the Higgs doublets and that the fine-tuning can be reduced to the level of 20%. The theories have rich phenomenology, including a variety of possibilities for the lightest supersymmetric particle.\n\u2022 ### (mu B)-driven Electroweak Symmetry Breaking(hep-ph\/0509244)\n\nDec. 11, 2005 hep-ph\nWe consider a scenario in which the dominant quartic coupling for the Higgs doublets arises from the F-term potential, rather than the conventional SU(2)_L x U(1)_Y D-term potential, in supersymmetric theories. The quartic coupling arises from a superpotential interaction between the two Higgs doublets and a singlet field, but unlike the case in the next-to-minimal supersymmetric standard model the singlet field is not responsible for the generation of the supersymmetric or holomorphic supersymmetry-breaking masses for the Higgs doublets. We find that this naturally leads to a deviation from the conventional picture of top-Yukawa driven electroweak symmetry breaking -- electroweak symmetry breaking is triggered by the holomorphic supersymmetry breaking mass for the Higgs doublets (the \\mu B term). This allows a significant improvement for fine-tuning in electroweak symmetry breaking, since the top squarks do not play a major role in raising the Higgs boson mass or in triggering electroweak symmetry breaking and thus can be light. The amount of fine-tuning is given by the squared ratio of the lightest Higgs boson mass to the charged Higgs boson mass, which can be made better than 20%. Solid implications of the scenario include a small value for tan\\beta, less than about 3, and relatively light top squarks.","date":"2021-03-08 22:03:39","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 0, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 1, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.7137304544448853, \"perplexity\": 2136.174822492529}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2021-10\/segments\/1614178385529.97\/warc\/CC-MAIN-20210308205020-20210308235020-00301.warc.gz\"}"}
| null | null |
Q: Check if todays date is before or after a date held in sql I don't understand why it doesn't work.
Date that is stored in database, get put there using this
$date2=Date('d/m/y', strtotime("+90 days"));
Stored in column with this info
varchar(255) latin1_swedish_ci
Output:
$get_w_date = $qr['r_e_date'];
print"
<tr><th colspan=\"2\"> <b>Warranty Status</b> </th></tr>";
if(strtotime($get_w_date) > time()) {
echo '<tr bgcolor=\"ff00ff\"> outcome 1';
} else {
echo '<tr bgcolor=\"00ff00\"> outcome 2';
}
It always runs outcome 2 regardless of the date in the database being before now or not :(
A: This is a lot easier if you didn't store your dates as strings.
Try using STR_TO_DATE() and UNIX_TIMESTAMP(). Your SQL:
SELECT UNIX_TIMESTAMP(STR_TO_DATE(r_e_date, "%m/%d/%y")) as r_e_date
Your PHP:
$get_w_date = $qr['r_e_date'];
if($get_w_date > time()) {
A: The below code is for checking if the saved date is 1 day before or after:
<?php
$date = date('Y-m-d');
Echo "Today : $date<br/>";
$saved = "2013-12-29"; // For output i set the date instead of $qr['r_e_date'];
$previous_date = date('Y-m-d', strtotime($saved .' -1 day'));
Echo "Previous to saved date : $previous_date<br/>";
$next_date = date('Y-m-d', strtotime($saved .' +1 day'));
Echo "Next to saved date : $next_date<br/><br/>";
if($previous_date == $date)
{
Echo "Before";
}
else if($next_date == $date)
{
Echo "After";
}
?>
Note for the above code to work date in database must be stored in Y-m-d(Year-month-date) format.
If you want to remove the 1 day limit you can use the following code to check before,after or same date:
<?php
$date = date('Y-m-d');
Echo "Today : $date<br/>";
$todayA=explode("-",$date);
$saved = "2014-01-03"; // For output i set the date instead of $qr['r_e_date'];
Echo "Saved : $saved<br/><br/>";
$savedA=explode("-",$saved);
if($savedA[0]==$todayA[0])
{
if($savedA[1]==$todayA[1])
{
if($savedA[2]==$todayA[2])
{
Echo "Same Date";
}
else if($savedA[2]<$todayA[2])
{
Echo "Before";
}
else
{
Echo "After";
}
}
else if($savedA[1]<$todayA[1])
{
Echo "Before";
}
else
{
Echo "After";
}
}
else if($savedA[0]<$todayA[0])
{
Echo "Before";
}
else
{
Echo "After";
}
?>
|
{
"redpajama_set_name": "RedPajamaStackExchange"
}
| 107
|
Q: word2vec: CBOW & skip-gram performance wrt training dataset size The question is simple. Which of the CBOW & skip-gram works better for a big dataset? (And the answer for small dataset follows.)
I am confused since, by Mikolov himself, [Link]
Skip-gram: works well with small amount of the training data, represents well even rare words or phrases.
CBOW: several times faster to train than the skip-gram, slightly better accuracy for the frequent words
but, according to Google TensorFlow, [Link]
CBOW smoothes over a lot of the distributional information (by treating an entire context as one observation). For the most part, this turns out to be a useful thing for smaller datasets.However, skip-gram treats each context-target pair as a new observation, and this tends to do better when we have larger datasets. We will focus on the skip-gram model in the rest of this tutorial.
Here is a Quora post which supports the first thought [Link], and then there is the other Quora post which suggests the second thought [Link]--both seem derivable from the aforementioned credible sources.
Or is it like what Mikolov said:
Overall, the best practice is to try few experiments and see what works the best for you, as different applications have different requirements.
But surely there is an empirical or analytical verdict or final saying on this matter?
A: When Mikolov meant CBOW works good for bigger dataset and SG for smaller dataset, I suppose the quantity of data is considered. Since CBOW considers one target word and many context words, it needs a bigger dataset to train for target vectors compared to datasets used in SG. As in vice versa, in SG due to many target words for single context word, it needs smaller datasets.
Google Tensor Flow speaks about the distribution of words in the dataset for generating quality vectors rather than the quantity of dataset used. As CBOW model considers more over the same context words for all the target words in a sentence, a bigger (distributed) dataset is needed and vice versa for SG.
In common, they both mean the same:
*
*CBOW model = dataset with short sentences but high number of samples (bigger dataset)
*SG model = dataset with long sentences and low number of samples (smaller dataset)
|
{
"redpajama_set_name": "RedPajamaStackExchange"
}
| 1,147
|
Atatus provides a simple JSON-based API to access information about your errors and performances.
The API is available at https://api.atatus.com/api. The server only speaks JSON.
Atatus is an application performance monitoring and advanced error tracking platform for modern web, mobile and server applications. Create a free account to start monitoring your apps.
|
{
"redpajama_set_name": "RedPajamaC4"
}
| 7,375
|
Couple fatally shot while inside parked car on West Side
By Cate Cauguiran
CHICAGO (WLS) -- A couple were fatally shot early Sunday while parked in a vehicle in Chicago's Austin neighborhood
The victim's family identifies the couple as 20-year-old Keshonda Maxey and 26-year-old Martice Luster.
Just before 2 a.m., the couple were in a car near Washington and Lockwood when someone shot at them multiple times and killed them. No one was in custody Sunday evening.
"I just want to know who killed them," said Elnora Booker, Luster's grandmother.
EMBED More News Videos
Maxey had a 4-year-old daughter and Luster had a 6-year-old boy.
Both families said the two were dedicated parents and always went out of their way for others.
"She was kind. She was loving. She cared about everybody; whatever she could do for you she would do," said Jacqueline "Tammy" Webb, Maxey's mother.
"They weren't no bad people and for you to take my only child! Y'all don't know how that feels right now but I am going crazy," said Tony Luster, Luster's father.
Police were investigating.
austinchicagochicago shootingfatal shooting
|
{
"redpajama_set_name": "RedPajamaCommonCrawl"
}
| 9,034
|
Q: Database update will not work I know that you guys will find this simple, but can anyone tell me why I am getting a syntax error despite following every instruction on numerous sites?
My code in full is:
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
dbProvider = "PROVIDER=Microsoft.Jet.OLEDB.4.0;"
dbSource = "Data Source = F:\Brett\Programming Projects\Roster\Roster.mdb"
con.ConnectionString = dbProvider & dbSource
con.Open()
' This is grabbing all the records from the listing table in the Roster Database
sql = "Select * FROM Listing"
' Or selected columns
'sql = "SELECT Listing.FName, Listing.LName FROM Listing"
da = New OleDb.OleDbDataAdapter(sql, con)
' Populate the dataset with the data adaptor. This can be any name
da.Fill(ds, "Roster")
con.Close()
MaxRows = ds.Tables("Roster").Rows.Count
inc = -1
End Sub
Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click
Dim cb As New OleDb.OleDbCommandBuilder(da)
Dim iRow As Integer = Me.Label1.Text
Dim junk As Integer
ds.Tables("Roster").Rows(iRow).Item(5) = Me.TextBox3.Text
ds.Tables("Roster").Rows(iRow).Item(6) = Me.TextBox4.Text
ds.Tables("Roster").Rows(iRow).Item(8) = Me.TextBox5.Text
da.Update(ds, "Roster")
'da.Update(ds)
End Sub
Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
Dim newtbl As DataTable
Dim cb As New OleDb.OleDbCommandBuilder(da)
Dim cmd As New OleDb.OleDbCommand
newtbl = ds.Tables("Roster")
Dim drCurrent As DataRow
drCurrent = newtbl.NewRow()
drCurrent(1) = "sfd"
drCurrent(2) = "werter"
newtbl.Rows.Add(drCurrent)
da.Update(ds, "Roster")
End Sub
No matter what I do, I get this error message. Any help will be greatly appreciated as this is two days now...
I would show you my error but as usual, some peanut won't let me without some crap.. It states OleDbException was unhandled, Syntax error in Insert Into statement.
A: Can you try wrapping your database calls in a try-catch block and inspect the InnerXml that's returned with the exception?
That might give you more information about the error that you're getting.
|
{
"redpajama_set_name": "RedPajamaStackExchange"
}
| 7,781
|
Australia's plain packaging laws..
Australia's plain packaging laws put to the test
It's been revealed that more than $50 million will be spent by the Australian Government to defend the plain packaging of cigarettes.
Tobacco company Philip Morris has claimed that the laws have been harmful to its intellectual property and has dragged senior government and judicial figures into an international tribunal in Singapore.
But do they stand a chance of repealing plain packaging – a move public health advocates claim has been successful in reducing smoking levels?
HHG Legal Group director Murray Thornhill said it was the latest move by the tobacco giant after the laws were upheld in the Australian High Court.
'The constitutional argument was similar in some ways to the one everyone was familiar with in the movie The Castle, that there had been an expropriation of property by the Australian Government and that there hadn't been compensated on just terms,' he told 6PR's Chris Ilsley.
'The High Court defeated that argument. The reason that this challenge, the way it's able to have been brought, is because of a treaty between Hong Kong and Australia, an agreement around international trade
'That agreement, which was made in 1993, has a clause in it which deals with the arbitration of disputes. It's been a long, drawn-out saga.'
Listen to the full interview below:
|
{
"redpajama_set_name": "RedPajamaCommonCrawl"
}
| 9,140
|
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import {HttpModule} from '@angular/http';
import {FormsModule,ReactiveFormsModule} from '@angular/forms';
import { StoreModule } from '@ngrx/store';
import { audiograph } from './service/audiograph.service';
import {tunesplaysearchReducer} from './service/tunesplaysearch.service'
import {bugsReducer} from './service/bugs.service'
import {DJReducer} from'./service/DJ.service'
import {Ng2PaginationModule} from 'ng2-pagination';
import {AUTH_PROVIDERS} from 'angular2-jwt';
import {Auth} from './service/auth.service';
import {DndModule} from 'ng2-dnd';
// component
import { AppComponent } from './app.component';
import {NavbarComponent} from './components/navbar/navbar.component';
import {MainPageComponent} from './components/Main/MainPage.component';
import {DJComponent} from './components/DJ/DJ.component';
import {trackComponent} from './components/track/track.component';
import {playlistComponent} from './components/playlist/playlist.component';
import {textsearchComponent} from './components/textsearch/textsearch.component'
import {tunesplaylistComponent} from './components/tunesplaylist/tunesplaylist.component'
import {tunesplaysearchComponent} from './components/tunesplaysearch/tunesplaysearch.component'
import {tunesplaysearchResultComponent} from './components/tunesplaysearchResult/tunesplaysearchResult.component'
import {routing} from './app.routing';
import{bugsartistComponent} from './components/bugsartist/bugsartist.component'
import{bugssearchResultComponent} from './components/bugssearchResult/bugssearchResult.component'
import{dailychartsComponent} from './components/dailycharts/dailycharts.component'
@NgModule({
imports: [ BrowserModule,routing,HttpModule,FormsModule,ReactiveFormsModule,Ng2PaginationModule,
StoreModule.provideStore({ audiograph: audiograph,tunesplaysearch:tunesplaysearchReducer,bugs:bugsReducer,DJ:DJReducer})
, DndModule.forRoot()
],
declarations: [ AppComponent,
NavbarComponent,
MainPageComponent,
trackComponent,
DJComponent,
textsearchComponent,
tunesplaylistComponent,
playlistComponent,
tunesplaysearchComponent,
tunesplaysearchResultComponent,
bugssearchResultComponent,
bugsartistComponent,
dailychartsComponent
],
providers:[AUTH_PROVIDERS,Auth],
bootstrap: [ AppComponent ]
})
export class AppModule { }
|
{
"redpajama_set_name": "RedPajamaGithub"
}
| 1,123
|
13 is the second album by American heavy metal band Solace. Considered heavier, angrier and musically more aggressive than its predecessor Further, 13 continued to raise Solace above their stoner rock stereotype with its heavy metal and doom metal influences, this time with help from Scott "Wino" Weinrich (The Obsessed, Saint Vitus, Spirit Caravan). With comparisons made between 13 and albums from heavy bands Black Sabbath and Led Zeppelin, Solace was dubbed "one of the freshest sounds the metal scene has ever cultivated".
13 was released in 2003 on both CD and vinyl; the CD version contained 13 tracks, while the vinyl version featured two additional songs. The cover art was supplied by artist, fan and friend of Solace, Paul Vismara. It took Solace three years to complete the album.
Title
13'''s title was derived from the bad luck the band felt they endured during the production of this album. Problems included:
The need for four different drummers to complete the album.
Internal strife due to supposed splits with vocalist Jason.
The destruction of the album's original master tapes prior to their completion.
Track listing
"Loving Sickness/Burning Fuel" – 6:44
"Indolence" – 4:07
"King Alcohol" – 5:41
"Once Around the Sun (Deep Through Time)" – 7:12
"Common Cause" – 4:16
"In the Oven" – 3:18
"Forever My Queen" (Pentagram cover) – 2:38
"Theme..." – 1:31
"Try" – 6:14
"Sled Heavy" – 3:25
"Rice Burner" – 7:23
"With Time" (Agnostic Front cover) – 2:23
"Untitled" – 9:42 (Track 13 is a hidden track not referred to on the album's liner notes. It is silent for 5:15, after which the music begins. While this track is commonly referred to by fans as "Untitled", it has been identified by Solace as actually being named "Shit Kisser". The song originally appeared on the band's demo in 1997.)
European vinyl edition
(Has different running order of the tracks, "Untitled" is mentioned as "Shit Kisser" and spins without the silence in the beginning.)
A1 "Loving Sickness/Burning Fuel" – 6:44
A2 "Indolence" – 4:07
A3 "King Alcohol" – 5:41
A4 "Forever My Queen" (Pentagram cover) – 2:38
B1 "Once Around the Sun (Deep Through Time)" – 7:12
B2 "Common Cause" – 4:16
B3 "In the Oven" – 3:18
B4 "With Time" (Agnostic Front cover) – 2:23
C1 "Sled Heavy" – 3:25
C2 "Theme..." – 1:31
C3 "Try" – 6:14
C4 "Rice Burner" – 7:23
D1 "Burn" – 6:02
D2 "Red 5/Failing Through" – 7:28
D3 "Shit Kisser" – 4:53
Vinyl edition
"Loving Sickness/Burning Fuel" – 6:44
"Indolence" – 4:07
"King Alcohol" – 5:41
"Once Around the Sun (Deep Through Time)" – 7:12
"Common Cause" – 4:16
"In the Oven" – 3:18
"Forever My Queen" (Pentagram cover) – 2:38
"Theme..." – 1:31
"Try" – 6:14
"Sled Heavy" – 3:25
"Rice Burner" – 7:23
"With Time" (Agnostic Front cover) – 2:23
"Untitled" – 9:42 (see note on CD version)
"Burn"
"Red 5/Failing Through"
The lyrics to the original songs on this album have never been officially released. It is commonly believed that their intensely personal nature prevents vocalist Jason from allowing their publication.
The song "Once Around the Sun (Deep Through Time)" has an introduction that features dialogue from the 1962 film The Creation of the Humanoids.
Personnel
Tommy Southard – guitars, production
Jason – vocals, lyrics
Rob Hultz – bass
John Proveaux – drums
Scott Weinrich – lyrics, vocals ("Common Cause"), guitar ("Common Cause", "Indolence")
Rick Lewis – keyboards ("Indolence")
Mad Lee – harmonica ("Loving Sickness/Burning Fuel")
Keith Ackerman – drums ("King Alcohol", "Sled Heavy")
Bill "Bixby" Belford – drums ("Loving Sickness/Burning Fuel")
Matt Gunvordahl – drums ("Try")
Eric Rachel – recording, production, mixing
Charlie Schaefer – recording
References
External links
[ Allmusic'' review]
Lollipop Magazine review
Solace (band) albums
2003 albums
MeteorCity albums
|
{
"redpajama_set_name": "RedPajamaWikipedia"
}
| 2,301
|
YOUR Tangible Social Media Marketing ROI?
3 Reasons you're not seeing tangible ROI with your social media efforts..
Related Article: Social Media Not Working For YOUR Business?
Not telling your brand story, posting inconsistently and missing out on paid advertising opportunities could sink your brand.
Today, according to Statista, some 22 percent of the world's population is on Facebook, and a whopping 93 percent of Pinterest users are reaching for their credit cards to make online purchases.
When people hear these numbers, they don't wait long before they too dive in head-long, eager to have their own slice of the huge pie.
Typically, they open one social media account after another, in the hopes that one or two platforms will somehow convert and compensate for their overall investment of time and money.
Related Article: YOUR Social Media Brand Stories?
But is "the more the merrier" approach delivering the desired social media returns?
Social media success has little to do with the number of profiles you have, the photos you like or the people you follow -- just as the success of your dating life isn't based on how many Tinder profiles you swipe right on.
With so much content out there and just so much time in the day, the mind-share of the consumer is becoming more and more competitive among brands.
It is no longer just a numbers game. Quality over quantity will win every time, which all comes down to your content and how you make it resonate with your target audience. So, create content you know your audience wants to see on their feeds. It's not about you or your company; it's about them.
Related Article: YOUR Social Media Advertising, The Right Way?
How an Online Product Could be the Focus of a "Share-Able" Joke
Just as happens in real life in our efforts to meet that special someone, most of us also go on a blind date with social media: We settle for the "one-night stand" of a few likes and reciprocated follows, then hope to find true love with great returns.
But true social media success stories are not developed over a night. They are built with strong foundations and strategies in place for sustainable, value-adding content creation that engages with target audiences. Imagine how much more successful you could be on those blind dates if you had your date's entire life history pulled up in front of you to stir conversation, instead of awkwardly sitting there for half the night twiddling your thumbs.
In today's world, you don't step into the batter's box hoping to hit a home run, you step in with a strategy based on the limitless data at your fingertips, expecting to hit one. Successful content opportunities don't just pop out of thin air into your lap, they are facilitated. If you take the time to understand not only who your target audience members are, but their correlated interests and passions, you'll be on your way to effectively preparing a unique content-creation strategy that will lead you to those returns on social everyone is buzzing about.
So, if you're not seeing enough returns on your social media efforts, here are three possible reasons why:
Related Article: Instagram Tips For YOUR Small Business?
1. Not Telling Your Brand Story
Stories are powerful, because they engage the mind. If well-scripted, they can attract visitors to your product or service, engage their emotions and get them doing exactly what you want -- without being salesy or downright "in your face."
If you sell umbrellas, for instance, you could post a picture of your product and say, "Buy this umbrella now." But no one would like that post. However, what if you took a picture of a man opening an umbrella for his date and helping her out of her car? You'd be telling a story that aligns with your product in a way the consumer can relate to: "This month's forecast calls for rain, and lots of it ... and as our fathers used to say, "Always keep protection handy in your car;" you never know when you might need to use it, but she'll appreciate it.'"
Without directly asking people to buy your umbrella, the picture you paint with words generates the feeling of desire for the umbrella. If you're targeting single men, they'll chuckle at the witty spin on sexual protection and put themselves in the situation most have been in when their date asks, "Do you have an umbrella?" And because the answer is typically "no," next thing, they'll be clicking "Purchase" and sharing the joke with friends.
Related Article: YOUR Video Content Is King?
The message? Compelling, brand-optimized stories that your target audience can relate to are key.
A brand that does this well: Warby Parker doesn't sell just glasses, but fashionable glasses that don't break the bank, especially for the millennial generation. To do this, Warby Parker turns every post on social media into a story, and allows customers to relate and "see" themselves in the product, illustrated by this recent Instagram post showcasing the brand with kids.
A brand that's missing the mark: Lincoln Motors sorely misses the mark on its marketing, especially in telling stories. Lincoln is not always top of mind in many car-buyers' decision process, in contrast to its parent company, Ford. If class and high-end appeal are Lincoln's goals, storytelling will be how the brand reminds the market it still exists -- and let itself be a consumer's "second thought." In contrast, Ford dominates, because of how its creative team connects with consumers through social strategy efforts.
Related Article: What Other Peoples Advertising Can Teach YOU?
2. Not Engaging Consistently
Consider the expression "Out of sight, out of mind." In that context, any business with a "when I can" approach to engaging online customers will eventually see its brand buried. The reason is that even more crucial than crafting persuasive content is consistent content.
In the fast-paced social media space, you must consistently push out compelling content (by developing a content marketing strategy and sticking to it).
The message? If you post content today, then skip several days or weeks before posting the next one, your overall online engagement efforts will fail to deliver desired returns.
A brand that engages its audience consistently: Look at Wendy's Twitter feed to see how consistent the brand is in engaging with fans. These tweets are the humorous go-to source for laughs, and often get into play "fights" with other brands. All eyes are on Wendy's because it "gets" engaging consistently.
Related Article: Building An Engaging Social Media Presence?
A brand that's missing the mark: American Airlines had an automatic responder go out on Twitter to all that mentioned the company. But this was a big error because many tweets looked out of place and responded to offensive messages. The automatic responder wasn't doing any favors for the brand, which clearly needed to have a real person engaging the audience.
3. Missing Out on Paid Advertising Opportunities
Captivating copy + consistent posting = successful engagement, but are you engaging the right online audience? Facebook, alone, has an impressive 2.2 billion active users daily, but that's just traffic if you're not targeting and generating the right leads (those more likely to buy from you).
Paid advertising offers a great opportunity to target your ads. For as little as $1 a day, you can advertise effectively and affordably on a platform of choice like Facebook. But 62 percent of small businesses still fail with Facebook Ads. This is because (a) the target audience isn't spending time on Facebook; (b) The business doesn't understand its audience; or (c) The business doesn't have the right hook.
Related Article: YOUR Social Media Advertising, Explained?
Again, businesses must tell a story that gets into the heart of the audience, and tell it strategically and consistently.
To do this, they should take advantage of paid ads on social media. This can result in impressive returns on ad efforts almost immediately.
The message? If you aren't continually testing new content ideas behind your ads, you will lose to a competitor who is.
A brand that does a great job with Facebook ads: One of our own advertising success stories centers around the product Gorilla Bow. With creative content, the mix of perfect targeting offered by our Facebook advertising manager together with a team making sure the product was stocked and ready to resulted in a 3.5x return on ad spend, a 350 percent increase in total sales and a 450 percent decrease in cost-per-click.
Related Article: How To Measure YOUR Social Media ROI?
A brand missing the mark: This would be any brand on Facebook now that doesn't have an advertising budget. With Facebook's limits on your business page's reach, businesses are left with no "air space" on the Facebook feed. If you have a product or service worth sharing, then paid advertising on Facebook is a must.
Guest Authored By Colton Bollinger. Colton is the CEO of Jumper Media, which he founded in 2016 to help small businesses tell amazing brand stories on social media -- all day, every day. He brought on two other business-savvy leaders (also long-time friends) after seeing how most small businesses struggle to attract, engage and convert their audiences effectively on social. Today, using cutting-edge social tools and resources, Jumper Media helps over 3,000 businesses (of all shapes and sizes) connect with their target customers predictably and consistently. Follow Colton on Twitter.
Related Article: Social Media Marketing Steps To Success?
"Not telling your brand story, posting inconsistently and missing out on paid advertising opportunities could sink your brand.." -ColtonBollinger
Fred Hansen Pied Piper of Social Media Marketing at GetMoreHere.com & CEO of Millennium 7 Publishing Co. in Loveland, CO. where I work deep in the trenches of social media strategy, community management and trends. My interests include; online business educator, social media marketing, new marketing technology, skiing, hunting, fishing and The Rolling Stones..-Not necessarily in that order ;)
Labels: Brand Storytelling, Brand Strategy, Colton Bollinger, Content Strategy, ROI, Social Media Marketing, Social Media Mistakes
|
{
"redpajama_set_name": "RedPajamaCommonCrawl"
}
| 5,384
|
{"url":"https:\/\/directory.academickids.com\/encyclopedia\/index.php\/UV\/VIS_spectroscopy","text":"# UV\/VIS spectroscopy\n\nUltraviolet-Visible spectroscopy or Ultraviolet-Visible spectrophotometry (UV\/\u00a0VIS) involves the spectroscopy of photons (spectrophotometry). It uses light in the visible and adjacent near ultraviolet (UV) and near infrared (NIR) ranges. In this region of energy space molecules undergo electronic transitions.\n\n Contents\n\n## Beer-Lambert Law\n\nThe method is used in a quantitative way to determine concentrations of an absorbing species in solution, using the Beer-Lambert law:\n\n[itex]A =\\ [itex] \u2212[itex]\\log_{10}(I\/I_0) = \\epsilon\\cdot c\\cdot L[itex],\n\nwhere A is the measured absorbance, [itex]I_0[itex] is the intensity of the incident light at a given wavelength, [itex]I[itex] is the transmitted intensity, L the pathlength through the sample, and c the concentration of the absorbing species. For each species and wavelength, \u03b5 is a constant known as the extinction coefficient.\n\nThe absorbance A and extinction \u03b5 are sometimes defined in terms of the natural logarithm instead of the base-10 logarithm.\n\n## UV\/ VIS spectrophotometer\n\nThe instrument used in UV\/\u00a0VIS spectroscopy is called a UV\/\u00a0VIS spectrophotometer. To obtain absorption information, a sample is placed in the spectrophotometer and ultraviolet and\/or visible light at a certain wavelength (or range of wavelengths) is shined through the sample. The spectrophotometer measures how much of the light is absorbed by the sample. The intensity of light before going into a certain sample is symbolized by [itex]I_0[itex]. The intensity of light remaining after it has gone through the sample is symbolized by [itex]I[itex]. The fraction of light transmittance is ([itex]I\/I_0[itex]), which is usually expressed as a percent Transmittance (%T). From this information, the absorbance of the sample is determined for that wavelength or as a function for a range of wavelengths. Sophisticated UV\/\u00a0Vis spectrophotometers often do this automatically.\n\nAlthough the samples could be solid (or even gaseous), they are usually liquid. A transparent cell, often called a cuvette, is used to hold a liquid sample in the spectrophotometer. The pathlength L through the sample is then the width of the cell through which the light passes through. Simple (economic) spectrophotometers may use cuvettes shaped like cylindrical test tubes, but more sophisticated ones use rectangular cuvettes, commonly 1 cm in width. For just visible spectroscopy, ordinary glass cuvettes may be used, but ultraviolet spectroscopy requires special cuvettes made of a UV-transparent material such as quartz.\n\n### Ultraviolet-Visible spectrum\n\nAn ultraviolet-visible spectrum is essentially a graph (or plot) of light absorbance vs. wavelength in a range of ultraviolet and\/or visible regions. Such a spectrum can often be produced by a more sophisticated spectrophotometer. Similarly, for a given material of species, a standard graph of extiction coefficient \u03b5 vs. wavelength may be made or used if one is already available. Such a standard graph would be effectively \"concentration-corrected\" and thus independent of concentration.\n\n### Types\n\nIn a single-beam UV\/\u00a0VIS spectrophotometer the light only passes through the sample. In a double-beam UV\/\u00a0VIS spectrophotometer the light passes through a beam chopper which alternately directs the beam through the sample or a reference cell several times per second.\n\n### Common UV\/ VIS spectrophotometers\n\nFollowing is a list of commonly used spectrophotometers:\n\n\u2022 GeneSys 20\n\u2022 HP8452A Diode Array\n\u2022 Spectronic 20\n\u2022 Elico SL159\n\n## History\n\nUV\/\u00a0VIS is the oldest form of spectroscopy.\n\n\u2022 The Science of Spectroscopy\u00a0(http:\/\/www.scienceofspectroscopy.info) - supported by NASA, includes OpenSpectrum, a Wiki-based learning tool for spectroscopy that anyone can edit\n\n\u2022 Art and Cultures\n\u2022 Countries of the World\u00a0(http:\/\/www.academickids.com\/encyclopedia\/index.php\/Countries)\n\u2022 Space and Astronomy","date":"2021-06-17 05:22:27","metadata":"{\"extraction_info\": {\"found_math\": false, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 0, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 0, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.8032798767089844, \"perplexity\": 2491.480243477819}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2021-25\/segments\/1623487629209.28\/warc\/CC-MAIN-20210617041347-20210617071347-00308.warc.gz\"}"}
| null | null |
Q: How to save values to database using AngularJS (Django Frame Work) Hi my project works on Django framework with some use of AngularJS. What I need to achieve is when I click on submit on my page(html), it should save all the values I entered into the Database. I heard that I just need a simple submit button and main changes are in views.py. I am very new to Django as well as AngularJS. The following is my codes. Thanks in advance.
Html and AngularJS:
{% extends "base.html" %}
{% load static %}
{% block stylesheets %}
<link href="{% static 'css/xxg.css' %}" rel="stylesheet">
{% endblock %}
{% block mainbody %}
<br><br>
<div class="well">
<div class="well" ng-controller="LayerCtrl">
<table>
<tr>
<td>
<div class="input-group">
<span class="input-group-addon">jj</span>
<select class="form-control" name="jj">
{% for f in fab %}
<option value="{{f}}">{{f}}</option>
{% endfor %}
</select>
</div>
</td>
<td>
<div class="input-group">
{% for f in jj%}
{% if f == '1' %}
<span class="input-group-addon">yy</span>
<select class="form-control" ng-model="rr" ng-options="l.value as l.label for l in yyy"></select>
{% endif %}
{% if f == '8' %}
<span class="input-group-addon">tt</span>
<select class="form-control" ng-model="selected_technode" ng-options="l.value as l.label for l in rrr"></select>
{% endif %}
{% endfor %}
</div>
</td>
<td>
<div class="input-group">
<span class="input-group-addon">DD</span>
<!--<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">-->
{%verbatim%}
<select class="form-control" ng-model="selected_dd" ng-options="l as l for l in tt"></select>
{%endverbatim%}
</div>
</td>
</tr>
</table>
</div>
<div><h3>history:</h3></div>
<br/><br/>
<div ng-controller="AlertDemoCtrl">
<table class="table">
{% verbatim %}
<tr>
<td class="input-group" ng-repeat="(k,v) in alerts">
<span class="input-group-addon" ng-hide="v.hide">Check {{ k }}</span>
<span ng-hide="v.hide">
<input type="text" class="form-control" placeholder="Add gg here" ng-model="v.input">
<b>QQQ</b><input type="radio" name="{{ k }}" value="fc" ng-model="v.props">
<b>issue</b><input type="radio" name="{{ k }}" value="rr" ng-model="v.props">
<b>risk</b><input type="radio" name="{{ k }}" value="dr" ng-model="v.props">
<a type="reset" ng-click="reset()">
<span class="glyphicon glyphicon-repeat"></span>
</a>
<a href="" ng-click="remove(v)">
<span class="glyphicon glyphicon-trash"></span></a>
</span>
{% endverbatim %}
<tr>
<td>
<button type="button" class='btn btn-info' ng-click="addAlert()">
<span class="glyphicon glyphicon-plus"></span>
Add</button>
<button type="reset" ng-click="reset()" class="btn btn-danger">
<span class="glyphicon glyphicon-repeat"></span>
Reset All</button>
</td>
</tr>
</table>
</div>
<table class="table">
<!--IMPORT FILE-->
<tr>
<td>
<div style="position:relative;">
<a class='btn btn-primary' href='javascript:;' disabled>
</td>
</tr>
<!--ADD COMMENTS-->
<tr>
<td>
Add Comments*<div class="span5"><textarea name="bugnote_text" placeholder="Add comments here (max=600 characters)" rows="3" class="span10 ng-pristine
ng-valid ng-valid-maxlength" ng-maxlength="600"></textarea></div>
</td>
<td>
Add ftt*<input type="text" class="form-control" placeholder="Add ftthere">
</td>
</tr>
<form ng-submit="submit()" ng-controller="ExampleController">
<tr>
<td>
<button type="submit" id="submit" ngClick="Submit" class="btn btn-small btn-success"><span class="glyphicon glyphicon-pencil"></span> Submit</button>
<button class="btn btn-small btn-grey"><span class="glyphicon glyphicon-remove"></span> Cancel</button>
</td>
</tr>
</form>
</table>
</div>
{% endblock %}
{% block extrascript %}
{{ ngapp }}.controller("LayerCtrl", function ($scope, $http, $resource){
var layerresource_url = $resource("{% url 'api_list' 'v1' 'layer' %}");
console.log('initializing....')
$scope.$watch('yy', function () {
<!--alert($scope.yy);-->
$scope.update_layer();
});
$scope.update_layer = function(){;
console.log('Stage1: Initializing Primary Data... ');
layerresource_url.get({techtype__contains: $scope.selected, limit:1500},
function(data){
$scope.list = data['objects'][0]['layer'];
console.log($scope.layerlist);
},function(data, status){
console.log('Stage1: Internal error while loading initial data:'+status );
<!--alert('internal error');-->
}
);
};
});
{{ ngapp }}.controller("AlertDemoCtrl", function ($scope, $http, $resource){
$scope.alerts = [];
$scope.addAlert = function() {
$scope.alerts.push({msg: 'Another alert!', props : 0, input : ""});
};
$scope.closeAlert = function(index) {
$scope.alerts.splice(index, 1);
};
$scope.reset = function() {
angular.forEach($scope.alerts, function(v){
v.input = "";
v.props = 0;
});
};
$scope.remove = function(v){
v.hide = 1;
}
$scope.reset();
});
{% endblock %}
A: You can use AJAX if you don't want to use forms. In AngularJS, it would look like this. Note your controller should have the needed arguments:
$scope.addsomething = function() {
token = $window.localStorage.token;
//data to be submitted
$scope.data = {"name": $scope.name,"project": project_id,"some_url": someURL,"status": "1","type": 1};
$http.defaults.headers.common.Authorization = 'token '+$window.localStorage.token;
req = $http({
method: "POST",
url:"your_url/",
data:$scope.data,
headers: {
'Content-Type': 'application/json'
},
});
req.success(function(data,status) {
//do something on success
});
req.error(function(data, status, headers, config) {
//do something on error
});
}
On your backend you just have to point this URL to a view which will save it in the database. Hope this helps.
|
{
"redpajama_set_name": "RedPajamaStackExchange"
}
| 1,155
|
Diana Sidler named HoF inductee
Staff ReportBoone News-Republican
Boone's Diana Sidler was recently inducted into the Iowa State USBC Women's Bowling Association, Inc. Hall of Fame for her skill in the game of American Ten Pins and for her meritorious service.
Sidler was recommended by the Special Awards Committee of the Iowa State USBC WBA for induction to the Hall of Fame. The executive board of the ISUSBCWBA approved the recommendation.
Sidler was born into a bowling family. Her parents were owners of Bowl Mor Lanes in Boone. Sidler's dad, Vince, was inducted into the Iowa State Bowling Association's Hall of Fame in 2008. She embraced the sport of bowling joining her four brothers and sister working in her parent's center at the age of 12 continuing there until marrying and moving to Cedar Falls in 1984.
She bowled in her first Iowa Women's State Tournament in 1973 at the age of 14 as a substitute for her mother's team, where she placed 11th in Class E singles. She has competed in almost every state tournament since, only missing the 1984 tournament in Des Moines.
Sidler managed Valley Park Lanes in Cedar Falls for four years. She was a certified YABA Coach from 1991-2002 and President of the Cedar Falls YABA from 2000-2003.
She was certified as an Iowa High School Coach in 2000 until 2010, coaching the Cedar Falls High School bowling teams. In 2003, the Cedar Falls boy's team won the Boys State Federation Championship. Her girls' teams were conference champions in 2003, 2004 and 2008. She was a charter member of the Iowa High School Girls Athletic Union Advisory Committee from 2007-10. She was honored with the Mississippi Valley Coach of the Year in 2009.
She served her local bowlers in Waterloo and Cedar Falls as a director for 12 years, serving on all committees, helped host Iowa State tournaments, certified as a lane inspector in 1992 and was elected as a delegate to IWBA and WIBC conventions.
She was elected as an Iowa State USBC WBA director in 2012 serving on numerous committees. She is a USBC/WIBC permanent member and an IWBA/Iowa State USBC WBA member for over 40 years.
She was selected for induction into her local Hall of Fame in 2001.
At the local level, Sidler was a member of eight team championships, three doubles championships, took first place in the Waterloo Courier Team Tournament of Champions, second place in the Waterloo Match Games and had the highest series bowled in the 2004 Waterloo City Tournament.
In 1986, she was the high qualifier at the Iowa Open, finishing eighth.
She was a member of five Iowa State WBA Team Division 1 Championship titles with the Fran's Pro Shop team in 1994, 1996, 1997, 2001 and 2003.
She has averaged 190, or more, the past 13 seasons recording a high average of 206 in the 2006-07 bowling season. She averaged over 200 in 2000, 2001, 2005, 2006 and 2009.
She rolled a 300 game in 2006 as the lead-off game in a 760 series which included games of 236 and 244. She has one 298 game, a 290 and 19 games over 275 and 19 700 series and another 21 of 675-699.
|
{
"redpajama_set_name": "RedPajamaCommonCrawl"
}
| 7,443
|
{"url":"https:\/\/math.stackexchange.com\/questions\/4106575\/probability-that-we-guess-the-right-number-in-2-guesses\/4106598","text":"# Probability that we guess the right number in 2 guesses\n\nConsider a number drawn from $$U(1,100)$$. When we make an incorrect guess, we are told whether the target number is smaller or larger. So we employ a binary search approach, where the first guess is 50. If that is not the target, then that means our next guess is going to be 25 or 75.\n\nWhat is the probability that binary search ends in 2 guesses?\n\nAt first, I thought it was $$P(B|A)P(A)$$ where $$A$$ is the event that the first guess is wrong and $$B$$ is the event that the second guess is right. We know $$P(A) = 99\/100$$. When $$A$$ occurs, that means we would either search in the interval $$[1,49]$$ or $$[51, 100]$$, which has 49 and 50, elements, respectively. So I believe $$P(B | A) = 49\/100 * 1\/49 + 50\/100 * 1\/50 = 2\/100$$.\n\nSo $$P(B|A)P(A) = 99\/100 * 2\/100 = 0.198$$.\n\nThen I second guessed myself and started wondering why is it not $$2\/100$$? If it ends in 2 guesses, it means the target number is 25 or 75. Since the target number is uniformly chosen, the probability that it being 25 or 75 is $$2\/100=1\/50 = 0.2$$.\n\nBoth of these answers seem right to me, but 1 one of them must be wrong. Which one is wrong?\n\nThe correct answer is $$0.02$$, and your second approach is correct.\n\nHere is how you can make your first approach work: You should multiply 2\/99 (probability of ending at the second round given you did not end in the first round -- see below) by 99\/100 (probability of not ending in the first round) and you will get the same answer. $$P(B|A) = \\frac{49}{99} \\frac{1}{49} + \\frac{50}{99}\\frac{1}{50} = \\frac{2}{99}.$$\n\n\u2022 I just realized that as well, but I'm not super confident on this. Could you explain to me what the $49\/99$ and $50\/99$ probabilities are in words? I believe it is the probability that 50 is greater than the target number and 50 is less than the target number, respectively? \u2013\u00a024n8 Apr 18 at 4:26\n\u2022 49\/99 is the probability of the event that the unknown number is smaller than 50 given that it is not 50. That is why it is 49\/99. Similarly for 50\/99. \u2013\u00a0Ahmad Beirami Apr 18 at 4:29\n\u2022 That makes more sense than saying \"Probability that the unknown number is smaller than 50,\" because this would actually be $49\/100$ instead of $49\/99$. When we condition on 50 not being the correct number, we remove it from the sample space and reduce the 100 to 99. \u2013\u00a024n8 Apr 18 at 4:31\n\u2022 yes, that is correct. \u2013\u00a0Ahmad Beirami Apr 18 at 4:34\n\u2022 Why do you say the correct answer is $0.02\\;\\;viz \\; \\frac2{100}\\,$ when you have worked it out as $\\frac2{99}$ \u2013\u00a0true blue anil Apr 18 at 9:15\n\nThe second calculation is correct.\n\nThe mistake in the first calculation is that $$\\Pr(B|A)$$is not $$\\frac2{100}$$ but $$\\frac2{99}$$ Once we know that $$50$$ is not the number, only $$99$$ possibilities remain. If you want to do it by formula, $$\\Pr(B|A)=\\frac{\\Pr(B\\cap A)}{\\Pr(A)}=\\frac{\\Pr(B)}{\\Pr(A)}=\\frac{2\/100}{99\/100}=\\frac2{99}$$\n\n\u2022 How would you compute $P(B|A)$ without $P(B)$, since that's what we're ultimately trying to solve for? I was envisioning what Ahmad did in their answer. \u2013\u00a024n8 Apr 18 at 5:13\n\u2022 @anonuser01 I would compute $\\Pr(B)$ the way you did it in the second calculation. I would compute $\\Pr(B|A)$ by saying there are $2$ possibilities for $B$ out of $99$ equally like possibilities once we know that $A$ has occurred. I'm just showing that the formula holds. \u2013\u00a0saulspatz Apr 18 at 12:42\n\u2022 You can also generalize the second approach to 3,4,5, etc.. guesses right? Each time the number of possibilities would double. So for 3 guesses, the probability is 4\/100, for 4, it's 8\/100, for 5, it's 16\/100, for 6, it's 32\/100. But after 6 guesses, things work a little differently \u2013\u00a024n8 Apr 18 at 15:39\n\u2022 Actually after 6 guesses, it's simple because 7 is the maximum number of glasses for binary search here. So for 7 guesses, it's simply (100-1-2-4-8-16-32)\/100 = 37\/100 \u2013\u00a024n8 Apr 18 at 15:41\n\u2022 @anonuser01 The probability that it takes $7$ guesses is $\\frac{37}{100}$ because $1+2+4+\\cdots+32=63$ and $100-63=37$, and it never takes more than $7$ guesses. \u2013\u00a0saulspatz Apr 18 at 15:47\n\nThe probability that it ends in 1 guess is 1 in 100. For ending in 2 guesses, you must first miss the first then make the second.\n\nMissing the first is probability 99\/100. But now, your solution set is cut down to either 49 or 50 numbers (depending on whether you were above or below). If you are above, your probability of being correct is 1\/49. If you are below, it is 1\/50. We can average these two probabilities since they are equally likely.\n\nThe answer is approximately $$.0202$$.\n\n\u2022 It's only cut down to 49 numbers if 50 is larger than the target number. If 50 is less than the target number, then the solution could be in $\\{51, \\ldots, 100\\}$, which is 50 numbers. \u2013\u00a024n8 Apr 18 at 4:23\n\u2022 Ah good point. Let me make an edit. \u2013\u00a0roddur Apr 18 at 4:24\n\u2022 I don't think 2\/99 is right (as others are saying) though. There surely isn't 99 options left but rather 50 or 49. My intuition is that you average the probabilities of each. \u2013\u00a0roddur Apr 18 at 4:31\n\u2022 I initially thought this as well, but the \"average\" is a weighted average, and I think @Ahmad's solution for $P(B|A)$ shows what that weighted average should look like \u2013\u00a024n8 Apr 18 at 4:32","date":"2021-05-11 07:18:42","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 1, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 0, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 21, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.8330271244049072, \"perplexity\": 307.562666844543}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2021-21\/segments\/1620243991904.6\/warc\/CC-MAIN-20210511060441-20210511090441-00364.warc.gz\"}"}
| null | null |
package org.pentaho.di.plugins.database;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.Driver;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.sql.Statement;
import java.sql.Types;
/**
* DriverProxyInvocationChain is a temporary solution for interacting with Hive drivers. At the time this class was added,
* many methods from the JDBC API had not yet been implemented and would instead throw SQLExceptions. Also, some methods
* such as HiveDatabaseMetaData.getTables() did not return any values. For these reasons, a dynamic proxy chain was put in
* place, in order to intercept methods that would otherwise not function properly, and instead inject working and/or
* default functionality.
*
* The "chain" part of this class is a result of not having access to all the necessary objects at driver creation time.
* For this reason, we have to intercept methods that would return such objects, then create and return a proxy to those
* objects. There are a number of objects and methods to which this applies, so the result is a "chain" of getting
* access to objects via a proxy, then returning a proxy to those objects, which in turn may return proxied objects for its
* methods, and so on.
*
* The large amount of reflection used here is because not all Hadoop distributions support both Hive and Hive 2. Thus
* before proxying or anything, we need to make sure we have the classes we need at runtime.
*/
public class DriverProxyInvocationChain {
/** The initialized. */
protected static boolean initialized = false;
/**
* Gets the proxy.
*
* @param intf the intf
* @param obj the obj
* @return the proxy
*/
public static Driver getProxy(Class<? extends Driver> intf, final Driver obj) {
if(!initialized) {
init();
}
return (Driver) Proxy.newProxyInstance(obj.getClass().getClassLoader(),
new Class[] { intf }, new DriverInvocationHandler(obj));
}
/**
* Inits the.
*/
protected static void init() {
initialized = true;
}
/**
* DriverInvocationHandler is a proxy handler class for java.sql.Driver. However the code in this file is
* specifically for handling Hive JDBC calls, and therefore should not be used to proxy any other JDBC objects
* besides those provided by Hive.
*/
private static class DriverInvocationHandler implements InvocationHandler {
/** The driver. */
Driver driver;
/**
* Instantiates a new Driver proxy handler.
*
* @param obj the Driver to proxy
*/
public DriverInvocationHandler(Driver obj) {
driver = obj;
}
/**
* Intercepts methods called on the Driver to possibly perform alternate processing.
*
* @param proxy the proxy object
* @param method the method being invoked
* @param args the arguments to the method
* @return the object returned by whatever processing takes place
* @throws Throwable if an error occurs during processing
*/
@Override
public Object invoke(final Object proxy, Method method, Object[] args) throws Throwable {
try {
Object o = method.invoke(driver, args);
if(o instanceof Connection) {
// Intercept the Connection object so we can proxy that too
return (Connection)Proxy.newProxyInstance(o.getClass().getClassLoader(),
new Class[] { Connection.class }, new ConnectionInvocationHandler((Connection)o));
}
else {
return o;
}
}
catch(Throwable t) {
throw (t instanceof InvocationTargetException) ? t.getCause() : t;
}
}
}
/**
* ConnectionInvocationHandler is a proxy handler class for java.sql.Connection. However the code in this file is
* specifically for handling Hive JDBC calls, and therefore should not be used to proxy any other JDBC objects
* besides those provided by Hive.
*/
private static class ConnectionInvocationHandler implements InvocationHandler {
/** The "real" connection. */
Connection connection;
/**
* Instantiates a new connection invocation handler.
*
* @param obj the obj
*/
public ConnectionInvocationHandler(Connection obj) {
connection = obj;
}
/**
* Intercepts methods called on the Connection to possibly perform alternate processing.
*
* @param proxy the proxy
* @param method the method
* @param args the args
* @return the object
* @throws Throwable the throwable
*/
@Override
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
Object o = null;
try {
o = method.invoke(connection, args);
}
catch(Throwable t) {
if(t instanceof InvocationTargetException) {
Throwable cause = t.getCause();
if(cause instanceof SQLException) {
if(cause.getMessage().equals("Method not supported")) {
String methodName = method.getName();
if("createStatement".equals(methodName)) {
o = createStatement(connection,args);
}
else if("setReadOnly".equals(methodName)) {
o = (Void)null;
}
else {
throw cause;
}
}
else throw cause;
}
else {
throw cause;
}
}
else {
throw t;
}
}
if(o instanceof DatabaseMetaData) {
DatabaseMetaData dbmd = (DatabaseMetaData)o;
// Intercept the DatabaseMetaData object so we can proxy that too
return (DatabaseMetaData)Proxy.newProxyInstance(dbmd.getClass().getClassLoader(),
new Class[] { DatabaseMetaData.class }, new DatabaseMetaDataInvocationHandler(dbmd));
}
else if(o instanceof PreparedStatement) {
PreparedStatement st = (PreparedStatement)o;
// Intercept the Statement object so we can proxy that too
return (PreparedStatement)Proxy.newProxyInstance(st.getClass().getClassLoader(),
new Class[] { PreparedStatement.class }, new CaptureResultSetInvocationHandler<PreparedStatement>(st));
}
else if(o instanceof Statement) {
Statement st = (Statement)o;
// Intercept the Statement object so we can proxy that too
return (Statement)Proxy.newProxyInstance(st.getClass().getClassLoader(),
new Class[] { Statement.class }, new CaptureResultSetInvocationHandler<Statement>(st));
}
else {
return o;
}
}
/**
* Creates a statement for the given Connection with the specified arguments
*
* @param c the connection object
* @param args the arguments
* @return the statement
* @throws SQLException the sQL exception
* @see java.sql.Connection#createStatement(int, int)
*/
public Statement createStatement(Connection c, Object[] args) throws SQLException {
if (c.isClosed()) {
throw new SQLException("Can't create Statement, connection is closed ");
}
/* Ignore these for now -- this proxy stuff should go away anyway when the fixes are made to Apache Hive
int resultSetType = (Integer)args[0];
int resultSetConcurrency = (Integer)args[1];
if(resultSetType != ResultSet.TYPE_FORWARD_ONLY) {
throw new SQLException(
"Invalid parameter to createStatement() only TYPE_FORWARD_ONLY is supported ("+resultSetType+"!="+ResultSet.TYPE_FORWARD_ONLY+")");
}
if(resultSetConcurrency != ResultSet.CONCUR_READ_ONLY) {
throw new SQLException(
"Invalid parameter to createStatement() only CONCUR_READ_ONLY is supported");
}*/
return c.createStatement();
}
}
/**
* DatabaseMetaDataInvocationHandler is a proxy handler class for java.sql.DatabaseMetaData. However the code in this file is
* specifically for handling Hive JDBC calls, and therefore should not be used to proxy any other JDBC objects
* besides those provided by Hive.
*/
private static class DatabaseMetaDataInvocationHandler implements InvocationHandler {
/** The "real" database metadata object. */
DatabaseMetaData t;
/**
* Instantiates a new database meta data invocation handler.
*
* @param t the database metadata object to proxy
*/
public DatabaseMetaDataInvocationHandler(DatabaseMetaData t) {
this.t = t;
}
/**
* Intercepts methods called on the DatabaseMetaData object to possibly perform alternate processing.
*
* @param proxy the proxy
* @param method the method
* @param args the args
* @return the object
* @throws Throwable the throwable
*/
@Override
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
try {
// Need to intercept getIdentifierQuoteString() before trying the driver version, as our "fixed"
// drivers return a single quote when it should be empty.
/*String methodName = method.getName();
if("getIdentifierQuoteString".equals(methodName)) {
return getIdentifierQuoteString();
}*/
// try to invoke the method as-is
Object o = method.invoke(t, args);
if(o instanceof ResultSet) {
ResultSet r = (ResultSet)o;
return (ResultSet)Proxy.newProxyInstance(r.getClass().getClassLoader(),
new Class[] { ResultSet.class }, new ResultSetInvocationHandler(r));
}
else {
return o;
}
}
catch(Throwable t) {
if(t instanceof InvocationTargetException) {
Throwable cause = t.getCause();
throw cause;
}
else {
throw t;
}
}
}
/**
* Returns the identifier quote string. This is HiveQL specific
*
* @return String the quote string for identifiers in HiveQL
* @throws SQLException if any SQL error occurs
*/
public String getIdentifierQuoteString() throws SQLException {
return "";
}
/**
* Gets the tables for the specified database.
*
* @param originalObject the original object
* @param dbMetadataClass the db metadata class
* @param statementClass the statement class
* @param clientClass the client class
* @param catalog the catalog
* @param schemaPattern the schema pattern
* @param tableNamePattern the table name pattern
* @param types the types
* @return the tables
* @throws Exception the exception
*/
public ResultSet getTables(Object originalObject, Class<? extends DatabaseMetaData> dbMetadataClass,
Class<? extends Statement> statementClass, Class<?> clientClass,
String catalog, String schemaPattern,
String tableNamePattern, String[] types) throws Exception {
boolean tables = false;
if(types == null) {
tables = true;
}
else {
for(String type : types) {
if("TABLE".equals(type)) tables = true;
}
}
// If we're looking for tables, execute "show tables" query instead
if(tables) {
Method getClient = dbMetadataClass.getDeclaredMethod("getClient");
Constructor<? extends Statement> statementCtor = (Constructor<? extends Statement>) statementClass.getDeclaredConstructor(clientClass);
Statement showTables = statementCtor.newInstance(clientClass.cast(getClient.invoke(originalObject)));
showTables.executeQuery("show tables");
ResultSet rs = showTables.getResultSet();
return rs;
}
else {
Method getTables = dbMetadataClass.getDeclaredMethod("getTables");
ResultSet rs = (ResultSet)getTables.invoke(originalObject, catalog, schemaPattern, tableNamePattern, types);
return rs;
}
}
}
/**
* CaptureResultSetInvocationHandler is a generic proxy handler class for any java.sql.* class that has methods
* to return ResultSet objects. However the code in this file is specifically for handling Hive JDBC calls, and
* therefore should not be used to proxy any other JDBC objects besides those provided by Hive.
*
* @param <T> the generic type of object whose methods return ResultSet objects
*/
private static class CaptureResultSetInvocationHandler<T> implements InvocationHandler {
/** The object whose methods return ResultSet objects. */
T t;
/**
* Instantiates a new capture result set invocation handler.
*
* @param t the t
*/
public CaptureResultSetInvocationHandler(T t) {
this.t = t;
}
/**
* Intercepts methods called on the object to possibly perform alternate processing.
*
* @param proxy the proxy
* @param method the method
* @param args the args
* @return the object
* @throws Throwable the throwable
*/
@Override
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
// try to invoke the method as-is
try {
// Intercept PreparedStatement.getMetaData() to see if it throws an exception
if("getMetaData".equals(method.getName()) && (args == null || args.length==0)) {
return getProxiedObject(getMetaData());
}
Object po = getProxiedObject(method.invoke(t, args));
return po;
}
catch(InvocationTargetException ite) {
Throwable cause = ite.getCause();
if(cause instanceof SQLException) {
if(cause.getMessage().equals("Method not supported")) {
String methodName = method.getName();
// Intercept PreparedStatement.getMetaData() to see if it throws an exception
if("getMetaData".equals(method.getName()) && (args == null || args.length==0)) {
return getProxiedObject(getMetaData());
}
else {
throw cause;
}
}
else throw cause;
}
else {
throw cause;
}
}
}
/**
* Returns the result set meta data. If a result set was not created by running an execute or executeQuery then a null is returned.
*
* @return null is returned if the result set is null
* @throws SQLException if an error occurs while getting metadata
* @see java.sql.PreparedStatement#getMetaData()
*/
public ResultSetMetaData getMetaData() {
ResultSetMetaData rsmd = null;
if(t instanceof Statement) {
try {
ResultSet resultSet = ((Statement)t).getResultSet();
rsmd = (resultSet == null ? null : resultSet.getMetaData());
}
catch(SQLException se) {
rsmd = null;
}
}
return rsmd;
}
private Object getProxiedObject(Object o) {
if(o instanceof ResultSet) {
ResultSet r = (ResultSet)o;
return (ResultSet)Proxy.newProxyInstance(r.getClass().getClassLoader(),
new Class[] { ResultSet.class }, new ResultSetInvocationHandler(r));
}
else if(o instanceof ResultSetMetaData) {
ResultSetMetaData r = (ResultSetMetaData)o;
return (ResultSetMetaData)Proxy.newProxyInstance(r.getClass().getClassLoader(),
new Class[] { ResultSetMetaData.class }, new ResultSetMetaDataInvocationHandler(r));
}
else {
return o;
}
}
}
/**
* ResultSetInvocationHandler is a proxy handler class for java.sql.ResultSet. However the code in this file is
* specifically for handling Hive JDBC calls, and therefore should not be used to proxy any other JDBC objects
* besides those provided by Hive.
*/
private static class ResultSetInvocationHandler implements InvocationHandler {
/** The "real" ResultSet object . */
ResultSet rs;
/**
* Instantiates a new result set invocation handler.
*
* @param r the r
*/
public ResultSetInvocationHandler(ResultSet r) {
rs = r;
}
/**
* Intercepts methods called on the ResultSet to possibly perform alternate processing.
*
* @param proxy the proxy
* @param method the method
* @param args the args
* @return the object
* @throws Throwable the throwable
*/
@Override
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
try {
// Intercept the getString(String) method to implement the hack for "show tables" vs. getTables()
if("getString".equals(method.getName()) && args != null && args.length==1 && args[0] instanceof String) {
return getString((String)args[0]);
}
else {
Object o = method.invoke(rs,args);
if(o instanceof ResultSetMetaData ) {
// Intercept the ResultSetMetaData object so we can proxy that too
return (ResultSetMetaData)Proxy.newProxyInstance(o.getClass().getClassLoader(),
new Class[] { ResultSetMetaData.class }, new ResultSetMetaDataInvocationHandler((ResultSetMetaData)o));
}
else {
return o;
}
}
}
catch(Throwable t) {
throw (t instanceof InvocationTargetException) ? t.getCause() : t;
}
}
/**
* Gets the string value from the current row at the column with the specified name.
*
* @param columnName the column name
* @return the string value of the row at the column with the specified name
* @throws SQLException if the column name cannot be found
*/
public String getString(String columnName) throws SQLException {
String columnVal = null;
SQLException exception = null;
try {
columnVal = rs.getString(columnName);
}
catch(SQLException se) {
// Save for returning later
exception = se;
}
if(columnVal != null) return columnVal;
if(columnName != null && "TABLE_NAME".equals(columnName)) {
if(columnName != null && "TABLE_NAME".equals(columnName)) {
try {
// If we're using the "show tables" hack in getTables(), return the first column
columnVal = rs.getString(1);
}
catch(SQLException se) {
throw (exception == null) ? se : exception;
}
}
}
return columnVal;
}
}
/**
* ResultSetMetaDataInvocationHandler is a proxy handler class for java.sql.ResultSetMetaData. However the code in
* this file is specifically for handling Hive JDBC calls, and therefore should not be used to proxy any other
* JDBC objects besides those provided by Hive.
*/
private static class ResultSetMetaDataInvocationHandler implements InvocationHandler {
/** The "real" ResultSetMetaData object. */
ResultSetMetaData rsmd;
/**
* Instantiates a new result set meta data invocation handler.
*
* @param r the r
*/
public ResultSetMetaDataInvocationHandler(ResultSetMetaData r) {
rsmd = r;
}
/**
* Intercepts methods called on the ResultSetMetaData object to possibly perform alternate processing.
*
* @param proxy the proxy
* @param method the method
* @param args the args
* @return the object
* @throws Throwable the throwable
*/
@Override
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
try {
return method.invoke(rsmd, args);
}
catch(Throwable t) {
if(t instanceof InvocationTargetException) {
Throwable cause = t.getCause();
if(cause instanceof SQLException) {
if(cause.getMessage().equals("Method not supported")) {
String methodName = method.getName();
if("isSigned".equals(methodName)) {
return isSigned((Integer)args[0]);
}
else {
throw cause;
}
}
else throw cause;
}
else {
throw cause;
}
}
else {
throw t;
}
}
}
/**
* Returns a true if values in the column are signed, false if not.
*
* This method checks the type of the passed column. If that
* type is not numerical, then the result is false.
* If the type is a numeric then a true is returned.
*
* @param column the index of the column to test
* @return boolean
* @throws SQLException the sQL exception
*/
public boolean isSigned(int column) throws SQLException {
int numCols = rsmd.getColumnCount();
if (column < 1 || column > numCols) {
throw new SQLException("Invalid column value: " + column);
}
// we need to convert the thrift type to the SQL type
int type = rsmd.getColumnType(column);
switch(type){
case Types.DOUBLE: case Types.DECIMAL: case Types.FLOAT:
case Types.INTEGER: case Types.REAL: case Types.SMALLINT: case Types.TINYINT:
case Types.BIGINT:
return true;
}
return false;
}
}
}
|
{
"redpajama_set_name": "RedPajamaGithub"
}
| 2,664
|
\section{Introduction}
\noindent
Can we characterize the phenotypical distribution of a population which is subject to the Darwinian evolution? The mathematical modeling of the phenotypically structured populations, under the effects of mutations and selection leads to parabolic and elliptic integro-differential equations. The solutions of such equations, as the mutation term vanishes, converge to a sum of Dirac masses, corresponding to the dominant traits. During the last decade, an approach based on Hamilton-Jacobi equations with constraint has been developed which allows to describe such asymptotic solutions. There is a large literature on this method. We refer to \cite{OD.PJ.SM.BP:05,GB.BP:08,SM:11} for the establishment of the basis of this approach for problems from evolutionary biology. Note that related tools were already used in the case of local equations (for instance KPP type equations) to describe the propagation phenomena (see for instance \cite{MF:86,LE.PS:89}).
\noindent
Such results, which are based on a logarithmic transformation (the so-called Hopf-Cole transformation) of the population's density, provide mainly the convergence along subsequences of the logarithmic transform to a viscosity solution of a Hamilton-Jacobi equation with constraint, as the effects of the mutations vanish. This allows to obtain a qualitative description of the population's phenotypical distribution for vanishing mutations' steps. To be able to characterize the population's distribution for non-vanishing effects of mutations, one should prove a uniqueness property for the viscosity solution of the Hamilton-Jacobi equation with constraint and compute the next order terms. Such properties are usually not studied due to technical difficulties. However, from the biological point of view it is usually more relevant to consider non-vanishing mutations' steps.
\noindent
In this work, as announced in \cite{SG.SM:16}, we provide such analysis, including a uniqueness result and the computation of the correctors, in the case of a selection, mutation and migration model. Note that a recent work \cite{SM.JR:15-1,SM.JR:16} has also provided similar results in the case of homogeneous environments. We believe indeed that going further in the Hamilton-Jacobi approach for different problems from evolutionary biology, by providing higher order approximations, can make this approach more useful for the evolutionary biologists.
\noindent
The purpose of this article is to provide the mathematical details and proofs which are necessary for our biological results \cite{SG.SM:17}.
As explained in \cite{SG.SM:17}, our method allows to provide more quantitative results and correct the previous approximations obtained by biologists.
\\
\noindent
Our objective is to characterize the solutions to the following system, for $z\in \mathbb{R}$,
\begin{equation}
\label{main}
\begin{cases}
-\e^2 n_{\e,1}''(z)=n_{\e,1}(z) R_1(z,N_{\e,1})+m_2n_{\e,2}(z)-m_1n_{\e,1}(z),\\
-\e^2 n_{\e,2}''(z)=n_{\e,2}(z) R_2(z,N_{\e,2})+m_1n_{\e,1}(z)-m_2n_{\e,2}(z),\\
N_{\e,i}=\int_\mathbb{R} n_{\e,i}(z)dz, \qquad \text{for $i=1,2$},
\end{cases}
\end{equation}
with
\begin{equation}
\label{Ri}
R_i(z,N_i)= r_i- g_i(z-\theta_i)^2-\kappa_i N_i,\qquad \text{with $\theta_1=-\theta$ and $\theta_2=\theta$}.
\end{equation}
This system represents the equilibrium of a population that is structured by a phenotypical trait $z$, and which is subject to selection, mutation and migration between two habitats. We denote by $n_i(z)$ the density of the phenotypical distribution in habitat $i$, and by $N_i$ the total population size in habitat $i$. The growth rate $R_i(z,N_i)$ is given by \eqref{Ri}, where $r_i$ represents the maximum intrinsic growth rate, the positive constant $g_i$ is the strength of the selection, $\theta_i$ is the optimal trait in habitat $i$ and the positive constant $\kappa_i$ represents the intensity of the competition. The nonnegative constants $m_i$ are the migration rates between the habitats.
\noindent
Such phenomena have already been studied using several approaches by the theoretical evolutionary biologists. A first class of results are based on the adaptive dynamics approach, where one considers that the mutations are very rare such that the population has time to attain its equilibrium between two mutations and hence the population's distribution has discrete support (one or two points in a two habitats model) \cite{GM.IC.SG:97,TD:00,CF.SM.EM:12}. A second class of results are based on an approach known as 'quantitative genetics', which allows more frequent mutations and does not separate the evolutionary and the ecological time scales so that the population's distribution is continuous (see \cite{Rice-book}--chapter $7$). A main assumption in this class of works is that one considers that the population's distribution is a gaussian \cite{AH.TD.ET:01,OR.MK:01} or, to take into account the possibility of dimorphic populations, a sum of one or two gaussian distributions \cite{SY.FG:09,FD.OR.SG:13}.
\noindent
In our work, as in the quantitative genetics framework, we also consider continuous phenotypical distributions. However, we don't assume any a priori gaussian assumption. We compute directly the population's distribution and in this way we correct the previous approximations. To this end, we also provide some results in the framework of adaptive dynamics and in particular, we generalize previous results on the identification of the evolutionary stable strategy (ESS) (see Section \ref{sec:ad} for the definition) to the case of nonsymetric habitats. Furthermore, our work makes a connection between the two approaches of adaptive dynamics and quantitative genetics.
\\
\noindent
{\bf Assumptions:}\\
To guarantee that the population does not get extinct, we assume that
\begin{equation}
\label{as:r-m}
\max( r_1-m_1,r_2-m_2) > 0.
\end{equation}
Moreover, in the first part of this article, we assume that there is positive migration rate in both directions, i.e.
\begin{equation}
\label{as:m}
m_i>0, \qquad \text{i=1,2}.
\end{equation}
The source and sink case, where for instance $m_2=0$, will be analyzed in the last section. \\
\noindent
Note that in \cite{SM:12} the limit, as $\e\to 0$ and along subsequences, of the solutions to such system, under assumption \eqref{as:m}, and in a bounded domain, was studied. In the present work, we go further than the asymptotic limit along subsequences and we obtain uniqueness of the limit and identify the dominant terms of the solution when $\e$ is small but nonzero. In this way, we are able to characterize the solution when the mutation's steps are not negligible.
\\
\noindent
{\bf The main elements of the method:}\\
To describe the solutions $n_{\e,i}(z)$ we use a WKB ansatz
\begin{equation}
\label{WKB}
n_{\e,i}(z)=\frac{1}{\sqrt{2\pi \e}} \exp \left(\frac{u_{\e,i}(z)}{\e} \right).
\end{equation}
Note that a first approximation that is commonly used in the theory of 'quantitative genetics', is a gaussian distribution of the following form
$$
n_{\e,i}(z)=\frac{N_i}{\sqrt{2\pi\e}\sigma}\exp \left(\frac{-(z-z^*)^2}{\e\sigma^2} \right)
=\frac{1}{\sqrt{2\pi\e}} \exp \left(\frac{-\frac{1}{2\sigma^2}(z-z^*)^2+\e\log \frac{N_i}{\sigma}}{\e} \right).
$$
Here, we try to go further than this a priori gaussian assumption and to approximate directly $u_{\e,i}$. To this end, we write an expansion for
$u_{\e,i}$ in terms of $\e$:
\begin{equation}
\label{ap-ue}
u_{\e,i}= u_i+\e v_i+\e^2 w_i+O(\e^3).
\end{equation}
We first prove that $u_1=u_2=u$ is the unique viscosity solution to a Hamilton-Jacobi equation with constraint which can be computed explicitly. The uniqueness of solution of such Hamilton-Jacobi equation with constraint is related to the uniqueness of the ESS and to the weak KAM theory \cite{AF:16}.
Such function $u$ indeed satisfies
$$
\max_\mathbb{R} \; u(z)= 0,
$$
with the maximum points attained at one or two points corresponding to the ESS points of the problem.
We then notice that, while $u(z)<0$, $n_{\e,i}(z)$ is exponentially small. Therefore, only the values of $v_i$ and $w_i$ at the points which are close to the zero level set of $u$ matter, i.e. the ESS points. We next show how to compute formally $v_i$ and hence its second order Taylor expansion around the ESS points, and the value of $w_i$ at those points. These approximations together with a fourth order Taylor expansion of $u_i$ around the ESS points are indeed enough to approximate the moments of the population's distribution with an error of order $\e^2$.
\\
\noindent
The paper is organized as follows. In Section \ref{sec:ad} we introduce some notions from the theory of adaptive dynamics that will be used in the following sections. In Section \ref{sec:results} we state our main results (theorems \ref{th:ESS} and \ref{thm:main}) and discuss their consequences. In this section, we also provide the method to compute the correctors and approximate the moments of the population's distribution. In Section \ref{sec:pr-ESS} we provide the proofs of the results in the adaptive dynamics framework and in particular we prove Theorem \ref{th:ESS}. In Section \ref{sec:pr-HJ} we prove Theorem \ref{thm:main}. Finally, in Section \ref{sec:sink} we generalize our results to the sink and source case where the migration is only in one direction ($m_2=0$).
\section{Some notions from the theory of adaptive dynamics }
\label{sec:ad}
In this section, we introduce some notions from the theory of adaptive dynamics that we will be using in the next sections \cite{GM.IC.SG:97}. Note that our objective is not to study the framework of adaptive dynamics where the mutations are assumed to be very rare. However, these notions appear naturally from our asymptotic computations.\\
\noindent
{\bf Effective fitness:}
The effective fitness $W(z;N_1,N_2)$ is the largest eigenvalue of the following matrix:
\begin{equation}
\label{efitness}
\mathcal A (z;N_1,N_2)= \left(
\begin{array}{cc}
R_1(z ; N_1) -m_1 & m_2\\
m_1 & R_2(z ; N_2) -m_2
\end{array}
\right),
\end{equation}
that is
\begin{equation}
\label{W}
\begin{array}{rl}
W(z;N_1,N_2) &= \f 1 2 \Big[ \left( R_1(z ; N_1)+R_2(z ; N_2)-m_1 - m_2 \right) \\
&+\sqrt{ \left( R_1(z ; N_1)-R_2(z ; N_2)-m_1 + m_2 \right)^2
+4m_1m_2 ) } \, \Big].
\end{array}
\end{equation}
This indeed corresponds to the \emph{effective} growth rate associated with trait $z$ in the whole metapopulation when the total population sizes are given by $(N_1,N_2)$.
\\
\noindent
{\bf Demographic equilibrium:}
Consider a set of points $\Omega=\{z_1,\cdots z_m\}$. The demographic equilibrium corresponding to this set is given by $(n_1(z),n_2(z))$, with the total population sizes $(N_1,N_2)$, such that
$$
n_i(z)=\sum_{j=1}^m \alpha_{i,j}\delta(z-z_j),\quad N_i = \sum_{j=1}^m \alpha_{i,j},\quad W(z_j,N_1,N_2)=0,\quad i=1,2,\; j=1,\cdots, m,
$$
and such that $(\alpha_{1,j},\alpha_{2,j})^{T}$ is the right eigenvector associated with the largest eigenvalue $W(z_j,N_1,N_2)=0$ of $\mathcal A(z_j;N_1,N_2)$.
\\
\noindent
{\bf Invasibility:} We say that a mutant trait $z_m$ can invade a resident strategy $\{ z^M \}$ at its demographic equilibrium $( N_1^M, N_2^M)$ if $W(z_m, N_1^M,N_2^M)>0$.
\\
\noindent
{\bf Evolutionary stable strategy:}
A set of points $\Omega^*=\{z_1^*,\cdots, z_m^*\}$ is called an evolutionary stable strategy (ESS) if
$$
W(z,N^*_1,N_2^*)=0,\quad \text{for $z\in \mathcal A$ and} ,\quad W(z,N_1^*,N_2^*)\leq 0, \quad \text{for $z\not\in \mathcal A$,}
$$
where $N_1^*$ and $N_2^*$ are the total population sizes corresponding to the demographic equilibrium associated with the set $\Omega^*$.
\\
\noindent
{\bf Notation}: We will use the star sign $^*$ whenever we talk about an evolutionary stable strategy $\Omega^*$ (and similarly for the corresponding demographic equilibrium $(n_1^*,n_2^*)$ and the total population sizes $(N_1^*,N_2^*)$). We add an index $M$ when the strategy is monomorphic (a set of a single trait $\{z^{M*}\}$ with the corresponding demographic equilibrium $(n_1^{M*},n_2^{M*})$, and the total population sizes $(N_1^{M*}, N_2^{M*})$) and an index $D$ when the strategy is dimorphic (a set of two traits $\{z_{\mathrm{I}}^{D*},z_{\mathrm{II}}^{D*}\}$ with the corresponding demographic equilibrium $(n_1^{D*}, n_2^{D*})$, and the total population sizes $(N_1^{D*},N_2^{D*})$).
\section{The main results and the details of the method}
\label{sec:results}
In this section, we state our main results and provide the details of our method for the approximation of the equilibrium distribution $n_{\e,i}(z)$. In Subsection \ref{sec:ad-results} we provide the results in the framework of adaptive dynamics. In Subsection \ref{sec:u} we state our main result on the convergence to the zero order term $u_i$ and its explicit computation. In Subsection \ref{sec:vw} we show how to compute the next order terms. Finally, in Subsection \ref{sec:mom} we provide the approximation of the moments of the population's distribution.
\subsection{The adaptive dynamics framework}
\label{sec:ad-results}
Our main result in the adaptive dynamics framework is that there exists a unique ESS which is whether monomorphic (a single Dirac mass) or dimorphic (a sum of two Dirac masses).
We determine indeed under which conditions the ESS is monomorphic or dimorphic. To state our result, we first define
\begin{equation}
\label{dim-eq}
z^{D*}=\sqrt{\theta^2-\f{m_1m_2}{4\theta^2g_1g_2}},\qquad
N_1^{D*}=\f{ \f{m_1m_2}{4\theta^2g_2}+r_{2}-m_1}{\kappa_1},\qquad N_2^{D*}=\f{ \f{m_1m_2}{4\theta^2g_1}+r_{2}-m_2}{\kappa_2}.
\end{equation}
\begin{theorem}
\label{th:ESS}
Assume \eqref{as:r-m}--\eqref{as:m}. Then, there exists a unique set of points $\Omega^*$ which is an ESS. \\
(i) The ESS is dimorphic if and only if
\begin{equation}
\label{as1:dim}
\f{m_1m_2}{4g_1g_2 \theta^4}< 1,
\end{equation}
\begin{equation}
\label{as2:dim}
0<m_2 N_2^{D*} +(R_1(- z^{D*}; N_1^{D*})- m_1) N_1^{D*},
\end{equation}
and
\begin{equation}
\label{as3:dim}
0<m_1 N_1^{D*} +(R_2( z^{D*};N_2^{D*})- m_2) N_2^{D*}.
\end{equation}
Then the dimorphic equilibrium is given by
\begin{equation}
\label{dim-ESS}
n_i^{D*}=\nu_{\mathrm{I},i} \da(z+ z^{D*})+ \nu_{\mathrm{II},i} \da(z- z^{D*}),\quad \nu_{\mathrm{I},i}+\nu_{\mathrm{II},i}= N_i^{D*},\quad i=1,2.
\end{equation}
(ii) If the above conditions are not satisfied then the ESS is monomorphic. In the case where condition \eqref{as1:dim} is verified but the r.h.s. of \eqref{as2:dim} (respectively \eqref{as3:dim}) is negative, the fittest trait belongs to the interval $(- \theta, - z^{D*})$ (respectively $( z^{D*}, \theta)$). If \eqref{as1:dim} is satisfied but \eqref{as2:dim} (respectively \eqref{as3:dim}) is an equality then the monomorphic ESS is given by $\{-z^{D*}\}$ (respectively $\{z^{D*}\}$).
\end{theorem}
\medskip
\noindent
Note that one can compute the weights $\nu_{k,i}$, for $k=\mathrm{I},\mathrm{II}$ and $i=1,2$:
\begin{equation}
\label{nuij}
\begin{array}{c}
\left(
\begin{array}{c}
\nu_{\mathrm{I},1}\\
\nu_{\mathrm{I},2}
\end{array}
\right)
= \f{ m_1 N_1^{D*} +(R_2( z^{D*};N_2^{D*})- m_2) N_2^{D*}}{ m_1m_2 - \big(R_1(- z^{D*}; N_1^{D*})-m_1 \big) \big(R_2( z^{D*}; N_2^{D*})-m_2 \big) }\left(
\begin{array}{c}
m_2\\
-R_1(- z^{D*} ; N_1^{D*})+m_1
\end{array}
\right),
\\
\left(
\begin{array}{c}
\nu_{\mathrm{II},1} \\
\nu_{\mathrm{II},2}
\end{array}
\right)
=\f{m_2 N_2^{D*} +(R_1(- z^{D*}; N_1^{D*})- m_1) N_1^{D*}}{ m_1m_2 - \big(R_1(- z^{D*}; N_1^{D*})-m_1 \big) \big(R_2( z^{D*}; N_2^{D*})-m_2 \big) }
\left(
\begin{array}{c}
-R_2( z^{D*} ; N_2^{D*})+m_2\\
m_1
\end{array}
\right).
\end{array}
\end{equation}
\noindent
Moreover, since $W(- z^{D*}; N_1^{D*},N_2^{D*} )=0$, one can easily verify that
condition \eqref{as2:dim} is equivalent with
\begin{equation}
\label{as:eq7}
m_1 N_1^{D*} + (R_2(- z^{D*};N_2^{D*})- m_2) N_2^{D*}<0.
\end{equation}
Similarly, since $W( z^{D*}; N_1^{D*},N_2^{D*} )=0$, one can easily verify that
condition \eqref{as3:dim} is equivalent with
\begin{equation}
\label{as:eq8}
m_2 N_2^{D*} + (R_1( z^{D*}; N_1^{D*})- m_1) N_1^{D*}<0.
\end{equation}
\noindent
To prove Theorem \ref{thm:main}--(iii) we will use the following result which is a corollary of Theorem \ref{th:ESS}.
\begin{corollary}
\label{cor:deg}
Assume that
\begin{equation}
\label{non-deg}
m_2 N_2^{D*} +(R_1(- z^{D*}; N_1^{D*})- m_1) N_1^{D*}\neq 0,
\qquad
m_1 N_1^{D*} +(R_2( z^{D*};N_2^{D*})- m_2) N_2^{D*}\neq 0,
\end{equation}
and let the set $\Omega^*$ be the unique ESS of the model and $(N_1^*,N_2^*)$ be the total population sizes at the demographic equilibrium of this ESS. Then,
\begin{equation}
\label{Wneg}
W(z,N_1^*,N_2^*)<0,\qquad \text{for all z $\in \mathbb{R} \setminus \Omega^*$}.
\end{equation}
\end{corollary}
\noindent
Note also that when the habitats are symmetric, then conditions \eqref{as2:dim} and \eqref{as3:dim} always hold under condition \eqref{as1:dim}, and hence
\begin{corollary} \label{cor-sym}
Assume that the habitats are symmetric:
\begin{equation}
\label{par-sym}
r=r_{1}=r_{2},\quad g=g_1=g_2, \quad \kappa=\kappa_1=\kappa_2,\quad m=m_1=m_2.
\end{equation}
(i) Then the unique ESS is dimorphic if and only if
\begin{equation}
\label{dim-sym}
\f{m }{2g}< \theta^2.
\end{equation}
The dimorphic ESS is determined by \eqref{dim-ESS}.\\
(ii) When condition \eqref{dim-sym} is not satisfied, then the ESS is monomorphic and the corresponding monomorphic equilibrium is given by
\begin{equation}
\label{ESS-sym-mono}
n_1^{M*}(z)= n_2^{M*}(z)= N^{M*} \, \da(z), \quad \text{with } N^{M*}=\f{1}{\kappa} \left( r -g \theta^2\right).
\end{equation}
\end{corollary}
\noindent
The next proposition gives an interpretation of conditions \eqref{as2:dim} and \eqref{as3:dim}.
\begin{prop}
\label{prop:invade}
Assume that condition \eqref{as1:dim} is satisfied and that $r_i-m_i>0$, for $i=1,2$. Then,
\\
(i) condition \eqref{as2:dim} holds if and only if a mutant trait of type $ z^{D*}$ can invade a monomorphic resident population of type $- z^{D*}$ which is at it's demographic equilibrium.\\
(ii) condition \eqref{as3:dim} holds if and only if a mutant trait of type $- z^{D*}$ can invade a monomorphic resident population of type $ z^{D*}$ which is at it's demographic equilibrium.
\end{prop}
\noindent
One can indeed rewrite conditions \eqref{as2:dim} and \eqref{as3:dim} respectively as below
$$
{C_1\, < \, \alpha_2 r_2 - \alpha_1 r_1}
, \qquad
{C_2\, < \, \beta_1 r_1 -\beta_2 r_2},
$$
with $C_i$, $\alpha_i$ and $\beta_i$ constants depending on $m_1$, $m_2$, $g_1$, $g_2$, $\kappa_1$, $\kappa_2$ and $\theta$. These conditions are indeed a measure of asymmetry between the habitats. They appear from the fact that even if condition \eqref{as1:dim}, which is the only condition for dimorphism in symmetric habitats, is satisfied, while the quality of the habitats are very different, the ESS cannot be dimorphic. In this case, the population will be able to adapt only to one of the habitats and it will be maladapted to the other one.
\subsection{The computation of the zero order terms $u_i$}
\label{sec:u}
The identification of the zero order terms $u_i$ is based on the following result.
\begin{theorem}\label{thm:main}
Assume \eqref{as:r-m}--\eqref{as:m}. \\
(i) As $\e \to 0$, $(n_{\e,1}, n_{\e,2})$ converges to $(n_1^*,n_2^*)$, the demographic equilibrium of the unique ESS of the model. Moreover, as $\e \to 0$, $N_{\e,i}$ converges to $N_i^*$, the total population size in patch $i$ corresponding to this demographic equilibrium.
\\
(ii) As $\e\to 0$, both sequences $(u_{\e,i})_\e$, for $i=1,2$, converge along subsequences and locally uniformly in $\mathbb{R}$ to a continuous function $u\in \mathrm{C}(\mathbb{R})$, such that $u$ is a viscosity solution to the following equation
\begin{equation}
\label{HJ}
\left\{ \begin{array}{ll}-|u'(z)|^2= W(z,N_1^*,N_2^*),&\quad \text{in $\mathbb{R}$},\\
\max_{z\in \mathbb{R}}u(z)=0.\end{array}\right.
\end{equation}
Moreover, we have the following condition on the zero level set of $u$:
$$
{\rm supp}\, n_1^*= {\rm supp}\, n_2^*\subset \{z\, |\, u(z)=0 \} \subset \{z\, |\, W(z,N_1^*,N_2^*)=0\}.
$$
(iii) Under condition \eqref{non-deg} we have ${\rm supp}\, n_1^*= {\rm supp}\, n_2^*= \{z\, |\, W(z,N_1^*,N_2^*)=0\}$ and hence
\begin{equation}
\label{aubry}
\{z\, |\, u(z)=0 \} = \{z\, |\, W(z,N_1^*,N_2^*)=0\}.
\end{equation}
The solution of \eqref{HJ}--\eqref{aubry} is indeed unique and hence the whole sequence $(u_{\e,i})_\e$ converge locally uniformly in $\mathbb{R}$ to $u$.
\end{theorem}
\noindent
Note that a Hamilton-Jacobi equation of type \eqref{HJ} in general might admit several viscosity solutions. Here, the uniqueness is obtained thanks to \eqref{aubry} and a property from the weak KAM theory, which is the fact that the viscosity solutions are completely determined by one value taken on each static class of the Aubry set (\cite{PL:82}, Chapter 5 and \cite{GC:01}).
In what follows we assume that \eqref{non-deg} and hence \eqref{aubry} always hold. We then give an explicit formula for $u$ considering two cases (one can indeed verify easily that the functions below are viscosity solutions to \eqref{HJ}--\eqref{aubry}):\\
\noindent
(i) {\bf Monomorphic ESS : } We consider the case where there exists a unique monomorphic ESS $z^{M*}$ and the corresponding demographic equilibrium is given by $(N_1^{M*}\da(z^{*}),N_2^{M*}\da(z^{M*}))$. Then $u$ is given by
\begin{equation}
\label{u-exp}
u(z)= -\big| \int_{z^{M*}}^{ z} \sqrt{- W(x; N_1^{M*}, N_2^{M*})} dx \big|.
\end{equation}
(ii) {\bf Dimorphic ESS : } We next consider the case where there exists a unique dimorphic ESS $(z_{\mathrm{I}}^{D*},z_{\mathrm{II}}^{D*})$ with the demographic equilibrium:
$
n_i=\nu_{\mathrm{I},i} \da(z-z^{D*}_{\mathrm{I}})+\nu_{\mathrm{II},i} \da(z-z^{D*}_{\mathrm{II}}),
$ and
$ \nu_{\mathrm{I},i}+ \nu_{\mathrm{II},i} =N_i^{D*}$. Then $u$ is given by
$$
u(z)=\max \Big( - |\int_{z_{\mathrm{I}}^{*}}^{ z} \sqrt{- W(x; N_1^{D*}, N_2^{D*})} dx|
, - |\int_{z_{\mathrm{II}}^{*}}^{z} \sqrt{- W(x; N_1^{D*}, N_2^{D*})} dx |\Big).
$$
\subsection{Next order terms}
\label{sec:vw}
\noindent
In this subsection we show how one can compute formally the first order term $v_i$, and in particular its second order Taylor expansion around the zero level set of $u$, and determine the value of $w_i$ at those points. We only present the method in the case of monomorphic population where the demographic equilibrium corresponding to this ESS is given by $(N_1^{M*}\da(z-z^{M*}), N_2^{M*}\da(z-z^{M*}) )$. The dimorphic case can be treated following similar arguments.
\\
\noindent
We first note that, one can compute, using \eqref{u-exp}, a Taylor expansion of order $4$ around the ESS point $z^{M*}$:
$$
u(z) = -\f{A}{2 }(z-z^{M*})^2+B(z-z^{M*})^3+C(z-z^{M*})^4+O(z-z^{M*})^5.
$$
We then look for constants $D_i$, $E_i$, $F_i$ and $G_i$ such that
$$
v_i(z)=v_i(z^{M*})+D_i (z-z^{M*}) +E_i(z-z^{M*})^2+O(z-z^{M*})^3,\qquad w_i(z^{M*})=F_i+G_i(z-z^{M*})+O(z-z^{M*})^2.
$$
We will only compute $D_i$, $E_i$ and $F_i$. The constants $G_i$ are not necessary in the computation of the moments but they appear in our intermediate computations.
Replacing the functions $u$, $v_i$ and $w_i$ by the above approximations to compute $N_{\e,i}=\int_\mathbb{R} n_{\e,i} (z)dz$, we obtain
$$
v_i(z^{M*})= \log \big(N_i^{M*} \sqrt{A} \big),
$$
$$
N_{\e,i} =N_i^{M*} +\e K_i+O(\e^2),\quad \text{with }\quad K_i= N_i^{M*} \big(\f{7.5\, B^2}{A^3}+ \f{3(C+BD_i)}{A^2}+\f{E_i+0.5 \,D_i^2}{A}+F_i \big).
$$
\noindent
Note also that writing \eqref{main} in terms of $u_{\e,i}$ we obtain
\begin{equation}
\label{main2}
\begin{cases}
-\e u_{\e,1}''(z) = |u_{\e,1}'|^2+ R_1(z,N_{\e,1})+m_2\exp \big( \f{u_{\e,2}-u_{\e,1}}{\e}\big)-m_1 ,\\
-\e u_{\e,2}''(z) = |u_{\e,2}'|^2+ R_2(z,N_{\e,2})+m_1\exp \big( \f{u_{\e,1}-u_{\e,2}}{\e}\big)- m_2.
\end{cases}
\end{equation}
\noindent
We then let $\e\to 0$ in the first line of \eqref{main2} and use \eqref{HJ} to obtain
\begin{equation}
\label{Q2/Q1}
v_2(z)-v_1(z) = \log \Big( \f{1}{m_2}\big( W(z,N_1^{M*},N_2^{M*})-R_1(z,N_1^{M*})+m_1 \big) \Big).
\end{equation}
Keeping respectively, only the terms of order $(z-z^{M*})$ and $(z-z^{M*})^2$ we find
$$
\lambda_1=D_2-D_1=\f{2g_1N_1^{M*}(z^{M*}+\theta)} {m_2N_2^{M*}\, },
$$
$$
\lambda_2=E_2-E_1=\f{N_1^{M*}}{m_2N_2^{M*}}(-A^2+g_1) -\f{2g_1^2N_1^{M*\, 2}}{m_2^2N_2^{M* \, 2}} (z^{M*}+\theta)^2.
$$
Combining the above lines we obtain
\begin{equation}
\label{da1-da2}
\f{ K_2}{N_2^{M*} } -\f{ K_1}{N_1^{M*} } =\lambda_3+\f{0.5\,\lambda_1 (D_1+D_2)}{A}+F_2-F_1, \quad \text{with} \quad \lambda_3 =
\f{3B}{A^2}\lambda_1+
\f{1}{A}\lambda_2.
\end{equation}
\noindent
Next, keeping the terms of order $\e$ in \eqref{main2} we obtain, for $\{i,j\} =\{1,2\}$,
\begin{equation}
\label{1-order}
- u''=2 u' \cdot v_i'-\kappa_i K_i +m_j \exp(v_j-v_i)(w_j-w_i).
\end{equation}
Evaluating the above equality at $z^{M*}$ we obtain
$$
A=-\kappa_iK_i+m_j \f{N_j^{M*}}{N_i^{M*}}(F_j-F_i).
$$
Replacing \eqref{da1-da2} in the above system we obtain
$$
\begin{cases}
A=-\kappa_1 K_1+m_2 \f{N_2^{M*}}{N_1^{M*}}(\f{ K_2}{N_2^{M*} } -\f{ K_1}{N_1^{M*} } -\lambda_3-\f{0.5\,\lambda_1 (D_1+D_2)}{A} ),\\
A=-\kappa_2 K_2+m_1 \f{N_1^{M*}}{N_2^{M*}}(\f{ K_1}{N_1^{M*} } -\f{ K_2}{N_2^{M*} } +\lambda_3 +\f{0.5\,\lambda_1 (D_1+D_2)}{A}).
\end{cases}
$$
This system allows us to identify $(K_1,K_2)$ in a unique way, as an affine function of $(D_1+D_2)$.\\
\noindent
Next we substrate the two lines of the system \eqref{1-order} to obtain
\begin{equation}
\label{w2w1}
w_2-w_1= \f{2 u' \cdot (v_2'-v_1')+\kappa_1 K_1-\kappa_2 K_2}{m_2\exp(v_2-v_1)+m_1\exp(v_1-v_2)}.
\end{equation}
Evaluating the above equation at $z^{M*}$ we find
$$
F_2-F_1= \f{\kappa_1 K_1-\kappa_2 K_2}{m_1N_1^{M*}/N_2^{M*} + m_2 N_2^{M*}/N_1^{M*}},
$$
and keeping the terms of order $(z-z^{M*})$ we obtain
$$
G_2-G_1=\f{-2A(D_2-D_1)}{m_1N_1^{M*}/N_2^{M*} + m_2 N_2^{M*}/N_1^{M*}}+\f{(m_2N_2^{M*}/N_1^{M*}-m_1N_1^{M*}/N_2^{M*})(D_2-D_1)}{(m_1N_1^{M*}/N_2^{M*} + m_2 N_2^{M*}/N_1^{M*})^2}\, (\kappa_1 K_1-\kappa_2 K_2).
$$
We then keep the terms of order $(z-z^{M*})$ in \eqref{1-order} to find
$$
-6B=-2AD_1+m_2 \f{N_2}{N_1}\big((D_2-D_1)(F_2-F_1)+G_2-G_1\big).
$$
Combining the above lines, one can write $D_1$ as an affine function of $D_1+D_2$. Since $D_2-D_1$ is already known, this allows to identify, at least in a generic way, $D_i$ and consequently $K_i$ (see \cite{SG.SM:17} for examples of such computations).
Next, we replace \eqref{w2w1} in \eqref{1-order} to obtain
$$
- u''=2 u' \cdot v_i' - \kappa_i K_i+\f{m_j\exp(v_j-v_i)}{m_2\exp(v_2-v_1)+m_1\exp(v_1-v_2)} \big(2 u' \cdot (v_j'-v_i')+\kappa_i K_i- \kappa_j K_j\big).
$$
All the terms in the above system, except $v_i'$, are already known. Hence one can compute $v_i$ from the above system. In particular,
keeping the terms of order $(z-z^{M*})^2$ in the above line, one can compute $E_i=\f12v_i''(z^{M*})$ and consequently $F_i$.
\subsection{Approximation of the moments}
\label{sec:mom}
The above approximations of $u$, $v_i$ and $w_i$ around the ESS points allow us to estimate the moments of the population's distribution with an error of at most order $O(\e^2)$. We only provide such approximations in the monomorphic case. One can obtain such approximations in the case of dimorphic ESS following similar computations. We first note that, replacing $u_{\e,i}$ by the approximation \eqref{ap-ue} and using the Taylor expansions of $u$, $v_i$ and $w_i$ obtained above, we can compute
$$
\begin{array}{c}
\int (z-z^{M*})^k n_{\e,i}(z) dz = \f{\e^{\f k 2}\sqrt{A} N_i^{M*}}{\sqrt{2\pi}} \int_\mathbb{R} (y^k e^{-\f A 2 y^2} \big( 1+\sqrt{\e} (By^3+D_iy)+O(\e) \big) dy\\
=\e^{\f k 2} N_i^{M*}\Big( \mu_k(\f{1}{A})+\sqrt{\e}\big(B\mu_{k+3}(\f 1A)+D_i \mu_{k+1}(\f 1A) \big) +O(\e^{\f{k+2}{2}}),
\end{array}
$$
where $\mu_k(\sigma^2)$ is the k-th order central moment of a Gaussian law with variance $\sigma^2$. Note that to compute the above integral, we performed a change of variable $z-z^{M*}=\sqrt{\e}\,y$. Therefore each term $z-z^{*}$ can be considered as of order $\sqrt{\e}$ in the integration. This is why, to obtain a first order approximation of the moments in terms of $\e$, it is enough to have a fourth order approximation of $u(z)$, a second order approximation of $v_i(z)$ and a zero order approximation of $w_i(z)$, in terms of $z$ around $z^{*}$.
The above computation leads in particular to the following approximations of the population size, the mean, the variance and the skewness of the population's distribution:
$$
\begin{cases}
N_{\e,i} =\int n_{\e,i} (z)dz=N_i^{M*}(1+\e (F_i+\f{E_i+0.5D_i^2}{A}+\f{3(C+BD_i)}{A^2}+\f{7.5B^2}{A^3}))+O(\e^2),
\\
\mu_{\e,i} =\f{1}{N_{\e,i} }\int z n_{\e,i} (z) dz=z^{M*}+\e(\f{3B}{A^2}+\f{D_i}{A} )+O(\e^2),
\\
\sigma_{\e,i}^{ 2}=\f{1}{N_{\e,i} }\int (z-\mu_{\e,i} )^2 n_{\e,i} (z) dz =\f{\e}{A} +O(\e^2),
\\
s_{\e,i} =\f{1}{\sigma_{\e,i}^{ 3}N_{\e,i} }\int (z-\mu_{\e,i} )^3 n_{\e,i} (z) dz =\f{6B}{A^{\f32}}\sqrt{\e}+O(\e^{\f32}).
\end{cases}
$$
\section{Identification of the ESS (the proofs of Theorem \ref{th:ESS} and Proposition \ref{prop:invade} )}
\label{sec:pr-ESS}
In this section, we prove Theorem \ref{th:ESS}, Corollary \ref{cor:deg} and Proposition \ref{prop:invade}. We first provide a description of the ESS in Subsection \ref{sec:ESS-des}. Next, we prove Theorem \ref{th:ESS}-(i) in Subsection \ref{sec:dim}. In Subsection \ref{sec:mono} we prove Theorem \ref{th:ESS}-(ii) and Corollary \ref{cor:deg}. Finally in Subsection \ref{sec:inv-con} we prove Proposition \ref{prop:invade}. \\
\subsection{The description of the ESS}
\label{sec:ESS-des}
\noindent
We first rewrite the conditions for ESS in terms of the following variables:
\begin{equation}
\label{mu}
\mu_i (N_i)= \f{\kappa_i N_i + m_i -r_i }{g_i}, \qquad i=1,2,
\end{equation}
where $\mu_i$ is an indicator of the size of the population in patch $i$.
In several parts of this paper, we will express the effective fitness as a function of $\mu_i$ instead of $N_i$:
$$
W_\mu(z,\mu_1(N_1),\mu_2(N_2)) = W(z,N_1,N_2),
$$
hence, the effective fitness in terms of $\mu_i$ is given by
$$
\begin{array}{rl}
W_\mu(z,\mu_1,\mu_2)&=\f 12\left[ -g_1 (\mu_1+(z+\theta)^2)-g_2(\mu_2+(z-\theta)^2 ) \right.\\
&\left.+ \sqrt{ \big( g_1 (\mu_1+(z+\theta)^2) - g_2 (\mu_2+(z-\theta)^2) \big)^2+4m_1m_2 } \right].
\end{array}
$$
From the definition of ESS, we deduce that at the demographic equilibrium of an ESS, where the indicators of population size in patches $1$ and $2$ are given by $(\mu_1^*,\mu_2^*)$, we have
$$
W_\mu(z,\mu_1^*,\mu_2^*)\leq 0,\qquad \text{for $z\in \mathbb{R}$},
$$
with the equality attained at one or two points corresponding to the monomorphic or dimorphic ESS. We then notice that the above inequality is equivalent with
$$
\begin{cases}
g_1(\mu_1^*+ (z+\theta)^2)+ g_2 (\mu_2^*+(z-\theta)^2) \geq 0,\\
f(z;\mu_1^*,\mu_2^*):=(\mu_1^*+(z+\theta)^2) (\mu_2^*+(z-\theta)^2) \geq \f {m_1m_2} {g_1g_2}.
\end{cases}
$$
This implies that at the ESS, $\mu_i^*>0$ and
\begin{equation}
\label{min-pb}
\min_x \; (\mu_1^*+(z+ \theta)^2) (\mu_2^* +(z-\theta)^2) =\f{m_1 m_2}{g_1g_2}.
\end{equation}
Note that the above function is a fourth order polynomial and hence has one or two minium points, which here will correspond to the monomorphic or dimorphic ESS. Conditions for the demographic equilibria will help us determine $(\mu_1^*,\mu_2^*)$:\\
\noindent
(i) If the minimum in \eqref{min-pb} is attained at the point $z^{M*}$, for $z^{M*}$ to be an ESS the following condition must be satisfied:
$$
\left(
\begin{array}{cc}
-g_1\Big((z^{M*}+ \theta)^2+\mu_1^{*} \Big) & m_2 \\
m_1 & -g_2\Big((z^{M*}- \theta)^2+\mu_2^{*} \Big)
\end{array}
\right)
\left(
\begin{array}{c}
N_1^{M*}
\\
N_2^{M*}
\end{array}
\right)
=0,
$$
with
$$
N_i^{M*}>0,\qquad \mu_i^*=\mu_i (N_i^{M*})= \f{\kappa_i N_i^{M*} + m_i -r_i }{g_i}, \qquad i=1,2.
$$
\noindent
(ii) If the minimum in \eqref{min-pb} is attained at two points $z_{\mathrm{I}}^{D*}$ and $z_{\mathrm{II}}^{D*}$, for $(z_{\mathrm{I}}^{D*},z_{\mathrm{II}}^{D*})$ to be an ESS, there must exist $\nu_{k,i}>0$, for $i=1,2$ and $k=\mathrm{I},\mathrm{II}$, such that,
\begin{equation}
\label{dem-dim-1}
\left(
\begin{array}{cc}
-g_1\Big((z_k^{D*}+ \theta)^2+\mu_1^{*} \Big) & m_2 \\
m_1 & -g_2\Big((z_k^{D*}- \theta)^2+\mu_2^{*} \Big)
\end{array}
\right)
\left(
\begin{array}{c}
\nu_{k,1}
\\
\nu_{k,2}
\end{array}
\right)
=0,
\qquad k=\mathrm{I},\mathrm{II},
\end{equation}
\begin{equation}
\label{dem-dim-2}
\nu_{\mathrm{I},1}+\nu_{\mathrm{II},,1}=N_1^{D*}, \quad \nu_{\mathrm{I},,2}+\nu_{\mathrm{II},,2}=N_2^{D*}, \quad \mu_i^*=\mu_i(N_i^{D*}) \; \text{ for $i=1,2$}.
\end{equation}
\subsection{The dimorphic ESS}
\label{sec:dim}
To identify the dimorphic ESS we first give the following lemma
\begin{lemma}
\label{lem:min}
If $f(z ; \mu_1,\mu_2)$ has two global minimum points $z_{\mathrm{I}}$ and $z_{\mathrm{II}}$, then $\mu_1=\mu_2$ and $z_{\mathrm{I}}=-z_{\mathrm{II}}$.
\end{lemma}
\proof
Let's suppose that $f(z ; \mu_1,\mu_2)$ has two global minimum points $z_{\mathrm{I}}$ and $z_{\mathrm{II}}$ and $\mu_2<\mu_1$. The case with $\mu_1<\mu_2$ can be treated following similar arguments. \\
\noindent
Since $z_{\mathrm{I}}$ and $z_{\mathrm{II}}$ are minimum points we have
$$
(\mu_1+(z_k+\theta)^2) (\mu_2 +(z_k-\theta)^2) \leq (\mu_1+(-z_k+\theta)^2) (\mu_2 +(-z_k-\theta)^2), \qquad k=\mathrm{I},\mathrm{II}.
$$
It follows that
$$
0 \leq 4z_k\theta (\mu_1-\mu_2), \qquad k=\mathrm{I},\mathrm{II},
$$
and hence
$$
0\leq z_k, \qquad k=\mathrm{I},\mathrm{II}.
$$
This implies in particular that all the roots of $f'(z,\mu_1,\mu_2)$ are positive. However, this is not possible since
$$
f'(z,\mu_1,\mu_2) = 4z^3+2(\mu_1+\mu_2-2\theta^2)z+2\theta(\mu_2-\mu_1).
$$
The fact that there is no second order term in the above expression implies that the sum of the roots is zero and hence the roots change sign. This is a contradiction with the previous arguments. We hence deduce that $\mu_1=\mu_2$.
\qed
\noindent
The above lemma indicates that at a dimorphic ESS one should have $\mu_1^*=\mu_2^*=\mu^*$. Hence to find a dimorphic ESS we look for $(\mu^*,z_{\mathrm{I}}^*,z_{\mathrm{II}}^*)$ such that
\begin{equation}
\label{min-dim}
f(z_k^*,\mu^*,\mu^*)=\min f(z;\mu^*,\mu^*)=\f {m_1m_2}{g_1g_2}, \qquad k=\mathrm{I},\mathrm{II}.
\end{equation}
To identify the minimum points of $f$ we differentiate $f$ with respect to $z$ and find
$$
f'(z,\mu^*,\mu^*) = 4z^3+4(\mu^* -\theta^2)z.
$$
For $f$ to have two minimum points, $f'$ must have three roots and hence one should have
\begin{equation}
\label{cond-mu}
\mu^* < \theta^2.
\end{equation}
Then, the minimum points are given by
$$
z_{\mathrm{I}}^*=-\sqrt{\theta^2-\mu^*}, \qquad z_{\mathrm{II}}^*=\sqrt{\theta^2-\mu^*}.
$$
Then replacing the above values in \eqref{min-dim} we obtain
$$
\mu^*= \f{m_1m_2}{4\theta^2g_1g_2}.
$$
Note that combining the above line with condition \eqref{cond-mu} we obtain \eqref{as1:dim}. \\
\noindent
Up until now, we have proven that if a dimorphic ESS exists \eqref{as1:dim} is verified and the dimorphic ESS is given by $(z_{\mathrm{I}}^{D*},z_{\mathrm{II}}^{D*})=(-\sqrt{\theta^2-\mu^*},\sqrt{\theta^2-\mu^*})$. However, for this point to be an ESS, as explained in the previous subsection, there must exist $\nu_{k,i}>0$, for $i=1,2$ and $k=\mathrm{I},\mathrm{II}$ such that \eqref{dem-dim-1}--\eqref{dem-dim-2} are satisfied.
Replacing $z_k^{D*}$ by their values and solving \eqref{dem-dim-1}--\eqref{dem-dim-2}, we obtain that $\nu_{k,i}$, for $i=1,2$ and $k=\mathrm{I},\mathrm{II}$, are identified in a unique way by \eqref{nuij}. One can verify by simple computations that the weights $\nu_{k,i}$ are positive if and only if conditions \eqref{as2:dim}--\eqref{as3:dim} are satisfied.
As a conclusion, we obtain that a dimorphic ESS exists if and only if the conditions \eqref{as1:dim}--\eqref{as3:dim} are satisfied. Moreover, when it exists, such dimorphic ESS is unique.
\subsection{The monomorphic ESS}
\label{sec:mono}
In this subsection we prove Theorem \ref{th:ESS}-(ii) and Corollary \ref{cor:deg}. To this end, we assume thanks to \eqref{as:r-m} and without loss of generality that $r_1-m_1>0$ and then we consider two cases:\\
\noindent
(i) We first suppose that condition \eqref{as1:dim} does not hold.
We then introduce the following functions:
$$
\begin{cases}
F=(F_1,F_2):(0,+\infty) \to (0,+\infty) \times [-\theta, \theta]
\\
\mu_2 \mapsto (\mu_1, \overline z),
\end{cases}
\qquad
\begin{cases}
G : (0,+\infty) \times [-\theta, \theta] \to \mathbb{R}
\\
(\mu_1, \overline z) \mapsto \overline \mu_2,
\end{cases}
$$
where $\mu_1$ and $\overline z$ are chosen such that
$$
f(\overline z,\mu_1,\mu_2) = \min f(z ; \mu_1, \mu_2) =\f{m_1m_2}{g_1g_2},
$$
and $\overline \mu_2$ is given by
\begin{equation}
\label{mu2bar}
\overline \mu_2 =\f{1}{g_2} \left[ \f{\kappa_2g_1}{m_2} ((\overline z + \theta)^2+\mu_1) \Big( \f{g_1\mu_1+r_1-m_1}{\kappa_1} \Big)+m_2-r_2 \right].
\end{equation}
We claim the following lemma which we will prove at the end of this paragraph.
\begin{lemma}
\label{lem:FG}
If \eqref{as1:dim} does not hold, then the functions $F$ and $G$ are well-defined. Moreover, $F_1$ and $F_2$ are decreasing with respect to $\mu_2$ and $G$ is increasing with respect to $\mu_1$ and $\overline z$.
\end{lemma}
Following the arguments in Section \ref{sec:ESS-des}, one can verify that a trait $z^{*}$ is a monomorphic ESS with a demographic equilibrium $(\mu_1^*,\mu_2^*)$ if and only if
$F(\mu_2^*)=(\mu_1^*,z^*)$ and $G \circ F (\mu_2^*)=\mu_2^*$. Therefore, identifying monomorphic evolutionary stable strategies is equivalent with finding the fixed points of $G \circ F$. \\
\noindent
In the one hand, from Lemma \ref{lem:FG} we deduce that $G \circ F$ is a decreasing function . In the other hand, one can verify that, as $\mu_2\to 0$, $G \circ F(\mu_2) \to +\infty$. In particular $G \circ F(\mu_2) > \mu_2$ for $\mu_2$ small enough. It follows that there exists a unique $\mu_2^*$ such that $G \circ F(\mu_2^*)=\mu_2^*$. We deduce that there exists a unique ESS which is given by $z^{M*}=F_2(\mu_2^*)$. Moreover, $(F_1(\mu_2^*),\mu_2^*)$ corresponds to its demographic equilibrium.
\noindent
Note that for such ESS to make sense, one should also have $N_i^{M*}(\mu_i^*)>0$. This is always true for such fixed point. Note indeed that, since
$\mu_1^*=F_1(\mu_2^*)\in (0,\infty)$ and $r_1-m_1>0$ we deduce that $N_1^{M*}>0$. Moreover, the positivity of $N_2^{M*}$ follows from $N_2^{M*}=(g_2\mu_2^*+r_2-m_2)/\kappa_2$, \eqref{mu2bar} and the positivity of $r_1-m_1$ and $\mu_1^*$.
\\
{\bf Proof of Lemma \ref{lem:FG}.}
The fact that $G : (0,+\infty) \times [-\theta, \theta] \to \mathbb{R}$ (and respectively $F_1=(0,+\infty) \to (0,\infty)$) is well-defined and increasing (respectively decreasing) is immediate.
We only show that $F_2$ is well-defined and decreasing.
To this end, we notice that since $f$ is a fourth order polynomial, it admits one or two minimum points. However, from the arguments in Subsection \ref{sec:dim} we know that the only possibility to have two global minima is that \eqref{as1:dim} holds and $\mu_2=\mu^*=\f{m_1m_2}{4\theta^2g_1g_2}$. Since we assume that \eqref{as1:dim} does not hold, $f$ always admits a unique minimum point in $\mathbb{R}$. This minimum point is indeed attained in $[-\theta,\theta]$ since for all $z<-\theta$, $f(z ; \mu_1,\mu_2) >f(-\theta; \mu_1,\mu_2)$ and
for all $z>\theta$, $f(z ; \mu_1,\mu_2) > f( \theta; \mu_1,\mu_2)$. Hence $\overline z$ is defined in a unique way in $[-\theta, \theta]$.\\
\noindent
Finally, it remains to prove that $F_2 :(0,\infty) \to [-\theta,\theta]$ is a decreasing function. To this end, let's suppose that $\widetilde \mu_2> \mu_2$. Therefore, $F_1(\widetilde \mu_2)=\widetilde \mu_1 < F_1(\mu_2)=\mu_1$. We want to prove that $F_2(\widetilde \mu_2)=\widetilde z <F_2(\mu_2)=\overline z$. To this end, we write
$$
\begin{array}{rl}
f(z ; \widetilde \mu_1,\widetilde \mu_2) &= f(z ; \mu_1,\mu_2) +(\widetilde \mu_1- \mu_1) (z-\theta)^2 + (\widetilde \mu_2- \mu_2) (z+\theta)^2 +\widetilde \mu_1\widetilde \mu_2- \mu_1\mu_2\\
& =f(z;\mu_1,\mu_2) +h(z; \mu_1,\mu_2, \widetilde \mu_1,\widetilde \mu_2),
\end{array}
$$
where $h$ is increasing with respect to $z$. Since $f(z,\mu_1,\mu_2)$ attains its minimum at $\overline z$ and $f(z, \widetilde \mu_1,\widetilde \mu_2)$ attains its minimum at $\widetilde z$ we find that
$$
f(\overline z ; \mu_1,\mu_2) < f(\widetilde z ; \mu_1,\mu_2),
$$
$$
f(\widetilde z ; \mu_1,\mu_2) + h(\widetilde z ; \mu_1,\mu_2, \widetilde \mu_1,\widetilde \mu_2) < f(\overline z ; \mu_1,\mu_2) + h(\overline z ; \mu_1,\mu_2, \widetilde \mu_1,\widetilde \mu_2).
$$
Combining the above inequalities, we obtain that
$$
h(\widetilde z ; \mu_1,\mu_2, \widetilde \mu_1,\widetilde \mu_2) < h(\overline z ; \mu_1,\mu_2, \widetilde \mu_1,\widetilde \mu_2).
$$
and since $h$ is an increasing function, we conclude that
$
\widetilde z < \overline z.
$
\qed
\bigskip
\noindent
(ii) We next suppose that \eqref{as1:dim} holds. Consequently, $F$ is not well-defiled at $\mu_2=\mu^*=\f{m_1m_2}{4\theta^2g_1g_2}$ since $F_1(\mu^*)=\mu^*$ and $\max_z f(z;\mu^*,\mu^*)$ is attained at two points $\pm z^{D*}$. Therefore, we only can define $F$ in $(0,\infty)\setminus \{\mu^*\}$:
$$
\begin{cases}
\widetilde F=(\widetilde F_1,\widetilde F_2):(0,+\infty)\setminus \{\mu^*\} \to (0,+\infty) \times [-\theta, \theta]
\\
\mu_2 \mapsto (\mu_1, \overline z),
\end{cases}
\qquad
\begin{cases}
G : (0,+\infty) \times [-\theta, \theta] \to \mathbb{R}
\\
(\mu_1, \overline z) \mapsto \overline \mu_2,
\end{cases}
$$
where $\mu_1$, $\overline z$ and $\overline m_2$ are chosen as above. Following similar arguments as in the proof of Lemma \ref{lem:FG} we obtain
\begin{lemma}
\label{lem:FG2}
Under condition \eqref{as1:dim} the functions $\widetilde F$ and $G$ are well-defined. Moreover, $\widetilde F_1$ and $\widetilde F_2$ are decreasing with respect to $\mu_2$ in the intervals $(0,\mu^*)$ and $(\mu^*,+\infty)$ and $G$ is increasing with respect to $\mu_1$ and $\overline z$.
\end{lemma}
As above, identifying monomorphic evolutionary stable strategies is equivalent with finding the fixed points of $G \circ \widetilde F$, which is a decreasing function in the intervals $(0,\mu^*)$ and $(\mu^*,+\infty)$ thanks to the lemma \ref{lem:FG2}. We then compute
$$
\widetilde F(\mu^{*-})=(\mu^*, z^{D*}),\qquad F(\mu^{*+})=(\mu^*,-z^{D*}),
$$
$$
G \circ \widetilde F(\mu^{*-}) =\f{1}{g_2} \left[ \f{\kappa_2}{m_2} (g_1( z^{D*} + \theta)^2)+\mu^*) \Big( \f{g_1\mu^* +r_1-m_1}{\kappa_1} \Big)+m_2-r_2 \right],
$$
$$
G \circ \widetilde F(\mu^{*+}) =\f{1}{g_2} \left[ \f{\kappa_2}{m_2} (g_1( -z^{D*} + \theta)^2)+\mu^*) \Big( \f{g_1\mu^* +r_1-m_1}{\kappa_1} \Big)+m_2-r_2 \right],
$$
where $\mu^{*+}$and $\mu^{*-}$ correspond respectively to the limits from the right and from the left as $\mu \to \mu^*$.
One can easily verify that $G \circ \widetilde F(\mu^{*+}) < \mu^*$ if and only if \eqref{as2:dim} holds, and similarly $G \circ \widetilde F(\mu^{*-}) > \mu^*$ if and only if
\eqref{as:eq8}, or equivalently
\eqref{as3:dim}, holds. We hence deduce, from the latter property and the fact that $G \circ \widetilde F$ is decreasing in the intervals $(0,\mu^*)$ and $(\mu^*,+\infty)$, that:
\begin{enumerate}
\item If \eqref{as2:dim} and \eqref{as3:dim} hold there is no monomorphic ESS. Note that, under these conditions there exists a unique dimorphic ESS.
\item if \eqref{as2:dim} holds and the r.h.s. of \eqref{as3:dim} is negative, then there exists a unique monomorphic ESS in $\mu_2^{M*}\in (0,\mu^*)$, $\mu_1^{M*}\in (\mu^*,\infty)$ and $z^{M*}\in (z^{D*},\theta)$.
\item if \eqref{as3:dim} holds and the r.h.s. of \eqref{as2:dim} is negative, then there exists a unique monomorphic ESS with $\mu_2^{M*}\in (\mu^*,\infty)$, $\mu_1^{M*}\in (0,\mu^*)$ and $z^{M*}\in (-\theta,-z^{D*})$.
\item if \eqref{as2:dim} holds and \eqref{as3:dim} is an equality, then there exists a unique monomorphic ESS which is given by $\{z^{D*}\}$ and $\mu_1^*=\mu_2^*=\mu^*$.
\item if \eqref{as3:dim} holds and \eqref{as2:dim} is an equality, then there exists a unique monomorphic ESS which is given by $\{-z^{D*}\}$ and $\mu_1^*=\mu_2^*=\mu^*$.
\item Finally, from the fact that \eqref{as2:dim} and \eqref{as3:dim} are respectively equivalent to \eqref{as:eq7} and \eqref{as:eq8} we deduce that at least one of conditions \eqref{as2:dim} and \eqref{as3:dim} always holds. Therefore, all the possible cases have been considered.
\end{enumerate}
\noindent
Note that, following similar arguments to the previous case, the total population sizes $N_i^{M*}(\mu_i^*)$, for $i=1,2$, corresponding to the unique fixed point, are positive and hence the obtained monomorphic ESS is indeed valid. This concludes the proof of Theorem \ref{th:ESS}. It remains to prove Corollary \ref{cor:deg}:\\
{\bf Proof of Corollary \ref{cor:deg} } We first notice from the arguments above that $W(z,N_1^*,N_2^*)=W_\mu(z,\mu_1^*,\mu_2^*)$ has at most two global maximum points. Therefore, for \eqref{Wneg} not to hold, the unique ESS should be monomorphic while $W_\mu(z,\mu_1^*,\mu_2^*)$ has two maximum points.
However, from the arguments in Section \ref{sec:dim} we know that if $W_\mu(z,\mu_1^*,\mu_2^*)$ has two maximum points, then \eqref{as1:dim} holds, $\mu_1^*=\mu_2^*=\mu^*$ and the maximum points are given by $\{\pm z^{D*}\}$. Finally, from the results in the above paragraph, we know that the only possibility to have a monomorphic ESS in this case, is that either \eqref{as2:dim} or \eqref{as3:dim} is an equality, which is in contradiction with \eqref{non-deg}.
\qed
\subsection{The interpretation of conditions \eqref{as2:dim} and \eqref{as3:dim} }
\label{sec:inv-con}
In this subsection we prove Proposition \ref{prop:invade}. We only prove the first claim. The second claim can be derived following similar arguments.\\
\noindent
We denote by $(\mu_1^{\rm eq},\mu_2^{\rm eq})$ the demographic equilibrium of a monomorphic population of trait $-z^{D*}$ and we first claim the following lemma.
\begin{lemma}
There exists a unique demographic equilibrium $n_i=N_i \delta (z+z^{D*})$ corresponding to the the set $\Omega=\{-z^{D*}\}$.
\end{lemma}
\proof
We introduce two functions $K$ and $H$ which are respectively close to $F_1$ and $G$ introduced above:
$$
\begin{cases}
K:(-(z^{D*}+\theta)^2,+\infty) \to \mathbb{R}
\\
\mu_2 \mapsto \mu_1,
\end{cases}
\qquad
\begin{cases}
H : \mathbb{R} \to \mathbb{R}
\\
\mu_1 \mapsto \overline \mu_2,
\end{cases}
$$
where $\mu_1$ is chosen such that
$$
f(-z^{D*} ; \mu_1,\mu_2)=\f{m_1m_2}{g_1g_2},
$$
and $\overline \mu_2$ is given by
$$
\overline \mu_2 =\f{1}{g_2} \left[ \f{\kappa_2 g_1}{m_2} ((z^{D*} - \theta)^2+\mu_1) \Big( \f{g_1\mu_1+r_1-m_1}{\kappa_1} \Big)+m_2-r_2 \right].
$$
Then the demographic equilibrium $(\mu_1^{\rm eq}, \mu_2^{\rm eq})$ of a monomorphic resident population of type $-z^{D*}$ corresponds to a fixed point of $H \circ K$:
$$
H \circ K(\mu_2^{\rm eq}) =\mu_2^{\rm eq}, \qquad
K(\mu_2^{\rm eq})= \mu_1^{\rm eq}.
$$
Note also that, for such equilibrium to make sense, one should have $0 \leq N_i(\mu_i^{\rm eq}) $ or equivalently
$$
\f{m_i-r_i}{g_i} \leq \mu_i^{\rm eq} .
$$
Moreover, since $W_\mu(-z^{D*}, \mu_1^{\rm eq}, \mu_2^{\rm eq})=0$, we have the additional condition
$$
0<\mu_1^{\rm eq}+(z^{D*}-\theta)^2, \qquad 0<\mu_2^{\rm eq}+(z^{D*}+\theta)^2.
$$
Reciprocally, a pair $(\mu_1,\mu_2)$ which satisfies the above conditions corresponds to a demographic equilibrium.\\
\noindent
We next notice, on the one hand, that $K$ is a decreasing function, and hence, in view of the above conditions, a fixed point $(\mu_1^{\rm eq}, \mu_2^{\rm eq})$ of $H \circ K$, is a demographic equilibrium if and only if $\mu_2^{\rm eq}\in \big( -(-z^{D*}+\theta)^2, \widetilde \mu_2)$, with $\widetilde \mu_2=K^{-1}(\max ( \f{m_1-r_1}{g_1},-( z^{D*}-\theta)^2 )$. On the other hand,
$H$, restricted to $\big(\max ( \f{m_1-r_1}{g_1},-( z^{D*}-\theta)^2 ) ,+\infty\big)$, is an increasing function. Therefore $H \circ K$, restricted to the set $\big( -(z^{D*}+\theta)^2, \widetilde \mu_2)$, is decreasing. We deduce that a demographic equilibrium, if it exists, is unique.\\
\noindent
We then note that, as $\mu_2 \to -(z^{D*}+\theta)^{2+}$, $H \circ K(\mu_2) \to +\infty$. In particular, for $\mu_2$ close to $ -(z^{D*}+\theta)^{2}$, $H \circ K(\mu_2)>\mu_2$. Furthermore, $H \circ K( \widetilde \mu_2)=\f{m_2-r_2}{g_2}<0$. Note also that, $K(\widetilde \mu_2)<0$ and $K(\mu^*)=\mu^*>0$ and hence $0<\mu^*<\widetilde \mu_2$, which implies that $H \circ K( \widetilde \mu_2)<\widetilde \mu_2$. We deduce from the intermediate value theorem that, $H\circ K: \big( -(z^{D*}+\theta)^2, \widetilde \mu_2)\to \mathbb{R}$ has a unique fixed point $(\mu_1^{\rm eq}, \mu_2^{\rm eq})$ and hence there exists a unique demographic equilibrium.
\qed
\medskip
\noindent
We next observe that, since $W_{\mu}(-z^{D*},\mu_1^{\rm eq},\mu_2^{\rm eq})=0$, we have $W_{\mu}(z^{D*},\mu_1^{\rm eq},\mu_2^{\rm eq})>0$ if and only if $\mu_2^{\rm eq}< \mu_1^{\rm eq}$. Moreover, since $W_\mu(-z^{D*},\mu^*,\mu^*)=0$, this is equivalent with $\mu_2^{\rm eq}< \mu^*< \mu_1^{\rm eq}$.
\\
\noindent
We are now ready to conclude. Let's first suppose that \eqref{as2:dim} holds which implies that $H \circ K(\mu^*)<\mu^*$. Then, thanks to the fact that $\mu^*<\widetilde \mu_2$ and from the monotonicity of $K$ and $H \circ K$ we deduce that the unique fixed point, $\mu_2^{\rm eq}$, of $H \circ K$ satisfies
$$
\mu_2^{\rm eq}<\mu^* <K(\mu_2^{\rm eq})=:\mu_1^{\rm eq}.
$$
This implies that $W_{\mu}(z^{D*},\mu_1^{\rm eq},\mu_2^{\rm eq})>0$ or equivalently, a mutant trait $z^{D*}$ can invade a resident population of trait $-z^{D*}$ at its demographic equilibrium. \\
\noindent
Let's now suppose that $W_{\mu}(z^{D*},\mu_1^{\rm eq},\mu_2^{\rm eq})>0$ and hence $\mu_2^{\rm eq}< \mu^*< \mu_1^{\rm eq}$. We then deduce from $H \circ K(\mu_2^{\rm eq})=\mu_2^{\rm eq}$ and that the monotonicity of $H \circ K$ that $H \circ K(\mu^*)<\mu^*$. This implies \eqref{as2:dim}.
\section{The proof of Theorem \ref{thm:main}}
\label{sec:pr-HJ}
In this section, we prove Theorem \ref{thm:main}. To this end, we first provide a convergence result along subsequences in Subsection \ref{sec:HJ}. We next conclude using a uniqueness argument in Subsection \ref{sec:HJ-unique}.
\subsection{Convergence to the Hamilton-Jacobi equation with constraint }
\label{sec:HJ}
In this section, we prove that as $\e\to 0$, both sequences $(u_{\e,i})_\e$, for $i=1,2$, converge along subsequences and locally uniformly to a function $u\in \mathrm{C}(\mathbb{R})$, such that $u$ is a viscosity solution to the following equation
\begin{equation}
\label{HJ-u}
\left\{ \begin{array}{ll}-| u'(z)|^2= W(z,N_1,N_2),&\quad \text{in $\mathbb{R}$},\\
\max_{z\in \mathbb{R}}u(z)=0,\end{array}\right.
\end{equation}
\begin{equation}
\label{supp-n}
{\rm supp}\, n_1= {\rm supp}\, n_2\subset \{z\, |\, u(z)=0 \} \subset \{z\, |\, W(z,N_1,N_2)=0\},
\end{equation}
where $(n_1,n_2)$ (respectively $(N_1,N_2)$) is a limit, along subsequences, of $(n_{\e,1},n_{\e,2})$ (respectively $(N_{\e,1},N_{\e,2})$) as $\e$ vanishes. Moreover,
$$
N_i=\int_\mathbb{R} n_i(z)dz.
$$
Note that this is indeed the claim of Theorem \ref{thm:main}, except that we don't know yet if $(n_1,n_2)=(n_1^*,n_2^*)$.\\
To this end, we first claim the following
\begin{prop}
\label{prop:Ne} Assume \eqref{as:r-m}--\eqref{as:m}. \\
(i) For all $\e>0$, we have
\begin{equation}
\label{N-bound}
N_{\e,1}+N_{\e,2} \leq N_M=2 \max (r_1,r_2).
\end{equation}
In particular, for $i=1,2$, $(n_{\e,i})_\e$ converge along subsequences and weakly in the sense of measures to $n_i$ and $N_{\e,i}$ converges along subsequences to $N_i$.\\
(ii) For any compact set $K\subset \mathbb{R}$, there exists a constant $C_M=C_M(K)$ such that, for all $\e\leq 1$,
\begin{equation}
\label{Harnack}
n_{\e,i}(x) \leq C_M n_{\e,j}(y), \qquad \text{for}\quad i,j\in \{1,2\}, |x-y|\leq \e.
\end{equation}
(iii) For all $\eta>0$ there exists a constant $R$ large enough such that
\begin{equation}
\label{n-da}
\int_{|z|>R} n_{\e,i}(z)dz <\eta, \quad \text{for }i=1,2.
\end{equation}
Consequently $N_i=\int_\mathbb{R} n_i(z) dz$.
\end{prop}
We postpone the proof of this proposition to the end of this paragraph and we pursue giving the scheme of the proof of Theorem \ref{thm:main}. The next step, is to introduce functions $(l_{\e,1},l_{\e,2})$ as below
$$
l_{\e,i}:=\alpha_\e n_{\e,i}, \quad \text{for }i=1,2,
$$
with $\alpha_\e$ chosen such that
\begin{equation}
\label{int-l}
\int_\mathbb{R} \big( l_{\e,1}(z)+l_{\e,2}(z) \big)dz =1.
\end{equation}
Moreover, we define
$$
v_{\e,i}:= \e \log (l_{\e,i}),\quad \text{for }i=1,2.
$$
We next prove the following
\begin{prop}
\label{prop:ve}
Assume \eqref{as:r-m}--\eqref{as:m}. \\
(i) For $i=1,\,2$ and all $\e\leq \e_0$, the families $(v_{\e,i})_\e$ are locally uniformly bounded and locally uniformly Lipschitz.\\
(ii) As $\e\to 0$, both families $(v_{\e,i})_\e$, for $i=1,2$, converge along subsequences and locally uniformly in $\mathbb{R}$ to a continuous function $v\in \mathrm{C}(\mathbb{R})$ and $(N_{\e,i})_\e$, for $i=1,2$, converge along subsequences to $N_i$, such that $v$ is a viscosity solution to the following equation
\begin{equation}
\label{HJ-v}
\left\{ \begin{array}{ll}-| v'(z)|^2= W(z,N_1,N_2),&\quad \text{in $\mathbb{R}$},\\
\max_{z\in \mathbb{R}}v(z)=0.\end{array}\right.
\end{equation}
(iii) We have
\begin{equation}
\label{W-neg}
W(z,N_1,N_2) \leq 0.
\end{equation}
Consequently, there exists $\delta >0$ such that
\begin{equation}
\label{bd-bel-N}
N_i \geq \delta, \quad \text{for }i=1,2.
\end{equation}
\end{prop}
The proof of this proposition is given at the end of this subsection. Note that \eqref{bd-bel-N} implies that, for $\e$ small enough, $N_{\e,i}\geq \f \delta 2$. This together with \eqref{N-bound} imply that, for $\e\leq \e_1$ with $\e_1$ small enough,
$$
\f{1}{2\max(r_1,r_2)} \leq \alpha_\e \leq \f 1 \delta,
$$
and consequently
$$
v_{\e,i}+\e \log (\delta) \leq u_{\e,i} \leq v_{\e,i}+\e \log (2\max(r_1,r_2)).
$$
We then conclude from the above inequality together with Proposition \ref{prop:ve}--(ii) that $(u_{\e,i})_\e$, for $i=1,2$, converge along subsequences and locally uniformly to a function $u\in \mathrm{C}(\mathbb{R})$ which is a viscosity solution of \eqref{HJ-u}. \\
To prove \eqref{supp-n} we use the following lemma:
\begin{lemma}
\label{lem:sconv}
The function $v$ is semiconvex.
\end{lemma}
Then \eqref{supp-n} is immediate from the WKB ansatz \eqref{WKB} and the fact that $v$ is differentiable at its maximum points (since it is a semiconvex function). Finally, lemma \ref{lem:sconv} can be proved following similar arguments as in \cite{SM:12}--Theorem 1.2, but using cut-off functions to treat the unbounded case as in the proof of Proposition \ref{prop:ve}-(i).\\
{\bf Proof of Proposition \ref{prop:Ne}.}
(i) We first prove \eqref{N-bound}. To this end, we integrate the equations in \eqref{main} with respect to $z$ to obtain
$$
\int_\mathbb{R} n_{\e,i}(z)(r_i-m_i-g_i(z-\theta_i)^2-N_{\e,i}) dz +m_j N_{\e,j}=0,\quad i=1,2, \; j=2,1.
$$
Adding the two equations above, it follows that
$$
N_{\e,1}^2+N_{\e,2}^2 \leq r_1 N_{\e,1}+r_2 N_{\e,2},
$$
and hence \eqref{N-bound}.
(ii) We define
$$
K_\e=\Big\{\f x \e \, |\, x\in K \Big\}, \qquad \widetilde n_{\e,i}(y)=n_{\e,i}(\e y),\qquad\text{for $i=1,\,2$}.
$$
From \eqref{main} we have, for $z\in \mathbb{R}$,
\begin{equation}
\label{tilden}
\displaystyle\left\{\begin{array}{rll}
- \widetilde n_{\e,1}''(z)=\widetilde n_{\e,1}(z) R_1(\e z,N_{\e,1})+m_2 \widetilde n_{\e,2}(z)-m_1\widetilde n_{\e,1}(z),\\
- \widetilde n_{\e,2}''(z)=\widetilde n_{\e,2}(z) R_2(\e z,N_{\e,2})+m_1\widetilde n_{\e,1}(z)-m_2\widetilde n_{\e,2}(z).
\end{array}\right.
\end{equation}
Moreover, from \eqref{Ri} and \eqref{N-bound} we obtain that there exists a constant $C=C(K)$ such that
$$
-C \leq R_i(\e z,{N_{\e,i}})\leq C, \qquad \text{for all } z\in K_{\e}.
$$
Therefore the coefficients of the linear elliptic system \eqref{tilden} are bounded uniformly in $K_\e$. It follows from the classical Harnack inequality (\cite{JB.MS:04}, Theorem 8.2) that there exists a constant $C_M=C_M(K)$ such that, for all $z_0\in K_\e$ such that $B_1(z_0)\subset K_\e$ and for $i,j=1,2$,
$$
\sup_{z\in B_1(z_0)}\widetilde n_\e^i(z)\leq C_M\,\inf_{z\in B_1(z_0)}\widetilde n_\e^j(z).
$$
Rewriting the latter in terms of $ n_\e^1$ and $ n_\e^2$ and replacing $(z,z_0)$ by $(\frac{z'}{\e},\f{z'_0}{\e})$ we obtain
$$
\sup_{z'\in B_\e(z'_0)}n_\e^i(z')\leq C_M\,\inf_{z' \in B_\e(z'_0)}n_\e^j(z'),\quad
$$
and hence \eqref{Harnack}.
(iii) We integrate the equations in \eqref{main} with respect to $z$ to obtain
\begin{equation}
\label{int-n}
0\leq \int_\mathbb{R} n_{\e,i}(z) (r_i-g_i(z+\theta)^2 )dz +m_j N_{\e,j}(z) .
\end{equation}
We choose a constant $R>0$ large enough such that for all $|z|>R$, we have
$$
r_i-g_i(z-\theta_i)^2 < - \f{N_M}{\eta} \max(r_1+m_2,r_2 +m_1),\qquad i=1,2.
$$
Splitting the integral term in the r. h. s. of \eqref{int-n} into two parts we obtain
$$
0< r_i \int_{|z|\leq R} n_{\e,i}(z)dz -\f{N_M}{\eta} \max(r_1+m_2,r_2 +m_1) \int_{|z|>R} n_{\e,i}(z)dz +m_j N_{\e,j}.
$$
Next, using \eqref{N-bound}, we obtain
$$
\f{N_M}{\eta} \max(r_1+m_2,r_2 +m_1) \int_{|z|>R} n_{\e,i}(z)dz < (r_i+m_j)N_M,
$$
and hence \eqref{n-da}.\\
\qed
{\bf Proof of Proposition \ref{prop:ve}.}
(i) We first prove that for all $a>0$ and any compact set $K$, there exists $\e_0$ such that for all $\e\leq \e_0$, we have
$$
v_{\e,i}(z) \leq a,\quad \text{for } i=1,2,\quad z\in K.
$$
Note that, thanks to \eqref{Harnack}, for any compact set $K$, there exists a constant $C_M=C_M(K)$ such that
\begin{equation}
\label{v-Har}
|v_{\e,i}(x)-v_{\e,j}(y)| \leq \e \log C_M, \quad \text{for $|x-y|\leq \e$ and $i=1,2$.}
\end{equation}
We fix a compact set $K$. Let $z_0\in K$, $i\in \{1,2\}$ and $\e \leq \e_0=\f{a}{2\log C_M}$ be such that
$$
a < v_{\e,i}(z_0).
$$
Therefore, for all $|y-z_0|\leq \e$, we find
$$
\f a 2 < a-\e \log C_M <v_{\e,i}(y).
$$
It follows that
$$
\e \exp(\f{a}{2\e}) \leq \int_{|y-z_0|\leq \e} \exp( \f{v_{\e,i}(y)}{\e} )dy \leq \int_\mathbb{R} l_{\e,i}(y)dy.
$$
Note that the l. h. s. of the above inequality tends to $+\infty$ as $\e\to 0$, while the r. h. s. is bounded by $1$, which is a contradiction. Such $z_0$ therefore does not exists and for all $z\in K$, $\e\leq \e_0$ and $i=1,2$, we find
$$
v_{\e,i}(z)\leq a.
$$
(ii) We next notice that, similarly to the proof of Theorem \ref{prop:Ne}-(iii), one can prove that, for all $\eta>0$ there exists a constant $R$ large enough such that
\begin{equation}
\label{l-da}
\int_{|z|>R} l_{\e,i}(z)dz <\eta, \quad \text{for }i=1,2.
\end{equation}
(iii) Next, we prove that there exists $\e_0>0$ such that for all $\e\leq \e_0$, the families $(v_{\e,i})_\e$ are locally uniformly bounded from below. To this end, we first observe from \eqref{int-l} and \eqref{l-da} that, for $\eta\in (0,\f 14)$ there exists a constant $R_0>0$ such that
$$
\int_{|z|\leq R_0}( l_{\e,1}(z) +l_{\e,2}(z) )dz > 1-2\eta>\f 1 2.
$$
Consequently, for $\e\leq \e_0$, with $\e_0$ small enough, there exists $z_0\in \mathbb{R}$ and $i\in \{1,2\}$ such that $|z_0|\leq R_0$ and $-1\leq v_{\e,i}(z_0) $. We deduce, thanks to \eqref{v-Har}, that for any compact set $K=\overline B_R(0)$, with $R\geq R_0$,
$$
-1-2\log(C_M(K))R \leq v_{\e,i} (z),\qquad \text{for }i=1,2, \; \e\leq \e_0, \; z\in K .
$$
(iv) We prove that, for any compact set $K$, the families $(v_{\e,i})_\e$ are uniformly Lipschitz in $K$. To this end, we first notice that $(v_{\e,i})_\e$ solves the following system:
\begin{equation}
\label{sys-ve}
-\e v_{\e,i}''= |v_{\e,i}'|^2+R_i(z,N_{\e,i}) + m_j \exp \Big( \f{v_{\e,j}-v_{\e,i}}{\e} \Big) -m_i, \quad i=1,2, \; j=2,1.
\end{equation}
We differentiate the above equation with respect to $z$ and multiply it by $v_{\e,i}'$ to obtain
$$
-\e v_{\e,i}' v_{\e,i}'''=2v_{\e,i}'^2 v_{\e,i}''+ \f{\p}{\p z}R_i(z,N_{\e,i}) v_{\e,i}' +m_j v_{\e,i}' \Big( \f{v_{\e,j}'-v_{\e,i}'}{\e} \Big) \exp \Big( \f{v_{\e,j}-v_{\e,i}}{\e} \Big).
$$
We then define $p_{\e,i} := |v_{\e,i}'|^2$ and notice that
$$
p_{\e,i}'=2 v_{\e,i}' v_{\e,i}'',\qquad p_{\e,i}''=2 v_{\e,i}''^2+2v_{\e,i}'v_{\e,i}'''.
$$
Combining the above lines we obtain that
\begin{equation}
\label{eq-p}
-\f \e 2 p_{\e,i}'' +\e v_{\e,i}''^2=2 p_{\e,i}'v_{\e,i}'+ \f{\p}{\p z}R_i(z,N_{\e,i}) v_{\e,i}' +m_j v_{\e,i}' \Big( \f{v_{\e,j}'-v_{\e,i}'}{\e} \Big) \exp \Big( \f{v_{\e,j}-v_{\e,i}}{\e} \Big).
\end{equation}
We then fix a point $\xi \in K$ and introduce a cut-off function $\vp\in C^{\infty}(\mathbb{R})$ which satisfes
\begin{equation}
\label{vp}
\vp(\xi)=1,\quad 0\leq \vp \leq 1 \text{ in $\mathbb{R}$}, \quad \vp\equiv 0 \text{ in $B_1(\xi)^c$},\quad |\vp'| \leq C \vp^{\f 12}, \qquad |\vp''|\leq C.
\end{equation}
We then define $P_{\e,i}=p_{\e,i}\vp$ and notice that
$$
P_{\e,i}'=p_{\e,i}' \vp+p_{\e,i} \vp',\qquad P_{\e,i}''= p_{\e,i}'' \vp+2 p_{\e,i}'\vp'+p_{\e,i}\vp''.
$$
We then multiply \eqref{eq-p} by $\vp$ to obtain
$$
\begin{array}{rl}
-\f \e 2 P_{\e,i}'' +\e \vp v_{\e,i}''^2&=2 P_{\e,i}'v_{\e,i}'+ \f{\p}{\p z}R_i(z,N_{\e,i}) \vp v_{\e,i}' +m_j \vp v_{\e,i}' \Big( \f{v_{\e,j}'-v_{\e,i}'}{\e} \Big) \exp \Big( \f{v_{\e,j}-v_{\e,i}}{\e} \Big)\\
& -\f \e 2 \vp'' p_{\e,i}-\e \vp' p_{\e,i}'-2 p_{\e,i}\vp'v_{\e,i}'.
\end{array}
$$
Let's suppose that
$$
\max_{z\in \mathbb{R}} (P_{\e,1}(z), P_{\e,2}(z))=P_{\e,1}(z_0),\quad \text{for $z\in B_1(\xi)$.}
$$
Then, evaluating the equation on $P_{\e,1}$ at $z_0$ we obtain
$$
\e \vp(z_0) v_{\e,1}''^2 (z_0)\leq \f{\p}{\p z}R_1(z_0,N_{\e,i}) \vp(z_0) v_{\e,1}'(z_0) -\f \e 2 \vp'' (z_0) p_{\e,1}(z_0)-\e \vp' (z_0)p_{\e,1}'(z_0)-2 p_{\e,1} (z_0)\vp' (z_0) v_{\e,1}' (z_0).
$$
Using \eqref{vp} and $0=(\vp p_{\e,1})'(z_0)=\vp'(z_0) p_{\e,1}(z_0)+\vp(z_0) p_{\e,1}'(z_0)$, we obtain
$$
\e \vp(z_0) v_{\e,1}''^2 (z_0)\leq \f{\p}{\p z}R_1(z,N_{\e,1}) \vp(z_0) v_{\e,1}'(z_0)+\f{3C\e}{2} |v_{\e,1}' (z_0)|^2+2C \vp(z_0)^{\f12}|v_{\e,1}' (z_0)|^3.
$$
We deduce thanks to \eqref{sys-ve} and the above line that,
$$
\begin{array}{c}
\f{\vp(z_0)}{\e} \Big(|v_{\e,1}'(z_0)|^2 + R_1(z_0,N_{\e,1}) + m_2 \exp \big( \f{v_{\e,2}(z_0)-v_{\e,1}(z_0)}{\e} \big) -m_1 \Big)^2
\leq \\
\f{\p}{\p z}R_1(z,N_{\e,1}) \vp(z_0) v_{\e,1}'(z_0)+\f{3C\e}{2} |v_{\e,1}' (z_0)|^2+2C \vp(z_0)^{\f12}|v_{\e,1}' (z_0)|^3.
\end{array}
$$
Since $\xi\in K$, $R_1(z,N_{\e,1})$ and $\f{\p}{\p z}R_1(z,N_{\e,1})$ are bounded uniformly by a constant depending only on $K$. We thus deduce that there exists a constant $D=D(K)$ such that for all $\e\leq \e_0$ we have
$$
|v_{\e,1}'(z_0)|^2 \leq \f{D}{\vp(z_0)},
$$
which leads to
$$
P_{\e,1}(z_0) \leq D.
$$
Since $z_0$ was the maximum point of $P_{\e,i}$, we obtain that
$$
\vp(\xi) |v'_{\e,i}(\xi)|^2 =P_{\e,i}(\xi) \leq D.
$$
However, $\vp(\xi)=1$ and hence
$$
|v'_{\e,i}(\xi)| \leq \sqrt{D}.
$$
It is possible to do the above computations for any $\xi\in K$ and the above bound $\sqrt{D}$, depending only on $K$, will remain unchanged. We conclude that the families $(v_{\e,i})_\e$ are uniformly Lipschitz in $K$.\\
(v) The next step is to prove the convergence along subsequences of the families $(v_{\e,i})_\e$ to a viscosity solution of \eqref{HJ-v}. Note that thanks to the previous steps we know that the families $(v_{\e,i})_\e$ are locally uniformly bounded and Lipschitz. Therefore, from the Arzela-Ascoli Theorem, they converge along subsequences to functions $v_i \in \mathrm{C}(\mathbb{R})$. Moreover, we deduce from \eqref{v-Har} that $v_1=v_2=v$. The fact that $v$ is a viscosity solution to \eqref{HJ-v} can be derived using the method of perturbed test functions similarly to the proof of Theorem 1.1 in \cite{SM:12}.\\
(vi) We next prove \eqref{W-neg}. Let's suppose in the contrary that there exists $z_0\in \mathbb{R}$ such that $W(z_0,N_1,N_2)>0$. Then, there exists an interval $(a_0,b_0)$ such that $z_0 \in (a_0,b_0)$ and
$W(z,N_1,N_2)>0$ for $z\in (a_0,b_0)$. We then notice that $v$ being locally uniformly Lipschitz, is differentiable almost everywhere. Let's $z_1\in (a_0,b_0)$ be a differentiability point of $v$. Then from \eqref{HJ-u} we obtain that
$$
-|v' (z_1)|^2=W(z_1,N_1,N_2),
$$
which is a contradiction with the fact that $W(z_1,N_1,N_2)>0$.\\
(vii) Finally, we prove \eqref{bd-bel-N}. Note from the expression of $W(z,N_1,N_2)$ in \eqref{W} and from \eqref{as:r-m} that $0<\max \big(W(-\theta,0,0), W(\theta,0,0) \big)$. We assume, without loss of generality, that $0<W(-\theta,0,0)$. Therefore, there exists an interval $(a_1,b_1)$ with $-\theta\in (a_1,b_1)$ and $\overline\da$ such that
$$
0<W(z,N_1,N_2),\qquad \text{for all $N_1,N_2< \overline \da$, and $z\in (a_1,b_1)$}.
$$
We deduce from the above line and step (vi) that there exists $i\in \{1,2\}$ such that $N_i>\overline \da$. Without loss of generality, we suppose that $i=1$. From the fact that $(N_{\e,i})_\e$ converges to $N_i$ and from Proposition \ref{prop:Ne}-(iii) we obtain that there exists a compact set $K$ and a constant $\e_0>0$ such that
$$
\f{\overline \da}{2} \leq \int_K n_{\e,1}(z)dz, \qquad \text{for all $\e\leq \e_0$}.
$$
We then deduce from \ref{prop:Ne}-(ii) that
$$
\da:=\f{\overline \da}{2C_M(K)} \leq \int_K n_{\e,2}(z)dz \leq N_{\e,2}.
$$
This completes the proof of \eqref{bd-bel-N}.
\qed
\subsection{ Convergence to the demographic equilibrium of the ESS and consequences (the proof of Theorem \ref{thm:main}) }
\label{sec:HJ-unique}
We are now ready to prove Theorem \ref{thm:main}.\\
{\bf Proof of Theorem \ref{thm:main}.}
(i) We first prove the first part of the theorem. Note that we already proved in the previous section that as $\e\to 0$, $n_{\e,i}$ converges in the sense of measures to $n_i$ and $N_{\e,i}$ converges to $N_i$ such that $\int_\mathbb{R} n_i(z)dz= N_i$. Moreover, thanks to \eqref{supp-n} and \eqref{W-neg} we have
$$
W(z,N_1,N_2)=0,\quad \text{for $z\in \mathrm{supp} \,n_i$}\quad \text{and} ,\quad W(z,N_1,N_2)\leq 0, \quad \text{for $z\not\in \mathrm{supp}\, n_i$.}
$$
Furthermore, one can verify using \eqref{W} that $W$ can take its maximum only at one or two points and hence the support of $n_i$ contains only one or two points. This implies indeed that $ \mathrm{supp} \,n_i$ is indeed an ESS. We then deduce from the uniqueness of the ESS (see Theorem \ref{th:ESS}) that $n_i=n_i^*$ and $N_i=N_i^*$, for $i=1,2$ and $(n_1^*,n_2^*)$ the demographic equilibrium corresponding to the unique ESS. \\
(ii) The second part of Theorem \ref{thm:main} is immediate from it's first part and the previous subsection.\\
(iii) We first notice from part (i) that $\Omega= {\rm supp}\, n_1^*= {\rm supp}\, n_2^*$ is the unique ESS of the model. Moreover, from Corollary \ref{cor:deg} and under condition \eqref{non-deg} we obtain \eqref{Wneg} and consequently
$$
{\rm supp}\, n_1^*= {\rm supp}\, n_2^* = \{z\, |\, W(z,N_1^*,N_2^*)=0\}.
$$
The above equalities together with \eqref{supp-n} lead to \eqref{aubry}. It then remains to prove that the solution of \eqref{HJ}--\eqref{aubry} is unique. The uniqueness of $u$ indeed derives from the fact that any negative viscosity solution of \eqref{HJ} can be uniquely determined by its values at the maximum points of $W$ (\cite{PL:82}, Chapter 5). However, \eqref{aubry} implies that $u=0$ at such points and hence such solution is unique. \\
\noindent
Note indeed that restricting to a bounded domain $\mathcal O$ and following similar arguments as in \cite{PL:82}--Chapter 5, we obtain that a viscosity solution of \eqref{HJ} in the domain $\mathcal O$, verifies
$$
u(z)=\sup\, \{ L(y,z)+u(y)\, |\, \text{with $y$ a maximum point of $W(\cdot, N_1^*,N_2^*)$ or $y\in \p \mathcal O$}\},
$$
with
$$
\begin{array}{rl}
L(y,z)=\sup \, \{&- \int_0^T \sqrt{-W(\gamma(s),N_1^*,N_2^*) } \,ds \, |\, (T,\gamma) \text{ such that } \gamma(0)=y, \gamma(T)=z, \\
&|\f{d\gamma}{ds} |\leq 1, \, \text{a.e. in }[0,T], \; \gamma(t)\in \overline{\mathcal{O}},
\; \forall t \in [0,T]
\} .
\end{array}
$$
Although here we have an unbounded domain, the trajectories which come from infinity do not change the value of the solution since $u$ is negative and $W$ is strictly negative for $|z|$ large enough. This allows to conclude that the solution $u$ of \eqref{HJ} is indeed determined by its values at the maximum points of $W$. Note also that the above property is indeed a particular case of a property from the weak KAM theory, which is the fact that the viscosity solutions are completely determined by one value taken on each static class of the Aubry set \cite{GC:01}. \\
\section{A source and sink case}
\label{sec:sink}
In this section, we consider a particular case where there is migration only from one habitat to the other, that is
\begin{equation}
\label{as:sink}
m_1>0, \qquad m_2=0.
\end{equation}
We also assume that
\begin{equation}
\label{as:r1}
r_1-m_1>0.
\end{equation}
Following similar arguments to the case of migration in both directions, one can characterize the mutation, selection and migration equilibria. However, since the migration is only in one direction, we should study the equilibria in the two habitats separately. \\
\noindent
Note that since $m_2=0$, there is no influence of the second habitat on the first habitat. One can indeed compute explicitly $n_{\e,1}$:
\begin{equation}
\label{n1-sink}
n_{\e,1}(z)=\f{g_1^{\f 14}N_{\e,1}}{\sqrt{2\pi\e}}\, \exp \Big(-\f{\sqrt{g_1}(z+\theta)^2}{2\e} \Big),\qquad N_{\e,1}=\f{r_1-m_1-\e\sqrt{g_1}}{\kappa_1}.
\end{equation}
Note that as $\e\to 0$, $n_{\e,1}$ converges in the sense of measures to $n_1^{M*}$ with
$$
n_1^{M*}(z)=N_1^{M*} \da(z+\theta),\qquad N_1^{M*} = \f {r_1-m_1}{\kappa_1}.
$$
Here, $\{-\theta\}$ is indeed the unique ESS in the first habitat and $n_1^*$ corresponds to the demographic equilibrium at the ESS. \\
\noindent
In the second habitat however, there is an influence of the population coming from the first habitat. The natural quantity that appears in this case as the effective fitness in the second habitat is still the principal eigenvalue of \eqref{efitness} which is, in this case, given by
$$
\begin{array}{rl}
W(z,N_2)&=\max( r_1-g_1(z+\theta)^2-\kappa_1N_1^{M*}-m_1, r_2-g_2(z-\theta)^2-\kappa_2N_2)\\
& =\max( -g_1(z+\theta)^2 , r_2-g_2(z-\theta)^2-\kappa_2N_2).
\end{array}
$$
Then one can introduce the notion of the ESS for this habitat similarly to Section \ref{sec:ad}.
\subsection{The results in the adaptive dynamics framework }
We can indeed always identify the unique ESS:
\begin{theorem}
\label{th:ESS2}
Assume \eqref{as:sink}--\eqref{as:r1}. In each patch there exists a unique ESS. In patch $1$ the ESS is always monomorphic and it is given by $\{-\theta\}$ with the following demographic equilibrium:
\begin{equation}
\label{asdim-sink}
n_1^{M*}= N_1^{M*} \, \da(z+\theta),\quad N_1^{M*}=\f{r_{1}-m_1}{\kappa_1}.
\end{equation}
In patch $2$ there are two possibilities:\\
(i) the ESS is
dimorphic if and only if
\begin{equation}
\label{con-dim-source}
\f{m_1(r_{1}-m_1)}{\kappa_1} < \f{4g_2\theta^2 r_{2}}{\kappa_2}.
\end{equation}
The dimorphic ESS is given by $\{-\theta,\theta\}$ with the following demographic equilibrium:
$$
n_2^{D*}=\alpha \da(z+\theta)+\beta \da(z-\theta),\quad N_2^{D*}=\alpha+\beta= \f{r_{2}}{\kappa_2},
\quad
\alpha =\f{m_1(r_{1}-m_1)}{4g_2\theta^2 \kappa_1},\quad \beta =\f{r_{2}}{\kappa_2}-\f{m_1(r_{1}-m_1)}{4g_2\theta^2 \kappa_1}.
$$
(ii) If condition \eqref{con-dim-source} is not satisfied then the ESS in the second patch is monomorphic. The ESS is given by $\{-\theta\}$ with the following demographic equilibrium:
$$
n_2^{M*}= N_2^{*}\, \da(z+\theta),
\quad
N_2^{M*} = \f{1}{2\kappa_2}\Big( r_{2}-4g_2\theta^2
+\sqrt{ (r_{2}-4g_2\theta^2)^2 +4 \f{\kappa_2}{\kappa_1}m_1 (r_{1}-m_1) }
\Big).
$$
\end{theorem}
\noindent
The proof of the above theorem is not difficult and is left to the interested reader.
\subsection{The computation of the zero order term $u_2$}
We then proceed with the method presented in the introduction to characterize the evolutionary equilibrium $n_{\e,2}(z)$. To this end, we first identify the zero order term $u_2$ (introduced in \eqref{WKB}--\eqref{ap-ue}):
\begin{theorem}\label{thm:sink}
Assume \eqref{as:sink}--\eqref{as:r1}.
\\
(i) As $\e \to 0$, $(n_{\e,1}, n_{\e,2})$ converges to $(n_1^{M*},n_2^{*})$, the demographic equilibrium of the unique ESS of the metapopulation, given by Theorem \ref{th:ESS2}. Moreover, as $\e \to 0$, $(N_{\e,1}, N_{\e,2})$ converges to $(N_1^{M*},N_2^*)$, the total populations in patch $1$ and $2$ corresponding to this demographic equilibrium.
\\
(ii) As $\e\to 0$, $(u_{\e,2})_\e$ converges locally uniformly in $\mathbb{R}$ to $u_1(z) =- \f{\sqrt{g_1}}{2}(z+\theta)^2$.
As $\e\to 0$, $(u_{\e,2})_\e$ converges along subsequences and locally uniformly in $\mathbb{R}$ to a function $u_2\in \mathrm{C}(\mathbb{R})$ which satisfies
\begin{equation}
\label{HJ-source-2}
-| u_2'|^2\leq \max(R_1(z,N_1^{M*})-m_1, R_2(z,N_2^*)), \quad
-| u_2'|^2 \geq R_2(z,N_2^*),
\quad u_1(z) \leq u_2(z),
\quad \max_{z\in \mathbb{R}}u_2(z)=0,
\end{equation}
where the first two inequalities are in the viscosity sense. Moreover, we have the following condition on the zero level set of $u_2$:
\begin{equation}
\label{n2supp}
{\rm supp}\, n_2^*\subset \{z\, |\, u_2(z)=0 \} \subset \{z\, |\, \max(R_1(z,N_1^{M*})-m_1, R_2(z,N_2^*))=0\}.
\end{equation}
\end{theorem}
\noindent
{\bf Proof.} The proof of Theorem \ref{thm:sink} is close to the proof of Theorem \ref{thm:main}-(i) and (ii). We only provide the steps of the proof and discuss the main differences.\\
(i) We first notice that the convergence of $(n_{\e,1})_\e$, $(N_{\e,1})_\e$ and $(u_{\e,1})_\e$ is trivial from \eqref{n1-sink}.\\
\noindent
(ii) Following similar arguments as in Proposition \ref{prop:Ne}--(i) and (iii) we find that $N_{\e,2}$ is bounded from above and that $n_{\e,2}$ has small mass at infinity. Hence, as $\e\to 0$ and along subsequences, respectively $(n_{\e,2})_\e$ and $(N_{\e,2})_\e$ converges to $n_2$ and $N_2$ with $N_2=\int n_2(z)dz$.\\
\noindent
(iii) Note that since $m_2=0$, \eqref{Harnack} does not hold anymore but a weaker version of it still holds true. We can indeed obtain, following similar arguments and still referring to \cite{JB.MS:04}, Theorem 8.2, that for any compact set $K\subset \mathbb{R}$, there exists indeed a constant $C_M=C_M(K)$ such that, for all $\e\leq 1$,we have
\begin{equation}
\label{Harnack-sink}
n_{\e,1}(x) \leq C_M n_{\e,2}(y), \qquad \text{for}\quad |x-y|\leq \e.
\end{equation}
\noindent
(iv) We deduce from \eqref{Harnack-sink} and the fact that $n_{\e,1}$ has small mass at infinity, that there exists $\e_0$ such that, for all $\e\leq \e_0$, $N_{\e,2}$ is uniformly bounded from below by a positive constant.\\
\noindent
(v) Following similar arguments as in the proof of Proposition \ref{prop:ve} we obtain that there exists $\e_0>0$, such that for all $\e\leq \e_0$, $(u_{\e,2})_\e$ is locally uniformly bounded and Lipschitz. Therefore, as $\e\to 0$ and along subsequences, $(u_{\e,2})_\e$ converges to a function $u_2\in \mathrm{C}(\mathbb{R})$ such that $\max_{z\in \mathbb{R}}u_2(z)=0$. Moreover, from \eqref{Harnack-sink} we obtain that $u_1(z) \leq u_2(z)$, for all $z\in\mathbb{R}$.\\
\noindent
(vi) Note that $u_{\e,2}$ solves the following equation
\begin{equation}
\label{ue2}
-\e u_{\e,2}''=|u_{\e,2}'|^2+R_2(z,N_{\e,2}) + m_1 \exp \Big( \f{u_{\e,1}-u_{\e,2}}{\e} \Big).
\end{equation}
Passing to the limit as $\e\to 0$ and using the fact that the last term above is positive we obtain that
$$
-|u_{2}'|^2 \geq R_2(z,N_2),
$$
in the viscosity sense.
(vii) Next, we prove that
$$
-| u_2'|^2\leq\max(R_1(z,N_1^{M*})-m_1, R_2(z,N_2)).
$$
To this end, we consider two cases. Let's first suppose that $z_0$ is such that $u_2(z_0)=u_1(z_0)$. Moreover, let $\vp$ be a smooth test function such that $u_2-\vp$ has a local maximum at $z_0$. Then, since $u_1(z) \leq u_2(z)$, $u_1-\vp$ has also a local maximum at $z_0$ and hence
$$
-|\vp'(z_0) |^2\leq R_1(z,N_1^{M*})-m_1\leq \max(R_1(z,N_1^{M*} )-m_1, R_2(z,N_2)).
$$
Next we assume that $u_1(z_0) < u_2(z_0)$. In this case, as $\e\to 0$, the last term in \eqref{ue2} tends to $0$ at $z_0$ and hence
$$
-|u_2'(z_0) |^2\leq R_2(z,N_2) \leq \max(R_1(z,N_1^{M*} )-m_1, R_2(z,N_2)),
$$
in the viscosity sense.\\
(viii) We then prove \eqref{n2supp}. The fact that $ {\rm supp}\, n_2\subset \{z\, |\, u_2(z)=0 \}$ is immediate from \eqref{WKB}. To prove the second property, we first notice that, considering $0$ as a test function, $ -| u_2'|^2\leq\max(R_1(z,N_1)-m_1, R_2(z,N_2))$ implies that
$$
0 \leq \max(R_1(z,N_1^{M*} )-m_1, R_2(z,N_2)), \qquad \text{in $ \{z\, |\, u_2(z)=0 \}$.}
$$
Moreover, $-|u_{2}'|^2 \geq R_2(z,N_2)$, implies that $R_2(z,N_2)\leq 0$. We also know that $R_1(z,N_1^{M*} )-m_1\leq 0$. Hence, \eqref{n2supp}.
(ix) Finally, we deduce from the previous step that
$$
W(z,N_2)\leq 0, \text{ in $\mathbb{R}$}, \qquad W(z,N_2)=0, \text{ for $z\in {\rm supp}\, n_2$}.
$$
This means that ${\rm supp}\, n_2$ is an ESS and hence, thanks to Theroem \ref{th:ESS2}, we obtain that $n_2=n_2^*$ and $N_2=N_2^*$, where $n_2^*$ and $N_2^*$ are given by Theorem \ref{th:ESS2}. We then deduce in particular that the whole sequences $(n_{\e,2})_\e$ and $(N_{\e,2})_\e$ converge respectively to $n_2^*$ and $N_2^*$.
\qed
Theorem \ref{thm:sink} allows us to identify $u$ in a neighborhood of the ESS points:
\begin{prop}
\label{prop:expu-sink}
(i) There exists a connected and open set $\mathcal O_{\mathrm I}\subset \mathbb{R}$, with $-\theta\in \mathcal O_{\mathrm I}$, such that
$$
u_2(z)=-\f{\sqrt{g_1}}{2}(z+\theta)^2.
$$
(ii) Assume that \eqref{con-dim-source} holds. Then, there exists a connected and open set $\mathcal O_{\mathrm{II}}\subset \mathbb{R}$, with $\theta\in \mathcal O_{\mathrm{II}}$, such that
$$
u_2(z)=-\f{\sqrt{g_2}}{2}(z-\theta)^2.
$$
(iii) Assume that
\begin{equation}
\label{mrm}
\f{4g_2\theta^2 r_{2}}{\kappa_2}<\f{m_1(r_{1}-m_1)}{\kappa_1} .
\end{equation}
Then $u_2(\theta)<0$.
\end{prop}
Note that when $\f{m_1(r_{1}-m_1)}{\kappa_1} = \f{4g_2\theta^2 r_{2}}{\kappa_2}$ we don't know the value of $u_2(\theta)$. In particular, it can vanish. This is why we cannot provide an approximation of $n_{\e,2}$ in this degenerate case.
\\
\noindent
{\bf Proof of Proposition \ref{prop:expu-sink}.} (i) Note that using similar arguments as in the proof of Theorem \ref{thm:main}-(iii), where we used properties from the weak KAM theory, and using
$$
-|u_2'|^2 (z) \leq W(z;N_2^*)=\max(R_1(z,N_1^{M*} )-m_1, R_2(z,N_2^*))\leq 0, \quad u_2(z)\leq 0,
$$
which holds thanks to \eqref{HJ-source-2},
we obtain that
\begin{equation}
\label{u2leq}
u_2(z)\leq \max \Big( - |\int_{{\theta}}^{ z} \sqrt{- W(x; N_2^{*})} dx|
, - |\int_{-\theta}^{z} \sqrt{- W(x; N_2^{*})} dx |\Big).
\end{equation}
From the above inequality it is immediate that there exists a connected and open set $\mathcal O_{\mathrm I}\subset \mathbb{R}$, with $-\theta\in \mathcal O_{\mathrm I}$, such that
$$
u_2(z)\leq u_1(z)=-\f{\sqrt{g_1}}{2}(z+\theta)^2.
$$
Combining this with the third property in \eqref{HJ-source-2} we deduce the first claim of Proposition \ref{prop:expu-sink}.\\
\noindent
(ii) Note that under condition \eqref{con-dim-source} the ESS is dimorphic and that $\mathrm{supp} \, n_2^{D*}=\{-\theta,\theta\}$. Therefore, we deduce thanks to \eqref{n2supp} that
$u_2(\theta)=0$. This property combined with the second property in \eqref{HJ-source-2} implies that
$$
u_2(z) \geq -\f{\sqrt{g_2}}{2}(z-\theta)^2.
$$
The second claim of the theorem then follows from \eqref{u2leq}.\\
\noindent
(iii) Finally, we prove the third claim of the theorem. To this end, we assume that \eqref{mrm} holds, and hence the ESS in the second patch is monomorphic and given by $\{-\theta\}$, but $u_2(\theta)=0$. Note that similarly, to the case of migration in both directions, $u_2$ is a semiconvex function. Therefore it is differentiable at its maximum points and in particular at $\theta$. Hence, the first claim of \eqref{HJ-source-2} implies that
$$
0 \leq \max(R_1(\theta,N_1^{M*} )-m_1, R_2(\theta,N_2^{M*})) .
$$
However, this is in contradiction with \eqref{mrm}.
\qed
\subsection{Next order terms}
In this subsection we compute the next order terms in the approximation of $u_{\e,i}$ and $N_{\e,i}$:
$$
u_{\e,i}=u_i+\e v_i+\e^2w_i+o(\e^2),\qquad N_{\e,i}=N_i^*+\e K_i+O(\e^2).
$$
We first notice that, thanks to \eqref{n1-sink} we already know explicitly $u_{\e,1}$ and $N_{\e,1}$:
$$
u_{\e,1}= -\f{\sqrt{g_1}(z+\theta^2)}{2}+\e \log \Big( g_1^{\f14} \big(N_1^{M*}-\e\f{\sqrt{g_1}}{\kappa_1} \big)\Big),\quad N_{\e,1}=\f{r_1-m_1-\e\sqrt{g_1}}{\kappa_1},
$$
and hence
\begin{equation}
\label{v1-sink}
v_1\equiv \log \big( g_1^{\f 14}N_1^{M*} \big), \qquad w_1\equiv -\f{\sqrt{g_1}}{\kappa_1 N_1^{M*}},\qquad K_1=- \f{\sqrt{g_1}}{\kappa_1} .
\end{equation}
\noindent
We next compute $v_2$ and $w_2$ around the ESS points.
\noindent
We only present the method to compute $v_2$ and $w_2$ around $-\theta$, in the case where
$$
\f{m_1(r_{1}-m_1)}{\kappa_1} > \f{4g_2\theta^2 r_{2}}{\kappa_2},
$$
so that the ESS is monomorphic and is given by $\{-\theta\}$. The dimorphic case, where \eqref{con-dim-source} is satisfies, can be analyzed following similar arguments. We recall that in the degenerate case where $\f{m_1(r_{1}-m_1)}{\kappa_1} = \f{4g_2\theta^2 r_{2}}{\kappa_2},$ we don't provide an approximation of $n_{\e,2}$. \\
\noindent
To compute $v_2$, we keep the zero order terms in \eqref{ue2} in $\mathcal O_I$ and using \eqref{v1-sink} we obtain
$$
v_2(z)=\log \Big(\f{m_1g_1^{\f 14}N_1^{M*}}{-g_1(z+\theta)^2+g_2(z-\theta)^2-r_2+\kappa_2 N_2^{M*}} \Big),\quad \text{for $z\in \mathcal O_I$}.
$$
Similarly to Section \ref{sec:vw} we write a Taylor expansion for $v_2$ around $-\theta$:
$$
v_2(z)=v_2(-\theta)+D_2(z+\theta)+ E_2 (z+\theta)^2+O(z+\theta)^3,\quad \text{with } v_2(-\theta)=\log (g_1^{\f14} N_2^{M*}),
$$
and we define $w_2(-\theta)=F_2$. Note that $D_2$ and $E_2$ are known thanks to the explicit computation of $v_2(z)$ given above.
Similarly to Section \ref{sec:vw}, keeping the first order terms in $\f{1}{\sqrt{2\pi\e}}\int_{\mathcal I} \exp \big( \f{u_{\e,2}(z)}{\e} \big)dz$ we obtain that
\begin{equation}
\label{K2-sink}
K_2=N_2^{M*}\big( \f{E_2+0.5D_2^2}{\sqrt{g_1}}+F_2 \big).
\end{equation}
Moreover, keeping the first order terms in \eqref{ue2} in $\mathcal O_I$ we obtain that
\begin{equation}
\label{w2-sink}
\sqrt g_1= -2\sqrt{g_1} (z+\theta) v_2'-\kappa_2K_2 + m_1 \f{N_1^{M*}}{N_2^{M*}}(w_1-w_2).
\end{equation}
We evaluate the above equation at $-\theta$ to obtain
$$
F_2=-\f{\sqrt {g_1}}{\kappa_1 N_1^{M*}}-\f{N_2^{M*}}{m_1N_1^{M*}} \big( \sqrt{g_1}+\kappa_2K_2 \big).
$$
One can then compute $K_2$ and $F_2$ combining the above equation with \eqref{K2-sink}. Note finally that, once $K_2$ is known, one can compute $w_2$ in $\mathcal I$ thanks to \eqref{w2-sink}.
\section*{Acknowledgements}
The author is immensely thankful to Sylvain Gandon for introducing the biological motivations to her and for determining the biological directions of this work. This article is a part of a project that we derived together with the objective of introducing the presented method to the biological community.
The author is also grateful for partial funding from the European Research Council (ERC) under the European Union's Horizon 2020 research and innovation programme (grant agreement No 639638), held by Vincent Calvez, and from the french ANR projects KIBORD ANR-13-BS01-0004 and MODEVOL ANR-13-JS01-0009.
\bibliographystyle{plain}
|
{
"redpajama_set_name": "RedPajamaArXiv"
}
| 6,878
|
These fully submersible headphones provide excellent audio for all weather conditions and underwater use. Ideal for wading at the beach, or detecting in streams. Made for the Minelab SDC 2300 metal detector.
Waterproof up to to 3 meters. Ideal for wading at the beach, or detecting in streams.
Compatible with the Minelab SDC 2300 metal detector.
|
{
"redpajama_set_name": "RedPajamaC4"
}
| 4,884
|
package org.drools.mvel.integrationtests;
import org.assertj.core.api.Assertions;
import org.junit.Test;
import org.kie.api.KieBase;
import org.kie.api.KieServices;
import org.kie.api.runtime.KieContainer;
/**
* Tests KIE package compilation when there is a XSD resource (BZ 1120972) - manifests only when using
* KieClasspathContainer.
*/
public class XSDResourceTest {
@Test
public void testXSDResourceNotBreakingCompilation() {
final KieContainer kcontainer = KieServices.Factory.get().getKieClasspathContainer();
final KieBase kieBase = kcontainer.getKieBase("xsdKieBase");
Assertions.assertThat(kieBase).as("Created KieBase with XSD should not be null").isNotNull();
}
}
|
{
"redpajama_set_name": "RedPajamaGithub"
}
| 8,596
|
{"url":"https:\/\/tolstoy.newcastle.edu.au\/R\/e13\/help\/11\/03\/7973.html","text":"# Re: [R] Generating repeated measures data\n\nFrom: Michael Dewey <info_at_aghmed.fsnet.co.uk>\nDate: Sat, 19 Mar 2011 14:02:50 +0000\n\nAt 00:37 19\/03\/2011, John Sorkin wrote:\n>How would one generate data to be used in a simulation of a repeated\n>measures ANOVA given a known (1) within-person correlation with\n>known (2) mean and SD of data obtained at each of three times of observation?\n\nYou do not say which distribution you want them to have but for normal the best choice seems to be to load MASS and use rmvtnorm.\n\nGenerating multivariate datasets from distributions other than the normal\ncan be more challenging.\nIn \\R contributed packages provide the following among others: \\begin{description}\n\\item[\\pkg{corcount}]\nPoisson, negative binomial, zero--inflated versions \\item[\\pkg{binarySimCLF}]\nGenerates binary variables, see \\citet{qaqish03} for details\n\\item[\\pkg{bindat}]\nGenerates binary by thresholding normal\n\\item[\\pkg{mvtBinaryEP}]\nBinary\n\\item[\\pkg{sn}]\nSkew normal and skew $t$\n\\end{description}\n\nApologies for all the LaTeX but I fear if I try to edit it I will delete something crucial.\n\n>Thanks,\n>John\n>John Sorkin\n>Chief Biostatistics and Informatics\n>Univ. of Maryland School of Medicine\n>Division of Gerontology and Geriatric Medicine\n>JSorkin_at_grecc.umaryland.edu\n>Confidentiality Statement:\n>This email message, including any attachments, is for t...{{dropped:6}}\n\nR-help_at_r-project.org mailing list\nhttps:\/\/stat.ethz.ch\/mailman\/listinfo\/r-help PLEASE do read the posting guide http:\/\/www.R-project.org\/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Sat 19 Mar 2011 - 14:06:14 GMT\n\nArchive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.\nArchive generated by hypermail 2.2.0, at Sat 19 Mar 2011 - 14:40:23 GMT.\n\nMailing list information is available at https:\/\/stat.ethz.ch\/mailman\/listinfo\/r-help. Please read the posting guide before posting to the list.","date":"2020-06-06 18:22:13","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 1, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 0, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.2322724312543869, \"perplexity\": 8078.887338955064}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2020-24\/segments\/1590348517506.81\/warc\/CC-MAIN-20200606155701-20200606185701-00504.warc.gz\"}"}
| null | null |
Q: deleting node from BST not working with std::pair I have a Binary Search Tree which is made up of Nodes containing City objects. I am trying to implement deleteCity(string cityName) and deleteCity(double GPScoord1, double GPScoord2) functions which delete the City Node which matches either the city string or 2 GPS double coordinates.
Currently the deleteCity by CityName string works fine, although deleteCity by coordinates doesn't delete the matching node. Can anyone see why?
using namespace std;
#include <utility>
#include <iostream>
class City
{
//friend class TreeNode;
friend class BinaryTree;
private:
string name;
pair<double, double> cityCoords;
int population;
double tempAvg;
public:
City(string, pair<double, double>, int, double);
string getName();
pair<double, double> getCityCoords();
int getPopulation();
double getTempAvg();
friend ostream& operator<<(ostream&, City& c);
};
City::City(string n, pair<double, double> coords, int pop, double temp)
{
name = n;
cityCoords = coords;
population = pop;
tempAvg = temp;
}
string City::getName()
{
return name;
}
pair<double, double> City::getCityCoords()
{
return cityCoords;
}
int City::getPopulation()
{
return population;
}
double City::getTempAvg()
{
return tempAvg;
}
ostream& operator<<(ostream& out, City& c)
{
out << "City: " << c.getName() << "\nCoordinates: " << c.getCityCoords().first
<< ", " << c.getCityCoords().second << "\nPopulation: "
<< c.getPopulation() << "\nAverage Yearly Temp: " << c.getTempAvg() << "\n";
return out;
}
class TreeNode
{
friend class BinaryTree;
//is leaf
private:
City city;
TreeNode* left, * right;
TreeNode(City *theCity);
public:
bool isLeaf();
City getCity();
};
TreeNode::TreeNode(City *theCity) : city(*theCity), left(nullptr), right(nullptr)
{
}
City TreeNode::getCity()
{
return city;
}
class BinaryTree
{
public:
BinaryTree();
~BinaryTree();
void add(City *city);
int height();
TreeNode minValue();
void printTreeAscending() const;
void deleteNode(string name);
void deleteNode(double lat, double lon);
private:
static void add(TreeNode* toAdd, City *city);
static int height(TreeNode* root);
static TreeNode minValue(TreeNode* node);
static void printTreeAscending(TreeNode* root);
TreeNode* minValueNode(TreeNode* node);
TreeNode* deleteNode(TreeNode* node, string name);
TreeNode* deleteNode(TreeNode*& node, pair<double, double>coords);
TreeNode* rootPtr;
};
BinaryTree::BinaryTree() : rootPtr(nullptr)
{
}
BinaryTree::~BinaryTree()
{
delete rootPtr;
}
void BinaryTree::add(City *city)
{
if (rootPtr)
{
add(rootPtr, city);
}
else
{
rootPtr = new TreeNode(city);
}
}
void BinaryTree::add(TreeNode* toAdd, City *city)
{
if (city->getName() < toAdd->city.getName())
{
if (toAdd->left)
{
add(toAdd->left, city);
}
else
{
toAdd->left = new TreeNode(city);
}
}
else {
if (toAdd->right) {
add(toAdd->right, city);
}
else {
toAdd->right = new TreeNode(city);
}
}
}
int BinaryTree::height()
{
return height(rootPtr);
}
//as per spec, returns -1 if null tree, 0 if only 1 node,
// and 1 if there is 2 levels of nodes etc.
int BinaryTree::height(TreeNode* node)
{
if (!node)
{
return -1;
}
else
{
int leftSide = height(node->left);
int rightSide = height(node->right);
if (leftSide > rightSide)
{
return(leftSide + 1);
}
else
{
return (rightSide + 1);
}
}
}
TreeNode BinaryTree::minValue()
{
return minValue(rootPtr);
}
TreeNode BinaryTree::minValue(TreeNode* node)
{
if (node->left == nullptr) {
return *node;
}
minValue(node->left);
}
void BinaryTree::printTreeAscending() const
{
printTreeAscending(rootPtr);
std::cout << "\n";
}
//uses In-order traversal **
//got some help on cpp forums
void BinaryTree::printTreeAscending(TreeNode* root)
{
if (root)
{
printTreeAscending(root->left);
(root->left && root->right);
cout << root->city << "\n";
printTreeAscending(root->right);
}
}
bool isLeaf()
{
if (left == nullptr && right == nullptr)
{
return true;
}
else
return false;
}
TreeNode* BinaryTree::minValueNode(TreeNode* node)
{
TreeNode* current = node;
/* loop down to find the leftmost leaf */
while (current && current->left != NULL)
current = current->left;
return current;
}
//Delete City Node by City Name
void BinaryTree::deleteNode(string name) {
deleteNode(rootPtr, name);
}
//Method found below at https://www.geeksforgeeks.org/binary-search-tree-set-2-delete/
TreeNode* BinaryTree::deleteNode(TreeNode* node, string name)
{
if (node == NULL) return node;
// If the key to be deleted is smaller than the root's key,
// then it lies in left subtree
if (name < node->city.name)
node->left = deleteNode(node->left, name);
// If the key to be deleted is greater than the node's key,
// then it lies in right subtree
else if (name > node->city.name)
node->right = deleteNode(node->right, name);
// if key is same as node's key, then This is the node
// to be deleted
else
{
// node with only one child or no child
if (node->left == NULL)
{
TreeNode* temp = node->right;
free(node);
return temp;
}
else if (node->right == NULL)
{
TreeNode* temp = node->left;
free(node);
return temp;
}
// node with two children: Get the inorder successor (smallest
// in the right subtree)
TreeNode* temp = minValueNode(node->right);
// Copy the inorder successor's content to this node
node->city = temp->city;
// Delete the inorder successor
node->right = deleteNode(node->right, temp->city.name);
}
return node;
}
//delete City Node by City Coordinates
void BinaryTree::deleteNode(double lat, double lon) {
deleteNode(rootPtr, pair<double, double>(lat, lon));
}
//Method found below at https://www.geeksforgeeks.org/binary-search-tree-set-2-delete/
TreeNode* BinaryTree::deleteNode(TreeNode*& node, pair<double, double> coordinates)
{
if (node == NULL) return node;
// If the key to be deleted is smaller than the root's key,
// then it lies in left subtree
if (coordinates < node->city.cityCoords)
node->left = deleteNode(node->left, coordinates);
// If the key to be deleted is greater than the node's key,
// then it lies in right subtree
else if (coordinates > node->city.cityCoords)
node->right = deleteNode(node->right, coordinates);
// if key is same as node's key, then This is the node
// to be deleted
else
{
// node with only one child or no child
if (node->left == NULL)
{
TreeNode* temp = node->right;
free(node);
return temp;
}
else if (node->right == NULL)
{
TreeNode* temp = node->left;
free(node);
return temp;
}
// node with two children: Get the inorder successor (smallest
// in the right subtree)
TreeNode* temp = minValueNode(node->right);
// Copy the inorder successor's content to this node
node->city = temp->city;
// Delete the inorder successor
node->right = deleteNode(node->right, temp->city.cityCoords);
}
return node;
}
int main()
{
City london = City("London", pair<double, double> (10.0, 40.9), 900000, 5.0);
City dublin = City("Dublin", pair<double, double>(19.0, 70.95), 20000, 4.5);
City madrid = City("Madrid", pair<double, double>(80.8, 100.2), 2131200, 21.0);
City paris = City("Paris", pair<double, double>(20.6, 164.1), 804400, 11.0);
City lisbon = City("Lisbon", pair<double, double>(49.2, 70.9), 76000, 20.0);
BinaryTree* tree = new BinaryTree();
City* londonPtr = &london;
City* dublinPtr = &dublin;
City* madridPtr = &madrid;
City* parisPtr = &paris;
City* lisbonPtr = &lisbon;
tree->add(londonPtr);
tree->add(dublinPtr);
tree->add(madridPtr);
tree->add(parisPtr);
tree->add(lisbonPtr);
cout << "Tree Height: " << tree->height() << "\n\n";
//tree->deleteNode("London");
tree->deleteNode(19.0, 70.95);
tree->printTreeAscending();
return 0;
}
A: Your add function is adding Nodes to the BST according to the name as a key.
That's how you are searching for the Node to delete, when provided a name.
However, when provided co-ordinates, you are searching by using cityCoords as a key. That's not possible. You'll need to search all branches to find the Node to delete.
This is where the issue comes from. The comment is wrong. The code that follows it is wrong as well, although it agrees with the comment.
// If the key to be deleted is smaller than the root's key,
// then it lies in left subtree
if (coordinates < node->city.cityCoords)
node->left = deleteNode(node->left, coordinates);
|
{
"redpajama_set_name": "RedPajamaStackExchange"
}
| 4,528
|
Q: Trouble Installing React as an App within Django I am using this tutorial to install React for the front with an API built in Django.
https://sweetcode.io/how-use-djang-react-ap/
My repository for this projects so far is here:
https://github.com/AlexMercedCoder/DjangoReactCRM
I am at the point in the tutorial where you install react by running "npm run dev"
This is the error I get and no tinkering with the relative file page seems to fix it:
> webpack --mode development ./frontend/src/components/index.jsx --output
./frontend/static/frontend/main.js
Insufficient number of arguments or no entry found.
Alternatively, run 'webpack(-cli) --help' for usage info.
Hash: 097c83a63f327afef15a
Version: webpack 4.39.3
Time: 80ms
Built at: 09/07/2019 4:16:05 PM
ERROR in Entry module not found: Error: Can't resolve
'./frontend/src/components/index.jsx' in
'C:\Users\alexm\projects\DjangoReactCRM\drcrm'
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! drcrm@1.0.0 dev: `webpack --mode development
./frontend/src/components/index.jsx --output
./frontend/static/frontend/main.js`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the drcrm@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely
additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\alexm\AppData\Roaming\npm-cache\_logs\2019-09-
07T20_16_05_497Z-debug.log
A: As the error states, you don't have a file called ./frontend/src/components/index.jsx in your project - https://github.com/AlexMercedCoder/DjangoReactCRM/tree/master/frontend/src/components. It is index.js instead.
So, in your package.json, change the script to be:
webpack --mode development ./frontend/src/components/index.js --output ./frontend/static/frontend/main.js
|
{
"redpajama_set_name": "RedPajamaStackExchange"
}
| 5,703
|
<?php
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
$console = new Application('My Silex Application', 'n/a');
$console->getDefinition()->addOption(new InputOption('--env', '-e', InputOption::VALUE_REQUIRED, 'The Environment name.', 'dev'));
$console->setDispatcher($app['dispatcher']);
$console
->register('comicvine:import')
->setDescription('Import data from comic vine')
->setCode(function (InputInterface $input, OutputInterface $output) use ($app) {
$output->writeln('Fetching characters');
$characters = $app['comicvine.facemash']->getCharacters();
$output->writeln(sprintf('Fetched %d characters', sizeof($characters)));
foreach ($characters as $character) {
$output->writeln(sprintf('Fetched Character <info>%s</info>', $character->name));
$exists = $app['db']->fetchAssoc('SELECT * FROM `characters` WHERE id = ?', array((int) $character->id));
if (false === $exists) {
$output->writeln("\t> Character does not exist in database: inserting");
$affected = $app['db']->insert('characters', [
'id' => $character->id,
'image' => $character->getImage(),
'name' => $character->name,
'description' => $character->description,
]);
$output->writeln("\t> Character succesfully inserted");
} else {
$output->writeln("\t> Character exists in database: updating");
$affected = $app['db']->update('characters', [
'image' => $character->getImage(),
'name' => $character->name,
'description' => $character->description,
], [
'id' => $character->id
]);
$output->writeln("\t> Character succesfully updated");
}
}
})
;
return $console;
|
{
"redpajama_set_name": "RedPajamaGithub"
}
| 3,281
|
FactoryBot.define do
factory :prefix_filter do
end
end
|
{
"redpajama_set_name": "RedPajamaGithub"
}
| 3,265
|
drum compound microscope
Classification: Microscope
optics, biology, microscopy,
Maker: Georges Oberhaeuser (1798 - 1868)
Owner: Louis Agassiz (1807 - 1873)
27 x 13 x 10.5 cm (10 5/8 x 5 1/8 x 4 1/8 in.)
box: 13 x 19.5 x 32 cm (5 1/8 x 7 11/16 x 12 5/8 in.)
wood, brass,
Accessories: objective (11); diaphragm (3); all in stamped leather box; 1 ocular; mahogany box (not original).
Das Mikroskop: Theorie, Gebrauch, Geschichte
A large drum microscope with two rack and pinion sets, one for coarse focus and one for varying tube length. The latter must be the "Grossissement variable." The lead-filled base has a square opening for illuminating the flat/concave substage mirror rotatable only about a horizontal axis. The stage and upper parts of the stand can be rotated on the base. A vertical pillar holds an arm and the tubes, but there is no fine focus provided.
Small, wooden box covered in stamped-leather box holds the objectives and diaphragms in a wooden insert. Lid lined in ivory silk.
Flat mahogany box to hold the microscope and accessories is a replacement. It is the style of Nachet boxes. Brass handle and plate on top is inscribed with a doctor's name.
Exhibit 2008--More than Meets the Eye
SignedGeorges / Oberhaeuser, / breveté, / Place Dauphine, 19, / Paris.
Inscribedon arm: Microscope / achromatique, / à / Grossissements / variables.
on rim of base: No. 1194.
on replacement box: Dr. R. M. / Hodges.
Historical AttributesOwned and used by Louis Agassiz in his study of jellyfish.
In May 1849, Agassiz presented an account of observations he made with this microscope on the nervous system in jellyfish. His claim that coelenterates (jellyfish and their relatives) possess a nervous system was met with scepticism, and he retracted his findings in 1862. His original observations were later proved correct.
Mackie, "Louis Agassiz," discusses Agassiz's microscopy with an Oberhaeuser compound microscope, with attention to particular objectives he used and what these could have resolved.
Curatorial RemarksSee file for description of some restoration, and a detailed sketch by E. Gay of an Oberhaeuser he apparently restored for Mrs. Marie Prince Jones of South Hamilton. It was also owned by Agassiz and looks like fig. 287 in Harting. It had a fine focus mechanism but no racks and pinions, like this one.
According to Dr. Lewis's notes, the dates of purchase and manufacture of this microscope are unknown. However, from Harting, Lib. 735, p. 703 one can estimate a probable date of 1845-46.
Follow up on Mackie (see published references) by testing the objectives.
Photographs of Louis Agassiz (1998-1-0934) show a similar but not identical Oberhaeuser drum microscope on the table.
Primary SourcesPieter Harting, Das Mikroskop (Braunschweig: Friedrich Vieweg und Sohn, 1859), fig. 287.
Louis Agassiz, "Contributions to the Natural History of the Acalephae of North America. Part I. On the naked-eyed medusae of the shores of Massachusetts, in their perfect state of development" Memoirs of the American Academy of Arts and Sciences, new ser., 4, no. 2 (1850): 221-316, plates 1-8.
ProvenanceLouis Agassiz, purchase circa 1846; Ernst-Lewis Collection, 5/18/36.
Published ReferencesG. O. Mackie, "Louis Agassiz and the Discovery of the Coelenterate Nervous System," Hist. Phil. Life Sci. 11 (1989): 71-78.
|
{
"redpajama_set_name": "RedPajamaCommonCrawl"
}
| 4,604
|
{"url":"https:\/\/ccssmathanswers.com\/eureka-math-precalculus-module-3-lesson-10\/","text":"# Eureka Math Precalculus Module 3 Lesson 10 Answer Key\n\n## Engage NY Eureka Math Precalculus Module 3 Lesson 10 Answer Key\n\n### Eureka Math Precalculus Module 3 Lesson 10 Exercise Answer Key\n\nOpening Exercise\na. Add the fractions: $$\\frac{3}{5}$$ + $$\\frac{2}{7}$$.\nAnswer:\n$$\\frac{3}{5}$$ + $$\\frac{2}{7}$$ = $$\\frac{3}{5}$$ \u2219 $$\\frac{7}{7}$$ + $$\\frac{2}{7}$$ \u2219 $$\\frac{5}{5}$$ = $$\\frac{21}{35}$$ + $$\\frac{10}{35}$$ = $$\\frac{31}{35}$$\n\nb. Subtract the fractions: $$\\frac{5}{2}$$ \u2013 $$\\frac{4}{3}$$.\nAnswer:\n$$\\frac{5}{2}$$ \u2013 $$\\frac{4}{3}$$ = $$\\frac{5}{2}$$ \u2219 $$\\frac{3}{3}$$ \u2013 $$\\frac{4}{3}$$ \u2219 $$\\frac{2}{2}$$ = $$\\frac{15}{6}$$ \u2013 $$\\frac{8}{6}$$ = $$\\frac{7}{6}$$\n\nc. Add the expressions: $$\\frac{3}{x}$$ + $$\\frac{x}{5}$$.\nAnswer:\n$$\\frac{3}{x}$$ + $$\\frac{x}{5}$$ = $$\\frac{3}{x}$$ \u2219 $$\\frac{5}{5}$$ + $$\\frac{x}{5}$$ \u2219 $$\\frac{x}{x}$$ = $$\\frac{15}{5 x}$$ + $$\\frac{x^{2}}{5 x}$$ = $$\\frac{15 + x^{2}}{5 x}$$\n\nd. Subtract the expressions: $$\\frac{x}{x + 2}$$ \u2013 $$\\frac{3}{x + 1}$$.\nAnswer:\n$$\\frac{x}{x + 2}$$ \u2013 $$\\frac{3}{x + 1}$$ = $$\\frac{x}{x + 2}$$ \u2219 $$\\frac{x + 1}{x + 1}$$ \u2013 $$\\frac{3}{x + 1}$$ \u2219 $$\\frac{x + 2}{x + 2}$$ = $$\\frac{x^{2} + x}{(x + 2)(x + 1)}$$ \u2013 $$\\frac{3 x + 6}{(x + 1)(x + 2)}$$ = $$\\frac{\\left(x^{2} + x\\right) \u2013 (3 x + 6)}{(x + 2)(x + 1)}$$ = $$\\frac{x^{2} \u2013 2 x \u2013 6}{(x + 2)(x + 1)}$$\n\nExercises\nExercise 1.\nConstruct an argument that shows that the set of rational numbers is closed under addition. That is, if x and y are rational numbers and w = x + y, prove that w must also be a rational number.\nAnswer:\nSince x and y are rational numbers, there are four integers, a, b, c, and d, with x = $$\\frac{a}{b}$$ and y = $$\\frac{c}{d}$$, and neither b nor d is 0.\nNow we need to check to see if w is a rational number:\nw = x + y = $$\\frac{a}{b}$$ + $$\\frac{c}{d}$$ = $$\\frac{a}{b}$$ \u2219 $$\\frac{d}{d}$$ + $$\\frac{c}{d}$$ \u2219 $$\\frac{b}{b}$$ = $$\\frac{ad + cb}{bd}$$\nThe numerator is formed by multiplying and adding integers, so it must be an integer. Similarly, the denominator must be an integer. Lastly, bd cannot be 0 since neither b nor d is 0. This proves that w is a rational number.\n\nExercise 2.\nHow could you modify your argument to show that the set of rational numbers is also closed under subtraction? Discuss your response with another student.\nAnswer:\nThis time, we start with $$\\frac{a}{b}$$ \u2013 $$\\frac{c}{d}$$ and end up with $$\\frac{ad \u2013 cb}{bd}$$. We just notice that subtracting two integers yields an integer and then apply the same reasoning as before.\n\nExercise 3.\nMultiply the fractions: $$\\frac{2}{5}$$ \u2219 $$\\frac{3}{4}$$.\nAnswer:\n$$\\frac{2}{5}$$ \u2219 $$\\frac{3}{4}$$ = $$\\frac{6}{20}$$\n\nExercise 4.\nDivide the fractions: $$\\frac{2}{5}$$ \u00f7 $$\\frac{3}{4}$$.\nAnswer:\n$$\\frac{2}{5}$$ \u00f7 $$\\frac{3}{4}$$ = $$\\frac{2}{5}$$ \u2219 $$\\frac{4}{3}$$ = $$\\frac{8}{15}$$\n\nExercise 5.\nMultiply the expressions: $$\\frac{x + 1}{x + 2}$$ \u2219 $$\\frac{3x}{x \u2013 4}$$.\nAnswer:\n$$\\frac{x + 1}{x + 2}$$ \u2219 $$\\frac{3x}{x \u2013 4}$$ = $$\\frac{(x + 1) \\cdot 3 x}{(x + 2)(x \u2013 4)}$$\n\nExercise 6.\nDivide the expressions: $$\\frac{x + 1}{x + 2}$$ \u00f7 $$\\frac{3x}{x \u2013 4}$$.\nAnswer:\n$$\\frac{x + 1}{x + 2}$$ \u00f7 $$\\frac{3x}{x \u2013 4}$$ = $$\\frac{x + 1}{x + 2}$$ \u2219 $$\\frac{x \u2013 4}{3x}$$ = $$\\frac{(x + 1)(x \u2013 4)}{(x + 2) \\cdot 3 x}$$\n\nExercise 7.\nConstruct an argument that shows that the set of rational numbers is closed under division. That is, if x and y are rational numbers (with y nonzero) and w = $$\\frac{x}{y}$$, prove that w must also be a rational number.\nAnswer:\nLet x = $$\\frac{a}{b}$$ and let y = $$\\frac{c}{d}$$, with both b and d nonzero.\n$$\\frac{a}{b}$$ \u00f7 $$\\frac{c}{d}$$ = $$\\frac{a}{b}$$ \u2219 $$\\frac{d}{c}$$ = $$\\frac{ad}{bc}$$\nThis is indeed a rational number. Thus, the set of rational numbers is closed under division by a nonzero number.\n\nExercise 8.\nHow could you modify your argument to show that the set of rational expressions is also closed under division by a nonzero rational expression? Discuss your response with another student.\nAnswer:\nThe only change is that a, b, c, and d represent polynomials rather than integers. The numerator and denominator of the quotient are polynomials because they both represent the product of polynomials, and polynomials are closed under multiplication. This means that the quotient is a ratio of polynomials, which fits our definition of a rational expression.\n\n### Eureka Math Precalculus Module 3 Lesson 10 Problem Set Answer Key\n\nQuestion 1.\nGiven $$\\frac{x + 1}{x \u2013 2}$$ and $$\\frac{x \u2013 1}{x^{2} \u2013 4}$$, show that performing the following operations results in another rational expression.\na. Addition\nAnswer:\n$$\\frac{x + 1}{x \u2013 2}$$ + $$\\frac{x \u2013 1}{x^{2} \u2013 4}$$ = $$\\frac{x^{2} + 3 x + 2 + x \u2013 1}{x^{2} \u2013 4}$$ = $$\\frac{x^{2} + 4 x + 1}{x^{2} \u2013 4}$$\n\nb. Subtraction\nAnswer:\n$$\\frac{x + 1}{x \u2013 2}$$ \u2013 $$\\frac{x \u2013 1}{x^{2} \u2013 4}$$ = $$\\frac{x^{2} + 3 x + 2 \u2013 x + 1}{x^{2} \u2013 4}$$ = $$\\frac{x^{2} + 2 x + 3}{x^{2} \u2013 4}$$\n\nc. Multiplication\nAnswer:\n$$\\frac{x + 1}{x \u2013 2}$$ \u2219 $$\\frac{x \u2013 1}{x^{2} \u2013 4}$$ = $$\\frac{x^{2} \u2013 1}{(x \u2013 2)\\left(x^{2} \u2013 4\\right)}$$\n\nd. Division\nAnswer:\n$$\\frac{x + 1}{x \u2013 2}$$ \u00f7 $$\\frac{x \u2013 1}{x^{2} \u2013 4}$$ = $$\\frac{x^{2} + 3 x + 2}{x \u2013 1}$$\n\nQuestion 2.\nFind two rational expressions $$\\frac{a}{b}$$ and $$\\frac{c}{d}$$ that produce the result $$\\frac{x \u2013 1}{x^{2}}$$ when using the following operations. Answers for each type of operation may vary. Justify your answers.\na. Addition\nAnswer:\n$$\\frac{x}{x^{2}}$$ + $$\\frac{ \u2013 1}{x^{2}}$$ = $$\\frac{x \u2013 1}{x^{2}}$$\n\nb. Subtraction\nAnswer:\n$$\\frac{x}{x^{2}}$$ \u2013 $$\\frac{1}{x^{2}}$$ = $$\\frac{x \u2013 1}{x^{2}}$$\n\nc. Multiplication\nAnswer:\n$$\\frac{1}{x}$$ \u2219 $$\\frac{x \u2013 1}{x}$$ = $$\\frac{x \u2013 1}{x^{2}}$$\n\nd. Division\nAnswer:\n$$\\frac{1}{x}$$ \u00f7 $$\\frac{x}{x \u2013 1}$$ = $$\\frac{x \u2013 1}{x^{2}}$$\n\nQuestion 3.\nFind two rational expressions $$\\frac{a}{b}$$ and $$\\frac{c}{d}$$ that produce the result $$\\frac{2 x + 2}{x^{2} \u2013 x}$$ when using the following operations. Answers for each type of operation may vary. Justify your answers.\na. Addition\nAnswer:\n$$\\frac{2 x}{x^{2} \u2013 x}$$ + $$\\frac{2}{x^{2} \u2013 x}$$ = $$\\frac{2 x + 2}{x^{2} \u2013 x}$$\n\nb. Subtraction\nAnswer:\n$$\\frac{2 x}{x^{2} \u2013 x}$$ \u2013 $$\\frac{ \u2013 2}{x^{2} \u2013 x}$$ = $$\\frac{2 x + 2}{x^{2} \u2013 x}$$\n\nc. Multiplication\nAnswer:\n$$\\frac{2}{x}$$ \u2219 $$\\frac{x + 1}{x \u2013 1}$$ = $$\\frac{2 x + 2}{x^{2} \u2013 x}$$\n\nd. Division\nAnswer:\n$$\\frac{2}{x}$$ \u00f7 $$\\frac{x \u2013 1}{x + 1}$$ = $$\\frac{2 x + 2}{x^{2} \u2013 x}$$\n\nQuestion 4.\nConsider the rational expressions A, B and their quotient, $$\\frac{A}{B}$$, where B is not equal to zero.\na. For some rational expression C, does $$\\frac{AC}{BC}$$ = $$\\frac{A}{B}$$?\nAnswer:\nWhenever C\u22600, $$\\frac{AC}{BC}$$ = $$\\frac{A}{B}$$.\n\nb. Let A = $$\\frac{x}{y}$$ + $$\\frac{1}{x}$$ and B = $$\\frac{y}{x}$$ + $$\\frac{1}{y}$$. What is the least common denominator of every term of each expression?\nAnswer:\nxy\n\nc. Find AC, BC where C is equal to your result in part (b). Then, find $$\\frac{AC}{BC}$$. Simplify your answer.\nAnswer:\nAC = x2 + y\nBC = y2 + x\n$$\\frac{AC}{BC}$$ = $$\\frac{x^{2} + y}{y^{2} + x}$$\n\nd. Express each rational expression A, B as a single rational term, that is, as a division between two polynomials.\nAnswer:\nA = $$\\frac{x^{2} + y}{x y}$$\nB = $$\\frac{y^{2} + x}{x y}$$\n\ne. Write $$\\frac{A}{B}$$ as a multiplication problem.\nAnswer:\n$$\\frac{A}{B}$$ = A \u2219 $$\\frac{1}{B}$$\n\nf. Use your answers to parts (d) and (e) to simplify $$\\frac{A}{B}$$.\nAnswer:\n$$\\frac{A}{B}$$ = $$\\frac{x^{2}+y}{x y}$$ \u2219 $$\\frac{x y}{y^{2}+x}$$\n= $$\\frac{x^{2}+y}{y^{2}+x}$$\n\ng. Summarize your findings. Which method do you prefer using to simplify rational expressions?\nAnswer:\nWe can simplify complex rational expressions by either multiplying both the numerators and denominators by the least common denominator, or we can use the fact that division by a number is multiplication by its reciprocal. Answers may vary on preference.\n\nQuestion 5.\nSimplify the following rational expressions.\na. $$\\frac{\\frac{1}{y} \u2013 \\frac{1}{x}}{\\frac{x}{y} \u2013 \\frac{y}{x}}$$\nAnswer:\n$$\\frac{\\frac{1}{y} \u2013 \\frac{1}{x}}{\\frac{x}{y} \u2013 \\frac{y}{x}}$$ = $$\\frac{\\frac{x \u2013 y}{x y}}{\\frac{x^{2} \u2013 y^{2}}{x y}}$$ = $$\\frac{1}{x + y}$$\n\nb. $$\\frac{\\frac{1}{x} + \\frac{1}{y}}{\\frac{1}{x^{2}} \u2013 \\frac{1}{y^{2}}}$$\nAnswer:\n$$\\frac{\\frac{1}{x} + \\frac{1}{y}}{\\frac{1}{x^{2}} \u2013 \\frac{1}{y^{2}}}$$ = $$\\frac{1}{\\frac{1}{x} \u2013 \\frac{1}{y}}$$ = $$\\frac{x y}{y \u2013 x}$$\n\nc. $$\\frac{\\frac{1}{x^{4}} \u2013 \\frac{1}{y^{2}}}{\\frac{1}{x^{4}} + \\frac{2}{x^{2} y} + \\frac{1}{y^{2}}}$$\nAnswer:\n\nd. $$\\frac{\\frac{1}{x \u2013 1} \u2013 \\frac{1}{x}}{\\frac{1}{x \u2013 1} + \\frac{1}{x}}$$\nAnswer:\n$$\\frac{\\frac{x \u2013 x + 1}{(x \u2013 1) x}}{\\frac{x + x \u2013 1}{(x \u2013 1) x}}$$ = $$\\frac{1}{2 x \u2013 1}$$\n\nQuestion 6.\nFind A and B that make the equation true. Verify your results.\na. $$\\frac{A}{x + 1}$$ + $$\\frac{B}{x \u2013 1}$$ = $$\\frac{2}{x^{2} \u2013 1}$$\nAnswer:\n$$\\frac{A(x \u2013 1) + B(x + 1)}{(x + 1)(x \u2013 1)}$$ = $$\\frac{2}{(x + 1)(x \u2013 1)}$$\nTherefore,\nA(x \u2013 1) + B(x + 1) = 2.\nLet x = 1, A = \u2013 1\nLet x = \u2013 1, B = 1\n\u2013 $$\\frac{1}{x + 1}$$ + $$\\frac{1}{x \u2013 1}$$ = $$\\frac{2}{x^{2} \u2013 1}$$\n\nb. $$\\frac{A}{x + 3}$$ + $$\\frac{B}{x + 2}$$ = $$\\frac{2 x \u2013 1}{x^{2} + 5 x + 6}$$\nAnswer:\n$$\\frac{A(x + 2) + B(x + 3)}{(x + 3)(x + 2)}$$ = $$\\frac{2 x \u2013 1}{(x + 3)(x + 2)}$$\nTherefore,\nA(x + 2) + B(x + 3) = 2x \u2013 1.\nLet x = \u2013 3, A = 7\nLet x = \u2013 2, B = \u2013 5\n$$\\frac{7}{x + 3}$$ \u2013 $$\\frac{5}{x + 2}$$ = $$\\frac{2 x \u2013 1}{x^{2} + 5 x + 6}$$\n\nQuestion 7.\nFind A, B, and C that make the equation true. Verify your result.\n$$\\frac{A x + B}{x^{2} + 1}$$ + $$\\frac{C}{x + 2}$$ = $$\\frac{x \u2013 1}{\\left(x^{2} + 1\\right)(x + 2)}$$\nAnswer:\n$$\\frac{A x + B}{x^{2} + 1}$$ + $$\\frac{C}{x + 2}$$ = $$\\frac{x \u2013 1}{\\left(x^{2} + 1\\right)(x + 2)}$$, (Ax + B)(x + 2) + C(x2 + 1) = x \u2013 1,\nAx2 + 2Ax + Bx + 2B + Cx2 + C = x \u2013 1\nTherefore,\nA + C = 0, 2A + B = 1\nand 2B + C = \u2013 1.\nA = $$\\frac{3}{5}$$, B = \u2013 $$\\frac{1}{5}$$, C = \u2013 $$\\frac{3}{5}$$\n$$\\frac{\\frac{3}{5} x \u2013 \\frac{1}{5}}{x^{2} + 1}$$ + $$\\frac{ \u2013 \\frac{3}{5}}{x + 2}$$ = $$\\frac{x \u2013 1}{\\left(x^{2} + 1\\right)(x + 2)}$$\n\n### Eureka Math Precalculus Module 3 Lesson 10 Exit Ticket Answer Key\n\nQuestion 1.\nPayton says that rational expressions are not closed under addition, subtraction, multiplication, or division. His claim is shown below. Is he correct for each case? Justify your answers.\na. $$\\frac{x}{2x + 1}$$ + $$\\frac{x + 1}{2x + 1}$$ = 1, and 1 is a whole number, not a rational expression.\nAnswer:\nNo, he is not correct. $$\\frac{x}{2x + 1}$$ + $$\\frac{x + 1}{2x + 1}$$ = $$\\frac{2x + 1}{2x + 1}$$ The numerator and denominator are both polynomials.\n\nb. $$\\frac{3x \u2013 1}{2x + 1}$$ \u2013 $$\\frac{3x \u2013 1}{2x + 1}$$ = 0, and 0 is a whole number, not a rational expression.\nAnswer:\nNo, he is not correct. 0 = $$\\frac{0}{1}$$ The numerator and denominator are both polynomials since integers are an example of polynomials.\n\nc. $$\\frac{x \u2013 1}{x + 1}$$ \u2219 $$\\frac{x + 1}{1}$$ = x \u2013 1, and x \u2013 1 is a whole number, not a rational expression.\nAnswer:\nNo, he is not correct. $$\\frac{x \u2013 1}{x + 1}$$\u22c5$$\\frac{x + 1}{x \u2013 1}$$ = $$\\frac{x^{2} \u2013 1}{x + 1}$$ The numerator and denominator are both polynomials.\n\nd. $$\\frac{x \u2013 1}{x + 1}$$ \u00f7 $$\\frac{1}{x + 1}$$ = x \u2013 1, and x \u2013 1 is a whole number, not a rational expression.\nAnswer:\nNo, he is not correct. $$\\frac{x \u2013 1}{x + 1}$$ \u00f7 $$\\frac{1}{x + 1}$$ = $$\\frac{x^{2} \u2013 1}{x + 1}$$ The numerator and denominator are both polynomials.\n\nQuestion 2.\nSimplify the following rational expressions by rewriting them with a single polynomial denominator.\na. $$\\frac{3}{x \u2013 1}$$ + $$\\frac{2}{x}$$\nAnswer:\n$$\\frac{5 x \u2013 2}{x^{2} \u2013 x}$$\n\nb. $$\\frac{2}{x \u2013 2}$$ \u2013 $$\\frac{3}{x}$$\nAnswer:\n$$\\frac{ \u2013 x + 6}{x^{2} \u2013 2 x}$$\n\nc. $$\\frac{x + 1}{x \u2013 1}$$ \u2219 $$\\frac{x}{x \u2013 1}$$\nAnswer:\n$$\\frac{x^{2} + x}{(x \u2013 1)^{2}}$$\n\nd. $$\\frac{x + 2}{x \u2013 1}$$ \u00f7 $$\\frac{x \u2013 2}{x^{2} \u2013 1}$$\nAnswer:\n$$\\frac{x^{2} + 3 x + 2}{x \u2013 2}$$\n\nScroll to Top","date":"2023-02-01 16:45:07","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 0, \"mathjax_display_tex\": 1, \"mathjax_asciimath\": 0, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.7754517197608948, \"perplexity\": 666.9939295038691}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": false}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2023-06\/segments\/1674764499946.80\/warc\/CC-MAIN-20230201144459-20230201174459-00486.warc.gz\"}"}
| null | null |
Franz Thaler (6 March 1925 in Sarntal – 29 October 2015) was an author from South Tyrol, a peacock quill embroiderer and a survivor of the concentration camp in Dachau and satellite camp in Hersbruck.
In 1939 his father decided in the South Tyrol Option Agreement that his family should remain Italian citizens and should not adopt German nationality. As a consequence his family was harassed and isolated: Thaler was no longer allowed to attend school. In 1944, at the age of 19, he was called up to do military service in the German Wehrmacht, despite his Italian nationality. At first he went into hiding for several months, but finally gave himself up when his family was threatened with reprisals. Thaler received a sentence of 10 years' imprisonment in Dachau concentration camp from a military court.
In December 1944 he was taken to Dachau and then, in the same month, to Hersbruck, a subsidiary camp of Flossenbürg concentration camp, where he then had to do hard labour. He was later brought back to Dachau. On 29 April 1945 the concentration camp in Dachau was liberated by American troops. He, and many of his fellow inmates, were forced to march to a camp in France, where they were finally set free.
When he returned home in August 1945, he began to write down his experiences, which appeared in book form in 1989. Thaler continued to work as a quill embroiderer and silversmith in Sarntal up to his retirement.
Thaler's memoir, Unvergessen (Unforgotten), was an important catalyst in initiating, and contributing to, the discussion of what happened in South Tyrol during the Nazi era. In 1997 he received the Order of Merit of the Land of Tyrol, in 2010 he was awarded the honorary citizenship of Bolzano, and in 2013 he was chosen, together with Nazi opponent and victim, Josef Mayr-Nusser, by the South Tyrolian Society for Political Science as Political Personality of the Year. He turned 90 years old on 6 March 2015, shortly before the anniversary of the Liberation of Dachau on 29 April 2015. Thaler died in October 2015.
In 2016, his daughters donated his papers to the Civic Archives in Bozen-Bolzano.
Publications
Unvergessen. Option, KZ, Kriegsgefangenschaft, Heimkehr. Ein Sarner erzählt. Edition Raetia, Bozen 1999, .
Dimenticare mai: opzioni, campo di concentramento di Dachau, prigioniero di guerra, ritorno a casa. Übersetzung von Peter Litturi, Vorwort von Carlo Romeo, Zeitleiste von Leopold Steurer, Edition Raetia, Bozen 1990,
Unforgotten: a Memoir of Dachau, translated with a foreword by Paul Crichton and Christl Kiener, Kiener Press, London-München 2011,
References
External links
Italian artists
Italian male writers
Flossenbürg concentration camp survivors
Dachau concentration camp survivors
People from Sarntal
1925 births
2015 deaths
|
{
"redpajama_set_name": "RedPajamaWikipedia"
}
| 9,587
|
Aston Villa vs Leicester City
Wed 8/02/2023
Aston Villa vs Leicester City Betting Odds 4 Feb, 2023 15:00
The 1x2 market sees Aston Villa ranked as favourite by the bookies. The best odds to back a Aston Villa win are priced at 1/1 with Unibet. One can expect a probability of 50% for this bet to succeed. Bet £10.00 and win £20.20.
A draw is a great option to back in the correct score market. The best odds of 23/4 with Unibet for this type of bet are excellent. It is 15% likely to succeed. A punter with a £10.00 stake will get £67.50 back.
The DNB market is quite an attractive option for a game involving Aston Villa. The best odds to back Aston Villa in the draw no bet market are at 7/15 with Betsson, which has 68% chance of success. Bet £10.00 and get £14.70 on success.
Both teams will surely do a great job here. Most bookmakers think that both teams will score one goal or more. The best odds for the BTTS market are 4/5 at Unibet. Bet £10.00 and get £18.20 back. This has a 55% chance of success.
Any Other Score
Red Card Given
Match Result and Both Teams to Score
Aston Villa can be picked in the match result and also have both teams to score. The best odds to bet on Aston Villa in the both teams to score and win market are at 31/10 with Betsson. Bet £10.00 and get £41.00. The chance of success is at 24%.
The game will be played on 4 February 2023 with a 15:00 kick off time in the Premier League.
Where can you live stream Aston Villa vs Leicester City
If you are a registered member, you can stream the game live and watch the match between Aston Villa and Leicester City from the following bookmakers with their live stream online service:
Match Betting Odds
Aston Villa find themselves ranked number 55 in the World Team Rankings whilst Leicester City are 85 meaning both teams come into the game with a high profile following. The odds for the game make Aston Villa at 1/1 with Unibet with the draw priced at 14/5 with Unibet and Leicester City coming in at 17/6 thanks to Betsson. The correct score line in the game to finish 1-1 can be taken at 23/4 with Unibet which may go against the match winner market favourite but does offer strong options. Both teams to score often throughs up a real opportunity and none more so than in this game, for each side to strike and for the result to coincide with the correct score market you can get a best price 4/5 with Unibet. For a clean ninety minutes, you can get odds of 1/10 with Unibet for no red card to be shown throughout the game.
|
{
"redpajama_set_name": "RedPajamaCommonCrawl"
}
| 9,853
|
{"url":"https:\/\/physics.stackexchange.com\/questions\/235175\/successor-to-copenhagen-interpretation-as-orthodox-interpreation-of-quantum-mech","text":"Successor to Copenhagen Interpretation as Orthodox Interpreation of Quantum Mechanics\n\nFirst, I read the questions FAQ for this and I hope this does not violate the rules. I am not asking for personal opinion, but for observations of hard evidence of trends on this subject.\n\nWhen I studied QM, as a senior in my physics curriculum, the Copenhagen Interpretation was the orthodoxy. It did what most scientists needed: consistently correlated very well with measurements. Of course, it was not perfect as an end-to-end description of what happens; for example, there was the so-called measurement problem. However, I imagine that it retained popularity, at least partly, because anything that was more end-to-end oriented, for instance addressing or side-stepping wave function collapse, was more complicated and didn't predict anything new that could be confirmed.\n\nHowever, many years have passed. Other interpretations have emerged, such as Consistent Histories combined with Decoherence. Some are certainly very insightful and have a lot of value in their own right.\n\nI am wondering if you are seeing any of those alternatives to Copenhagen really gaining traction\/popularity, among physicists, above all the others, and a trend toward a real shift away from Copenhagen as the standard orthodoxy that is passed down in senior and first-year grad texts to new students?\n\nIf this question is too fluffy, I will gladly withdraw it, or feel free to close it. Again, I am asking for objective observations of a trend away from Copenhagen, toward some specific alternative, not your personal opinion of which interpretation is \"best\".\n\n\u2022 Comments are not for extended discussion (which I sense coming on); this conversation has been moved to chat. \u2013\u00a0David Z Feb 11 '16 at 4:43\n\u2022 By \"Copenhagen interpretation\" do you mean the idea that the wave function represents a single objective reality and that it collapses when human beings measure the system? Some subset of that sentence? Help me out here. \u2013\u00a0DanielSank Feb 11 '16 at 7:31\n\u2022 @DanielSank: Is that what they are teaching as Copenhagen interpretation these days? Really? \u2013\u00a0CuriousOne Feb 11 '16 at 7:35\n\u2022 @CuriousOne I asked the question in an attempt to understand what OP has in mind. I never got anything resembling a definition of \"Copenhagen interpretation\" when I was in school. My suggested definition in the previous comment is what I think it means based on what folks seem to have in mind when they use that phrase. Again, I asked because I don't know. \u2013\u00a0DanielSank Feb 11 '16 at 7:42\n\u2022 Wikipedia: \"According to the interpretation, the interaction of an observer or apparatus that is external to the quantum system is the cause of wave function collapse, thus according to Paul Davies, \"reality is in the observations, not in the electron\"\". The biggest differentiator is probably the unique role of the observer, compared to most other interpretations. Another hallmark is the proposal of wave function collapse with measurement, but no mechanism for wave function collapse. Also, it separates the classical (apparatus) from the quantum realm, but with no clear dividing line. \u2013\u00a0David Feb 11 '16 at 15:23\n\nA 2013 poll involving 33 specialists at a quantum foundations meeting gave 42% for Copenhagen, 28% for information-based interpretations, 18% for Everett.\n\nOnly 15% of the specialists thought that the measurement problem is solved by decoherence.\n\nI would say there is more freedom in thinking about the meaning of concepts in quantum theory now than it was in the cold war era. New interpretations were proposed and are discussed and new papers are published on this subject.\n\nIf we asked all physicists, including experimenters, which interpretation they prefer I would say most would not even know what the different interpretations are about, but I think most would prefer to stick with the minimal, shortest, least pretentious approach one can infer from the university courses - it is a mathematical scheme that has been successful predicting probabilities of results of many experiments, discovering new laws etc. but with no implication on the reality of $\\psi$ function, operators or anything. I think this is quite close to Copenhagen, so when pressed, those people would probably vote for Copenhagen.\n\nIf we asked people who study this for a living, I think greater percentage of votes would go to newfangled interpretations, like the Bohm - de Broglie and the fundamentalist interpretation (Universe=big $\\psi$) and others. There were some polls but they were quite limited in the number of participants and had differing results, so the most popular one among experts is not known.\n\nThe measurement problem was more or less solved in the 1970s\/80s by von Neumann's theory of measurement, the density matrix and decoherence, which explain the Born rule, which is the one thing that is actually perplexing about the Copenhagen interpretation. The basic principles behind measurement and decoherence had been understood intuitively since 1929 when Mott published a paper explaining alpha particle tracks using wave mechanics, so what remained left to do was to establish a theoretical framework for these sporadic calculations that had been done almost in parallel with the formulation of quantum mechanics.\n\nIn this sense there is no need for non-trivial changes to the Copenhagen interpretation (or for new interpretations in general) as the \"problems\" that came with it have fairly natural and straight forward solutions within the same framework in which Copenhagen is useful.\n\nI would also point out that physics proper hasn't cared about the foundations of QM since the 1930s. It has long (since the mid 1930s) moved on to quantum field theory and I would suggest you do, too. QFT offers a more self-consistent picture of the world than non-relativistic quantum mechanics can, and that removes a lot of the \"burning\" questions that seem to be part of the Copenhagen interpretation for many who are new to QM.\n\n\u2022 I have never seen anything that explains the Born rule. Without more explanation here I think the statement that Von Neumann's theory explains it is incorrect. Second, I disagree that Copenhagen has no material problems; see Wigner's friend. Finally, the statement that \"physics proper\" (whatever that means, and I doubt it means anything well defined) is incorrect. People still do improved versions of Bell violation experiments and publish them in physics journals. By what other metric can we possibly define \"physics proper\"? \u2013\u00a0DanielSank Feb 11 '16 at 7:46\n\u2022 @DanielSank: The density matrix formalism explains the Born rule. You are welcome to write an answer why you think it doesn't. Any extension of Schroedinger's cat that doesn't fix its shortcomings (and there are nothing else in it than shortcomings as far as I am concerned) isn't even worth considering. In any case, those things are all poor philosophy, they aren't physics. Physics proper is the science that finds explanations for new observations. Having said that, I am not saying that there isn't interesting stuff there... interpretations are just not the right stuff. \u2013\u00a0CuriousOne Feb 11 '16 at 7:52\n\u2022 @DanielSank: Bell is not physics, it's philosophy posing for natural science. \u2013\u00a0CuriousOne Feb 11 '16 at 7:53\n\u2022 \"I would also point out that physics proper hasn't cared about the foundations of QM since the 1930s\"? Well, given the 1-2 foundational papers that are put on the arXiv almost every day, that really seems to be a debatable statement. Whether me or you or whoever else consider these works as \"nothing but philosophy\" does not change the fact that there are still lots of people actively working on foundational issues. QFT is another matter entirely, and a lot of work on QM has nothing to do with QFT (see e.g. the whole of quantum information) \u2013\u00a0glS Mar 7 '16 at 22:02\n\u2022 And that is just another opinion added to the mix. As I said, I may or may not agree with you in this, but to say that the physics community has moved along and does not care anymore about the foundations of QM is simply not backed up by the reality. No, the fact that something is published on the arxiv certainly does not make it true or worthy of read, but neither you can speak on behalf of the whole community saying that it is a fact that \"nothing new ever emerges\". I think you are confusing what you wish people were doing with what is actually actively studied. \u2013\u00a0glS Mar 7 '16 at 22:29","date":"2019-07-17 14:30:58","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 1, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 0, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.5025948286056519, \"perplexity\": 705.6174307405623}, \"config\": {\"markdown_headings\": false, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2019-30\/segments\/1563195525312.3\/warc\/CC-MAIN-20190717141631-20190717163631-00166.warc.gz\"}"}
| null | null |
Q: Draw a surface and its normal vector Draw the surface and its normal vector.
I want to insert a similar image in latex, how should I draw such a schematic?
What tools should I use to draw similar diagrams?
It may be used frequently in differential geometry and topology.
|
{
"redpajama_set_name": "RedPajamaStackExchange"
}
| 6,730
|
\section{Introduction}
This paper studies a general form of the sparse recovery problem, where our goal is to estimate
a certain signal ${\bar{\beta}}_*$ from observations.
We are especially interested in solving this problem using convex programming; that is,
given a convex set $\Omega$,
our estimator ${\hat{\beta}}$ is obtained from the following regularized minimization problem:
\begin{equation}
{\hat{\beta}}= \arg\min_{\beta \in \Omega} \left[ L(\beta) + R(\beta) \right] . \label{eq:hbeta}
\end{equation}
Here $L(\beta)$ is a loss function, which measures how closely $\beta$ matches the observation;
and $R(\beta)$ is a regularizer, which captures the structure of ${\bar{\beta}}_*$.
Note that the theory developed in this paper does not need to assume that
${\bar{\beta}}_* \in \Omega$ although this is certainly a desirable property (especially if we would like to recover
${\bar{\beta}}_*$ without error).
Our primary interest is in the case where $\Omega$ lives in an Euclidean space ${\bar\Omega}$.
However, our analysis holds automatically when $\Omega$ is contained in a separable Banach
space ${\bar\Omega}$, and both $L(\cdot)$ and $R(\cdot)$ are convex functions that are
defined in the whole space ${\bar\Omega}$, both inside and outside of $\Omega$.
As an example, assume that ${\bar{\beta}}_*$ is a
$p$ dimensional vector: ${\bar{\beta}}_* \in {\mathbb{R}}^p$; we observe a vector
$y \in {\mathbb{R}}^n$ and an $n \times p$ matrix $X$ such that
\[
y=X {\bar{\beta}}_* + \text{noise}.
\]
We are interested in estimating ${\bar{\beta}}_*$ from the noisy
observation $y$. However, in modern applications we are mainly interested in
the high dimensional situation where $p \gg n$.
Since there are more variables than the number of observations, traditional statistical methods such as
least squares regression will suffer from the so-called curse-of-dimensionality problem.
To remedy the problem, it is necessary to impose structures on ${\bar{\beta}}_*$; and a popular assumption is
sparsity. That is $\|{\bar{\beta}}_*\|_0=|{\mathrm{supp}}({\bar{\beta}}_*)|$ is smaller than $n$, where
${\mathrm{supp}}(\beta) = \{j: \beta_j \neq 0\}$.
A direct formulation of sparsity constraint leads to the nonconvex $\ell_0$ regularization formulation,
which is difficult to solve. A frequent remedy is to employ the so-called {\em convex relaxation}
approach,
where the $\ell_0$ regularization is replaced by an $\ell_1$ regularizer $R(\beta)=\lambda \|\beta\|_1$
that is convex. If we further consider the least squares loss $L(\beta)=\|y - X\beta\|_2^2$, then
we obtain the following $\ell_1$ regularization method (Lasso)
\begin{equation}
{\hat{\beta}}=\arg\min_{\beta \in {\mathbb{R}}^p} \left[ \|y-X\beta\|_2^2 + \lambda \|\beta\|_1 \right] , \label{eq:L1}
\end{equation}
where $\Omega$ is chosen to be the whole parameter space ${\bar\Omega}={\mathbb{R}}^p$.
\section{Related Work}
In sparse recovery analysis, we want to know how good is our estimator ${\hat{\beta}}$ in comparison
to the target ${\bar{\beta}}_*$. Consider the standard $\ell_1$ regularization method (\ref{eq:L1}),
two types of theoretical questions are of interests.
The first is support recovery; that is, whether ${\mathrm{supp}}({\hat{\beta}}) = {\mathrm{supp}}({\bar{\beta}}_*)$.
The second is parameter estimation; that is, how small is $\|{\hat{\beta}}-{\bar{\beta}}_*\|_2^2$.
The support recovery problem is often studied under the so-called {\em irrepresentable condition}
(some types also referred more generally as coherence condition)
\cite{MeinshausenB06,Tropp06,ZhaoYu06,Wainwright09},
while the parameter estimation problem is often studied under the so-called {\em restricted isometry property} (or RIP) as well as its generalizations \cite{CandesTao07,ZhangHuang08,BickelRT09,ZhangT09,vandeGeerB09,YeZ10}.
Related ideas have been extended to more complex structured sparse regularization problems
such as group sparsity \cite{HuangZhang09,LMTG09} and certain matrix problems \cite{KoTsLo10,NegaWain10,KoltchinskiiLT11}.
Closely related to parameter estimation is the so-called {\em oracle inequality}, which is particularly suitable for the dual-certificate
analysis considered here.
This paper is interested in the second question of parameter estimation, and the related problem of sparse oracle inequality.
Our goal is to present a general theoretical framework
using the notation of dual certificate to analyze sparse regularization problems such as the standard
Lasso (\ref{eq:L1}) as well as its generalization to more complex structured sparsity problems in (\ref{eq:hbeta}).
We note that there were already some recent attempts in developing such a general theory
such as \cite{NeRaWaYu10} and \cite{ChRePaWi10}, but both have limitations.
In particular the technique of \cite{ChRePaWi10} only applies to noise-less regression problems with Gaussian random design
(its main contribution is the nice observation that Gordon's minimum singular value result can be applied to structured sparse recovery problems; the consequences will be further investigated in our paper); results in
\cite{ChRePaWi10} are subsumed by our more general results given in Section~\ref{sec:gordon}.
The analysis in \cite{NeRaWaYu10} relied on a direct generalization of RIP for decomposable regularizers which has technical limitations in its applications to more complex structured problems such as matrix regularization:
the technique of RIP-like analysis and its generalization such as \cite{KoTsLo10,NegaWain10} gives performance bounds that do not imply exact recovery even when the noise is zero, while the technique we investigate here (via the notation of dual certificate) can get exact recovery \cite{CandesT09,Recht09}. In addition, not all regularizers can be easily considered as decomposable (for example, the mixed norm example in Section~\ref{sec:mixed-norm} is not). Even for Gaussian random design, the complexity statement in
Section~\ref{sec:gordon} replies only on Gaussian width calculation that is more general than decomposable.
Therefore our analysis in this paper extends those of \cite{NeRaWaYu10} in multiple ways.
While the notation of dual certificate has been successfully employed
in some earlier work (especially for some matrix regularization problems) such as
\cite{Recht09,CaLiMaWr11,HsKaTz11-robust}, these results focused on special problems without
a general theory. In fact, from earlier work it is not even clear what should be a
general definition of dual certificate for structured sparsity formulation (\ref{eq:hbeta}).
This paper addresses this issue. Specifically we will provide a general definition of dual certificate
for the regularized estimation problem (\ref{eq:hbeta}) and demonstrate that this definition
can be used to develop a theoretical framework to analyze the sparse recovery performance of ${\hat{\beta}}$
with noise. Not only does it provide a direct generalization of earlier work such as
\cite{Recht09,CaLiMaWr11,HsKaTz11-robust}, but also it unifies RIP type analysis (or its generalization to restricted strong convexity) such as \cite{CandesTao07,NeRaWaYu10} and irrepresentable (or incoherence) conditions such as \cite{ZhaoYu06,Wainwright09}.
In this regard the general theory also includes as special cases some recent work by Candes and Plan that tried to develop non-RIP analysis for $\ell_1$ regularization \cite{CandesPlan09,CandesPlan11}. In fact, even for the simple case of $\ell_1$ regularization, we show that our theory can lead to new and sharper results than existing ones.
Finally, we would like to point out that while this paper successfully unifies the irrepresentable (or incoherence) conditions and RIP conditions under the general method of dual certificate, our analysis does not subsume some of the more elaborated analysis such as \cite{ZhangT09} and \cite{YeZ10} as special case. Those studies employed a different generalization of RIP which we may refer to as the {\em invertibility factor} approach using
the terminology of \cite{YeZ10}. It thus remains open whether it is possible to develop an even more general theory that can include all previous sparse recovery analysis as special cases.
\section{Primal-Dual Certificate}
As mentioned before, while fragments of the dual certificate idea has appeared before,
there are so far no general definition and theory. Therefore in this section we will introduce
a formal definition that can be used to analyze (\ref{eq:hbeta}).
Recall that the parameter space $\Omega$ lives in a separable Banach space ${\bar\Omega}$.
Let ${\bar\Omega}^*$ be the dual Banach space of ${\bar\Omega}$ containing all continuous
linear functions $u(\beta)$ defined on ${\bar\Omega}$. We use $\innerprod{u}{\beta} = u(\beta)$
to denote the bi-linear function defined on ${\bar\Omega}^*\times {\bar\Omega}$.
If ${\bar\Omega}$ is an Euclidean space, then $\innerprod{\cdot}{\cdot}$ is just an
inner product. In this notation $\innerprod{\cdot}{\cdot}$, the first argument is always in
the dual space ${\bar\Omega}^*$ and the second in the primal space ${\bar\Omega}$.
This allows as to keep track of the geometrical interpretation of our analysis even when
${\bar\Omega}$ is an Euclidean or Hilbert space with ${\bar\Omega}^*={\bar\Omega}$.
In what follows, we will endow ${\bar\Omega}^*$ with the weak topology: $u_k\to u$ iff
$\innerprod{u_k-u}{\beta}\to 0$ for all $\beta\in{\bar\Omega}$. This is equivalent to
$\|u_k-u\|_D\to 0$ for any norm $\|\cdot\|_D$ in ${\bar\Omega}^*$ when ${\bar\Omega}$ is
an Euclidean space.
In the following, given any convex function $\phi(\cdot)$,
we use the notation $\nabla \phi(\beta)\in\Omega^*$ to
denote a subgradient of $\phi(\beta)$ with respect to the geometry of ${\bar\Omega}$
in the following sense:
\[
\phi(\beta') \geq \phi(\beta) + \innerprod{\nabla \phi(\beta)}{\beta'-\beta},\ \forall\ \beta'.
\]
By convention, we also use
$\partial \phi(\beta)$ to denote its sub-differential (or the set of subgradient at $\beta$).
The sub-differential is always a closed convex set in ${\bar\Omega}^*$.
Moreover, we define the Bregman divergence with respect to $\phi$ as:
\[
D_\phi(\beta,\beta')=\phi(\beta)-\phi(\beta')- \innerprod{\nabla \phi(\beta')}{\beta-\beta'} .
\]
Clearly, by the definition of sub-gradient, Bregman divergence is non-negative.
These quantities are standard in convex analysis; for example,
additional details can be found in \cite{Roc70}.
Instead of working directly with the target ${\bar{\beta}}_*$, we consider an approximation
${\bar{\beta}} \in \Omega$ of ${\bar{\beta}}_*$, which may have certain nice properties that will become clear later on.
Nevertheless, for the purpose of understanding the main idea, it may be convenient to
simply assume that ${\bar{\beta}}={\bar{\beta}}_*$ (thus ${\bar{\beta}}_* \in \Omega$) during the first reading.
Given any ${\bar{\beta}} \in \Omega$ and subset $G \subset \partial R({\bar{\beta}})$, we define a modified regularizer
\[
R_G(\beta) = R({\bar{\beta}}) + \sup_{v \in G} \innerprod{v}{\beta-{\bar{\beta}}} .
\]
It is clear that $R_G(\beta) \leq R(\beta)$ for all $\beta$ and $R({\bar{\beta}})=R_G({\bar{\beta}})$.
The value of $R_G(\beta)$ is unchanged if $G$ is replaced by the closure of its convex hull.
Moreover, if $G$ is convex and closed, then the sub-differential of $R_G(\beta)$ is
identical to $G$ at ${\bar{\beta}}$ and contained in $G$ elsewhere. In fact, by checking
the condition $R_G(b)-R_G(\beta)\ge \innerprod{v}{b-\beta}$ for $b=t\beta$ and $b={\bar{\beta}}$,
we see that for closed convex $G$
\begin{eqnarray*}
\partial R_G(\beta) = \big\{v\in G: R_G(\beta)=\innerprod{v}{\beta} =
R({\bar{\beta}})+\innerprod{v}{\beta-{\bar{\beta}}} \big\}.
\end{eqnarray*}
In what follows, we pick a closed convex $G$ unless otherwise stated.
In optimization, $\beta$ is generally referred to as primal variable and $\nabla L(\beta)$
as the corresponding dual variable,
since they live in ${\bar\Omega}$ and ${\bar\Omega}^*$ respectively.
An optimal solution ${\hat{\beta}}$ of (\ref{eq:hbeta}) satisfies the KKT condition when its dual
satisfies the relationship $-\nabla L({\hat{\beta}}) \in \partial R({\hat{\beta}})$. However, for the general formulation
(\ref{eq:hbeta}), this condition can be rather hard
to work with. Therefore in order to analyze (\ref{eq:hbeta}), we introduce the notion of
{\em primal-dual certificate},
which is a primal variable $Q_G$ satisfying a simplified
dual constraint $-\nabla L(Q_G) \in \partial R({\bar{\beta}})$. To be consistent with some
earlier literature, one may
refer to the quantity $-\nabla L(Q_G)$ as the corresponding dual certificate.
For notational simplicity, without causing confusion, in this paper we will also refer to
$Q_G$ as a dual certificate.
\subsection{Primal Dual Certificate Sparse Recovery Bound}
The formal definition of dual certificate is given in Definition~\ref{def:primal-dual-certificate}.
In this definition, we also allow approximate dual certificate which may have a small violation of
the dual constraint; such an approximation can be convenient
for some applications.
\begin{definition}[Primal-Dual Certificate]
\label{def:primal-dual-certificate}
Given any ${\bar{\beta}} \in \Omega$ and a closed convex subset $G \subset \partial R({\bar{\beta}})$.
A $\delta$-approximate primal-dual (or simply dual) certificate $Q_G$ (with respect to $G$) of (\ref{eq:hbeta}) is a primal variable that satisfies the following condition:
\begin{equation}
- \nabla L(Q_G) + \delta \in G . \label{eq:dual-certificate}
\end{equation}
If $\delta=0$, we call $Q_G$ an exact primal-dual certificate or simply a dual certificate.
\end{definition}
We may choose a convex function $\bar{L}(\beta)$ that
is close to $L(\beta)$
and use it to construct an approximate dual certificate with
\begin{equation}
Q_G = \mathop{\rm arg\, min}_\beta\big\{\bar{L}(\beta)+R_G(\beta)\big\}.
\label{eq:dual-certificate-simple}
\end{equation}
Since $- \nabla \bar{L}(Q_G) \in \partial R_G(Q_G)\subseteq G$,
(\ref{eq:dual-certificate}) holds for $\delta = \nabla\bar{L}(Q_G)-\nabla L(Q_G)$.
However, this choice may not always lead to the best result in the analysis of
the estimator (\ref{eq:hbeta}), especially when
$- \nabla L(Q_G) + \delta = - \nabla \bar{L}(Q_G)$ is an interior
point of $G$. Possible choices of $\bar{L}(\beta)$ include $\gamma L(\beta)$ with
a constant $\gamma$, its expectation, and their approximations.
Note that we do not assume that $Q_G \in \Omega$. In order to approximately enforce such a constraint, we may
replace $L(\beta)$ by $L(\beta) + L_\Delta(\beta)$ for any convex function $L_\Delta(\beta) \geq 0$ such that
$L_\Delta(\beta)=0$ when $\beta \in \Omega$. If $L_\Delta(\beta)$ is sufficiently large, then we can construct a
$Q_G$ that is approximately contained in $\Omega$.
More detailed dual certificate construction techniques are discussed in Section~\ref{sec:construction}.
An essential result that relates a primal-dual certificate $Q_G$ to ${\hat{\beta}}$ is stated in the following fundamental
theorem, which says that if $Q_G$ is close to ${\bar{\beta}}$, then ${\hat{\beta}}$ is close to ${\bar{\beta}}$ (when $\delta=0$).
In order to apply this theorem, we shall choose ${\bar{\beta}} \approx {\bar{\beta}}_*$.
\begin{theorem}[Primal-Dual Certificate Sparse Recovery Bound]
Given an approximate primal-dual certificate $Q_G$ in Definition~\ref{def:primal-dual-certificate},
we have the following inequality:
\[
D_L({\bar{\beta}},{\hat{\beta}}) + D_L({\hat{\beta}},Q_G) + [ R({\hat{\beta}})- R_G({\hat{\beta}})] \leq D_L({\bar{\beta}},Q_G) - \innerprod{\delta}{{\hat{\beta}}-{\bar{\beta}}} .
\]
\label{thm:dual_certificate-recovery}
\end{theorem}
The proof is a simple application of the following two propositions.
\begin{proposition}
\label{prop:bregman}
For any convex function $L(\cdot)$, the following identity holds for Bregman divergence:
\[
D_L(a,b) + D_L(b,c) - D_L(a,c)= \innerprod{\nabla L(c) - \nabla L(b)}{a-b} .
\]
\end{proposition}
\begin{proof}
This can be easily verified using simple algebra. We can expand the left hand side as follows.
\begin{align*}
& D_L(a,b) + D_L(b,c) - D_L(a,c) \\
=& \left[ L(a) - L(b) - \innerprod{\nabla L(b)}{a-b} \right]
+ \left[ L(b) - L(c) - \innerprod{\nabla L(c)}{b-c} \right]
- \left[ L(a) - L(c) - \innerprod{\nabla L(c)}{a-c} \right] \\
=& - \innerprod{\nabla L(b)}{a-b}
- \innerprod{\nabla L(c)}{b-c} + \innerprod{\nabla L(c)}{a-c} .
\end{align*}
This can be simplified to obtain the right hand side.
\end{proof}
\begin{proposition}
\label{prop:subgrad}
Let ${\tilde{\beta}}={t} {\hat{\beta}} + (1-{t}) {\bar{\beta}}$ for some ${t} \in [0,1]$.
Then, given any $v \in G$, we have
\[
\innerprod{- v - \nabla L({\tilde{\beta}})}{{\bar{\beta}} - {\tilde{\beta}}} \leq R_G({\tilde{\beta}}) - R({\tilde{\beta}}) .
\]
\end{proposition}
\begin{proof}
The definition of ${\hat{\beta}}$ and the convexity of (\ref{eq:hbeta})
imply that ${\tilde{\beta}}$ achieves the minimum objective
value $L(\beta)+R(\beta)$ for $\beta$ that lies in the line segment between
${\tilde{\beta}}$ and ${\bar{\beta}}$. This is equivalent to
$\innerprod{\nabla L({\tilde{\beta}}) + \nabla R({\tilde{\beta}})}{{\bar{\beta}}-{\tilde{\beta}}}\geq 0$.
Since $R(\cdot)$ is convex, this implies
$\innerprod{\nabla L({\tilde{\beta}})}{{\bar{\beta}}-{\tilde{\beta}}} + R({\bar{\beta}}) \ge R({\tilde{\beta}})$.
Thus,
\begin{eqnarray*}
\innerprod{-v-\nabla L({\tilde{\beta}})}{{\bar{\beta}}-{\tilde{\beta}}}\le \innerprod{v}{{\tilde{\beta}}-{\bar{\beta}}}+R({\bar{\beta}})-R({\tilde{\beta}})
\le R_G({\tilde{\beta}})-R({\tilde{\beta}})
\end{eqnarray*}
by the definition of $R_G(\beta)$.
\end{proof}
\begin{proof}{\bf of Theorem~\ref{thm:dual_certificate-recovery}}.
We apply Proposition~\ref{prop:bregman} with $a={\bar{\beta}}$, $b={\hat{\beta}}$, and $c=Q_G$ to obtain:
\[
D_L({\bar{\beta}},{\hat{\beta}}) + D_L({\hat{\beta}},Q_G) - D_L({\bar{\beta}},Q_G) = \innerprod{\nabla L(Q_G) - \nabla L({\hat{\beta}})}{{\bar{\beta}}-{\hat{\beta}}}
=\innerprod{-v+\delta - \nabla L({\hat{\beta}})}{{\bar{\beta}}-{\hat{\beta}}} ,
\]
where $v \in G$. We can now apply Proposition~\ref{prop:subgrad} with $t=1$ to obtain the desired bound.
\end{proof}
The results shows that if we have a good bound on $D_L({\bar{\beta}},Q_G)$, then it is possible to
obtain a bound on $D_L({\bar{\beta}},{\hat{\beta}})$. In general, we
also choose $G$ so that the difference $R({\hat{\beta}})-R_G({\hat{\beta}})$ can effectively
control the magnitude of ${\hat{\beta}}$ outside of the support (or a tangent space) of ${\bar{\beta}}$.
\subsection{Primal Dual Certificate Sparse Oracle Inequality}
It is also possible to derive a stronger form of oracle inequality for special $L$ with a more refined definition
of dual certificate.
\begin{definition}[Generalized Primal-Dual Certificate]
\label{def:primal-dual-certificate-2}
Given ${\bar{\beta}} \in \Omega$,
a closed convex set $G \subset \partial R({\bar{\beta}})$, a convex function $\bar{L}$ on ${\bar\Omega}$, and an additional parameter $\beta^* \in {\bar\Omega}$.
A generalized $\delta$-approximate primal-dual (or simply dual) certificate $Q_G$ with respect to
$(L,\bar{L},{\bar{\beta}},\beta^*)$ is a primal variable that satisfies the following condition:
\begin{equation}
- \nabla \bar{L}_*(Q_G) +\delta \in G , \label{eq:dual-certificate-2}
\end{equation}
where $\bar{L}_*(\beta)= \bar{L}(\beta) - \innerprod{\nabla \bar{L}({\bar{\beta}})-\nabla L(\beta^*)}{\beta-{\bar{\beta}}}$.
\end{definition}
Note that if $\innerprod{\cdot}{\cdot}$ is an inner product and
$L$ is a quadratic function of the form
\begin{equation}
L(\beta) = \innerprod{H\beta - z}{\beta}
\label{eq:quadratic-loss}
\end{equation}
for some self-adjoint operator $H$ and vector $z$, then $D_L(\beta,\beta')=\innerprod{H (\beta - \beta')}{\beta-\beta'}$.
In this case, we may simply take $\bar{L}(\cdot)= L(\cdot)$.
For other cost functions, it will be useful to take $\bar{L}(\cdot)=\gamma L(\cdot)$ with $\gamma <1$.
The reason will become clear later on.
Definition~\ref{def:primal-dual-certificate-2} is equivalent to
Definition~\ref{def:primal-dual-certificate} with $L(\beta)$ replaced by
a redefined convex function $\bar{L}_*(\beta)= \bar{L}(\beta) - \innerprod{\nabla \bar{L}({\bar{\beta}})-\nabla L(\beta^*)}{\beta-{\bar{\beta}}}$.
We may consider $\beta^*$ to be the true target ${\bar{\beta}}_*$ (or its approximation)
in that we can assume that $\nabla L(\beta^*)$ is small although
$\beta^*$ may not be sparse.
The main advantage of Definition~\ref{def:primal-dual-certificate-2} is that it allows comparison to an
arbitrary sparse approximation ${\bar{\beta}}$ to $\beta^*$ even when $\nabla L({\bar{\beta}})$ is
not small --- the definition only requires $\nabla \bar{L}_*({\bar{\beta}})=\nabla L(\beta^*)$ to be small.
This implies that ${\bar{\beta}}$ may have a dual certificate $Q_G$ with respect to $\bar{L}_*(\cdot)$
that is close to ${\bar{\beta}}$ (see error bounds in Section~\ref{sec:construction}).
The following result shows that one can obtain an oracle inequality that generalizes Theorem~\ref{thm:dual_certificate-recovery}. In order to apply this theorem, we should choose $\beta^* \approx {\bar{\beta}}_*$.
\begin{theorem}[Primal-Dual Certificate Sparse Oracle Inequality]
Given a generalized $\delta$ approximate primal-dual certificate $Q_G$ in Definition~\ref{def:primal-dual-certificate-2},
we have for all ${\tilde{\beta}}$ in the line segment between ${\bar{\beta}}$ and ${\hat{\beta}}$:
\begin{eqnarray*}
&& D_L({\bar{\beta}},{\tilde{\beta}})+ D_L({\tilde{\beta}},\beta^*) + D_{\bar{L}}({\tilde{\beta}},Q_G) + [R({\tilde{\beta}})- R_G({\tilde{\beta}}) ]
\cr &\leq& D_{\bar{L}}({\tilde{\beta}},{\bar{\beta}})+ D_L({\bar{\beta}},\beta^*) + D_{\bar{L}}({\bar{\beta}},Q_G)
- \innerprod{\delta}{{\tilde{\beta}}-{\bar{\beta}}}.
\end{eqnarray*}
\label{thm:dual_certificate-oracle}
\end{theorem}
\begin{proof}
We apply Proposition~\ref{prop:bregman} with $a={\bar{\beta}}$, $b={\tilde{\beta}}$, and $c=\beta^*$ to obtain:
\[
D_L({\bar{\beta}},{\tilde{\beta}})+ D_L({\tilde{\beta}},\beta^*) - D_L({\bar{\beta}},\beta^*) =\innerprod{\nabla L(\beta^*) - \nabla L({\tilde{\beta}})}{{\bar{\beta}}-{\tilde{\beta}}}.
\]
Similarly, we can apply Proposition~\ref{prop:bregman} with $a={\tilde{\beta}}$, $b={\bar{\beta}}$, and $c=Q_G$
to $\bar{L}$ to obtain:
\[
D_{\bar{L}}({\tilde{\beta}},{\bar{\beta}})+ D_{\bar{L}}({\bar{\beta}},Q_G) - D_{\bar{L}}({\tilde{\beta}},Q_G)
=\innerprod{\nabla \bar{L}(Q_G) - \nabla \bar{L}({\bar{\beta}})}{{\tilde{\beta}}-{\bar{\beta}}}.
\]
By subtracting the above two displayed equations, we obtain
\begin{align*}
&D_L({\bar{\beta}},{\tilde{\beta}})+ D_L({\tilde{\beta}},\beta^*) - D_L({\bar{\beta}},\beta^*)
-D_{\bar{L}}({\tilde{\beta}},{\bar{\beta}})- D_{\bar{L}}({\bar{\beta}},Q_G) + D_{\bar{L}}({\tilde{\beta}},Q_G) \\
=&
\innerprod{\nabla L(\beta^*) - \nabla L({\tilde{\beta}})
+\nabla \bar{L}(Q_G) - \nabla \bar{L}({\bar{\beta}})}{{\bar{\beta}}-{\tilde{\beta}}}.
\end{align*}
Since $\nabla \bar{L}(Q_G) + \nabla L(\beta^*) - \nabla \bar{L}({\bar{\beta}})=-v +\delta$
for some $v\in G$, the right hand side can be written as
$\innerprod{-v+\delta-\nabla L({\tilde{\beta}})}{{\bar{\beta}}-{\tilde{\beta}}}$.
The conclusion then follows from Proposition~\ref{prop:subgrad}. \end{proof}
Note that if we choose $L=\bar{L}$ and $\beta^*={\bar{\beta}}$ in Theorem~\ref{thm:dual_certificate-oracle},
then Definition~\ref{def:primal-dual-certificate-2} is consistent with
Definition~\ref{def:primal-dual-certificate}, and Theorem~\ref{thm:dual_certificate-oracle} becomes
Theorem~\ref{thm:dual_certificate-recovery}.
Since $\bar{L}_*(\beta)-\bar{L}(\beta)$ is linear in $\beta$, $D_{\bar{L}}({\bar{\beta}},Q_G)
= D_{\bar{L}_*}({\bar{\beta}},Q_G)$. Moreover, when $\nabla L(\beta_*)$ is small,
$\nabla\bar{L}_*({\bar{\beta}})$ is small by the choice of $\bar{L}_*(\cdot)$ in
Definition~\ref{def:primal-dual-certificate-2}, so that $D_{\bar{L}_*}({\bar{\beta}},Q_G)$ is
small when $\bar{L}_*$ has sufficient convexity near ${\bar{\beta}}$.
This motivates a choice $\bar{L}(\cdot)$ satisfying
$D_{\bar{L}}(\beta,{\bar{\beta}})\le D_L({\bar{\beta}},\beta)$ for all $\beta\in\Omega$ whenever
such a choice is available and reasonably convex near ${\bar{\beta}}$.
This lead to the following corollary.
\begin{corollary} \label{cor:dual_certificate-oracle}
Given a generalized exact primal-dual certificate $Q_G$ in Definition~\ref{def:primal-dual-certificate-2}
with $\bar{L}(\cdot)$
satisfying $D_L({\bar{\beta}},\beta)\ge D_{\bar{L}}(\beta,{\bar{\beta}})$ for all $\beta\in\Omega$. Then,
\[
D_L({\hat{\beta}},\beta^*) + [R({\hat{\beta}})- R_G({\hat{\beta}}) ]
\leq D_L({\bar{\beta}},\beta^*) + D_{\bar{L}_*}({\bar{\beta}},Q_G).
\]
\end{corollary}
In some problems, Corollary \ref{cor:dual_certificate-oracle} is applicable with
$\bar{L}(\cdot)=\gamma L(\cdot)$ for some $\gamma \in (0,1]$.
In the special case that $L(\cdot)$ is a quadratic function as in (\ref{eq:quadratic-loss}),
we have $D_L(\beta,{\bar{\beta}})=D_L({\bar{\beta}},\beta)$. Therefore we may take $\gamma=1$,
and the bound in Corollary~\ref{cor:dual_certificate-oracle} can be further simplified to
\[
D_L({\hat{\beta}},\beta^*)+ [R({\hat{\beta}})- R_G({\hat{\beta}}) ] \leq
D_L({\bar{\beta}},\beta^*)+ D_{L}({\bar{\beta}},Q_G) .
\]
If $L(\cdot)$ comes from a generalized linear model of the form
$L(\beta)=\sum_{i=1}^n \ell_i(\innerprod{x_i}{\beta})$, with $x_i\in{\bar\Omega}^*$ and second order differentiable convex scalar functions $\ell_i$, then the condition $D_L({\bar{\beta}},\beta) \geq \gamma D_L(\beta,{\bar{\beta}})$ is satisfied as long as:
\[
\inf_{\beta \in \Omega} \frac{D_L({\bar{\beta}},\beta)}{D_L(\beta,{\bar{\beta}})}
\geq \inf_{\{\beta',\beta''\} \in \Omega}
\frac{\sum_{i=1}^n \ell_i''(\innerprod{x_i}{\beta'}) \innerprod{x_i}{\beta-{\bar{\beta}}}^2}
{\sum_{i=1}^n \ell_i''(\innerprod{x_i}{\beta''}) \innerprod{x_i}{\beta-{\bar{\beta}}}^2}
\geq \inf_{i \in \{1,\ldots,n\}} \inf_{\{\beta',\beta''\} \in \Omega}\frac{\ell_i''(\innerprod{x_i}{\beta'})}{\ell_i''(\innerprod{x_i}{\beta''})}\ge\gamma.
\]
This means that the condition of Corollary~\ref{cor:dual_certificate-oracle} holds as long as for all $i,\beta,\beta' \in \Omega$:
$\ell_i''(\innerprod{x_i}{\beta}) \geq \gamma \ell_i''(\innerprod{x_i}{\beta'})$.
For example, for logistic regression $\ell_i(t)= \ln(1+\exp(-t))$
with $\sup_i\sup_{\beta\in\Omega}|\innerprod{x_i}{\beta}|\leq A$, we can pick
$\gamma=4/(2+\exp(-A)+\exp(A))$. This choice of $\gamma$ can be improved if we have additional constraints
on $\hat{\beta}$; an example is given in Corollary~\ref{cor:recovery-global-dc-oracle}.
In~\ref{sec:genlin-example}, we will present a more concrete and elaborated analysis for generalized linear models.
Note that the result of Corollary~\ref{cor:dual_certificate-oracle} gives an oracle inequality that compares
$D_L({\hat{\beta}},\beta^*)$ to $D_L({\bar{\beta}},\beta^*)$ with leading coefficient one.
The bound is meaningful as long as ${\bar{\beta}}$ has a good dual certificate $Q_G$
under $\bar{L}_*(\beta)$ that is close to ${\bar{\beta}}$.
The possibility to obtain oracle inequalities of this kind with leading coefficient one
was first noticed in \cite{KoTsLo10} under restricted strong convexity.
The advantage of such an oracle inequality is that we do not require $\beta^*$ to be sparse,
but rather the competitor ${\bar{\beta}}$ to be sparse --- which implies the dual certificate $Q_G$
is close to ${\bar{\beta}}$ when $\bar{L}_*(\beta)$ is sufficiently convex.
Here we generalize the result of \cite{KoTsLo10} in two ways.
First it is possible to deal with non-quadratic loss.
Second we only require the existence of a good dual certificate $Q_G$,
which is a weaker requirement than restricted strong convexity in \cite{KoTsLo10}.
Generally speaking, the dual certificate technique allows us to obtain oracle inequality
$D_L({\hat{\beta}},\beta^*)+ [R({\hat{\beta}})- R_G({\hat{\beta}}) ]$ directly.
If we are interested in other results such as parameter estimation bound
$\|{\hat{\beta}}-\beta^*\|$, then additional estimates will be needed on top of the dual certificate theory of this paper.
Instead of working out general results, we will study this problem for structured $\ell_1$ regularizer
in Section~\ref{sec:struct-L1}.
\section{Constructing Primal-Dual Certificate}
\label{sec:construction}
We will present some general results for estimating $D_L({\bar{\beta}},Q_G)$ under various assumptions.
For notational
simplicity, the main technical derivation considers Definition~\ref{def:primal-dual-certificate}, with dual certificate
$Q_G$ with respect to $L(\beta)$. One can then apply these results to the dual certificate $Q_G$
in Definition~\ref{def:primal-dual-certificate-2}.
\subsection{Global Restricted Strong Convexity}
\label{sec:RSC}
We first consider the following construction of primal-dual certificate.
\begin{proposition} \label{prop:global-dc}
Let
\begin{equation}
Q_G = \arg\min_{\beta} \left[ L(\beta) + R_G(\beta) \right] , \label{eq:dc-opt}
\end{equation}
then $Q_G$ is an exact primal-dual certificate of (\ref{eq:hbeta}).
\end{proposition}
\begin{proof}
It is clear from the optimality condition of (\ref{eq:dc-opt}) that $\nabla L(Q_G) + v=0$
for some $v \in G$.
\end{proof}
The symmetrized Bregman divergence is defined as
\begin{eqnarray*}
D_L^s(\beta,{\bar{\beta}})=D_L(\beta,{\bar{\beta}}) + D_L({\bar{\beta}},\beta)
= \innerprod{\nabla L(\beta) - \nabla L({\bar{\beta}})}{\beta-{\bar{\beta}}}.
\end{eqnarray*}
We introduce the concept of restricted strong convexity to bound
$D_L^s({\bar{\beta}},Q_G)$.
\begin{definition}[Restricted Strong Convexity]\label{def:RSC}
We define the following quantity which we refer to as global restricted strong convexity (RSC) constant:
\[
\gamma_L({\bar{\beta}};r,G,\|\cdot\|)= \inf \left\{ \frac{D_L^s(\beta,{\bar{\beta}})}{\|\beta-{\bar{\beta}}\|^2} :
0<\|\beta-{\bar{\beta}}\|\leq r; \;
D_L^s(\beta,{\bar{\beta}})+\sup_{u\in G} \innerprod{u+\nabla L({\bar{\beta}})}{\beta-{\bar{\beta}}} \leq 0 \right\} ,
\]
where $\|\cdot\|$ is a norm in ${\bar\Omega}$, $r>0$ and $G \subset \partial R({\bar{\beta}})$.
\end{definition}
The parameter $r$ is introduced for localized analysis, where the Hessian may be small when
$\|\beta-{\bar{\beta}}\| >r$. For least squares loss that has a constant Hessian, one can just pick $r=\infty$.
We recall the concept of dual norm in ${\bar\Omega}$:
$\|\cdot\|_D$ is the dual norm of $\|\cdot\|$ if
\[
\|u\|_D = \sup_{\|\beta\|=1} \innerprod{u}{\beta} .
\]
It implies the inequality that $\innerprod{u}{\beta} \leq \|u\|_D \|\beta\|$.
\begin{theorem}[Dual Certificate Error Bound under RSC]
Let $\|\cdot\|$ be a norm in ${\bar\Omega}$ and $\|\cdot\|_D$ its dual norm in ${\bar\Omega}^*$.
Consider ${\bar{\beta}} \in \Omega$ and a closed convex $G \subset \partial R({\bar{\beta}})$.
Let $\Delta_r=\gamma_L({\bar{\beta}};r,G,\|\cdot\|)^{-1}\inf_{u \in G} \|u+\nabla L({\bar{\beta}})\|_D$.
If $\Delta_r < r$ for some $r>0$, then for any $Q_G$ given by (\ref{eq:dc-opt}),
\[
D_L^s({\bar{\beta}},Q_G) \leq \gamma_L({\bar{\beta}};r,G,\|\cdot\|) \Delta_r^2, \quad \|{\bar{\beta}}-Q_G\| \leq \Delta_r .
\]
\label{thm:dual_certificate-error}
\end{theorem}
\begin{proof}
By the optimality condition (\ref{eq:dc-opt}) of $Q_G$, there exists $v\in\partial R_G(Q_G)$ such that
$\nabla L(Q_G) + v = 0$.
For $v\in\partial R_G(Q_G)$, $R_G(Q_G)-R({\bar{\beta}})=\innerprod{v}{Q_G-{\bar{\beta}}}
\geq \sup_{u\in G}\innerprod{u}{Q_G-{\bar{\beta}}}$. Therefore,
\begin{eqnarray}\label{eq:Q-RSC}
D_L^s(Q_G,{\bar{\beta}})
= \innerprod{\nabla L(Q_G)-\nabla L({\bar{\beta}})}{Q_G-{\bar{\beta}}} \leq
-\innerprod{u+\nabla L({\bar{\beta}})}{Q_G-{\bar{\beta}}}, \forall \ u \in G.
\end{eqnarray}
Let ${\tilde Q}_G={\bar{\beta}}+t(Q_G-{\bar{\beta}})$ where we pick $t=1$ if $\|Q_G-{\bar{\beta}}\| \leq r$ and $t \in (0,1)$
with $\|{\tilde Q}_G-{\bar{\beta}}\|=r$ otherwise.
Let $f(t) = D_L({\tilde Q}_G,{\bar{\beta}})$ so that $D_L^s({\tilde Q}_G,{\bar{\beta}}) = tf'(t)$.
The convexity of $L(\beta)$ implies $f'(t) \le f'(1)=D_L^s(Q_G,{\bar{\beta}})$.
It follows that
\begin{eqnarray*}
D_L^s({\tilde Q}_G,{\bar{\beta}}) +\innerprod{u+\nabla L({\bar{\beta}})}{{\tilde Q}_G-{\bar{\beta}}}
\le t\{D_L^s(Q_G,{\bar{\beta}})+\innerprod{u+\nabla L({\bar{\beta}})}{Q_G-{\bar{\beta}}}\}\le 0,
\end{eqnarray*}
which implies the restricted cone condition for ${\tilde Q}_G$ in the definition of RSC. Thus,
\[
\gamma_L({\bar{\beta}};r,G,\|\cdot\|) \|{\tilde Q}_G-{\bar{\beta}}\|^2 -\|u+\nabla L({\bar{\beta}})\|_D \|{\tilde Q}_G-{\bar{\beta}}\|
\leq 0 .
\]
Now by moving the term $\|u+\nabla L({\bar{\beta}})\|_D \|{\tilde Q}_G-{\bar{\beta}}\|$ to the right hand side and
taking $\inf$ over $u$, we obtain
$\gamma_L({\bar{\beta}};r,G,\|\cdot\|)\|{\tilde Q}_G-{\bar{\beta}}\| \leq \inf_{u\in G} \|u+\nabla L({\bar{\beta}})\|_D
=\gamma_L({\bar{\beta}};r,G,\|\cdot\|) \Delta_r$.
Since $\Delta_r < r$, we have $t=1$ and ${\tilde Q}_G=Q_G$.
It means that we always have $\|Q_G-{\bar{\beta}}\| \leq \Delta_r <r$. Consequently,
(\ref{eq:Q-RSC}) gives
$D_L^s(Q_G,{\bar{\beta}}) \leq \inf_{u\in G}\|u+\nabla L({\bar{\beta}})\|_D\Delta_r$.
This completes the proof.
\end{proof}
\begin{remark}
Although for simplicity, the proof of Theorem~\ref{thm:dual_certificate-error} implicitly assumes that the solution of (\ref{eq:dc-opt}) is finite,
this extra assumption is not necessary with a slightly more complex argument (which we excludes in the proof in order not to obscure the main idea). An easy way to see this is by
adding a small (unrestricted) strongly convex term $L_\Delta(\beta)$ to $L$ and consider dual certificate for the modified function
$\tilde{L}(\beta)=L(\beta)+L_\Delta(\beta)$.
Since the solution of (\ref{eq:dc-opt}) with $\tilde{L}(\beta)$ is finite, we can apply the proof to $\tilde{L}(\beta)$ and then simply let $L_\Delta(\beta) \to 0$.
\end{remark}
Note that if $\nabla L(Q_G)$ is not unique, then the same value can be used both in Theorem~\ref{thm:dual_certificate-recovery} and in
Theorem~\ref{thm:dual_certificate-error}.
Since $D_L({\bar{\beta}},Q_G)\le D_L^s({\bar{\beta}},Q_G)$, this implies the following bound:
\begin{corollary}
Under the conditions of Theorem~\ref{thm:dual_certificate-error}, we have
\[
D_L({\bar{\beta}},{\hat{\beta}}) + [ R({\hat{\beta}})- R_G({\hat{\beta}})] \leq \gamma_L({\bar{\beta}};r,G,\|\cdot\|)^{-1}\inf_{u \in G} \|u+\nabla L({\bar{\beta}})\|_D^2 .
\]
\label{cor:recovery-global-dc-error}
\end{corollary}
Similarly, we may apply Theorem~\ref{thm:dual_certificate-oracle} and Theorem~\ref{thm:dual_certificate-error}
with $L(\beta)$ replaced by $\bar{L}_*(\beta)$ as in Definition~\ref{def:primal-dual-certificate-2}.
This implies the following general recovery bound.
\begin{corollary}
Let $\|\cdot\|$ be a norm in ${\bar\Omega}$ and $\|\cdot\|_D$ its dual norm in ${\bar\Omega}^*$.
Consider ${\bar{\beta}} \in \Omega$ and a closed convex $G \subset \partial R({\bar{\beta}})$.
Consider $\bar{L}(\beta)$ as in Definition~\ref{def:primal-dual-certificate-2}, and define
\[
\gamma_{\bar{L}_*}({\bar{\beta}};r,G,\|\cdot\|)= \inf \left\{ \frac{D_{\bar{L}}^s(\beta,{\bar{\beta}})}{\|{\bar{\beta}}-\beta\|^2} :
\|\beta-{\bar{\beta}}\|\leq r; \;
D_{\bar{L}}^s(\beta,{\bar{\beta}})+\sup_{u \in G} \innerprod{u+\nabla L(\beta^*)}{\beta-{\bar{\beta}}} \leq 0 \right\}
\]
and
$\Delta_r = (\gamma_{\bar{L}_*}({\bar{\beta}};r,G,\|\cdot\|))^{-1}\inf_{u \in G} \|u+\nabla L(\beta^*)\|_D$.
Assume for some $r>0$, we have $\Delta_r < r$; and assume
there exists $\tilde{r}> D_L({\bar{\beta}},\beta^*)+ \gamma_{\bar{L}_*}({\bar{\beta}};r,G,\|\cdot\|) \Delta_r^2$ such that for all $\beta \in \Omega$:
$D_L(\beta,\beta^*) + [R(\beta)- R_G(\beta) ] \leq \tilde{r}$ implies
$D_L({\bar{\beta}},\beta) \geq D_{\bar{L}}(\beta,{\bar{\beta}})$.
Then,
\[
D_L({\hat{\beta}},\beta^*) + [R({\hat{\beta}})- R_G({\hat{\beta}}) ] \leq
D_L({\bar{\beta}},\beta^*)+ \gamma_{\bar{L}_*}({\bar{\beta}};r,G,\|\cdot\|) \Delta_r^2.
\]
\label{cor:recovery-global-dc-oracle}
\end{corollary}
\begin{proof}
Let $\bar{L}_*(\beta)= \bar{L}(\beta) - \innerprod{\nabla \bar{L}({\bar{\beta}})-\nabla L(\beta^*)}{\beta-{\bar{\beta}}}$
and define
\[
Q_G = \arg\min_{\beta} \left[ \bar{L}_*(\beta) + R_G(\beta) \right] .
\]
Then $Q_G$ is a generalized dual certificate in Definition~\ref{def:primal-dual-certificate-2}.
Note that $D_{\bar{L}_*}(\beta,\beta')=D_{\bar{L}}(\beta,\beta')$ and $\nabla \bar{L}_*({\bar{\beta}})=\nabla L(\beta^*)$.
The conditions of the corollary and Theorem~\ref{thm:dual_certificate-error},
applied with $L$ replaced by $\bar{L}_*$, imply that
$\|Q_G-{\bar{\beta}}\| \leq r$ and $D_{\bar{L}}({\bar{\beta}},Q_G) \leq \gamma_{\bar{L}_*}({\bar{\beta}};r,G,\|\cdot\|) \Delta_r^2$. Now we simply apply Theorem~\ref{thm:dual_certificate-oracle} to obtain
that for all $t \in [0,1]$ and
${\tilde{\beta}}= {\bar{\beta}} + t ({\hat{\beta}}-{\bar{\beta}})$:
\[
D_L({\tilde{\beta}},\beta^*) + [R({\tilde{\beta}})- R_G({\tilde{\beta}}) ] \leq
D_L({\bar{\beta}},\beta^*)+ \gamma_{\bar{L}_*}({\bar{\beta}};r,G,\|\cdot\|) \Delta_r^2 + [D_{\bar{L}}({\tilde{\beta}},{\bar{\beta}})-D_L({\bar{\beta}},{\tilde{\beta}})] .
\]
It is clear that when $t=0$, we have $D_L({\tilde{\beta}},\beta^*) + [R({\tilde{\beta}})- R_G({\tilde{\beta}}) ] < \tilde{r}$.
If the condition $D_L({\tilde{\beta}},\beta^*) + [R({\tilde{\beta}})- R_G({\tilde{\beta}}) ] \leq \tilde{r}$ holds for $t=1$,
then the desired bound is already proved due to the condition
$D_L({\bar{\beta}},{\tilde{\beta}}) \geq D_{\bar{L}}({\tilde{\beta}},{\bar{\beta}})$.
Otherwise, there exists $t \in [0,1]$ such that
$D_L({\tilde{\beta}},\beta^*) + [R({\tilde{\beta}})- R_G({\tilde{\beta}}) ] = \tilde{r}$. However, this is impossible because
the same argument gives
\[
D_L({\tilde{\beta}},\beta^*) + [R({\tilde{\beta}})- R_G({\tilde{\beta}}) ] \leq
D_L({\bar{\beta}},\beta^*)+ \gamma_{\bar{L}_*}({\bar{\beta}};r,G,\|\cdot\|) \Delta_r^2 < \tilde{r} .
\]
This proves the desired bound.
\end{proof}
Corollary~\ref{cor:recovery-global-dc-oracle} gives an oracle inequality with leading coefficient one
for general loss functions, but the statement is rather complex.
The situation for quadratic loss is much simpler, where we can take $\bar{L}(\beta)=L(\beta)$.
This is because the condition $D_L({\bar{\beta}},{\tilde{\beta}}) \geq D_{\bar{L}}({\tilde{\beta}},{\bar{\beta}})$ always holds.
We also have a better constant because $D_L^s(\beta,\beta')= 2 D_L(\beta,\beta')=2D_L(\beta',\beta)$.
\begin{corollary}
Assume that $L(\beta)$ is a quadratic loss in (\ref{eq:quadratic-loss}).
Let $\|\cdot\|_D$ and $\|\cdot\|$ be dual norms, and consider ${\bar{\beta}} \in \Omega$ and a closed
convex $G \subset \partial R({\bar{\beta}})$. We have
\[
D_L({\hat{\beta}},\beta^*)+ [R({\hat{\beta}})- R_G({\hat{\beta}}) ] \leq
D_L({\bar{\beta}},\beta^*)+
(2\gamma_{\bar{L}_*}({\bar{\beta}};\infty,G,\|\cdot\|))^{-1}\inf_{u \in G} \|u+\nabla L(\beta^*)\|_D^2 ,
\]
where
\[
\gamma_{\bar{L}_*}({\bar{\beta}};\infty,G,\|\cdot\|)= \inf \left\{ \frac{2D_L(\beta,{\bar{\beta}})}{\|{\bar{\beta}}-\beta\|^2} :
2 D_L(\beta,{\bar{\beta}})+\sup_{u \in G} \innerprod{u+\nabla L(\beta^*)}{\beta-{\bar{\beta}}} \leq 0 \right\} .
\]
\label{cor:recovery-global-dc-quadratic}
\end{corollary}
\subsection{Quadratic Loss with Gaussian Random Design Matrix}
\label{sec:gordon}
While in the general case, the estimation of $\gamma_{\bar{L}_*}({\bar{\beta}};r,G,\|\cdot\|)$ may be technically involved,
for the special application of compressed sensing with Gaussian random design matrix and quadratic loss,
we can obtain a relatively general and simple bound using
Gordon's minimum restricted singular value estimation in \cite{Gordon88}. This section describes the underlying idea.
In this section, we consider the quadratic loss function
\begin{equation}
L(\beta) = \|X \beta - Y\|_2^2 ,
\label{eq:gaussian-design}
\end{equation}
where $\beta \in {\mathbb{R}}^p, Y \in {\mathbb{R}}^n$, and $X$ is an $n \times p$ matrix with iid Gaussian entries $N(0,1)$.
Here $\innerprod{\cdot}{\cdot}$ is the Euclidean dot product in ${\mathbb{R}}^p$:
$\innerprod{u}{v}= u^\top v$ for $u,v \in {\mathbb{R}}^p$.
\begin{definition}[Gaussian Width]
Given any set ${\cal C} \subset {\mathbb{R}}^p$, we define its Gaussian width as
\[
{\mathrm{width}}({\cal C}) = {\mathbf E}_{\epsilon} \sup_{z \in {\cal C}; \|z\|_2=1} \epsilon^\top z ,
\]
where $\epsilon \sim N(0, I_{p \times p})$ and ${\mathbf E}_{\epsilon}$ is the expectation with respect to $\epsilon$.
\end{definition}
The following estimation of Gaussian width is based on a similar computational technique used in \cite{ChRePaWi10}.
\begin{proposition}\label{prop:gw}
Let
${\cal C}=\left\{\beta \in {\mathbb{R}}^p : \sup_{u \in G} \innerprod{u+\nabla L(\beta^*)}{\beta} \leq 0 \right\}$
and $\epsilon \sim N(0,I_{p \times p})$. Then,
\[
{\mathrm{width}}({\cal C}) \leq {\mathbf E}_{\epsilon} \inf_{u \in G; \gamma >0} \|\gamma(u+\nabla L(\beta^*)) - \epsilon\|_2.
\]
\end{proposition}
\begin{proof}
For all $\beta \in {\cal C}$ and $\|\beta\|_2=1$, $\gamma \geq 0$, and $u \in G$,
let $g= (u+\nabla L(\beta^*))$. We have
$\innerprod{g}{\beta}=\innerprod{u + \nabla L(\beta^*)}{\beta} \leq 0$.
Therefore,
$\epsilon^\top \beta =
(\epsilon- \gamma g)^\top \beta
+\gamma g^\top \beta
\leq (\epsilon- \gamma g)^\top \beta \leq \|\epsilon- \gamma g\|_2$.
Since $u$ is arbitrary, we have
\[
\epsilon^\top \beta \leq \inf_{u \in G; \gamma >0} \|\gamma(u+\nabla L(\beta^*)) - \epsilon\|_2 .
\]
Taking expectation with respect to $\epsilon$, we obtain the desired result.
\end{proof}
Gaussian width is useful when we apply Gordon's restricted singular value estimates,
which give the following result.
\begin{theorem}
\label{thm:gordon}
Let $f_{\min}(X)=\min_{z \in {\cal C}; \|z\|_2=1} \|X z\|_2$ and $f_{\max}(X)=\max_{z \in {\cal C}; \|z\|_2=1} \|X z\|_2$. Let $\lambda_n=\sqrt{2} \Gamma((n+1)/2)/\Gamma(n/2)$ where $\Gamma(\cdot)$ is the $\Gamma$-function. We have for any $\delta >0$:
\[
{\mathbf P} \left[ f_{\min}(X) \leq \lambda_n - {\mathrm{width}}({\cal C}) - \delta \right]
\leq {\mathbf P}[ N(0,1)>\delta ] \le 0.5 \exp \left(-\delta^2/2 \right) ,
\]
\[
{\mathbf P} \left[ f_{\max}(X) \geq \lambda_n + {\mathrm{width}}({\cal C}) + \delta \right]
\leq {\mathbf P}[ N(0,1)>\delta ] \le 0.5 \exp \left(-\delta^2/2 \right).
\]
\end{theorem}
\begin{proof}
Since both $f_{\min}(X)$ and $f_{\max}(X)$ are Lipschitz-1 functions with respect to the Frobenius norm of $X$.
We may apply the Gaussian concentration bound \cite{Borell75,Pisier85} to obtain:
\[
{\mathbf P} \left[ f_{\min}(X) \leq {\mathbf E} [f_{\min}(X)] - \delta \right]
\leq {\mathbf P}[ N(0,1)>\delta ],
\]
\[
{\mathbf P} \left[ f_{\max}(X) \geq {\mathbf E} [f_{\max}(X)] + \delta \right]
\leq {\mathbf P}[ N(0,1)>\delta ].
\]
Now we may apply Corollary 1.2 of \cite{Gordon88} to obtain the estimates
\[
{\mathbf E} [f_{\min}(X)] \geq \lambda_n - {\mathrm{width}}({\cal C}) , \qquad
{\mathbf E} [f_{\max}(X)] \leq \lambda_n + {\mathrm{width}}({\cal C}) ,
\]
which proves the theorem.
\end{proof}
Note that we have $n/\sqrt{n+1} \leq \lambda_n \leq \sqrt{n}$.
Therefore we may replace $\lambda_n-{\mathrm{width}}({\cal C})$ by $n/\sqrt{n+1}-{\mathrm{width}}({\cal C})$ and
$\lambda_n + {\mathrm{width}}({\cal C})$ by $\sqrt{n}+{\mathrm{width}}({\cal C})$.
By combining Theorem~\ref{thm:gordon} and Proposition~\ref{prop:gw} to estimate $\gamma_{\bar{L}_*}(\cdot)$ in
Corollary~\ref{cor:recovery-global-dc-quadratic}, we obtain the following result for Gaussian random projection in compressed sensing. The result improves the main ideas of \cite{ChRePaWi10}.
\begin{theorem}\label{thm:recovery-gaussian}
Let $L(\beta)$ be given by (\ref{eq:gaussian-design}) and $\epsilon\sim N(0,I_{p \times p})$.
Suppose the conditions of Theorem~\ref{thm:dual_certificate-error} hold.
Then, given any $g,\delta \geq 0$ such that $g+\delta \leq n/\sqrt{n+1}$, with probability at least
\[
1 - \frac{1}{2}\exp \left(-\frac{1}{2} (n/\sqrt{n+1}-g-\delta)^2\right) ,
\]
we have either
\[
\|X({\hat{\beta}}-\beta^*)\|_2^2 + [R({\hat{\beta}})- R_G({\hat{\beta}}) ] \leq
\|X({\bar{\beta}}-\beta^*)\|_2^2 +
(4\delta)^{-1}\inf_{u \in G} \|u+\nabla L(\beta^*)\|_2^2 ,
\]
or
\[
g < {\mathbf E}_{\epsilon} \inf_{u \in G; \gamma >0} \|\gamma(u+\nabla L(\beta^*)) - \epsilon\|_2 .
\]
\end{theorem}
\begin{proof}
Let $\|\cdot\|=\|\cdot\|_D=\|\cdot\|_2$ in Corollary~\ref{cor:recovery-global-dc-quadratic}.
We simply note that $\gamma_{\bar{L}_*}({\bar{\beta}};\infty,G,\|\cdot\|_2)$ is no smaller than
$\inf \{2\|X \beta\|_2 : \|\beta\|_2=1, \beta \in {\cal C}\}$, where
${\cal C}=\left\{\beta \in {\mathbb{R}}^p : \sup_{u \in G} \innerprod{u+\nabla L(\beta^*)}{\beta} \leq 0 \right\}$.
Let $E_1$ be the event $g \geq {\mathbf E}_{\epsilon} \inf_{u \in G; \gamma >0} \|\gamma(u+\nabla L(\beta^*)) - \epsilon\|_2$. In the event $E_1$, Proposition~\ref{prop:gw} implies $g \geq {\mathrm{width}}({\cal C})$,
so that by Theorem~\ref{thm:gordon}
\begin{eqnarray*}
{\mathbf P}\Big[\gamma_{\bar{L}_*}({\bar{\beta}};\infty,G,\|\cdot\|_2)\le 2\delta \hbox{ and } E_1 \Big]
\le {\mathbf P}\Big[\inf \{\|X \beta\|_2 : \|\beta\|_2=1, \beta \in {\cal C}\}\le \delta \Big| E_1 \Big]
\le \frac{1}{2}e^{-(\lambda_n-g-\delta)^2/2}.
\end{eqnarray*}
The desired result thus follows from Corollary~\ref{cor:recovery-global-dc-quadratic}.
\end{proof}
\begin{remark}
If $Y= X \beta^* + \epsilon$, with iid Gaussian noise $\epsilon \sim N(0,\sigma^2 I_{n \times n})$, then
the error bound in Theorem~\ref{thm:recovery-gaussian} depends on
$\inf_{u \in G} \|u+\nabla L(\beta^*)\|_2^2 = \inf_{u \in G} \|u+2 X^\top X \epsilon\|_2^2 \approx 2n\sigma^2 \inf_{u \in G} \|\gamma u+\epsilon\|_2^2$ when $X^\top X/n$ is near orthogonal, where $\gamma=0.5 \sigma^{-2}/n$.
In comparison, under the noise free case $\sigma=0$ (and $\nabla L(\beta^*)=0$),
the number of samples required in Gaussian random design is upper bounded by
\[
{\mathbf E}_{\epsilon \sim N(0,I_{p \times p})} \inf_{u \in G} \|\gamma u+ \epsilon\|_2
\]
for appropriate $\gamma$. The similarity of the two terms means that
it is expected that the error bound in oracle inequality and the number of
samples required in Gaussian design are closely related.
\end{remark}
\subsection{Tangent Space Analysis}
\label{sec:TRSC}
In some applications, the restricted strong convexity condition may not hold globally.
In this situation, one can further restrict the condition into a subspace ${\cal T}$ of ${\bar\Omega}$
call {\em tangent space} in the literature.
We may regard tangent space as a generalization of the support set concept for sparse regression.
A more formal definition will be presented later in Section~\ref{sec:struct-tangent}.
In the current section, it can be motivated by considering the following decomposition of $G$:
\begin{equation}
G = \{u_0 + u_1 : u_0 \in G_0 \subset G, u_1 \in G_1\} ,
\label{eq:G-tangent-decomp}
\end{equation}
where $G_1$ is a convex set that contains zero.
Note that we can always take $G_0=G$ and $G_1=\{0\}$.
However, this is not an interesting decomposition.
This decomposition becomes useful when there exist $G_0$ and $G_1$ such that $G_0$ is small and $G_1$ is large.
With this decomposition, we may define the tangent space as:
\[
{\cal T} = \{\beta \in {\bar\Omega}: \innerprod{u_1}{\beta}=0 \text{ for all } u_1 \in G_1 \} .
\]
For simple sparse regression with $\ell_1$ regularization, tangent space can be considered as the subspace
spanned by the nonzero coefficients of ${\bar{\beta}}$ (that is, support of ${\bar{\beta}}$).
Typically ${\bar{\beta}} \in {\cal T}$ (although this requirement is not essential).
With the above defined ${\cal T}$, we may construct a tangent space dual certificate
$Q_G^{\cal T}$ given any $u_0 \in G_0$ as:
\begin{equation}
Q_G^{\cal T}= {\bar{\beta}} + \Delta Q,
\quad \Delta Q = \arg\min_{\Delta \beta \in {\cal T}} \left[ L({\bar{\beta}}+\Delta \beta) + \innerprod{u_0}{\Delta \beta} \right] . \label{eq:dc-tangent-opt}
\end{equation}
Note that one may also define generalized dual tangent space certificate simply by working with
$\bar{L}_*(\beta)= \bar{L}(\beta) - \innerprod{\nabla \bar{L}({\bar{\beta}})-\nabla L(\beta^*)}{\beta-{\bar{\beta}}}$ instead of $L(\beta)$.
The idea of tangent space analysis is to verify that the restricted dual certificate $Q_G^{\cal T}$ is a dual certificate.
Note that to bound $D_L^s({\bar{\beta}},Q_G^{\cal T})$, we only need to assume restricted strong convexity inside ${\cal T}$,
which is weaker than globally defined restricted convexity in Section~\ref{sec:RSC}.
The construction of $Q_G^{\cal T}$ ensures that it satisfies the dual certificate definition in ${\cal T}$ according to
Definition~\ref{def:primal-dual-certificate}, in that given any $\beta \in {\cal T}: \innerprod{\nabla L(Q_G^{\cal T})-u_0}{\beta}=0$.
However, we still have to check that the condition (\ref{eq:dual-certificate})
holds for all $\beta \in {\bar\Omega}$ to ensure that $Q_G=Q_G^{\cal T}$
is a (globally defined) dual certificate. The sufficient condition is presented in the following proposition.
\begin{proposition}
Consider $Q_G^{\cal T}$ in (\ref{eq:dc-tangent-opt}). If $-\nabla L(Q_G^{\cal T}) -u_0 \in G_1$, then
$Q_G=Q_G^{\cal T}$ is a dual certificate that satisfies condition (\ref{eq:dual-certificate}).
\end{proposition}
Technically speaking, the tangent space dual certificate analysis is a generalization of the irrepresentable condition
for $\ell_1$ support recovery \cite{ZhaoYu06}. However, we are interested in oracle inequality rather than support recovery, and
in such context the analysis presented in this section generalizes those of \cite{CandesPlan09,CandesPlan11}.
\begin{definition}[Restricted Strong Convexity in Tangent Space]
Given a subspace ${\cal T}$ that contains ${\bar{\beta}}$,
we define the following quantity which we refer to as tangent space restricted strong convexity (TRSC) constant:
\[
\gamma_L^{\cal T}({\bar{\beta}};r,G,\|\cdot\|)= \inf \left\{ \frac{D_L^s(\beta,{\bar{\beta}})}{\|{\bar{\beta}}-\beta\|^2} :
\|\beta-{\bar{\beta}}\|\leq r; \beta-{\bar{\beta}} \in {\cal T};
D_L^s(\beta,{\bar{\beta}})+ \innerprod{u_0+\nabla L({\bar{\beta}})}{\beta-{\bar{\beta}}} \leq 0 \right\} ,
\]
where $\|\cdot\|$ is a norm, $r>0$ and $G \subset \partial R({\bar{\beta}})$.
\end{definition}
\begin{theorem}[Dual Certificate Error Bound in Tangent Space]
Let $\|\cdot\|_D$ and $\|\cdot\|$ be dual norms, and consider convex $G \subset \partial R({\bar{\beta}})$
with the decomposition (\ref{eq:G-tangent-decomp}).
If $\inf_{u \in G} \|u+\nabla L({\bar{\beta}})\|_D < r \cdot \gamma_L^{\cal T}({\bar{\beta}};r,G,\|\cdot\|)$ for some $r>0$, then
\[
D_L^s({\bar{\beta}},Q_G^{\cal T}) \leq (\gamma_L^{\cal T}({\bar{\beta}};r,G,\|\cdot\|))^{-1}\|u_0 + P_{\cal T} \nabla L({\bar{\beta}})\|_D^2 ,
\]
where $Q_G^{\cal T}$ is given by (\ref{eq:dc-tangent-opt}).
\label{thm:dual_certificate-tangent-error}
\end{theorem}
If the condition $\inf_{u \in G} \|u+\nabla L({\bar{\beta}})\|_D < r \cdot \gamma_L^{\cal T}({\bar{\beta}};r,G,\|\cdot\|)$ holds for some $r>0$,
then
Theorem~\ref{thm:dual_certificate-tangent-error} implies that (\ref{eq:dc-tangent-opt}) has a finite solution.
However, the bound using Theorem~\ref{thm:dual_certificate-tangent-error} may not be the sharpest possible.
For specific problems, better bounds may be obtained using more refined estimates
(for example, in \cite{HsKaTz11-robust}).
If $Q_G^{\cal T}$ is a globally defined dual certificate in that (\ref{eq:dual-certificate}) holds, then we immediately obtain
results analogous to Corollary~\ref{cor:recovery-global-dc-error} and Corollary~\ref{cor:recovery-global-dc-quadratic}.
Let ${\bar{\beta}}_*$ be the target parameter in the sense that $\nabla L({\bar{\beta}}_*)$ is small.
If we want to apply Theorem~\ref{thm:dual_certificate-oracle}
in tangent space analysis, it may be convenient to consider the following choice of $\beta^*$
instead of setting $\beta^*$ to be the target ${\bar{\beta}}_*$:
\begin{equation}
\beta^* = {\bar{\beta}}_* + \Delta \beta^* ,
\qquad \Delta \beta^* = \arg\min_{\Delta \beta \in {\cal T}} L({\bar{\beta}}_* + \Delta \beta) .
\label{eq:target-opt}
\end{equation}
The advantage of this choice is that $\beta^*$ is close to the target ${\bar{\beta}}_*$, and thus $\nabla L(\beta^*)$ is small.
Moreover,$\innerprod{\nabla L(\beta^*)}{\beta}=0$ for all $\beta \in {\cal T}$, which is convenient since it means
$\innerprod{\nabla \bar{L}_*({\bar{\beta}})}{\beta}=0$ for all $\beta \in {\cal T}$ with
$\bar{L}_*(\beta)= \bar{L}(\beta) - (\nabla \bar{L}({\bar{\beta}})-\nabla L(\beta^*))^\top (\beta-{\bar{\beta}})$.
For quadratic loss of (\ref{eq:quadratic-loss}), we have an analogy of Corollary~\ref{cor:recovery-global-dc-quadratic}.
Since $\innerprod{\cdot}{\cdot}$ becomes an inner product in a Hilbert space with ${\bar\Omega}={\bar\Omega}^*$,
we may further define the
orthogonal projection to ${\cal T}$ as $P_{\cal T}$ and to its orthogonal complements ${\cal T}^\perp$ as $P_{\cal T}^\perp$.
It is clear that in this case we also have $G_1 \subset {\cal T}^\perp$.
\begin{corollary} \label{cor:recovery-tangent-dc-quadratic}
Assume that $L(\beta)$ is a quadratic loss as in (\ref{eq:quadratic-loss}).
Consider convex $G \subset \partial R({\bar{\beta}})$ with decomposition in (\ref{eq:G-tangent-decomp}).
Consider $\beta^* \in {\bar\Omega}$ such that $2H\beta^*-z=\tilde{a}+\tilde{b}$ with $\tilde{a} \in {\cal T}$
and $\tilde{b} \in {\cal T}^\perp$.
Assume $H_{\cal T}$, the restriction of $H$ to ${\cal T}$, is invertible.
If $u_0 \in {\cal T}$, then let
\[
\Delta Q = - 0.5 H_{\cal T}^{-1} (u_0+\tilde{a}) =
\arg\min_{\Delta \beta \in {\cal T}} \left[ \innerprod{H \Delta \beta}{\Delta \beta} + \innerprod{u_0+\tilde{a}}{\Delta \beta} \right] .
\]
If $P_{\cal T}^\perp H H_{\cal T}^{-1} u_0 - \tilde{b} \in G_1$, then
\[
D_L({\hat{\beta}},\beta^*)+ [R({\hat{\beta}})- R_G({\hat{\beta}}) ] \leq
D_L({\bar{\beta}},\beta^*)+ 0.25 \innerprod{u_0+\tilde{a}}{H_{\cal T}^{-1} (u_0+\tilde{a})} .
\]
\end{corollary}
\begin{proof}
Let $Q_G={\bar{\beta}} + \Delta Q$,
then $Q_G$ is a generalized dual certificate that satisfies condition (\ref{eq:dual-certificate-2}) with
$\bar{L}=L$.
This is because
\begin{align*}
-\nabla \bar{L}_*(Q_G) -u_0 =& -2 H \Delta Q- \tilde{a}-\tilde{b} - u_0 \\
=& -2 H H_{\cal T}^{-1}(u_0+\tilde{a})- \tilde{a}-\tilde{b} - u_0 \\
=& - 2 P_{\cal T} H H_{\cal T}^{-1}(u_0+\tilde{a})- 2 P_{\cal T}^\perp H H_{\cal T}^{-1} (u_0 + \tilde{a}) - \tilde{a} - \tilde{b} - u_0 \\
=& P_{\cal T}^\perp H H_{\cal T}^{-1} (u_0+\tilde{a}) - \tilde{b} \in G_1 .
\end{align*}
We thus have
\[
D_L({\hat{\beta}},\beta^*)+ [R({\hat{\beta}})- R_G({\hat{\beta}}) ] \leq
D_L({\bar{\beta}},\beta^*)+ D_L({\bar{\beta}},Q_G) .
\]
Since $D_L({\bar{\beta}},Q_G)= \innerprod{H \Delta Q}{\Delta Q}=0.25 \innerprod{u_0+\tilde{a}}{H_{\cal T}^{-1} (u_0+\tilde{a})}$,
the desired bound follows.
\end{proof}
If $\beta^*$ is given by (\ref{eq:target-opt}), then $\tilde{a}=0$, and Corollary~\ref{cor:recovery-tangent-dc-quadratic}
can be further simplified.
\section{Structured $\ell_1$ regularizer}
\label{sec:struct-L1}
This section introduces a generalization of $\ell_1$ regularization for which the calculations
in the dual certificate analysis can be relatively easily performed. It should be noted that
the general theory of dual certificate developed earlier can be applied to other regularizers that
may not have the structured form presented here.
Recall that ${\bar\Omega}$ is a Banach space containing $\Omega$, ${\bar\Omega}^*$ is its dual,
and $\innerprod{u}{\beta}$ denotes $u(\beta)$ for linear functionals $u\in {\bar\Omega}^*$.
Let $E_0$ be either a Euclidean (thus $\ell_1$) space of a fixed dimension or a countably infinite dimensional $\ell_1$ space. We write any $E_0$-valued quantity as $a=(a_1,a_2,\ldots)^\top$ and
bounded linear functionals on $E_0$ as $w^\top a = \sum_j w_ja_j=\innerprod{w}{a}$,
with $w=(w_1,w_2,\ldots)^\top \in\ell_\infty$.
Let ${\mathscr M}$ be the space of all bounded linear maps from ${\bar\Omega}$ to $E_0$.
Let ${\mathscr A}$ be a class of linear mappings in ${\mathscr M}$. We may define a regularizer as follows:
\begin{equation}
R(\beta) = \|\beta\|_{\mathscr A}, \qquad \|\beta\|_{\mathscr A}= \sup_{A\in{\mathscr A}}\| A\beta\|_1.
\label{eq:struct-L1}
\end{equation}
As a maximum of seminorms, the regularizer $\|\beta\|_{\mathscr A}$
is clearly a seminorm in $\{\beta: R(\beta)<\infty\}$.
The choice of ${\mathscr A}$ is quite flexible.
We allow $R(\cdot)$ to have a nontrivial kernel $\hbox{\rm ker}(R)=\cap_{A\in{\mathscr A}}\hbox{\rm ker}(A)$.
Given the ${\mathscr A}$-norm $\|\cdot\|_{\mathscr A}$ on ${\bar\Omega}$, we may define its dual norm on ${\bar\Omega}^*$ as
\[
\|u\|_{{\mathscr A},D} = \sup \{ \innerprod{u}{\beta}: \|\beta\|_{\mathscr A} \leq 1\} .
\]
Since $\|\beta\|_{\mathscr A}$ may take zero-value even if $\beta \neq 0$;
this means that $\|u\|_{{\mathscr A},D}$ may take infinite value, which we will allow in the following discussions.
We call the class of regularizers defined in (\ref{eq:struct-L1}) structured-$\ell_1$ (or structured-Lasso) regularizers.
This class of regularizers contain enough structure so that dual certificate analysis can be carried out in generality.
In the following, we shall discuss various properties of structured $\ell_1$ regularizer
by generalizing the corresponding concepts of $\ell_1$ regularizer for sparse regression.
This regularizer obviously includes vector $\ell_1$ penalty as a special case.
In addition, we give two more structured regularization examples to illustrate the general applicability
of this regularizer.
\begin{example}\label{example:group-lasso}
Group $\ell_1$ penalty: Let $E_j$ be fixed Euclidean spaces,
$X_j:{\bar\Omega}\to E_j$ be fixed linear maps, $\lambda_j$ be fixed positive numbers,
and ${\mathscr A} = \big\{(v_1^\top X_1,v_2^\top X_2,\ldots)^\top:
v_j\in E_j, \|v_j\|_2\le \lambda_j\big\}$. Then,
\begin{eqnarray*}
R(\beta) = \sup_{A\in {\mathscr A}} \|A\beta\|_1 = \hbox{$\sum_j \lambda_j\|X_j\beta\|_2$.}
\end{eqnarray*}
\end{example}
\begin{example}\label{example:weighted-nuc}
Nuclear penalty: ${\bar\Omega}$ contains matrices of a fixed dimension.
Let $s_j(\beta)\ge s_{j+1}(\beta)$ denote the singular values of matrix $\beta$ and
${\mathscr A} = \big\{A: A\beta = (w_j(U^\top \beta V)_{jj}, j\ge 1),
U^\top U =I_r, V^\top V =I_r, r\ge 0, 0\le w_j\le \lambda\big\}$. Then,
the nuclear norm (or trace-norm) penalty for matrix $\beta$ is
\begin{eqnarray*}
R(\beta) = \sup_{A\in {\mathscr A}} \|A\beta\|_1 = \lambda \sum_j s_j(\beta).
\end{eqnarray*}
\end{example}
\subsection{Subdifferential}
We characterize the subdifferential of $R(\beta)$ by studying the maximum property of ${\mathscr A}$.
A set ${\mathscr A}$ is the largest class to generate (\ref{eq:struct-L1}) if for any $A_0\in{\mathscr M}$,
$\sup_{\beta\in{\bar\Omega}}\{\|A_0\beta\|_1-R(\beta)\} = 0$ implies $A_0\in{\mathscr A}$.
We also need to introduce additional notations.
\begin{definition}
Given any map $M\in{\mathscr M}$, define its dual map $M^*$ from $\ell_\infty$ to ${\bar\Omega}^*$
as: $\forall w\in\ell_\infty$, $M^* w$ satisfies $\innerprod{M^*w}{\beta} = w^\top(M\beta), \forall \beta \in {\bar\Omega}$.
Given any $w \in \ell_\infty$, define $w(\cdot)$ as a linear map from ${\mathscr M} \to {\bar\Omega}^*$
as $w(M)=M^* w$.
We also denote by $\overline{w({\mathscr A})}$ the closure of $w({\mathscr A})$ in ${\bar\Omega}^*$.
\end{definition}
The purpose of this definition is to introduce $e \in \ell_\infty$ so that
$R(\beta)$ can be written as
\[
R(\beta)=\sup_{A\in{\mathscr A}}\innerprod{e(A)}{\beta} = \sup_{u \in e({\mathscr A})}\innerprod{u}{\beta} .
\]
In this regard, one only needs to specifiy $e({\mathscr A})$ although for various problems it is more convenient to
specify ${\mathscr A}$.
Using this simpler representation, we have
the following result characterizes the sub-differentiable of structured $\ell_1$ regularizer.
\begin{proposition}\label{prop:struct-subdiff}
Let $E_1=\{w=(w_1,w_2,\ldots)^\top \in \ell_\infty: |w_j|=1\ \forall\ j\}$
and $e=(1,1,...)\in E_1$. \\
(i) A set ${\mathscr A}$ is the largest class generating $R(\beta)$ iff the following conditions hold:
(a) $w({\mathscr A})=e({\mathscr A})$ for all $w\in E_1$;
(b) ${\mathscr A}$ is convex;
(c) ${\mathscr A} = \cap_{w\in E_1}w^{-1}(\overline{e({\mathscr A})})$,
where $w^{-1}$ is the set inverse function. \\
(ii) Suppose ${\mathscr A}$ satisfied condition (a) in part (i). Then,
$R(\beta)=\sup_{A\in{\mathscr A}}\innerprod{e(A)}{\beta}$. \\
(iii) Suppose ${\mathscr A}$ satisfied conditions (a) and (b) in part (i). Then, for $R(\beta)<\infty$,
\begin{eqnarray*}
\partial R(\beta) = \{u\in \overline{e({\mathscr A})}: A\in{\mathscr A}, \innerprod{u}{\beta} = R(\beta)\}.
\end{eqnarray*}
\end{proposition}
In what follows, we assume ${\mathscr A}$ satisfied conditions (a) and (b) in (i). For notational
simplicity, we also assume $e({\mathscr A}) = \overline{e({\mathscr A})}$, which holds in the
finite-dimensional case for closed ${\mathscr A}$. This gives
\begin{eqnarray}\label{eq:struct-subdiff}
\partial R(\beta) = \{u\in e({\mathscr A}): A\in{\mathscr A}, \innerprod{u}{\beta} = R(\beta)\}.
\end{eqnarray}
Condition (c) in part (i) is then nonessential as it allows
permutation of elements in $A$. Condition (c) holds for the specified ${\mathscr A}$ in
Example \ref{example:weighted-nuc} but not in Example \ref{example:group-lasso}.
\begin{proof} We assume (a) since it is necessary for ${\mathscr A}$ to be maximal in part (i).
(ii) Under (a), $\sup_{A\in{\mathscr A}}\innerprod{e(A)}{\beta}
= \sup_{w\in E_1,A\in{\mathscr A}}\innerprod{w(A)}{\beta}
=\sup_{A\in{\mathscr A},w\in E_1}w^\top(A\beta)=R(\beta)$.
(i) We assume (b) since it is necessary. It suffices to prove the equivalence
between the following two conditions for each $A_0\in{\mathscr M}$:
$\sup_{\beta\in{\bar\Omega}}\{\|A_0\beta\|_1-R(\beta)\} = 0$
and $A_0 \in \cap_{w\in E_1}w^{-1}(\overline{e({\mathscr A})})$.
Let $A_0\in \cap_{w\in E_1}w^{-1}(\overline{e({\mathscr A})})$.
For any $\beta\in{\bar\Omega}$, there exists $w_0\in E_1$ such that
$\|A_0\beta\|_1=w_0^\top A_0\beta = \innerprod{w_0(A_0)}{\beta}$. Since
$A_0\in w_0^{-1}(\overline{e({\mathscr A})})$, $w_0(A_0)$ is the weak
limit of $e(A_k)$ for some $A_k\in A$. It follows that
$\|A_0\beta\|_1=\innerprod{w_0(A_0)}{\beta} = \lim_k\innerprod{e(A_k)}{\beta}
= \lim_k e^\top A_k\beta\le R(\beta)$. Now, consider
$A_0\not\in w_0^{-1}(\overline{e({\mathscr A})})$, so that $w_0(A_0)\not\in\overline{e({\mathscr A})}$.
This implies the existence of $\beta\in{\bar\Omega}$
with $\|A_0\beta\|_1\ge \innerprod{w_0(A_0)}{\beta} >
\sup_{A\in{\mathscr A}}\innerprod{e(A)}{\beta} =R(\beta)$.
(iii) If $R(\beta)= \innerprod{u}{\beta}$ with $u\in \overline{e(A)}$, then
$R(b)-R(\beta) \ge \innerprod{u}{b} - \innerprod{u}{\beta}
= \innerprod{u}{b-\beta}$ for all $b$, so that $u\in\partial R(\beta)$.
Now, suppose $v\in\partial R(\beta)$, so that
$R(b)-R(\beta)\ge \innerprod{v}{b-\beta}$ for all $b\in{\bar\Omega}$.
Since $R(b)$ is a seminorm, taking $b=t\beta$ yields $R(\beta)=\innerprod{v}{\beta}$.
Moreover, $\innerprod{v}{b-\beta}\le R(b-\beta)$ implies $v\in\overline{e(A)}$.
The proof is complete.
\end{proof}
\subsection{Structured Sparsity}
\label{sec:struct-tangent}
An advantage of the structured $\ell_1$ regularizer, compared with a general seminorm,
is to allow the following notion of {\em structured sparsity}.
A vector ${\bar{\beta}}$ is sparse in the structure ${\mathscr A}$ if
\begin{eqnarray}\label{eq:struct-sparse}
\exists W\in {\mathscr A}: \quad R({\bar{\beta}}) = \innerprod{e(W)}{{\bar{\beta}}},\quad S = {\mathrm{supp}}(W{\bar{\beta}}),
\end{eqnarray}
for certain set $S$ of relatively small cardinality. This means a small
structured $\ell_0$ ``norm'' $\|W{\bar{\beta}}\|_0$. In
Example \ref{example:weighted-nuc}, this means $\beta$ has low rank.
Let $e_S$ be the 0-1 valued
$\ell_\infty$ vector with 1 on $S$ and 0 elsewhere.
If $A\in{\mathscr A}$ can be written as $A=(W_S^\top,B_{S^c}^\top)^\top$,
then $\|A{\bar{\beta}}\|_1=\|W_S{\bar{\beta}}\|_1+\|B_{S^c}{\bar{\beta}}\|_1\le R({\bar{\beta}})$, which
implies $\|B_{S^c}{\bar{\beta}}\|_1=0$ by (\ref{eq:struct-sparse}).
By (\ref{eq:struct-subdiff}),
$e(A)=e((W_S^\top,B_{S^c}^\top)^\top) =e_S(W) + e_{S^c}(B) \in \partial R({\bar{\beta}})$. Thus, we may choose
\begin{eqnarray}\label{eq:structG}
G_{{\mathscr B}} = \big\{e_S(W) + e_{S^c}(B) , B_{S^c}\in {\mathscr B} \big\}
\subseteq \partial R({\bar{\beta}})
\end{eqnarray}
for a certain class ${\mathscr B} \subseteq \{B_{S^c}: (W_S^\top,B_{S^c}^\top)^\top\in {\mathscr A}\}$.
Now let $G=G_{{\mathscr B}}$.
Since members of $G$ can be written as $e_S(W)+e_{S^c}(B), B \in {\mathscr B}$, this gives a decomposition
of $G$ as in (\ref{eq:G-tangent-decomp}) with
$G_0=\{u_0\}=\{e_S(W)\}$ and $G_1=e_{S^c}({\mathscr B})$.
Since $B{\bar{\beta}}=0$ for $B\in {\mathscr B}$, we have
\begin{eqnarray*}
R_G(\beta) = R({\bar{\beta}}) + \sup_{u\in G}\innerprod{u}{\beta-{\bar{\beta}}}
= \innerprod{e_S(W)}{\beta} + \sup_{B\in{\mathscr B}}\innerprod{e_{S^c}(B)}{\beta}.
\end{eqnarray*}
Unless otherwise stated, we assume the following conditions on ${\mathscr B}$:
(a) $w_{S^c}({\mathscr B})=e_{S^c}({\mathscr B})$ for all $w\in E_1$;
(b) ${\mathscr B}$ is convex; (c) $e_{S^c}({\mathscr B})$ is closed in ${\bar\Omega}^*$.
This is always possible since they match the assumed conditions on ${\mathscr A}$.
Under these conditions, Proposition \ref{prop:struct-subdiff} gives
\[
\sup_{B\in{\mathscr B}}\innerprod{e_{S^c}(B)}{\beta}= \sup_{B\in{\mathscr B}}\|B\beta\|_1 = \|\beta\|_{\mathscr B} .
\]
It's dual norm can be defined on ${\bar\Omega}^*$ as
\[
\|u\|_{{\mathscr B},D}=\sup \left\{\innerprod{u}{\beta} : \|\beta\|_{\mathscr B} \leq 1 \right\} .
\]
This leads to the following simplified expression:
\begin{eqnarray}\label{eq:structR_G}
R_G(\beta) = R({\bar{\beta}}) + \sup_{u\in G}\innerprod{u}{\beta-{\bar{\beta}}}
= \innerprod{e_S(W)}{\beta} + \|\beta\|_{\mathscr B} .
\end{eqnarray}
Since $B{\bar{\beta}}=0$ for all $B \in {\mathscr B}$, ${\mathscr B}$ may be used to represent
a generalization of the zero coefficients of ${\bar{\beta}}$, while $W_S$ can be used to represent
a generalization of the sign of ${\bar{\beta}}$.
The larger the class ${\mathscr B}$ is, the more zero-coefficients ${\bar{\beta}}$ has (thus ${\bar{\beta}}$ is sparser).
One may always choose ${\mathscr B}=\emptyset$ when ${\bar{\beta}}$ is not sparse.
\subsection{Tangent Space}
Given a convex function $\phi(\beta)$ and a point ${\bar{\beta}}\in\Omega$,
$b\in{\bar\Omega}$ is a primal tangent vector if $\phi({\bar{\beta}} + tb)$
is differentiable at $t=0$. This means the equality of the left- and right-derivatives
of $\phi({\bar{\beta}} + tb)$ at $t=0$. If $\phi(\beta)$ is a seminorm and ${\bar{\beta}}\neq 0$,
$\phi({\bar{\beta}}+t{\bar{\beta}})=(1+t)\phi({\bar{\beta}})$ for all $|t|<1$, so that ${\bar{\beta}}$ is always
a primal tangent vector at ${\bar{\beta}}$.
If $\innerprod{u}{b}< \innerprod{v}{b}$ for $\{u,v\}\in\partial \phi({\bar{\beta}})$, then
\begin{eqnarray*}
\{\phi({\bar{\beta}})-\phi({\bar{\beta}} - tb)\}/(0-t) \le \innerprod{u}{b}
< \innerprod{v}{b} \le \{\phi({\bar{\beta}}+tb)-\phi({\bar{\beta}})\}/t,\ \forall t>0,
\end{eqnarray*}
so that $\phi({\bar{\beta}} + tb)$ cannot be differentiable at $t=0$. This motivates
the following definition of the (primal) tangent space of a regularizer at a point ${\bar{\beta}}$
and its dual complement.
\begin{definition}\label{def:struct-tangent}
Given a convex regularizer $R(\beta)$, a point ${\bar{\beta}}\in\Omega$,
and a class $G\subseteq\partial R({\bar{\beta}})$, we define the corresponding tangent space as
\begin{eqnarray*}
{\cal T} = {\cal T}_G = \big\{b \in {\bar\Omega}: \innerprod{u-v}{b}=0\ \forall u\in G, v\in G\big\}
= \cap_{u,v\in G}\hbox{\rm ker}(u-v).
\end{eqnarray*}
The dual complement of ${\cal T}$, denoted by ${\cal T}^\perp$, is defined as
\begin{eqnarray*}
{\cal T}^\perp = {\cal T}_G^\perp =\hbox{closure}\Big\{u: u\in {\bar\Omega}^*,
\innerprod{u}{b}=0 \text{ for all } b \in {\cal T} \Big\}.
\end{eqnarray*}
When $\innerprod{\cdot}{\cdot}$ is an inner product, ${\bar\Omega}={\bar\Omega}^*$ and
${\cal T}^\perp$ is the orthogonal complement of ${\cal T}$ in ${\bar\Omega}$.
\end{definition}
\begin{remark}\label{remark:proj}
Let ${\cal T}$ be any closed subspace of ${\bar\Omega}$.
A map $P_{{\cal T}}: {\bar\Omega}\to{\bar\Omega}$ is a projection to ${\cal T}$ if $P_{{\cal T}}\beta=\beta$
is equivalent to $\beta\in\cal T$. For such $P_{{\cal T}}$, its dual $P_{{\cal T}}^*:{\bar\Omega}^*\to{\bar\Omega}^*$, defined by $\innerprod{P_{{\cal T}}^* v}{\beta} = \innerprod{v}{P_{{\cal T}}\beta}$,
is a projection from ${\bar\Omega}^*\to P_{{\cal T}}^*{\bar\Omega}^*$.
The image of $P_{{\cal T}}^*$, ${\cal T}^* = P_{{\cal T}}^*{\bar\Omega}^*$, is a dual
of ${\cal T}$. Since $P_{{\cal T}}$ and $P_{{\cal T}}^*$ are projections,
$v- P_{{\cal T}}^*v\in {\cal T}^\perp$ for all $v\in{\bar\Omega}^*$ and
$\beta - P_{{\cal T}}\beta \in ({\cal T}^*)^\perp$ for all $\beta \in{\bar\Omega}$.
\end{remark}
The above definition is general. For the structured $\ell_1$ penalty, we let $G$ be as in (\ref{eq:structG}),
we obtain by (\ref{eq:struct-subdiff}) that ${\bar{\beta}}\in {\cal T}$.
The default conditions on ${\mathscr B}$ implies $0\in {\mathscr B}$, so that
\begin{eqnarray*}
{\cal T} = \big\{\beta: \innerprod{e_{S^c}(B)}{\beta} = 0\ \forall B\in{\mathscr B} \big\} = \cap_{B\in{\mathscr B}}\hbox{\rm ker}(B).
\end{eqnarray*}
Since $G_1=e_{S^c}({\mathscr B})$, this is consistent with the definition of Section~\ref{sec:TRSC}.
The dual complement of ${\cal T}$ is
\begin{eqnarray*}
{\cal T}^\perp = \hbox{ the closure of the linear span of }\{e_{S^c}(B): B\in{\mathscr B} \}.
\end{eqnarray*}
\subsection{Interior Dual Certificate and Tangent Sparse Recovery Analysis}
Consider a structured $\ell_1$ regularizer, a sparse ${\bar{\beta}} \in \Omega$, and a set
$G_{{\mathscr B}} \subset\partial R({\bar{\beta}})$ as in (\ref{eq:structG}).
In the analysis of (\ref{eq:hbeta}) with structured $\ell_1$ regularizer, members of
the following subclass of $G_{{\mathscr B}}$ often appear.
\begin{definition}[Interior Dual Certificate] \label{def:interior-dc}
Given $G_{{\mathscr B}}$ in (\ref{eq:structG}),
$v_0$ is an interior dual certificate if
\begin{eqnarray*}
v_0\in G_{{\mathscr B}},\ \innerprod{v_0-e_S(W)}{\beta}\le \eta_\beta \|\beta\|_{\mathscr B} \
\hbox{ for some $0\le \eta_\beta < 1$ for all $\beta$.}
\end{eqnarray*}
\end{definition}
Note that in the above definition, we refer to the dual variable $v_0$ as a ``dual certificate'' to be consistent with the
literature. This should not be confused with the notation of primal dual certificate $Q_G$ defined earlier.
A direct application of interior dual certificate is the following extension
of sparse recovery theory to general structured $\ell_1$ regularization.
Suppose we observe a map $X:{\bar\Omega} \to V$ with a certain linear space
$V$. Suppose there is no noise so that $X{\bar{\beta}}_* = y$ and ${\bar{\beta}}={\bar{\beta}}_*$ is sparse.
Then the $R(\beta)$ minimization method for the recovery of ${\bar{\beta}}$ is
\begin{eqnarray}\label{eq:hbeta-sparse-recover}
{\hat{\beta}} = \mathop{\rm arg\, min}\Big\{R(\beta): X\beta = y\Big\}.
\end{eqnarray}
The following theorem provides sufficient conditions for the recovery of ${\bar{\beta}}$ by ${\hat{\beta}}$.
\begin{theorem}\label{thm:struct-recover}
Suppose ${\bar{\beta}}$ is sparse in the sense of (\ref{eq:struct-sparse}).
Let $G$ be as in (\ref{eq:structG}) and ${\cal T}$ be as in Definition \ref{def:struct-tangent}.
Let $V^*$ be the dual of $V$, $X^*: V^*\to {\bar\Omega}^*$ the dual of $X$,
$P_{{\cal T}}$ a projection to ${\cal T}$, $P_{\cal}^*$ the dual of $P_{\cal}$ to ${\cal T}^*$,
and $V_T=XP_{{\cal T}}{\bar\Omega}$.
Suppose $(XP_{{\cal T}})^*$, the dual of $XP_{{\cal T}}$, is a bijection from $V_T^*$ to $T^*$
and $e_S(W)\in T^*$.
Define $v_0 = X^*((XP_{{\cal T}})^*)^{-1}e_S(W)$. If $v_0$ is an interior dual certificate, then
\begin{eqnarray*}
{\hat{\beta}} = {\bar{\beta}} \hbox{ is the unique solution of
(\ref{eq:hbeta-sparse-recover}).}
\end{eqnarray*}
Moreover, $v_0$ is an interior dual certificate iff for all $\beta$, there exists $\eta_\beta <1$ such that
$\innerprod{v_0 - P_{{\cal T}}^*v_0}{\beta} \leq \eta_\beta \sup_{B\in{\mathscr B}}\|B\beta\|_1$.
\end{theorem}
In matrix completion, this matches the duel certificate
condition for recovery of low rank ${\bar{\beta}}$ by constrained minimization of the nuclear
penalty \cite{CandesR09,Recht09}.
\begin{proof} Suppose $v_0$ is an interior dual certificate
of the form $v_0=e_S(W)+e_{S^c}(B_0)$. Then, for all $\beta$ such that
$X\beta = y = X{\bar{\beta}}$,
\begin{eqnarray*}
R(\beta) - R({\bar{\beta}}) &=&
R(\beta) - R({\bar{\beta}}) - \innerprod{((XP_{{\cal T}})^*)^{-1}e_S(W)}{X(\beta-{\bar{\beta}})}\\
&=& R(\beta) - R({\bar{\beta}}) - \innerprod{v_0}{\beta-{\bar{\beta}}}
\cr &\ge & \sup_{u\in G_{\mathscr B}}\innerprod{u-v_0}{\beta-{\bar{\beta}}}
\cr &=& \sup_{B\in{\mathscr B}}\|B\beta\|_1 - \innerprod{e_{S^c}(B_0)}{\beta-{\bar{\beta}}}
\cr &\ge& (1-\eta_\beta)\sup_{B\in {\mathscr B}}\|B\beta\|_1 .
\end{eqnarray*}
with $\eta_\beta<1$. The first equation uses $X\beta=X{\bar{\beta}}$, and the second equation uses
the definition $v_0=X^*((XP_{{\cal T}})^*)^{-1}e_S(W)$.
Since (\ref{eq:hbeta-sparse-recover}) is constrained to $X\beta = y = X{\bar{\beta}}$, the above inequality means that
${\bar{\beta}}$ is a solution of (\ref{eq:hbeta-sparse-recover}). It remains to prove its
uniqueness. Let $\beta$ be another solution of (\ref{eq:hbeta-sparse-recover}).
Since $1-\eta_\beta>0$, if $R(\beta)=R({\bar{\beta}})$, then the above inequality implies that
$\max_{B\in {\mathscr B}}\|B\beta\|_1=0$, so that $\beta\in {\cal T}$.
Since ${\bar{\beta}}\in{\cal T}$, $XP_{{\cal T}}(\beta-{\bar{\beta}})=X(\beta-{\bar{\beta}})=0$.
This implies $\beta-{\bar{\beta}}=0$, since the invertibility of $(XP_{{\cal T}})^*$
implies ${\cal T}\cap \hbox{\rm ker}(XP_{{\cal T}}) = \{0\}$.
\end{proof}
When noise is present, we may
employ the construction of Section~\ref{sec:TRSC}.
For structured-$\ell_1$ regularizer, the analysis can be further simplified if we assume that
there exists a target vector $\beta^*$ having the following property:
\begin{equation}
\nabla L(\beta^*) = \tilde{a} + \tilde{b},
\label{eq:target}
\end{equation}
with a small $\tilde{a}$, and $\tilde{b}$ satisfies the condition
\[
\tilde{\eta} = \|\tilde{b}\|_{{\mathscr B},D} < 1 .
\]
Recall that the dual norm $\|\cdot\|_{{\mathscr B},D}$ of $\|\cdot\|_{\mathscr B}$ is defined as
$\|\tilde{b}\|_{{\mathscr B},D}=\sup \left\{\innerprod{\tilde{b}}{\beta} : \|\beta\|_{\mathscr B} \leq 1 \right\}$.
The condition means that there exists $\tilde{B} \in {\mathscr B}$ such that
$\tilde{b}= \tilde{w}_{S^c}(\tilde{B})$ with $\|\tilde{w}\|_\infty \leq \tilde{\eta}$.
For such a target vector $\beta^*$, we will further consider an interior subset $G \subset G_{{\mathscr B}}$ in (\ref{eq:structG}) with some $\eta \in [\tilde{\eta},1]$:
\begin{equation}
G=\{e_S(W)+\eta e_{S^c}(B): B \in {\mathscr B}\} \label{eq:structG-int} .
\end{equation}
It follows that
\[
R(\beta)-R_G(\beta) \geq R_{G_{\mathscr B}}(\beta) - R_G(\beta) \geq \eta \|\beta\|_{\mathscr B}
\]
and
\begin{eqnarray*}
\sup_{u\in G}\innerprod{u+\nabla L(\beta^*)}{\beta-{\bar{\beta}}}
&=& \innerprod{e_S(W)+\tilde{a}}{\beta-{\bar{\beta}}}
+ \sup_{u\in G}\innerprod{e_{S^c}(B)+\tilde{\eta} e_{S^c}(\tilde{B})}{\beta-{\bar{\beta}}}
\cr &\ge& \innerprod{e_S(W)+\tilde{a}}{\beta-{\bar{\beta}}}
+ (\eta- \tilde{\eta})\|\beta-{\bar{\beta}}\|_{\mathscr B} .
\end{eqnarray*}
This estimate can be directly used in the definition of RSC in Corollary \ref{cor:recovery-global-dc-oracle}.
One way to construct such a target vector $\beta^*$ is using (\ref{eq:target-opt}).
In this case we may further assume that $\tilde{a}=0$ because
$\innerprod{\nabla L(\beta^*)}{\beta}=0$ for any $\beta \in {\cal T}$.
In general condition (\ref{eq:target}) is relatively easy to satisfy under the usual stochastic noise model
with a small $\bar{a}$ since $\nabla L(\beta^*)$ is small.
In the special setting of Theorem~\ref{thm:struct-recover}, we have $\nabla L(\beta^*)=0$ with $\beta^*={\bar{\beta}}={\bar{\beta}}_*$.
For simplicity, in the following we will consider quadratic loss of the
form (\ref{eq:quadratic-loss}) and apply Corollary~\ref{cor:recovery-tangent-dc-quadratic}.
Consider $G$ in (\ref{eq:structG-int}), $\beta^*$ in (\ref{eq:target}) with $\tilde{a} \in {\cal T}$ ($\tilde{b} \in {\cal T}^\perp$),
and $Q_G^{\cal T}$
defined as in (\ref{eq:dc-tangent-opt}) but with $L(\beta)$ replaced by
$\bar{L}_*(\beta)= L(\beta) - (\nabla L({\bar{\beta}})-\nabla L(\beta^*))^\top (\beta-{\bar{\beta}})$, which can be equivalently written as
\[
Q_G^{\cal T} = {\bar{\beta}} + \Delta Q, \quad
\Delta Q= - 0.5 H_{\cal T}^{-1} (e_S(W)+\tilde{a}) .
\]
This is consistent with the construction of Theorem~\ref{thm:struct-recover} in the sense that in the
noise-free case, we can let $H=X^\top X$ and $v_0=-2H \Delta Q= H H_{\cal T}^{-1} e_S(W)$ with $\tilde{a}=0$.
We assume that the following condition holds for all $\beta$:
\begin{equation}
\| P_{\cal T}^\perp H H_{\cal T}^{-1} (e_S(W)+\tilde{a}) - \tilde{b}\|_{{\mathscr B},D} \leq \eta ,
\label{eq:irrep-struct}
\end{equation}
which is consistent with the noise free interior dual certificate existence condition in Theorem~\ref{thm:struct-recover}
by setting $\eta_\beta=\eta$.
The condition is a direct generalization of the strong irrepresentable condition for $\ell_1$ regularization in
\cite{ZhaoYu06} to structured $\ell_1$ regularization.
Under this condition, $Q_G^{\cal T}$ is a dual certificate that satisfies the generalized
condition (\ref{eq:dual-certificate-2}) in
Definition~\ref{def:primal-dual-certificate-2} with $\bar{L}=L$ and $\delta=0$.
Corollary~\ref{cor:recovery-tangent-dc-quadratic} implies that
\[
D_L(\beta^*,{\hat{\beta}})+ (1-\eta) \|{\hat{\beta}}\|_{\mathscr B}
\leq D_L(\beta^*,{\bar{\beta}}) + 0.25 \innerprod{e_S(W)+\tilde{a}}{H_{\cal T}^{-1} (e_S(W)+\tilde{a})} .
\]
\subsection{Recovery Analysis with Global Restricted Strong Convexity}
We can also employ the dual certificate construction of Section~\ref{sec:RSC}
with $G$ in (\ref{eq:structG-int}) and $\beta^*={\bar{\beta}}$.
Corollary~\ref{cor:recovery-global-dc-error} implies the following result:
\[
D_L({\bar{\beta}},{\hat{\beta}}) + (1-\eta) \|{\hat{\beta}}\|_{\mathscr B}
\leq \gamma_L({\bar{\beta}};r,G,\|\cdot\|)^{-1} \|e_S(W) +\tilde{a}\|_D^2 ,
\]
where $\gamma_L({\bar{\beta}};r,G,\|\cdot\|)$ is lower bounded by
\[
\inf \left\{ \frac{D_L^s(\beta,{\bar{\beta}})}{\|{\bar{\beta}}-\beta\|^2} :
\|\beta-{\bar{\beta}}\|\leq r; \;
D_L^s(\beta,{\bar{\beta}})+ (\eta-\tilde{\eta}) \|\beta-{\bar{\beta}}\|_{\mathscr B} +
\innerprod{e_S(W) + \tilde{a}}{\beta-{\bar{\beta}}} \leq 0 \right\} .
\]
We may also consider a more general $\beta^*$ instead of assuming $\beta^*={\bar{\beta}}$.
For example, consider the definition of $\beta^*$ in (\ref{eq:target-opt}), which implies that $\tilde{a}=0$
or simply let $\beta^*={\bar{\beta}}_*$.
We can apply Corollary~\ref{cor:recovery-global-dc-quadratic} to the
quadratic loss function of (\ref{eq:quadratic-loss}). It implies
\begin{equation}
D_L(\beta^*,{\hat{\beta}})+ (1-\eta) \sup_{B \in {\mathscr B}} \|B {\hat{\beta}}\|_1
\leq D_L(\beta^*,{\bar{\beta}}) +
(2\gamma_{\bar{L}_*}({\bar{\beta}};\infty,G,\|\cdot\|))^{-1} \|\tilde{a}+e_S(W)\|_D^2 ,
\label{eq:recovery-global-dc-quadratic-struct}
\end{equation}
where $\gamma_{\bar{L}_*}({\bar{\beta}};\infty,G,\|\cdot\|)$ is lower bounded by
\[
\inf \left\{ \frac{2\innerprod{H\beta}{\beta}}{\|\beta\|^2} :
2\innerprod{H\beta}{\beta}
+ (\eta-\tilde{\eta}) \|\beta\|_{\mathscr B} +
\innerprod{e_S(W)+\tilde{a}}{\beta} \leq 0 \right\} .
\]
\subsection{Recovery Analysis with Gaussian Random Design}
\label{sec:gordon-struct}
We can also apply the results of Section~\ref{sec:gordon}
by considering quadratic loss with Gaussian random design matrix in (\ref{eq:gaussian-design}).
We can use the following proposition
\begin{proposition}
If $\tilde{\eta}<\eta$ and $\epsilon \sim N(0,I_{p \times p})$, then
\begin{align*}
{\mathbf E}_{\epsilon}^2 \inf_{u \in G; \gamma >0} \|\gamma(u+\nabla L(\beta^*)) - \epsilon\|_2
\leq
\inf_{\gamma>0}
{\mathbf E}_{\epsilon} \inf_{B \in {\mathscr B}} \| \gamma (e_S(W) +\tilde{a} +(\eta-\tilde{\eta})e_S(B)) - \epsilon\|_2^2
.
\end{align*}
\end{proposition}
Therefore we may apply Theorem~\ref{thm:recovery-gaussian}, which implies that
given any $g,\delta \geq 0$ such that $g+\delta \leq n/\sqrt{n+1}$, with probability at least
\[
1 - \frac{1}{2}\exp \left(-\frac{1}{2} (n/\sqrt{n+1}-g-\delta)^2\right) ,
\]
we have either $\tilde{\eta} \geq \eta$, or
\[
\|X({\hat{\beta}}-\beta^*)\|_2^2 + (1-\eta) \|{\hat{\beta}}\|_{\mathscr B} \leq
\|X({\bar{\beta}}-\beta^*)\|_2^2 +
(4\delta)^{-1} \|e_S(W) +\tilde{a}\|_2^2 ,
\]
or
\[
g^2 <
\inf_{\gamma>0}
{\mathbf E}_{\epsilon \sim N(0,I_{p \times p})} \inf_{B \in {\mathscr B}} \| \gamma (e_S(W) +\tilde{a} +(\eta-\tilde{\eta}) e_S(B)) - \epsilon\|_2^2 .
\]
\subsection{Parameter Estimation Bound}
Generally speaking, the technique of dual certificate allows us to directly obtain an oracle inequality
\begin{equation}
D_L({\hat{\beta}},\beta^*)+ (1-\eta) \|{\hat{\beta}}\|_{\mathscr B}\leq \delta \label{eq:struct-oracle}
\end{equation}
for some $\delta >0$.
If $\delta$ is small (in such case, ${\bar{\beta}}$ should be close to $\beta^*$),
then we may also be interested in parameter estimation bound
$\|{\hat{\beta}}-\beta^*\|$. In such case, additional estimates will be needed on top of the dual certificate theory of this paper.
This section demonstrate how to obtain such a bound from (\ref{eq:struct-oracle}).
Although parameter estimation bounds can be obtained for general loss functions $L(\cdot)$,
they involve relatively complex notations.
In order to illustrate the main ideas while avoiding unnecessary complexity, in the following we
will only consider the quadratic loss case, where $\innerprod{\cdot}{\cdot}$ is an inner product.
\begin{proposition} \label{prop:param-est}
Assume that $L(\cdot)$ is the quadratic loss function given by (\ref{eq:quadratic-loss}).
Consider any subspace ${\tilde{\cal T}}$ that contains the tangent space ${\cal T}$.
Let $\delta' = \delta/(1-\eta) + \|P_{\cal T}^\perp \beta^*\|_{\mathscr B}$ with $\delta$ given by (\ref{eq:struct-oracle}).
Define the correlation between ${\tilde{\cal T}}$ and ${\tilde{\cal T}}^\perp$ as:
\[
\mathrm{cor}({\tilde{\cal T}},{\tilde{\cal T}}^\perp)= \sup \left\{ |\innerprod{H P_{\tilde{\cal T}} \beta}{P_{\tilde{\cal T}}^\perp \beta}|/ \innerprod{H P_{\tilde{\cal T}} \beta}{P_{\tilde{\cal T}} \beta}^{1/2} :
\beta^* + \beta \in \Omega, \|\beta\|_{\mathscr B} \leq \delta' \right\} .
\]
Let $\Delta={\hat{\beta}}-\beta^*$. Then,
$\|\Delta \|_{\mathscr B} \leq \delta'$, and
\[
\innerprod{H_{\tilde{\cal T}} P_{\tilde{\cal T}} \Delta}{P_{\tilde{\cal T}} \Delta}^{1/2} \leq \sqrt{(1-\eta) \delta'} + 2 \mathrm{cor}({\tilde{\cal T}},{\tilde{\cal T}}^\perp) .
\]
\end{proposition}
\begin{proof}
We have
\begin{align*}
&\innerprod{H_{\tilde{\cal T}} P_{\tilde{\cal T}} \Delta}{P_{\tilde{\cal T}} \Delta}
+ 2 \innerprod{H P_{\tilde{\cal T}} \Delta}{P_{\tilde{\cal T}}^\perp \Delta} +
(1-\eta) \|\Delta \|_{\mathscr B} \\
\leq&\innerprod{H_{\tilde{\cal T}} P_{\tilde{\cal T}} \Delta}{P_{\tilde{\cal T}} \Delta}
+ 2 \innerprod{H P_{\tilde{\cal T}} \Delta}{P_{\tilde{\cal T}}^\perp \Delta} +
\innerprod{H_{\tilde{\cal T}} P_{\tilde{\cal T}}^\perp \Delta}{P_{\tilde{\cal T}}^\perp \Delta} +
(1-\eta) \|{\hat{\beta}} \|_{\mathscr B} +
(1-\eta) \|\beta^* \|_{\mathscr B} \\
=& D_L({\hat{\beta}},\beta^*) + (1-\eta) \|{\hat{\beta}}\|_{\mathscr B} + (1-\eta) \|P_{\cal T}^\perp \beta^*\|_{\mathscr B}
\leq (1-\eta) \delta' ,
\end{align*}
where we have used the fact that $\|\beta^*\|_{\mathscr B}=\|P_{\cal T}^\perp \beta^*\|_{\mathscr B}$.
This means that if we let $\beta=\Delta$, then we have
$\|\beta \|_{\mathscr B} \leq 1$, and $\beta^* + \beta \in \Omega$.
Let $x^2=\innerprod{H_{\tilde{\cal T}} P_{\tilde{\cal T}} \Delta}{P_{\tilde{\cal T}} \Delta}$, we have
$\innerprod{H P_{\tilde{\cal T}} \Delta}{P_{\tilde{\cal T}}^\perp \Delta} =x \innerprod{H P_{\tilde{\cal T}} \beta}{P_{\tilde{\cal T}}^\perp \beta}/ \innerprod{H P_{\tilde{\cal T}} \beta}{P_{\tilde{\cal T}} \beta}^{1/2}$. It follows that
\[
x^2- 2 x \mathrm{cor}({\tilde{\cal T}},{\tilde{\cal T}}^\perp) \leq (1-\eta) \delta' .
\]
Solving for $x$ leads to the desired bound.
\end{proof}
Clearly, we can have a cruder estimate:
\[
\mathrm{cor}({\tilde{\cal T}},{\tilde{\cal T}}^\perp)
\leq \sup \{ \innerprod{H P_{\tilde{\cal T}}^\perp \beta}{P_{\tilde{\cal T}}^\perp \beta}^{1/2} : \beta^* + \beta \in \Omega, \|\beta\|_{\mathscr B} \leq \delta'\} .
\]
The bound in Proposition~\ref{prop:param-est} is useful when $H$ is invertible on ${\tilde{\cal T}}$:
\[
\innerprod{H \beta}{\beta} \geq \gamma_{{\tilde{\cal T}}} \innerprod{\beta}{\beta} \quad \forall \beta \in {\tilde{\cal T}} ,
\]
which leads to a bound on $\|P_{\tilde{\cal T}} \Delta\|_2$.
Although one may simply choose ${\tilde{\cal T}}={\cal T}$, the resulting bound may be suboptimal, as we shall see later on.
Therefore it can be beneficial to choose a larger ${\tilde{\cal T}}$.
Examples of this result will be presented in Section~\ref{sec:examples}.
\section{Examples}
\label{sec:examples}
We will present a few examples to illustrate the analysis as well as concrete substantiations of the relatively
abstract notations we have used so far.
\subsection{Group $\ell_1$ Least Squares Regression}
We assume that ${\bar\Omega} = {\mathbb{R}}^p$, and consider the model
\[
Y= X {\bar{\beta}}_* + \epsilon
\]
with the least squares loss function (\ref{eq:gaussian-design}).
This corresponds to the quadratic loss (\ref{eq:quadratic-loss}) with $H=X^\top X$ and $z=2X^\top Y$.
The inner product is Euclidean: $\innerprod{u}{{b}}=u^\top {b}$.
Now, we assume that $p=q m$, and the variables $\{1,\ldots,p\}$ are divided into $q$ non-overlapping blocks
${\Gamma}_1,\ldots,{\Gamma}_{q} \subset \{1,\ldots,p\}$ of size $m$ each.
One method to take advantage of the group structure is to use the group Lasso method \cite{YuanLin06} with
\begin{equation}
R(\beta)= \lambda \|\beta\|_{{\Gamma},1} , \qquad \|\beta\|_{{\Gamma},1}=\sum_{j=1}^q \|\beta_{{\Gamma}_j}\|_2 .
\label{eq:group-L1}
\end{equation}
Its dual norm is
\[
\|\beta\|_{{\Gamma},\infty} = \max_j \|\beta_{{\Gamma}_j}\|_2 .
\]
Group $\ell_1$ regularization
includes the standard $\ell_1$ regularization as a special case, where we choose $m=1$, $q=p$, and ${\Gamma}_j=\{j\}$.
Group-$\ell_1$ regularizer is a special case of (\ref{eq:struct-L1}), where we have
\[
{\mathscr A}=\{A=(a_j): A \beta=(a_j^\top \beta)_{j=1,\ldots,q}: a_j \in {\mathbb{R}}^p, \|a_j\|_2 \leq \lambda, \; {\mathrm{supp}}(a_j) \subset {\Gamma}_j\} .
\]
For a group sparse ${\bar{\beta}}$, its group support is the smallest $S \subset \{1,\ldots,q\}$
such that ${\mathrm{supp}}({\bar{\beta}}) \subset {\mathbf S}=\cup_{k \in S} {\Gamma}_k$.
We may define ${\mathrm{sgn}}_{\Gamma}({\bar{\beta}}_{{\Gamma}_j})$ to be ${\mathrm{sgn}}_{\Gamma}({\bar{\beta}}_{{\Gamma}_j})={\bar{\beta}}_{{\Gamma}_j}/\|{\bar{\beta}}_{{\Gamma}_j}\|_2$
when $j \in S$, and ${\mathrm{sgn}}_{\Gamma}({\bar{\beta}}_{{\Gamma}_j})=0$ when $j \notin S$.
Using notations in Section~\ref{sec:struct-L1}, we may take $W=(\lambda {\mathrm{sgn}}_{\Gamma}({\bar{\beta}}_{{\Gamma}_j}))_{j=1,\ldots,q}$, and
${\mathscr B}=\{B=(b_j) \in {\mathscr A}: b_j=0 \text{ for all } j \in S \}$
in (\ref{eq:structG}).
In fact, our computation does not directly depend on $W$ and ${\mathscr B}$. Instead, we may simply
specify
\[
e_S(W)=\lambda {\mathrm{sgn}}_{\Gamma}({\bar{\beta}}) \quad \text{and} \quad
e_{S^c}({\mathscr B})=\{b \in {\mathbb{R}}^p: \|b\|_{{\Gamma},\infty} \leq \lambda; {\mathrm{supp}}(b) \subset {\mathbf S}^c\} ,
\]
and
\[
\|\beta\|_{\mathscr B} = \lambda \|\beta_{{\mathbf S}^c}\|_{{\Gamma},1} \qquad
\|b_{{\mathbf S}^c}\|_{{\mathscr B},D} = \|b_{{\mathbf S}^c}\|_{{\Gamma},\infty}/\lambda .
\]
This means that we may take $G$ in (\ref{eq:structG-int}) as
$G=\{u; \; u_{\mathbf S}=\lambda {\mathrm{sgn}}_{\Gamma}({\bar{\beta}}) \quad \& \quad \|u_{{\mathbf S}^c}\|_{{\Gamma},\infty} \leq \eta \lambda\}$ for some $0 \leq \eta \leq 1$,
which implies that $R(\beta)-R_G(\beta) \geq (1-\eta) \|\beta_{{\mathbf S}^c}\|_{{\Gamma},1}$.
The tangent space is ${\cal T}=\{u: {\mathrm{supp}}(u) \in {\mathbf S}\}$.
We further consider target $\beta^*$ that satisfies (\ref{eq:target}), which we can rewrite as
\[
2 X^\top (X(\beta^* -{\bar{\beta}}_*)- \epsilon) = \tilde{a} + \tilde{b} ,
\]
where ${\mathrm{supp}}(\tilde{b}) \subset {\mathbf S}^c$, and $\|\tilde{b}\|_{{\Gamma},\infty} = \tilde{\eta} \lambda$.
We assume that $\|\tilde{a}\|_2$ is small.
Note that we may choose $\lambda$ sufficiently large so that $\tilde{\eta}$ can be arbitrarily close to $0$.
In particular, we may choose $\lambda \geq \|\tilde{b}\|_{{\Gamma},\infty}/\eta$ so that $\tilde{\eta} \leq \eta <1$.
We are specially interested in the case of $\tilde{a}=0$, which can be achieved with the construction in (\ref{eq:target-opt}).
\subsubsection*{Global Restricted Eigenvalue Analysis}
Assume that $\lambda \geq \|\tilde{b}\|_{{\Gamma},\infty}/\eta$, and let
$\tilde{\eta}=\|\tilde{b}\|_{{\Gamma},\infty}/\lambda$. We have $\tilde{\eta} \leq \eta$.
Therefore in order to apply (\ref{eq:recovery-global-dc-quadratic-struct}), we may define restricted eigenvalue as
\[
\gamma =\inf \left\{2\|X \Delta \beta\|_2^2/\|\Delta \beta\|^2: 2\|X \Delta \beta\|_2^2 +
\Delta \beta^\top (\lambda {\mathrm{sgn}}_{\Gamma}({\bar{\beta}}) +\tilde{a}) + (\eta-\tilde{\eta}) \lambda \|\Delta \beta_{{\mathbf S}^c}\|_{{\Gamma},1} \leq 0 \right\} .
\]
We then obtain from (\ref{eq:recovery-global-dc-quadratic-struct})
\[
\| X ({\hat{\beta}}-\beta^*)\|_2^2+ (1-\eta) \lambda \|{\hat{\beta}}_{{\mathbf S}^c}\|_{{\Gamma},1} \leq
\| X ({\bar{\beta}}-\beta^*)\|_2^2 +
(2\gamma)^{-1} \|\tilde{a}+\lambda {\mathrm{sgn}}_{\Gamma}({\bar{\beta}})\|_D^2 .
\]
If we choose $\tilde{a}=0$, and let $\|\cdot\|=\|\cdot\|_{{\Gamma},1}$ with $\|\cdot\|_D=\|\cdot\|_{{\Gamma},\infty}$,
then
\[
\| X ({\hat{\beta}}-\beta^*)\|_2^2+ (1-\eta) \lambda \|{\hat{\beta}}_{{\mathbf S}^c}\|_{{\Gamma},1} \leq
\| X ({\bar{\beta}}-\beta^*)\|_2^2 +
\frac{\lambda^2|S|}{4 \bar{\gamma}} ,
\]
with
\[
\bar{\gamma} =
\inf \left\{\|X \Delta \beta\|_2^2/(\|\Delta \beta\|_{{\Gamma},1}^2/|S|):
\Delta \beta_{\mathbf S}^\top {\mathrm{sgn}}_{\Gamma}({\bar{\beta}}) + (\eta-\tilde{\eta}) \|\Delta \beta_{{\mathbf S}^c}\|_{{\Gamma},1} \leq 0 \right\} .
\]
The result is meaningful as long as $\bar{\gamma}>0$.
Even for the standard $\ell_1$ regularizer, this condition is weaker than previous
restricted eigenvalue conditions in the literature. In particular it is weaker than
the compatibility condition of \cite{vandeGeerB09} (which is the weakest condition in the earlier literature),
that requires
\[
\inf \left\{\|X \Delta \beta\|_2^2/(\|\Delta \beta\|_{1}^2/|S|):
(1-\tilde{\eta}) \|\Delta \beta_{{\mathbf S}^c}\|_{{\Gamma},1} \leq
(1+\tilde{\eta}) \|\Delta \beta_{\mathbf S}\|_{{\Gamma},1} \right\}
> 0.
\]
Our result replaces $\|\Delta \beta_{\mathbf S}\|_{{\Gamma},1}$ by $-\Delta \beta_{\mathbf S}^\top {\mathrm{sgn}}_{\Gamma}({\bar{\beta}})$,
which is a useful improvement because the former can be significantly larger than the latter.
For $\ell_1$ analysis, the use of ${\mathrm{sgn}}({\bar{\beta}})$ has appeared in various studies such as
\cite{Wainwright09,ChRePaWi10,CandesPlan09,CandesPlan11}. In fact, the calculation for
Gaussian random design, which we shall perform next, depends on ${\mathrm{sgn}}({\bar{\beta}})$ and ${\mathrm{sgn}}_{\Gamma}({\bar{\beta}})$.
\subsubsection*{Gaussian Random Design}
Assume that $X$ is Gaussian random design matrix in (\ref{eq:gaussian-design}), then
we can apply the analysis in Section~\ref{sec:gordon-struct}.
We will first consider the standard $\ell_1$ regularizer with $m=1$, which requires the following estimate.
\begin{proposition}
Consider standard $\ell_1$ regularization with single element groups.
If $\tilde{\eta} < \eta$ and $p \geq 2|S|$, we have
\begin{align*}
&\inf_{\gamma>0}
{\mathbf E}_{\epsilon \sim N(0,I_{p \times p})} \inf_{\|b\|_\infty \leq 1}
\| \gamma (\lambda {\mathrm{sgn}}({\bar{\beta}})+\tilde{a}) + \gamma (\eta-\tilde{\eta})\lambda b_{S^c} - \epsilon\|_2^2 \\
\leq&
2 |S| + \frac{2\ln (p/|S|-1)}{(\eta-\tilde{\eta})^2}
\|{\mathrm{sgn}}({\bar{\beta}})+\tilde{a}/\lambda\|_2^2 .
\end{align*}
\end{proposition}
\begin{proof}
Given $\gamma>0$, and let $t=\gamma(\eta-\tilde{\eta}) \lambda$, we have
\[
{\mathbf E}_{\epsilon \sim N(0,I_{p \times p})}\inf_{\|b\|_\infty \leq 1}
\| \gamma (\lambda {\mathrm{sgn}}({\bar{\beta}})+\tilde{a})+ \gamma (\eta-\tilde{\eta}) \lambda b_{S^c} - \epsilon\|_2^2
\leq a_0 + a_1 ,
\]
where
\[
a_0 = {\mathbf E}_{\epsilon \sim N(0,I_{p \times p})}
\| \gamma ({\mathrm{sgn}}({\bar{\beta}})+\tilde{a}) + \epsilon_S\|_2^2 =
|S| + \gamma^2 \|\lambda {\mathrm{sgn}}({\bar{\beta}})+\tilde{a}\|_2^2 ,
\]
and
\begin{align*}
a_1 =& {\mathbf E}_{\epsilon \sim N(0,I_{p\times p})} \inf_{\|b\|_\infty \leq t}\| b_{S^c} - \epsilon_{S^c}\|_2^2 \\
=& (p-|S|) {\mathbf E}_{\epsilon \sim N(0,1)} (|\epsilon|-t)_+^2 \\
=& (p-|S|) \int_{x=0}^\infty \frac{2}{\sqrt{2\pi}} x^2 \exp(-(x+t)^2/2) d x \\
\leq& (p-|S|) \int_{x=0}^\infty \frac{2}{\sqrt{2\pi}} x^2 \exp(-(x^2+t^2)/2) d x
\leq (p-|S|) e^{-t^2/2} .
\end{align*}
By setting $t=\sqrt{2\ln ((p/|S|-1)}$ and $\gamma=\sqrt{2\ln((p/|S|-1))}/(\eta-\tilde{\eta})\lambda$,
we have $a_1 \leq |S|$. This gives the bound.
\end{proof}
For the standard $\ell_1$ regularization ($m=1$), we obtain the following bound if $p \geq 2|S|$:
given any $\eta \in (0,1]$, $g,\delta \geq 0$ such that $g+\delta \leq n/\sqrt{n+1}$, with probability at least
\[
1 - \frac{1}{2} \exp \left(-\frac{1}{2} (n/\sqrt{n+1}-g-\delta)^2\right) ,
\]
we have either $\lambda \leq \|\tilde{b}\|_\infty/ \eta$, or
\[
\|X({\hat{\beta}}-\beta^*)\|_2^2 + (1-\eta) \lambda \|{\hat{\beta}}_{S^c}\|_1 \leq
\|X({\bar{\beta}}-\beta^*)\|_2^2 +
(4\delta^2)^{-1} \|\lambda{\mathrm{sgn}}({\bar{\beta}}) +\tilde{a}\|_2^2 ,
\]
or
\[
g^2 <
2 |S| + \frac{2\ln (p/|S| -1)}{(\eta-\|\tilde{b}\|_\infty/\lambda)^2}
\|{\mathrm{sgn}}({\bar{\beta}})+\tilde{a}/\lambda\|_2^2 .
\]
Note that in the noise-free case of $\tilde{a}=\tilde{b}=0$, this shows that exact recovery can be achieved
with large probability when $n > 2|S| (1+ \ln(p/|S|-1))$, and this sample complex result is a rather sharp.
More generally for $m>1$, we have a similar bound with worse constants as follows.
\begin{proposition}
If $\tilde{\eta} < \eta$ and $p \geq 2m |S|$, we have
\begin{align*}
&\inf_{\gamma>0}
{\mathbf E}_{\epsilon \sim N(0,I_{p \times p})} \inf_{\|b\|_{{\Gamma},\infty} \leq 1}
\| \gamma (\lambda {\mathrm{sgn}}_{\Gamma}({\bar{\beta}})+\tilde{a}) + \gamma (\eta-\tilde{\eta})\lambda b_{S^c} - \epsilon\|_2^2 \\
\leq&
|S|(m+1) + \frac{(\sqrt{2\ln (q/|S|-1)}+\sqrt{m})^2}{(\eta-\tilde{\eta})^2}
\|{\mathrm{sgn}}_{\Gamma}({\bar{\beta}})+\tilde{a}/\lambda\|_2^2 .
\end{align*}
\end{proposition}
\begin{proof}
Given $\gamma>0$, and let $t=\gamma (\eta-\tilde{\eta}) \lambda$.
Let $\chi$ be a $\chi$-distributed random variable of degree $m$, with $\lambda_m$ being its expectation as defined in
Theorem~\ref{thm:gordon}. Since $\chi$ is the singular value of a $1 \times m$ Gaussian matrix,
similar to Theorem~\ref{thm:gordon}, we can apply the Gaussian concentration
bound \cite{Pisier85} to obtain for all $\delta >0$:
\[
{\mathbf P} \left[ \chi \geq \lambda_m + \delta \right] \leq 0.5 \exp \left(-\delta^2/2 \right) .
\]
Now we assume $t\geq \lambda_m$, and
\[
{\mathbf E}_{\epsilon \sim N(0,I_{p \times p})}\inf_{\|b\|_{{\Gamma},\infty} \leq 1}
\| \gamma (\lambda {\mathrm{sgn}}_{\Gamma}({\bar{\beta}})+\tilde{a})+ \gamma (\eta-\tilde{\eta}) \lambda b_{S^c} - \epsilon\|_2^2
\leq a_0 + a_1 ,
\]
where
\[
a_0 = {\mathbf E}_{\epsilon \sim N(0,I_{p \times p})}
\| \gamma ({\mathrm{sgn}}_{\Gamma}({\bar{\beta}})+\tilde{a}) + \epsilon_{\mathbf S}\|_2^2 =
m |S| + \gamma^2 \|\lambda {\mathrm{sgn}}({\bar{\beta}})+\tilde{a}\|_2^2 ,
\]
and
\begin{align*}
a_1 =& {\mathbf E}_{\epsilon \sim N(0,I_{p\times p})} \inf_{\|b\|_{{\Gamma},\infty} \leq t}\| b_{{\mathbf S}^c} - \epsilon_{{\mathbf S}^c}\|_2^2 \\
=& (q-|S|) {\mathbf E}_{\epsilon \sim N(0,I_{m \times m})} (\|\epsilon\|_2-t)_+^2 \\
=& - (q-|S|) \int_{x=0}^\infty x^2 d P(\chi \geq x+t) \\
\leq& 2 (q-|S|) \int_{x=0}^\infty x P(\chi \geq x+t) d x \\
\leq& 2 (q-|S|) \int_{x=0}^\infty 0.5 x \exp(-(x+t- \lambda_m)^2/2) d x \\
\leq& (q-|S|) \exp(-(t-\lambda_m)^2/2) \int_{x=0}^\infty x \exp(-x^2/2) d x \\
=& (q-|S|) \exp(-(t-\lambda_m)^2/2) .
\end{align*}
By setting $t=\lambda_m + \sqrt{2\ln (q/|S|-1)}$ and $\gamma=t/(\eta-\tilde{\eta})\lambda$,
we have $a_1 \leq |S|$. This gives the desired bound using the estimate $\lambda_m \leq \sqrt{m}$.
\end{proof}
We obtain the following bound for group-Lasso with $m>1$ when $q \geq 2|S|$:
given any $\eta \in (0,1]$, $g,\delta \geq 0$ such that $g+\delta \leq n/\sqrt{n+1}$, with probability at least
\[
1 -\frac{1}{2} \exp \left(-\frac{1}{2} (n/\sqrt{n+1}-g-\delta)^2\right) ,
\]
we have either $\lambda \leq \|\tilde{b}\|_{{\Gamma},\infty}/ \eta$, or
\[
\|X({\hat{\beta}}-\beta^*)\|_2^2 + (1-\eta) \lambda \|{\hat{\beta}}_{{\mathbf S}^c}\|_{{\Gamma},1} \leq
\|X({\bar{\beta}}-\beta^*)\|_2^2 +
(4\delta^2)^{-1} \|\lambda{\mathrm{sgn}}_{\Gamma}({\bar{\beta}}) +\tilde{a}\|_2^2 ,
\]
or
\[
g^2 <
|S|(m+1) + \frac{(\sqrt{2\ln (q/|S| -1)}+\sqrt{m})^2}{(\eta-\|\tilde{b}\|_{{\Gamma},\infty}/\lambda)^2}
\|{\mathrm{sgn}}_{\Gamma}({\bar{\beta}})+\tilde{a}/\lambda\|_2^2 .
\]
Note that in the noise-free case of $\tilde{a}=\tilde{b}=0$, this shows that exact recovery can be achieved
with large probability when $n > |S|(m+1) + |S|(\sqrt{2\ln (q/|S| -1)}+\sqrt{m})^2=O(|S| (m+ \ln (q/|S|)))$.
If we consider the scenario that noise $\epsilon \sim N(0,\sigma^2 I_{n \times n})$ is Gaussian, then
we may set $\lambda$ to be at the order $\sigma \sqrt{n (m+\ln (q/|S|))}$, and with large probability,
we have $\lambda > \|b\|_{{\Gamma},\infty}/\eta$, with a nonzero $\tilde{a}$ such that
$\|\tilde{a}\|_2^2= O(|S| \lambda^2)$. This gives the following error bound
with $\delta$ chosen at order $\sqrt{n}$:
\[
\|X({\hat{\beta}}-\beta^*)\|_2^2 + (1-\eta) \lambda \|{\hat{\beta}}_{{\mathbf S}^c}\|_{{\Gamma},1} \leq
\|X({\bar{\beta}}-\beta^*)\|_2^2 + O(|S| \lambda^2/n) .
\]
With optimal choice of $\lambda$, we have
\[
\|X({\hat{\beta}}-\beta^*)\|_2^2 + (1-\eta) \lambda \|{\hat{\beta}}_{{\mathbf S}^c}\|_{{\Gamma},1} \leq
\|X({\bar{\beta}}-\beta^*)\|_2^2 + O(|S| m + \ln (q/|S|)) .
\]
\subsubsection*{Tangent Space Analysis}
In this analysis, we assume that ${\mathrm{supp}}(\tilde{a}) \in {\mathbf S}$.
We can then define
\[
Q_G^{\cal T} = {\bar{\beta}} + \Delta Q, \quad
\Delta Q_S = -0.5 (X_{\mathbf S}^\top X_{\mathbf S})^{-1} (\lambda {\mathrm{sgn}}_{\Gamma}({\bar{\beta}}_{\mathbf S})+\tilde{a}_{\mathbf S}) \quad \text{ and } \quad \Delta Q_{{\mathbf S}^c}=0 .
\]
We know that $Q_G^{\cal T}$ is a dual certificate if
\[
\|X_{{\mathbf S}^c}^\top X_{\mathbf S} (X_{\mathbf S}^\top X_{\mathbf S})^{-1}{\mathrm{sgn}}({\bar{\beta}}_{\mathbf S}) \|_{{\Gamma},\infty} \leq \eta-
\|X_{{\mathbf S}^c}^\top X_{\mathbf S} (X_{\mathbf S}^\top X_{\mathbf S})^{-1}\tilde{a}_{\mathbf S} -\tilde{b}_{{\mathbf S}^c}\|_{{\Gamma},\infty}/\lambda .
\]
This is essentially the irrepresentable condition of \cite{Bach08-groupLasso},
which reduces to the $\ell_1$ irrepresentable condition of \cite{ZhaoYu06} when $m=1$.
This condition implies the following oracle inequality:
\[
\|X(\beta^*-{\hat{\beta}})\|_2^2 + (1-\eta) \lambda \|{\hat{\beta}}_{S^c}\|_{{\Gamma},1}
\leq \|X(\beta^*-{\bar{\beta}})\|_2^2 +
0.25 \lambda^2 \left\| (X_{\mathbf S}^\top X_{\mathbf S})^{-1/2} ({\mathrm{sgn}}_{\Gamma}({\bar{\beta}}_{\mathbf S}) + \tilde{a}_{\mathbf S}/\lambda)\right\|_2^2 .
\]
This oracle inequality generalizes a simpler result for $m=1$ in \cite{CandesPlan09}.
\subsubsection*{Simple Parameter Estimation Bounds}
Next, we consider the parameter estimation bound using Proposition~\ref{prop:param-est}.
First, we consider the case of choosing ${\tilde{\cal T}}={\cal T}$; let
$\gamma_S$ be the smallest eigenvalue of $X_{\mathbf S}^{\top}X_{\mathbf S}$.
If we assume $\beta^* \approx {\bar{\beta}}$ and $\tilde{a}$ is small, we can expect a bound of the form:
\[
\|X(\beta^*-{\hat{\beta}})\|_2^2 + (1-\eta) \lambda \|{\hat{\beta}}_{{\mathbf S}^c}\|_{{\Gamma},1} \leq \delta = O(\lambda^2 |S|/\gamma_S) ,
\]
where $\lambda=O(\sigma \sqrt{n (m+\ln q)})$.
Now, if we let $X_{{\Gamma}_j}$ be the $j$-th group-column (with indices ${\Gamma}_j$) of $X$, then
\[
\mathrm{cor}({\cal T},{\cal T}^\perp)
\leq \sup \left\{ \|(X_{\mathbf S}^\top X_{\mathbf S})^{-1/2} X_{\mathbf S}^\top X \beta_{{\mathbf S}^c}\|_2 :
\lambda \|\beta_{{\mathbf S}^c}\|_{{\Gamma},1} \leq \delta' \right\}
\leq \gamma_S^{-1/2} \max_{j \in S^c} \|X_{\mathbf S}^\top X_{{\Gamma}_j}\|_{\mathrm{sp}} \delta' /\lambda ,
\]
where
\[
\gamma_S = \inf \, \{ \|X_{\mathbf S} \beta_{\mathbf S} \|_2^2 : \|\beta_{\mathbf S}\|_2 =1\}
\]
is the smallest eigenvalue of $X_{\mathbf S}^\top X_{\mathbf S}$.
Proposition~\ref{prop:param-est} gives
$\|({\hat{\beta}}-\beta^*)_{{\mathbf S}^c}\|_{{\Gamma},1} \leq \delta'/\lambda$ and
\[
\|({\hat{\beta}}-\beta^*)_{\mathbf S}\|_2
\leq \sqrt{\gamma_S^{-1} (1-\eta) \delta'} + 2 (\delta'/\lambda) \gamma_S^{-1} \max_{j \in S^c} \|X_S^\top X_{{\Gamma}_j}\|_{\mathrm{sp}} ,
\]
where $\delta' = \delta/(1-\eta) + \lambda \|(\beta^*)_{S^c}\|_1$,
and here we use $\|\cdot\|_{\mathrm{sp}}$ to denote the spectral norm of a matrix.
For the sake of illustration, we will next
assume that the standard error bound of $\delta' = O(\lambda^2 |S|/\gamma_S)$,
and the above result leads to the following bound
\[
\|({\hat{\beta}}-\beta^*)_{{\mathbf S}^c}\|_{{\Gamma},1} = O(\lambda |S|/\gamma_S), \quad
\|({\hat{\beta}}-\beta^*)_{\mathbf S}\|_2
\leq (\lambda \sqrt{|S|}/\gamma_S) \cdot
O \left(1 + \sqrt{|S|} \gamma_S^{-1} \max_{j \in {\mathbf S}^c} \|X_{\mathbf S}^\top X_{{\Gamma}_j}\|_{\mathrm{sp}}\right) .
\]
If $X$ is very weakly correlated, $X_{\mathbf S}^\top X_{{\Gamma}_j}$ will be small.
In the ideal case $\gamma_S^{-1} \max_{j \in {\mathbf S}^c} \|X_{\mathbf S}^\top X_{{\Gamma}_j}\|_{\mathrm{sp}}=O(1/\sqrt{|S|})$, we have
\[
\|{\hat{\beta}}-\beta^*\|_{{\Gamma},1} = O(\lambda |S|/\gamma_S) ,
\]
which is of the optimal order. However, in the pessimistic case of
$\gamma_S^{-1} \max_{j \in S^c} \|X_{\mathbf S}^\top X_{{\Gamma}_j}\|_{\mathrm{sp}}) =O(1)$, then we obtain
\[
\|{\hat{\beta}}-\beta^*\|_{{\Gamma},1} = O(\lambda |S|^{3/2}/\gamma_S) ,
\]
which has an extra factor of $\sqrt{|S|}$.
Using the above derivation, the 2-norm error bound is always of the order
\[
\|{\hat{\beta}}-\beta^*\|_2 \leq \|({\hat{\beta}}-\beta^*)_{\mathbf S}\|_2 + \|({\hat{\beta}}-\beta^*)_{{\mathbf S}^c}\|_{{\Gamma},1}
= O(\lambda |S|/\gamma_S) ,
\]
which has an extra factor of $\sqrt{|S|}$ compared to the ideal bound of
$\|{\hat{\beta}}-\beta^*\|_2 = O(\lambda \sqrt{|S|})$ in the earlier literature such as \cite{HuangZhang09,LMTG09}
under appropriately defined global restricted eigenvalue assumptions.
It should be mentioned that the assumptions we have made so far are relatively weak
without making global restricted eigenvalue assumptions, and thus the
resulting bound
$\|{\hat{\beta}}-\beta^*\|_2 = O(\lambda |S|)$ might be the best possible under these assumptions.
In order to obtain the ideal bound of $\|{\hat{\beta}}-\beta^*\|_2 = O(\sqrt{|S|})$ (as appeared in the earlier literature),
we will consider adding extra assumptions.
\subsubsection*{Refined Parameter Estimation Bounds}
The first extra assumption we will make is that sparse eigenvalues are bounded from above, which prevents
the pessimistic case where $X_j$ are highly correlated for $j \in S^c$.
Such correlation can be defined with the upper sparse eigenvalue as:
\[
\rho^+(k) = \{\|X \beta\|_2^2/\|\beta\|_2^2 : |{\mathrm{supp}}_{\Gamma}(\beta)| \leq k\} ,
\]
where ${\mathrm{supp}}_{\Gamma}(\beta) \subset \{1,\ldots,q\}$ is the (smallest) index set for groups of $\{{\Gamma}_j\}$ that cover ${\mathrm{supp}}(\beta)$.
Using this notation, if
we choose the constrained $\Omega$ and $\beta^*$ such that $\beta +\beta^* \in \Omega$ implies that
$\|\beta\|_{{\Gamma},\infty} \leq M$ for some $M \leq \delta'/\lambda$, then
it can be shown using the standard shifting argument for group $\ell_1$ regularization
(e.g., \cite{HuangZhang09}) that for all positive integer $k \leq \delta'/(\lambda M)$:
\[
\mathrm{cor}({\cal T},{\cal T}^\perp)
\leq \sup \left\{ \|X \beta_{{\mathbf S}^c}\|_2 : \|\beta\|_{{\Gamma},\infty} \leq M , \;
\lambda \|\beta_{{\mathbf S}^c}\|_{{\Gamma},1} \leq \delta' \right\}
\leq 2 \rho^+(k-1)^{1/2} \delta' /(\lambda \sqrt{k}) .
\]
This implies that
\[
\|({\hat{\beta}}-\beta^*)_{{\mathbf S}}\|_2 \leq
\sqrt{\gamma_S^{-1} (1-\eta) \delta'} + 4 \delta' \gamma_S^{-1/2} \rho^+(k-1)^{1/2}/(\lambda \sqrt{k}) ,
\]
and
\[
\|({\hat{\beta}}-\beta^*)_{{\mathbf S}^c}\|_2 \leq \sqrt{\delta' M/\lambda} \leq \delta' /(\lambda \sqrt{k}) .
\]
Therefore assuming the standard error bound of $\delta' = O(\lambda^2 |S|/\gamma_S)$, we obtain
\[
\|{\hat{\beta}}-\beta^*\|_2 = O(\lambda \sqrt{|S|}/\gamma_S)
\inf_{k \leq \delta'/(\lambda M)} \left[ 1 + \sqrt{|S|/k} \sqrt{\rho^+(k)/\gamma_S} \right] .
\]
If $M$ is sufficiently small, then we can take $k$ sufficiently large so that $|S|=O(k)$, and it is possible to obtain error bound of
$\|{\hat{\beta}}-\beta^*\|_2 = O(\lambda \sqrt{|S|})$.
If we do not impose the $\|\cdot\|_{{\Gamma},\infty}$ norm constraint on $\Omega$, then another
method is to choose ${\tilde{\cal T}}$ larger than ${\cal T}$, which is the approach employed in
\cite{CandesPlan11} for the standard $\ell_1$ regularization. Here we consider a similar assumption
for group-Lasso, where we define for all integer $k \geq 1$:
\[
\gamma_{S,k} = \inf \, \{ \|X \beta\|_2^2: |{\mathrm{supp}}_{\Gamma}(\beta)\setminus S| < k, \|\beta\|_2=1 \} .
\]
It is clear that $\gamma_S=\gamma_{S,1}$. Given any $k$ such that $\gamma_{S,k}$ is not too small,
we may define
\[
{\tilde{\cal T}}=\{ \beta: {\mathrm{supp}}_{\Gamma}(\beta) \subset \tilde{S} \}
\]
and
\[
\tilde{S} =S \cup \{\text{group indices of largest $k-1$ absolute values of $\|{\hat{\beta}}-\beta^*\|_{G_j}: j \notin S$}\} .
\]
The smallest eigenvalue of $H_{\tilde{\cal T}}$ is no smaller than $\gamma_{S,k}$, and we also have
$\|({\hat{\beta}}-\beta^*)_{\tilde{{\mathbf S}}}\|_{{\Gamma},\infty} \leq M=\|({\hat{\beta}}-\beta^*)_{{\mathbf S}^c}\|_{{\Gamma},1}/k \leq \delta'/(k \lambda)$.
Using the same derivation as before, we have
\[
\|{\hat{\beta}}-\beta^*\|_2 = O(\lambda \sqrt{|S|}/\gamma_{S,k})
\left[ 1 + \sqrt{|S|/k} \sqrt{\rho^+(k)/\gamma_{S,k}} \right] .
\]
This means that if we can choose $k$ at the order of $|S|$ such that
$\rho^+(k)/\gamma_{S,k}=O(1)$, then we have
\[
\|{\hat{\beta}}-\beta^*\|_2 = O(\lambda \sqrt{|S|}) .
\]
In the standard $\ell_1$ case, the requirement of $\rho^+(k)/\gamma_{S,k}=O(1)$ is also needed in the so-called
``RIP-less'' approach of \cite{CandesPlan11} to obtain the ideal bound for
$\|{\hat{\beta}}-\beta^*\|_2$. The approach is called ``RIP-less'' because this condition is weaker than the classical RIP condition
of \cite{CandesTao07} (or its group-Lasso counterpart in \cite{HuangZhang09}) that is far more restrictive.
This bound is also flexible as we can choose any $k\geq 1$: in the worst case of $k=1$, we have
$\|{\hat{\beta}}-\beta^*\|_2 = O(\lambda |S|)$ with an extra $\sqrt{|S|}$ factor.
This extra factor can be removed as long as we take $k$ at the order of $|S|$.
\subsection{Matrix completion}
Let ${\bar\Omega}$ be the set of $p \times q$ matrices, and assume that the inner product is defined as
$\innerprod{\beta}{\beta'}= {\mathrm{tr}}(\beta^\top \beta')$.
We consider $x_1,\ldots,x_n$ and observe
\[
y_i = \innerprod{x_i}{{\bar{\beta}}_*}+ \epsilon_i ,
\]
where $\{\epsilon_i\}$ are noises.
In order to recover ${\bar{\beta}}_*$, we consider the following convex optimization problem:
\[
{\hat{\beta}} = \arg\min\left[ \sum_{i=1}^n (\innerprod{x_i}{\beta} - y_i)^2 + \lambda \|\beta\|_* \right] ,
\]
where $\|\beta\|_*$ is the trace-norm of matrix $\beta$, defined as the sum of its singular values.
In the following, we will briefly discuss results that can be obtained from our analysis using the tangent space analysis.
For simplicity, we will keep the discussion at a relatively high level, with some detailed discussions skipped.
We assume that ${\bar{\beta}}$ is of rank-$r$, and
${\bar{\beta}}=U \Sigma V^\top$ is the SVD of ${\bar{\beta}}$, where $U$ and $V$ are $p \times r$
and $q \times r$ matrices.
The tangent space is defined as ${\cal T}=\{\beta: P_{\cal T}(\beta) = \beta\}$,
where $P_{\cal T}(\beta) = U U^\top \beta + \beta V V^\top - U U^\top \beta V V^\top$.
Using notations in Section~\ref{sec:struct-L1}, we may take $e_S(W)=U V^\top$ and
$e_{S^c}({\mathscr B})=\{b \in {\cal T}^\perp: \|b\|_{\mathrm{sp}} \leq \lambda\}$ in (\ref{eq:structG}).
Therefore
\[
\|\beta\|_{\mathscr B} = \lambda \|P_{\cal T}^\perp \beta\|_* \qquad
\|P_{\cal T}^\perp b\|_{{\mathscr B},D} = \| P_{\cal T}^\perp b\|_{\mathrm{sp}}/\lambda .
\]
This means that we may take $G$ in (\ref{eq:structG-int}) as
$G=\{u: \; P_{\cal T} u=\lambda U V^\top \; \& \; \|P_{\cal T}^\perp u\|_{\mathrm{sp}} \leq \eta \lambda\}$ for some $0 \leq \eta \leq 1$,
which implies that $R(\beta)-R_G(\beta) \geq (1-\eta) \|P_{\cal T}^\perp \beta\|_1$.
We further consider target $\beta^*$ that satisfies (\ref{eq:target}), which we can rewrite as
\[
2 \sum_{i=1}^n x_i (\innerprod{x_i}{\beta^* -{\bar{\beta}}_*}- \epsilon_i) = \tilde{a} + \tilde{b} ,
\]
where $\tilde{b} \subset {\cal T}^\perp$, and $\|\tilde{b}\| = \tilde{\eta} \lambda$.
We assume that $\|\tilde{a}\|_2$ is small.
For matrix completion, we assume that $\{x_i\}$ are matrices of the form $e_{a,b}$ with
1 at entry $(a,b)$ and 0 elsewhere, where $(a,b)$ is uniformly at random.
It can be shown using techniques of \cite{CandesR09,Recht09}
that under appropriate incoherence conditions,
a tangent space dual certificate can be constructed with large probability that satisfies
(\ref{eq:irrep-struct}). Due to the space limitation, we skip the details.
This leads to
\[
D_L(\beta^*,{\hat{\beta}})+ (1-\eta) \lambda \|P_{\cal T}^\perp {\hat{\beta}} \|_*
\leq D_L(\beta^*,{\bar{\beta}}) + \delta,
\quad \delta= 0.25 \innerprod{\lambda U V^\top +\tilde{a}}{H_{\cal T}^{-1} (\lambda U V^\top +\tilde{a})} .
\]
Note that for sufficiently large $n$, the smallest eigenvalue of $H_{\cal T}$ can be lower bounded as $O(pq/n)$.
Since $\innerprod{\lambda UV^\top}{\lambda UV^\top}= \lambda^2 r$,
we may generally choose $\lambda$ such that $\innerprod{\tilde{a}}{\tilde{a}}= O(\lambda^2 r)$, we thus obtain
the following oracle inequality for matrix completion:
\[
D_L(\beta^*,{\hat{\beta}})+ (1-\eta) \lambda \|P_{\cal T}^\perp {\hat{\beta}} \|_*
\leq D_L(\beta^*,{\bar{\beta}}) + O(\lambda^2 p q r/n) .
\]
If $\epsilon_i$ are iid Gaussian noise $N(0,\sigma^2)$, then we may choose
$\lambda$ at the order $\sigma \sqrt{n \ln \max(p,q)/\min(p,q)}$. This gives
\[
D_L(\beta^*,{\hat{\beta}})+ (1-\eta) \lambda \|P_{\cal T}^\perp {\hat{\beta}} \|_*
\leq D_L(\beta^*,{\bar{\beta}}) + O(\sigma^2 \max(p,q) r \ln (p+q)) .
\]
In the noise-free case, we can let $\lambda \to 0$, and exact recovery is obtained.
This complements a related result of \cite{KoTsLo10} that does not lead to exact recovery even when $\sigma=0$.
In the noisy case, parameter estimation bounds can be obtained in a manner analogous to
the parameter estimation bound for group $\ell_1$ regularization.
Due to the space limitation, we will leave the details to a dedicated report.
\subsection{Mixed norm regularization}
\label{sec:mixed-norm}
The purpose of this example is to show that the dual certificate analysis can be applied to more complex
regularizers that may be difficult to analyze using traditional ideas such as the RIP analysis.
The analysis is similar to that of group $\ell_1$ regularization but with more complex
calculations. For simplicity, we will only provide a sketch of the analysis while skipping some of the details.
We still consider the regression problem
\[
y= X {\bar{\beta}}_* + \epsilon ,
\]
where for simplicity we only consider Gaussian noise $\epsilon \sim N(0,\sigma^2 I_{n \times n})$.
We assume that $p=q m$, and the variables $\{1,\ldots,p\}$ are divided into $q$ non-overlapping blocks
${\Gamma}_1,\ldots,{\Gamma}_{q} \subset \{1,\ldots,p\}$, each block of size $m$.
The standard sparse regularization methods are either using the Lasso regularizer of (\ref{eq:L1}) or
using the group-Lasso regularizer of (\ref{eq:group-L1}).
Let $S_S={\mathrm{supp}}({\bar{\beta}})$ and $S_{\Gamma}={\mathrm{supp}}_{\Gamma}({\bar{\beta}})$, we know that
under suitable restricted strong convexity conditions, the following oracle inequality holds for
the Lasso regularizer (\ref{eq:L1})
\[
\|X(\beta^*-{\hat{\beta}})\|_2^2+ (1-\eta) \lambda \|{\hat{\beta}}_{S_S^c}\|_{{\Gamma},1}
\leq \|X(\beta^*-{\bar{\beta}})\|_2^2 + O(\sigma^2 n |S_S| \ln p /\gamma_{S_s}) ,
\]
and the following oracle inequality holds for the group Lasso regularizer (\ref{eq:group-L1}):
\[
\|X(\beta^*-{\hat{\beta}})\|_2^2 + (1-\eta) \lambda \|{\hat{\beta}}_{{\mathbf S}_{\Gamma}^c}\|_{{\Gamma},1}
\leq \|X(\beta^*-{\bar{\beta}})\|_2^2 + O(\sigma^2 n |S_{\Gamma}| (m + \ln q) /\gamma_{S_{\Gamma}}) .
\]
Note that we always have $|S_S| \leq |S_{\Gamma}| m$.
By comparing the above two oracle inequalities, we can see that the benefit of using group sparsity is when
$|S_S| \approx |S_{\Gamma}| m$, which means that sparsity pattern occur in groups,
and the group structure is correct. In such case, the dimension dependency reduces from
$|S_S| \ln p$ to $|S_{\Gamma}| \ln q \approx m^{-1} |S_S| \ln q$. However,
if some of the signals do not occur in groups, then it is possible that $|S_{\Gamma}| m$ can be much larger than $|S_S|$,
and in such case, Lasso is superior to group Lasso.
It is natural to ask whether it is possible to combine the benefits of Lasso and group Lasso regularizers.
Assume that ${\bar{\beta}}$ is decomposed into two parts ${\bar{\beta}}={\tilde{\beta}}'+{\tilde{\beta}}''$ so that
${\tilde{\beta}}''$ covers nonzeros of ${\tilde{\beta}}$ that occur in groups, and ${\tilde{\beta}}'$ covers nonzeros of ${\tilde{\beta}}$ that
do not occur in groups. Ideally we would like to achieve an oracle inequality of
\begin{align}
&\|X(\beta^*-{\hat{\beta}})\|_2^2 + (1-\eta) \lambda \|{\hat{\beta}}\| \label{eq:opt-decomp}
\\
\leq& \|X(\beta^*-{\bar{\beta}})\|_2^2 +
O\left(\frac{\sigma^2 n}{\gamma} \left(|{\mathrm{supp}}({\tilde{\beta}}')| \ln p + |{\mathrm{supp}}_{\Gamma}({\tilde{\beta}}'')|(m + \ln q)\right) \right) \nonumber \\
=& \|X(\beta^*-{\bar{\beta}})\|_2^2 +
O\left(\frac{\sigma^2 n}{\gamma} \left(|{\mathrm{supp}}({\bar{\beta}} \setminus \cup_{j \in \tilde{S}} {\Gamma}_j) | \ln p + |\tilde{S}|(m + \ln q)\right) \right) , \nonumber
\end{align}
where $\|{\hat{\beta}}\|$ is a certain seminorm of ${\hat{\beta}}$, and $\tilde{S}=\{j: (m + \ln q) \leq c |{\mathrm{supp}}({\bar{\beta}}_{{\Gamma}_j})|\ln p\}$
for some constant $c>0$.
We note that the optimal decomposition can be achieved by taking
${\tilde{\beta}}'_{{\Gamma}_j}=0$ with ${\tilde{\beta}}''_{{\Gamma}_j}={\bar{\beta}}_{{\Gamma}_j}$ when $j \in S'$ and
and ${\tilde{\beta}}''_{{\Gamma}_j}=0$ with ${\tilde{\beta}}'_{{\Gamma}_j}={\bar{\beta}}_{{\Gamma}_j}$ otherwise.
In the following, we show that the oracle inequality of (\ref{eq:opt-decomp}) can be achieved via a mixed norm regularizer
defined below:
\begin{equation}
R(\beta) =\inf_{\beta=\beta'+\beta''} \left[ \lambda_1 \|\beta'\|_1 + \lambda_{\Gamma} \|\beta''\|_{{\Gamma},1} \right] .
\label{eq:reg-mixed}
\end{equation}
This mixed regularizer can be referred to as the infimal convolution of
Lasso and group Lasso regularizers, and it is a special case of \cite{Jacob09icml}.
If we can prove an oracle inequality of (\ref{eq:opt-decomp}) for this regularizer, then it
means that we can adaptively
decompose the signal ${\bar{\beta}}$ into two parts $\beta'$ and $\beta''$ in order to achieve the most significant benefits
with standard sparsity bound for $\beta'$ and group sparsity bound for $\beta''$ (without knowing the decomposition a priori).
We will consider the decomposed parametrization $[\beta',\beta'']$, and the mixed norm regularizer
(\ref{eq:reg-mixed}) becomes a special case of (\ref{eq:struct-L1}).
Although the loss function $L(\cdot)$ is not strongly convex with respect to this parametrization,
this does not cause problems because we are only interested
in $\beta=\beta'+\beta''$. Since $L(\cdot)$ is strongly convex with respect to $\beta$
with an appropriate tangent space ${\cal T}$, we only need to consider the direction along $\beta=\beta'+\beta''$ when applying
the results. In this regard, it is easy to verify that at the optimal decomposition in (\ref{eq:reg-mixed}),
there exist $u' \in \partial \|\beta'\|_1$ and $u'' \in \partial \|\beta''\|_{{\Gamma},1}$
such that $\lambda_1 u' = \lambda_{\Gamma} u''$. Moreover, for any such $(u',u'')$, $\lambda_1 u' \in \partial R(\beta)$.
In order to define ${\cal T}$, we first define ${\mathscr B}$. Consider
$S_{\Gamma}=\{j: \lambda_{\Gamma} < 2 \lambda_1 \|{\mathrm{sgn}}({\bar{\beta}})_{{\Gamma}_j}\|_2\}$, with the corresponding
support ${\mathbf S}_{\Gamma}=\cup_{j \in S_{\Gamma}} {\Gamma}_j$.
The meaning of $S_{\Gamma}$ is that groups in $S_{\Gamma}$ are allowed to use both standard and group sparsity to represent ${\bar{\beta}}$,
while groups in $S_{\Gamma}^c$ always use standard sparsity only.
The set ${\mathbf S}_{\Gamma}$ will expand the tangent space for the nonzero group sparsity elements.
We also define the tangent space support set for single sparsity elements as
${\mathbf S}_1= {\mathrm{supp}}({\bar{\beta}}) \cup {\mathbf S}_{\Gamma}$.
Let
\begin{equation}
[{\bar{\beta}}',{\bar{\beta}}'']=\arg\min_{(\beta',\beta''): {\bar{\beta}}=\beta'+\beta''}\left[ \lambda_1 \|\beta'\|_1 + \lambda_{\Gamma} \|\beta''\|_{{\Gamma},1}
\right] .
\label{eq:mixed-norm-optdecomp}
\end{equation}
It satisfies $\lambda_1 \nabla \|{\bar{\beta}}'\|_1 =\lambda_{\Gamma} \nabla \|{\bar{\beta}}''\|_{{\Gamma},1}$, and
$\nabla R({\bar{\beta}})=\lambda_1 \nabla \|{\bar{\beta}}'_{{\Gamma}_j}\|_1 +\lambda_{\Gamma} \nabla \|{\bar{\beta}}''_{{\Gamma}_j}\|_{{\Gamma},1}$.
Consider ${\Gamma}_j$ such that ${\bar{\beta}}''_{{\Gamma}_j} \neq 0$, we obtain from
$\lambda_1 \nabla \|{\bar{\beta}}'\|_1 =\lambda_{\Gamma} \nabla \|{\bar{\beta}}''\|_{{\Gamma},1}$ that
$[\nabla \|{\bar{\beta}}'_{{\Gamma}_j}\|_{1}]_i \neq 0$ only when ${\bar{\beta}}_i \neq 0$ for $i \in {\Gamma}_j$; therefore
$\|(\nabla \|{\bar{\beta}}'_{{\Gamma}_j}\|_{1})\|_2 \leq \|{\mathrm{sgn}}({\bar{\beta}})_{{\Gamma}_j}\|_2$, and thus
$\lambda_{\Gamma} \leq \lambda_1 \|(\nabla \|{\bar{\beta}}'_{{\Gamma}_j}\|_{1})\|_2 \leq \lambda_1 \|{\mathrm{sgn}}({\bar{\beta}})_{{\Gamma}_j}\|_2$.
It implies that $j \in S_{\Gamma}$ and thus ${\mathrm{supp}}({\bar{\beta}}'') \subset S_{\Gamma}$.
Now we can define $W$ and ${\mathscr B}$ as
\[
e_S(W) = \lambda_1 \nabla \|{\bar{\beta}}'\|_1=\lambda_{\Gamma} \nabla \|{\bar{\beta}}''\|_{{\Gamma},1}
\]
where we can take $[\nabla \|{\bar{\beta}}'\|_1]_j=0$ when $j \notin {\mathbf S}_1$; and define
\[
e_{S^c}({\mathscr B})=\{u_{{\mathbf S}_1^c} : \|u_{{\mathbf S}_1^c}\|_\infty \leq \lambda_1 \; \& \; \|u_{{\mathbf S}_{\Gamma}^c}\|_{{\Gamma},\infty} \leq 0.5 \lambda_{\Gamma} \} .
\]
With the above choices, we have for all $u \in e_{S^c}({\mathscr B})$, $e_S(W) + u \in \partial R({\bar{\beta}})$ because
it can be readily checked that $e_S(W) + u \in \partial (\lambda_1 \|{\bar{\beta}}'\|_1) \cap \partial (\lambda_{\Gamma} \|{\bar{\beta}}''\|_{{\Gamma},1})$.
Moreover, we have
\[
\sup_{u \in e_{S^c}({\mathscr B})} \innerprod{u}{\beta} =
\min_{{\hat{\beta}}_{{\mathbf S}_1^c}=\beta'_{{\mathbf S}_1^c}+\beta''_{{\mathbf S}_{\Gamma}^c}}
\left[\lambda_1 \|\beta'_{{\mathbf S}_1^c}\|_1 + 0.5 \lambda_{\Gamma} \|\beta''_{{\mathbf S}_{\Gamma}^c}\|_{{\Gamma},1} \right] .
\]
We can thus define $G$ according to (\ref{eq:structG-int}) as
\[
G=\{e_S(W)+\eta u : u \in e_{S^c}({\mathscr B})\} ,
\]
so that $G \subset \partial R({\bar{\beta}})$.
For simplicity, we assume that $\beta^*$ satisfies (\ref{eq:target}) with $\tilde{a}=0$, which can be achieved with the construction in (\ref{eq:target-opt}).
With these choices, we obtain from (\ref{eq:recovery-global-dc-quadratic-struct}) the following
oracle inequality (under appropriate restricted eigenvalue condition with parameter $\gamma$):
\begin{align*}
& \| X ({\hat{\beta}}-\beta^*)\|_2^2+ (1-\eta)
\min_{{\hat{\beta}}_{{\mathbf S}_1^c}=\beta'_{{\mathbf S}_1^c}+\beta''_{{\mathbf S}_{\Gamma}^c}}
\left[\lambda_1 \|\beta'_{{\mathbf S}_1^c}\|_1 + 0.5 \lambda_{\Gamma} \|\beta''_{{\mathbf S}_{\Gamma}^c}\|_{{\Gamma},1} \right]\\
\leq &\| X ({\bar{\beta}}-\beta^*)\|_2^2 + \gamma^{-1} O(\|e_S(W)\|_2^2) \\
\leq& \| X ({\bar{\beta}}-\beta^*)\|_2^2 + \gamma^{-1}
O \left( \lambda_1^2 |{\mathrm{supp}}({\bar{\beta}})\setminus S_{\Gamma} | + \lambda_{\Gamma}^2 |S_{\Gamma}| \right) .
\end{align*}
The last inequality follows from
\[
\|e_S(W)\|_2^2 \leq \sum_{j \in S_{\Gamma}} \lambda_{\Gamma}^2 \|(\nabla \|{\bar{\beta}}''\|_{{\Gamma},1})_{{\Gamma}_j}\|_2^2 +
\sum_{j \notin S_{\Gamma}} \lambda_1^2 \|(\nabla \|{\bar{\beta}}'\|_{1})_{{\Gamma}_j}\|_2^2 ,
\]
which is a consequence of $e_S(W)=\lambda_1 \nabla \|{\bar{\beta}}'\|_1 =\lambda_{\Gamma} \nabla \|{\bar{\beta}}''\|_{{\Gamma},1}$.
Similar to the standard Lasso and group Lasso cases, for mixed norm regularization, we may still
choose the Lasso regularizer parameter $\lambda_1=c_1 \sigma \sqrt{n \ln(p)}$,
and the group Lasso regularization parameter $\lambda_{\Gamma}= c_2 \sigma \sqrt{n (m+\ln (q))}$
so that (\ref{eq:target}) holds ($c_1,c_2>0$ are constants).
Plug in these values, we obtain the following oracle inequality with this choice of parameters:
\begin{align*}
& \| X ({\hat{\beta}}-\beta^*)\|_2^2+ (1-\eta)
\min_{{\hat{\beta}}_{{\mathbf S}_1^c}=\beta'_{{\mathbf S}_1^c}+\beta''_{{\mathbf S}_{\Gamma}^c}}
\left[\lambda_1 \|\beta'_{{\mathbf S}_1^c}\|_1 + 0.5 \lambda_{\Gamma} \|\beta''_{{\mathbf S}_{\Gamma}^c}\|_{{\Gamma},1} \right]\\
\leq & \| X ({\bar{\beta}}-\beta^*)\|_2^2 + \gamma^{-1} n \sigma^2 \cdot
O \left( (n+\ln p) |{\mathrm{supp}}({\bar{\beta}})\setminus {\mathbf S}_{\Gamma}| + |S_{\Gamma}|(m + \ln q) \right) .
\end{align*}
Since the definition of $S_{\Gamma}$ is such that $j \in S_{\Gamma}$ when
$m+\ln (q) \leq 4 (c_1/c_2)^2 |{\mathrm{supp}}({\bar{\beta}}_{{\Gamma}_j})| \ln(p)$,
the right hand side achieves the optimal decomposition error
bound in (\ref{eq:opt-decomp}). This means that the mixed norm regularizer (\ref{eq:reg-mixed})
achieves optimal adaptive decomposition of standard and group sparsity.
\subsection{Generalized linear models}
\label{sec:genlin-example}
Results for generalized linear models can be easily obtained under the general framework of this paper, as
discussed after Corollary~\ref{cor:dual_certificate-oracle}.
This section presents a more elaborated treatment.
In generalized linear models, we may write the negative log likelihood as
\begin{equation}
L(\beta) = \sum_{i=1}^n\ell_i(\innerprod{x_i}{\beta}) , \label{eq:gen-lin-model}
\end{equation}
where $x_i\in{\bar\Omega}^*$ and $\ell_i$ may depend on certain response variable $y_i$.
Suppose $\ell_i(t)$ are convex and twice differentiable. Let
\begin{eqnarray*}
{\kappa} = \max_{i\le n}\sup_{s<t}\big|\log(\ell_i''(t))-\log(\ell_i''(s))\big|\big/|t-s|
\end{eqnarray*}
be the maximum Lipschitz norm of $\log(\ell_i''(t))$. We note that $\kappa=1$ for logistic
regression with $\ell_i(t) = \ln(1+e^{-t})$, $\kappa=1$ for the Poisson/log linear regression
with $\ell_i(t) = e^t - y_i t$, and $\kappa = 0$ for linear regression.
For sparse ${\bar{\beta}}$, ${\cal C}\subset\Omega$, norm $\|\cdot\|$, and $j=1,2$, define
\begin{eqnarray*}
\gamma_j({\bar{\beta}};r,{\cal C},\|\cdot\|) = \inf\Big\{\sum_{i=1}^n\frac{\ell_i''(\innerprod{x_i}{{\bar{\beta}}})}{2e}
\min\Big(\frac{\innerprod{x_i}{\beta-{\bar{\beta}}}^2}{\|\beta-{\bar{\beta}}\|^2},
\frac{|\innerprod{x_i}{\beta-{\bar{\beta}}}|^{2-j}}{r^j\|\beta-{\bar{\beta}}\|^{2-j}}\Big):
\beta\in{\cal C}\Big\}.
\end{eqnarray*}
The following lemma can be used to bound $D_L(\beta,{\bar{\beta}})$ and $D_L({\bar{\beta}},\beta)$
from below.
\begin{lemma}\label{lm:GLM}
Given ${\bar{\beta}}$, ${\cal C}\subset\Omega$ and norm $\|\cdot\|$,
let $\beta\in{\bar\Omega}$ such that the ray from ${\bar{\beta}}$ to $\beta$ and beyond intersects with ${\cal C}$,
$\{t(\beta-{\bar{\beta}})+{\bar{\beta}}: t>0\}\cap{\cal C}\neq\emptyset$.
If $0<\|\beta-{\bar{\beta}}\|\le r$,
\begin{eqnarray*}
\frac{D_L(\beta,{\bar{\beta}})}{\|\beta-{\bar{\beta}}\|^2} \ge
\gamma_1({\bar{\beta}}; \kappa r,{\cal C},\|\cdot\|),\quad
\frac{D_L({\bar{\beta}},\beta)}{\|\beta-{\bar{\beta}}\|^2} \ge
\gamma_2({\bar{\beta}}; \kappa r,{\cal C},\|\cdot\|).
\end{eqnarray*}
\end{lemma}
\begin{proof} Let ${\tilde{\beta}} = t_0(\beta - {\bar{\beta}}) + {\bar{\beta}} \in{\cal C}$.
Since $\gamma_j({\bar{\beta}};r,{\cal C},\|\cdot\|)$ is decreasing in $r$, it suffices to
consider $0< \|\beta-{\bar{\beta}}\| =r$.
Since ${\kappa}$ is the Lipschitz norm of $\log(\ell_i''(t))$,
\begin{eqnarray*}
D_L(\beta,{\bar{\beta}})/r^2
&=& \int_0^1(1-t) \sum_{i=1}^n\ell_i''(\innerprod{x_i}{{\bar{\beta}}}+t\innerprod{x_i}{\beta-{\bar{\beta}}})
\innerprod{x_i}{\beta-{\bar{\beta}}}^2 dt/r^2
\cr &\ge& \int_0^1(1-t) \sum_{i=1}^n\ell_i''(\innerprod{x_i}{{\bar{\beta}}})
e^{-t{\kappa}|\innerprod{x_i}{\beta-{\bar{\beta}}}|}\innerprod{x_i}{\beta-{\bar{\beta}}}^2 dt/r^2
\cr &\ge& \sum_{i=1}^n\ell_i''(\innerprod{x_i}{{\bar{\beta}}})\innerprod{x_i}{\beta-{\bar{\beta}}}^2
\int_0^1(1-t)I\{t{\kappa}|\innerprod{x_i}{\beta-{\bar{\beta}}}|\le 1\}dt/(er^2).
\end{eqnarray*}
Since $\int_0^{x\wedge 1}(1-t)dt = x\wedge 1 - (x\wedge 1)^2/2\ge (x\wedge 1)/2$, we find
\begin{eqnarray*}
D_L(\beta,{\bar{\beta}})/r^2
&\ge& \sum_{i=1}^n\ell_i''(\innerprod{x_i}{{\bar{\beta}}})\innerprod{x_i}{\beta-{\bar{\beta}}}^2
\min\Big(1, \frac{1}{\kappa |\innerprod{x_i}{\beta-{\bar{\beta}}}|}\Big)\frac{1}{2er^2}
\cr &\ge& \sum_{i=1}^n\frac{\ell_i''(\innerprod{x_i}{{\bar{\beta}}})}{2e}
\min\Big(\frac{\innerprod{x_i}{\beta-{\bar{\beta}}}^2}{\|\beta-{\bar{\beta}}\|^2},
\frac{|\innerprod{x_i}{\beta-{\bar{\beta}}}|}{\kappa r\|\beta-{\bar{\beta}}\|}\Big).
\end{eqnarray*}
Since $\innerprod{x_i}{\beta-{\bar{\beta}}}|/\|\beta-{\bar{\beta}}\|=\innerprod{x_i}{{\tilde{\beta}}-{\bar{\beta}}}|/\|{\tilde{\beta}}-{\bar{\beta}}\|$
and ${\tilde{\beta}}\in {\cal C}$, $D_L(\beta,{\bar{\beta}})/r^2\ge \gamma_1({\bar{\beta}}; \kappa r,{\cal C},\|\cdot\|)$.
The proof for $D_L({\bar{\beta}},\beta)$ is similar. We have
\begin{eqnarray*}
D_L({\bar{\beta}},\beta)/r^2
&=& \int_0^1 \sum_{i=1}^n\ell_i''(\innerprod{x_i}{{\bar{\beta}}}+t \innerprod{x_i}{\beta-{\bar{\beta}}})\innerprod{x_i}{\beta-{\bar{\beta}}}^2 tdt /r^2
\cr &\ge & \sum_{i=1}^n\ell_i''(\innerprod{x_i}{{\bar{\beta}}})\innerprod{x_i}{\beta-{\bar{\beta}}}^2
\int_0^1I\{t{\kappa} |\innerprod{x_i}{\beta-{\bar{\beta}}}| \le 1\} tdt/(er^2)
\cr &=& (2e)^{-1}\sum_{i=1}^n \ell_i''(\innerprod{x_i}{{\bar{\beta}}})
\min\Big(\frac{\innerprod{x_i}{\beta-{\bar{\beta}}}^2}{\|\beta-{\bar{\beta}}\|^2}, \frac{1}{{\kappa}^2r^2}\Big).
\end{eqnarray*}
This gives $D_L({\bar{\beta}},\beta)/r^2\ge \gamma_2({\bar{\beta}}; \kappa r,{\cal C},\|\cdot\|)$.
\end{proof}
Suppose $\gamma_j({\bar{\beta}};r_0,{\cal C},\|\cdot\|)\ge \gamma_0$ for $j=1,2$.
Lemma \ref{lm:GLM} asserts that for the $\beta$ considered, both $D_L(\beta,{\bar{\beta}})$ and
$D_L({\bar{\beta}},\beta)$ are no smaller than $\gamma_0\|\beta-{\bar{\beta}}\|^2$
for ${\kappa}\|\beta-{\bar{\beta}}\|\le r_0$. For larger $r=\|\beta-{\bar{\beta}}\|$,
\begin{eqnarray*}
&& D_L(\beta,{\bar{\beta}})\ge r^2\gamma_1({\bar{\beta}}; \kappa r,{\cal C},\|\cdot\|)
\ge \|\beta-{\bar{\beta}}\| (r_0/{\kappa})\gamma_1({\bar{\beta}}; r_0,{\cal C},\|\cdot\|),\qquad
\cr && D_L({\bar{\beta}},\beta)\ge r^2 \gamma_2({\bar{\beta}}; \kappa r,{\cal C},\|\cdot\|)
\ge (r_0/{\kappa})^2\gamma_2({\bar{\beta}}; r_0,{\cal C},\|\cdot\|).
\end{eqnarray*}
Since $D_L(\beta,{\bar{\beta}})$ is convex in ${\bar{\beta}}$ and $D_L({\bar{\beta}},\beta)$ is not, such
lower bounds are of the best possible type for large $\|\beta-{\bar{\beta}}\|$
when $\ell_i''(t)$ are small for large $t$, as in the case of logistic regression.
Given ${\bar{\beta}}$, setting ${\cal C}_G=\{\beta: \sup_{u\in G} \innerprod{u+\nabla L({\bar{\beta}})}{\beta} \le 0\}$
yields the lower bound
\begin{eqnarray*}
\gamma_L({\bar{\beta}};r,G,\|\cdot\|) \ge \gamma_1({\bar{\beta}};\kappa r,{\cal C}_G,\|\cdot\|)
\end{eqnarray*}
for the RSC constant in Definition \ref{def:RSC}. The lower bound
$D_L({\bar{\beta}},\beta)\ge (r_0/{\kappa})^2\gamma_2({\bar{\beta}}; r_0,{\cal C},\|\cdot\|)$ can be
used to check the condition $D_L({\bar{\beta}},\beta)\ge D_{\bar{L}}(\beta,{\bar{\beta}})$
in Corollaries \ref{cor:dual_certificate-oracle} and \ref{cor:recovery-global-dc-oracle}.
We measure the noise level by
\begin{eqnarray*}
\eta(\beta^*) = \sup\big\{|\innerprod{\nabla L(\beta^*)}{\beta}|/R(\beta): \beta\neq 0,\beta\in\Omega\big\}.
\end{eqnarray*}
Let ${\bar{\beta}}$ be a sparse vector and $G\subseteq\partial R({\bar{\beta}})$.
Given $\{{\bar{\beta}},\beta^*,\|\cdot\|\}$, we measure the penalty level by
\begin{eqnarray*}
\lambda({\bar{\beta}},\beta^*;\|\cdot\|)
= \sup\big\{ \innerprod{\nabla L(\beta^*)+u}{{\bar{\beta}}-\beta}/\|\beta-{\bar{\beta}}\|:
u\in\partial R(\beta),\beta\in\Omega\}.
\end{eqnarray*}
Since for all $u \in \partial R(\beta)$ and $\bar{u} \in \partial R({\bar{\beta}})$, we have
$\innerprod{u}{{\bar{\beta}}-\beta} \leq \innerprod{\bar{u}}{{\bar{\beta}}-\beta}$, it follows that
\[
\lambda({\bar{\beta}},\beta^*;\|\cdot\|)
\leq \inf_{\bar{u} \in \partial R({\bar{\beta}})} \|\nabla L(\beta^*)+\bar{u}\|_D ,
\]
where $\|\cdot\|_D$ is the dual norm of $\|\cdot\|$.
This connects the quantity $\lambda(\cdot)$ to
$\inf_{u \in G} \|u+\nabla L({\bar{\beta}})\|_D$ used in Theorem~\ref{thm:dual_certificate-error}.
Similarly, we may define
\begin{eqnarray*}
{\cal C}_{{\bar{\beta}},\beta^*} = \Big\{\beta: \sup_{u\in\partial R(\beta)}\innerprod{u+\nabla L(\beta^*)}{{\bar{\beta}}-\beta} > 0\Big\} .
\end{eqnarray*}
Note that we have
${\cal C}_{{\bar{\beta}},\beta^*} \subset \Big\{\beta: \inf_{\bar{u}\in\partial R({\bar{\beta}})}\innerprod{\bar{u}+\nabla L(\beta^*)}{{\bar{\beta}}-\beta} > 0\Big\}$,
and this relationship connects the quantity
$\gamma_2({\bar{\beta}};1,{\cal C}_{{\bar{\beta}},\beta^*}\|\cdot\|)$ in Theorem~\ref{thm:GLM} to the quantity
$\gamma_L({\bar{\beta}};r,G,\|\cdot\|)$ in Defintion~\ref{def:RSC}.
The following result for generalized linear models is related to Theorem~\ref{thm:dual_certificate-error}, but
is more specific to the loss function (\ref{eq:gen-lin-model}) and more elaborated.
\begin{theorem}\label{thm:GLM} Suppose $\eta(\beta^*)<1$. Let ${\bar{\beta}}$ be a sparse vector such that
\begin{eqnarray}\label{thm:GLM-1}
\sup_{\beta\in{\cal C}_{{\bar{\beta}},\beta^*}}\|\beta-{\bar{\beta}}\|
\le \frac{\gamma_2({\bar{\beta}};1,{\cal C}_{{\bar{\beta}},\beta^*}\|\cdot\|)}
{{\kappa}^2\lambda({\bar{\beta}},\beta^*;\|\cdot\|)}
+ \frac{\lambda({\bar{\beta}},\beta^*;\|\cdot\|)}
{4\gamma_2({\bar{\beta}};1,{\cal C}_{{\bar{\beta}},\beta^*}\|\cdot\|)}.
\end{eqnarray}
Then,
\begin{eqnarray*}
D_L({\hat{\beta}},\beta^*) \le D_L({\bar{\beta}},\beta^*) + \frac{\lambda^2({\bar{\beta}},\beta^*;\|\cdot\|)}
{4\gamma_2({\bar{\beta}};1,{\cal C}_{{\bar{\beta}},\beta^*}\|\cdot\|)}.
\end{eqnarray*}
\end{theorem}
\begin{proof}.
Let ${\tilde{\beta}} = {\bar{\beta}}+t({\hat{\beta}}-{\bar{\beta}})$. Define
\begin{eqnarray*}
f(t) = D_L({\tilde{\beta}},\beta^*) - D_L({\bar{\beta}},\beta^*)
= L({\tilde{\beta}})-L({\bar{\beta}}) + t\innerprod{- \nabla L(\beta^*)}{{\hat{\beta}}-{\bar{\beta}}}.
\end{eqnarray*}
The function $f(t)$ is convex with $f(0)=0$ and
$f'(t) = \innerprod{\nabla L({\tilde{\beta}}) - \nabla L(\beta^*)}{{\hat{\beta}}-{\bar{\beta}}}$.
If $f'(1)\le 0$, then $D_L({\hat{\beta}},\beta^*) - D_L({\bar{\beta}},\beta^*) = f(1)\le f(0)=0$
and the conclusion holds. Assume $f'(1)>0$ in the sequel.
Let $u=-\nabla L({\hat{\beta}})$. By (\ref{eq:hbeta}), $u\in\partial R({\hat{\beta}})$.
Since $f'(1)=\innerprod{u+ \nabla L(\beta^*)}{{\bar{\beta}}-{\hat{\beta}}}>0$, ${\hat{\beta}}\in {\cal C}_{{\bar{\beta}},\beta^*}$.
It follows that $f'(1)\le \lambda({\bar{\beta}},\beta^*;\|\cdot\|)\|{\hat{\beta}}-{\bar{\beta}}\|$. By Lemma \ref{lm:GLM}
\begin{eqnarray*}
f(t)-f'(t)t= - D_L({\bar{\beta}},{\tilde{\beta}})
\le - \|{\tilde{\beta}}-{\bar{\beta}}\|^2\gamma_2({\bar{\beta}};\kappa\|{\tilde{\beta}}-{\bar{\beta}}\|,{\cal C}_{{\bar{\beta}},\beta^*}\|\cdot\|).
\end{eqnarray*}
Consider two cases. If $\kappa \|{\hat{\beta}}-{\bar{\beta}}\|\le 1$, we set $t=1$ to obtain
\begin{eqnarray*}
f(1) &\le& f'(1) - \|{\hat{\beta}}-{\bar{\beta}}\|^2\gamma_2({\bar{\beta}};1,{\cal C}_{{\bar{\beta}},\beta^*}\|\cdot\|)
\cr &\le& \lambda({\bar{\beta}},\beta^*;\|\cdot\|)\|{\hat{\beta}}-{\bar{\beta}}\| -
\|{\hat{\beta}}-{\bar{\beta}}\|^2\gamma_2({\bar{\beta}};1,{\cal C}_{{\bar{\beta}},\beta^*}\|\cdot\|).
\end{eqnarray*}
Taking the maximum of $x\lambda({\bar{\beta}},\beta^*;\|\cdot\|) -
x^2\gamma_2({\bar{\beta}};\kappa\|{\hat{\beta}}-{\bar{\beta}}\|,{\cal C}_{{\bar{\beta}},\beta^*}\|\cdot\|)$, we find
\begin{eqnarray*}
D_L({\hat{\beta}},\beta^*) - D_L({\bar{\beta}},\beta^*) = f(1)
\le \frac{\lambda^2({\bar{\beta}},\beta^*;\|\cdot\|)}
{4\gamma_2({\bar{\beta}};1,{\cal C}_{{\bar{\beta}},\beta^*}\|\cdot\|)}.
\end{eqnarray*}
For $\kappa \|{\hat{\beta}}-{\bar{\beta}}\| > 1$, we set $t<1$ so that $\kappa \|{\tilde{\beta}}-{\bar{\beta}}\| = 1$
\begin{eqnarray*}
f(1) \le f'(1) + f(t)-tf'(t) \le \lambda({\bar{\beta}},\beta^*;\|\cdot\|)\|{\tilde{\beta}}-{\bar{\beta}}\|
- {\kappa}^{-2}\gamma_2({\bar{\beta}};1,{\cal C}_{{\bar{\beta}},\beta^*}\|\cdot\|).
\end{eqnarray*}
This gives $f(1)\le \lambda^2({\bar{\beta}},\beta^*;\|\cdot\|)/
\{4\gamma_2({\bar{\beta}};1,{\cal C}_{{\bar{\beta}},\beta^*}\|\cdot\|)\}$ when
\begin{eqnarray*}
\|{\tilde{\beta}}-{\bar{\beta}}\| \le \frac{\gamma_2({\bar{\beta}};1,{\cal C}_{{\bar{\beta}},\beta^*}\|\cdot\|)}
{{\kappa}^2\lambda({\bar{\beta}},\beta^*;\|\cdot\|)}
+ \frac{\lambda({\bar{\beta}},\beta^*;\|\cdot\|)}
{4\gamma_2({\bar{\beta}};1,{\cal C}_{{\bar{\beta}},\beta^*}\|\cdot\|)}.
\end{eqnarray*}
The proof is complete in view of the assumed condition on ${\bar{\beta}}$.
\end{proof}
Condition (\ref{thm:GLM-1}) holds if $\sup_{\beta\in\Omega}\|\beta\|\le A$ and
$2A \le \gamma_2({\bar{\beta}};1,{\cal C}_{{\bar{\beta}},\beta^*}\|\cdot\|)/
\{{\kappa}^2\lambda({\bar{\beta}},\beta^*;\|\cdot\|)\}$. This is a weaker condition that
the condition discussed after Corollary~\ref{cor:dual_certificate-oracle} because the quantity
$\lambda({\bar{\beta}},\beta^*;\|\cdot\|) \leq \inf_{\bar{u} \in \partial R({\bar{\beta}})} \|\nabla L(\beta^*)+\bar{u}\|_D $ is generally very small, which
means that we allow a very large $A$. Under this relatively weak condition, Theorem~\ref{thm:GLM} gives an oracle
inequality for generalized linear models that can be easily applied to common formulations such as logistic regression
and Poisson regression.
\bibliographystyle{abbrv}
|
{
"redpajama_set_name": "RedPajamaArXiv"
}
| 1,732
|
{"url":"http:\/\/math.stackexchange.com\/questions\/192561\/repeated-reflection","text":"# Repeated reflection\n\nThis is a problem from Feller's book introduction to probability theory and its application, Vol 1, Chap 3 problem 3.\n\nLet $a$ and $b$ be positive, and $-b <c<a$. Prove the number of paths to the point $(n,c)$ which meet neither the line $x=-b$ nor $x=a$ is given by the series $$\\tag1 \\sum_{k={-\\infty}}^{\\infty} (N_{n,4k(a+b)+c}-N_{n,4k(a+b)+2a-c})$$ where $N_{n,k}$ is the number of paths going from origin to point $(n,k)$ and only finitely many terms in $(1)$ are non-zero.\n\nThe hint suggests to use the reflection repeatedly, but why $4k(a+b)+c$ not $2k(a+b)+c$ ? Is this a typo in the problem?\n\n-\nI haven't looked at your problem but Feller's texts both volumes as brilliant as they are are load with little errors. So my apriori guess based on that knowledge is that you could be right@ \u2013\u00a0 Michael Chernick Sep 8 '12 at 0:35","date":"2015-08-04 05:35:30","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 1, \"mathjax_display_tex\": 1, \"mathjax_asciimath\": 0, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.775353729724884, \"perplexity\": 294.7214449587036}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2015-32\/segments\/1438042990445.44\/warc\/CC-MAIN-20150728002310-00015-ip-10-236-191-2.ec2.internal.warc.gz\"}"}
| null | null |
<!doctype html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]-->
<!--[if gt IE 8]> <html class="no-js" lang="en"> <![endif]-->
<head>
<meta charset="utf-8">
<!-- You can use .htaccess and remove these lines to avoid edge case issues. -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>{{ settings:site_name }} » {{ template:title }}</title>
<meta name="author" content="Scott Parry - iKreativ">
<meta name="description" content="">
<meta name="keywords" content="">
<!-- Mobile viewport optimized -->
<meta name="viewport" content="width=device-width,initial-scale=1">
<!-- Set a base location for assets -->
<base href="{{ url:base }}"/>
<!-- End base -->
<!-- CSS. No need to specify the media attribute unless specifically targeting a media type, leaving blank implies media=all -->
{{ theme:css file="plugins.css" }}
{{ theme:css file="workless.css" }}
<!-- End CSS-->
<!-- Googlelicious -->
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Droid+Sans:regular,bold" type="text/css" />
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Droid+Serif:regular,bold" type="text/css" />
<!-- Load up some favicons -->
{{ theme:favicon }}
<!-- All JavaScript at the bottom, except for Modernizr. -->
{{ theme:js file="libs/modernizr.js" }}
{{ theme:js file="libs/jquery.js" }}
{{ template:metadata }}
<!-- Google Analytics -->
{{ integration:analytics }}
<!-- Add some theme option variables for styling -->
<style type="text/css">
/* Background */
{{ if theme:options:background == 'black' }}
body { background: url({{ theme:path }}/img/bg_black.jpg) fixed repeat; }
{{ elseif theme:options:background == 'fabric' }}
body { background: url({{ theme:path }}/img/bg_fabric.jpg) fixed repeat; }
{{ elseif theme:options:background == 'graph' }}
body { background: url({{ theme:path }}/img/bg_graph.jpg) fixed repeat; }
{{ elseif theme:options:background == 'leather' }}
body { background: url({{ theme:path }}/img/bg_leather.jpg) fixed repeat; }
{{ elseif theme:options:background == 'noise' }}
body { background: url({{ theme:path }}/img/bg_noise.jpg) fixed repeat; }
{{ elseif theme:options:background == 'texture' }}
body { background: url({{ theme:path }}/img/bg_texture.jpg) fixed repeat; }
{{ elseif theme:options:background == 'fabric' }}
body { background: url({{ theme:path }}/img/bg_fabric.jpg) fixed repeat; }
{{ endif }}
/* Colors */
{{ if theme:options:color == 'red' }}
.pagination ul li a:hover, .pagination ul li.active a, nav#primary ul li.current { background:#ff0000; }
a:hover, .single_post h5 small a:hover, nav#primary ul li a:hover { color:#ff0000; }
{{ elseif theme:options:color == 'orange' }}
.pagination ul li a:hover, .pagination ul li.active a, nav#primary ul li.current { background:#EF770E; }
a:hover, .single_post h5 small a:hover, nav#primary ul li a:hover { color:#EF770E; }
{{ elseif theme:options:color == 'yellow' }}
.pagination ul li a:hover, .pagination ul li.active a, nav#primary ul li.current { background:#EDBB1C; }
a:hover, .single_post h5 small a:hover, nav#primary ul li a:hover { color:#EDBB1C; }
{{ elseif theme:options:color == 'green' }}
.pagination ul li a:hover, .pagination ul li.active a, nav#primary ul li.current { background:#bada55; }
a:hover, .single_post h5 small a:hover, nav#primary ul li a:hover { color:#bada55; }
{{ elseif theme:options:color == 'blue' }}
.pagination ul li a:hover, .pagination ul li.active a, nav#primary ul li.current { background:#0087C2; }
a:hover, .single_post h5 small a:hover, nav#primary ul li a:hover { color:#0087C2; }
{{ elseif theme:options:color == 'pink' }}
.pagination ul li a:hover, .pagination ul li.active a, nav#primary ul li.current { background:#DD1251; }
a:hover, .single_post h5 small a:hover, nav#primary ul li a:hover { color:#DD1251; }
{{ endif }}
</style>
</head>
<body class="{{ url:segments segment="1" default="home" }}" onload="prettyPrint()">
<!-- container -->
<div class="container">
<header>
<div id="logo">
<a href="{{ url:base }}">
<h1>{{ settings:site_name }}</h1>
</a>
<span class="slogan">
{{ settings:site_slogan }}
</span>
</div>
<nav id="primary">
<ul>
{{ navigation:links group="header" }}
</ul>
</nav>
</header>
|
{
"redpajama_set_name": "RedPajamaGithub"
}
| 4,467
|
"One man's lifes works featured on all 3 floors of the Old Neptune High School"
New Classes at Jersey Shore Arts Center
Café Artiste: Songwriter's Showcase
NENAproductions newest Nunsense
(Caption first photo: Amanda Munice as Sister Amnesia in NUNSENSE, the Habit Forming Musical at NENA.)
NENAProductions Theater Project, Ocean Grove's resident theater company, will be staging the habit-forming musical comedy NUNSENSE Fridays and Saturdays, March 1 – 9 at 7:30 PM and Sunday, March 10 at 3PM. Directed by the theater company's Artistic Director, Nick Montesano.
Originally hailed by the New York Times as "Wacky and outrageous with a hysterical anything goes sense of fun!" Nunsense is a barrel of laughs for any and all ages with zany songs and never ending smiles. The book, music, and lyrics are all by Dan Goggin.
Nunsense follows the crazy antics of five nuns from the Little Sisters of Hoboken convent. When their cook, Sister Julia, child of God, accidentally serves up some tainted soup, 52 of the sisters are poisoned and die, leaving only five living nuns who were not at home the day of the toxic meal. When the convent's first-in-charge, Reverend Mother Regina, splurges on a flat screen LED TV, the sisters find themselves strapped for cash, as they still have four dead nuns to bury. The nuns decide to put on a benefit performance in the setting of the musical Grease in order to raise the rest of the money before the health department discovers their secret.
(Caption second photo: Tara Beams and Amy Skalecki appear in NUNSENSE.)
The cast line-up features NENA veteran performers including; Sister Mary Hubert, the Mistress of Novices played by Tara Beams (Merrily We Roll Along, Godspell); a streetwise nun named Sister Robert Anne played by Heather McLaughlin (Bat Boy, Urinetown) ; Sister Mary Leo, a novice who is a wannabe ballerina played by Emily Monus (Fun Home, A New Brain); and the delightfully wacky Sister Mary Amnesia, the nun who lost her memory when a crucifix fell on her head played by Amanda Munice (The Secret Garden, Avenue Q). Reverend Mother Regina, a former circus performer is played by Amy Skalecki, making her NENA debut, but a Jersey Shore stage veteran.
Jeff Brown serves as Musical Director for the production, with Allison Walter as Stage Manager and Arnold Teixeira as Technical Director.
All seats are $25. Tickets can be purchased at any time on-line through www.ticketleap.com, or by telephone at 732-988-1007. The Theater lobby box office opens for ticket sales one hour prior to a performance. All performance take place on the main stage of The Jersey Shore Arts Center, 66 South Main Street, Ocean Grove, NJ 07756.
Today, the former Neptune High School and current Jersey Shore Arts Center (JSAC) still provides an "education" to Monmouth County. In addition to providing a venue for arts-related activities, the JSAC also is a home to creative professionals who offer instruction and participation in the arts, dance, music, and theater.
|
{
"redpajama_set_name": "RedPajamaCommonCrawl"
}
| 8,664
|
Beyblade Burst is a 2016 Japanese anime series and the third incarnation of the Beyblade series. The series was produced by D-rights and TV Tokyo and animated by OLM, and it premiered on all TXN stations in Japan on April 4, 2016. An English version of the anime premiered in Canada on Teletoon on September 10, 2016 and on Disney XD on October 2. The series also premiered on 9Go! in Australia on December 5, 2016, and on Disney XD in the United States on December 19, 2016. The opening theme for the series is "Burst Finish!", by Tatsuyuki Kobayashi, while the ending theme is "Believe", by Shiklamen. The English theme for the season is "Our Time" by Shaun Chasin.
Episode list
References
Burst Season 1
2016 Japanese television seasons
2017 Japanese television seasons
|
{
"redpajama_set_name": "RedPajamaWikipedia"
}
| 7,626
|
Pharmacist uses nature to heal
Combines Western and ancient Japanese practices
Posted Thursday, September 5, 2019 12:00 am
The participants chatted about peace, prosperity and present-mindedness at sunset.
JD Freda/Herald Citizen
By JD Freda
Finding comfort in a slow walk in an open field. Seeking solace in a short retreat along wooded trails. Escaping stress and anxiety in a bracing coastal breeze. Imagine sharing these experiences with a group of students in the "wilds" of Wantagh Park, and you'll have a rudimentary understanding of the Japanese practice of shinrin-yoku, or forest bathing.
It is a practice that Stephanie Gaglione, 27, who lives in Bethpage, chose to explore in the midst of a budding pharmaceutical career.
On Aug. 16, Gaglione led a small group of Long Islanders to the shoreline of Wantagh Park and introduced them to shinrin-yoku, giving them a brief history of its origins and explaining why she became interested in it and why she shares it with others. For the following three hours or so, she directed the group through a series of "invitations," soft commands designed to inspire action, or sometimes inaction.
Gaglione earned her PharmD degree from the Albany College of Pharmacy and Health Sciences in 2015. Since then she has accrued 11 pharmacy internships, and now works as a clinical pharmacist for CHC Health. The company is based in Des Moines, Iowa, and she mostly works with patients remotely, she said, adding that she felt that something was missing.
"When I was asked in high school what I wanted to do in my life, I said, this is a great plan," Gaglione said. "It's logical, secure, but I didn't know how to ask myself these important questions I had."
Last year, she became interested in more holistic forms of therapy. She took a position as chiropractic assistant and in marketing outreach at Advanced Holistic, a family chiropractic health care office that focuses on holistic healing. This summer, she taught children at the USDAN Summer Camp for the Arts as an assistant nature teacher.
To immerse herself in holistic healing, she joined the Association of Nature and Forest Therapy and took part in a guide-training retreat in Auckland, New Zealand. The technique that she learned was shinrin-yoku, also known as "forest bathing." According to the association, studies show that those involved in this form of therapy can experience "a wide array of health benefits, especially in the cardiovascular and immune systems, and for stabilizing and improving cognition and mood."
Gaglione underwent training to be a shinrin-yoku guide in New Zealand, and shared her experiences and findings when she returned. She said she believes that the future of therapy may lie in a combination of traditional Western medicine and more experimental holistic methods.
"Seeing people that were sick in the medical world and not getting full care and resolve — that led me to looking at different, holistic types of care," Gaglione said. "That has led me to both extremes. You can't be all natural, and you can't fully rely on modern Western medicine. To me, health is more than just the physical body. More people are focusing on mental health these days, but also spiritual health, which I think is going to take a little bit longer to become a focus. I'm trying to bring forth a balance between them."
One of the members of her group at Wantagh Park two weeks ago was Johnny Korkodilos, 28, of Great River. Korkodilos is a field manager at the Bayard Cutting Arboretum in Great River, where he lives in the manor house of the 691-acre state park property and tends to the fields.
"This experience gave me the ability to tap much more deeply into the moment, become far more present than even my yoga practice, my qigong practice, or farming," Korkodilos said, referring to a Chinese form of gentle exercise. "So often, we're so goal-oriented, worried about what we've done, what we have to do. Something about this practice, sitting in the presence of nature with no goal and the freedom to just explore it, it helped me stay present."
Gaglione led the "invitations" with a soothing tone, and eased everyone into the process. She wove nature appreciation exercises in with those enhancing trust, with the aim of building the participants' respect for the natural world as well as a kinship with their fellow humans.
She encouraged them to use senses other than sight to fully appreciate the cool breeze off the ocean, the salt air and the sound of waves crashing on rocks. The session concluded with a reflection on the day and a sharing of mint tea and natural snacks under the setting sun.
"I think it went really well, and I love sharing this," Gaglione said. "I was too caught up at first in 'Am I doing this right?' or 'Am I forgetting anything important and will they notice?' until I realized that's not what I do this for. I do this to share my love for this, and I do this to find peace, and I feel peace."
Floral Park-Bellerose student council raises funds to host breakfast for frontline workers
Police investigating double burglary incident
NCPD ups reward to $50,000 to catch acid assailant
School bus hits pedestrian in Hempstead
|
{
"redpajama_set_name": "RedPajamaCommonCrawl"
}
| 3,635
|
Key Aspects of a Narrative Essay
How to Write a Narrative Story
What Does It Mean to Analyze an Essay for Structure?
What Is the Relationship Between a Hypothesis, Conclusion & Thesis Statement?
Elements of an Informational Narrative
Damian Miller Updated July 21, 2017
Jack Hollingsworth/Digital Vision/Getty Images
An informational narrative is used when the writer is trying to inform others about a particular subject of which they may not be familiar. Informative essays can also be called an expository or explanatory essays. This kind of essay is aimed at presenting information in a clear and concise manner so the reader can learn about the subject matter.
Basics of an Informational Narrative
An informational narrative is written using a variety of resources to present information. It consists of an introduction with a thesis, the body of the text with cited information supporting the thesis, and the conclusion which sums up the points presented in the narrative.
When writing an informational narrative, avoid using the personal pronoun 'I,' and do not use contractions. Because this is a narrative which is supposed to present an idea, you will need to a method to cite the source where you obtained information and ideas that inspired your own thoughts. This is important so the reader can go back to the sources cited and confirm what was written is in fact what the source states.
Elements of the Introduction
The introduction is where the writer presents the thesis which the narrative will be based around. The thesis is the central argument in which the body of the narrative will be supporting. When writing an introduction attempt to get to the thesis in the first or second sentence of the narrative. The narrative is a tool to inform the reader about the thesis of the paper. Realize that the reader is more concerned about the thesis and less about beautiful prose. Present your argument in the thesis as soon as possible.
Body of the Narrative
The body of the narrative is where you present the information which you have obtained in your research and supports the thesis which was presented in the introduction. The body of the text can be as long or as short as required to complete the narrative, but in general they are at least three paragraphs long. When writing you will want to present a single idea which relates to the thesis in each paragraph along with the required citations. Do not present more than a single idea in each paragraph. Otherwise the paragraph can seem cluttered.
Conclusion of the Narrative
Concluding the narrative is not about just simply restating the thesis in the introduction. Summarize the information which was presented in the body of the narrative in relation to the thesis, creating a synthesis of information which the reader can conclude that what was presented supports the thesis which you presented. At the very most a conclusion should only be several paragraphs unless the narrative is extremely long or complex. Never introduce new information in the conclusion. If the information is important enough to include in the conclusion it should have been included in the body of the narrative.
Tips for an informational narrative
The informational narrative is about informing the reader in a clear and concise manner the thesis of the paper. Again, concise and precise wording is more important in this sort of narrative than lyrical language. Think about the audience of the narrative as well. This will affect how you write the narrative. Writing to an audience who does not understand the thesis presented will require more information and explanation than writing for a group of experts in the field which the subject matter is part of their career. Finally, the flow of the narrative should include transitions between each paragraph. Transitions are sentences or phrases that help the reader move smoothly between your ideas.
Miller, Damian. "Elements of an Informational Narrative." , https://penandthepad.com/elements-informational-narrative-8663742.html. Accessed 17 January 2020.
Miller, Damian. (n.d.). Elements of an Informational Narrative. . Retrieved from https://penandthepad.com/elements-informational-narrative-8663742.html
Miller, Damian. "Elements of an Informational Narrative" accessed January 17, 2020. https://penandthepad.com/elements-informational-narrative-8663742.html
Purdue University Online Writing Lab: What is an informational essay?
Purdue University Online Writing Lag: Expository Essay
Damian Miller has been a writer since 2002. He has published the ebooks "End of the Rainbow" and "Guide to Cold Weather Hiking." Miller is an Eagle Scout and holds a master's degree in history and Bachelor of Arts degrees in anthropology/sociology and in history from Purdue University.
Types of Text: Narrative, Expository, Technical & Persuasive
How to Start an Argumentative Paper
How to Write an Analytical History Paper
How to Write a Strong Narrative
What Are the Requirements of Narrative Writing?
Organizing a Persuasive Essay
Elements of a Summary & Conclusion
How to Make an Introduction in a Research Paper
|
{
"redpajama_set_name": "RedPajamaCommonCrawl"
}
| 9,568
|
\section{Introduction}
Knowledge distillation transfers knowledge from one neural network model to another by matching different information sources from the models: logits \cite{hinton2014distilling}, features \cite{romero2014fitnets}, or gradients \cite{srinivas2018knowledge}. It has found wide applications in such areas as model compression \cite{hinton2014distilling, wang2020knowledge, ba2014deep, urban2016deep}, incremental learning \cite{li2016learning, lee2019overcoming}, privileged learning \cite{lopez2015unifying}, adversarial defense \cite{papernot2016distillation},
and learning with noisy data \cite{li2017learning}. This knowledge transfer usually follows the teacher-student scheme, in that a high-performing teacher model provides knowledge sources for a student model to match.
\revised{Which part of the teacher provides a more informative knowledge source for a student to distill? \citet{heo2019knowledge} shows the features are more effective; \citet{tian2019crd} observes that logits are generally better, but matching the pairwise correlation with features outperforms logits. Recently, \citet{kim2021comparing} reports that logits achieve a better result when using L2 loss instead of KL-divergence. This puzzling inconsistency is due to the differences of both optimization criteria and the knowledge sources used in different methods, making a fair comparison across knowledge sources impossible.
This work provides a systematic approach to analyzing the above puzzle, providing a closer look at transferring knowledge in features, logits, and gradients. Specifically, we propose a new perspective to reinterpret the classical KD objective, using Taylor expansion to approximate the KL-divergence with different knowledge sources.
This novel perspective leads to a generalized divergence that allows us to use logits and features under the same optimization criteria, while the gradients provide information about the \textit{importance} of each feature for distillation.
We therefore based on the mathematical insight as a unified framework, instantiating varied methods to distill features, logits, and gradients. Interestingly, when we instantiate our variants with the simplest design choices, the resulting methods are similar to previous knowledge transfer techniques. The similarity demonstrates the generalizability of our framework. Nevertheless, there are still nuanced differences between our variants and prior methods to ensure a fair comparison across knowledge sources, discussed later.
We explore two aspects that have never been jointly investigated with knowledge sources. The first is observing whether the trend of effectiveness is consistent across different transfer learning tasks. The two most popular KD tasks are included: model compression and incremental learning. The second aspect is to investigate the impact of model design and identify the key factors affecting knowledge sources' effectiveness. In summary, this work provides the following contributions and findings:
}
\begin{itemize}
\item \revised{We provide a new perspective to interpret the classical KD, showing that a single framework can describe the distillation with different knowledge sources. To the best of our knowledge, this perspective has not been presented.}
\item \revised{The new perspective leads to a new strategy for improving feature-based KD by weighing the importance of features based on gradients from the teacher.}
\item Our systematic comparison shows that logits generally is the more effective knowledge source, followed by the features weighted by gradients and the plain features. This trend is consistent in both model compression and incremental learning.
\item We further use a new metric with a normalized basis to analyze the factors that affect the above trend, pointing out that the feature size of the penultimate layer plays a crucial role in impacting different knowledge sources' effectiveness.
\end{itemize}
\section{Rethinking Knowledge Distillation} \label{sec:rethinking}
Our observation starts with the generic knowledge distillation criteria $\mathcal{L}_{KD}$ for classification \cite{hinton2014distilling}. The criteria includes cross-entropy loss $\mathcal{L}_{CE}$ for a student model to learn from ground-truth label $y^*$, and $D_{\mathrm{KL}}$ for minimizing the difference between the predicted class distribution $p^s$ (from the student) and $p^t$ (from the teacher). The latter term makes the knowledge transfer happen, for which the coefficient $\lambda$ controls the intensity:
\begin{equation} \label{eq:KD}
\mathcal{L}_{KD}=\mathcal{L}_{CE}(p^s, y^*) + \lambdaD_{\mathrm{KL}}(p^t||p^s),
\end{equation}
\begin{equation} \label{eq:KLdiv}
D_{\mathrm{KL}}(p^t || p^s)=\sum_y p^t_y \log p^t_y - \sum_y p^t_y \log p^s_y
\end{equation}
The next step is to expand $D_{\mathrm{KL}}$. Here, we are more interested in how intermediate outputs $z$ from the teacher ($z^t=g^t(x)$) and student ($z^s=g^s(x)$) affect $D_{\mathrm{KL}}$; therefore, we treat the $z$ as the only variable in $p^t_y=f(y;z^t)$ and $p^s_y=f(y;z^s)$, leaving the parameters (if any) of the softmax-based classifier $f$ as constants and the same $f$ is used for both the teacher and student.
By taking the Taylor expansion around $z^t$ for the second term of \eqref{eq:KLdiv} and using the notation $dz=z^s-z^t$, $D_{\mathrm{KL}}$ becomes:
\begin{align}
D_{\mathrm{KL}}(p^t || p^s)=&\sump^t\logp^t-\sump^t\logp^t\nonumber\\
&-dz^T\sum p^t \frac{d}{dz}\log p^t\nonumber\\
&-\frac{1}{2}dz^T(\sump^t\frac{d^2}{dz^2}\logp^t) dz+\epsilon\label{eq:KLrawexpand}\\
=&\frac{1}{2}dz^T\sump^t(\frac{d}{dz}\logp^t)(\frac{d}{dz}\logp^t)^T dz+\epsilon \label{eq:KLexpand}
\end{align}
In \eqref{eq:KLrawexpand}, the first-order term is zero, while the second-order has a form of Fisher information matrix $F(z^t)$ at its middle. Details of derivation are available in the Supplementary. The above equations omit the $y$ for conciseness. Lastly, by ignoring the higher-order term $\epsilon$, $D_{\mathrm{KL}}$ can be rewritten as:
\begin{equation} \label{eq:KLapprox}
D_{\mathrm{KL}}(p^t || p^s)\approx \frac{1}{2}(z^s-z^t)^T F(z^t) (z^s-z^t)
\end{equation}
Although \eqref{eq:KLapprox} has a simple quadratic form, it provides two key insights:
\begin{enumerate}
\item Minimizing the difference between the student's and teacher's intermediate representations reduces the KL-divergence.
\item The Fisher information $F(z^t)$, which leverages the gradients regarding the teacher's intermediate representation, provides a weighting mechanism for the importance of features.
\end{enumerate}
\section{The Generalized Divergence} \label{sec:framework}
\revised{This section discusses the simplest design choices to turn \eqref{eq:KLapprox} into a framework that is easy to implement and instantiate its variants.}
There are two empirical considerations in applying \eqref{eq:KLapprox}, both stemming from the challenges of computing $F(z^t)$. The first is its $O(|z|^2)$ complexity. The computation could be expensive when $z$ has a large dimension (\textit{e}.\textit{g}. the flattened feature map from a convolution neural network based on image inputs). Here we follow the common simplification used by EWC~\cite{kirkpatrick2017overcoming} and Adam~\cite{kingma2014adam} in which only the diagonal of Fisher information matrix is considered, reducing the complexity to $O(|z|)$. Second, marginalizing over $y$ for accumulating the gradients could be time-consuming; therefore, there is a need to use an alternative loss function to collect gradients of $z^t$.
To adopt the above considerations, we define a generalized divergence $D_G$, making \eqref{eq:KLapprox} a special case of the generalized form:
\begin{equation} \label{eq:D_G}
D_G(z^t, z^s)=\alpha(z^s-z^t)^T W(z^t) (z^s-z^t)
\end{equation}
The coefficient $\alpha$ is a scaling factor that can be absorbed by $\lambda$. The $W(z^t)$ is still an n-by-n weighting matrix like $F(z^t)$, given $z^t$'s dimension $n$. The calculation of $W$ is still based on gradients from the teacher, specifically:
\begin{equation}
W(z^t)=diag((\frac{d}{dz}\mathcal{L}_*)(\frac{d}{dz}\mathcal{L}_*)^T)\label{eq:W}
\end{equation}
The function $diag$ casts all off-diagonal elements to be zero. The $\mathcal{L}_*$ is $\logp^t$ when computing the Fisher information. Here we consider two design choices for $\mathcal{L}_*$ to avoid the need of marginalizing over $y$:
\begin{align}
\mathcal{L}_E&=\logp^t_{y^*}\\
\mathcal{L}_H&=\frac{1}{k}\sum_{y=1}^k (l^t_y)^2
\end{align}
$\mathcal{L}_E$ is related to the empirical Fisher which requires knowing the ground-truth class $y^*$. $\mathcal{L}_H$ is a heuristic criteria by using the mean-squared logits ($l_y$) over $k$ classes. $\mathcal{L}_H$ does not require labels,
but captures the gradients that lead to a large change in logits. $\mathcal{L}_H$ is useful when the student (and its training data) has a different set of classes from the teacher, which is a case that $\mathcal{L}_E$ is not applicable.
Overall, our full criteria $\mathcal{L}_{KD-G}$ with the generalized divergence has the form:
\begin{equation} \label{eq:ourKD}
\mathcal{L}_{KD-G}=\mathcal{L}_{CE}(p^s, y^*) + \lambda D_G(z^t, z^s)
\end{equation}
Note $z$ can be the logits or features. Besides, the knowledge in the teacher's gradients are transferred to the student via $W(z^t)$. Therefore $\mathcal{L}_{KD-G}$ provides a \textit{unified} framework for comparing the effectiveness of each knowledge source by instantiating it in different ways. This is one of the main contributions of this paper, as our formulation allows an explicit fair comparison across knowledge sources within a unified framework. Below we elaborate the cases when $z$ is features or logits, and additionally extend the discussion to a model's parameters, which is a popular knowledge source in the incremental learning.
\begin{figure}
\centering
\includegraphics[clip, trim=0cm 0.4cm 16cm 0cm, width=0.5\textwidth]{figures/framework.pdf}
\caption{The schematic illustration for the variants that use features. The example vectors demonstrate how the gradients weigh the features. A darker color in the example vector indicates the feature is more influential. Note that the operation $a^2$ means all elements in the vector are squared. SE is the abbreviation of squared error.
}\label{fig:framework}
\end{figure}
\subsection{Features}\label{sec:features}
When $z$ is features, there are rich choices for computing $W$. One can use $\mathcal{L}_E$ when the ground-truth class $y^*$ is available. Such a condition is usually true in the case of model compression. In contrast, there may not be a valid label for the teacher model (as we will see in the later section on incremental learning).
In such cases, we use $\mathcal{L}_H$ for $W$. Furthermore, $W$ can also be an identity matrix, which reduces $D_G$ to a simple squared error. This case leads to the same optimization objective used in FitNet \cite{romero2014fitnets}. Therefore, we include $W=\mathbb{I}$ as one of the variants in our framework while simplifying its deployment with a principled normalization to make it amicable to KD tasks other than model compression, described in the later sections.
\subsection{Logits}\label{sec:logits}
When $z$ is logits, its Hessian matrix (as appears in \eqref{eq:KLrawexpand}) obtained through $\mathcal{L}_H$ is an identity matrix ($W=\mathbb{I}$ with a scaling factor that can be absorbed by the coefficient $\lambda$), indicating that a weighting mechanism based on gradients is redundant for this case. As a result, $D_G$ reduces to a simple squared error with logits. The result has the same formula as when computing the KL-divergence between the output probabilities with the logits being divided by a large temperature \cite{hinton2014distilling, kim2021comparing}, indicating this simple variant is worth more attention in a comparative study.
\subsection{Parameters} \label{sec:param_reg}
In an alternative perspective, which switches the focus from intermediate representations $z$ to model's parameters $\theta^t$ (from $g^t$) and $\theta^s$ (from $g^s$), a derivation similar to \eqref{eq:KLrawexpand} will lead to the parameter-based regularization. Note that our process derives it from a different motivation, but reaches the same formulation of EWC~\cite{kirkpatrick2017overcoming}, an importance-weighted parameter regularization method:
\begin{equation} \label{eq:EWC}
\mathcal{L}_{EWC}=\mathcal{L}_{CE}(p^s, y^*) + \frac{\lambda}{2}(\theta^s-\theta^t)^T F(\theta^t) (\theta^s-\theta^t)
\end{equation}
Although $\mathcal{L}_{KD-G}$ and $\mathcal{L}_{EWC}$ share a similar form, they have four fundamental differences:
(1) $\mathcal{L}_{KD-G}$ is for features or logits, while $\mathcal{L}_{EWC}$ is only for parameters.
(2) Our derivation starts from KL-divergence between categorical distributions, while EWC starts from the normal approximation of the posterior for parameters.
(3) EWC requires the teacher and student model to be the same. As a result, EWC is not considered as a KD method and is not applicable to model compression. (4) $\mathcal{L}_{KD-G}$ achieves significantly better results than $\mathcal{L}_{EWC}$ in the task-incremental learning (shown in the experiment section).
\subsection{The Four Instantiations
} \label{sec:variants}
Based on the above discussion, we create four $\mathcal{L}_{KD-G}$ instantiations to enable a systematic comparison. The first two (Weighted$_E$ Features-SE and Weighted$_H$ Features-SE) are novel KD methods derived from our framework, while the latter two (Features-SE and Logits-SE) have close alternatives in previous works. The illustration of the first three variants is shown in Figure \ref{fig:framework}. Their names are listed below with a description of how their $W$ is implemented for the $\mathcal{L}_{KD-G}$ (Note: SE means squared error):
\begin{itemize}
\item Weighted$_E$ Features-SE: $W$ uses $\mathcal{L}_E$
\item Weighted$_H$ Features-SE: $W$ uses $\mathcal{L}_H$
\item Features-SE: $W=\mathbb{I}$
\item Logits-SE: $W=\mathbb{I}$
\end{itemize}
\subsection{Incremental Learning (IL)} \label{sec:CL}
Incremental learning is a problem setting where KD is often applied. The setting has its model exposed to a sequence of tasks. These tasks have differences in either their input distribution, label distribution, or both. The model has no access to the training data of previous tasks when learning a new task. The shift of distributions among tasks introduces a significant interference to the learned parameters, largely undermining previous tasks' performance. This phenomenon is called catastrophic forgetting. A popular strategy is to regularize the model's parameters to mitigate the forgetting, reducing drift from its previously learned parameters. However, when the regularization is too strong, the model will not have sufficient plasticity to learn a new task well. Thus, there is a trade-off between minimizing forgetting and maximizing plasticity.
A good trade-off strategy keeps important knowledge while allowing the less important ones to be overwritten by the new tasks. The parameter-based regularization dominates this line of strategy. Previous works \cite{kirkpatrick2017overcoming,zenke2017continual,aljundi2017memory} select important parameters based on gradients and avoid those parameters from changing too much. It is a setting that complements model compression, providing an excellent opportunity to \textit{compare not only features, logits, and gradients, but also the model parameters for transferring the knowledge}.
\subsubsection{Applying our framework}
We consider the task-incremental learning \cite{Hsu18_EvalCL,van2019three} setting for our experiments. This setting has exclusive sets of classes in a sequence of classification tasks. The model learns each classification task sequentially with only access to the training data of the current task. During the learning curriculum, the model regularly adds an output head (as a linear layer) for a new classification task, while inheriting all the parts learned in the previous tasks. As a result, the model has multiple heads (one for each task), and it requires $D_G$ to sum over all previous tasks' output heads to regularize the model drifting. Specifically, $D_G$ is customized by:
\begin{equation}
D_{G-logits}^{IL}=\sum_j(l^s_{[j]}-l^t_{[j]})^T (l^s_{[j]}-l^t_{[j]})\label{eq:D_G_CL_logit}
\end{equation}
\begin{equation}
D_{G-features}^{IL}=\sum_j(z^s-z^t)^T W_{[j]}(z^t) (z^s-z^t) \label{eq:D_G_CL_feat}
\end{equation}
\begin{equation}
W_{[j]}(z^t)=diag((\frac{d}{dz} \frac{1}{k}\sum_{y=1}^k (l^t_{[j],y})^2)(\frac{d}{dz} \frac{1}{k}\sum_{y=1}^k (l^t_{[j],y})^2)^T)\label{eq:W_CL}
\end{equation}
The $l_{[j]}$ is the logits from the $j$th task. The regularization term sums over the tasks except the current task $T_{current}$ (\textit{i}.\textit{e}. task index $j=\{1..T_{current}-1\} $). Note that when $T_{current}=2$, everything here (equations \ref{eq:D_G_CL_logit} to \ref{eq:W_CL}) falls back to equations \ref{eq:D_G} and \ref{eq:W}. The only difference is that the current task's labels are out-of-scope for the previous (teacher) model. In other words, this is the case that $y^*$ is not valid for the teacher; therefore, \eqref{eq:W_CL} uses $\mathcal{L}_H$ to collect the gradients. In this section, our Logits-SE uses $D_{G-logits}^{IL}$, Weighted$_H$ Features-SE uses $D_{G-features}^{IL}$, and Features-SE has its $W_{[j]}(z^t)=\mathbb{I}$. We additionally add three EWC variants for the comparison. SI \cite{zenke2017continual} accumulates the gradients along the optimization trajectory to replace the $F(\theta^t)$ in \eqref{eq:EWC}. MAS \cite{aljundi2017memory} uses $\mathcal{L}_H$ to compute the gradients for a weighting matrix similar to our $W$. The L2 sets its $F(\theta^t)=\mathbb{I}$ in \eqref{eq:EWC}.
All experiments here closely follow the implementation and evaluation protocol described in the popular benchmark
\cite{CLbenchmark}.
More details are in Supplementary.
\input{tables/incremental_task}
\subsubsection{IL Benchmark Results}
Table \ref{tab:split_cifar} shows that the effectiveness of knowledge sources is ranked: logits (L) $>$ features (F) $>$ parameters (P). Although the number of classes imposes a very different difficulty to the problem (2 classes per task in S-CIFAR10 versus 20 in S-CIFAR100), the methods noted with "P" performs significantly worse than "F" and "L" on both datasets, suggesting that regularizing the outputs generally strikes a better balance between forgetting and plasticity. Furthermore, the comparison between Weighted$_H$ Features-SE versus Features-SE shows that having the squared error weighted by gradients is very helpful. Both above observations are consistent with the trends in model compression.
\section{Experiments}
\input{5_model_compression}
\input{4_continual_learning}
\subsection{Model Compression (MC)} \label{sec:MC}
Model compression is the primary task where knowledge distillation techniques are applied heavily. In this case, the student model has a smaller capacity than the teacher yet is asked to match the teacher's outputs. If the target for matching contains a great deal of information that is not crucial for a downstream task, the student is more likely to waste its limited capacity on matching unimportant information, capping the student's ability to reach the teacher's performance. This argument gives an intuition of why one can expect the weighted features to perform better than an unweighted one. A similar argument may apply to the logits since the linear layer before the logits imposes weights on the features. This section provides empirical support for the arguments with our unified framework.
\subsubsection{Applying our framework}
Two empirical considerations need to be addressed for applying \eqref{eq:ourKD} to model compression. The first one is that a large numerical range can result from $D_G$, potentially making the optimization unstable. In the KD training procedure, the student is initialized randomly and is directly optimized from scratch with the knowledge distillation criteria. The random student model could make the squared difference between $z^s$ and $z^t$ unbounded. This issue can be addressed by normalization. Specifically, we make $\hat{z}^s$ and $\hat{z}^t$ unit vectors:
\begin{equation} \label{eq:norm_Z}
\hat{z}^t=\frac{z^t}{||z^t||}, \hat{z}^s=\frac{z^s}{||z^s||}
\end{equation}
The second empirical consideration is the mismatched dimensions between $z^s$ and $z^t$ when they are features. This case happens when the student and teacher have different types of neural network architectures or when the student has a smaller model width. We add a linear transformation $r$ on the outputs of $g^s(x)$ to match the teacher's dimension:
\begin{equation} \label{eq:transform_z}
z^s=r(g^s(x))
\end{equation}
The parameters of $r$ are also optimized by the customized $D_G$ for this section:
\begin{equation} \label{eq:KD_compression}
D_G^{MC}=(\hat{z}^s-\hat{z}^t)^T W(z^t) (\hat{z}^s-\hat{z}^t)
\end{equation}
Note that $r$ is only involved during training and is removed from testing; thus, the student model's design has no dependency on $r$. Additionally, $r$ is only used when z is features, since the logits layer always has the same dimensionality (number of classes) between the teacher and student.
\input{tables/cifar100_same_arch_v2}
\input{tables/cifar100_diff_arch_v2}
\input{tables/tinyimagenet}
\subsubsection{Implementation Details}
The procedure of the experiments here closely follows the model compression benchmark \cite{tian2019crd}. The experiments include a large number of combinations between the teacher and student models. The teacher-student pairs include the models from the same architectural family but with different depth or width, and the models from different architectures that result in different sizes of features. The list of neural network architectures includes ResNet \cite{he2016deep}, WideResNet \cite{zagoruyko2016wide}, VGG \cite{simonyan2014very}, MobileNet \cite{howard2017mobilenets}, and ShuffleNet \cite{zhang2018shufflenet}. We use the feature map output of the last convolutional block for the features and the last linear layer's outputs for the logits. When the student's feature map is different from the teacher's, the transformation function $r$ resizes the feature maps spatially with PyTorch's pooling operation \cite{NEURIPS2019_9015}. Then, the student's number of channels is linearly projected by a 1x1-conv layer ($r$) to match the teacher's channel number. Lastly, the resulting feature map is flattened for $z$. For consistency, we include $r$ in all our variants that use features (but not logits), regardless of whether the feature maps have the same size or not.
For learning with the CIFAR100 dataset, the models have an initial learning rate of 0.05, decayed by 0.1 every 30 epochs after the first 150 epochs until it reaches 240. For MobileNetV2, ShuffleNetV1 and ShuffleNetV2, the initial learning rate is 0.01 as suggested by \cite{tian2019crd}. All the methods use SGD with a momentum of 0.9 and a batch size of 64. In short, we follow the benchmark settings \cite{RepDistiller}
and use the same teacher models provided to conduct all the experiments, ensuring a fair comparison between all methods.
\textbf{Hyper-parameter selection} could have a profound effect on most knowledge distillation-based model compression. We follow the benchmark protocol \cite{tian2019crd}, which selects the hyper-parameters based on only one teacher-student pair (we use resnet32x4/resnet8x4), then apply it to all other cases. Therefore, a method has to be robust to the hyper-parameters choice to perform well in all cases.
We make a step further to align the hyperparameter $\lambda$ used in Features-SE and Weighted$_E$ Features-SE. This can be achieved by normalizing the $W(z^t)$'s outputs to make its diagonal to have a mean of one (like the identity matrix $\mathbb{I}$) and unit variance. This normalization makes the features have an expected importance of 1 no matter how $W$ is computed, leaving the gradient-based weighting the only factor to affect the performance between the two cases. As a result, we can use the coefficient $\lambda=\lambda_F=3$ in all cases for features. Additionally, $\lambda=\lambda_L=15$ when we use logits.
Lastly, we add an extra setting by combining features and logits. It leads to the case of "B+C" in Tables \ref{tbl:cifar100_same} and \ref{tbl:cifar100_diff} with the custmoized $D_G$:
\begin{align} \label{eq:D_G_MC_FL}
D_{G-BC}^{MC}&=\lambda_L (\hat{l}_s-\hat{l}_t)^T (\hat{l}_s-\hat{l}_t)\nonumber\\
&+ \lambda_F (\hat{z}_s-\hat{z}_t)^T W_E(z_t) (\hat{z}_s-\hat{z}_t)
\end{align}
Note that $\hat{l}$ is the normalized logits and $\hat{z}$ is the normalized features. We use $\lambda=1$ for $D_{G-BC}^{MC}$.
\subsubsection{MC Benchmark Results} \label{sec:MC_analysis}
First of all, we emphasize that our focus is on evaluating our general formulation and keeping their instantiations in the simplest form, revealing the intrinsic trend of KD with different knowledge sources. Our goal here is not beating state-of-the-art (\textit{e}.\textit{g}. CRD), although our methods (B and C in Tables \ref{tbl:cifar100_same} and \ref{tbl:cifar100_diff}) achieve comparable or better performance.
In our comparison, Tables \ref{tbl:cifar100_same} and \ref{tbl:cifar100_diff} statistically agree with the arguments made at the beginning of the MC section:
First, the weighted features (B) performs better than the unweighted one (A) in 9 out of 11 cases.
Second, the logits (C) performs better than features (A and B) in 9 out of 11 cases.
This result suggests the rank of "logits $>$ weighted features $>$ plain features" in their KD efficiency. Besides, our variants (A, B, C) outperform most of the previous KD methods, showing that our methods are efficient in extracting out the knowledge, and making the observed ranks more representative.
\subsubsection{Experiment on ImageNet}
We use a larger and harder dataset for replicating the experiments of Table \ref{tbl:cifar100_same} with the standard ResNet. Table \ref{tab:tinyimagenet} uses the subset of ImageNet images \cite{TinyImageNet}
, showing the same trend of "logits $>$ weighted features $>$ plain features", and combing all (B+C) leads to the best result. Tiny-ImageNet has 200 classes sub-sampled from ImageNet. Each class has 500 training images and testing images with size 64x64. All the methods in Table \ref{tab:tinyimagenet} use the same hyperparameters as in Tables \ref{tbl:cifar100_same} and \ref{tbl:cifar100_diff}. The training configuration is similar to Tables \ref{tbl:cifar100_same}, except that the initial learning rate is 0.1, and is decayed by the factor of 0.1 at 50\% and 75\% of total (100) epochs. The weight-decay is 0.005. The models (ResNet-18/34/50) are the default models defined in the PyTorch. All students are trained from scratch (with random initialization). The teacher's weights were initialized with an ImageNet(full)-pretrained model in PyTorch model zoo, then is fine-tuned with Tiny-ImageNet.
\begin{figure}
\centering
\includegraphics[clip, trim=0.5cm 0.65cm 0cm 0cm, width=0.49\textwidth]{figures/width_effect.pdf}
\caption{
The analysis of feature size versus sources of knowledge.
The performance gain due to model capacity has been subtracted. This figure highlights the changes in the ranking of knowledge sources. The raw value of each bar is averaged with 5 repeats and is available in Supplementary.
}\label{fig:width_effect}
\end{figure}
\subsubsection{Key factor analysis}\label{sec:key}
This section investigates the factor that affects the ranking of knowledge sources. The clue comes from Tables \ref{tbl:cifar100_same} and \ref{tbl:cifar100_diff}, in which Table \ref{tbl:cifar100_diff} has a larger difference on (B-A) and (C-B) than in Table \ref{tbl:cifar100_same}. One possible factor is that the students in Table \ref{tbl:cifar100_same} generally have a smaller feature size (\textit{e}.\textit{g}., resnet32: 64 channels; WRN-40-1: 64; WRN-40-2: 128) than the students in Table \ref{tbl:cifar100_diff} (\textit{e}.\textit{g}., MobileNetV2: 160; ShuffleNetV1: 960; ShuffleNetV2: 464).
To investigate whether the student's feature size has a substantial impact, we vary the feature size within the same model architecture. However, changing feature size inevitably changes the model's capacity, and a larger capacity helps the student more easily match the teacher. Thus, comparing the absolute accuracy can not make a conclusive analysis.
We therefore make an additional contribution in addressing the above issue for the analysis, applying two strategies to minimize the capacity effect: (1) only the number of channels for the last convolutional block is changed, and (2) we propose a recovered performance ratio to measure the relative performance gain by subtracting the performance of a vanilla student (trained without a teacher). The vanilla student has its performance increased along with the capacity; therefore, subtracting its accuracy ($Acc^s_{vanilla}$) excludes the capacity effect. The recovered performance ratio (RPR) is computed by:
\begin{equation} \label{eq:RPR}
RPR=(Acc^s_{KD}-Acc^s_{vanilla})/(Acc^t_{vanilla}-Acc^s_{vanilla}).
\end{equation}
Figure \ref{fig:width_effect} uses RPR to examine various student feature sizes. The teacher and student models are resnet32x4 and resnet8x4, correspondingly. The student model's last convolutional block has its width (number of channels) configured to be between 64 to 1024. The result confirms feature size's impact on the ranking:
\begin{itemize}
\item A larger student feature (\textit{e}.\textit{g}. $\geq256$) leads to a consistent ranking of "logits $>$ weighted features $>$ plain features". A smaller feature (\textit{e}.\textit{g}. 64) breaks the trend.
\end{itemize}
We additionally subtract a stronger baseline (HKD \cite{hinton2014distilling}) by replacing \eqref{eq:RPR}'s $Acc^s_{vanilla}$ with $Acc^s_{HKD}$ in Supplementary.
Its trend is still the same as Figure \ref{fig:width_effect}, providing extra support for the observation.
The result suggests the design guideline:
\begin{itemize}
\item Having a larger student feature size can benefit KD. Note that using larger features does not conflict with the goal of model compression. ShuffleNet \cite{zhang2018shufflenet} in Table \ref{tbl:cifar100_diff} is a positive case that has a relatively smaller model while still having a sufficient feature size.
\end{itemize}
\section{Related Work}
We categorize KD methods by their knowledge sources and discuss the most related works. First, the features-based methods generally make a small student match a large teacher's features without selection. One exception is \cite{heo2019comprehensive}, which selects useful features by using margin ReLU with a per-feature threshold. However, its heuristic nature is significantly different from our gradient-driven approach (\textit{i}.\textit{e}., Weighted Features-SE ). It is also worth noting that our Features-SE is closely related FitNet \cite{romero2014fitnets} and FT \cite{kim2018paraphrasing}. FitNet, FT, and our method align the dimension of the features between the teacher and student, then use squared error to match the features. However, FitNet adds a convolutional regressor (with non-linearity) for the student to do the matching, and trains the student with squared error loss and cross-entropy loss in two separate stages. In FT, it uses two small auto-encoders to transform the features from both the teacher and student. Therefore, both FitNet and FT have a more complicated design than our linear transformation function $r$ and our one-stage training procedure. Second, in previous gradient-based methods \cite{srinivas2018knowledge, zagoruyko2016paying}, they directly match the teacher's and student's Jacobian, which requires double backpropagation to optimize its loss function. In contrast, our weighted features-SE does not use Jacobian, avoiding the heavy overhead in optimization. Lastly, the logits-based methods \cite{hinton2014distilling, li2016learning} have been discussed in previous sections. Other logits-based strategies such as early stopping \cite{cho2019efficacy} and teacher assistant \cite{mirzadeh2020improved} are orthogonal approaches to our work and can be applied jointly.
\section{Conclusion}
We present a new perspective that can utilize different knowledge sources under a unified KD framework. This framework leads to a new KD method that prioritizes the distillation of important features based on gradients, and provides a new justification on how simple squared error approximates the classical KD criteria. We instantiate our framework based on the type of knowledge sources utilized, finding that logits is generally more efficient than features, while gradients can help the latter. Furthermore, our analysis points out that a student's feature size is impactful to the KD efficiency. We hope the new insights, new methods, and new findings will inspire more works in this field.
\section{Copyright}
All papers submitted for publication by AAAI Press must be accompanied by a valid signed copyright form. They must also contain the AAAI copyright notice at the bottom of the first page of the paper. There are no exceptions to these requirements. If you fail to provide us with a signed copyright form or disable the copyright notice, we will be unable to publish your paper. There are \textbf{no exceptions} to this policy. You will find a PDF version of the AAAI copyright form in the AAAI AuthorKit. Please see the specific instructions for your conference for submission details.
\section{Formatting Requirements in Brief}
We need source and PDF files that can be used in a variety of ways and can be output on a variety of devices. The design and appearance of the paper is strictly governed by the aaai style file (aaai22.sty).
\textbf{You must not make any changes to the aaai style file, nor use any commands, packages, style files, or macros within your own paper that alter that design, including, but not limited to spacing, floats, margins, fonts, font size, and appearance.} AAAI imposes requirements on your source and PDF files that must be followed. Most of these requirements are based on our efforts to standardize conference manuscript properties and layout. All papers submitted to AAAI for publication will be recompiled for standardization purposes. Consequently, every paper submission must comply with the following requirements:
\begin{itemize}
\item Your .tex file must compile in PDF\LaTeX{} --- (you may not include .ps or .eps figure files.)
\item All fonts must be embedded in the PDF file --- including your figures.
\item Modifications to the style file, whether directly or via commands in your document may not ever be made, most especially when made in an effort to avoid extra page charges or make your paper fit in a specific number of pages.
\item No type 3 fonts may be used (even in illustrations).
\item You may not alter the spacing above and below captions, figures, headings, and subheadings.
\item You may not alter the font sizes of text elements, footnotes, heading elements, captions, or title information (for references and mathematics, please see the limited exceptions provided herein).
\item You may not alter the line spacing of text.
\item Your title must follow Title Case capitalization rules (not sentence case).
\item Your .tex file must include completed metadata to pass-through to the PDF (see PDFINFO below).
\item \LaTeX{} documents must use the Times or Nimbus font package (you may not use Computer Modern for the text of your paper).
\item No \LaTeX{} 209 documents may be used or submitted.
\item Your source must not require use of fonts for non-Roman alphabets within the text itself. If your paper includes symbols in other languages (such as, but not limited to, Arabic, Chinese, Hebrew, Japanese, Thai, Russian and other Cyrillic languages), you must restrict their use to bit-mapped figures. Fonts that require non-English language support (CID and Identity-H) must be converted to outlines or 300 dpi bitmap or removed from the document (even if they are in a graphics file embedded in the document).
\item Two-column format in AAAI style is required for all papers.
\item The paper size for final submission must be US letter without exception.
\item The source file must exactly match the PDF.
\item The document margins may not be exceeded (no overfull boxes).
\item The number of pages and the file size must be as specified for your event.
\item No document may be password protected.
\item Neither the PDFs nor the source may contain any embedded links or bookmarks (no hyperref or navigator packages).
\item Your source and PDF must not have any page numbers, footers, or headers (no pagestyle commands).
\item Your PDF must be compatible with Acrobat 5 or higher.
\item Your \LaTeX{} source file (excluding references) must consist of a \textbf{single} file (use of the ``input" command is not allowed.
\item Your graphics must be sized appropriately outside of \LaTeX{} (do not use the ``clip" or ``trim'' command) .
\end{itemize}
If you do not follow these requirements, your paper will be returned to you to correct the deficiencies.
\section{What Files to Submit}
You must submit the following items to ensure that your paper is published:
\begin{itemize}
\item A fully-compliant PDF file that includes PDF metadata.
\item Your \LaTeX{} source file submitted as a \textbf{single} .tex file (do not use the ``input" command to include sections of your paper --- every section must be in the single source file). (The only allowable exception is .bib file, which should be included separately).
\item The bibliography (.bib) file(s).
\item Your source must compile on our system, which includes only standard \LaTeX{} 2020 TeXLive support files.
\item Only the graphics files used in compiling paper.
\item The \LaTeX{}-generated files (e.g. .aux, .bbl file, PDF, etc.).
\end{itemize}
Your \LaTeX{} source will be reviewed and recompiled on our system (if it does not compile, your paper will be returned to you. \textbf{Do not submit your source in multiple text files.} Your single \LaTeX{} source file must include all your text, your bibliography (formatted using aaai22.bst), and any custom macros.
Your files should work without any supporting files (other than the program itself) on any computer with a standard \LaTeX{} distribution.
\textbf{Do not send files that are not actually used in the paper.} We don't want you to send us any files not needed for compiling your paper, including, for example, this instructions file, unused graphics files, style files, additional material sent for the purpose of the paper review, and so forth.
\textbf{Do not send supporting files that are not actually used in the paper.} We don't want you to send us any files not needed for compiling your paper, including, for example, this instructions file, unused graphics files, style files, additional material sent for the purpose of the paper review, and so forth.
\textbf{Obsolete style files.} The commands for some common packages (such as some used for algorithms), may have changed. Please be certain that you are not compiling your paper using old or obsolete style files.
\textbf{Final Archive.} Place your PDF and source files in a single archive which should be compressed using .zip. The final file size may not exceed 10 MB.
Name your source file with the last (family) name of the first author, even if that is not you.
\section{Using \LaTeX{} to Format Your Paper}
The latest version of the AAAI style file is available on AAAI's website. Download this file and place it in the \TeX\ search path. Placing it in the same directory as the paper should also work. You must download the latest version of the complete AAAI Author Kit so that you will have the latest instruction set and style file.
\subsection{Document Preamble}
In the \LaTeX{} source for your paper, you \textbf{must} place the following lines as shown in the example in this subsection. This command set-up is for three authors. Add or subtract author and address lines as necessary, and uncomment the portions that apply to you. In most instances, this is all you need to do to format your paper in the Times font. The helvet package will cause Helvetica to be used for sans serif. These files are part of the PSNFSS2e package, which is freely available from many Internet sites (and is often part of a standard installation).
Leave the setcounter for section number depth commented out and set at 0 unless you want to add section numbers to your paper. If you do add section numbers, you must uncomment this line and change the number to 1 (for section numbers), or 2 (for section and subsection numbers). The style file will not work properly with numbering of subsubsections, so do not use a number higher than 2.
\subsubsection{The Following Must Appear in Your Preamble}
\begin{quote}
\begin{scriptsize}\begin{verbatim}
\def\year{2022}\relax
\documentclass[letterpaper]{article}
\usepackage{aaai22}
\usepackage{times}
\usepackage{helvet}
\usepackage{courier}
\usepackage[hyphens]{url}
\usepackage{graphicx}
\urlstyle{rm}
\def\UrlFont{\rm}
\usepackage{graphicx}
\usepackage{natbib}
\usepackage{caption}
\DeclareCaptionStyle{ruled}%
{labelfont=normalfont,labelsep=colon,strut=off}
\frenchspacing
\setlength{\pdfpagewidth}{8.5in}
\setlength{\pdfpageheight}{11in}
\pdfinfo{
/Title (AAAI Press Formatting Instructions for Authors
Using LaTeX -- A Guide)
/Author (AAAI Press Staff, Pater Patel Schneider,
Sunil Issar, J. Scott Penberthy, George Ferguson,
Hans Guesgen, Francisco Cruz, Marc Pujol-Gonzalez)
/TemplateVersion (2022.1)
}
\end{verbatim}\end{scriptsize}
\end{quote}
\subsection{Preparing Your Paper}
After the preamble above, you should prepare your paper as follows:
\begin{quote}
\begin{scriptsize}\begin{verbatim}
\begin{document}
\maketitle
\begin{abstract}
\end{abstract}\end{verbatim}\end{scriptsize}
\end{quote}
\noindent You should then continue with the body of your paper. Your paper must conclude with the references, which should be inserted as follows:
\begin{quote}
\begin{scriptsize}\begin{verbatim}
\section{Tiny-ImageNet Results}
\section{Detailed Derivations of Equation \ref{eq:KLrawexpand}}
This section provides the detailed steps that are not included in the main text for deriving \eqref{eq:KLapprox} from \eqref{eq:KLrawexpand}.
(1) The first-order term in \eqref{eq:KLrawexpand} is zero:
\begin{align*}
-dz^T\sum_y p^t_y \frac{d}{dz}\log p^t_y &= -dz^T \sum_y \frac{d}{dz}p^t_y\\
&= -dz^T (\frac{d}{dz} \sum_y p^t_y)\\
&= 0
\end{align*}
(2) The second-order term in \eqref{eq:KLrawexpand} has a form of Fisher information matrix $F(z^t)$ at its middle:
\begin{align*}
- & \frac{1}{2}dz^T (\sum_yp^t_y\frac{d^2}{dz^2}\logp^t_y) dz \\
&= -\frac{1}{2}dz^T\sum_yp^t_y\frac{d}{dz}(\frac{1}{p^t_y}\frac{dp^t_y}{dz}) dz\\
&= -\frac{1}{2}dz^T\sum_yp^t_y \left[ \frac{1}{p^t_y}\frac{d^2p^t_y}{dz^2}-(\frac{1}{p^t_y}\frac{dp^t_y}{dz})(\frac{1}{p^t_y}\frac{dp^t_y}{dz})^T \right] dz\\
&= -\frac{1}{2}dz^T \left[ \sum_y \frac{d^2p^t_y}{dz^2} - \sum_y p^t_y (\frac{1}{p^t_y}\frac{dp^t_y}{dz})(\frac{1}{p^t_y}\frac{dp^t_y}{dz})^T \right] dz\\
&= -\frac{1}{2}dz^T \left[ \frac{d^2}{dz^2} \sum_y p^t_y - \sum_y p^t_y (\frac{1}{p^t_y}\frac{dp^t_y}{dz})(\frac{1}{p^t_y}\frac{dp^t_y}{dz})^T \right] dz\\
&= -\frac{1}{2}dz^T \left[-\sum_y p^t_y (\frac{1}{p^t_y}\frac{dp^t_y}{dz})(\frac{1}{p^t_y}\frac{dp^t_y}{dz})^T \right] dz\\
&= \frac{1}{2}dz^T \left[\sum_y p^t_y (\frac{d}{dz} \log p^t_y)(\frac{d}{dz} \log p^t_y)^T \right] dz\\
&= \frac{1}{2}dz^T F(z^t) dz
\end{align*}
\section{Additional analysis of Figure \ref{fig:width_effect}}
\begin{figure}
\centering
\includegraphics[clip, trim=0.5cm 0.5cm 0cm 0cm, width=0.47\textwidth]{figures/width_effect_base_hkd.pdf}
\caption{The analysis of feature size versus sources of knowledge. The performance gain due to model capacity has been more aggressively removed by subtracting the performance of HKD ~\cite{hinton2014distilling} in the RPR (\eqref{eq:RPR}). The ranking of methods is still consistent with Figure \ref{fig:width_effect}.
}\label{fig:width_effect_base_hkd}
\end{figure}
Figure \ref{fig:width_effect_base_hkd} has the same experiment as in Figure \ref{fig:width_effect}, but the performance gain due to model capacity has been more aggressively removed by subtracting the performance of HKD ~\cite{hinton2014distilling} in the RPR (\eqref{eq:RPR}). This figure has a trend similar to Figure \ref{fig:width_effect}, strengthening the argument that the student's feature size has a crucial impact on knowledge distillation. Table \ref{tab:width_raw} provides the raw accuracy used in both Figures \ref{fig:width_effect} and \ref{fig:width_effect_base_hkd}.
\input{tables/width}
\input{tables/model_size}
\section{Model Compression Size}
Tables \ref{tbl:cifar100_same_size} and \ref{tbl:cifar100_diff_size} provide the size of each model used in Tables \ref{tbl:cifar100_same} and \ref{tbl:cifar100_diff}.
\section{Implementation Details of IL Experiment \ref{sec:CL}}
Our task-incremental learning experiment follows the implementation and evaluation protocol described in a popular continual learning benchmark~\cite{Hsu18_EvalCL}. The benchmark splits the image datasets CIFAR10 and CIFAR100 into 5 tasks; thus, each task has 2 and 20 classes, correspondingly. The evaluation is performed at the end of the learning curriculum, and the averaged classification accuracy of all tasks is reported with testing data. The regularization coefficient $\lambda$ of all methods (except the baseline and non-incremental learning) are selected by a grid search with 20\% of the dataset. We follow all the default training and testing configurations provided by the public benchmark \cite{CLbenchmark} to conduct the experiments. Lastly, In our methods, the features used in Weighted$_H$ Feature-SE and Feature-SE are the flattened outputs from the last convolutional block of WideResNet-28-2 \cite{zagoruyko2016wide}, which has the output dimension of 2048 (CxWxH=128x4x4). Note that we do not use the linear transformation function $r$ in Section \ref{sec:CL} since the teacher and student models always have the same feature dimensions.
\section{Additional discussion: Model Compression versus Incremental Learning}
This section highlights three differences between Model Compression (MC) and Incremental Learning (IL) in their problem settings. First, MC has its teacher share the same training data with the student. In contrast, the student in task-incremental learning has no access to the teacher's training data and is exposed to a new set of classes in the new task.
Second, MC only applies the KD process once, while the task-IL repeats the KD process multiple times based on the length of the task sequence.
Lastly, the task-incremental learning setting obeys closely the assumptions made in Section \ref{sec:rethinking}, while MC relaxes those a little bit. Although MC's formulation (\eqref{eq:KD_compression}) has the same form as \eqref{eq:ourKD}, it deviates from the assumptions made in \eqref{eq:KLexpand} in three ways: (1) the $dz$ might not be small, (2) the $z$ is normalized and linearly transformed, and (3) the softmax-based classifier $f$ is not forced to be the same between the teacher and student.
Note that (2) and (3) happens when z is features but not logits, and the impact of (1) has been reduced by the normalization (\eqref{eq:norm_Z}).
|
{
"redpajama_set_name": "RedPajamaArXiv"
}
| 8,693
|
{"url":"https:\/\/socratic.org\/questions\/for-what-values-of-x-is-f-x-x-3-3x-2-2x-12-concave-or-convex","text":"\u00d7\n\n# For what values of x is f(x)= -x^3+3x^2+2x-12 concave or convex?\n\nJan 4, 2017\n\nAs viewed from O, concave $\\left(y ' \\uparrow\\right)$ for $x < 1$ and concave $\\left(y ' \\downarrow\\right)$ for$x > 1. \\left(1 , - 8\\right)$ is the point of inflexion (POI), at which the tangent crosses the curve , for reversing rotation.\n\n#### Explanation:\n\n$y = f \\left(x\\right) = - {x}^{3} + 3 {x}^{2} + 2 x - 12$\n\n$y ' = - 3 {x}^{2} + 6 x + 2 = 0$, at the turning points$x = 1 \\pm \\sqrt{\\frac{5}{3}} = - 0.291 \\mathmr{and} 2.291$, nearly\n\ny''--6(x-1)=0#, at x =1.\n\ny'''=-6 $\\ne 0$\n\nSo, x =1 gives the point of inflexion (POI) $\\left(1. - 8\\right)$.\n\nHere, the tangent crosses the curve, reversing rotation, from\n\nanticlockwise to clockwise.\n\nThe second graph, the zooming is to see $P O I \\left(1. - 8\\right)$ in ${Q}_{4}$,\n\nat the level $y = - 8$.\n\ngraph{-x^3+3x^2+2x-12 [-29.95, 29.95, -14.97, 14.98]}\n\ngraph{(-x^3+3x^2+2x-12-y)(y+8)=0 [-2, 2, -20, 20]} .","date":"2018-09-24 09:15:03","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 12, \"mathjax_inline_tex\": 1, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 1, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.7130973935127258, \"perplexity\": 6912.4671474494335}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2018-39\/segments\/1537267160337.78\/warc\/CC-MAIN-20180924090455-20180924110855-00343.warc.gz\"}"}
| null | null |
<?php
namespace AppBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Category
*
* @ORM\Table(
* name="category",
* indexes={@ORM\Index(name="idx_parent_category_id",columns={"parent_category_id"})}
* )
* @ORM\Entity
*/
class Category
{
const REPOSITORY = 'AppBundle:Category';
/**
* @var integer
*
* @ORM\Column(name="id", type="smallint", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/**
* @var string
*
* @ORM\Column(name="label", type="string", length=45, nullable=true)
*/
private $label;
/**
* @var \Category
*
* @ORM\ManyToOne(targetEntity="Category")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="parent_category_id", referencedColumnName="id")
* })
*/
private $parentCategory;
public function getId()
{
return $this->id;
}
public function getLabel()
{
return $this->label;
}
public function getParent()
{
return $this->parentCategory;
}
public function setLabel($label)
{
$this->label = $label;
return $this;
}
public function setParent(Category $parentCategory = null)
{
$this->parentCategory = $parentCategory;
return $this;
}
}
|
{
"redpajama_set_name": "RedPajamaGithub"
}
| 1,056
|
Q: Gesture: Failed to receive system gesture state notification before next touch What causes this warning?
Gesture: Failed to receive system gesture state notification before
next touch iOS 8.1
Any help would be appreciated.
A: I'm pretty sure it just means that you're overloading the system with too many gestures. Its not a problem, just means that you are for instance swiping too much or tapping the screen too quickly. The system was not able to process the previous gesture before the next gesture was done.
|
{
"redpajama_set_name": "RedPajamaStackExchange"
}
| 6,922
|
<div class="box">
<h1>File Structure</h1>
<ul class="outline">
<li><a href="#hathoora">Hathoora PHP Framework Structure</a></li>
<li><a href="#application">Source Application Structure</a></li>
</ul>
<a name="hathoora"></a>
<h2>Hathoora PHP Framework Structure</h2>
<p>
When you download Hathoora PHP Framework, you would notice the following directory structure for <code class="inline">HATHOORA_ROOTPATH</code>. In most cases you do not need to change anything here.
</p>
<pre>
<code class="hljs Ini">
# Directory: HATHOORA_ROOTPATH/
# this is where your application source would go, more on this below...
app/
# this is where your application definication would go
boot/
config/
app_dev.yml
app_prod.yml
# Public facing
docroot/
_assets
# the frontend controller
index.php
# third party code goes here (via composer)
vendor/
</code>
</pre>
<a name="application"></a>
<h2>Source Application Structure</h2>
<p>
A typical source application would have the following structure inside <code class="inline">HATHOORA_ROOTPATH/app</code> folder.
</p>
<pre>
<code class="hljs Ini">
# File structure of an app - HATHOORA_ROOTPATH/app
app/
myNameSpace/ <-- also the name of app
config/
controller/
resources/
assets/ (optional)
templates/
model/ (optional)
</code>
</pre>
<p>To summarize:</p>
<ul>
<li><code class="inline">Config</code>: This is where you would have application specific configurations.</li>
<li><code class="inline">Controller</code>: This is where you would have contoller code.</li>
<li><code class="inline">Resources</code>: This is where application templates and assets are loaded from.</li>
<li><code class="inline">Model</code>: This is optional and you can name it whatever you want.</li>
</ul>
</div>
|
{
"redpajama_set_name": "RedPajamaGithub"
}
| 9,475
|
Het jaar 580 is het 80e jaar in de 6e eeuw volgens de christelijke jaartelling.
Gebeurtenissen
Byzantijnse Rijk
De Romeinse Senaat stuurt een delegatie naar Constantinopel met een geschenk (3.000 pond aan goud) voor keizer Tiberius II Constantijn en vraagt hem om militaire steun tegen de Longobarden.
Het oostelijke leger onder Mauricius valt opnieuw Perzisch Armenië binnen, en zakt de Eufraat af tot dicht bij Ctesiphon.
Mauricius laat de Ghassanidische koning al-Moendhir III arresteren, op basis van geruchten dat deze de leider zou zijn geweest van een Perzische veldtocht in Byzantijns Mesopotamië.
Europa
De Slaven migreren uit Oost-Europa en verspreiden zich over de Balkan. De Avaren steken de rivier de Donau over en belegeren de Byzantijnse vestingstad Sirmium (huidige Servië).
De Visigoten onder leiding van koning Leovigild veroveren Sevilla (Spanje) na een langdurig beleg. Hermenegild wordt gevangengenomen en opgesloten in de gevangenis van Tarragona.
De Longobarden verdrijven de laatste Ostrogoten over de Alpen (Noord-Italië) die zich vestigen bij de Bajuwaren in Oostenrijk. (waarschijnlijke datum)
Religie
Gregorius van Tours wordt beschuldigd van laster tegen de Frankische koningin Fredegonde en moet zich tegenover een Raad van bisschoppen verantwoorden. (waarschijnlijke datum)
Geboren
Cadfan ap Iago, koning van Gwynedd (waarschijnlijke datum)
Eadbald, koning van Kent (waarschijnlijke datum)
Erchinoald, hofmeier van Neustrië (waarschijnlijke datum)
Livinus van Gent, Iers missionaris (waarschijnlijke datum)
Maximus Confessor, Byzantijns theoloog (overleden 662)
Pepijn de Oudere, hofmeier van Austrasië (waarschijnlijke datum)
Overleden
15 januari - Faustina, Italiaans abdis
18 januari - Liberata, Italiaans abdis
Cadoc, Brits abt en bisschop
Martinus van Braga, aartsbisschop
000
|
{
"redpajama_set_name": "RedPajamaWikipedia"
}
| 8,260
|
Les Paratelmatobiinae sont une sous-famille d'amphibiens de la famille des Leptodactylidae.
Répartition
Les espèces de ses genres sont endémiques du Brésil.
Liste des genres
Selon :
Crossodactylodes Cochran, 1938
Paratelmatobius Lutz & Carvalho, 1958
Rupirana Heyer, 1999
Scythrophrys Lynch, 1971
Publications originales
Fouquet, Blotto, Maronna, Verdade, Juncá, de Sá & Rodrigues, 2013 : Unexpected phylogenetic positions of the genera Rupirana and Crossodactylodes reveal insights into the biogeography and reproductive evolution of leptodactylid frogs. Molecular Phylogenetics and Evolution in press, , , .
Ohler & Dubois, 2012 : Validation of two familial nomina nuda of Amphibia Anura. Alytes, Paris, , (texte intégral).
Liens externes
Notes et références
Paratelmatobiinae
Sous-famille d'anoures (nom scientifique)
Faune endémique du Brésil
|
{
"redpajama_set_name": "RedPajamaWikipedia"
}
| 457
|
\section{Introduction}
An important relation between the dissipation in the dynamics of a system
and the fluctuations in a heat bath with which the system interacts is the
fluctuation-dissipation relation (FDR) \cite{fdr}.
A first example of its manifestation is the Nyquist noise in an electric
circuit
\cite{Nyquist}. This relation is of practical interest in the design of noisy
systems \cite{noise}. It is also of theoretical interest in statistical physics
because it is a categorical relation which exists
between the stochastic behavior of many microscopic particles
and the deterministic behavior of a macroscopic system. It is therefore also
useful for the description of the interaction of a system with fields,
such as effects related to radiation reaction and vacuum fluctuations
between atoms and fields in quantum optics \cite{qo}.
The form of the FDR is usually given under near-equilibrium
conditions via linear response theory (LRT) \cite{lrt}.
We will see in this paper that this
relation has a much wider scope and a broader implication than has been
understood before. In particular we want to address problems involving gravity
and quantum fields in black holes and the early universe; and we are interested
in seeing this relation validated and implemented under non-equilibrium
conditions for quantum fields in curved spacetimes \cite{BirDav}.
The problem we choose for illustration is the backreaction of particles created
\cite{Par69,SexUrb,Zel,Hu74,Gri} in a cosmological spacetime
(without event horizon)
\cite{ZelSta,Gri76,HuPar77,HuPar78,FHH,HarHu,Har81,cpcbkr}.
The conceptual framework we adopt is that of a quantum open system \cite{qos},
the formal scheme is that of the closed-time-path \cite{ctp}
and the influence functional \cite{FeyVer,CalLeg83} formalisms, and
the paradigm we use for comparison is that of quantum Brownian motion
\cite{Gra,HPZ1,HPZ2}.
Sciama \cite{Sciama} was the one who had the great insight of proposing
a fluctuation-dissipation relation \cite{CanSci,SCD}
for the depiction of quantum processes in black holes \cite{Haw},
uniformly-accelerated observers \cite{Unr,FulDav}
and de Sitter universe \cite{GibHaw}.
Using Einstein's analysis of the Brownian motion as a guide
he showed that the Hawking and Unruh radiations can be seen as excitations of
vacuum fluctuations and the detector response as following a
dissipation-fluctuation relation. A crucial element for this interpretation
to be possible is the existence of an Euclidean section in the
Schwarzschild, Rindler and de Sitter metrics, imparting a periodicity
in the Green's function of the matter field,
thus turning it into a thermal propagator \cite{HarHaw76,GibPer}
(in the imaginary-time Matsubara sense),
and forging the equivalence of the system with finite-temperature results
\cite{FulRam}. The same condition applies to Hawking radiance in
de Sitter universe \cite{GibHaw}, which by virtue of its possession of an event
horizon, also admits a FDR interpretation \cite{Mottola}.
The derivation of the FDR in this class of spacetime was based on a
linear response theory, which hinges on the thermal equilibrium condition
set up by the created particles. For spacetimes without an event horizon,
or for systems under non-equilibrium conditions, one would not ordinarily
think that a FDR could exist \cite{vanKampen,qos}. The generalization of this
relation to non-equilibrium conditions is a much more difficult problem.
When Sciama first proposed this way of thinking, one of us was involved in
the backreaction studies of quantum processes in cosmological spacetimes
\cite{cpcbkr}. The dissipative effect of particle creation on the
dynamics of spacetime seems to point to the existence of a
fluctuation-dissipation relation, except that one factor (dissipation) is
not clear, and the other factor (noise) is missing. Two important
steps had to be taken before this picture began to make better sense.
In the calculation of Hartle and Hu \cite{HarHu} on anisotropy damping,
the Schwinger-DeWitt effective action (`in-out') formalism \cite{SchDeW}
gives rise to an effective geometry
which is complex, making it difficult to interpret what dissipation really is.
The adoption of the Schwinger-Keldysh (closed-time-path, CTP, or `in-in')
\cite{ctp}
formalism by Calzetta and Hu \cite{CH87} yields a real and causal equation
of motion for the effective geometry, from which one can relate the source of
dissipation in spacetime dynamics to the energy density of particles created
and explicitly identify the viscosity function associated with anisotropy
damping
\cite{CH89}.
The adoption of the CTP formalism was an encouraging step in
the right direction, but one needs to understand the statistical mechanical
meaning of these quantum processes better in order to appraise the validity
of adopting the well-established concepts and results in statistical mechanics
for their depiction or explication. For the particular task of
showing a fluctuation-dissipation relation at work for
quantum fields in a general cosmological spacetime not required to possess
an event horizon, there is also the noise or fluctuation term missing.
These inquiries were summarized in a report written by one of us
\cite{HuPhysica}
in which some tentative replies were given in the form of three conjectures:\\
1) That colored noise associated with quantum field fluctuations is generally
expected in gravitation and cosmology;\\
2) That the backreaction of particle creation in a dynamical spacetime
can be viewed as the manifestation of a generalized fluctuation-dissipation
relation; and \\
3) That all effective field theories, including semiclassical gravity or
even quantum gravity (to the extent that it could be viewed as an effective
field theory), are intrinsically dissipative in nature.\\
There, it was also suggested that one can use the Caldeira-Leggett model
\cite{CalLeg83}
to study the theoretical meaning of dissipation and probe into the relation
of noise and dissipation. The next stage of work in this quest concentrated on
the properties of quantum open systems \cite{qos}
and extending the theory
to quantum fields and to curved spacetimes.
Using the influence functional formalism of Feynman and Vernon \cite{FeyVer},
one can identify
noise in an environment from the imaginary part of the influence action.
The characteristics of noise depends on the spectral density of the
environment,
the coupling of the system with the environment, and other factors.
Using a model of the Brownian particle coupled
nonlinearly with a bath of harmonic oscillators, Hu, Paz and Zhang
\cite{HPZ1} deduced the noise autocorrelation functions and
a generalized fluctuation-dissipation relation for systems driven by intrinsic
colored and multiplicative noises. This forms the basis for the second stage
of investigation.
To generalize these results to quantum fields, Hu and Matacz \cite{HM2,HMLA}
recently
analyzed the problem of QBM in a parametric oscillator bath.
A parametric oscillator bath enables one to study particle creation in
quantum fields, where the Brownian particle can play the role of
an Unruh detector, or, in a cosmological backreaction problem,
the scale factor of the universe. One can study the detector's response
or the effect on the universe due to the fluctuations of the quantum field.
They found that the characteristics of quantum noise vary
with the nature of the field, the type of coupling between the field and the
background spacetime, and the time-dependence of the scale factor of the
universe.
They showed how a uniformly accelerating
detector in Minkowski space, a static detector outside a black hole
and a comoving observer in a de Sitter universe all observe a thermal spectrum.
By writing the influence functional in terms of the Bogolubov
coefficients which determine the amount of particles produced,
they also identified the origin of noise in this system to particle
creation \cite{nfsg,HM3}.
The influence functional method not only reproduces the known results, but
also enables one to look into the hitherto unknown domain of noise,
fluctuations,
and decoherence.
A program for studying the backreaction of particle creation in
semiclassical cosmology in the open system conceptual framework using influence
functional methods was recently outlined in \cite{HM3,nfsg,Banff}.
The backreaction of these quantum field processes manifests as dissipation
effect, which is described by the dissipation kernel in the influence action.
Using a model where the quantum Brownian particle
and the oscillator bath are coupled parametrically (the field parameters
change in time through the time-dependence of the scale factor of the
universe, which is governed by the semiclassical Einstein equation)
Hu and Matacz \cite{HM3} derived an expression for the influence functional
in terms of the Bogolubov coefficients as a function of the scale factor.
{}From the variation of the influence action they obtained an
equation of motion describing the dynamics of spacetime in the form of an
Einstien-Langevin equation.
After these recent works, it is clear that the influence functional method
is the appropriate framework for studying the nature and origin of noise in
quantum fields and to explore the statistical mechanical meaning of
quantum processes like particle creation and backreaction in the early universe
and black holes. Two additional aspects, however, need be considered to
complete
the story. First, how is it related to the CTP formalism, which gave us,
to begin with, the correct dissipation side of the story? This problem
was taken up in a recent paper of Calzetta and Hu \cite{nfsg},
who showed how noise and fluctuations
in semiclassical gravity can also be obtained with the original CTP formalism.
They also showed that the CTP and the IF formalisms are indeed intimately
related.
They derived an expression for the CTP effective action in terms of the
Bogolubov coefficients and showed how noise is related to the fluctuations
in particle number. From there, they show how an Einstein-Langevin equation
naturally arises as the equation of motion for the effective geometry,
from which a new, extended theory of semiclassical gravity is obtained.
The work of Calzetta, Matacz and the present authors shows clearly that
the old framework of semiclassical gravity is only a mean field theory.
This theory based on the Einstein equation with a source driven by
the expectation value of the energy momentum tensor should be
replaced by one based on an Einstein-Langevin equation
which describes also the fluctuations of matter fields and dissipative dynamics
of spacetime.
Notice that in moving from the first stage of this investigation based on the
CTP formalism to the second stage based on the IF formalism, one has to elevate
the treatment of classical spacetimes as external fields to
reduced density matrices. In making these transitions and back,
several issues need be addressed. The central issue is the quantum to
classical transition for the spacetime sector \cite{decQC}. The important
question
behind the transition from quantum gravity to semiclassical gravity
is decoherence. This is a subject of much recent interest.
We refer the reader to recent work for the exposition of different viewpoints
and approaches \cite{envdec,conhis,envhis}. Here,
for the backreaction problem, we shall adopt the results of Paz and Sinha
\cite{PazSin}, which is based on a reduced density matrix formalism adapted to
quantum cosmology. There, the model of a Bianchi-I universe
coupled to a scalar field was used to derive conditions for
transition from quantum cosmology to the semiclassical limit
via decoherence, and the relationship between decoherence
and backreaction was investigated.
After these previous investigations paved the way for the use of open-system
concepts applied to the backreaction problem of quantum fields
in curved spacetimes, we are finally in a position
to look at the full picture and explore the existence of a
fluctuation-dissipation relation for semiclassical gravity in general.
We shall use the
model of particle creation in Bianchi Type I universe to explore this
relation. In Sec. 2, we give a summary of the results for the quantum Brownian
model, assuming a general nonlinear coupling between the system and the
environment, giving rise to colored and multiplicative noise. Readers familiar
with the QBM problem can skip over this section. In Sec. 3
we begin with the density matrix of the universe and show how
coarse-graining the matter field viewed as an environment produces the
reduced density matrix, and how the influence functional defined in
the evolutionary operator for the reduced density matrix contains the
relevant information we need-- the dissipation and noise kernels.
In Sec. 4 we analyze the phase and the real components of the influence
functional in detail, sorting out the divergent and renormalized terms in
the phase. We show that the renormalized phase part provides the dissipative
term in the equation of motion, and the real component contributes to
decoherence and noise. We show how a colored noise of the quantum field
can be identified, and with it the existence of a fluctuation-dissipation
relation between these kernels. In Sec. 5, we discuss the physical meaning of
this relation. We first show that noise measures the difference in
the amounts of particle creation along two histories. Since this is also the
condition for decoherence to occur, we see that a relation also exists between
decoherence and particle creation. With this noise term, we then
derive the Einstein-Langevin equation for the anisotropy tensor. We show that
it is identical in form to that derived via the CTP formalism before
\cite{CH87}, but
with a new stochastic source term from the noise, as anticipated in
\cite{HuPhysica}. Finally, we show how the dissipation in the anisotropy of
spacetime can be related to the particles created. Thus noise and dissipation
which are connected by a formal relation, are both related to particle
creation,
and the backreaction of particle creation is an embodiment of the FDR.
In Sec. 6 we discuss the physical interpretation of the FDR in a more general
context. We show how the changing rate of particle creation and
the strength of backreaction effect can be gauged consistently by the
fluctuation-dissipation relation valid for time-dependent conditions.
We also describe related problems for future investigations.
\section{Influence Functional for Quantum Open System}
\subsection{Quantum Brownian Motion Paradigm}
Let us first review a model problem of quantum Brownian motion (QBM)
where the role of noise and dissipation are well understood.
Subsequently we will draw analogies from this problem to analyze
the quantum cosmology problem of our interest.
Consider a Brownian particle interacting with a set of harmonic oscillators.
The classical action of the Brownian particle is given by
\begin{equation}
S[x]=\int_0^tds\Bigl\{{1\over 2}M\dot x^2-V(x)\Bigr\}.
\end{equation}
The action for the environment is given by
\begin{equation}
S_e[\{q_n\}]
=\int_0^tds\sum_n\Bigl\{
{1\over 2}m_n\dot q_n^2
-{1\over 2}m_n\omega^2_nq_n^2 \Bigr\}.
\end{equation}
We will assume that
the action for the system-environment interaction has the following form
\begin{equation}
S_{int}[x,\{q_n\}]
=\int\limits_0^t ds\sum_n v_n(x) q_n^k \label{int}
\end{equation}
\noindent where $v_{n}(x) = -\lambda c_nf(x)$ and $\lambda$ is a
dimensionless coupling constant.
If one is interested only in the averaged effect of the environment on the
system
the appropriate object to study is
the reduced density matrix of the system $\rho_r$, which is related to the
full density matrix $\rho$ as follows
\begin{equation}
\rho_r(x,x')
=\int\limits_{-\infty}^{+\infty}dq\int\limits_{-\infty}^{+\infty}
dq'\rho(x,q;x',q')\delta(q-q').
\end{equation}
\noindent It is propagated in time by the evolution operator ${\cal J}_r$
\begin{equation}
\rho_r(x,x',t)
=\int\limits_{-\infty}^{+\infty}dx_i\int\limits_{-\infty}^{+\infty}dx'_i~
{\cal J}_r(x,x',t~|~x_i,x'_i,0)~\rho_r(x_i,x'_i,0~).
\end{equation}
If we assume that at a given
time $t=0$ the system and the environment are uncorrelated
\begin{equation}
\hat\rho(0)=\hat\rho_s(0)\times\hat\rho_e(0),
\end{equation}
then ${\cal J}_r$ does not depend on the initial state of the system
and can be written as
\begin{eqnarray}
{\cal J}_r(x_f,x'_f,t~|~x_i,x'_i,)
& =& \int\limits_{x_i}^{x_f}Dx \label{prop}
\int\limits_{x'_i}^{x'_f}Dx'~
\exp{i\over \hbar}\Bigl\{S[x]-S[x']\Bigr\}~{\cal F}[x,x'] \nonumber \\
& =& \int\limits_{x_i}^{x_f}Dx
\int\limits_{x'_i}^{x'_f}Dx'~
\exp{i\over \hbar} S_{eff}[x,x']
\end{eqnarray}
where the subscripts $i,f$ denote initial and final variables,
and $S_{eff}[x,x']$ is the effective action for the open quantum system.
The influence functional ${\cal F}[x,x']$ is defined as
\begin{eqnarray}
{\cal F}[x,x'] & = &\int\limits_{-\infty}^{+\infty}dq_f
\int\limits_{-\infty}^{+\infty}dq_i
\int\limits_{-\infty}^{+\infty}dq'_i \label{ifbm}
\int\limits_{q_i}^{q_f}Dq
\int\limits_{q'_i}^{q_f}Dq' \nonumber \\
& & \times \exp{i\over\hbar}\Bigl\{
S_e[q]+S_{int}[x,q]-S_e[q']-S_{int}[x',q'] \Bigr\}
\rho_e(q_i,q'_i,0) \nonumber \\
& = & \exp{i\over\hbar} S_{IF}[x,x']
\end{eqnarray}
where $S_{IF}[x,x']$ is the influence action. Thus $ S_{eff}[x,x'] =
S[x]-S[x'] + S_{IF}[x,x']$.
{}From its definition it is obvious that if the interaction term is zero, the
influence functional is equal to unity and the influence action is zero.
In general, the influence functional
is a highly non--local object. Not only does it depend on the time history,
but --and this is the more important property-- it also
irreducibly mixes the two sets
of histories in the path integral of (2.7).
Note that the histories
$ x $ and $ x' $ could be interpreted as moving
forward and backward in time respectively.
Viewed in this way, one can see the similarity of the influence functional
and the generating functional in the closed-time-path, or Schwinger-Keldysh
\cite{ctp} integral formalism.
We will assume that initially the bath is in thermal equilibrium at a
temperature $T = {(k_B \beta)}^{-1}$. The $T = 0 $ case corresponds to the
bath oscillators being in their respective ground states.
It can be shown \cite{HPZ2} that the influence action for the model given
by the interaction in (2.3) to second order in $\lambda$ is given
by
\begin{eqnarray}
& &S_{IF} [x,x']
= \Bigl\{\int\limits_0^tds~[-\Delta V(x)~]
-\int\limits_0^tds~[-\Delta V(x')]~\Bigr\} \nonumber \\
& & -\int\limits_0^tds_1\int\limits_0^{s_1}ds_2~\lambda^2 \label{iabm}
\Bigl[f(x(s_1))-f(x'(s_1))\Bigr]\mu^{(k)}(s_1-s_2)
\Bigl[f(x(s_2))+f(x'(s_2))\Bigr] \nonumber \\
& &+i\int\limits_0^tds_1\int\limits_0^{s_1}ds_2~\lambda^2
\Bigl[f(x(s_1))-f(x'(s_1))\Bigr]\nu^{(k)} (s_1-s_2)
\Bigl[f(x(s_2))-f(x'(s_2))\Bigr]
\end{eqnarray}
where $\Delta V(x)$ is a renormalization of the potential that arises
from the contribution of the bath. It appears only for even $k$ couplings.
For the case $k=1$ the above result is exact.
This is a generalization of the
result obtained in \cite{FeyVer} where it was shown that the
non-local kernel $\mu^{(k)}(s_1-s_2)$ is associated with dissipation or
the generalized viscosity function that appears in the corresponding
Langevin equation and $\nu^{(k)}(s_1-s_2)$ is associated with the
time correlation function of the stochastic noise term. The dissipation
part has been studied in detail by Calzetta, Hu, Paz, Sinha and others
\cite{CH87,CH89,disQC,SinHu,PazSin,nfsg}
in cosmological backreaction problems. We shall elaborate somewhat on
the nature of the noise part of the problem and then analyze their connection.
In general $\nu$ is nonlocal, which gives rise to colored noises.
Only at high temperatures would the noise kernel become a delta function,
which corresponds to a white noise source. Let us first see the meaning
of the noise kernel.
\subsection{Noise}
The noise part of the influence functional is given by
\begin{equation}
\exp\{ -{1\over \hbar}\int\limits_0^tds_1\int\limits_0^{s_1}ds_2~
\Bigl[f(x(s_1))-f(x'(s_1))\Bigr]\nu^{(k)}(s_1-s_2) \label{expnoise}
\Bigl[f(x(s_2))-f(x'(s_2))\Bigr]
\end{equation}
where $\nu^{(k)}$ is redefined by absorbing the $\lambda^2$.
This term can be rewritten using the following functional Gaussian identity
\cite{FeyVer}
which states that the above expression is equal to
\begin{equation}
\int {\cal D}\xi^{(k)}(t) {\cal P}[\xi^{(k)}]\exp\{ {i\over
\hbar}\int\limits_0^t
ds \xi^{(k)}(s)[f(x(s)) - f(x'(s))]
\end{equation}
where
\begin{equation}
{\cal P}[\xi^{(k)}] = P^{(k)} \exp\{-{1\over \label{noisedis}
\hbar}\int\limits_0^tds_1\int\limits_0^tds_2 {1\over 2} \xi^{(k)}(s_1)
[\nu^{(k)} (s_1 - s_2)]^{-1}\xi^{(k)}(s_2) \}
\end{equation}
is the functional distribution of $\xi^{(k)}(s)$ and $P^{(k)}$ is a
normalization factor given by
\begin{equation}
[P^{(k)}]^{-1} = \int{\cal D}\xi^{(k)}(s)\exp\{-{1\over \hbar}
\int\limits_0^tds_1\int\limits_0^tds_2\xi^{(k)}(s_1)[\nu^{(k)}(s_1-s_2)]^{-1}
\xi^{(k)}(s_2)\}.
\end{equation}
The influence functional can then be rewritten as
\begin{eqnarray}
{\cal F}[x,x'] &=& \int{\cal D}\xi^{(k)}(s){\cal P}[\xi^{(k)}] exp{i\over
\hbar}
\hat S_{IF}[x,x',\xi^{(k)}]\nonumber \\
&\equiv& {\left\langle \exp {i\over \hbar}\hat
S_{IF}[x,x',\xi^{(k)}]\right\rangle}_{\xi}
\end{eqnarray}
where
\begin{eqnarray}
& &\hat S_{IF}[x,x',\xi^{(k)}] = \int\limits_0^tds~\Bigl\{-\Delta
V(x)~\Bigr\}
-\int\limits_0^tds~\Bigl\{-\Delta V(x')~\Bigr\} \nonumber \\
& & -\int\limits_0^tds_1\int\limits_0^{s_1}ds_2~
\Bigl[f(x(s_1))-f(x'(s_1))\Bigr]\mu^{(k)}(s_1-s_2) \label{ianoise}
\Bigl[f(x(s_2))+f(x'(s_2))\Bigr] \nonumber \\
& & - \int\limits_0^t ds \xi^{(k)}(s)f(x(s))
+\int\limits_0^tds\xi^{(k)}(s)f(x'(s))
\end{eqnarray}
so that the reduced density matrix can be rewritten as
\begin{equation}
\rho_r(x,x') = \int{\cal D}\xi^{(k)}(s){\cal
P}[\xi^{(k)}]\rho_r(x,x',[\xi^{(k)}]).
\end{equation}
The full effective action can be written as
\begin{eqnarray}
S_{eff}[ x, x', \xi ] &=& \{ S[x] + \int\limits_0^tds~\xi(s) f(x(s))\} - \{
S[x'] + \int\limits_0^tds~\xi(s) f(x'(s))\} \nonumber \\
&- & \int\limits_0^tds_1\int\limits_0^{s_1}ds_2~
\Bigl[f(x(s_1))-f(x'(s_1))\Bigr]\mu^{(k)}(s_1-s_2)
\Bigl[f(x(s_2))+f(x'(s_2))\Bigr]
\end{eqnarray}
{}From equation (2.15) we can view $\xi^{(k)}(s)$ as a
nonlinear external stochastic force and the
reduced density matrix is calculated by taking a stochastic average
over the distribution $P[\xi^{(k)}]$ of this source.
{}From (2.12), we can see that the distribution functional is Gaussian.
The Gaussian noise is therefore completely characterized by
\begin{eqnarray}
{\langle\xi^{(k)}(s)\rangle}_{\xi^{(k)}} &=& 0 \nonumber\\
{\langle\xi^{(k)}(s_1)\xi^{(k)}(s_2)\rangle} &=& \hbar\nu^{(k)}(s_1-s_2).
\label{noisecor}
\end{eqnarray}
We see that the non-local kernel $\nu^{(k)}(s_1-s_2)$ is just the two-point
time correlation function of the external stochastic source
$\xi^{(k)}(s)$ multiplied by $\hbar$.
In this framework, the expectation value of any quantum mechanical
variable $Q(x)$ is given by \cite{Zhang}
\begin{eqnarray}
\langle Q(x)\rangle & = & \int{\cal D}\xi^{(k)}(s){\cal
P}[\xi^{(k)}]\int\limits_{-\infty}
^{+\infty}dx \rho_r(x,x,[\xi^{(k)}])Q(x) \nonumber \\
& = & {\left\langle {\langle Q(x)\rangle}_{quantum}\right\rangle}_{noise}.
\end{eqnarray}
This summarizes the interpretation of $\nu^{(k)}(s_1-s_2)$ as a noise or
fluctuation kernel.
\subsection{Langevin Equation}
We now derive the semiclassical equation of motion generated by
the influence action (2.9). This will allow us to
see why the
kernel $\mu^{(k)}(s_1-s_2)$ should be associated with dissipation.
Define a ``center-of-mass" coordinate $\bar x$ and a
``relative" coordinate $\Delta$ as follows
\begin{eqnarray}
\bar x(s) & = & {1\over 2}[x(s) + x'(s)] \nonumber\\
\Delta(s) & = & x'(s) - x(s).
\end{eqnarray}
The semiclassical equation of motion for $\bar x$ is derived by demanding
(cf. \cite{CH87})
\begin{equation}
\frac{\delta}{\delta\Delta}\Bigl[S[x]-S[x']+S_{IF}[x,x']\Bigr]
\bigg|_{\Delta=0}=0.
\end{equation}
Using the sum and difference coordinates (2.20) and the influence action
(2.9) we find that (2.21) leads to
\begin{equation}
\frac{\partial L_r}{\partial \bar x}-\frac{d}{dt}
\frac{\partial L_r}{\partial \dot{\bar x}} - 2\frac{\partial f(\bar
x)}{\partial \bar x}
\int\limits_0^t ds~\gamma^{(k)}(t-s)\frac{\partial f(\bar x(s))}{\partial s}
= F_{\xi^{(k)}}(t)
\end{equation}
where $\frac{d}{ds}\gamma^{(k)}(t-s)=\mu^{(k)}(t-s)$.
We see that this is in the form of
a classical Langevin equation with a nonlinear stochastic force
$F_{\xi^{(k)}}(s) = -\xi^{(k)}(s) \frac{\partial f(\bar x)}{\partial \bar x}$.
This corresponds to a multiplicative noise unless $f(\bar x)=\bar x$
in which case it is additive. $L_r$ denotes a renormalized
system Lagrangian. This is obtained by absorbing a surface term
and the potential renormalization in the influence action into the system
action.
The nonlocal kernel $\gamma^{(k)}(t-s)$ is responsible for non-local
dissipation.
In special cases like a high temperature ohmic environment,
this kernel becomes a delta function and hence the dissipation is local.
\subsection{Fluctuation-Dissipation Relation}
Recall that the label $k$ is the order of the bath variable to which the system
variable is coupled.
$\gamma^{(k)}(s)$ can be written as a sum of various contributions
\begin{equation}
\gamma^{(k)}(s)=\sum_l\gamma^{(k)}_l(s)
\end{equation}
where the sum is over even (odd) values of $l$ when $k$ is even (odd).
To derive the explicit forms of each dissipation kernel, it is useful to
define first the spectral density functions
\begin{equation}
I^{(k)}(\omega)
= \sum_n~\delta(\omega-\omega_n)~k~\pi\hbar^{k-2}~
{\lambda^2 c_n^2(\omega_n)\over (2m_n\omega_n)^k }.
\end{equation}
It contains the information about the environmental mode density and coupling
strength as a function of frequency.
Different environments are classified according to the
functional form of the spectral density $I(\omega)$.
In terms of these functions, the dissipation kernels can be written
as
\begin{equation}
\gamma^{(k)}_l(s)
=\int\limits_0^{+\infty}{d\omega\over\pi}
~{1\over \omega}I^{(k)} (\omega)
~ M^{(k)}_l(z)~\cos l\omega s
\end{equation}
where $M^{(k)}_l(z)$ are temperature dependent factors derived in \cite{HPZ2}
and $ z = coth {{1\over 2} \beta \hbar \omega}$.
Analogously, the noise kernels $\nu^{(k)}(s)$
can also be written as a sum of various contributions
\begin{equation}
\nu^{(k)}(s) = \sum_l \nu^{(k)}_l(s)
\end{equation}
\noindent where the sum runs again over even (odd) values of $l$ for
$k$ even (odd). The kernels $\nu^{(k)}_l(s)$ can be written as
\begin{equation}
\nu^{(k)}_l
=\hbar\int\limits_0^{+\infty}{d\omega\over\pi}~
I^{(k)} (\omega)~N^{(k)}_l(z)~\cos l\omega s
\end{equation}
where $ N^{(k)}_l (z)$ is another set of temperature- dependent factors given
by
\cite{HPZ2}
To understand the physical meaning of the noise kernels of different orders,
we can think of them as being associated with $l$ independent stochastic
sources that are coupled to the Brownian particle through interaction
terms of the form (2.15)
\begin{equation}
\int\limits_0^tds~\sum_l~\xi_l^{(k)}(s)~f(x).
\end{equation}
\noindent This type of coupling generates a stochastic force in the associated
Langevin equation
\begin{equation}
F_{\xi_l^{(k)}}(s)=-\xi_l^{(k)}(s)\frac{\partial f(x)}{\partial x}
\end{equation}
\noindent which corresponds to multiplicative noise.
The stochastic sources $\xi_l^{(k)}$ have a probability distribution given by
(\ref{noisedis})
which generates the correlation functions (\ref{noisecor}) for each $k$ and
$l$.
To every stochastic source we can associate a dissipative term that is
present in the real part of the influence action. The dissipative and the
noise
kernels are related by generalized fluctuation--dissipation relations
of the following form
\begin{equation}
\nu^{(k)}_l(t)
=\int\limits_{-\infty}^{+\infty}ds~K^{(k)}_l(t-s)~\gamma^{(k)}_l(s)
\label{FDR}
\end{equation}
\noindent where the kernel $ K^{(k)}_l(s) $ is
\begin{equation}
K^{(k)}_l(s)
=\int\limits_0^{+\infty}{d\omega\over\pi}~
L^{(k)}_l(z)~l~\omega~\cos~l\omega s
\label{K}
\end{equation}
and the temperature-dependent factor $L^{(k)}_l(z)= N^{(k)}_l(z)/
M^{(k)}_l(z)$.
A fluctuation dissipation relation of the form (\ref{FDR}) exists for
the linear case where the temperature dependent factor appearing in (\ref{K})
is simply $L^{(1)}=z$. The fluctuation-dissipation kernels $K_l^{(k)}$
have rather complicated forms except in some special cases.
In the high temperature limit, which is characterized
by the condition
$ k_BT\gg \hbar\Lambda $, where $ \Lambda $ is the cutoff frequency of
the environment, $z=\coth \beta\hbar\omega/2
\to 2/\beta\hbar\omega$
we obtain
\begin{equation}
L^{(k)}_l(z) \to {{2k_BT}\over {\hbar\omega}}.
\end{equation}
\noindent In the limit $ \Lambda \to +\infty $, we get the general result
\begin{equation}
K^{(k)}_l(s)= {2k_BT\over \hbar}\delta(s)
\end{equation}
\noindent which tells us that at high temperature there is
only one form of fluctuation-dissipation relation, the Green-Kubo relation
\cite{fdr}
\begin{equation}
\nu^{(k)}_l(s)
={2k_BT\over \hbar}\gamma^{(k)}_l(s).
\end{equation}
\noindent In the zero temperature limit, characterized by $~ z \to 1,~ $
we have
\begin{equation}
L^{(k)}_l(z) \to l.
\end{equation}
\noindent The fluctuation-dissipation kernel becomes $k$-independent
and hence identical to the one for the linearly- coupled case
\begin{equation}
K(s)
=\int\limits_0^{+\infty}
{d\omega\over\pi}~\omega\cos\omega s. \label{zerofd}
\end{equation}
It is interesting to note that the fluctuation-dissipation relations for the
linear and the nonlinear dissipation models are exactly identical both
in the high temperature and in the zero temperature limits. In other words,
they are not very sensitive to the different
system-bath couplings at both high and zero temperature limits.
The fluctuation-dissipation relation reflects a
categorical relation (backreaction) between the stochastic stimulation
(fluctuation-noise) of the environment and the averaged response of a system
(dissipation) which has a much deeper and universal meaning than that
manifested
in specific cases or under special conditions.
Our aim in the next section would be to consider a model consisting
of quantum fields coupled to a cosmological background metric and
cast it into the system-environment form as discussed here.
Consequently we shall see that one can construct an influence
functional of a form very similar to (\ref{ifbm}) and hence derive a
fluctuation-dissipation relation of the form (\ref{FDR}).
\section{Influence Functional for Quantum Cosmology}
\subsection{Reduced Density Matrix of the Universe}
The model we will analyze here is the same as that used in
\cite{PazSin} from which we will quote results relevant to our study.
Our ``system" will consist of a minisuperspace model
with $D$ degrees of freedom denoted by coordinates
$r^m$ (with $m=1,\ldots,D$). The minisuperspace modes will be coupled to
``environment" degrees of freedom that we schematically represent by $\Phi$
(they
will be later
associated with the modes of a scalar field). The quantum
mechanical description of this Universe will be given by the wave function
of the Universe $\Psi=\Psi(r^m, \Phi)$ which,
as a consequence of the existence of a classical Hamiltonian constraint,
satisfies the Wheeler- DeWitt equation:
\begin{equation}
H\Psi= \bigl(H_r + H_\Phi\bigr)\Psi=0 \label{WD}
\end{equation}
\noindent In the class of models we consider, the Hamiltonian corresponding to
the minisuperspace variables can
be written as
\begin{equation}
H_r= {1\over{2M}}G^{mm'}p_mp_{m'} + M V(r^m) \label{hamiltonian}
\end{equation}
The matrix $G^{mm'}$ determines the metric in the minisuperspace
(the supermetric) and the quantity $M$ is proportional to the
square of the Planck mass. In the following we will set $\hbar = 1$ throughout.
In the above Wheeler- DeWitt equation we assume that the momenta are
replaced by operators according to a covariant factor ordering
prescription.
The Hamiltonian constraint represents an important distinction from
the quantum Brownian motion case discussed previously, because it
implies that there is no preferred notion of time in this case and
the wavefunction satsfies (\ref{WD}) rather than the Schr\"odinger
equation.
The Hamiltonian associated with the environment degrees of
freedom is some function $H_\Phi(\Phi, \pi_\Phi, r^m, p_m)$ that we
will specify later.
We will be interested in making predictions concerning only the
behavior of the minisuperspace variables $r^m$ which we consider
the ``relevant'' part of the universe. To achieve such a
coarse- grained description we will work with the reduced density matrix
of the system which is defined as:
\begin{equation}
\rho_{red}(r',r) = \int d\Phi \Psi^{*}(r,\Phi) \Psi(r',\Phi)
\end{equation}
For some region of the minisuperspace,
(\ref{WD}) admits solutions that are oscillatory functions of $r^m$ of the
following WKB form:
\begin{equation}
\Psi(r,\Phi) = e^{iMS(r)}C(r)\psi(r,\Phi) \label{WKB}
\end{equation}
In this regime, the system variables $r$ and the environment variables
$\Phi$ behave as heavy and light modes respectively (the Planck mass
plays the role of a large mass parameter) in analogy with the
Born-Oppenheimer approximation. This also provides some
justification of the system-environment split akin to the Brownian
motion case . Thus
if one assumes that all the functions $S,C,\psi$ can be
expanded in powers of $M^{-1}$ and substitutes these expansions into
(\ref{WD}), one gets, to leading order (i.e., $M^0$):
\begin{equation}
{1\over 2} G^{mm'}{{\partial S_0}\over{\partial r^m}} \label{HJ}
{{\partial S_0}\over{\partial r^{m'}}} + V(r) = 0
\end{equation}
\noindent which is essentially the minisuperspace version of
the Hamilton-Jacobi equation.
To the next order in $M$ one obtains,
\begin{equation}
iG^{mm'}{{\partial S_0}\over{\partial r^m}} {{\partial}\over{\partial r^{m'}}}
\psi_0= H_\Phi(\Phi, \pi_\Phi, r^m, p_m={{\partial S_0}\over
{\partial r^m}})\psi_0 \label{Schr}
\end{equation}
\noindent This last equation is obtained provided we choose the prefactor
$C_0$ identical to the $H_\Phi=0$ case.
Thus, if we define the WKB time $t$ as
\begin{equation}
{d\over dt} = G^{mm'}{{\partial S_0}\over{\partial r^{m'}} }
\label{time}
{{\partial}\over{\partial r^m}}
\end{equation}
\noindent the equation (\ref{Schr}) reduces to the familiar Schr\"odinger
equation
that reads:
\begin{equation}
i{{d\psi}\over {dt}} = H_\Phi \psi
\end{equation}
{}From now on we will drop all the $0$-subindices which should be considered
as implicit in all the equations where $S, C$ and $\psi$ appear.
The Hamilton-Jacobi equation (\ref{HJ})
will have a $D-1$ parameter family of solutions and for
each one of these solutions
we can build a wave function like (\ref{WKB}). In general one can assume that
the wave function
of the Universe is a superposition of these terms, each of which
will be called a WKB branch:
\begin{equation}
\Psi(r,\Phi) = \sum\limits_n e^{iMS_{(n)}(r)}C_{(n)}(r)\psi_{(n)}(r,\Phi)
\label{super}
\end{equation}
Here the subindex $(n)$ labels the WKB branch characterized by a set of
parameters $(n)$ that uniquely defines the
particular solution to the Hamilton-Jacobi equation. However, in the rest of
our
analysis , we will consider the wavefunction to be represented by a single term
of the above sum, i.e, by a particular WKB branch. We will drop the subscript
$n$ from now on with this understanding.
The reduced density matrix associated with the wave function (\ref{WKB}) is:
\begin{equation}
\rho_{red}(r',r) = e^{iM[S(r) - S(r')]}
C(r)C(r') {\cal I}(r',r)
\end{equation}
\noindent where
\begin{equation}
{\cal I}(r',r)= \int \psi^{*}(r',\Phi)\psi(r,\Phi) d\Phi
\end{equation}
The influence of the environment on the system is summarized by the
above function ${\cal I}$ and it will be the basic object of our
interest. It has been shown in references \cite{PazSin,Kiefer} that this is
the object that is exactly analogous to the Feynman-Vernon influence
functional ${\cal F} (x, x')$ in the case where the environment
is in a pure state. We
will therefore call ${\cal I}(r',r)$ the influence functional and
analyze the fluctuation and dissipation phenomena in analogy to
the QBM problem.
To facilitate making these connections, we write the
influence functional in the form
\begin{equation}
{\cal I}(r,r')= \exp\{i\Gamma(r,r')\}
\end{equation}
where the influence action can be written as
\begin{equation}
\Gamma(r, r')
= \Theta(r,r') + i\tilde\Gamma(r,r') \label{ifqc}
\end{equation}
The phase $\Theta$ and the real exponent $\tilde\Gamma$
which constitute the influence functional will be the basic objects of our
interest
(note
that $\tilde\Gamma$ is positive since the overlap is bounded by unity).
\subsection{Bianchi-I Minisuperspace with a Conformal Scalar Field}
We now specialize our model to a minisuperspace of Bianchi I universe coupled
to a massless
conformal scalar field. The line element is given by \cite{mss}
\begin{equation}
ds^2 = a^2 d{\eta}^2 - a^2 e^{2\beta}_{ij} dx^i dx^j ,
\end{equation}
where $\eta$ is the conformal time .
The traceless $3\times 3$ matrix $\beta$ measures the anisotropy, its time rate
of change gives the shear. For Type-I universe, it can always be
parametrized by the principal eigenvalues
\begin{equation}
\beta = {\rm diag} (\beta_1, \beta_2, \beta_3)
\end{equation}
or, equivalently by $\beta_\pm$ defined by
\begin{equation}
\beta_1= \beta_++\sqrt 3 \beta_-,~~ \beta_2=\beta_+ - \sqrt 3 \beta_-,~~
\beta_3= - 2\beta_+ \label{bpm}
\end{equation}
Rewriting the scale factor as $a=e^{\alpha}$,
the Einstein Hilbert action can be written as
\begin{equation}
S_g = { 6M} \int d\eta
\{ {e^{2\alpha}} ( -\dot\alpha^2 + \dot\beta_+^2 + \dot\beta_-^2)
\end{equation}
where $M=M_{Pl}^2$ , and a dot denotes taking a
derivative with respect to the conformal time $\eta $.
We normalize the spatial volume to $1$ assuming $T^3$ spatial
topology.
The action for the scalar field is given by
\begin{equation}
S_f= {1\over 2} \int d^4x ~(g^{\mu\nu}\partial_\mu\Phi\partial_\nu\Phi
- {1\over 6} R\Phi^2)
\end{equation}
\noindent which, after integrating by parts and defining the conformal field
$X=a\Phi$, can be written as:
\begin{equation}
S_f= {1\over 2} \int d^4x~ \{ {\dot X^2} + X \nabla^{(3)}X -
(\dot\beta_+^2 + \dot\beta_-^2)X^2\}
\end{equation}
\noindent where the spatial Laplacian is given by
$\nabla^{(3)}=e^{2\beta}_{ij}\partial_i\partial_j$.
As usual, we
expand the field $X$ in an orthonormal basis of eigenfunctions of
$\nabla^{(3)}$. As the spatial sections are flat, the
eigenfunctions are simple trigonometric functions and the momenta are
quantized due to the periodic boundary conditions associated with the $T^3$.
We will denote the basis as
$\{Q_{\bf k\sigma}(\vec x), {\bf k}=(k_x, k_y, k_z),
k_j=2\pi n_j, \sigma=\pm\}$. The index $\sigma$ labels the functions according
to their parity. The expansion of the field $X$ reads:
\begin{equation}
X(\vec x, \eta) = \sum_{\bf k\sigma} Q_{\bf k\sigma}(\vec x) \chi_{\bf k\sigma}(\eta)
\end{equation}
The variables of the minisuperspace constituting our open system
are $r^m=(\alpha,\beta_+, \beta_-)$ or $(\alpha, \beta_{ij})$
and the `environment' variables
are the collection of field amplitudes $\{\chi_{\bf k\sigma}, ~~
k_j=2\pi n_j, ~~\sigma=\pm\}$.
Using our previous expressions it is easy to show that the Hamiltonian can
be written in the form of (\ref{hamiltonian}), where the gravitational part
has the supermetric
\begin{equation}
G^{mm'} = {1\over{a^2}} {\rm diag}(-1,+1,+1).
\end{equation}
\noindent On the other hand the matter Hamiltonian can be written
as
\begin{eqnarray}
H_X&=& \sum_{\bf k\sigma} H_{\bf k\sigma}= \sum_{\bf k\sigma}
{1\over 2} (\pi_{\bf k\sigma}^2 + \Omega_{\bf k}^2 {\chi_{\bf k\sigma}}^2 )\nonumber \\
\Omega_{\bf k}^2 &=& e^{2\beta}_{ij} k^ik^j~ +
{1\over {144 M^2~a^4}} (p_{\beta_+}^2 + p_{\beta_-}^2)
\end{eqnarray}
We will assume the wave function of the universe can be
written as (\ref{WKB}), where the function $S$ obeys the
Hamilton--Jacobi equation (\ref{HJ}) which in this case is given by:
\begin{equation}
{{e^{-2\alpha}}\over{2M}} (-(\partial_\alpha S)^2 + (\partial_{\beta_+} S)^2 +
(\partial_{\beta_-} S)^2 ) = 0 \label{HJbi}
\end{equation}
\noindent
This equation can be separated and solved as
\begin{equation}
S(\alpha,\beta_{\pm}) = \tilde S_{\vec b} (\alpha) + b_+\beta_+ + b_-\beta_-
\label{S}
\end{equation}
with
\begin{equation}
{\partial_\alpha}\tilde S_{\vec b}(\alpha) = \pm |\vec b|
\end{equation}
\noindent where we use $\vec b$ to denote the two dimensional constant
vector $(b_+, b_-)$.
As we can see,
a particular solution to the Hamilton--Jacobi equation is parametrized
by two integration constants ($b_+$ and $b_-$) and by the sign that
defines $\tilde S(a)$ in
equation (\ref{S}). Therefore, the label $(n)$ that characterizes a
solution of (\ref{HJbi}) stands
for the set of constants $\{\vec b, \pm\}$. Every function
$S_{(n)}$ generates a $2$--parameter family of trajectories in the three
dimensional minisuperspace
(these are the curves orthogonal to the $S_{(n)}=$constant hypersurfaces).
These trajectories are exact solutions to the Einstein's
equations,
and if we restrict our considerations to the plane
$(a,\beta_+)$,
the trajectories are defined by the equation
\begin{equation}
{\partial\beta_+\over{\partial\alpha}} = - {b_+\over {\partial_{\alpha} S}}
\end{equation}
\noindent The minisuperspace trajectories can be found by integrating the
above equation and are straight lines (with slope given by $\pm b_+/|\vec b|$)
corresponding to the well known Kasner's solutions. In that case, for the
``expanding'' (i.e. $\dot\alpha>0$) branch, we have
$\beta_+={{b_+}\over{|\vec b|}}\alpha+{\beta_+}_0$, where ${\beta_+}_0$
is an integration constant.
\subsection{Influence Action}
We have to compute
the influence functional (\ref{ifqc}) according to
the strategy described in the beginning of this section
and for that we have to solve
the Schr\"odinger equation (\ref{Schr}).
It is possible to make the following ansatz for the matter wave function
\begin{equation}
\psi(r,X)=
\psi(r, \{\chi_{\bf k}\}) = \prod_{\bf k} {\psi}_{\bf k}(r, \chi_{\bf k})
\end{equation}
Thus, the influence functional is expressed as an infinite product while
the phase $\Theta$ and the
real exponent $\tilde\Gamma$ can be written as a sum of contributions from
each mode.
Each component of the wave function
satisfies the following Schr\"odinger equation:
\begin{equation}
i{{\partial \psi_{\bf k}}\over{\partial \eta}} = {H}_{\bf k}~ \psi_{\bf k}.
\end{equation}
\noindent with a Hamiltonian given by :
\begin{eqnarray}
H_{\bf k} &=& -{1\over 2}{{d^2~}\over{d\chi_{\bf k}^2}} + {1\over 2}\Omega_{\bf k}^2
\chi_{\bf k}^2\nonumber \\
&=& -{1\over 2}{{d^2~}\over{d\chi_{\bf k}^2}} +
{1\over 2} (e^{2\beta_{ij}}~k^i k^j +
{\dot\beta_+}^2+{\dot\beta_-}^2){\chi_{\bf k}^2}
\end{eqnarray}
\noindent where as before, we have used a dot to denote the derivative with
respect to the
conformal time, which also happens to coincide wth the WKB time as can be seen
from
applying the definition (3.7) to the model of sect. 3.2.
Let us now describe how we compute the influence functional.
We will make a Gaussian
ansatz for the wave function $\psi_{\bf k}$ that corresponds
to assuming that the state for the scalar perturbations is a particular
vacuum .
Thus, we write each component of the wave function as (for
simplicity we will omit the index ${\bf k}$):
\begin{equation}
\psi (r, f) = ({\pi\over w_i})^{1\over 4} ~e^{-{i\over 2}\int w_idt}
{}~e^{{i\over 2}f^2 w}
\end{equation}
where $w \equiv \dot u/ u \equiv w_r + i w_i$, and $w_r, w_i$ are the
real and imaginary parts of $w$.
The equation satisfied by the function $u$ is easily
derived from the Schr\"odinger equation and can be written as :
\begin{equation}
\ddot u + \Omega_{\bf k}^2 u = 0 \label{weq}
\end{equation}
The computation of the overlap factor
involves solving the above equations.
In our model this can be done using a
perturbative scheme if we assume that the anisotropy coordinates
are small. In that case, we can can write (up to second order in the
anisotropy):
\begin{equation}
\Omega_{\bf k}^2 = \omega_{\bf k}^2 - \lambda_1 - \lambda_2 \label{omega}
\end{equation}
where
\begin{eqnarray}
\omega_k & = &|{\bf k}^2|^{1/2}, \quad
\lambda_1 = ~ - 2 \beta_{ij} k^ik^j \quad{\rm and}\quad \nonumber \\
\label{lambda}
\lambda_2 & =& -~2\beta^2_{ij}k^ik^j - (\dot\beta_+^2 + \dot\beta_-^2)
\end{eqnarray}
Then, the equation for $u$ can be solved by a standard iteration procedure
\cite{PazSin,Unr}.
Assuming that the anisotropy is ``switched off" at early and late
times, and taking the
initial state as the conformal
vacuum, the expressions for $\tilde\Gamma$ and $\Theta$
of the exponent of the influence functional defined in (\ref{ifqc})
are given respectively by
\begin{eqnarray}
\tilde\Gamma(r,r') & = &
{\omega_{\bf k}^2} cos(2\omega_{\bf k}(\eta_1-\eta_2)) \nonumber \\
& & +{1\over 16} \int^{\eta'}\int^{\eta_1} d\eta_1~d\eta_2
{{\lambda_1(\eta_1)\lambda_1(\eta_2)} \over {\omega_{\bf k}^2}}
cos(2\omega_{\bf k}(\eta_1-\eta_2)) \nonumber \\ \label{rexp}
& &-{1\over 16} \int^\eta\int^{\eta'} d\eta_1~d\eta_2
{{\lambda_1(\eta_1)\lambda'_1(\eta_2)}\over {\omega_{\bf k}^2}}
cos(2\omega_{\bf k}(\eta'-\eta+\eta_1-\eta_2))
\end{eqnarray}
and
\begin{eqnarray}
\Theta(r,r') & = & ~ {1\over 2}\omega_{\bf k}(\eta-\eta') + {1\over{4\omega_{\bf k}}}
\int^{\eta}d\eta_1 \lambda_2(\eta_1) - {1\over{4\omega_{\bf k}}} \int^{\eta'}d\eta_1
\lambda_2(\eta_1)~+\nonumber \\ \label{phase}
& + & {1\over 8} \int^\eta\int^{\eta_1} d\eta_1~d\eta_2 ~
{{\lambda_1(\eta_1)\lambda_1(\eta_2)}\over
{\omega_{\bf k}^2}} ~sin(2\omega_{\bf k}(\eta_1-\eta_2)) ~- \nonumber \\
& - & {1\over 8} \int^{\eta'}\int^{\eta_1} d\eta_1~d\eta_2 ~{{\lambda_1(\eta_1)
\lambda_1(\eta_2)} \over {\omega_{\bf k}^2}} ~sin(2\omega_{\bf k}(\eta_1-\eta_2)) ~+\nonumber \\
& + &{1\over 8} \int^\eta\int^{\eta'} d\eta_1~d\eta_2 ~{{\lambda_1(\eta_1)
\lambda_1(\eta_2)}\over {\omega_{\bf k}^2}} ~sin(2\omega_{\bf k}(\eta'-\eta+\eta_1-\eta_2))
\end{eqnarray}
up to second order in anisotropy.
The total phase $\Theta$ and the total real exponent $\tilde \Gamma$
of the influence functional are obtained by summing over $\bf k$ of
(\ref{phase}) and (\ref{rexp}) respectively.
In performing these sums, divergent expressions will arise which
will have to be regularized and renormalized.
The above equations clearly show the history
dependence of the influence functional since they are written in terms of time
integrals of functions that depend on $\beta_{\pm}(\eta_1)$ . Therefore, the phase and
the real exponent are {\it functionals} of the zero order WKB histories.
Notice that since in this model we have more than
one minisuperspace degree of freedom, even within a WKB branch,
we have a whole family of trajectories rather than a
single trajectory. So as far as the solutions of the Hamilton-Jacobi
equation is concerned, this implies restricting ourselves to the
family of trajectories given by the solution of ( 3.26)
with a fixed value of ${b_+/ |{\vec b}|}$. These are
a family of parallel
straight lines with the slope fixed by $n$ and different $\beta$
intercepts. We note that in the configuration space of the $\alpha-\beta_+$
plane, one and only one trajectory passes through each
point. Hence each point in configuration space can be associated with
an entire history, and thus ${\cal I}$ is a functional of two histories
as in the Brownian motion example.
As it stands, ${\cal I}(r,r')$ is still not in a form that can be
put in one-to-one correspondence with the ${\cal F}(x,x')$ of the QBM problem,
because the latter is an explicit function of time, whereas in the
former, the WKB time is defined through (\ref{time}) as a function of the
coordinates $r$. The definition of $\eta$= constant surfaces
depends on the choice of the hypersurface in minisuperspace on which
the initial condition of the wave function is specified. In our case the
initial
conditions were specified on a $\alpha$ = constant hypersurface. Thus
our constant WKB time hypersurfaces are those with $\alpha$=
constant. Now, let us specialize to the situation where ${\cal I}(r,r')$
is evaluated on two points such that $\alpha = \alpha'$. From the above
discussion then we know that this implies that $\eta = \eta'$.
The two histories, $\beta_{\pm}(\eta_1)$ and
$\beta'_\pm(\eta_1)$ that enter into the calculation of the influence
functional
are the parallel lines (with slope determined by $(n)$) , passing through
the points $(\alpha, {\beta}_+)$ and $(\alpha, {{\beta}_+}')$ respectively.
Now, the influence functional can be written as ${\cal I}(\beta_{\pm},{\beta_{\pm}}',\eta)$
and can finally be compared with that of the QBM problem.
\section{Fluctuations in Quantum Fields and Dissipation of Spacetime
Anisotropy}
\subsection{Regularized Influence Action}
It has been pointed out in \cite{PazSin} that the
influence action $\Gamma$ is identical to the
Schwinger--Keldysh (or Closed Time Path) effective action which is a
functional of two histories and can be computed using diagrammatic
techniques. Thus $\Gamma$ is esentially the same as the quantity
given by (3.11 ) in \cite{CH87}, with $\beta$ and $\beta'$ corresponding
to ${{\beta}_{ij}}^+ , {{\beta}_{ij}}^{-}$ in the CTP context, where the $+$
and $-$ superscripts refer to the positive and negative contour branches
respectively.
This identification is useful as it connects with the well-known
results in semiclassical gravity \cite{CH87}.
This connection provides both conceptual and technical advantages as it
offers clearer physical interpretations of the results in
quantum cosmology and makes available many results
obtained previously in the application of the CTP formalism
in quantum field theory in curved spacetimes.
We now proceed to evaluate $\tilde\Gamma$ and $\Theta$ by summing
the equations (\ref{rexp}) and (\ref{phase})
over all modes $\{k\}$ subject to the restriction $\alpha =
\alpha'$. Some of the mode sums appearing in these expressions are
divergent and hence need to be regularized.
The regularized influence action for this problem can be calculated
using Feynman diagram \cite{CH87} or dimensional regularization
techniques \cite{PazSin}.
The phase of the influence functional can be written as
\begin{equation}
\Theta = {\Gamma}_{div} + {\Gamma}_{ren}
\end{equation}
where
${\Gamma}_{div}$ and ${\Gamma}_{ren}$ represent the divergent
and finite contribution to the phase respectively.
${\Gamma}_{div}$ (obtained as terms containing the $1/ \epsilon$ factor in
dimensional regularization , where $\epsilon = n-4$ and $n$ is
the dimension of spacetime ) is given by \cite{PazSin}
\begin{equation}
{\Gamma}_{div} = \int d{\eta}_1 d {\eta}_2
({\beta}_{ij} - {\beta'}_{ij})({\eta}_1)
{\gamma}_{div} ({\eta}_1 - {\eta}_2)
({\beta}^{ij} + {\beta'}^{ij} )({\eta}_2)
\end{equation}
where
\begin{equation}
{\gamma}_{div}({\eta}_1 - {\eta}_2)
= \int_{-\infty}^{+\infty}{d\omega\over 2\pi} e^{i \omega ({\eta}_1-{\eta}_2)}
\left[ {-{\omega}^4\over 4 {(4\pi)}^2 (n^2 -1)} {1\over \epsilon}\right].
\end{equation}
${\Gamma}_{div}$ can be rewritten as
\begin{equation}
{\Gamma}_{div} = {1\over 4{(4\pi)}^2 (n^2 -1) \epsilon}\int d{\eta}_1
[{\ddot {\beta_i}}^2 -{\ddot {{\beta'}_i}}^2] + surface ~~ terms,
\end{equation}
where the surface terms can be written as integrals of total derivatives
of functions of $\beta$ and $\beta'$ and can be discarded.
As it stands this explicitly divergent term cannot be
absorbed by renormalization of the bare coupling constants
present in the original action since from (3.17) we
see that no term of this higher derivative form appears there.
Hence we follow the usual procedure
used in quantum field theory in curved spacetime of first
dimensionally regularizing the effective action, modifiying
the original classical action by adding appropriate counterterms
to cancel the divergence, and finally
taking the limit $\epsilon \rightarrow 0$. The modified classical
action including the counterterms up to second order in $\beta$
is given by \cite{HarHu}
\begin{eqnarray}
{\bar S} &=& \int d\eta \left[ -6M {{\dot a}}^2 + {1 \over \{180(4\pi)^2\}}
\left\{ {({\dot a\over a})}^4
- 3 {({\ddot a\over a})}^2 \right\}\right] \nonumber \\
& +& \int d\eta \left(M {\dot \beta}^2 a^2 + {1 \over \{180(4\pi)^2\}}
\left[ 3 {\epsilon}^{-1}{\ddot \beta}^2
+ 3 ln (\mu a){\ddot \beta}^2 - \left\{ {({\ddot a\over a})} {\dot \beta}^2
+{({\dot a\over a})}^2 {\dot \beta}^2 - {\ddot \beta}^2 \right\} \right]
\right)
\end{eqnarray}
where $\mu$ has dimensions of mass and sets the renormalization scale.
The total phase of the density matrix is now given by
\begin{equation}
{\bar S}( a, \beta) - {\bar S}( a, \beta') + \Theta ( a, \beta, \beta')
\end{equation}
Inserting (4.5) for ${\bar S}$ in the above expression we notice
that the pole term in $\epsilon$ cancels exactly. \footnote{However,
we would like to add a cautionary note at this point.
We are assuming without proof that the $R^2$ type terms can be added
as counterterms at this level after making the WKB ansatz.
Since addition of such terms at the level of the quantum cosmology
Hamiltonian which was our starting point involves
the introduction of new canonical degrees of freedom,
the validity of this assumption is not entirely clear.}
The rest of the exponent, ${\Gamma}_{ren}$ and $\tilde{\Gamma}$, is finite:
\begin{equation}
{\Gamma}_{ren} = \int^{\eta} d{\eta}_1 d {\eta}_2
({\beta}_{ij} - {\beta'}_{ij})({\eta}_1)
{\gamma}_{ren}({\eta}_1 - {\eta}_2) \label{gren}
({\beta}^{ij} + {\beta'}^{ij} )({\eta}_2)
\end{equation}
and
\begin{equation}
\tilde{\Gamma} = \int^{\eta} d{\eta}_1 d {\eta}_2
({\beta}_{ij} - {\beta'}_{ij})({\eta}_1)
\tilde{\gamma}({\eta}_1 - {\eta}_2) \label{gtilde}
({\beta}^{ij} - {\beta'}^{ij} )({\eta}_2) ,
\end{equation}
where the kernels $\gamma_{ren}$ and $\tilde\gamma$ are given by
\begin{equation}
\gamma_{ren}(\eta)= -{1\over{60(4\pi)^2}}
\label{odev}
\int_{-\infty}^{+\infty} {{d\omega}\over{2\pi}} ~{\rm e}^{i\omega \eta}
{}~\omega^4 ~
\log(i{{(\omega-i\epsilon)}\over{\mu}})
\end{equation}
and
\begin{equation}
\tilde\gamma(\eta) = ~{1\over{60(4\pi)^2}}
\int_{0}^{+\infty} \label{eventilda}
{{d\omega}\over{2\pi}}{\pi\omega^4} \cos \omega \eta .
\end{equation}
Notice that the kernel $\tilde\gamma(\eta)$ is even whereas
$ \gamma_{ren}(\eta)$ contains an odd and even part
given by
\begin{equation}
\gamma_{odd}(\eta) = ~{1\over{60(4\pi)^2}}
\int_{0}^{+\infty} \label{odd}
{{d\omega}\over{2\pi}}{\pi\omega^4}\sin\omega \eta
\end{equation}
and
\begin{equation}
\gamma_{even}(\eta) = -{1\over{60(4\pi)^2}}
\int_{-\infty}^{+\infty} {{d\omega}\over{2\pi}} ~\omega^4 \cos
\omega \eta {\rm ln} {|\omega|\over \mu} \label{even}
\end{equation}
The kernel $ \gamma_{ren}(\eta)$ is manifestly real and can also be
seen to be causal \cite{CH87}.
Note that $\tilde{\Gamma}$ and ${\Gamma}_{ren}$ play distinct roles here.
$\tilde{\Gamma}$ is responsible for the decoherence between alternative
histories $\beta$ and $\beta'$ in the sense that it suppresses the
contribution of widely differing histories
to the influence functional, and hence suppresses
the off diagonal terms of the reduced density matrix .
This feature and its connection to
particle production was explored before in \cite{PazSin,nfsg}.
On the other hand, when
we attempt to derive the effective equation of motion for $\beta$ by
varying the effective action $S_{eff}$,
only ${\Gamma}_{ren}$ contributes to generating the equation
of motion. The equation of motion obtained under such variation is
identical to the real, causal dissipative equation for $\beta$ obtained
by Calzetta and Hu in \cite{CH87}. In fact, as we will show more
explicitly later, ${\Gamma}_{ren}$ provides the dissipative
contribution to the equation of motion.
Thus in the present form of the influence functional ${\Gamma}_{ren}$
contributes only to the equation of motion and not to decoherence, and
$\tilde{\Gamma}$ contributes only to decoherence, and not to the
equation of motion.
However, in the following we will show how $\tilde{\Gamma}$ also plays
the dual role of generating noise and will indeed contribute to
the effective equations of motion with a stochastic source.
\subsection{Correspondence with QBM}
Now that we have the complete form of the influence functional,
we can proceed to compare its exponent given by (\ref{gren}) and
(\ref{gtilde}) with that of (\ref{iabm}) of the QBM problem.
We can see that it corresponds to the
$k = 2$, $f(x) = x$ case in (2.9) with the identification $\beta_i \equiv x$
and $q_n \equiv \chi_{\bf k}$. It is by no means obvious that our cosmological
example should correspond to $f(x) = x$, i.e, the linear coupling
case, because in our approximation
we had retained up to quadratic terms in the anisotropy. In fact, from
(\ref{omega}) we see that the system-environment coupling contains
terms quadratic in $\beta$ as well as a quadratic coupling in
velocities, which is not even covered by our Brownian motion model.
However, though these terms are originally present, when correctly
dimensionally regularized, the terms proportional to $\lambda_2$ that
contain the non-linear coupling vanish. Hence we are left with only
an effective linear coupling in the anisotropy.
The local potential renormalization terms $\Delta V$'s can
be identified with $\Gamma_{div}$ in the cosmological case and
we have already dealt with the renormalization.
Using the time
reflection symmetry of the kernel $\tilde\gamma$ we obtain
\begin{equation}
\tilde\Gamma=
2~\int\limits_0^\eta d\eta_1\int\limits_0^{\eta_1}d\eta_2
\tilde\gamma(\eta_1-\eta_2) ~({\beta^{ij}} - {{\beta'}^{ij}})(\eta_2)
\label{noise}
\end{equation}
and for the phase $\Gamma_{(ren)}$ , using the time reflection
properties of $\gamma_{odd}(\eta)$ and
$ \gamma_{even}(\eta)$ we can rewrite it as
\begin{eqnarray}
\Gamma_{ren}& = &
{}~\int^\eta\int^\eta d\eta_1d\eta_2~\beta_{ij}^+(\eta_1)\hat{\gamma}(\eta_1
-\eta_2)\beta^{ij}(\eta_2)\nonumber \\
& - &~\int^\eta \int^\eta d\eta_1 d\eta_2~{{\beta}'_{ij}}
(\eta_1)\hat{\gamma}(\eta_1 -\eta_2){{\beta}'_{ij}} (\eta_2)\nonumber \\
& + & 2~\int\limits_0^\eta d\eta_1\int\limits_0^{\eta_1} d\eta_2 ~(\beta_{ij}
-{\beta'}_{ij})(\eta_1) ~ \label{diss}
\gamma_{odd }(\eta_1-\eta_2) ~({\beta^{ij}} + {{\beta'}^{ij}})(\eta_2)
\end{eqnarray}
where
\begin{equation}
\hat{\gamma}(\eta_1 -\eta_2) = \gamma_{\scriptscriptstyle even}(\eta_1 -
\eta_2)
- \gamma_{\scriptscriptstyle odd }(\eta_1-\eta_2)~sgn(\eta_1 - \eta_2)
\end{equation}
is an even kernel. Now we must compare the expressions (\ref{noise})
for the real exponent and the phase (\ref{diss}) with the
corresponding expressions in the influence action (\ref{iabm}) for
the Brownian motion case in order to properly identify the noise
and dissipation contributions. Comparing the real exponents we see
that the noise kernel for the anisotropy in this case is given by
\begin{equation}
\nu(\eta) = 2\tilde{\gamma}(\eta) = ~{1\over{30(4\pi)^2}}
\int_{0}^{+\infty} \label{nker}
{{d\omega}\over{2\pi}}{\pi\omega^4} \cos\omega \eta
\end{equation}
In trying to compare the phase terms we notice that the third term in
(\ref{diss}) is indeed of the form of that in (\ref{iabm}) and we can
identify the dissipation kernel $\mu(\eta)$ for the cosmology case as
\begin{equation}
\mu(\eta) = -2\gamma_{odd}(\eta) \label{dker}
\end{equation}
and it is manifestly odd in time.
The regularized influence action can therefore be written as
\begin{eqnarray}
\Gamma ({\beta},{\beta'}) & = & ~\int^{\eta}\int^{\eta}
d{\eta}_1d{\eta}_2~{\beta_{ij}} ({\eta}_1)\hat \gamma({\eta}_1
-{\eta}_2){\beta^{ij}}({\eta}_2)\nonumber \\
& - & ~\int^{\eta}\int^{\eta}
d{\eta}_1 d{\eta}_2~{{\beta'}_{ij}} ({\eta}_1)\hat \gamma({\eta}_1
-{\eta}_2){{\beta'}^{ij}}({\eta}_2)\nonumber \\
& - & ~\int\limits_0^{\eta}d{\eta}_1\int\limits_0^{{\eta}_1} d{\eta}_2
\mu({\eta}_1-{\eta}_2) ~({\beta}^{ij} + {\beta'}^{ij})
(\eta_2)\nonumber \\
& + & i~\int^\eta d\eta_1\int\limits_0^{\eta_1}d\eta_2
\nu(\eta_1-\eta_2) ~({\beta}^{ij} - {\beta'}^{ij})(\eta_2)
\end{eqnarray}
The first two terms contribute a non-local potential to the effective
action but do not contribute to the mixing of $\beta$ and ${\beta'}$
histories like the third and fourth terms. We will now show in some greater
detail that the
third term with the kernel $\mu$ that is odd in the time domain
contributes to the dissipation and the last term containing $\nu$
is associated with noise.
\subsection{Noise}
Let us first concentrate on the fourth term. Its contribution to the
influence functional is given by
\begin{equation}
exp [-~\int^\eta d\eta_1\int\limits_0^{\eta_1}d\eta_2
\nu(\eta_1-\eta_2) ~({\beta}^{ij} - {\beta'}^{ij})
(\eta_2)] \label{expnoise2}
\end{equation}
We will proceed in exact analogy with the analysis of noise in the
case of QBM described in Sec. 2.2.
The term in (4.19) can be rewritten using functional Gaussian identity
(2.11)
which in this case states that the above expression is equal to
\begin{equation}
\int D\xi(\eta) {\cal P}[\xi]exp [ i\int\limits_0^\eta
d{\eta'} {\xi}^{ij}({\eta'})~ ({\beta}_{ij} - {{\beta'}_{ij}})({\eta'})]
\end{equation}
where
\begin{equation}
{\cal P}[\xi] = P_0 exp[{- \label{noisedist}
}\int\limits_0^\eta d{\eta}_1\int\limits_0^{\eta}d{\eta}_2
{1\over 2} {\xi}_{ij}(\eta_1)\nu^{-1}
(\eta_1 - \eta_2){\xi}^{ij}(\eta_2)]
\end{equation}
is the functional distribution of $\xi(\eta)$ and $P_0$ is a
normalization factor given by
\begin{equation}
{P_0}^{-1} = \int D\xi(\eta)exp [- \int\limits_0^\eta d\eta_1
\int\limits_0^\eta d\eta_2{\xi}_{ij}(\eta_1) \nu^{-1}(\eta_1-\eta_2)
{\xi}^{ij}(\eta_2)].
\end{equation}
The influence functional can then be written as
\begin{eqnarray}
e^{i\Gamma} &=& \int D\xi(\eta){\cal P}[\xi] exp{i\hat{\Gamma}
[\beta, \beta' ,\xi]}\nonumber \\
&\equiv & {< exp {i\hat{\Gamma}
[\beta, \beta' ,\xi]} >}_{\xi}
\end{eqnarray}
where the angled brackets denote an average with respect to the
stochastic distribution ${\cal P}[\xi]$.
The modified influence action $\hat{\Gamma}[ \beta, \beta', \xi]$
is given by
\begin{eqnarray}
\hat{\Gamma}[ \beta , \beta', \xi] & = &
~\int^{\eta}\int^{\eta}
d{\eta}_1d{\eta}_2~{\beta}_{ij} ({\eta}_1){\hat \gamma}({\eta}_1
-{\eta}_2){\beta^{ij}}({\eta}_2)\nonumber \\
& - & ~\int^{\eta}\int^{\eta}
d{\eta}_1 d{\eta}_2~{\beta'}_{ij} ({\eta}_1){\hat \gamma}({\eta}_1
-{\eta}_2){{\beta'}^{ij}}({\eta}_2)\nonumber \\
& - & ~\int\limits_0^{\eta}d{\eta}_1\int\limits_0^{{\eta}_1} d{\eta}_2
\mu({\eta}_1-{\eta}_2) ~({\beta}^{ij} + {\beta'}^{ij})
(\eta_2)\nonumber \\
&-& ~\int d\eta' {\xi}^{ij}(\eta'){\beta}_{ij}
+ ~\int d\eta' {\xi}^{ij}(\eta'){\beta'}_{ij}
\end{eqnarray}
The term coupling a stochastic source $\xi$ to $\beta$ will manifest itself as
the noise in the equation of motion derived from this effective action. We see
that the influence action $\Gamma$ can be written as an average of
$\hat{\Gamma}$ over this stochastic distribution function.
The reduced density matrix can thus also be written as a stochastic average
\begin{equation}
{\rho}_{red}[ {\beta},{\beta'}]
= <e^{i \hat S_{eff} (
{\beta},
{\beta'};\xi)}>_\xi
\end{equation}
where the full effective action $\hat S_{eff}$ is given by
\begin{eqnarray}
\hat S_{eff} &=&
{\bar S}[a, {\beta}] + ~\int d\eta' {\xi}^{ij}(\eta'){\beta}_{ij}
- \{{\bar S}[a , {\beta'}] + ~\int d\eta' {\xi}^{ij}(\eta'){{\beta'}_{ij}}\}
\nonumber \\
& - & ~\int\limits_0^{\eta}d{\eta}_1\int\limits_0^{{\eta}_1} d{\eta}_2
\mu({\eta}_1-{\eta}_2) ~({\beta}^{ij} + {\beta'}^{ij})
(\eta_2) \label{seff}
\end{eqnarray}
and $\bar S$ is given by (4.5).
Our relevant equations of motion will be derived by varying $\hat S_{eff}$.
{}From this equation we can view ${\xi}(\eta)$ as an external stochastic
force linearly coupled to $\beta$, though the linearity is a feature
specific to truncation of the perturbation series at quadratic order in the
effective action. In general we will have non-linear coupling.
Since the distribution functional (\ref{noisedist}) is Gaussian, this is a
Gaussian type noise, which as in (2.18) , is completely characterized by
\begin{eqnarray}
{<\xi(\eta)>}_{\xi} &=& 0 \nonumber\\
{<\xi(\eta_1)\xi(\eta_2)>}_\xi &=& \nu(\eta_1-\eta_2)
\end{eqnarray}
Therefore the non-local kernel $\nu(\eta_1-\eta_2)$ is just the two-point
time-correlation function of the external stochastic source
$\xi(\eta)$. Since this correlation function is non-local, this noise is
colored. As suggested in \cite{HuPhysica,HMLA}
we believe this is a rather general feature of noise of cosmological origin.
\subsection{Fluctuation-Dissipation Relation}
Now that we have identified the noise and dissipation kernels
$\nu(\eta)$ and $\gamma_{odd}(\eta)$ respectively, we can
go ahead and write down the fluctuation-dissipation relation in
analogy with the quantum Brownian model \cite{HPZ2,HuBelgium}.
Defining
\begin{equation}
\mu(\eta) = - 2 \gamma_{odd}(\eta) = {d\over d\eta}\gamma(\eta)
\end{equation}
The fluctuation-dissipation relation has the familiar form
given by (2.30)
\begin{equation}
\nu(\eta) = \int\limits_0^\infty d{\eta}' K(\eta-{\eta}')\gamma({\eta}')
\label{fdan}
\end{equation}
where the FD kernel $K(\eta)$ is given by
\begin{equation}
K(\eta) = \int\limits_0^{\infty} {d\omega\over \pi}~\omega \cos\omega \eta
\end{equation}
This supports the conjecture of \cite{HuPhysica} that there exists
a fluctuation-dissipation relation for the description of the backreaction
effect of particle creation in cosmological spacetimes.
We see that the FD kernel is identical with that given by (\ref{zerofd}),
which is given for more general system-bath couplings of the form (\ref{int}),
but with the bath at $T=0$. Hence this also vindicates
the previous observation \cite{HPZ2,Zhang,SinSor} that the zero temperature
fluctuation-dissipation relation is insensitive to the nature of the
system-bath coupling. Since we have not taken the bath at a finite
temperature, thermal fluctuations play no role in the above relation
and it summarizes the effect solely of quantum fluctuations. Effect of
thermal fluctuations can be included easily and we expect a FDR to hold
for finite temperature particle creation and backreaction as well.
\section{Particle Creation, Noise and Backreaction}
\subsection{Particle Creation}
In this section we would like to examine in some detail the
relationship between the noise and dissipation kernels and particle
creation from the vacuum.
We would also be interested in comparing this approach to
that in \cite{CH87} and \cite{HuPhysica} where the relationship between
particle production and anisotropy dissipation was discussed in some
depth.
Let us first concentrate on the noise term . Since we know that the
noise term comes from the real part $\tilde{\Gamma}$
of the exponent of the influence
functional, we will analyze this part and try to rewrite in a form
such that it is easy to identify the part associated with particle
production. It can be shown \cite{PazSin} that $\tilde{\Gamma}(\beta,{\beta'})$
can be rewritten as
\begin{equation}
\tilde\Gamma(\beta,{\beta'}) =\int {d^3k \over {(2\pi)}^3}{1\over{4\omega_{\bf k}^2}}
|B_k(\beta) - B_k({\beta'}) |^2
\end{equation}
where
\begin{equation}
B_k(\beta) = -i {{\omega_{\bf k}}\over 2}~
\int^\eta d\eta_1 ~{1\over\omega_{\bf k}} ~[2 {\beta}_{ij}(\eta_1)k^i k^j]
\end{equation}
and $\omega_{\bf k} = |{\vec k}| = {(\sum_i {k_i}^2)}^{1\over 2}$. As we may recall
from (3.33), the term $2 {\beta}_{ij}(\eta_1)k^i k^j = \lambda_1$ is the
expansion
of the natural frequency to the first anisotropy order. One can of course
go to higher orders.
Now we can show that a close relation exists between the $B(\beta)$
function and the Bogolubov coefficients associated with the particle
creation that takes place as a consequence of the anisotropy
evolution \cite{HarHu,HuPar78}. This can be seen as follows.
The conformally related massless scalar field $X = a\Phi$ in our
model can be decomposed into modes as
\begin{equation}
X = \int {d^3k \over {(2\pi)}^3} e^{i {\vec k}\cdot{\vec x}} \chi_k(\eta)
\end{equation}
$\chi_k$ satisfies the following equation to first order in anisotropy
\begin{equation}
{d^2 \chi_k \over d{\eta}^2} + ( {\omega_{\bf k}}^2 + 2 {\beta}_{ij}(\eta_1)k^i k^j)
\chi_k = 0 \label{waveq}
\end{equation}
The solution to the above equation ( again to first order in $\beta$)
is given by
\begin{eqnarray}
\chi_k(\eta) & = & {\chi_k}^{in}(\eta)~\Bigl[1+ \int^{\eta} d\eta_1 \nonumber \\
& & - {{\chi_k}^{in}}^* (\eta) \int^\eta d\eta_1 ~{1\over{2i\omega_{\bf k}}}
[2 {\beta}_{ij}(\eta_1) k^i k^j] ~e^{2i\omega_{\bf k} \eta_1} \label{soln}
\end{eqnarray}
where
\begin{equation}
{\chi_k}^{in}(\eta) = {1\over{{\sqrt{2\omega_{\bf k}}}}} e^{i\omega_{\bf k} \eta}
\end{equation}
is the solution to (\ref{waveq})
with $\beta_{ij} = 0$ and corresponds to the `in'
conformal vacuum in the far past. Assuming that the anisotropy is switched
off at time $\eta$ the term on the left hand side of (\ref{soln}) can be
associated with ${\chi_k}^{out}(\eta) $ the `out' vacuum.
As is well known, the ``in" and ``out" basis can
be related in terms of Bogolubov coefficients $\alpha_k$ and ${\hat{\beta}_k}$
as
\begin{equation}
{\chi_k}^{out}(\eta) = \alpha_k {\chi_k}^{in}(\eta) + {\hat{\beta}}_k
{{\chi_k}^{in}}^* (\eta)
\end{equation}
Comparing (5.5 ) and (5.7 ) we can identify the ${\hat{\beta}}_k$ Bogolubov
coefficient as
\begin{equation}
{\hat{\beta}}_k =
\int^\eta d\eta_1 ~{1\over{2i\omega_{\bf k}}}( 2 {\beta}_{ij}(\eta_1) k^i k^j)
\end{equation}
As we see from its definition, the function
$B$ is proportional to this Bogolubov coefficient $\hat{\beta}$.
\begin{equation}
B_k(\beta) = \omega_{\bf k} e^{-2i\omega_{\bf k} \eta} \hat{\beta}_k
\end{equation}
Thus
\begin{equation}
\tilde\Gamma(\beta,{\beta'}) =\int {d^3k \over {(2\pi)}^3}{1\over 4}
|{{\hat{\beta}}_k} - {{\hat{\beta}}_k}' |^2,
\end{equation}
where $ {{\hat{\beta}}_k} $ and $ {{\hat{\beta'}}_k}$ are the
Bogolubov coefficients associated with the anisotropy histories ${\beta_{ij}}$ and
${{\beta'}_{ij}}$ respectively. It is obvious from (5.19 ) that the noise will be
non-zero only provided $ {{\hat{\beta}}_k} \neq {{\hat{\beta'}}_k} $,
i.e, if there is different amounts of particle production along the
two histories. Since this term is also associated with decoherence this
is also a necessary condition for decoherence to occur. This has also
been noticed from a slightly different point of view in \cite{nfsg,CalMaz}.
This demonstrates a connection between the process of particle production
and the noise or fluctuation.
\subsection{Einstein-Langevin Equation}
We will now show how this noise can be incorporated into the equation of
motion as a Langevin type equation. In this process we will also
demonstrate the role of the kernel $\mu$ in providing dissipation. The
key difference from the earlier treatment \cite{CH87} is that
the equation of motion will be derived from the quantity
$\hat S_{eff}( \beta, \beta', \xi)$ rather than the ``noise
averaged" quantity ${S_{eff}(\beta, \beta')}$.
This has also been discussed in other contexts in \cite{HPZ2,nfsg,HM3}.
The first step is to write $\hat S_{eff}( \beta , \beta' , \xi)$
in terms of the following variables
\begin{eqnarray}
\bar\beta_{ij} &=& {1\over 2} ( {\beta_{ij}} + {{\beta'}_{ij}}) \nonumber \\
\Delta &=& {\beta_{ij}} - {{\beta'}_{ij}}
\end{eqnarray}
The equation of motion is then derived as
\begin{equation}
{\delta \hat S_{eff}( \bar \beta_{ij} , \Delta)\over \delta \Delta }
{\Big | }_{\Delta = 0} = 0
\end{equation}
yielding
\begin{eqnarray}
& & -2 M {d\over d\eta} ( a^2 {\dot {\bar\beta_{ij}}}) + {1\over 30{(4\pi)}^2}
{d^2\over d{\eta}^2} [{\ddot {\bar\beta_{ij}}}ln(\tilde \mu a)]
+ {1\over 90{(4\pi)}^2} {d\over d\eta}
\left\{ \left[ {\Big({{\dot a}\over a}\Big)}^2
+ \Big({{\ddot a}\over a}\Big)\right]
{\ddot {\bar\beta_{ij}}}\right\}\nonumber \\
& + & \int d{\eta}_1 \gamma_{ren} (\eta - \eta_1)\bar\beta_{ij}(\eta_1)
= - j_{ij}(\eta) + {\xi}_{ij}(\eta) \label{eom}
\end{eqnarray}
Here $j_{ij}$ is an external source term added in order to switch on
the anisotropy in the distant past \cite{HarHu}.
It is worth comparing these results with those in \cite{CH87} where
similar equations were deduced from the CTP effective action.
Comparing (\ref{eom}) with (3.18) in \cite{CH87} we find
that they are exactly the same except for the stochastic force ${\xi}_{ij}$
on the right hand side.
The real and causal kernel $K_4$ there (including the
numerical factor $1/[30(4\pi)]^2$) is identical to our kernel
$\gamma_{ren}$ . We will show that the odd part of this
kernel can be associated with dissipation.
One could in fact interpret (3.18) obtained by Calzetta and
Hu as (\ref{eom}) averaged with respect to the noise
distribution. Since this is a Gaussian noise, $<\xi> = 0 $,
we obtain (3.18) of \cite{CH87}, where the
$\beta$'s are also to be interpreted as noise-averaged variables.
In this sense, we have gone beyond previous analysis
in extracting the underlying stochastic behavior
that is lost in the smoothed out average version given in \cite{CH87}.
To make the analogy with a Langevin equation more explicit it is convenient
to integrate (\ref{eom}) once with respect to $\eta$. This gives the following
equation
\begin{eqnarray}
& & -2 M a^2 {\dot {\bar\beta_{ij}}} + {1\over 30{(4\pi)}^2}
{d\over d{\eta}} [{\ddot {\bar\beta_{ij}}}ln(\tilde \mu a)] + {1\over 90{(4\pi)}^2}
\left\{ \left[ {\Big({{\dot a}\over a}\Big)}^2
+ \Big({{\ddot a}\over a}\Big)\right]
{\ddot {\bar\beta_{ij}}} \right\}\nonumber \\
& + & \int d{\eta}_2\int d{\eta}_1 \gamma_{ren} (\eta_2 - \eta_1)\bar\beta_{ij}(\eta_1)
= c_{ij} + s_{ij}
\end{eqnarray}
where $c_{ij}(\eta) = -\int d{\eta}' j_{ij}({\eta}')$ and
$s_{ij}(\eta) = \int d{\eta}' {\xi}_{ij}({\eta}')$.
Defining the variable $q_{ij} = d{\bar\beta_{ij}}/ d\eta$ we can write the above
equation in the following form
\begin{equation}
{d\over d\eta}(\tilde M {dq_{ij}\over d\eta}) + {\cal K} {dq_{ij}\over d\eta}
+ k q_{ij} = c_{ij} + s_{ij} \label{1int}
\end{equation}
where
\begin{eqnarray}
\tilde M &=& {1\over 30{(4\pi)}^2}ln(\tilde \mu a) \\
k &=& -2 M a^2 + {1\over 90{(4\pi)}^2}
\left[ {\Big({{\dot a}\over a}\Big)}^2 + \Big({{\ddot a}\over a}\Big)\right] \\
{\cal K}q_{ij} &=& \int d{\eta}_2\int d{\eta}_1 f(\eta_2 - \eta_1)
{dq_{ij}\over {d\eta_1}}
\end{eqnarray}
and $ d^{2}f(\eta)/ d{\eta}^2 = \gamma_{ren}$. This equation
is identical in form to the equation (3.15) in \cite{HuPhysica}
except for the term $s_{ij}$ on the right hand side, which is
indeed the stochastic contribution from the noise anticipated there.
This equation is a generalized Einstein equation in the Langevin form,
in that there is a dissipative term in the dynamics and a noise term in
the source. It has been conjectured \cite{HuPhysica}
and shown \cite{nfsg} that in a more complete description of semiclassical
gravity the semiclassical Einstein equation driven by the expectation values of
the energy-momentum tensor should be replaced by an Einstein-Langevin equation,
where there is an additional stochastic source arising from the fluctuations
of quantum fields. The conventional semiclassical Einstein equation is in this
sense, the simplified mean-field theory.
\subsection{Dissipation and Backreaction}
Equation (\ref{1int}) is in the form of a generalized
damped harmonic oscillator driven by a stochastic force $s_{ij}$.
(Of course the generalized mass $\tilde M$ and spring constant $k$ are time
dependent, so strictly speaking it has the damped harmonic oscillator
analogy only when these quantities are positive, as was also pointed
out in \cite{Paz90}.)
The second term on the left hand side of (\ref{1int})
represents the damping term involving a non-local (velocity dependent)
friction force. That this term is associated with dissipation can
be quickly seen as follows \cite{CH89}. In the Fourier transformed version
of a damped harmonic oscillator equation the imaginary term
is associated with dissipation. Writing (\ref{1int}) in terms of the
Fourier transform $q_{ij}(\omega) = \int d\eta e^{-i\omega \eta} q_{ij}(\eta)$
we notice that the only imaginary contribution comes from the
second term on the left hand side, which can be written as
\begin{equation}
F(q) = \int{d\omega\over 2\pi} e^{i\omega\eta}
{\gamma_{ren}(\omega)\over {\omega}^2} q_{ij}(\omega)
\end{equation}
where $\gamma_{ren}(\omega)$ is the Fourier transform of $\gamma_{ren}(\eta)$
defined in (\ref{odev}). Thus we see that the dissipation is associated
with the imaginary part of $\gamma_{ren}(\omega)$ or equivalently with
the odd part of the kernel $\gamma_{ren}(\eta)$ given by
$\gamma_{odd}$ defined in (\ref{odd}). This is consistent with our earlier
identification of $\gamma_{odd}$
as the dissipation kernel from the form of the influence functional
compared with the Brownian motion case.
In fact, as in \cite{CH87,CH89} we can isolate the generalized (frequency
dependent) viscosity function $\zeta(\omega)$ by writing
\begin{equation}
i\zeta(\omega)\omega q_{ij}(\omega) =
i {\rm Im } \gamma_{ren}(\omega)q_{ij}(\omega)
\end{equation}
{}From (\ref{odev}) we can identify $\zeta(\omega)$ as
\begin{equation}
\zeta(\omega) = {{|\omega|}^3\over 60(4 {\pi})^2}
\end{equation}
which is identical to that found in \cite{HuPhysica} and which is not
surprising, since our kernel $\gamma_{(ren)}$ in (\ref{eom}) and
$K_4$ in (3.18) in \cite{CH87} are identical up to numerical
factors.
Once having made the identification of the velocity dependent viscous
force in the equation of motion , we can calculate the dissipated
energy density by integrating $\vec{F}.\vec{v}$ (with $\vec v =\dot q_{ij}$
acting as velocity) over all frequencies
and come up with an expression identical to (3.18) in \cite{CH87,CH89}.
\begin{equation}
\rho_{dissipation} = \int\limits_0^{\infty}{d\omega\over 2\pi}
[\omega{\beta_{ij} (\omega)}^*][\zeta(\omega)\omega\beta_{ij}(\omega)].
\end{equation}
which has been shown there to be identical to the total energy of particle
pairs created by a given anisotropy history $\beta$. In this way, we
can see the connection between particle production and the
dissipation kernel and hence the process of dissipation itself.
Earlier in this section we had demonstrated the connection between
particle production and the noise or fluctuation term. On the other
hand, (\ref{fdan}), the fluctuation-dissipation relation, embodies a
relationship between the processes of fluctuation and dissipation of
anisotropy. So this completes the full circle of connections among
these processes. In a way, one can say that as a physical process,
particle production is contributing to both the noise and
dissipation, and of course these are two different manifestations of
the loss of information due to integrating over the field modes.
\section{Discussion}
In closing, we would like to discuss the meaning of the FDR in semiclassical
cosmology in a broader context and mention some related problems
for future investigation.\\
1) {\it FDR under Finite Temperature and Non-Equilibrium Conditions}
In this paper we have discussed in detail the FDR in semiclassical cosmology
under a zero temperature bath. A similar relation between the noise and
dissipation kernels exists for baths at finite temperature. The form will
be similar to that derived for the QBM problem in Sec. 2 \cite{HPZ2}.
One can take the
finite temperature calculation via the CTP formalism \cite{Paz90} and
perform a similar analysis as we have done for the vacuum case and obtain the
results explicitly. In reality both
vacuum and thermal bath results will enter into the picture,\footnote{As
has been discussed earlier \cite{ftf}, the energy density of the quantum
field at any moment will contain two parts. There is a zero temperature
component and a finite temperature component, the former corresponds to
spontaneous creation from the vacuum, and the latter is of the nature of
stimulated creation from particles already present
\cite{Par69,HuPav,HuKan,HKM}.}
since once particle creation commences, given sufficient time and assuming
some
(collisional) interaction amongst the created particles,
the bath will soon acquire a finite temperature character.\footnote{A finite
temperature bath at every moment is only an idealization.
To use a finite temperature description one has to discriminate the conditions
for the bath to thermalize, and for the system to be equilibrated with it.
These vary with the nature of the bath (massive or massless,
linear or nonlinear interactions, spectral density) and the form of interaction
between the system and the bath. See the analysis of \cite{HPZ3,Gle,Boy}}
This heat-up process is expected to happen quickly near the Planck time,
especially so for anisotropic universes, as particles are created profusely
there \cite{ZelSta,Hu74}, generating a large amount of entropy
\cite{Hu81,Hu84,HuPav,HuKan,BMP,GV}.
The copious creation of particles near the Planck time is accompanied by large
fluctuations and noise, and it induces a strong backreaction on the spacetime
dynamics, dissipating the anisotropy rapidly \cite{ZelSta,HuPar78,HarHu}.
The weaker anisotropy in the universe's expansion induces lesser particle
creation. The lower particle creation rate is accompanied
by a smaller fluctuation and noise, which in turn gives weaker dissipation
of spacetime anisotropy.
The surviving anisotropy would continue to sustain particle creation,
albeit in much smaller amounts. And this goes on.
(The backreaction follows a Lenz law behavior which was expounded
in earlier studies \cite{Par69,Hu83,Hu84}.)
At each stage we expect to see a balance between the rate of particle creation
and the strength of fluctuations and dissipation.
In reality the spacetime-field combined system involving
particle creation exists in a highly non-equilibrium state.
To give a quantitative description of the above processes one needs to
describe the dynamics of the actual statistical state of both the system and
the environment in a self-consistent manner, which is a highly non-trivial
problem. What we have described in this paper is only the first step, which
depicts the effect of particle production from a vacuum (zero-temperature)
bath.
The interaction of created particles and how they alter the environment
(e.g., thermalization) is not accounted for.
In the second step one needs to also examine the evolution of
the environment (quantum field) taking into consideration the effects of
spontaneous and induced particle creation, their interaction and the entropy
generation processes, all in the context of a changing background spacetime
whose dynamics at each moment affects and is also affected by
the activities of this environment.
Despite all these complexities, even in highly nonequilibrium conditions we
expect that a generalized FDR (in the form given in this paper)
will still hold and be useful to guide us on understanding the complex
physical processes in the system and the environment. From the above
depiction of the physical scenario and from previous studies of
the statistical mechanics of quantum field processes in cosmology,
one can see that there exists a balance between particle creation (in the
field) and its backreaction (on spacetime), which can be attributed to the
interlocked relation between fluctuations and dissipation. There is also
a mathematical justification: it is a relation between the real and
imaginary parts of the effective action for the open system.
Similar in nature to the optical theorem in scattering theory
or the Kramers-Kr\"oning relation in many body theory \cite{nfsg},
these relations describe the dissipative and
reactive parts of the response function of an open system to influences
from the environment. They are of a categorical nature because
they originate ultimately from the unitarity condition of the dynamics of
the combined closed system. They only take the form of
dissipation in the open system because we have identified a certain subsystem
as the system of interest and decided to follow its effective dyanamics;
and they take the form of fluctuations in the environment because we
refer to them in reference to the mean value of the environment variables,
the remaining information is downgraded in the form of fluctuations.
Had we decided not to coarse-grain the environment, or choose
to observe the two subsystems with equal interest and accuracy,
such a relation governing the mutual reaction would still exist,
except that the concepts of dissipation and fluctuations will no longer
be appropriate.
(Both subsystems will be governed by equations of motion in the form
of an integral differential equation, and treated in a nondiscriminate
and balanced way. See, e.g., \cite{ProjOp}).
In the context of semiclassical
cosmology, the open system is the spacetime sector,
whose dynamics is influenced by the matter fields.
The expansion of the universe amplifies the vacuum fluctuations
of the matter field into particles, which act as the source in the Einstein
equation driving the universe. The averaged effect of particles
created imparts a dissipative component in the spacetime dynamics,
and the fluctuations in particle creation constitute the noise.
The particular forms of the dissipation and noise kernels and their effects
may vary under different conditions-- zero or finite temperature,
equilibrium or non-equilibrium-- but the existence of such a relation
between the fluctuations in the matter field and
the dissipative effect on the spacetime dynamics should remain.
We will have opportunities later to explore related problems which can shed
more light on these issues.\\
2) {\it Relation with FDR in Spacetimes with Event Horizons}
As we mentioned in the Introduction, our search for a FDR in cosmological
spacetimes without event horizons was inspired by Sciama's proposal to
view the Hawking and Unruh effects as manifestations of a fluctuation-
dissipation relation between the field quanta and the detector response.
De Sitter universe is an important class of cosmological spacetimes
with event horizons. For this one can use the thermal property of the
field to perform a linear response theory (LRT) analysis for the derivation of
the FDR \cite{Mottola}. Our derivation here based on
the influence functional formalism attacks the problem at a more basic level,
where equilibrium condition between the system and the environment is
not necessarily present at every stage.
It is of interest to compare the results between
the equilibrium limit of the IF or the CTP formalisms and that of LRT.
This can be done explicitly by carrying out an analysis similar to
this paper on the de Sitter universe and see how the FDR obtained from
the IF compare with that from the LRT. Formally this would render
explicit the relation between the IF formalism to (non-equilibrium)
statistical field theory and perturbative thermal (finite-temperature)
field theory.
More meaningfully, as was
originally concieved by one of us \cite{HuEdmonton,HuPhysica}, this would
provide a channel to generalize the conventional way of treating
Hawking effect associated with black holes and accelerated observers
based on thermal propagators and event horizons to non-stationary conditions.
This involves cases like non-uniformly accelerating observers and
realistic collapse dynamics, where an event horizon or Euclidean section
does not always exist but is dynamically generated.
Our motivation for finding a way to treat these
more general conditions is to seek a deeper meaning to the Hawking effect,
and through it to explore the subtle connection between quantum field theory,
relativity theory and statistical mechanics.
In our view, the open system concept explicated by the influence functional
formalism provides a more solid basis to understand its statistical
mechanical meanings and a broader framework to tackle the less unique
situations which cannot easily be treated by purely geometric means,
powerful and elegant as they are.
It also brings the effects of quantum fields on observer kinematics
and spacetime dynamics in line with the more common statistical mechanical
phenomena involving ordinary matter.
These problems are currently under investigation.\\
3) {\it Related Problems in Semiclassical Cosmology and Inflationary Universe}
For particle creation-backreaction problems similar to the Bianchi-I model
studied here, one can obtain similar results for other matter fields in
other types of spacetimes of astrophysical or cosmological interest.
An example is a massless minimally-coupled scalar field in a
Robertson-Walker or de Sitter universe.
It mimics the linearized graviton modes and has practical use for the
description of primordial stochastic gravitons. The particle production
problem was first studied by Grishchuk \cite{Gri}, the backreaction by
Grishchuk \cite{Gri76} and Hu and Parker \cite{HuPar77} via canonical
quantization methods, and by Hartle \cite{Har81}
and Calzetta and Hu \cite{CH87} via the in-out and in-in effective action
method respectively. The influence functional approach
expounded here would enable one to get from first principle the entropy
generation from graviton production \cite{BMP,GV},
and the noise associated with them, which is related to
the fluctuations in graviton number \cite{HKM,nfsg},
On the aspect of backreaction in semiclassical cosmology,
one can also derive the Einstein-Langevin
equation for the study of graviton production and metric fluctuations.
This problem is currently pursued by Calzetta and Hu \cite{CHfluc}
A related problem of interest is the evolution of the homogeneous mode of
the inflaton which describes the inflation mechanism \cite{decinf}
and the inhomogeneous modes as progenator of structures in the early universe.
The influence functional method was used by Hu, Paz and Zhang \cite{HuBelgium}
Laflamme and Matacz \cite{LafMat} and others to discuss the
decoherence of the long-wavelength sectors of the inflaton, and
the origin of quantum fluctuations as noise for the galaxy formation problem.
Our result here provides an example for the consistent treatment of
the evolution of these modes, their intereaction, and their backreaction
on the spacetime, which can offer some physical insight into the
no-hair type of theorems in inflationary universe. These problems are
under study by Matacz, Raval and the authors.\\
4) {\it Minisuperspace in Quantum Cosmology as an Open System:
Geometrodynamic Noise and Gravitational Entropy}
We have discussed the question of the validity of
the minisuperspace approximation \cite{mss} in quantum cosmology
\cite{SinHu,Sinha,HPS}, wherein only the homogeneous cosmologies
are quantized and the inhomogeneous cosmologies ignored \cite{HuErice}.
We used an interacting quantum field model and calculated the effect of
the inhomogeneous modes on the homogeneous mode via the CTP effective action.
This effect manifests in the effective equation of motion for the system as a
dissipative term. For quantum cosmology, this backreaction
turns the Wheeler-De Witt \cite{WdW}
equation for the full superspace into an effective
equation for the minisuperspace with dissipation.
Extending the CTP to the IF formalism as is done here, one can derive
the noise associated with the truncated inhomogeneous cosmological modes.
One can also define an entropy function from the reduced density matrices,
which measures the information loss in the minisuperspace truncation.
These can perhaps be called geometrodynamic noise and gravitational entropy.
It would be interesting to compare this statistical mechanical
definition with the definition suggested by Penrose \cite{Penrose} in classical
general relativity and by one of us in the semiclassical context \cite{Hu83}.
Some initial thoughts on this problem are described in \cite{HuWaseda}, while
details are to be found in \cite{HuSinSTN}.\\
{\bf Acknowledgements} We thank Esteban Calzetta and Juan Pablo Paz
for interesting discussions. Research is supported in part by the
National Science Foundation under grant PHY91-19726.
\newpage
|
{
"redpajama_set_name": "RedPajamaArXiv"
}
| 2,515
|
Q: Why a sleep 300 (5 minutes) can last several hours some time? I have a MiniMac with the OSX system.
My script is:
while true
do echo "Sleep 300 seconds = 5 minutes"
date
sleep 300
echo "end of sleep"
date
done
I want it to repeat every 5 minutes; but some time it is suspending for several hours when it does this "sleep 300", here is the result:
Sleep 300 seconds = 5 minutes
Fri Nov 8 15:52:49 CET 2013
end of sleep
Fri Nov 8 15:57:49 CET 2013
Sleep 300 seconds = 5 minutes
Fri Nov 8 15:57:49 CET 2013
end of sleep
Fri Nov 8 16:02:49 CET 2013
Sleep 300 seconds = 5 minutes
Fri Nov 8 16:02:49 CET 2013
end of sleep
Fri Nov 8 16:20:59 CET 2013
Sleep 300 seconds = 5 minutes
Fri Nov 8 16:20:59 CET 2013
Sleep 300 seconds = 5 minutes
Fri Nov 8 15:52:49 CET 2013
end of sleep
A: This sounds like a process that either has or is having it's nice level set to a lower level. I'd confirm this with the command:
$ ps -eo "%p %y %x %c %n" | less
The last column is the nice value and should be 0 in most cases. If it's some other value between -20 (most favorable scheduling) to 19 (least) then something is setting the nice value to this different value.
Example
$ ps -eo "%p %y %x %c %n"| head -10
PID TTY TIME COMMAND NI
1 ? 00:00:01 init 0
2 ? 00:00:00 kthreadd 0
3 ? 00:00:02 ksoftirqd/0 0
4 ? 00:00:03 migration/0 -
5 ? 00:00:00 watchdog/0 -
15 ? 00:00:06 events/0 0
19 ? 00:00:00 cpuset 0
20 ? 00:00:00 khelper 0
21 ? 00:00:00 netns 0
Other things
*
*Something else that @derobert's pointed out. The time is skewed strangely in some of your output. Might be something is wrong with your clock.
Specifically this block:
Fri Nov 8 16:20:59 CET 2013
Sleep 300 seconds = 5 minutes
Fri Nov 8 15:52:49 CET 2013
end of sleep
Looks like we went back in time here!
*Several people in comments have indicated that your system may have gone to sleep or may have hibernated. This idea would seem to be the best lead, since sleep typically uses little CPU time, as indicated by @Gilles in my answer's comments, so would be typically unaffected by the nice level being changed.
|
{
"redpajama_set_name": "RedPajamaStackExchange"
}
| 311
|
Q: Multi-site deployment using git and a CI Currently, I'm using github to host my code repo and then pushing updates to my sites via copy and pasting files onto the server via FTP. However, the host I'm using allows ssh access there must be an easier way to do this.
What I'm looking to do is the following:
*
*Set up a Jenkins (a CI) that checks all my code before deploying it live.
*Be able to deploy from a single repo to multiple sites.. BUT each site has one or two unique files in them (such as a view with a Google Analytics code in them).
From my Google-ing so far I can either deploy via GitHub's webhooks that they offer or doing it through Capistrano.
So, my question is what is the best way to go about setting everything up?
NOTE: I'm still a programming n00b so mind anything that I haven't taken into consideration while asking the question
A: Within your repository, you could have two root level folders. One for the site and one to contain site specific files. For each site, create a Jenkins build configuration to perform the following:
*
*Checkout code of your git repository
*Perform any build actions
*Copy site files across to production
*Copy site specific files to production
A: You can use a local repository that has a clean script which will change the settings in those specific files as you want when checking out a version.
This is covered in the git attributes chapter in the keyword expansion section of the Pro Git book:
http://git-scm.com/book/en/Customizing-Git-Git-Attributes
A: You might find it simpler to just use git-ftp for uploading your changes. This script stores the name of the last uploaded commit on the server in a special file, and when you re-upload, it sends only the files which have been changed since the state which has been uploaded last. Things like file/directory renames/deletions are handled properly as well. In our setup, we found this script easier to use than rolling some higher-profile solutions.
|
{
"redpajama_set_name": "RedPajamaStackExchange"
}
| 5,484
|
Q: the deployment of react app based on webpack I wanna deploy my react app with webpack, and i have got the pack file, which is bundle.js, and set up nodejs and npm on the server. But I dont know what position I can put bundle.js on the remote server. anyone?
thanks in advance
A: I assume that by position you mean location on the server. It really depends on your configuration - you should somehow be able to achieve that the whole build folder is served by a webserver on your server. Check https://medium.freecodecamp.org/how-to-make-create-react-app-work-with-a-node-backend-api-7c5c48acb1b0 (section "Production deployment to heroku") for a sample configuration using the expressJS framework on nodeJS.
Or, since you only want to serve static files, you could also do npm -g install serve and serve -s path/to/your/build/dir
|
{
"redpajama_set_name": "RedPajamaStackExchange"
}
| 7,250
|
{"url":"http:\/\/mathhelpforum.com\/algebra\/1081-math-profit-question.html","text":"1. ## Math profit question\n\nMy question is:\n\nA 135-kg steer gains 3.5kg\/day and costs 80cents\/day to keep. The market price for beef cattle is $1.65\/kg, but the price falls by 1cent\/day. When should the steer be sold to maximize profit. help is greatly appreciated the answer is susposed to be 52 days, but i can't figure out how to get that. 2. Profit = Income minus Expenses Income = (Total weight of steer, in kg) times (unit price, in$\/kg)\nLet x = number of days from now when the steer is sold -------------------***\nThe total weight after x days = (135 +3.5*x) kg\nThe unit price per kg, after x days = $1.65 -$0.01*x = (1.65 -0.01x) dollars\n\nThe expenses after x days = \\$0.80*x = 0.80x dollars\n\nSo,\nProfit = Income minus expenses\nP = (135 +3.5x)(1.65 -0.01x) -0.80x\nP = (135*1.65 -135*0.01x +3.5x*1.65 -3.5x*0.01x) -0.80x\nP = 222.75 -1.35x +5.775x -0.035x^2 -0.80x\nP = 222.75 +3.625x -0.035x^2 ---------------(i)\n\nNow here, we can solve for maximum P by\na) using the properties of a parabola (because Eq.(i) is a vertical parabola that opens downward and so its vertex is its highest point which gives the maximum P.)\nor,b) using Calculus. P is maximum or minimum when dP\/dx = 0.\n\nLet me assume you know Calculus, so,\nDifferentiate both sides of (i) with respect to x,\ndP\/dx = 3.625 -(0.035)[2x]\ndP\/dx = 3.625 -0.070x\nSet that to zero,\n0 = 3.3625 -0.07x\n0.07x = 3.625\nx = 3.625\/0.07\nx = 51.7875\nor, x = 52 days ---------answer.","date":"2018-04-22 13:10:00","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 1, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 0, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.38297733664512634, \"perplexity\": 10766.536869896034}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2018-17\/segments\/1524125945596.11\/warc\/CC-MAIN-20180422115536-20180422135536-00534.warc.gz\"}"}
| null | null |
\subsection{Best Infilling Token}\label{sec:infilling}
Given a target model $\mathcal{F}$ and the label $y$ of sequence $\mathbf{x}$, this subsection details how to select the best infilling token $x^*$ from the vocabulary $\mathbb{V}$. Take \textbf{Replace} as an example, we define an importance score of the perturbation $\mathcal{R}(\mathbf{x}, \widetilde{x}, i)$:
\begin{align*}
\mathcal{Q}(\mathcal{R}, \mathbf{x}, \widetilde{x}, i) = \mathcal{P_F} (y | \mathbf{x}) - \mathcal{P_F} (y | \mathcal{R}(\mathbf{x}, \widetilde{x}, i)).
\end{align*}
$\mathcal{P_F}$ denotes the output probability of the target model $\mathcal{F}$ and $x\in\mathbb{V}$. Higher $\mathcal{Q}$ indicates $\mathcal{R}(\mathbf{x}, \widetilde{x}, i)$ causes more confuses on the correct prediction. CLARE\xspace selects the token $\widetilde{x}$ that can maximally confuses the $\mathcal{F}$:
\begin{equation}
x^* = \operatorname*{arg\,max}_{\widetilde{x} \in \mathbb{V}} \mathcal{Q}(\mathcal{R}, \mathbf{x}, \widetilde{x}, i). \label{eq:scores}
\end{equation}
The best attack sequence perturbed by \textbf{Replace} at index $i$ is $\mathcal{R}(\mathbf{x}, x^*, i)$. Similarly, we can find the attack sequences $\mathcal{I}(\mathbf{x}, x^*, i), \mathcal{M}(\mathbf{x}, x^*, i)$ for \textbf{Insert}, \textbf{Merge}, respectively. The corresponding important scores of the best attack sequence with each type of perturbation are $\mathcal{Q}(\mathcal{R}, \mathbf{x}, x^*, i), \mathcal{Q}(\mathcal{I}, \mathbf{x}, x^*, i)$ and $\mathcal{Q}(\mathcal{M}, \mathbf{x}, x^*, i)$, respectively.
The computational cost of Equation~\eqref{eq:scores} is proportional to the size of vocabulary $\mathbb{V}$. To accelerate the computation and keep the tokens which are compatible to the context, we set two constraints on the token in vocabulary $\mathbb{V}$:
\emph{(1). Language Model Score.} The probability of token $\widetilde{x} \in \mathbb{V}$ predicted by masked language model must be large than a threshold $p$. Pretrained on large-scale natural languages with contextualized representations, $\mathcal{G}$ grants a higher probability to the token which is more compatible into the context, e.g., same semantic meaning and grammatical tokens. Thus, $p$ implicitly sustains correct semantic meaning, grammar and reasonable fluency.\footnote{A high $p$ will filter many compatible tokens and undermine the attacking efficiency. A low $p$ will fail to prevent unsuitable tokens resulting in ungrammatical and unfluent sequence. We empirically set $p$ to $5e^{-3}$ in the experiment.}
\emph{(2). Local Semantic Similarity.} Infilling tokens $\widetilde{x} \in \mathbb{V}$ are expected to sustain enough semantic similarity with replaced tokens or surrounding contexts. The local semantic similarity between the original sequence and the infilled sequence at the perturbation location $i$ must be large than a threshold $s$, which further constrains the semantic meaning of the infilling word $\widetilde{x}$, e.g., filtering antonyms.\footnote{
Following~\citet{jin2019bert}, we use the universal sentence encoder~\citep{cer2018universal} to measure semantic similarity, where $s$ is set to $0.7$ in the experiments.}
Both $p$ and $s$ are empirical parameters. Since the probability and semantic similarity are variant based on different contexts, the vocabulary $\mathbb{V}$ is depended on perturbations and inputs dynamically.
\end{comment}
aims to improve the robustness of the victim model by including the generated adversarial examples into the clean training set. We investigate the effect of contextualized adversarial examples on training BERT model (117M) and TextCNN (6M;~\citealp{kim2014convolutional}) to test the versatility of the attack. BERT and TextCNN are first trained on a full training set and 10\% training set, respectively. For each victim model and its training set, CLARE\xspace generates the corresponding adversaries for further adversarial training. Table~\ref{tab:adv_train} shows the results.
On BERT model, we find the adversarial examples maintain comparable clean accuracy while significantly improve the defence ability of the victim model, evidenced by lower attack success rate ($-23.2\%$) and more modifications ($+2.7\%$). This is consistent with the observations from~\citet{jia2019certified}.
On a small model which is easily trained to overfit limited data, we observe that the adversarial examples boost the clean accuracy by 1.4\%. The results show that the contextualized adversarial examples can serve as augmented data to improve robustness and generalization.
\section{Problem Definition}
This section briefly reviews textual adversarial example generation,
and lays out necessary notations for following sections.
Let $\mathcal{F}: \mathcal{X}\rightarrow \mathcal{Y}$ be a learned text classification model,
where $\mathcal{X}$ denotes the input sequence space and $\mathcal{Y}$
the output label space.\footnote{
Nothing prohibits generating adversarial examples
for other machine learning scenario such as regression.
This work focuses on the text classification setting.
}
Given an input sequence $\mathbf{x}=w_1w_2\dots w_n$ and its label $y$,
assume $\mathcal{F}(\mathbf{x})=y$,
an adversarial example $\mathbf{x}^\prime$ modifies $\mathbf{x}$ and is supposed to trigger an error by
the machine learning model:
$\mathcal{F}(\mathbf{x}^\prime) \neq\mathcal{F}(\mathbf{x})$.
At the same time, the textual modification to $\mathbf{x}$ should be minimum,
such that $\mathbf{x}^\prime$ is close to $\mathbf{x}$
and the human predictions stay the same.\footnote{
In computer vision applications,
minor perturbations to continuous pixels can be barely perceptible to humans, and thus
one can hardly distinguish $\mathbf{x}$ and $\mathbf{x}^\prime$~\citep{goodfellow2014explaining}.
It is not the case for text, however, since
changes to the discrete tokens are more likely to be noticed by humans.}
This is achieved by requiring the distance between
$\mathbf{x}^\prime$ and $\mathbf{x}$ is within a
threshold: $\mathcal{D}(\mathbf{x}^\prime,\mathbf{x}){<}\epsilon$.
\end{comment}
\section{Conclusion}
We have presented CLARE\xspace, a contextualized adversarial example generation model for text.
It uses contextualized knowledge from pretrained masked language models,
and can generate adversarial examples that are natural, fluent and grammatical.
With three contextualized perturbation patterns, \emph{Replace}\xspace, \emph{Insert}\xspace and \emph{Merge}\xspace in our arsenal, CLARE\xspace can produce outputs of varied lengths and achieves a higher attack success rate than baselines and with fewer edits. Human evaluation shows significant advantages of CLARE\xspace in terms of textual similarity, fluency and grammaticality.
We release our code and models at \url{https://github.com/cookielee77/CLARE}.
\bibliographystyle{acl_natbib}
\section{Analysis}
This section first conducts an ablation study~(\S\ref{ana:abl}).
We then explore CLARE\xspace's potential to be used to improve downstream models' robustness and accuracy in
\S\ref{ana:adv_training}.
In \S\ref{ana:pos}, we empirically observe that CLARE\xspace tends to attack noun and noun phrases.
\subsection{Ablation Study} \label{ana:abl}
\begin{table}[t]
\centering
\setlength{\tabcolsep}{4.5pt}
\small{
\begin{tabular}{@{} l@{\hskip 0.1mm}rrrrr @{}}
\toprule
\textbf{Module} &
\textbf{A-rate}$\uparrow$ & \textbf{Mod}$\downarrow$ & \textbf{PPL}$\downarrow$ & \textbf{GErr}$\downarrow$ & \textbf{Sim}$\uparrow$ \\
\midrule
TextFooler & 56.1 & 23.3 & 331.3 & 1.43 & 0.69 \\
\textsc{Clare} & 65.3 & 5.9 & 82.3 & 0.15 & 0.76 \\
\midrule
\textsc{ReplaceOnly} & 58.8 & 7.9 & 85.6 & 0.11 & 0.75 \\
\textsc{InsertOnly} & 59.4 & 6.9 & 94.8 & 0.20 & 0.76 \\
\textsc{MergeOnly}& 21.0 & 6.2 & 95.2 & 0.01 & 0.79 \\
\midrule
\emph{w/o} $\operatorname{sim} > \ell$ & 70.0 & 5.4 & 80.9 & 0.11 & 0.72 \\
\emph{w/o} $p_{\text{MLM}} > k$ & 89.5 & 5.1 & 194.1 & 0.94 & 0.64
\\\bottomrule
\end{tabular}
}
\caption{Ablation study results. ``\emph{w/o} $\operatorname{sim} > \ell$'' ablates the textual similarity constraint when constructing the candidate sets, while
``\emph{w/o} $p_{\text{MLM}} > k$'' ablates the masked language model probability constraint.}
\label{tab:abl}
\end{table}
\begin{table}[t]
\centering
\setlength{\tabcolsep}{4.5pt}
\small{
\begin{tabular}{@{} l@{\hskip 0.1mm}rrrrr @{}}
\toprule
\textbf{MLM} &
\textbf{A-rate}$\uparrow$ & \textbf{Mod}$\downarrow$ & \textbf{PPL}$\downarrow$ & \textbf{GErr}$\downarrow$ & \textbf{Sim}$\uparrow$ \\
\midrule
$\text{RoBERTa}_{\text{distill}}$ & 65.3 & 5.9 & 82.3 & 0.15 & 0.76 \\
$\text{RoBERTa}_{\text{base}}$ & 64.9 & 5.8 & 81.3 & 0.11 & 0.76 \\
$\text{BERT}_{\text{base}}$ & 63.9 & 6.4 & 95.7 & 0.96 & 0.74
\\\bottomrule
\end{tabular}
}
\caption{Results of CLARE\xspace implemented with different masked language models (MLM).}
\label{tab:abl_mlm}
\end{table}
We ablate each component of CLARE\xspace to study its effectiveness.
We evaluate on the 1,000 randomly selected AG news instances~(\S\ref{sec:data}).
The results are summarized in Table~\ref{tab:abl}.
We first investigate the performance of three perturbations when applied individually.
Among three editing strategies, using \textsc{InsertOnly} achieves the best performance,
with \textsc{ReplaceOnly} coming in a close second.
\textsc{MergeOnly} underperforms the other two, partly due to that the attacks are restricted to bigram noun phrases~(\S\ref{sec:setup}).
Combining all three perturbations, CLARE\xspace achieves the best performance with the least modifications.
To examine the effect of contextualized infilling, we compare \textsc{ReplaceOnly} against TextFooler,
a context-agnostic model based on token replacement.
\textsc{ReplaceOnly} outperforms TextFooler across the board,
suggesting that contextualized infilling helps generate better adversarial examples.
We now turn to the two constraints imposed when constructing the candidate token set.
Perhaps not surprisingly, ablating the textual similarity constraint (\emph{w/o} $\operatorname{sim}$)
decreases the textual similarity performance, but increases others.
Ablating the masked language model yields a better success rate, but much worse perplexity, grammaticality, and textual similarity.
Finally, we compare CLARE\xspace implemented with different masked language models. Table~\ref{tab:abl_mlm} summarizes the results.
Overall, distilled RoBERTa performs the best, and BERT underperforms the others.
Since the victim model is based on BERT, we conjecture that it is less efficient to attack a model using its own information.
\subsection{Adversarial Training} \label{ana:adv_training}
This section explores CLARE\xspace's potential in improving downstream models' accuracy and robustness.
Following the adversarial training setup~\citep{tsipras2018robustness},
we use CLARE\xspace to generate adversarial examples for AG news training instances,
and include them as additional training data.
We consider two settings:
training with (1) full training data and full adversarial data
and (2) 10\% randomly-sampled training data and its adversarial data, to simulate the low-resource scenario.
For both settings, we compare a BERT-based MLP classifier
and a TextCNN (\citealp{kim2014convolutional}) classifier without any pretrained embedding.
We first examine whether adversarial examples,
as data augmentation, can help achieve better test accuracy.
As shown in Table~\ref{tab:adv_train},
when the full training data is available,
adversarial training slightly \emph{decreases} the test accuracy by 0.2\% and 0.4\% respectively.
This aligns with previous observations~\citep{jia2019certified}.
When less training data is available,
the BERT-based classifier has a similar accuracy drop.
Interestingly, under the low-data scenario,
TextCNN with adversarial training achieves better accuracy, with a 1.4\% absolute improvement.
This suggests that a model with less capacity can benefit more from silver data.
Does adversarial training help the models defend against adversarial attacks?
To evaluate this, we use CLARE\xspace to attack the classifiers trained with and without adversarial examples.\footnote{
In preliminary experiments, we found that
it is more difficult to use other models to attack a victim model trained with the adversarial examples generated by CLARE\xspace,
than to use CLARE\xspace itself.
}
A higher success rate and fewer modifications indicate a victim classifier is more vulnerable to adversarial attacks.
As shown in Table~\ref{tab:adv_train},
in 3 out of the 4 cases,
adversarial training helps to decrease the attack success rate by more than 10.2\%,
and to increase the number of modifications needed by more than 0.7.
The only exception is the TextCNN model trained with 10\% data.
A possible reason could be that it is trained with few data and thus generalizes less well.
These results suggest that CLARE\xspace can be used to improve downstream models' robustness,
with a negligible accuracy drop.
\begin{table}[t]
\centering
\small{
\begin{tabular}{@{} lrrr @{}}
\toprule
\textbf{Victim Model} &
\textbf{Acc} & \textbf{A-rate} & \textbf{Mod}
\\\midrule
BERT (100\% data) & 95.0 & 65.3 & 5.9 \\
\quad+ 100\% adversarial & -0.2 & -23.4 & +2.7 \\
\midrule
TextCNN (100\% data) & 91.2 & 93.8 & 6.5 \\
\quad+ 100\% adversarial & -0.4 & -10.2 & +0.7\\
\midrule
\midrule
BERT (10\% data) & 92.5 & 84.0 & 5.4 \\
\quad+ 10\% adversarial & -0.2 & -14.4 & +1.6 \\
\midrule
TextCNN (10\% data) & 83.6 & 97.3 & 6.2 \\
\quad+ 10\% adversarial & +1.4 & -3.7 & +0.3
\\\bottomrule
\end{tabular}
}
\caption{Adversarial training results on AG news test set. ``Acc'' indicates accuracy.}
\label{tab:adv_train}
\end{table}
\begin{table}[t]
\centering
\setlength{\tabcolsep}{0.0pt}
\small{
\begin{tabular}{@{} lll @{}}
\toprule
\begin{minipage}{0.24\linewidth}
\textbf{\emph{Replace}\xspace}
\end{minipage} &
\begin{minipage}{0.39\linewidth}
\textbf{\emph{Insert}\xspace}
\end{minipage} &
\begin{minipage}{0.36\linewidth}
\textbf{\emph{Merge}\xspace}
\end{minipage}
\\\midrule
\begin{minipage}{0.24\linewidth}
\emph{NOUN: 64\%\\ADJ: 17\%\\VERB: 7\%}
\end{minipage}
&
\begin{minipage}{0.39\linewidth}
\emph{(NOUN, NOUN): 12\%\\
(ADJ, NOUN): 10\%\\
(NOUN, VERB): 9\%}
\end{minipage}
&
\begin{minipage}{0.36\linewidth}
\emph{ADJ-NOUN: 31\%\\
NOUN-NOUN: 22\%\\
DT-NOUN: 12\%}
\end{minipage}
\\\midrule
\multicolumn{3}{l}{
\begin{minipage}{1\linewidth}
\textbf{Context:} ... Amit Yoran, the government's \textsl{cybersecurity} chief, abruptly resigned yesterday after a year ...
\end{minipage}
}\\\noalign{\smallskip}
\multicolumn{3}{l}{
\begin{minipage}{1\linewidth}
\textbf{Replace}: \underline{cybersecurity} $\leftarrow$ \emph{\{security, surveillance, cryptography, intelligence, encryption ...\}}
\end{minipage}
}\\\noalign{\smallskip}
\multicolumn{3}{l}{
\begin{minipage}{1\linewidth}
\textbf{Insert}: cybersecurity \underline{\hskip 5mm} chief $\leftarrow$ \emph{\{technology, defense, intelligence, program, project ...\}}
\end{minipage}
}\\\noalign{\smallskip}
\multicolumn{3}{l}{
\begin{minipage}{1\linewidth}
\textbf{Merge}: \underline{cybersecurity chief} $\leftarrow$ \emph{\{chief, consultant, administrator, scientist, secretary ...\}}
\end{minipage}
}\\\bottomrule
\end{tabular}
}
\caption{\textbf{Top}: Top-3 POS tags (or POS tag bigrams) and their percentages for each perturbation type.
$(a,b)$: insert a token between $a$ and $b$.
$a$-$b$: merge $a$ and $b$ into a token.
\textbf{Bottom}: An AG news sample,
where CLARE\xspace perturbs token ``\textsl{cybersecurity}.''
Neither PWWS nor TextFooler is able to attack this token since it is out of their vocabularies.}
\label{tab:perturb_stats}
\end{table}
\subsection{Perturbations by Part-of-speech Tags}\label{ana:pos}
In this section, we break down the adversarial attacks by part-of-speech (POS) tags.
We find that most of the adversarial attacks happen to nouns or noun phrases.
As shown in Table~\ref{tab:perturb_stats}, 64\% of the \emph{Replace}\xspace actions are applied to nouns.
\emph{Insert}\xspace actions tend to insert tokens into noun phrase bigram: two of the most frequent POS bigrams are noun phrases.
In fact, around 48\% of the \emph{Insert}\xspace actions are applied to noun phrases.
This also justifies our choice of only applying \emph{Merge}\xspace to noun phrases.
\begin{table}[t]
\small
\begin{tabular}{@{} ll @{}}
\noalign{\smallskip}\Xhline{3\arrayrulewidth}\noalign{\smallskip}
\begin{minipage}{0.5in}
\textbf{AG} \\
(Sci\&Tech)
\end{minipage}
&
\begin{minipage}{2.35in}
Sprint Corp. is in talks with Qualcomm Inc. about using a network the chipmaker is building to deliver live television to Sprint mobile phone customers.
\end{minipage}
\\\noalign{\smallskip}\hdashline\noalign{\smallskip}
\begin{minipage}{0.5in}
TextFooler\\
(Business)
\end{minipage}
&
\begin{minipage}{2.35in}
Sprint \replacecolor{Corps}. is in talks with Qualcomm Inc. about \replacecolor{operated} a network the chipmaker is \replacecolor{consolidation} to \replacecolor{doing} \replacecolor{viva} television to Sprint mobile phone customers.
\end{minipage}
\\\noalign{\smallskip}\hdashline\noalign{\smallskip}
\begin{minipage}{0.5in}
\textsc{Clare}\\
(Business)
\end{minipage}
&
\begin{minipage}{2.35in}
Sprint Corp. is in talks with Qualcomm Inc. about using a network \mergecolor{Qualcomm} is building to deliver \replacecolor{cable} television to Sprint mobile phone customers.
\end{minipage}
\\\noalign{\smallskip}\Xhline{3\arrayrulewidth}\noalign{\smallskip}
\begin{minipage}{0.5in}
\textbf{MNLI} \\
(Neutral)
\end{minipage}
&
\begin{minipage}{2.35in}
\emph{Premise}: Let me try it. She began snapping her fingers and saying the word eagerly, but nothing happened.\\
\emph{Hypothesis}: She became frustrated when the spell didn't work.
\end{minipage}
\\\noalign{\smallskip}\hdashline\noalign{\smallskip}
\begin{minipage}{0.5in}
TextFooler\\
(Contra-\\\phantom{$^\dagger$}diction)
\end{minipage}
&
\begin{minipage}{2.35in}
\emph{Premise}: \replacecolor{Authorisation} me \replacecolor{attempting} it. She \replacecolor{triggered} \replacecolor{flapping} her \replacecolor{pinkies} and \replacecolor{said} the word eagerly, but nothing \replacecolor{arisen}.\\
\emph{Hypothesis}: She became frustrated when the spell didn't work.
\end{minipage}
\\\noalign{\smallskip}\hdashline\noalign{\smallskip}
\begin{minipage}{0.5in}
\textsc{Clare}\\
(Contra-\\\phantom{$^\dagger$}diction)
\end{minipage}
&
\begin{minipage}{2.35in}
\emph{Premise}: Let me try it. She began snapping her fingers and saying the word eagerly, but nothing \insertcolor{unexpected} happened.\\
\emph{Hypothesis}: She became frustrated when the spell didn't work.
\end{minipage}
\\\noalign{\smallskip}\Xhline{3\arrayrulewidth}\noalign{\smallskip}
\end{tabular}
\caption{Adversarial examples produced by different models. The gold label of the original is shown below the (bolded) dataset name. \replacecolor{\textbf{Replace}}, \insertcolor{\textbf{Insert}} and \mergecolor{\textbf{Merge}} are highlighted in \replacecolor{italic red}, \insertcolor{bold blue} and \mergecolor{sans serif yellow}, respectively. (Best viewed in color).}
\label{tab:samples}
\end{table}
\section{Appendix}
\subsection{Additional Experiment Details}\label{sec:app_details}
\paragraph{Model Implementation.}
All pretrained models and victim models based on RoBERTa and BERT$_{\text{base}}$ are implemented with Hugging Face transformers\footnote{\url{https://github.com/huggingface/transformers}}~\citep{Wolf2019HuggingFacesTS} based on PyTorch~\citep{paszke2019pytorch}. RoBERTa$_{\text{distill}}$, RoBERTa$_{\text{base}}$ and uncase BERT$_{\text{base}}$ models have 82M, 125M and 110M parameters, respectively. We use $\text{RoBERTa}_{\text{distill}}$ as our main backbone for fast inference purpose.
PWWS\footnote{\url{https://github.com/JHL-HUST/PWWS/}} and TextFooler\footnote{\url{https://github.com/jind11/TextFooler}} are built with their open source implementation provided by the authors. In the implementation of TextFooler+LM, we use small sized GPT-2 language model~\citep{radford2019language} to further select those candidate tokens that have top $20\%$ perplexity in the candidate token set. In the adversarial training (\secref{ana:adv_training}), the small TextCNN victim model~\citep{kim2014convolutional} has 128 embedding size and $100$ filters for $3, 4, 5$ window size with $0.5$ dropout, resulting in 7M parameters.
During the implementation of \emph{w/o} $p_{\text{MLM}} > k$ in the ablation study (\secref{ana:abl}), we randomly sample 200 tokens and then apply the similarity constraint to construct candidate set, as exhausting the vocabulary is computationally expensive.
\paragraph{Evaluation Metric.}
The similarity function $\operatorname{sim}$ builds on the universal sentence encoder (USE;~\citealp{cer2018universal}) to measure a \emph{local} similarity at the perturbation position with window size 15 between the original input and its adversary. \emph{All baselines} are equipped this $\operatorname{sim}$ when constructing the candidate vocabulary. The evaluation metric \textbf{Sim} uses USE to calculate a \emph{global} similarity between two texts. These procedures are typically following~\citet{jin2019bert}. We mostly rely on human evaluation (\secref{sec:exp_res}) to conclude the significant advantage of preserving textual similarity on CLARE\xspace compared with TextFooler.
\paragraph{Data Processing.}
When processing the data, we keep all punctuation in texts for both victim model training and attacking. Since GLUE benchmark~\citep{wang2019glue} does not provide the label for test set, we instead use its dev set as the the test set for the included datasets (MNLI, QNLI, QQP, MRPC, SST-2) in the evaluation. For the sentence-pair tasks (e.g., MNLI, QNLI, QQP, MRPC), we attack the longer one excluding the tokens appearing in both sentences. This is because inference tasks usually require entailed data to have the same keywords, e.g., numbers, name entities, etc. All experiments are conducted on one Nvidia GTX 1080Ti GPU.
\subsection{Additional Results}\label{sec:app_res}
We include the results of DBpedia ontology dataset (\textbf{DBpedia};~\citealp{zhang2015character},
Stanford sentiment treebank (\textbf{SST-2};~\citealp{socher2013recursive}),
Microsoft Research Paraphrase Corpus (\textbf{MRPC};~\citealp{dolan2005automatically}), and Quora Question Pairs (\textbf{QQP}) from the GLUE benchmark in this section. Table~\ref{tab:app_dataset} summarizes come statistics of these datasets.
The results of different models on these datasets are summarized Table~\ref{tab:app_res}. Compared with all baselines, CLARE\xspace achieves the best performance on attack success rate, perplexity, grammaticality, and similarity. It is consistent with our observation in \secref{sec:exp_res}.
\begin{table}[t]
\centering
\setlength{\tabcolsep}{4.0pt}
\small{
\begin{tabular}{@{} lccrrr @{}}
\toprule
\textbf{Dataset} & \textbf{Avg. Length} & \textbf{\# Classes} &
\textbf{Train} & \textbf{Test} & \textbf{Acc}
\\\midrule
SST-2 & 10 & 2 & 67K & 0.9K & 92.3\% \\
DBpedia & 55 & 14 & 560K & 70K & 99.3\% \\
\midrule
QQP & 13/13 & 2 & 363K & 40K & 91.4\%\\
MRPC & 23/23 & 2 & 3.6K & 1.7K & 81.4\%
\\\bottomrule
\end{tabular}
}
\caption{Some statistics of datasets.
The last column indicates the victim model's accuracy on the original test set \emph{without} adversarial attack.}
\label{tab:app_dataset}
\end{table}
\begin{table*}[t]
\centering
\setlength{\tabcolsep}{6pt}
\small{
\begin{tabular}{@{} l rrrrr m{3pt} rrrrr @{}}
\toprule
{} & \multicolumn{5}{c}{SST-2 (PPL = 99.5)} && \multicolumn{5}{c}{DBpedia (PPL = 37.3)}
\\\midrule
\textbf{Model} &
\textbf{A-rate}$\uparrow$ & \textbf{Mod}$\downarrow$ & \textbf{PPL}$\downarrow$ & \textbf{GErr}$\downarrow$ & \textbf{Sim}$\uparrow$ & &
\textbf{A-rate}$\uparrow$ & \textbf{Mod}$\downarrow$ & \textbf{PPL}$\downarrow$ & \textbf{GErr}$\downarrow$ & \textbf{Sim}$\uparrow$
\\\midrule
PWWS &
31.4 & 9.93 & 168.3 & 0.31 & 0.62 &&
7.6 & 8.3 & 57.6 & 0.54 & 0.68
\\
TextFooler &
89.8 & 14.9 & 227.7 & 0.53 & 0.69 &&
56.2 & 24.9 & 182.5 & 1.88 & 0.68
\\
\quad + LM &
51.7 & 18.3 & 137.5 & 0.50 & 0.69 &&
20.1 & 22.4 & 84.0 & 1.22 & 0.70
\\
\textsc{Clare} &
\textbf{97.8} & \textbf{7.5} & \textbf{137.4} & \textbf{0.01} & \textbf{0.75} &&
\textbf{65.8} & \textbf{7.02} & \textbf{53.3} & \textbf{-0.03} & \textbf{0.73}
\\\midrule\midrule
{} & \multicolumn{5}{c}{QQP (PPL = 56.2)} && \multicolumn{5}{c}{MRPC (PPL = 42.9)}
\\\midrule
\textbf{Model} &
\textbf{A-rate}$\uparrow$ & \textbf{Mod}$\downarrow$ & \textbf{PPL}$\downarrow$ & \textbf{GErr}$\downarrow$ & \textbf{Sim}$\uparrow$ & &
\textbf{A-rate}$\uparrow$ & \textbf{Mod}$\downarrow$ & \textbf{PPL}$\downarrow$ & \textbf{GErr}$\downarrow$ & \textbf{Sim}$\uparrow$
\\\midrule
PWWS &
6.0 & \textbf{7.8} & 86.5 & 0.31 & 0.69 &&
5.8 & \textbf{6.5} & 82.6 & 0.31 & 0.68
\\
TextFooler &
16.2 & 12.7 & 145.2 & 0.61 & 0.74 &&
24.5 & 10.6 & 118.8 & 0.35 & 0.75
\\
\quad + LM &
7.8 & 12.9 & 78.8 & 0.21 & 0.77 &&
12.9 & 9.5 & 71.0 & 0.29 & 0.79
\\
\textsc{Clare} &
\textbf{27.7} & 10.2 & \textbf{74.8} & \textbf{0.14} & \textbf{0.76} &&
\textbf{34.8} & 9.1 & \textbf{69.5} & \textbf{0.02} & \textbf{0.83}
\\\bottomrule
\end{tabular}
}
\caption{Adversarial example generation performance in
attack success rate (A-rate),
modification rate (Mod),
perplexity (PPL),
number of increased grammar errors (GErr),
and text similarity (Sim).
The perplexity of the original inputs is indicated in parentheses for each dataset.
Bold indicates the best performance on each metric.}
\label{tab:app_res}
\end{table*}
\begin{table}[t]
\centering
\small{
\begin{tabular}{@{} lrrr @{}}
\toprule
\textbf{Model} &
\textbf{A-rate (\%)} & \textbf{Mod} (\%) & \textbf{Speed} (sample/s)
\\\midrule
TextFooler & 56.1 & 23.3 & 0.39 \\
\textsc{Clare} & 65.3 & 5.9 & 0.11
\\\bottomrule
\end{tabular}
}
\caption{Speed experiment with different attack models.}
\label{tab:app_time}
\end{table}
\subsection{Running Time}
We conduct speed experiment with one Nvidia GTX 1080Ti GPU in Table~\ref{tab:app_time}. By searching more possible perturbation actions and constructing the contextualized candidate vocabulary, CLARE\xspace achieves better performance on attack success and modification rate with a cost of inference speed (0.11 vs 0.39 sample/s).
\subsection{Human Evaluation Details}\label{sec:app_human_eval}
For each human evaluation on \textbf{AG News} dataset, we randomly sampled 300 sentences from the test set combining the corresponding adversarial examples from CLARE\xspace and TextFooler (We only consider sentences can be attacked by both models).
In order to make the task less abstract, we pair the adversarial examples by the two models, and present them to the participants along with the original input and its gold label.
We ask them which one they prefer in terms of
(1) having more similar a meaning to the original input (similarity),
and (2) being more fluent and grammatical (fluency and grammaticality).
We also provide them with a
neutral option, when the participants consider the two indistinguishable.
Additionally, we ask the participants to annotate the adversarial examples,
and compare their annotations against the gold labels (label consistency).
Higher label consistency indicates the model is better at causing the victim model to make errors while preserving human predictions.
Each pair of system outputs was randomly presented to 5 crowd-sourced judges, who indicated their preference for similarity, fluency, and grammaticality using the form shown in Figure~\ref{fig:app_human_compare}. The labelling task is illustrated in Figure~\ref{fig:app_human_label}. To minimize the impact of spamming, we employed the top-ranked 30\% of U.S. workers provided by the crowd-sourcing service. Detailed task descriptions and examples were also provided to guide the judges. We calculate $p$-value based on 95\% confidence intervals by using 10K paired bootstrap replications, implemented using the R Boot statistical package.
\subsection{Qualitative Samples}\label{sec:app_samples}
We include generated adversarial examples by CLARE\xspace and TextFooler on \textbf{AG News}, \textbf{DBpeida}, \textbf{Yelp}, \textbf{MNLI}, and \textbf{QNLI} datasets in Table~\ref{tab:app_sample1} and Table~\ref{tab:app_sample2}.
\input{text/samples}
\clearpage
\newpage
\begin{figure*}[t]
\centering
\includegraphics[width=1.0\linewidth]{./figure/ComparisonWithRefPlusFluency.pdf}
\caption{Pair-wise comparison in terms of text similarity and fluency \& grammaticality on human evaluation.}
\label{fig:app_human_compare}
\end{figure*}
\begin{figure*}[t]
\centering
\includegraphics[width=1.0\linewidth]{./figure/LabelConsistencyScreenshot.pdf}
\caption{Label consistency task on human evaluation.}
\label{fig:app_human_label}
\end{figure*}
\section{Experiments}
We evaluate CLARE\xspace on text classification, natural language inference, and sentence paraphrase tasks. We begin by describing the implementation details of CLARE\xspace and the baselines~(\S\ref{sec:setup}).
\S\ref{sec:data} introduces the datasets we experiment with and the evaluation metrics;
the results are summarized in \S\ref{sec:exp_res}.
\subsection{Setup}\label{sec:setup}
\begin{compactitem}
\item We experiment with a distilled version of RoBERTa (RoBERTa$_{\text{distill}}$; \citealp{sanh2019distilbert}) as the masked language model for contextualized infilling.
We also compare to base sized RoBERTa (RoBERTa$_{\text{base}}$; \citealp{liu2019roberta})
and base sized BERT (BERT$_{\text{base}}$; \citealp{devlin2019bert}) in the ablation study (\secref{ana:abl}).
\item The similarity function builds on the universal sentence encoder (USE;~\citealp{cer2018universal}).
\item The victim model is an MLP classifier on top of BERT$_{\text{base}}$.
It takes as input the first token's contextualized representation. We finetune BERT when training the victim model.
\item \emph{Merge}\xspace perturbation can only merge noun phrases, extracted with the NLTK toolkit.\footnote{\url{https://www.nltk.org/}}
We find that this helps produce more grammatical outputs.
\end{compactitem}
\paragraph{Baselines.}
We compare CLARE\xspace with recent state-of-the-art word-level black-box adversarial attack models, including:
\begin{compactitem}
\item {\bf PWWS}: a recent model by~\citet{ren2019generating}.
Based on word saliency~\citep{li2016visualizing}, it greedily replaces tokens with their
synonyms from WordNet~\citep{miller1995wordnet}.
\item{\bf TextFooler}: a state-of-the-art model
by \citet{jin2019bert}.
This replaces tokens with their synonyms derived from counter-fitting word embeddings~\citep{mrkvsic2016counter},
and uses the same text similarity function as our work.
\item{\bf TextFooler+LM}:
an improved variant of TextFooler we implemented based on \citet{alzantot2018generating} and
\citet{cheng2019robust}.
This inherits token replacement from TextFooler, but
uses an additional small sized GPT-2 language model~\citep{radford2019language} to filter out those candidate tokens that do not fit in the context with calculated perplexity.
\end{compactitem}
We use the open source implementation of the above baselines provided by the authors. More details are included in Appendix~\secref{sec:app_details}.
\begin{table}[t]
\centering
\setlength{\tabcolsep}{4.0pt}
\small{
\begin{tabular}{@{} lccrrr @{}}
\toprule
\textbf{Dataset} & \textbf{Avg. Length} & \textbf{\# Classes} &
\textbf{Train} & \textbf{Test} & \textbf{Acc}
\\\midrule
Yelp & 130 & 2 & 560K & 38K & 95.9\% \\
AG News & 46 & 4 & 120K & 7.6K & 95.0\% \\
\midrule
MNLI\footnotemark & 23/11 & 3 & 392K & 9.8K & 84.3\%\\
QNLI & 11/31 & 2 & 105K & 5.4K & 91.4\%
\\\bottomrule
\end{tabular}
}
\caption{Some statistics of datasets.
The last column indicates the victim model's accuracy on the original test set \emph{without} adversarial attack.}
\label{tab:dataset}
\end{table}
\footnotetext{We only examine the performance on the matched set, since the mismatched set is easier to attack.}
\begin{table*}[t]
\centering
\setlength{\tabcolsep}{6pt}
\small{
\begin{tabular}{@{} l rrrrr m{3pt} rrrrr @{}}
\toprule
{} & \multicolumn{5}{c}{\textbf{Yelp} (PPL = 51.5)} && \multicolumn{5}{c}{\textbf{AG News} (PPL = 62.8)}
\\\midrule
\textbf{Model} &
\textbf{A-rate}$\uparrow$ & \textbf{Mod}$\downarrow$ & \textbf{PPL}$\downarrow$ & \textbf{GErr}$\downarrow$ & \textbf{Sim}$\uparrow$ & &
\textbf{A-rate}$\uparrow$ & \textbf{Mod}$\downarrow$ & \textbf{PPL}$\downarrow$ & \textbf{GErr}$\downarrow$ & \textbf{Sim}$\uparrow$
\\\midrule
PWWS &
35.3 & \textbf{8.2} & 98.8 & 0.33 & 0.64 &&
14.2 & 7.9 & 114.8 & 0.56 & 0.71
\\
TextFooler &
77.0 & 16.6 & 163.3 & 1.23 & 0.70 &&
56.1 & 23.3 & 331.3 & 1.43 & 0.69
\\
\quad + LM &
34.0 & 17.4 & 90.0 & 1.21 & 0.73 &&
23.1 & 21.9 & 144.6 & 1.07 & 0.74
\\
\midrule
\textsc{Clare} &
\textbf{79.1} & 10.3 & \textbf{83.5} & \textbf{0.25} & \textbf{0.78} &&
\textbf{65.3} & \textbf{5.9} & \textbf{82.9} & \textbf{0.15} & \textbf{0.76}
\\\midrule\midrule
{} & \multicolumn{5}{c}{\textbf{MNLI} (PPL = 60.9)} && \multicolumn{5}{c}{\textbf{QNLI} (PPL = 46.0)}
\\\midrule
\textbf{Model} &
\textbf{A-rate}$\uparrow$ & \textbf{Mod}$\downarrow$ & \textbf{PPL}$\downarrow$ & \textbf{GErr}$\downarrow$ & \textbf{Sim}$\uparrow$ & &
\textbf{A-rate}$\uparrow$ & \textbf{Mod}$\downarrow$ & \textbf{PPL}$\downarrow$ & \textbf{GErr}$\downarrow$ & \textbf{Sim}$\uparrow$
\\\midrule
PWWS &
16.6 & \textbf{6.4} & 101.3 & 0.30 & 0.70 &&
8.8 & \textbf{8.0} & 88.4 & 0.32 & 0.71
\\
TextFooler &
59.8 & 13.8 & 161.5 & 0.63 & 0.73 &&
57.8 & 16.9 & 164.4 & 0.62 & 0.72
\\
\quad + LM &
32.3 & 12.4 & 91.9 & 0.50 & 0.77 &&
29.2 & 17.3 & 85.0 & 0.42 & 0.75
\\
\midrule
\textsc{Clare} &
\textbf{88.1} & 7.5 & \textbf{82.7} & \textbf{0.02} & \textbf{0.82} &&
\textbf{83.8} & 11.8 & \textbf{76.7} & \textbf{0.01} & \textbf{0.78}
\\\bottomrule
\end{tabular}
}
\caption{Adversarial example generation performance in
attack success rate (A-rate),
modification rate (Mod),
perplexity (PPL),
number of increased grammar errors (GErr),
and textual similarity (Sim).
The perplexity of the original inputs is indicated in parentheses for each dataset.
Bold font indicates the best performance for each metric.}
\label{tab:res}
\end{table*}
\subsection{Datasets and Evaluation}\label{sec:data}
\paragraph{Datasets.}
We evaluate CLARE\xspace
with the following datasets:
\begin{compactitem}
\item \textbf{Yelp Reviews}~\citep{zhang2015character}: a binary sentiment classification dataset based on restaurant reviews.
\item \textbf{AG News}~\citep{zhang2015character}: a collection of news articles with four categories: \emph{World}, \emph{Sports}, \emph{Business} and \emph{Science \& Technology}.
\item \textbf{MNLI}~\citep{williams2018broad}: a natural language inference
dataset. Each instance consists of a premise-hypothesis pair, and the model is supposed to determine the relation
between them from a label set of \emph{entailment}, \emph{neutral}, and \emph{contradiction}.
It covers text from a variety of domains.
\item \textbf{QNLI}~\citep{wang2019glue}: a binary classification dataset converted from the Stanford question answering dataset~\citep{rajpurkar2016squad}.
The task is to determine whether the context contains
the answer to a question. It is mainly based on English Wikipedia articles.
\end{compactitem}
Table~\ref{tab:dataset} summarizes some statistics of the datasets.
In addition to the above four datasets, we experiment with
DBpedia ontology dataset~\citep{zhang2015character},
Stanford sentiment treebank \citep{socher2013recursive},
Microsoft Research Paraphrase Corpus \citep{dolan2005automatically},
and Quora Question Pairs from the GLUE benchmark.
The results on these datasets are summarized in Appendix~\ref{sec:app_res}.
Following previous practice~\citep{alzantot2018generating},
we tune CLARE\xspace on training data,
and evaluate with 1,000 randomly sampled test instances of lengths $\leq100$.
In the sentence-pair tasks (e.g., MNLI, QNLI), we attack the longer sentence excluding the tokens that appear in both.
\paragraph{Evaluation metrics.}
We follow previous works \citep{jin2019bert,zang2020word},
and evaluate the models with the following automatic metrics:
\begin{compactitem}
\item {\bf Attack success rate (A-rate)}: the percentage of adversarial examples that can successfully attack the victim model.
\item {\bf Modification rate (Mod)}: the percentage of modified tokens.
Each \emph{Replace}\xspace or \emph{Insert}\xspace action accounts for one token modified;
a \emph{Merge}\xspace action is considered modifying one token
if one of the two merged tokens is kept (e.g., merging bigram $a b$ into $a$),
and two otherwise (e.g., merging bigram $a b$ into $c$).
\item{\bf Perplexity (PPL)}: a metric used to evaluate the \textit{fluency} of adversaries~\citep{kann2018sentence,zang2020word}. The perplexity is calculated using small sized GPT-2 with a 50K-sized vocabulary~\citep{radford2019language}.
\item{\bf Grammar error (GErr)}: the number of increased grammatical errors
in the successful adversarial example, compared to the original text. Following~\citep{zang2020word,morris2020reevaluating}, we
calculate this by the LanguageTool~\citep{naber2003rule}.\footnote{\url{https://www.languagetool.org/}}
\item{\bf Textual similarity (Sim)}: the similarity between the input and its adversary. Following \citep{jin2019bert,morris2020reevaluating}, we calculate this using the universal sentence encoder (USE; \citealp{cer2018universal}).
\end{compactitem}
The last four metrics are averaged across those adversarial examples that successfully attack the victim model.
\subsection{Results} \label{sec:exp_res}
Table~\ref{tab:res} summarizes the results.
Although PWWS achieves the best modification rate on 3 out of the 4 datasets, it \emph{underperforms} CLARE\xspace in terms of other metrics.
With a very limited set of synonym candidates from WordNet, PWWS fails to attack a BERT model on most of inputs.
Using word embeddings to find synonyms, TextFooler achieves a higher success rate, but tends to produce less grammatical and less natural outputs. Equipped with a language model, TextFooler+LM does better in terms of perplexity, yet this brings little grammaticality improvement and comes at a cost to attack success rate. With contextualized perturbations, CLARE\xspace achieves the best performance on attack success rate, perplexity, grammaticality and similarity.
For AG News, CLARE\xspace outperforms TextFooler by 9\% on success rate and by a huge 245 on perplexity, and cuts average number of grammatical errors by 1.3.
We observe similar trends on other datasets.
Figure~\ref{fig:similarity-trade-off} compares trade-off curves
between attack success rate and textual similarity.
For each model, we tune the thresholds for constructing the candidate token sets,
and plot textual similarity against attack success rate.
CLARE\xspace strikes the best balance, showing a clear advantage in achieving a success rate with least similarity drop.
We observe similar trends for attack success rate and perplexity trade off.
\begin{figure}[t]
\centering
\begin{minipage}{1.0\linewidth}
\includegraphics[width=1.0\linewidth]{./figure/similarity_trade_off.pdf}
\end{minipage}
\\
\begin{minipage}{1.0\linewidth}
\includegraphics[width=1.0\linewidth]{./figure/ppl_trade_off.pdf}
\end{minipage}
\caption{\textbf{Top}: Attack success rate and textual similarity trade-off curves (\textit{both higher the better}). \textbf{Bottom}: Attack success rate (\textit{higher is better}) and perplexity (\textit{lower is better}) trade-off curve.
The larger area under the two curves indicates the better trade-off between two metrics.
}
\label{fig:similarity-trade-off}
\end{figure}
\paragraph{Human evaluation.}
We further conduct human evaluation on the AG News dataset.
We randomly sample 300 instances which both CLARE\xspace and TextFooler successfully attack.
For each input, we pair the adversarial examples from the two models,
and present them to crowd-sourced judges along with the original input and the gold label.
We ask them which they prefer in terms of
(1) having a meaning that is closer to the original input (similarity),
and (2) being more fluent and grammatical (fluency and grammaticality).
We also provide a
neutral option, for when the judges consider the two indistinguishable.
Additionally, we ask the judges to annotate adversarial examples,
and compare their annotations against the gold labels (label consistency). We collect 5 responses for each pair on every evaluated aspect.
Further details are provided in Appendix~\ref{sec:app_human_eval}.
As shown in Table~\ref{tab:human},
CLARE\xspace has a significant advantage over TextFooler:
in terms of similarity 56\% responses prefer CLARE\xspace,
while 16\% prefer TextFooler. The trend is similar for fluency \& grammaticality (42\% vs. 9\%).
On label consistency,
CLARE\xspace slightly underperforms TextFooler at 68\% with a 95\% condidence interval (CI) $(66\%, 70\%)$,
versus 70\% with a 95\% CI $(68\%, 73\%)$. We attribute this to an inherent overlap of some categories in the AG News dataset, e.g., \emph{Science \& Technology and Business}, as evidenced by a 71\% label consistency for original inputs.
Closing this section,
Table~\ref{tab:samples} compares the adversarial examples generated by
TextFooler and CLARE\xspace.
More samples can be found in Appendix~\ref{sec:app_samples}.
\begin{table}[t]
\centering
\setlength{\tabcolsep}{4pt}
\small{
\begin{tabular}{@{} l ccc @{}}
\toprule
Metric & CLARE\xspace & Neutral & TextFooler
\\\midrule
Similarity & 56.1$_{\pm 2.5}$ & 28.1 & 15.8$_{\pm 2.1}$ \\
Fluency\&Grammaticality & 42.5$_{\pm 2.5}$ & 48.6 & \phantom{1}8.9$_{\pm 1.5}$ \\
Label Consistency & 68.0$_{\pm 2.4}$ & - & 70.1$_{\pm 2.5}$
\\\bottomrule
\end{tabular}
}
\caption{Human evaluation performance in percentage on the AG News dataset.
$\pm$ indicates confidence intervals with a 95\% confidence level.
}
\label{tab:human}
\end{table}
\section{Introduction}
Adversarial example generation for
natural language processing (NLP) tasks aims to perturb input text to trigger errors in machine learning models,
while keeping the output close to the original. Besides exposing system
vulnerabilities and
helping improve their robustness and security~\interalia{zhao2017generating,wallace2019universal,cheng2019robust,jia2019certified}, adversarial examples are also used to analyze and interpret the models' decisions~\citep{jia2017adversarial,ribeiro2018semantically}.
Generating adversarial examples for NLP tasks can be challenging, in part due to the discrete nature of natural language text.
Recent efforts have explored heuristic rules, such as replacing tokens with their synonyms~\interalia{samanta2017towards,liang2017deep,alzantot2018generating,ren2019generating,jin2019bert}.
Despite some empirical success, rule-based methods
are agnostic to context, limiting their
ability to produce natural, fluent, and grammatical outputs~\interalia{wang2019natural,morris2020reevaluating,kurita2020weight}.
\begin{figure}[t]
\centering
\includegraphics[width=1.0\linewidth]{./figure/clare.pdf}
\caption{Illustration of CLARE\xspace. Through a mask-then-infill procedure, the model generates the adversarial text with three contextualized perturbations: {\color{myred}{\textbf{\emph{Replace}\xspace}}}, {\color{myblue}{\textbf{\emph{Insert}\xspace}}} and {\color{myyellow}{\textbf{\emph{Merge}\xspace}}}. A mask is indicated by ``\underline{\hspace{5mm}}''. The degree of fade corresponds to the (decreasing) priority of the infill tokens.}
\label{fig:clare}
\end{figure}
This work presents CLARE\xspace, a \textbf{C}ontextua\textbf{L}ized \textbf{A}dversa\textbf{R}ial \textbf{E}xample generation model for text.
CLARE\xspace perturbs the input with a mask-then-infill procedure:
it first detects the vulnerabilities of a model and deploys masks to the inputs to indicate missing text,
then fills in an alternative token using a pretrained masked language model (e.g., RoBERTa;~\citealp{liu2019roberta}).
CLARE\xspace features three contextualized perturbing actions: \emph{Replace}\xspace, \emph{Insert}\xspace and \emph{Merge}\xspace,
which respectively replace a token, insert a new token, and merge a bigram (Figure~\ref{fig:clare}).
As a result, it can generate outputs of varied lengths,
in contrast to token replacement based methods that only produce outputs of the same lengths as the inputs \citep{alzantot2018generating,ren2019generating,jin2019bert}.
Further, CLARE\xspace searches over a wider range of attack strategies,
and is thus able to attack the victim model more efficiently with fewer edits.
Building on a masked language model,
CLARE\xspace maximally preserves textual similarity, fluency, and grammaticality of the outputs.
We evaluate CLARE\xspace on text classification, natural language inference, and sentence paraphrase tasks,
by attacking finetuned BERT models~\citep{devlin2019bert}.
Extensive experiments and human evaluation show that
CLARE\xspace outperforms baselines in terms of attack success rate, textual similarity, fluency, and grammaticality,
and strikes a better balance between attack success rate and preserving input-output similarity.
Our analysis further suggests that the CLARE\xspace can be used to improve the robustness of the downstream models,
and improve their accuracy when the available training data is limited.
We release our code and models at \url{https://github.com/cookielee77/CLARE}.
\section{CLARE\xspace}
At a high level, CLARE\xspace
applies a sequence of contextualized perturbation actions to the input.
Each can be seen as a \emph{local} mask-then-infill procedure:
it first applies a mask to the input around a given position,
and then fills it in using a pretrained masked language model~(\S\ref{sec:operations}).
To produce the output, CLARE\xspace scores and descendingly ranks the actions, which are then iteratively
applied to the input~(\S\ref{sec:ranking}).
We begin with a brief background review and laying out of necessary notation.
\paragraph{Background.}
Adversarial example generation centers around a \textbf{victim} model $f$, which we assume is a text classifier.
We focus on the black-box setting,
allowing access to $f$'s outputs but \emph{not} its configurations such as parameters.
Given an input sequence ${\mathbf{x}}=x_1x_2\dots x_n$ and its label $y$,
assume $f({\mathbf{x}})=y$,
an \textbf{adversarial example} ${\mathbf{x}}^\prime$ is supposed to modify ${\mathbf{x}}$ to trigger an error in the victim model:
$f({\mathbf{x}}^\prime) \neq f({\mathbf{x}})$.
At the same time, textual modifications should be minimal,
such that ${\mathbf{x}}^\prime$ is close to ${\mathbf{x}}$
and the human predictions on ${\mathbf{x}}^\prime$ stay the same.\footnotemark
\footnotetext{
In computer vision applications,
minor perturbations to continuous pixels can be barely perceptible to humans,
thus it can be hard for one to distinguish ${\mathbf{x}}$ and ${\mathbf{x}}^\prime$~\citep{goodfellow2014explaining}.
It is not the case for text, however, since
changes to the discrete tokens are more likely to be noticed by humans.
}
This is achieved by requiring the similarity between
$\mathbf{x}^\prime$ and ${\mathbf{x}}$ to be larger than a
threshold: $\operatorname{sim}(\mathbf{x}^\prime,\mathbf{x}) > \ell$.
A common choice of $\operatorname{sim}(\boldsymbol{\cdot}, \boldsymbol{\cdot})$ is to encode sentences using neural networks,
and calculate their cosine similarity in the embedding space~\citep{jin2019bert}
\subsection{Masking and Contextualized Infilling}\label{sec:operations}
At a given position of the input sequence,
CLARE\xspace can execute three perturbation actions:
\emph{Replace}\xspace, \emph{Insert}\xspace, and \emph{Merge}\xspace,
which we introduce in this section.
These apply masks at the given position with different strategies,
and then fill in the missing text based on the unmasked context.
\paragraph{\emph{Replace}\xspace: }
A \emph{Replace}\xspace action substitutes the token at a given position $i$ with an alternative (e.g., changing ``\emph{fantastic}'' to ``\emph{amazing}'' in ``The movie is \emph{fantastic}.'').
It first replaces $x_i$
with a mask,
and then selects a token $z$ from a candidate set ${\mathcal{Z}}$ to fill in:
\begin{align*}
\widetilde{{\mathbf{x}}} &= x_1\dots x_{i-1}\ \textsc{[Mask]}\xspace \ x_{i+1}\dots x_n,\\
\operatorname{replace}\left(\mathbf{x}, i\right) &= x_1\dots x_{i-1}\ z \ x_{i+1}\dots x_n.
\end{align*}
For clarity, we denote $\operatorname{replace}\left(\mathbf{x}, i\right)$ by $\widetilde{{\mathbf{x}}}_z$.
To produce an adversarial example,
\begin{compactitem}
\item $z$ should fit into the unmasked context;
\item $\widetilde{{\mathbf{x}}}_z$ should be similar to ${\mathbf{x}}$;
\item $\widetilde{{\mathbf{x}}}_z$ should trigger an error in $f$.
\end{compactitem}
These can be achieved by selecting a $z$ such that
\begin{compactitem}
\item $z$ receives a high probability from a masked language model: $p_{\text{MLM}}(z\mid \widetilde{{\mathbf{x}}}) > k$;
\item $\widetilde{{\mathbf{x}}}_z$ is similar to ${\mathbf{x}}$: $\operatorname{sim}({\mathbf{x}}, \widetilde{{\mathbf{x}}}_z) > \ell$;
\item $f$ predicts low probability for the gold label given $\widetilde{{\mathbf{x}}}_z$, i.e., $p_f(y\mid \widetilde{{\mathbf{x}}}_z)$ is small.
\end{compactitem}
$p_{\text{MLM}}$ denotes a pretrained masked language model (e.g., RoBERTa;~\citealp{liu2019roberta}).
Using higher $k$, $\ell$ thresholds produces outputs that are more fluent and closer to the original. However, this can undermine the success rate of the attack. We choose $k$, $\ell$ to trade-off between these two aspects. \footnote{
$k$ and $\ell$ are empirically set as $5\times 10^{-3}$ and $0.7$, respectively.
This also reduces the computation overhead:
in our experiments $|{\mathcal{Z}}|$ is $42$ on average, much smaller than the vocabulary size ($|{\mathcal{V}}|=50,265$).
}
The first two requirements can be met by
the construction of the candidate set: ${\mathcal{Z}}=$
\begin{align*}
\left\{z^\prime\in{\mathcal{V}} \mid p_{\text{MLM}}(z^\prime\mid \widetilde{{\mathbf{x}}}) > k, \operatorname{sim}({\mathbf{x}}, \widetilde{{\mathbf{x}}}_{z^\prime}) > \ell\right\}.
\end{align*}
${\mathcal{V}}$ is the vocabulary of the masked language model.
To meet the third, we select from ${\mathcal{Z}}$ the token that, if filled in,
will cause most ``confusion'' to $f$:
\begin{align*}
z = \operatorname*{arg\,min}_{z^\prime \in {\mathcal{Z}}} p_f(y\mid \widetilde{{\mathbf{x}}}_{z^\prime})
\end{align*}
The \emph{Insert}\xspace and \emph{Merge}\xspace actions differ from \emph{Replace}\xspace
in terms of masking strategies.
The alternative token $z$ is selected analogously to that in a \emph{Replace}\xspace action.
\paragraph{\emph{Insert}\xspace: }
This aims to add extra information to the input (e.g., changing ``I recommend ...'' to ``I \emph{highly} recommend ...'').
It inserts a mask after $x_i$ and then fills it.
Slightly overloading the notations,
\begin{align*}
\widetilde{{\mathbf{x}}} &= x_1\dots x_i\ \textsc{[Mask]}\xspace \ x_{i+1}\dots x_n,\\
\operatorname{insert}\left(\mathbf{x}, i\right) &= x_1\dots x_{i}\ z \ x_{i+1}\dots x_n.
\end{align*}
This increases the sequence length by 1.
\paragraph{\emph{Merge}\xspace: }
This masks out a bigram $x_i x_{i+1}$
with \emph{a single} mask and then fills it, reducing the sequence length by 1:
\begin{align*}
\widetilde{{\mathbf{x}}} &= x_1\dots x_{i-1}\ \textsc{[Mask]}\xspace \ x_{i+2}\dots x_n,\\
\operatorname{merge}\left(\mathbf{x}, i\right) &= x_1\dots x_{i-1}\ z\ x_{i+2}\dots x_n.
\end{align*}
$z$ can be the same as one of the masked tokens (e.g., masking out ``New York'' and then filling in``York''). This can be seen as deleting a token from the input.
For \emph{Insert}\xspace and \emph{Merge}\xspace, $z$ is chosen in the same manner as replace action.
\footnote{
A perturbation will not be considered if its candidate token set is empty.
}
In sum, at each position $i$ of an input sequence,
CLARE\xspace first:
(1) replaces $x_i$ with a mask;
(2) or inserts a mask after $x_i$;
(3) or merges $x_i x_{i+1}$ into a mask.
Then a set of candidate tokens is constructed
with a masked language model and a textual similarity function; the token minimizing the gold label's probability is chosen as the alternative token.
CLARE\xspace first constructs the local actions for all positions in parallel,
i.e., the actions at position $i$ do not affect those at other positions.
Then, to produce the adversarial example,
CLARE\xspace gathers the local actions and selects an order to execute them
\subsection{Sequentially Applying the Perturbations}\label{sec:ranking}
Given an input pair $({\mathbf{x}}, y)$,
let $n$ denote the length of ${\mathbf{x}}$.
CLARE\xspace chooses from $3n$ actions to produce the output:
3 actions for each position, assuming the candidate token sets are not empty.
We aim to generate an adversarial example with minimum modifications to the input.
To achieve this, we iteratively apply the actions,
and first select those minimizing the probability of outputting the gold label $y$ from $f$.
Each action is associated with a score, measuring how likely it can ``confuse'' $f$:
denote by $a({\mathbf{x}})$ the output of applying action $a$ to ${\mathbf{x}}$.
The score is then the negative probability of predicting the gold label from $f$, using $a({\mathbf{x}})$ as the input:
\begin{align*}\label{eq:action_score}
s_{({\mathbf{x}}, y)}(a) = -p_f\bigl(y\mid a({\mathbf{x}})\bigr).
\end{align*}
\emph{Only one} of the three actions can be applied at each position, and we select the one with the highest score.
This constraint aims to avoid multiple modifications around the same position, e.g.,
merging ``New York'' into ``Seattle'' and then replacing it with ``Boston''.\footnote{
Multiple actions at the same position can be replaced by one.
In preliminary experiments, we found that
constraining one action per position yields better performance in terms of fluency and grammaticality.}
Actions are iteratively applied to the input, until an adversarial example is found
or a limit of actions $T$ is reached.
Each step selects the highest-scoring action from the remaining ones.
Algorithm~\ref{alg:oscar} summarizes the above procedure.\footnote{
\emph{Insert}\xspace and \emph{Merge}\xspace actions change the text length.
When any of them is applied, we accordingly change the text indices of affected actions remaining in ${\mathcal{A}}$.
}
\begin{algorithm}[t]
\centering
\caption{Adversarial Attack by CLARE\xspace}
\label{alg:oscar}
\begin{algorithmic}[1]
\State{\bfseries Input:} Text-label pair $({\mathbf{x}}, y)$; Victim model $f$
\State{\bfseries Output:} An adversarial example
\State{\bfseries Initialization:} ${\mathbf{x}}^{(0)} = {\mathbf{x}}$
\State{${\mathcal{A}}\leftarrow \varnothing$}
\For {$1 \leq i \leq \lvert{\mathbf{x}}\rvert$}
\State \begin{varwidth}[t]{\linewidth}
$a \leftarrow$ highest-scoring action from $\{$\par
\hskip\algorithmicindent$\operatorname{replace}({\mathbf{x}}, i)$, $\operatorname{insert}({\mathbf{x}}, i), \operatorname{merge}({\mathbf{x}}, i)\}$
\end{varwidth}
\State ${\mathcal{A}}\leftarrow {\mathcal{A}} \bigcup \{a\}$
\EndFor
\For{$1 \leq t \leq T$}
\State $a\leftarrow$ highest-scoring action from ${\mathcal{A}}$
\State ${\mathcal{A}}\leftarrow {\mathcal{A}} \setminus \{a\}$
\State{$\textbf{x}^{(t)} \leftarrow$ Apply $a$ on $\textbf{x}^{(t-1)}$}
\If{$f({\mathbf{x}}^{(t)}){\neq}y$} {\Return ${\mathbf{x}}^{(t)}$}
\EndIf
\EndFor
\State \Return \textsc{None}
\end{algorithmic}
\end{algorithm}
\paragraph{Discussion.}
A key technique of CLARE\xspace is the local mask-then-infill perturbation.
This comes with several advantages.
First, it allows attacking \emph{any} position of the input sequence, whereas existing synonym replacement approaches can generally only attack tokens in a predefined vocabulary~\interalia{alzantot2018generating,jin2019bert,ren2019generating}.
Second, as we will show in the experiments (\secref{sec:exp_res}),
contextualized infilling produces more fluent and grammatical outputs compared
to the context-agnostic counterparts, especially when using masked language models trained on large-scale data. In addition, by using \emph{Merge}\xspace and \emph{Insert}\xspace actions,
CLARE\xspace can produce adversarial examples whose lengths are different from the inputs.
Generating adversarial examples with masked language models is also explored by a concurrent work~\citep{li2020bert}.
Their method is similar to a CLARE\xspace model except that it only uses the \emph{Replace}\xspace action.
As shown in our ablation study (\secref{ana:abl}), using all three actions helps CLARE\xspace achieve a better attack performance.
\section{Related Work}
\paragraph{Textual adversarial attack.}
An increasing amount of effort is being devoted to generating better textual adversarial examples with various attack models.
Character-based models~\interalia{liang2017deep,ebrahimi2018hotflip,li2018textbugger,gao2018black} use misspellings to attack the victim systems; however, these attacks can often be defended by a spell checker~\citep{pruthi2019combating,vijayaraghavan2019generating,zhou2019learning,jones2020robust}.
Many sentence-level models~\interalia{iyyer2018adversarial,wang2019advcodec,zou2019reinforced} have been developed to introduce more sophisticated token/phrase perturbations. These, however,
generally have difficulty maintaining semantic similarity with original inputs~\citep{zhang2020adversarial}.
Recent word-level models explore synonym substitution rules to enhance semantic meaning preservation ~\interalia{alzantot2018generating,jin2019bert,ren2019generating,zhang2019generating,zang2020word}.
Our work differs in that CLARE\xspace uses three contextualized perturbations that can produce more fluent and grammatical outputs.
\paragraph{Text generation with BERT.}
Generation with masked language models has been widely studied in various natural language tasks, ranging from lexical substitution~\interalia{wu2019conditional,zhou2019bert,qiang2019simple,wu2019mask} to non-autoregressive generation~\interalia{gu2017non,lee2018deterministic,ghazvininejad2019mask,ma2019flowseq,sun2019fast,ren2020study, zhang2020pointer}. However, little work has explored using these models to generate adversarial examples for text.
|
{
"redpajama_set_name": "RedPajamaArXiv"
}
| 7,499
|
{"url":"https:\/\/codegolf.stackexchange.com\/questions\/77556\/is-it-really-a-comcoin","text":"# Is it really a comcoin?\n\n## Very interesting background\n\nComcoins are a currency like any other. The residents of Multibaseania (an economically robust system of city-states with very few residents in a galaxy far, far away) use Comcoins to conduct transactions between themselves. Comcoins are represented by unique codes on special not-paper slips, and when you pay you give the vendor your slip.\n\nHowever, just like any currency, there are those villainous types that try to take advantage of the system and inflate the currency because they are bored.\n\nTo combat this unquestionably illegal behavior, the Multibaseanian governments came together and devised a way to prove that the money is legitimate. The top idea from the think tank was: whenever a Comcoin is given to a vendor, the vendor runs a program that checks if it is legitimate. How does one know if a Comcoin is legitimate?\n\nA legitimate Comcoin is one where:\n\nWhen the Comcoin's unique code is converted into the bases 2-10, inclusive, that number is composite (i.e. not prime). Also, all of the unique code's digits in base 10 are either 1 or 0, and its length in base 10 is between 1 and 5 inclusive.\n\nVery important example: in base 5, 111 is 421. Even though 111 is not prime, 421 is, so the Comcoin is invalid.\n\n## The challenge\n\nWrite a function or program that takes a Comcoin's code (a number), which is in base 10 and is an integer. Then, print or return a truthy or falsy value depending on whether that Comcoin is legitimate (criteria above), respectively.\n\n## I\/O examples\n\nInput Output\n\n101 False \/\/ because it is prime in base 2\n1010 True\n10101 True\n1010111 False \/\/ because it is longer than 5 digits\n123 False \/\/ because it does not contain *only* 0's and 1's\n10111 False \/\/ because it is prime in base 6\n\n\nThis is code golf, so shortest code in bytes wins!\n\n## Edit\n\nA Comcoin is not a number that is not prime, but is a number that is composite.\n\nInspiration from qualification round of Google CodeJam 2016.\n\n\u2022 Related... \u2013\u00a0Doorknob Apr 11 '16 at 1:43\n\u2022 What's with all the primality testing and base conversion? I know this was inspired by a Google code jam question, but I feel like these topics have been way overdone on PPCG. And my comments from here also apply. \u2013\u00a0xnor Apr 11 '16 at 1:51\n\u2022 What about an input of 1? It's not composite in any base, nor is it prime. Is it a legitimate Comcoin? \u2013\u00a0Value Ink Apr 11 '16 at 5:38\n\u2022 \"When the Comcoin's unique code is converted into the bases 2-10, inclusive, that number is composite\" makes no sense. The divisibility properties of a number are independent of the way the number is represented. \u2013\u00a0Peter Taylor Apr 11 '16 at 9:36\n\u2022 Well you definitely solved the inflation problem if you can only ever mint 18 comcoins... \u2013\u00a02012rcampion Apr 11 '16 at 15:42\n\n# MATL, 20 bytes\n\nn6<G50<9:Q\"G@ZAZp~vA\n\n\nInput is a string.\n\nTry it online!\n\n### Explanation\n\nn6< % take input implicitly. Is length less than 6?\nG50< % push input again. Array that contains true for digits less than 2\n9:Q % push array of bases: [2,3,...,10]\n\" % for each\nG % push input again\n@ % push current base\nZA % interpret input as if it were in that base, and convert to decimal\nZp~ % true for composite numbers\nv % concatenate vertically all results up to now\nA % true if all results were\n% end for each implicitly\n% display implicitly\n\n\n# Python 2, 6256 49 bytes\n\nlambda n:max(n)<\"2\"and 0x5d75d750>>int(n,2)&1\n\n\nCredit to @Sp3000 for the max trick to ensure binary digits.\n\n\u2022 A black magic hardcode of all relevant primes? Nice, how does it work? \u2013\u00a0Value Ink Apr 11 '16 at 6:40\n\u2022 @KevinLau It's function should be apparent once you realize how many 5-digit binary numbers there are :) \u2013\u00a0orlp Apr 11 '16 at 6:41\n\u2022 You left out 1111. \u2013\u00a0xsot Apr 11 '16 at 8:21\n\u2022 @xsot Fixed, had a little bug in my generation script. \u2013\u00a0orlp Apr 11 '16 at 13:36\n\u2022 wow... that's clever. \u2013\u00a0cat Apr 11 '16 at 13:48\n\n## JavaScript (ES6), 38 27 bytes\n\nn=>2641714512>>'0b'+n&n<1e5\n\n\nPort of @orlp's Python answer, except that JavaScript's precedence and weak typing allows me to shift the integer even if it's not valid in base 2, and then bitwise and it with the boolean. Returns 0 or 1 as appropriate. Note that I'm not using @orlp's constant any more, instead I'm assuming the following list of comcoins is valid:\n\n100\n110\n1000\n1010\n1011\n1100\n1110\n10000\n10010\n10100\n10101\n10110\n11000\n11010\n11011\n11100\n11111\n\nEdit: Fixed to check the length of the comcoin, since JavaScript's shift operator works modulo 32.\n\nf(x,s=\"$x\")=endof(s)<6&&all(c->c\u2208\"01\",s)&&!any(b->isprime(parse(Int,s,b)),2:10) This is a function that accepts an integer and returns a boolean. It's a straightforward check on the conditions of being a Comcoin: \u2022 Length as a string between 1 and 5 inclusive: endof(s)<6 \u2022 All zeros and ones: all(c->c\u2208\"01\",s) \u2022 No primes in any base from 2 to 10: !any(b->isprime(parse(Int,s,b)),2:10) Saved 2 bytes thanks to Luis Mendo! # JavaScript (ES6), 37 This should work better than the current ES6 answer Now the other ES6 answer is clearly better Edit 0 and 1 not valid, the magic number changes n=>180006585..toString(2)['0b'+n-4]|0 Test (see below to see how the magic number is built) F=n=>180006585..toString(2)['0b'+n-4]|0 console.log=(...x)=>O.textContent+=x+'\\n' function test() { var x=+I.value console.log(x+' '+F(x)) } test() \/\/ How the mask is built isPrime=x=>{ if(x<=2)return x==2 if(x%2==0)return false var i,q=Math.sqrt(x) for(i=3;i<=q;i+=2) if(x%i==0)return false return true; } buildMask=_=>{ var n,m,i,p,mask='' for(i=1;i<32;i++) { n=+i.toString(2) for(p=0,b=10;b>1;--b) { m=+n.toString(b) p=m<2 || isPrime(m) if(p) { console.log('N',i,n,m,b) break; } } mask+=p?0:1 if(!p) console.log('Y',i,n) } console.log(mask, parseInt(mask,2)) \/\/ result \/\/ 0001010101110101010111010111001,180006585} } <input value='11111' type='number' id=I oninput='test()'><pre id=O><\/pre> # Mathematica, 97 bytes #<1*^5&&Tr@DigitCount[#][[2;;-2]]<1&&FromDigits@IntegerDigits[#,a+1]~Table~{a,9}~NoneTrue~PrimeQ& Hey, at least I tried... #<1*^5&&Tr@DigitCount[#][[2;;-2]]<1&&FromDigits@IntegerDigits[#,a+1]~Table~{a,9}~NoneTrue~PrimeQ& #<1*^5&& less than 100000? Tr@DigitCount[#][[2;;-2]]<1&& no digits 2-9? FromDigits@IntegerDigits[#,a+1]~Table~{a,9}~NoneTrue~PrimeQ& composite in all bases? # Ruby, 8180 74 bytes Anonymous function, takes input as a string and returns true or a falsy value (false if it fails a prime check, nil if it contains characters that aren't 0 or 1) Uses some regex magic suggested by @QPaysTaxes, which thankfully works (within reasonable time) because of the promise that the coin signature has max 5 characters. Also, I forgot to actually check for the length, so only 1 byte was saved overall. Since 0 and 1 aren't composite numbers in any base, I could save more bytes by modifying my regex. ->n{n=~\/^[01]{2,5}$\/&&(2..10).map{|b|?1*n.to_i(b)=~\/^(..+?)\\1+$\/}&[p]==[]} Old version using Ruby's built-in prime checker. 85 bytes after properly checking for length. ->n{require'prime';n=~\/^[01]{1,5}$\/&&(2..10).map{|b|Prime.prime? n.to_i(b)}&[!p]==[]}\n\n\u2022 As a side note, you can check primality in fewer bytes with this dark magic: '1'*n.to_i(b) !~\/^1?$|^(11+?)\\1+$\/. Or at least I think you can. To be honest, I have no idea how that works, so it might not. \u2013\u00a0Nic Hartley Apr 11 '16 at 2:17\n\u2022 Oh! A regex pattern for composite numbers, and a check to make sure it doesn't match. Yeah, that'll work. (The black magic works by turning the number into a string of 1s and uses regex groups to find a pair of numbers that will multiply and fit the pattern.) \u2013\u00a0Value Ink Apr 11 '16 at 5:47\n\n# Python, 161 152 bytes\n\nSigh. Assign the lambda to use it.\n\ndef p(n):\ni=a=n\nwhile i>2:i-=1;a*=n%i\nreturn a>1\nlambda s:all([all(map(lambda i:not p(int(s,i)),range(2,11))),filter(lambda i:i in\"01\",s)),len(s)<6])\n\n\n# Factor, 128 bytes\n\n[ dup [| a | 2 10 [a,b] [ a swap base> prime? not ] all? ] swap [ [ [ 49 = ] [ 48 = ] bi or ] all? ] [ length 6 < ] bi and and ]\n\n\nI'll try to golf this more in a sec.\n\nWell, here's the less golfed version I thought might be shorter, but it's 133 bytes...\n\n[ [ [let :> a 2 10 [a,b] [ a swap base> prime? not ] all? ] ] [ [ [ [ 49 = ] [ 48 = ] bi or ] all? ] [ length 6 < ] bi ] bi and and ]\n\n\nActually ungolfed:\n\n: comcoin? ( a -- t\/f )\n[\n[let :> a\n2 10 [a,b] [ a swap base> prime? not ] all?\n]\n] [\n[ [ [ 49 = ] [ 48 = ] bi or ] all? ]\n[ length 6 < ] bi\n] bi\nand and ;\n\n\n# Python 3, 222 bytes\n\nI wanted to try to do the naive method purely functionally, without looping. Here it is.\n\n(lambda A:all([F(A)for F in[lambda r:all(map(lambda s:not(lambda i,b:lambda n:list(filter(lambda i:not n%i,range(2,n)))(int(i,b))(r,s),range(2,11))),lambda r:0!= len(filter(lambda d:d not in\"01\",r)),lambda r:0<len(r)<6]]))\n\n\nUngolfed:\n\n(lambda A:\nall(\n[F(A) for F in [\nlambda r: all(\nmap(\nlambda s:\nnot(\nlambda i, b:\nlambda n:\nlist(filter(\nlambda i: not n % i, range(2, n)))\n)(int(i, b))(r, s),\nrange(2, 11))),\nlambda r: 0 != len(filter(lambda d: d not in \"01\", r)),\nlambda r: 0 < len(r) < 6\n]\n]\n)\n)","date":"2019-07-18 00:43:37","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 1, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 1, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.2749355435371399, \"perplexity\": 4291.830537621138}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2019-30\/segments\/1563195525483.62\/warc\/CC-MAIN-20190718001934-20190718023934-00222.warc.gz\"}"}
| null | null |
Published 04/18/2019 06:31:07 pm at 04/18/2019 06:31:07 pm in Red And Blue Striped Comforter.
red and blue striped comforter navy and white striped bedding red and white striped sheet navy blue and white striped bedding red white and blue striped comforter.
red and blue striped comforter set,red and blue striped comforter sets,red white and blue striped comforter headboard,red and blue striped comforter,red white blue striped comforter,red white and blue striped comforter,white and blue striped comforters for boys,white and blue striped comforter, striped bedding sets navy and white striped bedding navy blue white striped bedding sets flannel duvet cover red and blue , green plaid comforter red and blue comforter red and black plaid green plaid comforter blue plaid comforter red country comforter sets blue and green plaid twin comforter green plaid comforter blue , decoration red white and blue comforter sets set bedding varsity decoration red and white striped comforter twin set bedspread bedspreads modern black blue regarding decor.
|
{
"redpajama_set_name": "RedPajamaC4"
}
| 169
|
My previous reviews have ranted, rambled and railed on assorted topics, venting my spleen, spewing bile and vitriol all over Shropshire, praising the red-breasted live music scene and saluting the patrons of Potteries hostelries. What do I have in store for the pride of the East Midlands?
Well, I could wax lyrical over how it took me two songs to fight my way back from the bar to my stage-right vantage point, or, how at one point we feared for our safety as the box-office was besieged, or, how, following the surprise appearance of The Father of Time at The Rigger, Leicester was visited by The Unexpected Guest, but I won't.
OK, so I just did, but, trust me, there is a purpose to my tortuous prose. Whilst all of the aforementioned gigs were vastly different, there was one constant - DEMON. No matter how many or how few people have been present, the band has played as if they were playing to thousands. Totally professional, totally committed to giving the best performance possible, anybody who has seen them could not fail to be impressed. Dave's voice has a raw power that is as good as ever it was whilst Andy, Steve, John, Duncan and Ray paint a comprehensive musical canvas of magnificent proportions, now caressing, now beating the living hell out of you. Last, but not least, The Madman, the driving force - Mike Stone - as much an integral part of the band as anyone.
I have been going to live gigs for the past 21 years and Demon are without a doubt one of the best live bands I have ever had the pleasure of seeing perform, and Leicester was a superb performance, pure and simple. I feel sorry for the bands that have to follow Demon on stage in Sweden. I have seen them all live and Demon can blow them off any stage, without breaking a sweat, and that's the bottom line.
Thanks guys for a fantastic series of gigs, see you Wednesday.
Oh, and Pete and Craig, great meeting you at Leicester and Craig, you are definitely the tallest Demon fan in the world!
|
{
"redpajama_set_name": "RedPajamaC4"
}
| 6,832
|
package org.sakaiproject.sitestats.api;
public interface SummaryActivityTotals {
public double getLast30DaysActivityAverage();
public void setLast30DaysActivityAverage(double last30DaysActivityAverage);
public double getLast365DaysActivityAverage();
public void setLast365DaysActivityAverage(double last365DaysActivityAverage);
public double getLast7DaysActivityAverage();
public void setLast7DaysActivityAverage(double last7DaysActivityAverage);
public long getTotalActivity();
public void setTotalActivity(long totalActivity);
}
|
{
"redpajama_set_name": "RedPajamaGithub"
}
| 6,373
|
Biografia
È il nipote di Oumou Sangaré, cantautrice maliana.
Caratteristiche tecniche
È un terzino destro, in grado di agire da difensore centrale.
Carriera
Entra nel settore giovanile del Les Mureaux nel 2008, all'età di 8 anni. Nel 2015 viene tesserato dal Mantois 78, che lo aggrega al proprio settore giovanile. Dopo aver trascorso sei mesi al , nel 2019 si trasferisce in Italia, accordandosi con l', formazione impegnata nel campionato di Serie D.
Il 29 gennaio 2020 viene tesserato dal , che lo lascia in prestito all'Olympia Agnonese fino al termine della stagione. L'11 agosto 2021 firma un quadriennale con la . Esordisce in Serie B il 6 novembre contro l', subentrando al 75' al posto di Marino Defendi.
Statistiche
Presenze e reti nei club
Statistiche aggiornate al 2 marzo 2023.
Note
Collegamenti esterni
|
{
"redpajama_set_name": "RedPajamaWikipedia"
}
| 7,148
|
Outdated Cultural Depictions Deserve Relevant Updates
Acknowledging the past is the best way to educate the present.
With so many classic films available on Disney+ it was inevitable that the topic of how some of those movies have, in the vernacular of the day, not aged well would eventually come up. The studio's history is so deep and the number of movies so substantial, it's only natural that some of these movies feature characters, stories, songs and other attributes that were a product of their time but which are no longer considered acceptable or appropriate.
It's a common problem any studio would have to deal with if it were to put its entire catalog all in one place. Paramount would likely have to revisit the problems with movies like Breakfast at Tiffany's – which features Mickey Rooney in yellowface – if it created a portal where it not only offered that and other movies it had produced over the years but was responsible for presenting it as well.
To address this very real issue, Disney has taken two approaches. Either they've A) kept the movie in the "vault" like it has with Song of South, realizing there's little to no redeeming qualities to it or B) applied a note to the opening of the movie that reads thusly:
"This program is presented as originally created. It may contain outdated cultural depictions."
While some have criticized the move because it hasn't been consistently applied, because it's not specific enough or because it shows some kind of kowtowing to the liberal elites, it's a step in the right direction.
No, the disclaimer may not be perfect in various ways but it's better than nothing. More than that, it's exactly what's needed to put older material in its proper historical place.
Over the years there's been so much debate over cultural works like Huck Finn and other books, movies, shows and more that feature language, terminology, racial depictions, sexual politics and other story elements. School boards have discussed banning books, removing movies from libraries and such but removal has never been an answer that's respectful or long-term.
It's much more sustainable to offer education, acknowledging that mistakes were made in the past that now seem ill-advised if not utterly offensive. There can be opportunities to keep up with where society is at the moment instead of constantly trying to flush things down the Memory Hole and hoping no one brings them up. Such tactics only consign serious debates about where those cultural artifacts stand in history and how we've advanced to the sidelines, not allowing for people to consider them as anything above a kind of illicit smut that is usually hidden under the mattress.
Room for improvement in the disclaimer exists in a few areas:
Lose the ambiguity: "It may…" is too wishy washy and lets the content owner off the hook for seriously evaluating what's on display. If they know it does, state it clearly.
Make it consistent: it's a valid criticism to say that not showing the disclaimer on all applicable films, so address that immediately.
Offer more details: What is it specifically that's outdated and why? Pointing people to a domain where they could get more information on what it is that's no longer appropriate and offer resources to learn about how things have changed.
These – and other – movies shouldn't be erased from the cultural landscape, nor should they be altered to remove elements that are offensive. The originals can be presented as they are and were, but acknowledging that some of these things are well past their sell-by date.
2019-11-25 2019-11-24 1 Commentdisney, disney plus
One thought on "Outdated Cultural Depictions Deserve Relevant Updates"
steveforthedeaf says:
This film is a product of its time is fine as disclaimer
Previous Previous post: Frozen II – Marketing Recap
Next Next post: Queen & Slim – Marketing Recap
|
{
"redpajama_set_name": "RedPajamaCommonCrawl"
}
| 2,453
|
\section{Introduction}
\label{intro}
A set $A \subset \mathbb R$ is a \textit{Sidon set} if the only solutions to the energy equation
\[
a +b=c+d \text{ such that } a,b,c,d \in A
\]
are the trivial solutions whereby $\{a,b\}=\{c,d\}$. Sidon sets are important and widely studied objects in Additive Combinatorics; see \cite{tv} for background on this topic and \cite{OB} for a thorough survey.
Given an arbitrary finite set $A \subset \mathbb R$, we define $s_+(A)$ to be the size of the largest Sidon set $A'$ such that $A' \subset A$. The problem of understanding the behaviour of $s_+([N])$ has attracted particular interest, and it is known that $s_+([N])= \Theta(N^{1/2})$. See \cite{Gow} for a nice introduction to this question.
Komlos, Sulyok and Szemer\'{e}di \cite{KSS} proved (as part of a much more general result about sets avoiding certain linear configurations) that, up to constant factors, $s_+(A)$ is minimised among sets of size $N$ by the case when $A=\{1,2,\dots,N\}$. That is, they proved the bound
\begin{equation} \label{KSS}
s_+(A) \gg |A|^{1/2}
\end{equation}
holds for any\footnote{In fact, this was proved in \cite{KSS} only for sets of integers, but it has later been established that the same result holds over the reals; see for instance \cite[Lemma 2.2]{Raz}.} finite set $A \subset \mathbb R$.
Similarly, a \textit{multiplicative Sidon set} is a set $A \subset \mathbb R$ such that the only solutions to
\[
ab=cd \text{ such that } a,b,c,d \in A
\]
are the trivial solutions with $\{a,b\}=\{c,d\}$. Given an arbitrary finite set $A \subset \mathbb R$, we define $s_*(A)$ to be the size of the largest multiplicative Sidon set $A'$ such that $A' \subset A$. Applying the estimate \eqref{KSS} to the set $\log A=\{\log a : a \in A\}$, it follows that
\begin{equation} \label{KSS*}
s_*(A) \gg |A|^{1/2}
\end{equation}
for any finite $A \subset \mathbb R$.
In the spirit of the sum-product problem, one may ask the question of whether it is guaranteed that, for a fixed set $A \subset \mathbb R$, at least one of the inequalities \eqref{KSS} and \eqref{KSS*} is improvable. This question was indeed asked by Klurman and Pohoata \cite{KP}, who made the following conjecture.
\begin{conjecture} \label{conj:main}There exists a constant $c>0$ such that for all finite $A \subset \mathbb R$,
\begin{equation} \label{conj}
\max \{s_+(A), s_*(A)\} \gg |A|^{1/2 + c}.
\end{equation}
\end{conjecture}
Klurman and Pohoata in fact also made the stronger conjecture that, for all $\epsilon>0$,
\begin{equation} \label{conj2}
\max \{s_+(A), s_*(A)\} \gg |A|^{1- \epsilon}.
\end{equation}
The main result of this note is a construction disproving \eqref{conj2}.
\begin{theorem} \label{thm:main}
For all $N \in \mathbb N$, there exists a set $A \subset \mathbb N$ with $|A| \geq N$ and such that $s_+(A) \ll |A|^{1/2}\log |A|$ and $s_*(A) \ll |A|^{2/3}$. In particular,
\[
\max \{s_+(A), s_*(A)\} \ll |A|^{2/3}.
\]
\end{theorem}
\subsection{Notation} Throughout the paper, the standard notation
$\ll,\gg$ and respectively $O$ and $\Omega$ is applied to positive quantities in the usual way. That is, $X\gg Y$, $Y \ll X,$ $X=\Omega(Y)$ and $Y=O(X)$ all mean that $X\geq cY$, for some absolute constant $c>0$. If both $X \ll Y$ and $Y \ll X$ hold we write $X \approx Y$, or equivalently $X= \Theta(Y)$. All logarithms are in base $e$. For a set $A$, the notation $A(\cdot)$ is used for its characteristic function.
\section{Construction}
\begin{proof}[Proof of Theorem \ref{thm:main}]
For a sufficiently large integer $n$, define $P$ to be the set of all primes less than or equal to $n$, and define
\[
Q=\left \{n<q \leq \frac{n^2}{\log n} : q \text{ prime} \right \} .
\]
The construction is simply the product set
\[
A:=P \cdot Q=\left \{p\cdot q : p,q \text{ prime, } p\leq n < q \leq \frac{n^2}{\log n} \right \}.
\]
$A$ is a fairly dense subset of the set $\{1,2,\dots,n^3/\log n\}$, which implies that $A+A$ is small and thus $s_+(A)$ is also small. Indeed, by the Fundamental Theorem of Arithmetic and the Prime Number Theorem,
\[
|A| = |P||Q| \approx \frac{n^3}{\log^3n}.
\]
Since $A+A \subset \left \{1,\dots,\frac{2n^3}{\log n} \right \}$, it follows that
\begin{equation} \label{sumset}
|A+A| \ll |A|\log^2|A|.
\end{equation}
Furthermore, since a Sidon set of size $m$ contained in $A$ gives rise to $\binom{m}{2}+m$ distinct sums in $A+A$, it follows that
\[
s_+(A) \ll |A+A|^{1/2} \ll |A|^{1/2} \log |A|.
\]
It remains to prove the upper bound
\begin{equation} \label{aim}
s_*(A) \ll \frac{n^2}{\log^2 n} \approx |A|^{2/3}.
\end{equation}
To do this, we appeal to an argument Erd\H{o}s \cite{Erdos} used in order to establish the existence of a set with very small additive energy but still having fairly small $s_+(A)$. What follows can be viewed as an adaptation of this argument in the multiplicative setting.
We view the elements of $A$ as edges of a complete bipartite graph $G=(V,A)$ with vertex set $V =P \sqcup Q$, and with the edge between $p \in P$ and $q \in Q$ labelled by the product $pq$.
Suppose that $E \subset A$ is a multiplicative Sidon set. Then $E$ does not give rise to any copies of the cycle $C_4$ in $G$. Indeed, suppose that we have four edges in $E$ which form a cycle. Then the cycle must be of the form $pq, qp', p'q',q'p$. But if all of these four edges are in $E$ then we have
\[
(pq)(p'q')=(p'q)(pq'),
\]
which contradicts the fact that $E$ is a multiplicative Sidon set.
On the other hand, any $E \subset A$ which does not contain a copy of $C_4$ has size $|E| \ll \frac{n^2}{\log^2 n}$ by the K\H{o}v\'{a}ri-S\'{o}s-Tur\'{a}n Theorem. For completeness, we give a quick proof below using an application of Cauchy-Schwarz:
\begin{align*}
|E|^2&= \left( \sum_{q \in Q} \sum_{p \in P} E(pq) \right )^2
\\& \leq |Q| \sum_{q \in Q} \left (\sum_{p \in P} E(pq) \right )^2
\\ & \ll \frac{n^2}{\log^2 n} \sum_{p,p' \in P} \sum_{q \in Q} E(pq)E(p'q)
\\&=\frac{n^2}{\log^2 n} \left ( |E|+\sum_{p,p' \in P : p \neq p'} \sum_{q \in Q} E(pq)E(p'q) \right )
\\& \leq \frac{n^2}{\log^2 n} \left ( |E|+|P|^2 \right ) \ll \frac{n^2}{\log^2 n} \left ( |E|+\frac{n^2}{\log^2 n} \right ).
\end{align*}
If the sum $|E|+\frac{n^2}{\log^2 n} $ is dominated by the second term then we are done. Therefore we may assume otherwise, and the last inequality gives
\[
|E|^2 \ll \frac{n^2}{\log^2 n} \left ( |E|+\frac{n^2}{\log^2 n} \right ) \ll \frac{n^2}{\log^2 n} |E|.
\]
We have proved that any subset of size greater than $Cn^2/\log^2 n$, for some constant $C$, contains a $C_4$, and thus is not a multiplicative Sidon set. This proves \eqref{aim} and thus completes the proof of the theorem.
\end{proof}
\section{Connections to additive and multiplicative energy}
\subsection{The relationship between $s_+(A)$ and additive energy}
The additive energy of $A$, denoted $E_+(A)$, is the number of ordered quadruplues \linebreak $(a,b,c,d) \in A \times A \times A \times A$ such that
\[
a+b=c+d.
\]
Note that $E_+(A)$ also counts the trivial solutions, and so we have $E_+(A) \geq |A|^2$.
One may suspect that if $A$ has small additive energy then $s_+(A)$ must be large. This is true to some extent, as the following lemma shows.
\begin{lemma} \label{lem:random} For any finite $A \subset \mathbb R$
\[
s_+(A) \gg \frac{|A|^{4/3}}{(E_+(A))^{1/3}}.
\]
\end{lemma}
The proof of Lemma \ref{lem:random} uses a simple probabilistic argument, and is implicit in the work of Alon and Erd\H{o}s \cite{AE}. The multiplicative analogue of Lemma \ref{lem:random} (with $s_*(A)$ and $E_*(A)$ in place of $s_+(A)$ and $E_+(A)$ respectively) holds via the same reasoning. This lemma overtakes the bound \eqref{KSS} when $E_+(A) \ll |A|^{5/2}$. Combining these two results together, we have
\begin{equation}\label{combo}
s_+(A) \gg \max \left \{ \frac{|A|^{4/3}}{(E_+(A))^{1/3}}, |A|^{1/2} \right \}.
\end{equation}
The purpose of this section is to make the observation that the combined bound \eqref{combo} is in fact optimal. This is a consequence of the following result of Kohayakawa, Lee and R\"{o}dl \cite{KLR} (we only state the parts of the result which are relevant to our analysis).
\begin{theorem}[\cite{KLR}, Theorem 1.1] \label{thm:KLR}
Let $1/3 \leq a \leq 1$ be a fixed constant and $m=n^a(1+o(1))$. Let $B \subseteq [n]$ be a random set of size $m$ (i.e. $B$ is chosen randomly from all sets of size $m$). Then, almost surely,
\begin{enumerate}
\item if $1/3 \leq a \leq 2/3$ then $s_+(B) =n^{1/3+o(1)}$,
\item if $2/3 \leq a \leq 1$ then $s_+(B)=|B|^{1/2+o(1)}$.
\end{enumerate}
\end{theorem}
The $o(1)$ terms in the exponents suppress logarithmic factors. A more precise version of this statement is given in \cite[Theorems 2.2-2.4]{KLR}.
For a random set $B \subset [n]$ of size $m$, the expected size of $E_+(B)$ is
\begin{equation}\label{energy}
cn^3 \frac{\binom{n-4}{m-4}}{\binom{n}{m}}=c'\frac{m^4}{n}.
\end{equation}
Part (2) of Theorem \ref{thm:KLR} implies that, for a random set $B \subset [n]$ of size \linebreak $n^{2/3+o(1)}\leq|B| \leq n$, the estimate $s_+(B) \gg |B|^{1/2}$ contained in \eqref{combo} is tight, up to the $o(1)$ factor. By \eqref{energy} these sets will typically have far from maximal additive energy, and taking $m$ close to $n^{2/3}$ yields a set $B$ with $E_+(B) \approx |B|^{5/2}$ and $s_+(B)$ very small.
Furthermore we have, with high probability,
\[
\frac{ |B|^{4/3}}{E_+(B)^{1/3}} \approx n^{1/3},
\]
and thus taking $B$ to be a random subset of $[n]$ with size $n^a$, $1/3 \leq a \leq 2/3$, the estimate from Lemma \ref{lem:random} matches the information $s_+(B)=n^{1/3 +o(1)}$ given by part (1) of Theorem \ref{thm:KLR}, up to the $o(1)$ factor.
\subsection{A variant of the Klurman-Pohoata Conjecture}
Conjecture \ref{conj:main} could be viewed as a possible line of attack for the sum-product problem, since the inequalities
\[
|A+A| \gg s_+(A)^2 ,\,\,\,\,\,\, |AA| \gg s_*(A)^2
\]
imply that a positive answer to Conjecture \ref{conj} would give a non-trivial sum-product bound. Unfortunately, the construction in Theorem \ref{thm:main} shows that even the best possible result in this direction would not yield quantitative improvements to known sum-product inequalities.
However, it is not necessary that a set be additively/multiplicatively Sidon in order for it to determine many sums/products. A weaker assumption that the additive or multiplicative energy is small would suffice, in light of the usual Cauchy-Schwarz energy bounds
\[
E_+(A) \geq \frac{|A|^4}{|A+A|},\,\,\,\,\,\,\,E_*(A) \geq \frac{|A|^4}{|AA|}.
\]
With this in mind, we propose a variant of Conjecture \ref{conj:main}. For a set $A \subset \mathbb R$, define\footnote{The multiplicative constant $2$ in the definition of $t_+(A)$ is not particularly important, but is chosen so that at least half of the contributions to $E_+(A')$ come from the $|A'|^2$ trivial solutions.} $t_+(A)$ to be the size of the largest subset $A' \subset A$ such that
\[
E_+(A') <2|A'|^2.
\]
Similarly, $t_*(A)$ denotes the size of the largest $A' \subset A$ such that $E_*(A') <2|A'|^2$.
\begin{question} \label{question}
For what value of $\kappa>0$ is it true that any finite set $A \subseteq \mathbb R$ satisfies
\[
\max \{ t_+(A), t_*(A)\} \geq |A|^{\kappa}.
\]
\end{question}
The bound
\begin{equation} \label{basic}
\max \{ t_+(A), t_*(A)\} \gg |A|^{1/2}
\end{equation}
follows immediately from the result of Komlos, Sulyok and Szemer\'{e}di \cite{KSS}, and can also be proved by much simpler means. For this question, an improvement of \eqref{basic} follows from the Balog-Wooley Theorem. We will use the following result of Rudnev, Shkredov and Stevens \cite{EnergyVariant}.
\begin{theorem} \label{thm:BW}
Let $A \subset \mathbb R$. Then there exists $A' \subset A$ with $|A'| \geq |A|/2$ and
\[
\min \{E_+(A'), E^*(A')\} \ll |A|^{11/4}.
\]
\end{theorem}
We prove the following.
\begin{theorem}
For any $A \subset \mathbb R$,
\[
\max \{ t_+(A), t_*(A)\} \gg |A|^{5/8}.
\]
\end{theorem}
\begin{proof}
Apply Theorem \ref{thm:BW} to obtain a subset $A'$ and suppose that $E_+(A') \leq C|A|^{11/4}$. Let $A''$ be a $p$-random subset of $A'$, with $p=\frac{1}{100C^{1/2}|A|^{3/8}}$. The expected size of $A''$ is at least $p|A|/2$. Let $E_+^0(A'')$ denote the number of non-trivial solutions to
\[
a_1+a_2=a_3+a_4 \text{ such that } a_i \in A''.
\]
The expected value of $E_+^0(A'')$ is at most
\[
Cp^4|A|^{11/4}+p^3|A|^2.
\]
By Markov's inequality, the probability that
\begin{equation} \label{event1}
E_+^0(A'') \geq \frac{1}{100}p^2|A|^2
\end{equation}
is at most $1/10$. By Chebyshev, the probability that
\begin{equation} \label{event2}
|A''| <\frac{1}{10}p|A|
\end{equation}
is at most $1/10$. Therefore, with positive probability both events \eqref{event1} and \eqref{event2} do not occur. It therefore follows that there exists a set $A'' \subset A$ such that
\[
|A''| \gg |A|^{5/8}
\]
and
\[
E_+^0(A'') < \frac{1}{100}p^2|A|^2 \leq |A''|^2.
\]
In particular, $E_+(A'') < 2|A''|^2$, and it follows that
\[
t_+(A) \gg |A|^{5/8}.
\]
If instead we have $E^*(A') \leq C|A|^{11/4}$ at the outset, we can run the same argument in the multiplicative setting and conclude that
\[
t_*(A) \gg |A|^{5/8}.
\]
\end{proof}
Note that a small improvement to this result can be obtained by instead applying a quantitative improvement to Theorem \ref{thm:BW}, due to Shakan \cite{Shakan}, but we have avoided this above in order to simplify the presentation. It can be calculated that this change to the proof results in the improved bound
\[
\max \{ t_+(A), t_*(A)\} \gg |A|^{33/52-o(1)}.
\]
Note that $33/52=5/8+1/104$.
The construction in the proof of Theorem \ref{thm:main} does not give a non-trivial construction for Question \ref{question}. However, the original construction of Balog and Wooley \ref{BW} does yield the following.
\begin{theorem} \label{thm:tupper}
There exists a finite set $A \subset \mathbb R$ such that
\[
\max \{ t_+(A), t_*(A)\} \ll |A|^{5/6}
\]
\end{theorem}
\begin{proof}
Define
\[
A:= \{ (2i-1)2^j : i \in [N^2], j \in [N]\}.
\]
This set is a union of $N$ arithmetic progressions of length $N^2$, and since any solution to $(2i-1)2^j = (2i'-1)2^{j'}$ implies that $i=i'$ and $j=j'$, we have that $|A| = N^3$. Suppose that $|A'| \geq C|A|^{5/6} = CN^{5/2}$ for a sufficiently large constant $C$. Note that since
$$AA \subseteq \{ (2i-1)2^j : i \in [2N^4], j \in [2N]\} $$
we have $|A'A'| \leq |AA| \leq 4N^5$. Applying the Cauchy Schwarz energy bound then yields
$$E_*(A') \geq \frac{|A'|^4}{|A'A'|} \geq \frac{C^2}{4}|A'|^2.$$
Therefore, as long as $C$ is sufficiently large we must have $t_*(A) \leq C|A|^{5/6}$.
To show that $t_+(A) \ll |A|^{5/6}$, we define
$$A_j = \{ (2i-1)2^j : i \in [N^2]\}$$
noting that we have $A = \bigcup_{j\in [N]}A_j$, and that each $A_j$ is an arithmetic progression with $|A_j| = N^2$. Let us define
$$I := \left\{ j \in [N] : |A' \cap A_j| \geq 2|A'|^{1/3}N^{2/3}\right\}.$$
We then have
\begin{align*}
|A'| & = \sum_{j \in [N]} |A' \cap A_j| \\
& = \sum_{j \in I} |A' \cap A_j| + \sum_{j \notin I} |A' \cap A_j| \\
& \leq \sum_{j \in I} |A' \cap A_j| + 2|A'|^{1/3}N^{5/3}.
\end{align*}
We now bound the energy of $A'$.
\begin{align*}
E(A') & \geq \sum_{j \in I}E(A' \cap A_j) \\
& \geq \sum_{j \in I} \frac{|A' \cap A_j|^4}{|A_j + A_j|} \\ & \gg \frac{1}{N^2} \sum_{j \in I}|A' \cap A_j|^4 \\
& \geq 8|A'| \sum_{j \in I}|A' \cap A_j| \\
& \geq 8|A'|^2 - 16|A'|^{4/3}N^{5/3}.
\end{align*}
From the final inequality it follows that $E(A') \geq 2|A'|^2$ as long as the constant $C$ is sufficiently large. Therefore $t_+(A) \ll |A|^{5/6}$, proving the result.
\end{proof}
Note that the bound $|AA| \leq N^5$ above is slightly wasteful and can be improved by a logarithmic factor. Using this fact and slightly rebalancing the construction of $A$ above gives the small improvement
\[
\max \{ t_+(A), t_*(A)\} \ll \frac{|A|^{5/6}}{\log^{c}|A|}
\]
for some constant $c>0$.
\subsection{Connection to Balog-Wooley decomposition}
Conjecture \eqref{conj} is also connected to a question of Balog and Wooley \cite{BW}: For which $\kappa>0$ is it true that any finite set $A \subseteq \mathbb R$ can always be partitioned into two subsets $B$ and $C$, such that
\begin{equation}\label{BW} \max \{ E_+(B), E_*(C)\} \ll |A|^{3 - \kappa}.\end{equation}
A construction is given in \cite{BW} (and which was repeated here in the proof of Theorem \ref{thm:tupper}) proving that any such result must have $\kappa < 2/3$. Although the authors do not go as far as to conjecture that an exponent of $7/3$ is attainable in \eqref{BW}, a similar conjecture is stated in \cite{EnergyVariant}, where the authors conjecture that for all finite $A \subseteq \mathbb R$, there exists a subset $A' \subseteq A$ with $|A'| \geq \frac{|A|}{2}$ such that
\begin{equation}\label{BWvariant} \min \{ E_+(A'), E_*(A') \} \ll |A|^{7/3+o(1)}.\end{equation}
A positive answer to this conjecture would imply a positive answer to Conjecture \ref{conj:main}. Indeed, utilising Lemma \ref{lem:random} (or possibly its multiplicative analogue), the subset $A'$ satisfies
$$|A|^{5/9-o(1)}\ll |A'|^{5/9-o(1)} \ll \max\{s_+(A'), s_*(A') \} \leq \max\{s_+(A), s_*(A) \},$$
thus giving Conjecture \ref{conj:main} with $c = 1/18-o(1)$. Weaker variants of conjecture \eqref{BWvariant} also imply Conjecture \ref{conj:main}, as long as the exponent is at most $5/2 - \epsilon$. Stating this in the contrapositive, any construction disproving Conjecture \ref{conj:main} also disproves strong Balog Wooley type conjectures.
\section{Further remarks}
\subsection{Small sum set implies large $s_*(A)$?}
Another conjecture of Klurman and Pohoata was the following: for all $\epsilon>0$, and any set $A \subset \mathbb R$
\begin{equation} \label{conj3}
|A+A| \leq K|A| \Rightarrow s_*(A) \gg_{K,\epsilon} |A|^{1-\epsilon}.
\end{equation}
By combining the multiplicative analogue of Lemma \ref{lem:random} with Solymosi's \cite{S} bound on the multiplicative energy via sumsets, they proved that
\begin{equation} \label{optimal}
|A+A| \leq K|A| \Rightarrow s_*(A) \gg \frac{|A|^{2/3}}{K^{2/3} (\log |A|)^{1/3}}.
\end{equation}
The construction given in the proof of Theorem \ref{thm:main} disproves the conjecture \eqref{conj3}, at least in the range when $K= \log^c |A|$. Indeed, we recorded in $\eqref{sumset}$ that the construction satisfies $|A+A| \ll |A|\log^2|A|$. Moreover, since we have $s_*(A) \ll |A|^{2/3}$, this construction also shows that the bound \eqref{optimal} is in fact optimal in this range, up to logarithmic factors.
\subsection{Other constructions}
Theorem \ref{thm:main} was obtained independently by Green and Peluse (private communication). We thank them for sharing their construction with us. The construction is similar to the set $A$ defined in the proof of Theorem \ref{thm:main}. Paraphrasing slightly, they define a set
\[
B=\{p_1p_2p_3 : 1 \leq p_i \leq N, \text{ $p_i$ prime} \}.
\]
The set $B$ is a dense enough in $[N^3]$ to ensure that its sum set is small and thus $s_+(B)$ is small. On the other hand, and similarly to our proof of Theorem \ref{thm:main}, an application of the Cauchy-Schwarz inequality can be used to show that any subset of $B$ larger than $C|B|^{2/3}$ must contain four elements of the form
\[pqr, p'qr, pq'r', p'q'r',\]
which gives rise to a non-trivial multiplicative energy solution $(pqr)(p'q'r')=(p'qr)(pq'r')$.
In a forthcoming paper, Shkredov \cite{Shk} gives another construction of a set with $\max \{s_+(A),s_*(A) \} \ll |A|^{2/3}$. His construction is somewhat different in nature, and comes from taking $A$ to be a sum set of carefully chosen geometric progressions.
\section*{Acknowledgements}
The authors were supported by the Austrian Science Fund FWF Projects P 30405-N32 and P 34180. We are very grateful to Cosmin Pohoata for bringing this problem to our attention, and for several helpful discussions. Thanks also to Ben Green, Oleksiy Klurman, Sarah Peluse, Ilya Shkredov and Sophie Stevens for helpful discussions.
\providecommand{\bysame}{\leavevmode\hbox to3em{\hrulefill}\thinspace}
|
{
"redpajama_set_name": "RedPajamaArXiv"
}
| 7,672
|
First, why is it necessary to perform a Sub-Zero condenser cleaning?
To help ensure efficiency and proper operation, the condenser on your refrigerator must be cleaned regularly. The condenser relies on airflow to work properly and any obstruction can cause the unit to fail. There are three reasons to vaccuum the condenser.
If the condenser is not cleaned properly, mechanical components in the unit may fail prematurely.
Use a soft-bristle brush and vacuum to remove dust and lint from the condenser.
To avoid bending the condenser fins, vacuum up and down in the direction of the fins.
Be sure to wear gloves to avoid injury from the sharp condenser fins.
We can help you over the phone, or you can schedule the annual condenser cleaning at a discounted rate. If you would rather a professional handle the job, please schedule annual service today.
|
{
"redpajama_set_name": "RedPajamaC4"
}
| 3,964
|
{"url":"http:\/\/arxitics.com\/articles\/hep-ph\/9812288","text":"## arXiv Analytics\n\n### arXiv:hep-ph\/9812288AbstractReferencesReviewsResources\n\n#### Lattice QCD Calculations of Leptonic and Semileptonic Decays\n\nPublished 1998-12-09Version 1\n\nIn lattice QCD, obtaining properties of heavy-light mesons has been easier said than done. Focusing on the $B$ meson's decay constant, it is argued that towards the end of 1997 the last obstacles were removed, at least in the quenched approximation. These developments, which resulted from a fuller understanding and implementation of ideas in effective field theory, bode well for current studies of neutral meson mixing and of semileptonic decays.\n\nComments: Invited talk at the Workshop on Heavy Quarks at Fixed Target, October 10-12, 1998, Fermi National Accelerator Laboratory\nCategories: hep-ph, hep-lat\nSubjects: 13.20.He, 12.38.Gc\nRelated articles: Most relevant\u2002|\u2002Search more\narXiv:1301.4467 [hep-ph] (Published 2013-01-18)\nEffective Field Theory for Long Strings\narXiv:hep-ph\/0011336 (Published 2000-11-28, updated 2001-08-02)\nAn effective field theory for collinear and soft gluons: heavy to light decays\narXiv:0907.4142 [hep-ph] (Published 2009-07-23)\nX(3872) in Effective Field Theory","date":"2019-12-13 08:19:26","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 1, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 0, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.6288052797317505, \"perplexity\": 6492.820209220556}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 5, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2019-51\/segments\/1575540551267.14\/warc\/CC-MAIN-20191213071155-20191213095155-00451.warc.gz\"}"}
| null | null |
{"url":"http:\/\/mathoverflow.net\/questions\/134580\/lattice-basis-reductions-and-finding-minimal-values","text":"# Lattice basis reductions and finding minimal values\n\nWhile reading several articles about lattice basis reduction I am left with a few questions.\n\nFor one, I came across this piece of text\n\nLet $\\alpha$ and $\\beta \\in \\mathbb{R}$. Also let $X>0$ and $X$ is large. Then to compute $x,y \\in \\mathbb{Z}$ with $\\text{max} (|x|,|y|) \\le X$ and such that $|\\alpha x + \\beta y|$ is minimal we apply the lattice basis reduction to the lattice generated by the columns ${1 \\choose C\\alpha}$ and ${0 \\choose C\\beta}$ for $C$ large enough.\n\nMy question is where is the $C$ coming from? When is it large enough? It obviously depends on something... maybe on $X ?$\n\nAll hints, examples or explanations are very much welcome.\n\n-\ncrossposted at math.stackexchange.com\/questions\/427934\/\u2026 \u2013\u00a0 Will Jagy Jun 24 '13 at 4:57\nactually this is a different question... \u2013\u00a0 Zoe Jun 24 '13 at 5:18\nLooks very similar to the MSE one \u2013\u00a0 Yemon Choi Jun 24 '13 at 9:43","date":"2014-04-19 22:07:05","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 1, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 0, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.8007894158363342, \"perplexity\": 430.7375609146732}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2014-15\/segments\/1397609537754.12\/warc\/CC-MAIN-20140416005217-00354-ip-10-147-4-33.ec2.internal.warc.gz\"}"}
| null | null |
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = global || self, factory(global.window = global.window || {}));
}(this, (function (exports) { 'use strict';
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
}
}
function _createClass(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
return Constructor;
}
var gsap,
_coreInitted,
_clamp,
_win,
_doc,
_docEl,
_body,
_isTouch,
_pointerType,
ScrollTrigger,
_root,
_normalizer,
_getGSAP = function _getGSAP() {
return gsap || typeof window !== "undefined" && (gsap = window.gsap) && gsap.registerPlugin && gsap;
},
_startup = 1,
_observers = [];
exports._scrollers = [];
exports._proxies = [];
var _getTime = Date.now,
_bridge = function _bridge(name, value) {
return value;
},
_integrate = function _integrate() {
var core = ScrollTrigger.core,
data = core.bridge || {},
scrollers = core._scrollers,
proxies = core._proxies;
scrollers.push.apply(scrollers, exports._scrollers);
proxies.push.apply(proxies, exports._proxies);
exports._scrollers = scrollers;
exports._proxies = proxies;
_bridge = function _bridge(name, value) {
return data[name](value);
};
},
_getProxyProp = function _getProxyProp(element, property) {
return ~exports._proxies.indexOf(element) && exports._proxies[exports._proxies.indexOf(element) + 1][property];
},
_isViewport = function _isViewport(el) {
return !!~_root.indexOf(el);
},
_addListener = function _addListener(element, type, func, nonPassive) {
return element.addEventListener(type, func, {
passive: !nonPassive
});
},
_removeListener = function _removeListener(element, type, func) {
return element.removeEventListener(type, func);
},
_scrollLeft = "scrollLeft",
_scrollTop = "scrollTop",
_onScroll = function _onScroll() {
return _normalizer && _normalizer.isPressed || exports._scrollers.cache++;
},
_scrollCacheFunc = function _scrollCacheFunc(f) {
return function (value) {
if (value || value === 0) {
_startup && (_win.history.scrollRestoration = "manual");
f(value);
f.v = value;
f.c = exports._scrollers.cache;
_normalizer && _normalizer.isPressed && _bridge("ss", value);
} else if (exports._scrollers.cache !== f.c || _bridge("ref")) {
f.c = exports._scrollers.cache;
f.v = f();
}
return f.v;
};
},
_horizontal = {
s: _scrollLeft,
p: "left",
p2: "Left",
os: "right",
os2: "Right",
d: "width",
d2: "Width",
a: "x",
sc: _scrollCacheFunc(function (value) {
return arguments.length ? _win.scrollTo(value, _vertical.sc()) : _win.pageXOffset || _doc[_scrollLeft] || _docEl[_scrollLeft] || _body[_scrollLeft] || 0;
})
},
_vertical = {
s: _scrollTop,
p: "top",
p2: "Top",
os: "bottom",
os2: "Bottom",
d: "height",
d2: "Height",
a: "y",
op: _horizontal,
sc: _scrollCacheFunc(function (value) {
return arguments.length ? _win.scrollTo(_horizontal.sc(), value) : _win.pageYOffset || _doc[_scrollTop] || _docEl[_scrollTop] || _body[_scrollTop] || 0;
})
},
_getTarget = function _getTarget(t) {
return gsap.utils.toArray(t)[0] || (typeof t === "string" && gsap.config().nullTargetWarn !== false ? console.warn("Element not found:", t) : null);
},
_getScrollFunc = function _getScrollFunc(element, _ref) {
var s = _ref.s,
sc = _ref.sc;
var i = exports._scrollers.indexOf(element),
offset = sc === _vertical.sc ? 1 : 2;
!~i && (i = exports._scrollers.push(element) - 1);
return exports._scrollers[i + offset] || (exports._scrollers[i + offset] = _getProxyProp(element, s) || (_isViewport(element) ? sc : function (value) {
return arguments.length ? element[s] = value : element[s];
}));
},
_getVelocityProp = function _getVelocityProp(value, minTimeRefresh, useDelta) {
var v1 = value,
v2 = value,
t1 = _getTime(),
t2 = t1,
min = minTimeRefresh || 50,
dropToZeroTime = Math.max(500, min * 3),
update = function update(value, force) {
var t = _getTime();
if (force || t - t1 > min) {
v2 = v1;
v1 = value;
t2 = t1;
t1 = t;
} else if (useDelta) {
v1 += value;
} else {
v1 = v2 + (value - v2) / (t - t2) * (t1 - t2);
}
},
reset = function reset() {
v2 = v1 = useDelta ? 0 : v1;
t2 = t1 = 0;
},
getVelocity = function getVelocity(latestValue) {
var tOld = t2,
vOld = v2,
t = _getTime();
(latestValue || latestValue === 0) && latestValue !== v1 && update(latestValue);
return t1 === t2 || t - t2 > dropToZeroTime ? 0 : (v1 + (useDelta ? vOld : -vOld)) / ((useDelta ? t : t1) - tOld) * 1000;
};
return {
update: update,
reset: reset,
getVelocity: getVelocity
};
},
_getEvent = function _getEvent(e, preventDefault) {
preventDefault && e.preventDefault();
return e.changedTouches ? e.changedTouches[0] : e;
},
_getAbsoluteMax = function _getAbsoluteMax(a) {
var max = Math.max.apply(Math, a),
min = Math.min.apply(Math, a);
return Math.abs(max) >= Math.abs(min) ? max : min;
},
_initCore = function _initCore(core) {
gsap = core || _getGSAP();
if (gsap && !_coreInitted && typeof document !== "undefined") {
_win = window;
_doc = document;
_docEl = _doc.documentElement;
_body = _doc.body;
_root = [_win, _doc, _docEl, _body];
_clamp = gsap.utils.clamp;
_pointerType = "onpointerenter" in _body ? "pointer" : "mouse";
_isTouch = Observer.isTouch = _win.matchMedia && _win.matchMedia("(hover: none), (pointer: coarse)").matches ? 1 : "ontouchstart" in _win || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0 ? 2 : 0;
setTimeout(function () {
return _startup = 0;
}, 500);
_coreInitted = 1;
}
return _coreInitted;
};
_horizontal.op = _vertical;
exports._scrollers.cache = 0;
var Observer = function () {
function Observer(vars) {
this.init(vars);
}
var _proto = Observer.prototype;
_proto.init = function init(vars) {
_coreInitted || _initCore(gsap) || console.warn("Please gsap.registerPlugin(Observer)");
if (!ScrollTrigger) {
ScrollTrigger = gsap.core.globals().ScrollTrigger;
ScrollTrigger && ScrollTrigger.core && _integrate();
}
var tolerance = vars.tolerance,
dragMinimum = vars.dragMinimum,
type = vars.type,
target = vars.target,
lineHeight = vars.lineHeight,
debounce = vars.debounce,
preventDefault = vars.preventDefault,
onStop = vars.onStop,
onStopDelay = vars.onStopDelay,
ignore = vars.ignore,
wheelSpeed = vars.wheelSpeed,
event = vars.event,
onDragStart = vars.onDragStart,
onDragEnd = vars.onDragEnd,
onDrag = vars.onDrag,
onPress = vars.onPress,
onRelease = vars.onRelease,
onRight = vars.onRight,
onLeft = vars.onLeft,
onUp = vars.onUp,
onDown = vars.onDown,
onChangeX = vars.onChangeX,
onChangeY = vars.onChangeY,
onChange = vars.onChange,
onToggleX = vars.onToggleX,
onToggleY = vars.onToggleY,
onHover = vars.onHover,
onHoverEnd = vars.onHoverEnd,
onMove = vars.onMove,
ignoreCheck = vars.ignoreCheck,
isNormalizer = vars.isNormalizer,
onGestureStart = vars.onGestureStart,
onGestureEnd = vars.onGestureEnd,
onWheel = vars.onWheel,
onEnable = vars.onEnable,
onDisable = vars.onDisable,
onClick = vars.onClick;
this.target = target = _getTarget(target) || _docEl;
this.vars = vars;
ignore && (ignore = gsap.utils.toArray(ignore));
tolerance = tolerance || 0;
dragMinimum = dragMinimum || 0;
wheelSpeed = wheelSpeed || 1;
type = type || "wheel,touch,scroll,pointer";
debounce = debounce !== false;
lineHeight || (lineHeight = parseFloat(_win.getComputedStyle(_body).lineHeight) || 22);
var id,
onStopDelayedCall,
dragged,
moved,
wheeled,
self = this,
prevDeltaX = 0,
prevDeltaY = 0,
scrollFuncX = _getScrollFunc(target, _horizontal),
scrollFuncY = _getScrollFunc(target, _vertical),
scrollX = scrollFuncX(),
scrollY = scrollFuncY(),
events = ("ontouchstart" in _docEl ? "touchstart,touchmove,touchcancel,touchend" : type.indexOf("pointer") >= 0 && !("onpointerdown" in _docEl) ? "mousedown,mousemove,mouseup,mouseup" : "pointerdown,pointermove,pointercancel,pointerup").split(","),
limitToTouch = ~type.indexOf("touch") && !~type.indexOf("pointer") && events[0] === "pointerdown",
isViewport = _isViewport(target),
ownerDoc = target.ownerDocument || _doc,
deltaX = [0, 0, 0],
deltaY = [0, 0, 0],
_ignoreCheck = function _ignoreCheck(e, isPointerOrTouch) {
return (self.event = e) && ignore && ~ignore.indexOf(e.target) || isPointerOrTouch && limitToTouch && e.pointerType !== "touch" || ignoreCheck && ignoreCheck(e);
},
onStopFunc = function onStopFunc() {
self._vx.reset();
self._vy.reset();
onStopDelayedCall.pause();
onStop && onStop(self);
},
update = function update() {
var dx = self.deltaX = _getAbsoluteMax(deltaX),
dy = self.deltaY = _getAbsoluteMax(deltaY),
changedX = Math.abs(dx) >= tolerance,
changedY = Math.abs(dy) >= tolerance;
onChange && (changedX || changedY) && onChange(self, dx, dy, deltaX, deltaY);
if (changedX) {
onRight && self.deltaX > 0 && onRight(self);
onLeft && self.deltaX < 0 && onLeft(self);
onChangeX && onChangeX(self);
onToggleX && self.deltaX < 0 !== prevDeltaX < 0 && onToggleX(self);
prevDeltaX = self.deltaX;
deltaX[0] = deltaX[1] = deltaX[2] = 0;
}
if (changedY) {
onDown && self.deltaY > 0 && onDown(self);
onUp && self.deltaY < 0 && onUp(self);
onChangeY && onChangeY(self);
onToggleY && self.deltaY < 0 !== prevDeltaY < 0 && onToggleY(self);
prevDeltaY = self.deltaY;
deltaY[0] = deltaY[1] = deltaY[2] = 0;
}
if (moved) {
onMove(self);
moved = false;
}
if (dragged) {
onDrag(self);
dragged = false;
}
if (wheeled) {
onWheel(self);
wheeled = false;
}
id = 0;
},
onDelta = function onDelta(x, y, index) {
deltaX[index] += x;
deltaY[index] += y;
self._vx.update(x, index === 2);
self._vy.update(y, index === 2);
debounce ? id || (id = requestAnimationFrame(update)) : update();
},
_onDrag = function _onDrag(e) {
if (_ignoreCheck(e, 1)) {
return;
}
e = _getEvent(e, preventDefault);
var x = e.clientX,
y = e.clientY,
dx = x - self.x,
dy = y - self.y,
isDragging = self.isDragging;
self.x = x;
self.y = y;
if (isDragging || Math.abs(self.startX - x) >= dragMinimum || Math.abs(self.startY - y) >= dragMinimum) {
onDrag && (dragged = true);
isDragging || (self.isDragging = true);
onDelta(dx, dy, 2);
isDragging || onDragStart && onDragStart(self);
}
},
_onPress = self.onPress = function (e) {
if (_ignoreCheck(e, 1)) {
return;
}
onStopDelayedCall.pause();
self.isPressed = true;
e = _getEvent(e, preventDefault);
prevDeltaX = prevDeltaY = 0;
self.startX = self.x = e.clientX;
self.startY = self.y = e.clientY;
self._vx.reset();
self._vy.reset();
_addListener(isNormalizer ? target : ownerDoc, events[1], _onDrag, preventDefault);
self.deltaX = self.deltaY = 0;
onPress && onPress(self);
},
_onRelease = function _onRelease(e) {
if (_ignoreCheck(e, 1)) {
return;
}
_removeListener(isNormalizer ? target : ownerDoc, events[1], _onDrag);
var wasDragging = self.isDragging;
if (!wasDragging) {
self._vx.reset();
self._vy.reset();
}
self.isDragging = self.isGesturing = self.isPressed = false;
onStop && !isNormalizer && onStopDelayedCall.restart(true);
onDragEnd && wasDragging && onDragEnd(self);
onRelease && onRelease(self, wasDragging);
},
_onGestureStart = function _onGestureStart(e) {
return e.touches && e.touches.length > 1 && (self.isGesturing = true) && onGestureStart(e, self.isDragging);
},
_onGestureEnd = function _onGestureEnd() {
return (self.isGesturing = false) || onGestureEnd(self);
},
onScroll = function onScroll(e) {
if (_ignoreCheck(e)) {
return;
}
var x = scrollFuncX(),
y = scrollFuncY();
onDelta(x - scrollX, y - scrollY, 1);
scrollX = x;
scrollY = y;
onStop && onStopDelayedCall.restart(true);
},
_onWheel = function _onWheel(e) {
if (_ignoreCheck(e)) {
return;
}
e = _getEvent(e, preventDefault);
onWheel && (wheeled = true);
var multiplier = (e.deltaMode === 1 ? lineHeight : e.deltaMode === 2 ? _win.innerHeight : 1) * wheelSpeed;
onDelta(e.deltaX * multiplier, e.deltaY * multiplier, 0);
onStop && !isNormalizer && onStopDelayedCall.restart(true);
},
_onMove = function _onMove(e) {
if (_ignoreCheck(e)) {
return;
}
var x = e.clientX,
y = e.clientY,
dx = x - self.x,
dy = y - self.y;
self.x = x;
self.y = y;
onMove && (moved = true);
(dx || dy) && onDelta(dx, dy, 2);
},
_onHover = function _onHover(e) {
self.event = e;
onHover(self);
},
_onHoverEnd = function _onHoverEnd(e) {
self.event = e;
onHoverEnd(self);
},
_onClick = function _onClick(e) {
return _ignoreCheck(e) || _getEvent(e, preventDefault) && onClick(self);
};
onStopDelayedCall = self._dc = gsap.delayedCall(onStopDelay || 0.25, onStopFunc).pause();
self.deltaX = self.deltaY = 0;
self._vx = _getVelocityProp(0, 50, true);
self._vy = _getVelocityProp(0, 50, true);
self.scrollX = scrollFuncX;
self.scrollY = scrollFuncY;
self.isDragging = self.isGesturing = self.isPressed = false;
self.enable = function (e) {
if (!self.isEnabled) {
_addListener(isViewport ? ownerDoc : target, "scroll", _onScroll);
type.indexOf("scroll") >= 0 && _addListener(isViewport ? ownerDoc : target, "scroll", onScroll, preventDefault);
type.indexOf("wheel") >= 0 && _addListener(target, "wheel", _onWheel, preventDefault);
if (type.indexOf("touch") >= 0 && _isTouch || type.indexOf("pointer") >= 0) {
_addListener(target, events[0], _onPress, preventDefault);
_addListener(ownerDoc, events[2], _onRelease);
_addListener(ownerDoc, events[3], _onRelease);
onClick && _addListener(target, "click", _onClick);
onGestureStart && _addListener(ownerDoc, "gesturestart", _onGestureStart);
onGestureEnd && _addListener(ownerDoc, "gestureend", _onGestureEnd);
onHover && _addListener(target, _pointerType + "enter", _onHover);
onHoverEnd && _addListener(target, _pointerType + "leave", _onHoverEnd);
onMove && _addListener(target, _pointerType + "move", _onMove);
}
self.isEnabled = true;
e && e.type && _onPress(e);
onEnable && onEnable(self);
}
return self;
};
self.disable = function () {
if (self.isEnabled) {
_observers.filter(function (o) {
return o !== self && _isViewport(o.target);
}).length || _removeListener(isViewport ? ownerDoc : target, "scroll", _onScroll);
_removeListener(isViewport ? ownerDoc : target, "scroll", onScroll);
_removeListener(target, "wheel", _onWheel);
_removeListener(target, events[0], _onPress);
_removeListener(ownerDoc, events[2], _onRelease);
_removeListener(ownerDoc, events[3], _onRelease);
_removeListener(target, "click", _onClick);
_removeListener(ownerDoc, "gesturestart", _onGestureStart);
_removeListener(ownerDoc, "gestureend", _onGestureEnd);
_removeListener(target, _pointerType + "enter", _onHover);
_removeListener(target, _pointerType + "leave", _onHoverEnd);
_removeListener(target, _pointerType + "move", _onMove);
self.isEnabled = false;
onDisable && onDisable(self);
}
};
self.kill = function () {
self.disable();
var i = _observers.indexOf(self);
i >= 0 && _observers.splice(i, 1);
_normalizer === self && (_normalizer = 0);
};
_observers.push(self);
isNormalizer && (_normalizer = self);
self.enable(event);
};
_createClass(Observer, [{
key: "velocityX",
get: function get() {
return this._vx.getVelocity();
}
}, {
key: "velocityY",
get: function get() {
return this._vy.getVelocity();
}
}]);
return Observer;
}();
Observer.version = "3.10.0";
Observer.create = function (vars) {
return new Observer(vars);
};
Observer.register = _initCore;
Observer.getAll = function () {
return _observers.slice();
};
Observer.getById = function (id) {
return _observers.filter(function (o) {
return o.vars.id === id;
})[0];
};
_getGSAP() && gsap.registerPlugin(Observer);
exports.Observer = Observer;
exports._getProxyProp = _getProxyProp;
exports._getScrollFunc = _getScrollFunc;
exports._getTarget = _getTarget;
exports._getVelocityProp = _getVelocityProp;
exports._horizontal = _horizontal;
exports._isViewport = _isViewport;
exports._vertical = _vertical;
exports.default = Observer;
if (typeof(window) === 'undefined' || window !== exports) {Object.defineProperty(exports, '__esModule', { value: true });} else {delete window.default;}
})));
|
{
"redpajama_set_name": "RedPajamaGithub"
}
| 7,670
|
About Dram
SBP/DRAM Awards
Eight companies in Scotland have fastest-growing international sales in UK
Brewdog is among eight companies on the 11th annual Sunday Times HSBC International Track 200 league table that ranks Britain's mid-market private companies with the fastest-growing international sales, climbing from 168th position on 2019's list to number 47 on this year's – the second highest ranking for a Scottish company.
Scotland's top-ranked company is Vegware (No.37), which manufactures eco-friendly, compostable packaging materials from plant-based materials. Its international sales grew at an average of 81% per year over its last two years, reaching £11.4m in 2019, on total sales of £32.2m.
Dundee is home to employee development consultancy Insights Group – which features for the first time with international sales growing at an average of 40% per year over two years to £52m in 2019, on total sales of £65.9m.
Glasgow-based City Facilities Management features for the sixth time. With more than 12,000 staff, the company is the largest employer on the league table. Its international sales grew at an average annual growth rate of 33% over its last two years.
The league table programme is sponsored by HSBC, DHL Express and Oracle NetSuite, and compiled by Fast Track, the Oxford-based research and networking events firm.
The full league table is published as a ten-page supplement with the business section of The Sunday Times on 16 February, both in print and in the tablet edition, and on www.fasttrack.co.uk.
Private companies in Scotland with the fastest-growing international sales – ordered by rank
[2019 rank] Company
Activity HQ location Average annual int'l sales growth over 2 yrs Int'l sales (£m) Total sales (£m) Staff Year end Comment
37 Vegware
Compostable packaging manufacturer Edinburgh 81% 11.4 32.2 72 Jan 19 Finding a spoon made from potato and corn at a California farmers market inspired this business
[168] BrewDog
Brewery Ellon, Aberdeenshire 71% 39.3 171.6 1,247 Dec 18 In 2018, it shipped 136m bottles of craft beer globally and opened 21 bars
71 Smith Anderson
Paper bag manufacturer Kirkcaldy,
Fife 58% 5.1 26.9 227 Sep 18 Makes 60m paper bags a week and supplies McDonald's in the UK and Europe
141 Insights Group
Employee development consultancy Dundee 40% 52.0 65.9 513 Mar 19 Has employees in 18 countries after opening offices in Mumbai, Sydney and Johannesburg in 2019
158 prosource.it
IT services provider Aberdeen 36% *24.5 *64.2 269 Jun 19 Its five global offices have worked with firms in more than 25 countries
[170] EnerMech
Engineering services provider Aberdeen 33% *337.9 *414.3 3,320 Dec 18 Plans to double turnover in the Americas to more than £200m a year by 2022
[50] City Facilities Management
Facilities maintenance provider Glasgow 33% 472.7 971.2 12,217 Dec 18 Employs more than 12,000 people across Europe, Australia, America and Asia
181 Forsyths
Metal fabricator Rothes,
Moray 32% 12.4 46.8 386 Oct 18 Has opened operations in Japan and Hong Kong to meet Asian demand for its whisky stills
*Supplied by company
Posted on 13/02/2020 Updated on 13/02/2020
Category: Editors' Picks, News
Tags: Sunday Times HSBC International Track 200 league table
Cutting tax on whisky could give Exchequer an extra £750m 19/01/2021
Lockdown extended to at least mid-February 19/01/2021
Donate to the Inverarity Morton Big Wine Walk in aid of the BEN 15/01/2021
Glenmorangie strengthens executive team 15/01/2021
Insurance farce concludes as Supreme Court rules in favour of small businesses 15/01/2021
Upper Floor Finnieston House 1 The Stables Yard 1103 Argyle Street Glasgow G3 8ND
© 2021 Media World Ltd.
Site by Labb
|
{
"redpajama_set_name": "RedPajamaCommonCrawl"
}
| 6,237
|
Q: Load information from text field to table view Hi I am trying to make an app that has a text field, tableview and a button.
When you press the button it adds the information from the text field to de tableview.
Do any one know when I can find a tutorial for this? I had one on a book but I cant find it.
Thanks in advance.
Here is my code so far:
code of .h
@interface BlockNotasViewController : UIViewController <UITableViewDelegate, UITableViewDataSource> {
IBOutlet UITableView *tableNota;}
@property (strong, nonatomic) IBOutlet UITextField *textonota;
@property (nonatomic, retain) IBOutlet UITableView *tableNota;
@property (nonatomic, strong) NSMutableArray * arrayNota;
- (IBAction)AddNota:(id)sender;
@end
code of .m
- (void)viewDidLoad{
[super viewDidLoad];
self.textonota.delegate = self;
// Do any additional setup after loading the view.
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
- (BOOL)textFieldShouldReturn:(UITextField *)textField {
[textField resignFirstResponder];
return NO;
}
- (IBAction)AddNota:(id)sender {
[arrayNota addObject: textonota.text];
[tableNota reloadData];
}
//TableView------------------------------------
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return [arrayNota count];
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 1;
}
- (UITableViewCell*) tableView: (UITableView*) tableView cellForRowAtIndexPath: (NSIndexPath*) indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell* cell = [tableView dequeueReusableCellWithIdentifier: CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] init];
}
cell.textLabel.text = [arrayNota objectAtIndex: indexPath.row];
return cell;
}
//----------------------------------------------
@end
No more errors but the button doesnt do anything
A: You can set up a NSMutableArray property that contains all the cells you want to add to the tableView.
When that button is pressed, you create a cell with a tag, and set text of that cell to the text of your UITextField:
cell.textLabel.text = aUITextField.text;
then add the cell into that NSMutableArray, and call [tableView reloadData] to refresh the table view.
In cellForRowAtIndexPath:indexPath delegate, you can use that tag to determine which cell in NSMutableArray to return, for example:
[return [self.cellArray objectAtIndex:indexPath.row]];
Hope this helps! :)
A: You should keep mutable array with strings. And use this array for fill content of tableview as data source. In delegate method - (UITableViewCell*) tableView:cellForRowAtIndexPath: you will create UITableViewCell if needed like this:
- (UITableViewCell*) tableView: (UITableView*) tableView
cellForRowAtIndexPath: (NSIndexPath*) indexPath
{
UITableViewCell* cell = [tableViewdequeueReusableCellWithIdentifier: @"identifier"];
if (cell == nil)
{
cell = [[[UITableViewCell alloc] initWithStyle: UITableViewCellStyleDefault
reuseIdentifier: @"identifier"] autorelease];
}
cell.textLabel.text = [myMutableArray objectAtIndex: indexPath.row];
return cell;
}
- (NSInteger)tableView: (UITableView*) tableView numberOfRowsInSection:(NSInteger)section
{
return [myMutableArray count];
}
- (IBAction) pressButton: (id) sender
{
[myMutableArray addObject: textField.text];
[myTableView reloadData];
}
Every book for iOS developers contains information about UITableView.
Please read https://stackoverflow.com/questions/3403049/best-book-resources-for-learning-ios-programming
|
{
"redpajama_set_name": "RedPajamaStackExchange"
}
| 1,090
|
package com.qinyadan.monitor.protocol.support;
public enum CallType {
LOCAL('L'), SYNC('S'), ASYNC('A');
private char value;
CallType(char value) {
this.value = value;
}
public static CallType convert(String id) {
char v = id.charAt(0);
switch (v) {
case 'L':
return LOCAL;
case 'S':
return SYNC;
case 'A':
return ASYNC;
default:
throw new IllegalStateException("Failed to convert callType[" + id + "]");
}
}
@Override
public String toString() {
return String.valueOf(value);
}
}
|
{
"redpajama_set_name": "RedPajamaGithub"
}
| 1,076
|
\section{Introduction}
There is by now robust observational evidence supporting the
existence of $5 - 20 M_\odot$ dark objects in X-ray binary systems
and that of $10^5 - 10^9 M_\odot$ dark objects in galactic nuclei~\cite{ram}.
These objects are thought to be the black holes (BHs) predicted by General
Relativity (GR), since their characteristics cannot be explained otherwise without introducing
new physics. In 4-dimensional GR, an (uncharged)
stationary BH is described by the Kerr solution and is uniquely
characterized by two parameters, the mass $M$ and the spin angular
momentum $J$~\cite{hair}. A fundamental limit for a Kerr BH
is the bound $|a| \le 1$, where $a =
cJ/(G M^2)$ is the spin parameter, which ensures that the Kerr metric describes a BH and not
a naked singularity.
However, the evidence that the geometry around these BH
candidates is described by the Kerr metric is still circumstantial,
and the Kerr BH hypothesis mainly relies on the assumption
that GR is the correct theory of gravity.
Because GR has been tested only in the weak-field regime~\cite{will},
several authors have suggested possible ways to further test the Kerr BH hypothesis using
future, and in some cases even present, data.
More specifically, the detection of extreme mass
ratio inspirals (EMRIs, i.e. systems consisting of a stellar-mass
compact object orbiting a supermassive BH candidate)
with future space-based gravitational-wave detectors
will allow one to map the spacetime geometry
with exquisite accuracy. This is because
missions like LISA or a similar European mission will
be able to follow the stellar-mass
compact object for millions of orbits around the central supermassive BH candidate,
and therefore deviations from the Kerr geometry will lead to a phase
difference in the gravitational waveforms that grows with the number of observed cycles.
This technique is very promising and has been studied in detail by many authors~\cite{emris,hydrodrag,gair}.
Likewise, future gravitational-wave detectors will
be able to detect the quasi-normal modes of BH
candidates, and because for a Kerr BH the frequencies of these
modes depend only on the spacetime's mass $M$ and spin $J$,
any departure from this pattern will allow one to measure deviations away from the
Kerr geometry~\cite{qnm}.
The geometry around BH candidates can be constrained also
with present or future electromagnetic data.
For instance, radio timing observations allow constraints to be put
on the quadrupole moment of the compact companions of radio pulsars~\cite{wex},
while astrometric monitoring
of stars orbiting at milliparsec distances from Sgr A$^\star$ may be
used to constrain models for the supermassive BH candidate
at the center of the Galaxy~\cite{orbits}.
Constraints on the nature of BH candidates can also be
obtained by extending the methods currently used to estimate the spins of
these objects, such as X-ray continuum~\cite{continuum} and iron-K$\alpha$ measurements~\cite{iron},
observations of quasi-periodic oscillations~\cite{qpos}, and measurements of the cosmic X-ray background~\cite{agn}.
These methods can in principle be applied even with present data, provided that the systematic errors are properly understood.
Future observations of the shadow of nearby supermassive BH candidates
are another exciting possibility to test the BH paradigm~\cite{shadow}.
BH candidates are often surrounded by an accretion disk. For
the stellar-mass objects in X-ray binary systems, the disk
originates from the material stripped from the companion, while
the gas accreting onto the supermassive objects in galactic nuclei
comes from the interstellar medium. When the mass accretion
rate is moderate and the accreting gas has significant angular
momentum, the disk is geometrically thin and optically thick. The
standard framework to describe these disks is the Novikov-Thorne model~\cite{ntmod}, where the
disk lies on the equatorial plane of the system and the gas moves
on nearly geodesic circular orbits. If the central object is a BH,
the inner edge of the disk is assumed to be at the radius of the
innermost stable circular orbit (ISCO): circular orbits inside the
ISCO are radially unstable, so the gas reaches the ISCO moving on quasi-circular orbits,
and then quickly plunges into the BH.
A crucial ingredient of the Novikov-Thorne model is the assumption
that the gas does not emit additional radiation as soon as it enters
the plunging region. Numerical simulations show that deviations
from this picture are small relative to the effect of the uncertainties
in other parameters of the system~\cite{cfa} and can therefore be neglected.
(Note however that the authors of Ref.~\cite{krolik}
reach a different conclusion, because using general relativistic magneto-hydrodynamics simulations
they find that there can be significant magnetic stress inside the ISCO.)
If the central object is not a Kerr BH,
the final stages of the accretion process may be different.
In this work we focus on the so-called Manko-Novikov (MN) spacetimes~\cite{mn}.
These are stationary, axisymmetric, and asymptotically flat
exact solutions of the vacuum Einstein equations with arbitrary mass-multipole moments,
and they can therefore describe
the geometry outside a generic compact object, be it a Kerr black hole or some
other exotic object within GR. In particular, we consider a subclass of MN
spacetimes characterized by three parameters (mass $M$,
spin angular momentum $J$ and mass quadrupole moment $Q$). In
a Kerr spacetime, the quadrupole moment $Q_{\rm Kerr}$
and all the higher order multipole moments are known to be
functions of the mass and spin. Thus, if $Q=Q_{\rm Kerr}(M,J)$
our MN spacetimes exactly reduce to a Kerr BH. This
property is very convenient because it makes these spacetimes
an ideal tool to set-up a null experiment to test the BH paradigm: any experiment pointing
at a value of $Q$ significantly different from $Q_{\rm Kerr}(M,J)$
would imply that the object under consideration is
either a compact object different from a BH within GR, or a BH or a compact object in
a gravity theory different from GR. In this sense, MN spacetimes can be used not
only to test the BH hypothesis but also to test the gravity theory itself.
The accretion process in our MN spacetimes can be qualitatively different
than in a Kerr spacetime. In particular, we find that when the accreting gas
reaches the ISCO (i.e. the inner edge of the Novikov-Thorne disk model)
there are four qualitatively different possibilities:
\begin{enumerate}
\item The ISCO is {\it radially} unstable, and the gas plunges into the
compact object remaining roughly on the equatorial plane. This is the same scenario as in the Kerr case.
\item The ISCO is {\it radially} unstable and the gas
plunges, but does not reach the compact object. Instead,
it gets trapped between the object and the ISCO and
forms a thick disk.
\item The ISCO is {\it vertically} unstable, and the gas plunges into the
compact object {\it outside} the equatorial plane.
\item The ISCO is {\it vertically} unstable and the gas
plunges, but does not reach the compact object. Instead,
it gets trapped between the object and the ISCO and
forms two thick disks, above and below the equatorial plane.
\end{enumerate}
This paper is organized as follows. In Sec.~\ref{s-mn} we review
a subclass of the MN solutions, characterized by three free parameters $(M,J,Q)$,
that we use to describe the spacetime around generic
compact objects. In Sec.~\ref{s-p}, we study plunging orbits in these
MN spacetimes and we show that the accreting gas may not reach the
surface of the compact object. This may lead to the formation of
a thick disk inside the ISCO.
In Sec.~\ref{s-d} we discuss the possible astrophysical consequences of these thick disks.
Finally, in Sec.~\ref{s-c} we draw our conclusions, while in
Appendix~\ref{app} we review the theory of thick non-gravitating disks in axisymmetric stationary spacetimes, which we use to describe the thick disks inside the ISCO. In Appendix~\ref{app2} we review the thermal bremsstrahlung emission rate.
Throughout the paper we use units in which $G=c=1$,
unless stated otherwise.
\section{Manko-Novikov spacetimes \label{s-mn}}
The MN metric~\cite{mn} is a stationary, axisymmetric, and asymptotically flat
exact solution of the Einstein vacuum equations with arbitrary mass-multipole moments. In quasi-cylindrical coordinates $(\rho,z)$
and in prolate spheroidal coordinates $(x,y)$, the line element is, respectively,
\begin{widetext}
\begin{eqnarray}\label{eq-ds2}
ds^2 &=& - f \left(dt - \omega d\phi\right)^2
+ \frac{e^{2\gamma}}{f} \left(d\rho^2 + dz^2\right)
+ \frac{\rho^2}{f} d\phi^2 = \nonumber\\
&=& - f \left(dt - \omega d\phi\right)^2
+ \frac{k^2 e^{2\gamma}}{f}\left(x^2 - y^2\right)
\left(\frac{dx^2}{x^2 - 1} + \frac{dy^2}{1 - y^2}\right)
+ \frac{k^2}{f} \left(x^2 - 1\right)\left(1 - y^2\right)
d\phi^2 \, ,
\end{eqnarray}
where
\begin{eqnarray}
f = e^{2\psi} A/B\, , \quad
\omega = 2 k e^{- 2\psi} C A^{-1}
- 4 k \alpha \left(1 - \alpha^2\right)^{-1} \, , \quad
e^{2\gamma} &=& e^{2\gamma'}A \left(x^2 - 1\right)^{-1}
\left(1 - \alpha^2\right)^{-2} \, ,
\end{eqnarray}
and
\begin{eqnarray}
\psi &=& \sum_{n = 1}^{+\infty} \frac{\alpha_n P_n}{R^{n+1}}
\, , \\\label{gammapdef}
\gamma' &=& \frac{1}{2} \ln\frac{x^2 - 1}{x^2 - y^2}
+ \sum_{m,n = 1}^{+\infty} \frac{(m+1)(n+1)
\alpha_m \alpha_n}{(m+n+2) R^{m+n+2}}
\left(P_{m+1} P_{n+1} - P_m P_n\right) + \nonumber\\
&& + \left[ \sum_{n=1}^{+\infty} \alpha_n
\left((-1)^{n+1} - 1 + \sum_{k = 0}^{n}
\frac{x-y+(-1)^{n-k}(x+y)}{R^{k+1}}P_k \right) \right] \, , \\
A &=& (x^2 - 1)(1 + \tilde{a}\tilde{b})^2 - (1 - y^2)(\tilde{b} - \tilde{a})^2 \, , \\
B &=& [x + 1 + (x - 1)\tilde{a}\tilde{b}]^2 + [(1 + y)\tilde{a} + (1 - y)\tilde{b}]^2 \, , \\
C &=& (x^2 - 1)(1 + \tilde{a}\tilde{b})[\tilde{b} - \tilde{a} - y(\tilde{a} + \tilde{b})]
+ (1 - y^2)(\tilde{b} - \tilde{a})[1 + \tilde{a}\tilde{b} + x(1 - \tilde{a}\tilde{b})] \, , \\\label{adef}
\tilde{a} &=& -\alpha \exp \left[\sum_{n=1}^{+\infty} 2\alpha_n
\left(1 - \sum_{k = 0}^{n} \frac{(x - y)}{R^{k+1}}
P_k\right)\right] \, , \\\label{bdef}
\tilde{b} &=& \alpha \exp \left[\sum_{n=1}^{+\infty} 2\alpha_n
\left((-1)^n + \sum_{k = 0}^{n} \frac{(-1)^{n-k+1}(x + y)}{R^{k+1}}
P_k\right)\right] \, .
\end{eqnarray}
\end{widetext}
Here $R = \sqrt{x^2 + y^2 - 1}$ and $P_n$ are the Legendre
polynomials with argument $xy/R$,
\begin{eqnarray}
P_n &=& P_n\left(\frac{xy}{R}\right) \, , \nonumber\\
P_n(\chi) &=& \frac{1}{2^n n!} \frac{d^n}{d\chi^n}
\left(\chi^2 - 1\right)^n \, ,
\end{eqnarray}
while the relation
between prolate spheroidal and quasi-cylindrical
coordinates is given by
\begin{eqnarray}
\rho = k \sqrt{\left(x^2 - 1\right)\left(1 - y^2\right)} \, ,
\qquad
z = kxy \, ,
\end{eqnarray}
with inverse
\begin{align}
&x = \frac{1}{2k} \left(\sqrt{\rho^2 + \left(z + k\right)^2}
+ \sqrt{\rho^2 + \left(z - k\right)^2}\right) \, , \nonumber\\
&y = \frac{1}{2k} \left(\sqrt{\rho^2 + \left(z + k\right)^2}
- \sqrt{\rho^2 + \left(z - k\right)^2}\right) \, .
\end{align}
The MN solution has an infinite number of free parameters: $k$, which regulates the
mass of the spacetime; $\alpha$, which regulates the spin; and $\alpha_n$ ($n=1, . . . , +\infty$)
which regulates the mass-multipole moments, starting from the dipole $\alpha_1$, to the quadrupole $\alpha_2$, etc.
For $\alpha \neq 0$
and $\alpha_n = 0$, the MN solution reduces to the Kerr metric. For $\alpha =
\alpha_n = 0$, it reduces to the Schwarzschild solution. For $\alpha = 0$
and $\alpha_n \neq 0$, one obtains the static Weyl metric.
The no-hair theorem~\cite{nohair} states that the only asymptotically flat, vacuum
and stationary solution of the Einstein equations that is non-singular on and outside an event horizon
and that presents no closed timelike curves outside it is given by the Kerr metric. Therefore,
the MN spacetime must either have no event horizon, or present naked singularities or closed timelike curves outside it.
In fact, the surface $x = 1$ ($\rho=0$, $|z|\leq k$), which is the event horizon in the Kerr case $\alpha_n = 0$,
in general is only a partial horizon, because it presents a naked curvature singularity
on the equatorial plane (i.e. at $x=1$, $y=0$, corresponding to $\rho=z=0$)~\cite{mn}. Also, there
are closed timelike curves outside it.
However, these pathological features appear at small radii and here
the basic idea is that naked singularities and closed timelike
curves do not exist in reality because they are either inside some sort of exotic compact
object, whose \textit{exterior} gravitational field is described by
the MN metric, or because GR breaks down close to them;
see e.g. Ref.~\cite{string} for some specific
mechanisms that can do the job.
Without loss of generality, we can put $\alpha_1 = 0$ to bring
the massive object to the origin of the coordinate system. In what
follows, we restrict our attention to the subclass of MN spacetimes
with $\alpha_n = 0$ for $n \neq 2$. We then have three free parameters
($k$, $\alpha$, and $\alpha_2$) related to the mass $M$, the
dimensionless spin parameter $a = J/M^2$, and the dimensionless
anomalous quadrupole moment $q = -(Q - Q_{\rm Kerr})/M^3$,
by the relations
\begin{eqnarray}
\alpha &=& \frac{\sqrt{1 - a^2} - 1}{a} \, , \\
k &=& M \frac{1 - \alpha^2}{1 + \alpha^2} \, , \\
\alpha_2 &=& q \frac{M^3}{k^3} \, .
\end{eqnarray}
Note that $q$ measures the deviation from the quadrupole
moment of a Kerr BH. In particular, since $Q_{\rm Kerr} = - a^2 M^3$,
the solution is oblate for $q > - a^2$ and prolate for $q < - a^2$.
When $q=0$, the solution reduces to the Kerr metric, but when $q \neq 0$ also the higher-order mass-multipole
moments have a different value than in Kerr.
Because the MN metric is stationary and axisymmetric, geodesic orbits have two constants of motion, the specific
energy $E = -u_t$ and the
$z$-component of the specific angular momentum
$L = u_\phi$. The $t$- and $\phi$-components of the 4-velocity
of a test-particle are therefore
\begin{eqnarray}
u^t &=& \frac{E g_{\phi\phi} + L g_{t\phi}}{
g_{t\phi}^2 - g_{tt} g_{\phi\phi}} \, , \\
u^\phi &=& - \frac{E g_{t\phi} + L g_{tt}}{
g_{t\phi}^2 - g_{tt} g_{\phi\phi}} \, .
\end{eqnarray}
From the normalization of the 4-velocity, $g_{\mu\nu}u^\mu
u^\nu = -1$, we can write
\begin{eqnarray}
\frac{e^{2\gamma}}{f} \left[(u^\rho)^2+(u^z)^2\right] = V_{\rm eff}(E,L,\rho,z) \, ,
\end{eqnarray}
where the effective potential $V_{\rm eff}$ is defined by
\begin{eqnarray}
V_{\rm eff} = \frac{E^2}{f} - \frac{f}{\rho^2}
\left(L - \omega E\right)^2 - 1 \, .
\end{eqnarray}
Circular orbits in the equatorial plane must have $\dot{\rho} = \dot{z} = 0$,
which implies $V_{\rm eff} = 0$, and $\ddot{\rho} = \ddot{z} = 0$, which implies
$\partial_\rho V_{\rm eff} = 0$ and $\partial_z V_{\rm eff} = 0$. This means that circular equatorial
orbits are located at simultaneous zeros and extrema of the effective potential, where
$\partial_\rho V_{\rm eff} =\partial_z V_{\rm eff} = V_{\rm eff}=0$.
Because $\partial_z V_{\rm eff} = 0$ is satisfied identically for $z=0$ (simply because of the reflection
symmetry of the MN metric with respect to the equatorial plane), from these conditions one can obtain $E$ and
$L$ as a function of the radius $r$ of the circular equatorial orbit. These orbits are stable under small perturbations
in the radial direction if
$\partial_\rho^2 V_{\rm eff} < 0$, and in the vertical direction if $\partial_z^2 V_{\rm eff} < 0$.
\begin{figure}
\par
\begin{center}
\includegraphics[type=pdf,ext=.pdf,read=.pdf,width=8.8cm]{mn}
\end{center}
\par
\vspace{-5mm}
\caption{The character of the effective ISCO for MN spacetimes with spin parameter $a$
and anomalous quadrupole moment $q$. Compact objects to the
right (left) of the solid red line have ISCOs determined by
the instability in the radial (vertical) direction. Compact
objects to the right (left) of the dotted blue line are oblate
(prolate) bodies, while they are more oblate (prolate) than
a BH if $q > 0$ ($q < 0$).}
\label{f-2-1}
\end{figure}
As far as the position of the ISCO is concerned, for any given value of $a$
there are two critical values $q_1$ and $q_2$ for the anomalous quadrupole moment
(both negative, $q_2<q_1<0$, but whose exact values depend on the spin $a$).
For $q \ge q_1$, circular orbits on the equatorial plane are always
vertically stable and the ISCO radius is determined by the onset of the orbital instability
in the radial direction (i.e. the ISCO is the marginally stable circular orbit in the radial
direction). This is the picture that one is familiar with in the Kerr case, which is indeed included in this range of
$q$'s (since for Kerr $q=0$).
For $q_2<q<q_1$, there are two circular orbits
$r=r_1$ and $r=r_2$ (with $r_1>r_2$)
that are vertically stable but only marginally stable in the radial direction,
and one circular orbit $r=r_3$ (with $r_3<r_2$) that is radially stable but only marginally stable in the vertical direction.
Stable circular orbits therefore exist for $r>r_1$ and for $r_3<r<r_2$, while orbits
with $r_2<r<r_1$ are radially unstable (although vertically stable)
and orbits with $r<r_3$ are vertically unstable (although radially stable).
As far as an accretion disk is concerned, however, what is relevant
is the radius $r=r_1$ of the outer marginally stable circular orbit, because that is
the radius at which the gas starts plunging.
We thus dub the circular orbit at $r=r_1$ the ``effective'' ISCO.
It is important to notice, however, that the stable orbits in
the ``inner'' region $r_3<r<r_2$ do \textit{not} necessarily have energy and angular momentum larger than those
of the effective ISCO. For this reason, plunging orbits starting at the effective ISCO may hit a potential
barrier preventing them from reaching the compact object, at least in some regions of the parameter space $(a,q)$.
We will study this situation in detail in the next section.
As $q$ decreases towards $q_2$, the values of $r_1$ and
$r_2$ approach and eventually coincide for $q=q_2$. For $q<q_2$,
there are no marginally stable orbits in the radial direction, i.e. all circular orbits
are radially stable. However, the marginally stable orbit in the vertical direction, $r=r_3$, still exists
and marks the position of the ISCO, which is therefore determined by the onset of the vertical instability.
In conclusion, for $q>q_2(a)$ [with $q_2(a)<0$], the effective ISCO for quasi-circular inspirals is given
by the onset of the radial instability,
while for $q<q_2(a)$ it is determined by the onset of the vertical instability. Also, let us note that the critical value $q_2$ may be larger than
$-a^2$, that is, the ISCO can be determined by the vertical instability even
for oblate objects (although since $q_2<0$ these objects need to be less oblate than a Kerr BH).
This situation is summarized in Fig.~\ref{f-2-1}, where we show the regions in the $(a,q)$ plane where compact
objects are prolate/oblate and more prolate/more oblate than a Kerr BH, and the regions where the effective ISCO is determined by
the vertical/radial instability.
In the rest of this paper we will present our results for MN spacetimes in terms
of the standard Boyer-Lindquist coordinates
$(r,\theta)$, which are related to the prolate
spheroidal coordinates $(x,y)$ and the quasi-cylindrical coordinates
$(\rho,z)$ used in this section by
\begin{eqnarray}
\rho &=& \sqrt{r^2 - 2 M r + a^2 M^2} \sin\theta \, ,
\nonumber\\
z &=& (r - M) \cos\theta \, .
\end{eqnarray}
and
\begin{eqnarray}
&& r = k x + M \, ,
\nonumber\\
&& \cos\theta = y \, .
\end{eqnarray}
Also, hereafter we will use coordinates in which the mass $M$ of the MN metric is 1.
\begin{figure*}
\begin{tabular}{m{0.33\textwidth}m{0.33\textwidth}m{0.33\textwidth}}
\includegraphics[type=pdf,ext=.pdf,read=.pdf,width=0.3\textwidth]{chi_0.1_q_0.2_plunge4} &
\includegraphics[type=pdf,ext=.pdf,read=.pdf,width=0.31\textwidth]{chi_0.1_q-0.5_plunge4} &
\includegraphics[type=pdf,ext=.pdf,read=.pdf,width=0.31\textwidth]{chi_0.1_q-0.5_thick_disk4} \\
\vskip1cm
\begin{tabular}{m{0.16\textwidth}m{0.33\textwidth}m{0.31\textwidth}m{0.17\textwidth}}
&
\includegraphics[type=pdf,ext=.pdf,read=.pdf,width=0.31\textwidth]{chi_0.1_q-0.6_plunge4} &
\includegraphics[type=pdf,ext=.pdf,read=.pdf,width=0.31\textwidth]{chi_0.1_q-4_plunge4} &\\
\\
\end{tabular}
\\
\end{tabular}
\caption{Accretion in Manko-Novikov spacetimes with $a = 0.1$ and $q=0.2$, $-0.5$, $-0.6$ and $q=-4$.
The solid black line at small radii
is the partial horizon $x=1$, the region where closed timelike curves exist
(i.e. the region where $g_{\phi\phi} < 0$) is shown in green/light gray,
the red dashed line is the
boundary of the ergoregion (i.e. $g_{tt}=0$ on that line), while
the red dot on the equatorial plane marks the position of the ISCO, i.e. the inner edge of the thin accretion disk.
The thick disk, if it forms, sheds from the ISCO
and is denoted by concentric contours, whose label is an upper limit to the $\log_{\rm 10}$ of the gas temperature in K (see text for details).
In blue/dark grey is
the region accessible to the gas shedding from the inner edges
of the thick disk [i.e. the region where $V_{\rm eff}(E_{\rm inner},L_{\rm inner},r,\theta)\geq0$,
$E_{\rm inner}$ and $L_{\rm inner}$ being the energy and angular momentum of the gas at the inner edges of the thick disk].
If no thick disk
is present, in blue/dark grey is the region accessible to the gas shedding from the inner edge of the thin disk
[i.e. the region where $V_{\rm eff}(E_{\rm ISCO},L_{\rm ISCO},r,\theta)\geq0$]: if this ``plunge'' region does not reach the ISCO,
we also show (with solid black lines around the ISCO) the
contours $V_{\rm eff}(E_{\rm ISCO},L_{\rm ISCO},r,\theta)=-10^{-4}$ and $V_{\rm eff}(E_{\rm ISCO},L_{\rm ISCO},r,\theta)=-10^{-3}$,
which represent the region where the gas reaching the ISCO can shed if subject to a small perturbation.
\\
For $q=0.2$ the ISCO is radially unstable, and the gas plunges directly into the
compact object remaining roughly on the equatorial plane, as in the Kerr case [scenario (1a)].
For $q=-0.5$ the ISCO is radially unstable and the gas
plunges, but does not reach the compact object; instead,
it gets trapped between the object and the ISCO and
forms a thick disk [scenario (1b)].
For $q=-0.6$ the ISCO is vertically unstable, and the gas plunges directly into the
compact object outside the equatorial plane [scenario (2a)].
For $q=-4$ the ISCO is vertically unstable, and the gas does not plunge directly but remains
trapped in the vicinities of the ISCO
[because $V_{\rm eff}(E_{\rm ISCO},L_{\rm ISCO}, r,\theta)<0$ near the ISCO].
However, the potential barrier is not tall enough to allow a thick disk to form,
and a small perturbation is enough to cause the gas to fall into the central object [scenario (2b)].\label{fig_a_0.1}
}
\end{figure*}
\section{The plunge and the formation of thick disks inside the ISCO\label{s-p}}
At the inner edge of the thin accretion disk, which corresponds to the effective ISCO defined in the previous section,
the gas is expected to shed and plunge towards the central object.
To understand the geometry of this plunge, it is convenient to plot the region
accessible to the shedding gas, i.e. the region
accessible to particles having the ISCO specific energy and angular momentum $E_{\rm ISCO}$ and $L_{\rm ISCO}$.
This ``plunge'' region is defined by
\begin{eqnarray}\label{eq-pl}
V_{\rm eff} (E_{\rm ISCO}, L_{\rm ISCO}, r, \theta) \ge 0 \,,
\end{eqnarray}
and automatically includes the ISCO ($r=r_{\rm ISCO}$, $\theta=\pi/2$), but not necessarily a neighborhood of it. More specifically,
one can have several scenarios:
\begin{enumerate}
\item If the effective ISCO is determined by the onset of the radial instability, there are two possibilities:
\begin{enumerate}
\item The gas plunges directly into the compact object. As in the Kerr case, the ``plunge'' region and therefore the
gas may expand above and below the equatorial plane
forming a sort of ``plume'', but they remain confined near the equatorial plane.
\item The gas starts to plunge from the ISCO, but gets trapped before reaching the compact object.
\end{enumerate}
\item If the effective ISCO is determined by the onset of the vertical instability, there are three possibilities:
\begin{enumerate}
\item The gas plunges directly into the compact object. However, because the ISCO is stable in the radial direction,
the gas does not shed on the equatorial plane as in the Kerr case, but sheds above and below the equatorial plane, forming two separate
``plumes''.
\item The ``plunge'' region does not contain a neighborhood of the ISCO, because
$V_{\rm eff} (E_{\rm ISCO}, L_{\rm ISCO}, r, \theta)$ is strictly negative around it. However, a small perturbation
(e.g. a small initial velocity) is enough to allow the gas to escape
the potential well surrounding the ISCO, thus shedding above and below the
equatorial plane and plunging into the compact object in two separate plumes. Note that this case is therefore very similar to scenario (2a).
\item The gas sheds above and below the equatorial plane from the ISCO, but gets trapped before reaching the compact object.
\end{enumerate}
\end{enumerate}
Scenarios (1b) and (2c), where the gas sheds from the inner edge of the thin disk
but gets trapped before reaching the compact object, are clearly non-stationary configurations,
because the gas keeps accumulating between the object and the ISCO. For the system to settle onto
a stationary configuration, the gas would have to overflow the potential barrier separating it from the object,
but this can be achieved only if the gas forms, inside the ISCO, a coherent structure that is
capable of further dissipating energy and angular momentum (e.g. through
viscosity or magnetic fields).
\begin{figure*}
\begin{tabular}{m{0.33\textwidth}m{0.33\textwidth}m{0.33\textwidth}}
\includegraphics[type=pdf,ext=.pdf,read=.pdf,width=0.31\textwidth]{chi_0.5_q_0.2_plunge4} &
\includegraphics[type=pdf,ext=.pdf,read=.pdf,width=0.31\textwidth]{chi_0.5_q-0.2_plunge4} &
\includegraphics[type=pdf,ext=.pdf,read=.pdf,width=0.31\textwidth]{chi_0.5_q-0.2_thick_disk4} \\
\vskip1cm
\begin{tabular}{m{0.16\textwidth}m{0.33\textwidth}m{0.33\textwidth}m{0.17\textwidth}} &
\includegraphics[type=pdf,ext=.pdf,read=.pdf,width=0.31\textwidth]{chi_0.5_q-0.5_plunge4} &
\includegraphics[type=pdf,ext=.pdf,read=.pdf,width=0.31\textwidth]{chi_0.5_q-2_plunge4} &\\
\end{tabular}
\\
\end{tabular}
\caption{Same notation as in Fig.~\ref{fig_a_0.1}, but for $a = 0.5$ and $q=0.2$, $-0.2$, $-0.5$ and $-2$.
The accretion properties too are qualitatively similar, case by case, to those displayed for $a = 0.1$ in Fig.~\ref{fig_a_0.1}.
\label{fig_a_0.5}}
\end{figure*}
In this paper we study these ``coherent structures'' inside the ISCO using the theory
of non self-gravitating, stationary and axisymmetric thick disks developed in
Refs.~\cite{pol1,pol2} (see also Refs.~\cite{hydrodrag,font_daigne,zanotti_etal}).
We will briefly review this formalism in Appendix~\ref{app}, but for the present discussion it is sufficient
to mention that a thick disk is completely determined by specifying its inner or outer edge and the angular momentum distribution
on the equatorial plane. More precisely, one needs to assume a certain equatorial distribution for
the angular momentum per unit energy $\ell= L/E$, and this distribution completely determines
the distribution $\ell(r,\theta)$ of the angular momentum per unit energy outside the equatorial plane (see Appendix~\ref{app} for details).
Assuming in particular a power law, we can write
\begin{eqnarray}\label{eq-leq}
\bar{\ell}(r)\equiv\ell(r,\theta=\pi/2) =
\ell_{\rm ISCO} \left(\frac{r}{r_{\rm ISCO}}\right)^\beta \,,
\end{eqnarray}
where $\ell_{\rm ISCO}=L_{\rm ISCO}/E_{\rm ISCO}$ and $\beta$ is a free parameter, which needs to be positive
in order for the thick disk to be stable~\cite{font_daigne}.
In our case, we impose that the outer edge of the thick disk coincides with the ISCO (so that the thick disk is
fed by the gas shedding from the thin disk), and we choose the parameter $\beta$ such that the thick disk also presents
an inner shedding point. This requirement completely fixes the value of $\beta$ to a certain critical value $\beta_{\rm crit}$.
The gas shedding from the inner edge of the thick disk will then plunge into the compact object, and the ``plunge'' region accessible
to this gas will be described by
\begin{eqnarray}
V_{\rm eff} (E_{\rm inner}, L_{\rm inner}, r, \theta) \ge 0 \, ,
\end{eqnarray}
where the specific energy and angular momentum of the gas at the inner edge of the thick disk,
$E_{\rm inner}$ and $L_{\rm inner}$, are determined by solving simultaneously $L_{\rm inner}/E_{\rm inner}=\ell(r_{\rm inner},\theta_{\rm inner})$
and $V_{\rm eff} (E_{\rm inner}, L_{\rm inner}, r_{\rm inner},\theta_{\rm inner})=0$.
\begin{figure*}
\begin{tabular}{m{0.33\textwidth}m{0.33\textwidth}m{0.33\textwidth}}
\includegraphics[type=pdf,ext=.pdf,read=.pdf,width=0.32\textwidth]{chi_0.9_q_0.2_plunge4}&
\includegraphics[type=pdf,ext=.pdf,read=.pdf,width=0.32\textwidth]{chi_0.9_q-0.015_plunge4} &
\includegraphics[type=pdf,ext=.pdf,read=.pdf,width=0.32\textwidth]{chi_0.9_q-0.015_thick_disk4}
\\
\vskip1cm
\begin{tabular}{m{0.33\textwidth}m{0.33\textwidth}m{0.33\textwidth}}
\includegraphics[type=pdf,ext=.pdf,read=.pdf,width=0.32\textwidth]{chi_0.9_q-0.02_plunge4} &
\includegraphics[type=pdf,ext=.pdf,read=.pdf,width=0.32\textwidth]{chi_0.9_q-0.12_plunge4} &
\includegraphics[type=pdf,ext=.pdf,read=.pdf,width=0.32\textwidth]{chi_0.9_q-0.12_thick_disk4}
\\
\end{tabular}
\\
\end{tabular}
\caption{Same notation as in Fig.~\ref{fig_a_0.1}, but for $a = 0.9$ and $q=0.2$, $-0.015$, $-0.02$ and $-0.12$.
The accretion properties are qualitatively similar to those displayed for $a = 0.1$ in Fig.~\ref{fig_a_0.1}
and for $a = 0.5$ in Fig.~\ref{fig_a_0.5}, except for $q=-0.12$.
In that case, the ISCO is vertically unstable, and the gas does not plunge directly but remains
trapped in the vicinities of the ISCO
(because $V_{\rm eff}(E_{\rm ISCO},L_{\rm ISCO},r,\theta)<0$ near the ISCO). However, the potential barrier is tall enough to allow the formation
of two thick disks, above and below the equatorial plane [scenario (2c)]. This contrasts with the cases $a=0.1$, $q=-4$ (Fig.~\ref{fig_a_0.1}) and
$a=0.2$, $q=-2$ (Fig.~\ref{fig_a_0.5}), where the potential barrier is smaller and can be easily overcome
if the gas is slightly perturbed.
\label{fig_a_0.9}}
\end{figure*}
Examples of the scenario outlined above are shown in Figs.~\ref{fig_a_0.1} (for $a=0.1$),
\ref{fig_a_0.5} (for $a=0.5$) and \ref{fig_a_0.9} (for $a=0.9$), for various values of the anomalous quadrupole
moment $q$.
The solid black line at small radii is the partial horizon $x=1$, the region where closed timelike curves exist
(i.e. the region where $g_{\phi\phi} < 0$) is shown in green/light gray,
while the red dashed line is the boundary of the ergoregion (i.e. $g_{tt}=0$ on that line).
The position of the ISCO is marked by a red dot on the equatorial plane.
The thick disk, if it forms, sheds from the ISCO and
is denoted by concentric contours, whose label is $\log_{\rm 10} T$,
where $T$ is the gas temperature (in K) assuming a polytropic equation of state $p=\kappa\rho_0^\Gamma$ ($\rho_0$ being the rest mass density)
with $\Gamma=2$.
As we will show in Appendix~\ref{app}, the temperature for other values of the polytropic index $\Gamma$ can be obtained
by the simple rescaling $T(\Gamma)= T(\Gamma=2)\times 2 (\Gamma-1)/\Gamma$. Because the factor
$2 (\Gamma-1)/\Gamma$ varies between $0$ and $1$
when $\Gamma$ varies in its allowed range $1<\Gamma<2$, the temperature plotted in our figures has to be interpreted as an upper value to
the real temperature.
In blue/dark grey is
the ``plunge'' region accessible to the gas shedding from the inner edges
of the thick disk [i.e. the region where $V_{\rm eff} (E_{\rm inner}, L_{\rm inner}, r, \theta) \ge 0$]. If no thick disk
is present, in blue/dark grey is the ``plunge'' region accessible to the gas shedding from the inner edge of the thin disk
[i.e. the region where $V_{\rm eff}(E_{\rm ISCO},L_{\rm ISCO},r, \theta)\geq 0$]: if this ``plunge'' region does not contain
a neighborhood of the ISCO [cf. scenario (2b) above], we also show (with solid black lines around the ISCO) the
contours $V_{\rm eff}(E_{\rm ISCO},L_{\rm ISCO},r,\theta)=-10^{-4}$ and $V_{\rm eff}(E_{\rm ISCO},L_{\rm ISCO},r,\theta,)=-10^{-3}$,
which represent the region where the gas reaching the ISCO can move if subject to a small perturbation
(e.g. if imparted a small initial velocity).
As can be seen, scenarios (1a), (1b) and (2a) happen for all the three values of the spin parameter that we consider. In particular,
although a more detailed scan of the parameter plane $(a,q)$ would be needed to draw ultimate conclusions, it seems that scenario (1a)
generically takes place when $q>q_1(a)$, scenario (1b) when $q_2(a)<q<q_1(a)$, and scenario (2a) when $q<q_2(a)$. However, for
$q<q_2(a)$ one can also have scenario (2b) -- which we see for $a=0.1$, $q=-4$ and $a=0.5$, $q=-2$ -- or scenario (2c) -- which we
see for $a=0.9$ and $q=-0.12$. We have not been able to identify a scenario (2c) for $a=0.1$ or $a=0.5$.
This is because for these values of the spin, the potential barrier preventing the gas shedding at the ISCO from plunging
above and below the equatorial plane is smaller than for $a=0.9$, and a small perturbation is sufficient for the gas to plunge, thus making
the formation of a stationary thick disk impossible or at least very difficult.
Mathematically, this means that when varying the exponent $\beta$ in Eq.~\eqref{eq-leq},
we were unable to find a value $\beta_{\rm crit}$
for which the thick disk has an inner shedding point (and therefore a stationary configuration).
Scenario (2c) is instead possible for $a=0.9$ because in that case the potential barrier is higher [cf. the contours
$V_{\rm eff}(E_{\rm ISCO},L_{\rm ISCO},r,\theta)=-10^{-4}$ and $V_{\rm eff}(E_{\rm ISCO},L_{\rm ISCO},r,\theta,)=-10^{-3}$
for $a=0.9$ and $q=-0.12$ with those for $a=0.1$, $q=-4$ or $a=0.5$, $q=-2$].
Finally, let us comment on where the ``surface'' of the compact object may be located.
As already mentioned, the MN metric is an exact vacuum solution of the Einstein equations,
and describes the spacetime \textit{outside} a generic compact object made
of exotic matter, which
determines the free parameters of the MN metric (e.g. the anomalous quadrupole moment $q$). This object should of course
cover the pathological features of the MN solutions, such as the closed timelike curves, the curvature
singularity at $x=1$, $y=0$ and the partial horizon $x=1$, $|y|\leq1$. Even if this were the case, however, this scenario would still present some difficulties.
First, such an exotic compact object would probably be subject to gravitational instabilities on a dynamical timescale, unless its radius
is large enough to cover the whole ergoregion. In fact, the so-called ergoregion instability is known to happen on a dynamical timescale
for objects whose exterior metric resembles that of Kerr BH, at least for spin parameters $a\lesssim 2$~\cite{ergo}. Second,
if the compact object has a surface, the kinetic energy of the plunging material must eventually be emitted by the surface, while
in the case of a BH it simply gets lost in the event horizon. This argument, coupled with the observation that BH candidates are indeed
dimmer than systems known to contain neutron stars, or at least
stars with a surface, is a strong indication of the existence of event horizons~\cite{horizonEvidence}. However, we should stress that one can in principle
imagine models escaping this argument (e.g. a gravastar, where the radiation emitted by the surface is so redshifted that it becomes
observationally negligible~\cite{gravastar}).
Another possibility is that GR breaks down
near the naked curvature singularity and the closed timelike curves of the MN geometry. One can therefore
imagine a completely regular spacetime that is described by the MN metric away from the
singularity and the closed timelike curves, and which does not present these pathological features any more (see Refs.~\cite{string}
for some explicit ideas in this direction). An advantage of this scenario is that the horizon of this ``regular'' MN
spacetime would allow these objects to have a dimmer luminosity, in agreement with the observations~\cite{horizonEvidence},
and it may even quench the ergoregion instability or make it happen on a non-dynamical timescale.
Of course, the MN spacetimes that we consider, irrespective of their actual physical significance,
are also an ideal tool to set-up null experiments to test the Kerr BH hypothesis,
since they reduce exactly to Kerr BHs when $q=0$. Indeed,
any experiment pointing
at a value of $q$ significantly different from $0$
would imply that the object under consideration is
either a compact object different from a BH within GR, or a BH or a compact object in
a gravity theory different from GR. In this sense, MN spacetimes can be used not
only to test the BH hypothesis but also to test the gravity theory itself~\cite{scott_null_exp}.
\begin{table*}
\begin{center}
\begin{tabular}{c c c c c c c c c c c c c}
\hline \\
$a$ & \hspace{.5cm} & $q$ &
\hspace{.5cm} & $\beta_{\rm crit}$ & \hspace{.5cm} &
$1 - E_{\rm ISCO}$ & \hspace{.5cm} & $1 - E_{\rm inner}$
& \hspace{.5cm} & $L_{\rm ISCO}/E_{\rm ISCO}$ & \hspace{.5cm} &
$L_{\rm inner}/E_{\rm inner}$ \\ \\
\hline
0.1 & & $-0.5$ & & 0.0187 & & 0.069 & & 0.075 & & 3.454 & & 3.426 \\
0.5 & & $-0.2$ & & 0.074 & & 0.093 & & 0.117 & & 3.057 & & 2.990 \\
0.9 & & $-0.015$ & & 0.048 & & 0.167 & & 0.195 & & 2.448 & & 2.418 \\
0.9 & & $-0.12$ & & 0.204 & & 0.310 & & 0.332 & & 1.970 & & 1.921 \\
\hline
\end{tabular}
\end{center}
\caption{The effect of the thick disk on the accretion efficiency and on the spin evolution of
the central object, for the cases considered in Figs.~\ref{fig_a_0.1}, \ref{fig_a_0.5} and~\ref{fig_a_0.9} that present a thick disk inside the ISCO.}
\label{tab}
\end{table*}
\section{Discussion \label{s-d}}
The scenario (1a) discussed in the previous section is, as we have mentioned,
very similar to the accretion process in a Kerr spacetime. At the ISCO, which
is radially unstable, the gas plunges into
the compact object, remaining roughly on the equatorial plane.
Because this plunge takes place in a dynamical time and with no significant dissipation,
the infalling gas is not expected to emit a significant amount of radiation,
and this is a crucial ingredient of the Novikov-Thorne model.
Under this assumption, the accretion luminosity is simply
$L_{\rm acc} = \eta \dot{M} c^2$,
where $\eta = 1 - E_{\rm ISCO}$ is the radiative efficiency.
The evolution of the spin parameter is then regulated by~\cite{bar}
\begin{eqnarray}\label{eq-spin}
\frac{d a}{d \ln M} = \frac{1}{M}
\frac{L_{\rm ISCO}}{E_{\rm ISCO}}
- 2 a \, ,
\end{eqnarray}
neglecting the small correction coming from the radiation
emitted by the disk and captured by the compact object.
In the case of a Kerr background, the Novikov-Thorne
model seems to be confirmed by recent three-dimensional general relativistic magnetohydrodynamic
simulations~\cite{cfa} (see however Ref.~\cite{krolik} for a different conclusion), and can therefore be
used to interpret the X-ray spectra of BH candidates
and estimate their
spin~\cite{spin}.
It seems therefore plausible that
the Novikov-Thorne model should work also in MN spacetimes,
and in principle one can generalize the technique used to estimate the
spin parameter of BH candidates to measure possible deviations from the
Kerr geometry (e.g. the anomalous quadrupole moment $q$)~\cite{continuum}. From Eq.~(\ref{eq-spin}), it also follows
that the accretion process onto a compact object
more oblate than a Kerr BH can potentially spin the body up
to $a > 1$~\cite{evo}.
Scenarios (2a) and (2b) are quite similar to scenario (1a). In these cases the
ISCO is vertically unstable,
so the gas plunges above and below the equatorial plane, but this infall still happens on
a dynamical time and with a negligible emission of radiation. This presumably
means that the Novikov-Thorne model is a reasonable description of the thin disk and that
the spin of the central object evolves according to \eqref{eq-spin}.
Also, because the shape of the plunge
region draws the gas towards the rotation axis, outflows and jets might possibly form
in these scenarios if magnetic fields are present.
In scenarios (1b) and (2c), the assumption of no radiation
emitted inside the ISCO is not valid, because of the presence of the
thick disks that we discussed in the previous section.
As a result, the radiative efficiency is not $\eta = 1 - E_{\rm ISCO}$ like in the Novikov-Thorne model,
but $\eta = 1 - E_{\rm inner}$, while the spin evolution of the central object is still described by Eq.~(\ref{eq-spin}),
but with the ratio $L_{\rm ISCO}/E_{\rm ISCO}$ replaced by
$L_{\rm inner}/E_{\rm inner}$. The values of these quantities are shown in Table~\ref{tab} for the cases
shown in Figs.~\ref{fig_a_0.1}, \ref{fig_a_0.5} and~\ref{fig_a_0.9}, and as can be seen the corrections due to the presence of the
thick disks inside the ISCO are about $1-3$\% for the ratio $L_{\rm inner}/E_{\rm inner}$, and
about $10-25$\% when it comes to $\eta$.
Moreover, the spectrum of the thick
disks inside the ISCO is quite different from that of the thin disk.
The temperature of a thin disk scales like
$T \sim M^{-0.25}$, $M$ being the disk's mass, while the temperature of the thick disks
inside the ISCO is independent of $M$ (see Appendix~\ref{app} for details), like
in the case of Bondi accretion flows. As can be seen from Figs.~\ref{fig_a_0.1}, \ref{fig_a_0.5} and~\ref{fig_a_0.9},
we have $T\sim 10^{9}-10^{10}$~K~$\approx 0.1-1$~MeV in the thick disks, and
at such
high temperatures the most efficient cooling mechanism
is thermal bremsstrahlung, whose emission rate is briefly reviewed in Appendix~\ref{app2}.
In the case of a 10~$M_\odot$ compact object, for reasonable
values of the gas density of the thick disks, e.g. 10$^{12}$
particles/cm$^3$, the disk is definitely optically thin. The radiation
emitted by the thick disk thus scales as $M^3$, but the flux
observable on the Earth is completely negligible: considering
an object at a distance of 1~kpc, the intensity of the $\gamma$-ray
spectrum around
$0.1-1$~MeV is lower than
$10^{-15}$~$\gamma$~cm$^{-2}$~s$^{-1}$.
For a $10^9$~$M_\odot$ compact object, the thick disk inside the
ISCO is not necessarily optically thin, but if it is, the
$\gamma$-ray spectrum of the object may include a bump around
$0.1-1$~MeV, with the characteristic shape of thermal bremsstrahlung
(spectrum almost constant till energies $\sim T$ and then exponentially
suppressed). If the object is at 10~Mpc from us, the flux on the Earth
could be around 1~$\gamma$~cm$^{-2}$~s$^{-1}$, which is potentially
observable. For instance, the so-called MeV-blazars show this
feature~\cite{blaz}. Unfortunately, so far the spectrum of active galactic nuclei (AGN) is too poorly
understood to say anything conclusive, but the presence of a thick
disk inside the ISCO of the supermassive objects in galactic nuclei
will likely be testable in the future.
Finally, let us comment that although the presence of thick disks inside the ISCO
may be used, at least in principle, as an observational signature of the existence of non-Kerr compact objects,
the scenarios (1b) and (2c) where these disks form seem to arise only in limited regions of the $(a,q)$ plane. For instance,
as we have mentioned in the previous section, scenario (1b) seems to be possible only in a narrow region at
the transition between scenarios (1a) and (2a), while scenario (2c) seems only to be possible for sufficiently high spins.
\section{Conclusions \label{s-c}}
The $5-20M_\odot$ compact objects in X-ray binary systems
and the supermassive bodies in galactic nuclei are currently
thought to be the Kerr BHs predicted by GR. The
study of the electromagnetic radiation emitted in the accretion
process onto these objects can be used to investigate their actual nature
and therefore test the Kerr BH paradigm~\cite{continuum,iron,agn}.
In this paper we have studied the final stages of accretion,
when the gas reaches the inner edge of the thin accretion disk, located at the ISCO,
and plunges into the compact
object.
We find that for non-Kerr compact objects this process is much more complicated than
in the case of Kerr BH. More specifically, depending on the spin $a$ and anomalous quadrupole moment $q$ of the compact
object we find essentially four possible scenarios:
\begin{enumerate}
\item The ISCO is {\it radially} unstable, and the gas plunges into the
compact object remaining roughly on the equatorial plane and without emitting significant radiation.
This is the same scenario as in the Kerr case.
\item The ISCO is {\it radially} unstable and the gas
plunges, but does not reach the compact object. Instead,
it gets trapped between the object and the ISCO,
forming a thick disk with $T\lesssim 10^{10}$ K and emitting by thermal bremsstrahlung.
\item The ISCO is {\it vertically} unstable, and the gas plunges into the
compact object {\it outside} the equatorial plane and without emitting significant radiation.
\item The ISCO is {\it vertically} unstable and the gas
plunges, but does not reach the compact object. Instead,
it gets trapped between the object and the ISCO and
forms two thick disks, above and below the equatorial plane.
These thick disks have $T\lesssim 10^{10}$ K and emit by thermal bremsstrahlung.
\end{enumerate}
While the second and the fourth of these scenarios
seem to happen only for objects more prolate than Kerr, and even in
that case only in a limited region of the parameter space $(a,q)$,
they are nevertheless possible and may be testable with future data.
Our results therefore show that care is needed
when using the Novikov-Thorne model with objects that are different from Kerr BHs, as the assumption of negligible
radiation emission inside the ISCO may not be correct.
In particular, an excess of emission due to the presence of a thick disk in the region inside the ISCO might
bias measurements
of the spin of BH candidates towards high values. It may be interesting to
test this possibility with the spectra of high-spin BH candidates such
as GRS~1915+105~\cite{1915}, when future
more accurate measurements of the distance to this object will be available.
For the time being, however, despite the peculiar features
of the accretion process that we discovered in this paper, compact objects more prolate than Kerr
BHs cannot be ruled out by astrophysical observations.
\begin{acknowledgments}
We would like to thank Luciano Rezzolla
for critically reading this manuscript
and providing useful feedback.
We are also grateful to Sergei Blinnikov for
useful discussions and suggestions.
The work of C.B. was supported by World Premier International
Research Center Initiative (WPI Initiative), MEXT, Japan, and
by the JSPS Grant-in-Aid for Young Scientists (B) No.~22740147.
E.B. acknowledges support from NSF Grants PHY-0903631.
\end{acknowledgments}
|
{
"redpajama_set_name": "RedPajamaArXiv"
}
| 1,527
|
Der Istanbul Challenger – American Express 2012 war ein Tennisturnier, das vom 10. bis 16. September 2012 in Istanbul stattfand. Es war Teil der ATP Challenger Tour 2012 und wurde im Freien auf Hartplatz ausgetragen.
Das Teilnehmerfeld der Einzelkonkurrenz bestand aus 32 Spielern, jenes der Doppelkonkurrenz aus 16 Paaren.
Einzel
Setzliste
Ergebnisse
Doppel
Setzliste
Ergebnisse
Weblinks
Turnierplan Einzel auf der ATP Homepage (PDF; 44 kB)
Turnierplan Doppel auf der ATP Homepage (PDF; 37 kB)
Turnierplan Einzel-Qualifikation auf der ATP Homepage (PDF; 43 kB)
ATP Challenger Tour 2012
Tennisturnier in Istanbul
|
{
"redpajama_set_name": "RedPajamaWikipedia"
}
| 303
|
\subsection{Themes in Participant Responses}
\label{sec:qual}
We discuss common themes found in comments made by the participants, both in
response to the open-ended questions at the end of the study and any comments
typed during the study in their answers.
\vspace{0.5ex}
\noindent
\textbf{Use of Space}.
Participant S2 stated an important
factor was the ``use of screen space both vertically and horizontally,''
noting there is more horizontal screen space to spare. Participant P7 preferred
\texttt{graphterm} for its ``good use of horizontal spacing.''
Participant P2 thought the aspect ratio of the \texttt{git}-like visualization
was detrimental.
The rank-based nature of all the layouts was considered useful by Participant
S1, who noted ``The top-to-bottom direction also really simplifies things, in
all the graphs.''
\vspace{0.5ex}
\noindent
\textbf{Scrolling}. Many participants said scrolling was detrimental. This
was most prevalent for the GraphViz PDF visualization (S1, S2, P2, P4, P5, P11),
but also for the \texttt{git}-like visualization (S1, P4).
Participant S1 remarked ``its tedious to find nodes and move around the pdf.''
\vspace{0.5ex}
\noindent
\textbf{Ambiguity}. Several participants expressed some difficulty with the
ambiguity of edge connectivity in the \texttt{graphterm} layout (S1, S2, P8),
but said the highlighting helped (S1, S2). Some participants noted that
understanding edge connectivity was also tricky in the GraphViz PDF (S1, S2,
S3, P4) due to crossings, but Participant P11 indicated that it was easier as
no edges branched like they do in both the \texttt{git}-like visualization and
\texttt{graphterm}. While Participant P6 preferred \texttt{graphterm} and
GraphViz PDF to the \texttt{git}-like visualization, they stated none of the
tools were easy to understand.
\vspace{0.5ex}
\noindent
\textbf{\texttt{git}-like visualization}. Several participants indicated the edge
coloring helped them trace paths in the \texttt{git}-like visualization (S1,
S2, P2, P4, P5), but two experienced difficulty discerning some of the colors (P8,
P11). The density of the \texttt{git}-like visualization was considered a
negative (S2, P2, P5, P11). Participant S2 wrote ``my initial reaction to the
large git graphs was a viscrecal [sic] - I do not want to look at this at
all.''
\vspace{0.5ex}
\noindent
\textbf{GraphViz PDFs}. Two of the participants who preferred the GraphViz
PDFs (P3, P5) said that the arrowheads clarified what the dependencies were.
Participant P3 also said the direct labeling of nodes was helpful. Though
participant P11 preferred \texttt{graphterm}, they also remarked they liked
the arrows in the GraphViz PDFs.
Three participants expressed distaste for using a PDF reader (S1, S2, P9).
Participant S2 wrote that ``having to load pdfs is annoying.'' While some
participants during piloting reported using their PDF reader's text search to
locate a node, this was not reported during our full study. Instead,
participants described having difficulty finding a node in the GraphViz
layout (S1, S3, P10). Some participants suggested modifying the default
GraphViz PDF rendering to have bigger fonts (P8) and shorter edges (S2, P11).
\vspace{0.5ex}
\noindent
\textbf{\texttt{graphterm}}. Many participants cited the interactive
highlighting of \texttt{graphterm} as a key feature (S1, S2, P2, P6, P7,
P8, P9, P11, P12). Two participants (S1, P11) suggested enhancing the
highlighting modes to color differently for direction or extend by
neighborhood.
As expected, the distance between the node and the label was found confusing
by participants (S2, P11). Participant P11 wrote ``The fact that multiple
node names on the same line get grouped together is annoying.''
Some participants indicated the use of the terminal as another reason for
their preference (S1, S3, P9). Participant P9 wrote that \texttt{graphterm}
``was just RIGHT there, straightforward to use especially when you just want
to use the command line the whole time.'' Participant S3 disliked that
GraphViz ``is not terminal based'' and liked \texttt{graphterm}'s ``keyboard
based navigation.''
\subsection{Discussion}
\label{sec:discussion}
Based on our quantitative measures, we observe that the workflow using the
\texttt{git}-like ASCII visualization leads to faster response times from the
command line than workflow using the GraphViz PDFs, but at a cost to accuracy
and confidence. While not statistically significant, the workflow with
\texttt{graphterm} seems to fall between the two existing Spack dependency
graph visualizations on these three measures, from which we infer the
\texttt{graphterm} workflow is a viable alternative to the existing Spack
graph offerings.
Accuracy is a significant concern when making build decisions. We note none of
the three options were strictly error-free. While the GraphViz workflow
resulted in three errors total and the \texttt{graphterm} workflow ten, two of
the \texttt{graphterm} errors can be attributed to misread questions and six
to insufficient training (see Sec.~\ref{sec:validity} below), indicating the
error rate in practice may be comparable.
The GraphViz rendered visualizations can directly label the nodes unlike
\texttt{graphterm} and are less ambiguous. Yet, the workflow with the
\texttt{graphterm} visualization was more preferred. Based on the comments by
participants, we believe that the major factors leading to this preference
were the terminal-based nature and the interactivity. We interpret the
preference for the terminal (when already working at the terminal) to indicate
participants are willing to accept a sub-optimal visualization that is
convenient to their workflow. However, as the workflow with the
\texttt{git}-like graphs were not preferred, this trade-off between
visualization and workflow is not absolute. A graphical solution with more
customized interactivity may be preferable to all three presented options.
When we suggested such a solution to users during our task analysis
(Sec.~\ref{sec:taskabstraction}), they indicated having something at the
command line was of greater interest. The preference results are in line with
the initial assessment of the domain experts.
Some of the issues participants noted in the GraphViz PDFs could be addressed
by having Spack change the graph layout style attributes it writes into the
\texttt{dot} file, such as the font size and edge length changes proposed by
the participants. Both of these parameters were already explicitly written by
Spack.
\subsection{Limitations}
\label{sec:validity}
Our findings are limited by the study design as described below.
\vspace{1ex}
\noindent\textbf{Task Design and Study Length}.
We designed our study questions to test basic graph tasks derived from our
task analysis (Sec.~\ref{sec:taskabstraction}) rather than the more complicated
task a real user may have. The more complicated tasks often rely on
familiarity with software, its options (e.g., available parallel runtime implementations),
and personal taste of the user (e.g., favored compiler). Some, like debugging
Spack itself, require knowledge of the Spack codebase. We expect the more
complicated tasks will involve several basic graph tasks per dependency graph.
The cost of obtaining a graphical representation may be amortized over this
process. Alternatively, the barriers to interacting with such a
representation, e.g. switching between the terminal and another program, may
compound.
Furthermore, while our goal was to examine usage coming from a command line
workflow, the repeated visualization of different graphs in sequence likely
does not match the workflow of Spack users, who probably visualize graphs more
infrequently. Another study which spaces out visualization with other command
line tasks may better emulate reality, but would increase the length of the
study.
Study length was likely a factor in our ability to recruit Spack users as
participants, though it was half the maximum time of two hours suggested by
Sensalire et al.~\cite{Sensalire2009} when recruiting professionals. A
follow-up study could bypass the graph layout time by pre-computing the graphs
as these operations were equal across all layouts, at the cost of realism in
the presented workflow.
\vspace{1ex}
\noindent\textbf{Effect of Study Setup on Response Time}.
Participants either performed the study on a local machine (11 participants)
or were warned ahead of time about viewing multiple GraphViz-rendered files
such that they might want to access the study with X11 forwarding enabled
(four participants). Participants did not experience the scenario where a
separate login operation or file copy was required to view a PDF or image
file. Avoiding these scenarios by either working locally or being informed
ahead of time may have resulted in quicker task response time when using the
GraphViz PDFs.
We used GraphViz in our comparison as it is one of the existing options
supported and suggested by Spack, it is widely used in the systems and
software space, and visualizations can be generated from the command line in
relatively few steps and without users having to learn new technology. We
used the \texttt{dot} specification as provided by Spack. A customized
graphical visualization or more style specification in the \texttt{dot} file
may lead to better performance. Reminding participants that text search is a
common feature in PDFs may have helped participants who stated they had
difficulty finding nodes. Fully integrating the file copy and graphical
viewer launch may also lead to better performance of GraphViz, but would require assumptions that
limit portability of Spack or place a per-machine configuration burden on the
user. This would increase the cost of the whole of the workflow, especially for
users who consult the graphs infrequently and would not
be amortizing the setup cost.
\vspace{1ex}
\noindent\textbf{Effect of Study Setup on Error Rate}.
The majority of the errors in the \texttt{graphterm} workflow and several in
the \texttt{git}-like depiction workflow came from participants P5 and P6. The
responses were indicative of not understanding that edge directionality was
implied by vertical positioning, despite being explained in the training phase
of both ASCII workflows. Participants S2 and
P9 who made errors during the \texttt{graphterm} block did not make the same
errors using the \texttt{graphterm} workflow in the preference block, which
may indicate improvement over the course of the study.
These observations may indicate the training was insufficient, leading to
increased errors for the ASCII workflows.
\vspace{1ex}
\noindent\textbf{Effect of Free Response Questions}.
We chose free response questions over multiple choice to better match a
realistic scenario and to
avoid guess-and-check
behavior. This allowed participants to answer questions other than what was
posed (e.g., answering the number of packages instead of their names),
increasing the error rate for the ASCII workflows. It also lead to increased
response times for participant S2 during the \texttt{graphterm} block as this
participant wrote comments with their answers.
\subsection{Task Analysis and Abstraction}
\label{sec:taskabstraction}
We seek to improve the dependency graph visualization for Spack. First, we
consider how dependency graph visualizations are used. Through a series of
interviews with two Spack maintainers (one via a video-conference, four text
chats, and an informal in-person discussion, the other via an informal
in-person discussion), we identified three user groups and their tasks with
respect to dependency graphs. We focus specifically on graph-related tasks, as other
tasks, such as simply viewing the set of package dependencies or viewing only
what a particular package depends on (rather than what depends on it), are
already well supported by Spack's indented tree listing
(Fig.~\ref{fig:pythontree}).
\vspace{0.5ex}
\noindent\textbf{Audience and Their Tasks.}
There are three classes of people who consult Spack dependency graphs: Spack
power users, package developers, and Spack maintainers/contributors. We
discuss their goals below and relate them to the task taxonomy for graphs of Lee et
al.~\cite{Lee2006}. We summarize our classification in
Sec.~\ref{tab:taskanalysis}. This analysis was reviewed after development by
the Spack maintainer we had the most contact with, who is among the authors of
this paper.
\begin{table}
\caption{Tasks Abstraction for Spack Dependency Graphs}
\label{tab:taskanalysis}
\scriptsize
\centering
\begin{tabu}{
*{3}{l}
}
\toprule
Graph Task & Spack Task & Spack Role \\
\midrule
topology -- & $\cdot$ Determine packages {\em affected by}
& $\cdot$ users, \\
accessibility & \hspace{0.8ex} a package & \hspace{0.8ex} developers \\
& $\cdot$ Identify diamond dependency & $\cdot$ maintainers \\
\midrule
browsing -- & $\cdot$ Find source(s) of a dependency & $\cdot$ developers \\
follow path & & \\
\midrule
overview & $\cdot$ Assess trade-offs among options & $\cdot$ users \\
& $\cdot$ Assess complexity to judge & $\cdot$ maintainers \\
& \hspace{0.8ex} performance & \\
\midrule
attribute-based & $\cdot$ Identify dependency type or install &
$\cdot$ all \\
(all) & \hspace{0.8ex} configuration & \\
\bottomrule
\end{tabu}
\end{table}
Spack users may refer to a package dependency graph to understand
relationships between the other packages their target software depends on and
thus what optional constraints they may want to specify, such as a particular
parallel runtime library. Knowing which other packages may be affected can be useful in
their decision-making process. Consider a power user `Yulia' trying to
install a scientific package with which she has a passing familiarity. Yulia
favors the parallel runtime implementation provided by GroupX because it has yielded
performance improvements for her on a previous project. However, she
understands other packages are known to perform better with the application
suite of GroupY. She wants to examine the graph to assess the potential
trade-offs in choosing particular implementations. Recognizing these
situations requires identifying direct and indirect connections and gaining a
sense of how all the connections work together, in other words, ``topology --
accessibility'' tasks, ``overview'' tasks, and ``attribute-based'' tasks in
Lee et al.'s taxonomy.
In addition to performing the power user's tasks for debugging, package
developers may examine dependency graphs to verify they have included all the
necessary build information in their package. Unexpected dependencies in the
graph may indicate an inadequate specification. Tracing a path from the
dependency up to its sources, as motivated by a particular error message, can
help resolve an error. Consider a package developer `Devon' who is testing
his package on a supercomputer accessible by many of his target users. He
tries multiple possible configurations and is surprised by some of the ways in
which Spack resolves the dependencies. Devon consults the dependency graph to
understand why some configuration choices affect other packages in the graph.
These tasks utilize both the identification of direct and indirect connections
(task: topology -- accessibility) as well as following a path (task: browsing
-- follow path).
Spack maintainers analyze package dependency graphs when debugging, adding
features, or testing. Consider a Spack maintainer `Mabel' who is investigating
a report of the Spack system failing to build a package due to choices it made
while resolving dependencies. Mabel wants to check that the dependencies truly
exist and if they conflict with each other in a way Spack was unable to
determine. She consults the dependency graph, looking in particular for
diamond dependencies and other instances of multiple dependencies as these
present difficulties to the dependency resolution algorithm. This is again a
task about identifying connections (task: topology -- accessibility).
In addition to investigating bugs, Mabel wants to evaluate the performance of
the package management system. Should she notice a particular package takes a
long time, she can look at the dependency graph to gain a sense of the
complexity of any package installation (task: overview). Information about the
version, compiler, and options selected for each package, as well as the type
of dependency (e.g., required for build only, called by the target, or linked
by the target) is also of interest (tasks: attribute-based (all)).
As all users perform topology-based tasks on dependency graphs, node-link
diagrams are an appropriate choice to represent them. We note that indented
trees may be more suitable for some Spack user scenarios where all packages
depending on a particular choice need not be found and indirect connections
need not be evaluated. These scenarios are already served by Spack's indented
tree feature, which also includes rich attribute information. The node-link
diagram augments this functionality allowing the exploration of more
complicated topology-based tasks.
\vspace{0.5ex}
\noindent\textbf{Data.}
There are over 2,100 packages in the Spack library as of June 2018. The
majority of them have dependency graphs with fewer than 50 nodes.
Fig.~\ref{fig:graphsizes} shows the cumulative distribution of graph sizes by
node count. Node-link diagrams are effective for representing graphs that are
relatively small in size and emphasize topology-based tasks~\cite{Ghoniem2004,
Keller2006} and thus we use them to represent package dependency graphs.
\begin{figure}[h]
\centering
\includegraphics[width=1.0\columnwidth]{figures/spack-cdf-201806.pdf}
\caption{Most Spack dependency graphs have fewer than 50 nodes.}
\label{fig:graphsizes}
\vspace{-0.05in}
\end{figure}
\vspace{0.5ex}
\noindent\textbf{Workflow.}
Spack is a command line tool. Spack users install packages through the command
line. Package developers use the Spack commands \texttt{spack create} and
\texttt{spack edit} at the terminal to create and maintain their packages and
then test them on their target supercomputers via remote login. Similarly
Spack maintainers test and debug the system on the command line via the same
interface. As one of the motivations for Spack was streamlining the build process
on supercomputing systems, much of this command line access is to a remote,
and often secure, system that may not have graphical applications such as a
graphical web browser installed. Furthermore, users may have limited
privileges and be restricted to command line access.
Typically, to view a graphical visualization, users must shift focus back to
their local machine, copy the file from the supercomputer, and launch a local
viewer. This adds several steps to the process and takes the user away the
rest of their analysis. Utilities like \texttt{rsync} can streamline the file
copy process when many packages need to be analyzed in a workflow session.
While this may be the case for Spack maintainers, it is not so for users and
package developers. In the case that graphical applications are available, the
user may view them via X11 forwarding {\em if} they had the foresight to login
with that option enabled. Depending on the system and their location, this
option can induce significant lag. For example, we launched a PDF viewer with
a graph through X11 forwarding on one of our users' systems and incurred a
penalty of greater than 10 seconds to launch the viewer and then on the order
of 1 second for operations such as redrawing for panning, expanding a
drop-down menu, and re-sizing.
During our interviews, the users expressed the desire for an ASCII-based
visualization for use on the command line that was more
`\texttt{dot}'-like than their current one~(\ref{sec:git}). We discussed the
possibilities of an interactive, browser-renderable tool, especially to support
the multi-variate attribute-based tasks, but reception to that proposal was
lukewarm. The users were more interested in a console-based tool that would
help the majority of their smaller analysis tasks first. Given the command
line workflow, the overhead of one-off copying of files, the barriers to using
graphical tools, the small size of the graphs, and the need to support
topological operations, we agreed that initial request of the users was viable
and proceeded to design an improved visualization of package dependencies as
ASCII node-link diagrams.
\subsection{Visualizing Dependencies in Spack}
\label{sec:git}
\begin{figure}[t]
\centering
\includegraphics[width=1.0\columnwidth]{figures/spack-ascii-tree}
\caption{ASCII indented tree showing python dependencies in Spack. Each
line includes the hash of the package configuration, the dependency type,
and the package name,
version, compiler, configuration, and architecture.
}
\label{fig:pythontree}
\vspace{-0.05in}
\end{figure}
The Spack \texttt{spec} command shows dependencies of a package as an indented
ASCII tree. When more information about the build, such as versions and
compilers, are known, these are shown in the tree as well
(Fig.~\ref{fig:pythontree}). The tree view emphasizes what a package {\em
depends on} (i.e., the package's dependencies). In many situations this is
satisfactory. However, some tasks (described in the next section) benefit
from viewing the other direction---which packages are {\em affected by} a
package (i.e. those packages which depend on the target packages). Sometimes
an even a more general overview of the dependency structure is desired. In
these cases, Spack augments the dependency tree by providing two utilities for
inspecting dependency graphs: a \texttt{dot} format description of the graph
and an ASCII representation based on the \texttt{git log --graph} command. We
briefly describe the \texttt{git log --graph} command and the pre-existing
Spack ASCII representation.
\begin{figure}[t]
\subfloat[\label{fig:git:log}]{
\includegraphics[width=0.6\columnwidth]{figures/gitloggraph}
}
\hspace{1ex}
\subfloat[\label{fig:git:python}]{
\includegraphics[width=0.25\columnwidth]{figures/spackgit-python}
}
\caption{(a) Result of \texttt{git log --graph --online --all} and (b)
\texttt{git}-style python dependency graph.}
\label{fig:gitlog}
\vspace{-0.05in}
\end{figure}
The \texttt{git} command \texttt{git log --graph} provides an ASCII
representation of repository commits and their branching behavior. It places no more
than one commit per row with the most recent commit (of the current branch) at
the top. The sequential connections between two commits are shown using
edges drawn using \texttt{|}, \texttt{\_}, \texttt{/}, and
\texttt{$\backslash$}. Fig.~\ref{fig:git:log} shows an example. The left-most
vertical line shows commits to the master (initial) branch. Three more
branches are created and merged.
Spack's graph command adapts the
\texttt{git log --graph} algorithm~\cite{gitloggraph} to show the package
dependency graph. Unlike commits, package dependencies do not have a
temporal order, so a topological sort is used instead.
This places the package of interest on the first row with
its direct dependencies on the following rows. Fig.~\ref{fig:git:python} shows
the Spack dependency graph of python drawn with this \texttt{git}-like
approach.
The edge colors denote which dependency the edge leads to. This encoding helps
users track an edge across several rows. The sixteen ANSI colors (the eight
original and eight high intensity versions) are assigned to the packages in a
round-robin fashion.
\begin{figure}[t]
\centering
\includegraphics[width=1.0\columnwidth]{figures/git-dia-wrapped}
\caption{\texttt{git}-style package dependency graph of \texttt{dia} (also
shown in Fig.~\ref{fig:teaser}). The
\texttt{freetype} node has been duplicated to show alignment between the
two halves.}
\label{fig:git-dia}
\vspace{-0.05in}
\end{figure}
There are two major advantages to this \texttt{git}-like layout. First, the
layout conserves columns, thus fitting in the 80 column limits preferred by
some command line users. The conservative use of columns can also be a
downside as the resulting graph is visually dense. Second, the
\texttt{git}-like layout is an unambiguous representation: when one edge is
routed into another, they both exit at the same terminus.
While this heavily vertical style matches well with the pure text \texttt{git
log} command, the temporal nature of \texttt{git} commits, and the propensity
for long chains in the resultant graph, it obscures the layered nature of
dependency graphs. Furthermore, the \texttt{git}-like graphs require many
rows, requiring users to scroll even for relatively small graphs. The Spack
maintainers we collaborated with (see Sec.~\ref{sec:taskabstraction}) wanted a
more compact representation that used fewer rows.
Fig.~\ref{fig:git-dia} shows the \texttt{git}-like dependency graph for
\texttt{dia}, a package with 39 dependencies (also depicted using our approach
in Fig~.\ref{fig:teaser}). Visually tracking some edges can require several
page-up operations. While the edge coloring can help users keep their place,
as these are assigned before edge layout, sometimes the same or similar colors
cross or appear side-by-side as with the two long red edges in
Fig.~\ref{fig:git-dia}.
\subsection{\texttt{graphterm} Layout}
\label{sec:graphterm:layout}
From our discussions with Spack maintainers (Sec.~\ref{sec:taskabstraction}) we
concluded that the users conceptualize dependency graphs in a fashion similar
to a layered graph layout~\cite{Sugiyama}. One Spack maintainer specifically
requested a ``\texttt{dot}-like'' layout in ASCII. Furthermore, we concluded
that such a layout supports their tasks. Users can quickly determine the
direction of dependencies by vertical order, unlike in an orthogonal layout
which may be more adaptable to ASCII, but does not maintain a vertical or
horizontal ordering of nodes.
The layout algorithm (Algorithm~\ref{alg:graphterm}) starts by obtaining a
graphical layered layout. Based on the mark placement and induced crossings
therein, it generates a corresponding set of node and edge positions on a grid
(Algorithm~\ref{alg:bundleedges}, Algorithm~\ref{alg:togridpoints}). Finally,
ASCII characters from the set $\{$ \texttt{|}, \texttt{\_}, \texttt{/},
\texttt{$\backslash$}, \texttt{o}, \texttt{X} $\}$ are placed to represent
those nodes and edges (Algorithm~\ref{alg:placemarks}). We then place node
labels to fit (Algorithm~\ref{alg:placelabels}).
\begin{algorithm}
\small
\SetAlgoLined\Indmm
\SetKwFunction{GraphTerm}{graphterm}
\SetKwFunction{TulipHierarchical}{Tulip\_hierarchical}
\SetKwFunction{GetCrossings}{get\_edge\_crossings}
\SetKwFunction{SetInsert}{insert}
\SetKwFunction{BundleEdges}{get\_bundle\_positions}
\SetKwFunction{ToGridPoints}{to\_grid\_points}
\SetKwFunction{PlaceOnGrid}{place\_on\_grid}
\SetKwFunction{PlaceLabels}{place\_labels}
\SetKwBlock{Begin}{\vspace{-3mm}}{}%
\GraphTerm(G)\;
\Begin{
positions = \TulipHierarchical{\em G}\;
crossings = \GetCrossings{\em positions}\;
positions += \BundleEdges{\em G, crossings}\tcp*{Algorithm 2}
xset = [], yset = []\;
\lFor{{\em x, y} in {\em positions}} {
xset.\SetInsert{\em x},
yset.\SetInsert{\em y}
}
rows, columns = \ToGridPoints{\em G, xset, yset}\tcp*{Algorithm 3}
grid = \PlaceOnGrid{\em G, columns, rows}\tcp*{Algorithm 4}
grid = \PlaceLabels{\em G, grid}\tcp*{Algorithm 5}
}
\caption{GraphTerm Layout Overview}
\label{alg:graphterm}
\end{algorithm}
\vspace{1ex}
\noindent\textbf{Converting graphic layout to an ASCII grid.}
We considered several existing hierarchical and layered graph layouts to adapt
to ASCII. The considered layouts included \texttt{dot},
\texttt{dagre}~\cite{dagre}, and the hierarchical layouts included in
Tulip~\cite{Auber2004} and OGDF~\cite{OGDF}. We chose the Tulip hierarchical
layout~\cite{Auber2004} as a basis because it is a straight-edge layout that
uses mostly vertical and diagonal edges with a propensity to re-use vertical
edges in our package dependency graphs. This resulted in less clutter in
comparison to other layouts as well as marks that were easier to adapt to
ASCII.
We run the Tulip hierarchical layout\footnote{The figures and study in this
paper use the Tulip Python bindings. The version released on Github ports the
layout into pure Python. The port differs in some of its sort orders and
vertical spacings and thus can produce a slightly different ASCII layout.} on
the package dependency graph. From the graphical layout, we obtain initial
positions for all nodes as well as line segment end points for all edges.
First, we determine sets of $x$ and $y$ positions of note in the layout---the
positions of the nodes, the end points of the line segments, and the positions
of the crossings. The layered nature of the layout induces a small set of $y$
values. In the Tulip hierarchical layout, dummy nodes are inserted into the
graph at the pre-existing layers to aide in edge routing and within-layer node
ordering. The location of the dummy nodes correspond to the non-node endpoints
of the line segments that compose each edge. Combined with the true nodes,
these induce a small set of $x$ values. We will ultimately convert these
floating point $x$ and $y$ values to a discrete compact grid
(Fig.~\ref{fig:gridnumbering}), but first we must add values to the sets to
account for edge crossings.
We compute the location of all line segment crossings in the graphical layout.
In an early design, we split all segments at their crossings and added the
crossing $x$ and $y$ positions to our sets. While this served to spread out
dense sections of the graph, thereby making it possible to follow each edge,
it also expanded the needed grid size unnecessarily. The afforded space for
dense crossings also detracted from communicating the overall structure of the
graph. Thus, in regions with a large number of crossings, we selectively
re-route segments to share crossing points. We found a good heuristic was to
re-route the incoming diagonal edges of (dummy) nodes.
\vspace{1ex}
\noindent\textbf{Adjustments for edge re-use and bundling.}
Package dependency graphs often have a few nodes with either a high in-degree
or a high out-degree. In our chosen layout, this results in several diagonal
segments fanning in or out between two layers. Many of the edge crossings are
caused by these structures. The large number of segments with slightly
different angles is also difficult to represent with our limited set of glyphs
(ASCII). In the absence of edge crossings, our choice of line drawing heuristic,
described later in this section, results in
re-use of horizontal segments created by underscores, similar to the re-use of
vertical segments in the original graphical layout.
When we detect crossings between a diagonal segment and a vertical segment,
rather than adding the crossing position to our $x$ and $y$ sets, we alter the
$y$ crossing position to a set value based on the end (dummy) node of the
segment. The altered $y$ position, calculated in lines 7-8 of
Algorithm~\ref{alg:bundleedges}, uses the end node's $x$ position to guarantee
uniqueness in the presence of other such nodes with the same $y$ value,
choosing a position (\texttt{routed\_y}) between the node and the top of the
segment (\texttt{segment.y1}). The procedure routes all diagonal segments to
that (dummy) node through the same $y$ value, thus avoiding increasing our set
of $y$ values for each crossing. In the case of crossings between two diagonal
segments, if such a $y$ value has been set by a diagonal-vertical crossing, we
use it. If two such $y$ values exist, we omit the crossing. Otherwise, we use
the computed (true) crossing value.
\begin{algorithm}[t]
\small
\SetAlgoLined\Indmm
\SetKwFunction{BundleEdges}{get\_bundle\_positions}
\SetKwFunction{Endpoints}{get\_endpoints}
\SetKwFunction{Map}{map}
\SetKwFunction{EmptyMap}{empty\_map}
\SetKwFunction{InSegments}{in\_segments}
\SetKwFunction{CrossesVertical}{crosses\_vertical}
\SetKwFunction{ReRoute}{shift\_crossings}
\SetKwFunction{Break}{break}
\SetKwBlock{Begin}{\vspace{-3mm}}{}%
\BundleEdges(G, crossings)\;
\Begin{
dummy\_nodes = \Endpoints{\em G.links.segments}\;
all\_nodes = \{G.nodes, dummy\_nodes\}\;
bundle\_points = \EmptyMap{}\;
\For{{\em node} in {\em all\_nodes}} {
\For{{\em segment} in \InSegments{\em node}} {
\If{\CrossesVertical{\em segment}} {
offset\_factor = 0.5 $\times$ node.x $/$ G.max\_x\;
routed\_y = (node.y - segment.y1) $\times$ offset\_factor\;
\ReRoute{\em \InSegments{\em node}, routed\_y, crossings}\;
\Break{}\;
}
}
}
\Return{crossings}
}
\caption{GraphTerm Edge Bundling: Shifts crossings of a node's incoming
segments if any cross another vertical segment.}
\label{alg:bundleedges}
\end{algorithm}
Fig.~\ref{fig:mkfontdir} shows our re-routing rules as applied to the
dependencies of \texttt{mkfontdir}. Several edges from the left cross the
vertical edge into \texttt{zlib}. Our algorithm re-routes them, resulting in
horizontal edges at different heights to \texttt{util-macros} and
\texttt{pkg-config}. However, the diagonal edges crossing directly below
\texttt{xproto} are not re-routed. We found applying the re-routing to those
edges resulted in dense and overly boxy graphs that resembled grids. Our
policy was chosen to balance the compactness of the depiction with
readability.
\vspace{1ex}
\noindent\textbf{Gridding and Character Set.}
Having calculated the set of unique $x$ and $y$ values representing (dummy)
nodes and crossings, we assign each value to a row or column of a grid. This grid will
become our ASCII representation. Conceptually, we consider the upper left
corner of each monospaced character cell to be a grid coordinate. We then
chose ASCII characters to represent edges between them, deciding on the set
$\{$ \texttt{|}, \texttt{\_}, \texttt{/}, \texttt{$\backslash$}, \texttt{X}
$\}$, preferring the underscore to the dash because its end point is closer to the
grid corner. As the crossings are at the grid corners, we do not use
\texttt{+} which would be a crossing mid-cell.
A mark cannot be drawn at the corner of four character spaces, so we place the
mark for a node (\texttt{o}) in the cell itself. Therefore, any $y$ value
associated with at least one node is given two grid spaces.
Fig.~\ref{fig:gridnumbering} demonstrates this assignment.
\begin{algorithm}[t]
\small
\SetAlgoLined\Indmm
\SetKwFunction{ToGridPoints}{to\_grid\_points}
\SetKwFunction{Sort}{sort}
\SetKwFunction{Map}{map}
\SetKwFunction{EmptyMap}{empty\_map}
\ToGridPoints(G, xset, yset)\;
\SetKwBlock{Begin}{\vspace{-3mm}}{}%
\Begin{
xlist = \Sort{\em xset}, ylist = \Sort{\em yset}\;
columns = \EmptyMap{}, rows = \EmptyMap{}\;
col = 0, row =0\;
\lFor{{\em x} in {\em xlist}} {
columns.\Map{\em x, col},
col += 2;
}
\For{{\em y} in {\em ylist}} {
rows.\Map{\em y, row}, row += 2\;
\lIf{$\exists $ {\em node} in {\em G} $\mid$ {\em node.y = y}} {
row += 2
}
}
\Return{rows, columns}
}
\caption{Translate Real Positions to Grid Points}
\label{alg:togridpoints}
\end{algorithm}
\begin{figure}[t]
\centering
\includegraphics[width=1.0\columnwidth]{figures/gridnumbering.pdf}
\caption{We assign values from our position set to the upper left corner
of each character cell. Rows with nodes are assigned an extra $y$ value.
In this fictional example, the top node spans grid lines $y_0$ and $y_{0'}$ and the
second node spans $y_3$ and $y_{3'}$. No other rows are doubled.}
\label{fig:gridnumbering}
\vspace{-0.05in}
\end{figure}
To keep the ASCII layout compact, rather than maintain the relative distances
between positions, we assign the values in order in our grid
coordinates subject to some expansion function. In our implementation, we use
a $2\times$ multiplier to prevent the graph from becoming too dense, as shown
in Algorithm~\ref{alg:togridpoints}. Therefore each $x$ value is assigned to
successively numbered even columns. The $y$ values are assigned similarly with
the added row for nodes described above.
\vspace{1ex}
\noindent\textbf{Edge Layout.}
Once the correspondence between graphical layout positions and grid points are
set, we assign ASCII characters to the grid cells. Note that segments may span
many grid points and thus many grid cells. We assign nodes (\texttt{o}) and
purely vertical segments first. Vertical segments require only successive
vertical bar (\texttt{|}) characters.
There are several options for drawing the non-vertical segments. We initially
used the grid cells calculated by Bresenham's line drawing
algorithm~\cite{Bresenham1965}, but this results in unnecessarily crooked
``lines'', clutter, and cell collisions. Instead, we break each segment into
$0^{\circ}$ (horizontal), $45^{\circ}$/$135^{\circ}$ (diagonal), and
$90^{\circ}$ (vertical) pieces summing to the effective displacement. Edges
that traverse more horizontally have horizontal and diagonal pieces but no
vertical pieces. Edges that traverse more vertically have diagonal and
vertical pieces but no horizontal pieces. We draw either the excess horizontal
(with underscores in the cell above) or vertical (with vertical bars) first,
then the diagonal with slashes. Examples are shown in
Fig.~\ref{fig:asciilines}. The translation is described in
Algorithm~\ref{alg:placemarks}. This drawing scheme leads to straighter
segments, which have been shown to support path finding~\cite{Ware2002}. It
also tends to naturally overlap edges, effectively coalescing edge marks along
main horizontal and vertical thoroughfares.
\begin{algorithm}[t]
\small
\SetAlgoLined\Indmm
\SetKwFunction{PlaceOnGrid}{place\_on\_grid}
\SetKwFunction{Initialize}{initialize\_to\_spaces}
\SetKwFunction{Place}{place}
\SetKwFunction{TransformCoords}{transform\_coords}
\SetKwFunction{Abs}{abs}
\SetKwFunction{Max}{max}
\SetKwFunction{Min}{min}
\SetKwFunction{Sign}{sign}
\SetKwBlock{Begin}{\vspace{-3mm}}{}%
\PlaceOnGrid(G, columns, rows)\;
\Begin{
order = \{`$\mid$': 1, `\_': 2, `\textbackslash': 3, `/': 3, `X': 0, ` ': 4\}\;
grid = \Initialize{}\;
\lFor{{\em node} in {\em G}} {
grid.\Place{'o', {\em columns[node.x]}, {\em rows[node.y]}}
}
\For{{\em segment} in {\em G.links}} {
r, c, r2, c2 = \TransformCoords{\em segment, columns, rows}\;
diagonal = \Min{\em (r2 - r), \Abs{\em c2 - c}}\;
vertical = \Max{0, {\em (r2 - r) - \Abs{\em c2 - c}}}\;
\lIf{\em c $<$ c2} {
slash = `\textbackslash';
cdiag = c2 + diagonal
}
\lElse{
slash = `/';
cdiag = c2 - diagonal
}
\eIf{\em vertical $>$ 0} {
\For{{\em i = r} to {\em r + vertical}} {
\lIf{\em order[`$\mid$'] $<$ order[grid[c][i]]} {
grid.\Place{`$\mid$', {\em c, i}}
}
}
r = r + vertical + 1\;
}
{
\For{{\em j = c} to {\em cdiag}} {
\lIf{\em order[`\_'] $<$ order[grid[j][r - 1]]} {
grid.\Place{`\_', {\em j, r - 1}}
}
}
c = cdiag + sign(c2 - c)\;
}
\For{{\em i = r} to {\em r2}} {
\lIf{\em order[slash] $<$ order[grid[c][i]]} {
grid.\Place{\em slash, c, i}
}
\If{\em order[slash] = order[grid[c][i]] and grid[c][i] $\neq$ slash} {
grid.\Place{`X', {\em c, i}}\;
}
c += sign(c2 - c);
}
}
\Return{grid}
}
\caption{Place ASCII Marks in Grid}
\label{alg:placemarks}
\end{algorithm}
\begin{figure}[t]
\centering
\includegraphics[width=0.98\columnwidth]{figures/asciilines-arrows}
\caption{Graphical lines are converted to ASCII first by excess
vertical or horizontal displacement then by diagonal displacement.
The left line is more vertical and thus has no underscores. The right line is
more horizontal and thus has no vertical bars.}
\label{fig:asciilines}
\vspace{-0.05in}
\end{figure}
Assigning ASCII characters to connect the segments can result in collisions.
Different segments may require a different ASCII character in the same grid
cell. We appeal to the Gestalt principle of continuation to resolve these
collisions. Using line breaks in edges at crossings in this manner has
been previously shown to have little effect on readability~\cite{Rusu2011}.
We observed that giving precedence to slashes over vertical bars and vertical
bars over underscores works to preserve segment continuity. When two opposing
slashes conflict, we use an \texttt{X} character (as seen in
Fig.~\ref{fig:mkfontdir:term}).
\vspace{1ex}
\noindent\textbf{Labels.}
After the edges have been drawn in the grid, we place the labels. Ideally,
the labels would be placed close to their node. However, we consider the sense
of graph structure and the compactness of its representation higher
priorities. If there is enough empty space to the left or the right of the
node, we place the package name in that space. Preference is given to the
right side to match the \texttt{git}-like depiction (Sec.~\ref{sec:git}) where
all labels are on the right. Also, this allows the user to follow a link to a
node (\texttt{o}) and then continue reading from left to right to see the
label.
If there is not enough space for the package name, we place the label to the
right of the entire graph. The right-most unlabeled node per row is drawn next
to the graph. The rest are drawn in a bracketed list to the right of that
label in the left-right order of the nodes. Brackets are used to distinguish
this list from the other labels. The rightward placement is again in deference
to the \texttt{git}-like layout. The procedure is outlined in
Algorithm~\ref{alg:placelabels}.
We considered balancing the extra labels on the
left and right side, based on their position in the grid. However, this moved
the structure of the graph further to the right which would require users to
shift focus from the cursor which rests in the lower left corner.
We remark the bracketed list is not ideal, but a trade-off made to emphasize
graph topology. One problem is that long lists will be truncated by the edge
of the terminal window and require panning. While one could construct a
package with an arbitrarily long list of nodes on the same level, in practice
we observed the length of the longest list grew with the number of nodes in
the graph and most graphs had a maximum list of six or fewer labels (median: 1
label, average: 2 labels). Fig.~\ref{fig:bracketlength} is a histogram of
maximum bracket length across Spack packages.
\begin{algorithm}[t]
\small
\SetAlgoLined\Indmm
\SetKwFunction{PlaceLabels}{place\_labels}
\SetKwFunction{Continue}{continue}
\SetKwFunction{PlaceRight}{place\_right\_of\_node}
\SetKwFunction{PlaceLeft}{place\_left\_of\_node}
\SetKwFunction{PlaceEnd}{append\_to\_right\_bracket}
\SetKwFunction{LastNode}{is\_last\_in\_row}
\SetKwFunction{PlaceRightEnd}{place\_right\_of\_graph}
\SetKwBlock{Begin}{\vspace{-3mm}}{}%
\PlaceLabels(G, grid)\;
\Begin{
\For{{\em row} in {\em grid}} {
\For{{\em node} in {\em row}} {
s = node.label\;
\lIf{\PlaceRight{\em s}} {
\Continue{}
}
\lElseIf{\PlaceLeft{\em s}} {
\Continue{}
}
\lElseIf{\LastNode{\em node}} {
\PlaceRightEnd{\em s}
}
\lElse{
\PlaceEnd{\em s}
}
}
}
\Return{grid}
}
\caption{Place Labels}
\label{alg:placelabels}
\end{algorithm}
\begin{figure}[t]
\centering
\includegraphics[width=0.98\columnwidth]{figures/bracket-lengths}
\caption{Histogram showing the distribution of the maximum number of
labels relegated to the bracketed list amongst the Spack package
dependency graphs. There is a peak at six due to a large number of R
libraries. At the time of this experiment, the R package, a subgraph of
these libraries, produced a layout with a length six list.}
\label{fig:bracketlength}
\vspace{-0.05in}
\end{figure}
\subsection{\texttt{graphterm} Interactions}
\label{sec:graphterm:interactions}
We design our interactions controls to match common command line programs. We
do this exactly when possible or by metaphor when not. Searching and
highlighting a specific node is done by typing the forward slash
character followed by the name, as done in \texttt{less}. We expect users
may search for a node when they are considering specifying a version or
compiler and want to consider how that choice may affect packages depending on
that node. Developers and maintainers may want to search for a node to verify
its connections when debugging.
\begin{figure}[th]
\centering
\subfloat[Direct connections highlighted.\label{fig:nco:direct}]{
\includegraphics[width=1.0\columnwidth]{figures/nco-fix-crop}
}
\subfloat[All connected nodes and paths highlighted.\label{fig:nco:reachability}]{
\includegraphics[width=1.0\columnwidth]{figures/nco-fix-V-crop}
}
\caption{Two highlighting styles: (a) only
direct connections (single edge paths), and (b) showing all connected nodes
(multi-edge paths included). In (b), \texttt{bison}, \texttt{m4},
\texttt{help2man} and the edges to them are highlighted in addition to
\texttt{udunits2}'s
direct neighbors.}
\vspace{-0.05in}
\label{fig:nco}
\end{figure}
Users may traverse the nodes (via highlight) in grid order with the \texttt{n}
and \texttt{p} keys, similar to jumping between found matching strings in
\texttt{less}. These interactions support examining multiple nodes or
gaining and understanding of the edge coalescing for graph overview
tasks.
With the exception of the arrow keys, which are not available in all
terminals, we did not find consensus for directional movement. Thus, we
provide both arrow keys and the set \{w, a, s, d\} for panning should the
graph not fit in the viewable area of the terminal. The latter set was chosen
for its prevalence for inputting directional movement in video games.
Searching for a node also automatically pans the graph to ensure the node
is on screen. Zooming is possible on some terminals by changing the font
size.
In addition to helping users disambiguate bundled edges and associate nodes
with labels, we expect the automatic highlighting of connected edges and
neighbors to a node (as in Fig.~\ref{fig:teaser}, Fig.~\ref{fig:mkfontdir:term},
Fig.~\ref{fig:nco:direct}) to help with connectivity and accessibility tasks
like those described in Sec.~\ref{sec:taskabstraction}. Highlighting has been
shown to aid users in these visual graph queries~\cite{Ware2004}. Users may
toggle the highlighting to highlight all nodes with a path to or from the
highlighted node instead, along with the edges in those paths
(Fig.~\ref{fig:nco:reachability}).
In interactive mode, \texttt{graphterm} exploits the entirety of the terminal
window via the terminal-independent \texttt{ncurses} text interface library.
Upon quitting interactive mode, the graph is printed to the terminal in the
state it was last shown, with the exception that all rows are printed rather
than only what would fit in the terminal's display.
\section{Introduction}
\section{Related Work}
\label{sec:related}
\input{related}
\section{The Spack Package Management System}
\label{sec:background}
\input{background}
\section{\texttt{graphterm}}
\label{sec:ascii}
\input{graphterm}
\section{Study}
\label{sec:study}
\input{study}
\section{Results and Analysis}
\label{sec:analysis}
\input{analysis}
\section{Conclusion and Future Work}
\label{sec:conclusion}
\input{conclusion}
\section{Acknowledgements}
\input{ack}
\bibliographystyle{abbrv-doi}
\section{Experimental Objects used in Study}
\begin{table*}[h]
\caption{Dependency Graph Characteristics for Tool Blocks}
\label{tab:studygraphsplusplus}
\scriptsize
\centering
\begin{tabu}{
*{7}{l}%
}
\toprule
Tool & \# Nodes & \# Edges & Layers & Nodes per Layer & Question & Question Layers \\
\midrule
GraphViz & 11 & 22 & 4 & 1-2-5-3 & paths & 1 \& 3\\
\texttt{git}-like & 11 & 22 & 4 & 1-2-5-3 & paths & 1 \& 4 \\
\texttt{graphterm} & 11 & 22 & 5 & 1-1-2-4-3 & paths & 1 \& 4\\
\midrule
GraphViz & 17 & 27 & 6 & 1-1-4-2-6-3 & dependencies & 5\\
\texttt{git}-like & 17 & 26 & 7 & 1-2-4-2-1-4-3 & dependencies & 4 \\
\texttt{graphterm} & 18 & 26 & 5 & 1-4-6-5-2 & dependencies & 4\\
\midrule
GraphViz & 22 & 45 & 7 & 1-1-1-4-6-6-3 & paths & 1 \& 5 \\
\texttt{git}-like & 22 & 45 & 7 & 1-1-1-4-6-6-3 & paths & 1 \& 5\\
\texttt{graphterm} & 22 & 45 & 7 & 1-1-1-4-6-6-3 & paths & 1 \& 5\\
\midrule
GraphViz & 34 & 62 & 7 & 1-2-4-5-5-11-5-1 & dependencies & 8 \\
& & & & & paths & 1 \& 7 \\
\texttt{git}-like & 33 & 60 & 7 & 1-1-4-5-5-11-5-1 & dependencies & 6 \\
& & & & & paths & 1 \& 7 \\
\texttt{graphterm} & 34 & 61 & 7 & 1-2-4-5-5-11-5-1 & dependencies & 6\\
& & & & & paths & 1 \& 7 \\
\bottomrule
\end{tabu}
\end{table*}
We provide more details about the experimental objects used in the study.
Table~\ref{tab:studygraphsplusplus} appends information about the number of
layers per graph, the division of nodes in each layer, and the layers on which
the target nodes for each question resided for the Tool block graphs. In some
cases we were able to choose graphs that had similar major dependencies,
resulting in highly similar graph structures.
\section{Dependency Visualization Features in Github Repositories}
We performed a online search for existing methods for visualizing dependencies
using the search string ``site:github.com visualize dependencies.'' We used
Google search in an incognito tab of a newly installed Google Chrome with no
signed in accounts. We manually retrieved links from the 49 returned pages.
Some links were duplicated between results pages. We added additional links
found from examining the total ones (procedure described below), resulting in
a total of 521 links examined.
We explored each link to determine if it had a dependency visualization
feature. If the returned link was not a project page (e.g., it was an issue,
feature request, or project file) and did not mention visualization, we
navigated to the main project page of the returned link. If the returned link
referred to a project we already analyzed, we skipped it. We also skipped
projects that were general visualization tools or were not targeted at a
computing domain. For example, we skipped all projects where the target of
the visualization was biology-related. We included machine learning network
visualizations but not sentence structure dependencies in natural language
processing or scene graph overlays in computer vision. We skipped links that
were blog posts or personal websites. We manually inspected stand-alone code
snippets (`gists'). If the returned link was a discussion thread (e.g., for
an issue or feature request) and mentioned a possible outside-project
visualization, we followed those links. For projects that were lists of links
to other projects, we searched for promising links using the strings `visual'
and `dependenc.' Of the 521 links, we found 483 unique projects.
From the main page of any project, we assessed the graph visualization
features in the following manner. If we could discern enough information from
the link returned by the search (sometimes the manual or wiki) or the README,
we associated the found features with the project. If the graph visualization
procedure was not fully explained (e.g., an image was shown but the libraries
to generate it were not described or text contained something like `visualizes
with GraphViz'), we performed a directed search of the code to determine what
the partial explanation meant. If no visualization procedure was mentioned in
the README, we either read the entirety of the source code (for small code
bases) or directed our search using Github to search the repository for the
terms: (graph, network, tree, visual, view, plot, diagram, layout, svg, png,
pdf, html, dot, gexf, graphml, dagre, d3, indent, ascii).
For the keyword search, we used all terms even after finding a visualization
so that no keyword or visualization would get preference simply due to order
of the search. We manually inspected the snippets returned in
the first five pages of results for each term if they existed and searched
further on promising leads. We limited the inspection to five pages {\em a
priori} with the rationale that most users would not look further. Some
projects had large numbers of results due to html documentation, repeated use
of png or svg assets, or alternate meanings of the search terms (e.g., `Visual
Studio' in every code file turning up for `visual'). Uses of GraphViz that
were documentation-only (e.g., requirements of the documentation tool or
library such as Doxygen, not to visualize dependencies) were not counted.
\begin{figure*}[!b]
\centering
\includegraphics[width=1.0\textwidth]{figures/github-views}
\caption{Types of visualizations used by Github repositories.}
\vspace{0.2in}
\label{fig:views}
\end{figure*}
Some of the links found through examining the project links led to external
sites. For those we looked at the features, gallery, and documentation pages
for evidence of dependency visualization. We did not however read the entire
documentation. Often in those cases we were unable to discern exactly how the
visualization was accomplished, so data about what libraries or tools
were used was not recorded. In our summaries, we consider the libraries used
to be `unknown' for these projects.
\begin{figure*}[!b]
\centering
\includegraphics[width=1.0\textwidth]{figures/github-tools}
\caption{Tools and libraries used for visualization features in Github
repositories.}
\label{fig:tools}
\end{figure*}
We found dependency visualization features in 224 of the 483 projects. Some
projects had multiple visualization options, such as outputting a \texttt{dot}
file to be rendered, rendering a png, and having a web application. Of the 224
projects, 108 had a visualization related to GraphViz through either
outputting a \texttt{dot} format file (71 projects) or the use of a
GraphViz-based rendering or layout algorithm to generate an image file, PDF,
HTML file, or application (52 projects). Eighty-three of the projects enabled
an HTML viewer for their visualization. In addition to the GraphViz-based
ones, 47 used d3js as a central tool (e.g., force-directed layout, tree,
Sankey diagram), 11 used dagre, five used ngraph, and three used visjs or
networkx. A complete list of tools can be seen in Fig.~\ref{fig:tools}. The
most common form of visualization was a layered node-link diagram (e.g.,
hierarchical layout, \texttt{dot}, Sugiyama) with 129 projects. Fifty projects
offered a force-directed layout and 34 showed a tree, 22 of which were drawn
with ASCII.
Fig.~\ref{fig:views} shows the number of instances of each view we
categorized. Fig.~\ref{fig:tools} shows the number of instances of each tool or
library being used to create the visualization. Fig.~\ref{fig:formats} shows
the number of instances of each format returned by the visualization features
that we found. Web applications are uniformly categorized as `html.'
Included in these supplemental materials is a CSV listing all of the links
and their categorization, ordered by Google search ranking.
\vspace{0.1ex}
\begin{figure*}
\centering
\includegraphics[width=1.0\textwidth]{figures/github-formats}
\caption{File formats of the visualization features in Github
repositories.}
\vspace{-0.05in}
\label{fig:formats}
\end{figure*}
|
{
"redpajama_set_name": "RedPajamaArXiv"
}
| 135
|
Shift Drink
Food & Cooking Podcasts >
Restaurateur, Ed Rudisell, and Spirit Educator & Sommelier Arthur Black, bring on guests and experts to give a unique take on the world of food and drink.
Food & Cooking Podcasts
Business & Economics Podcasts
Health & Wellness Podcasts
The Poisonous Charms of Camper English
Camper English is back! A few years ago he was just starting his research into dangerous cocktail ingredients after several blog posts on his blog, Alcademics . After a several...
Apricot Schnaps in the Wachau with Claudia Bailoni
Claudia Bailoni was raised around apricots and apricot schnaps. Her family has owned orchards and stills since the 19th century and she spend her youth helping harvest apricots from the...
The Cult of Tiki with Martin & Rebecca Cate
Martin & Rebecca Cate returns to the show this week to talk about the Cult of Tiki. The Smuggler's Cove book is an award-winning book that is used by home...
Return from the Far East 2, Electric Boogaloo
I'm back in the United States and I've got some stories to tell. I wasn't nearly eaten by a tiger, and there were no glasses of jackal-infused moonshine like Arthur...
Wild Honey Cocktails with Niks Anuman
Niks Anuman seems to be ever-present in Bangkok's cocktail scene. He runs two successful bars in an up-and-coming part of Chinatown. Though his voice is soft but his enthusiasm is...
Asian Craft Beer with Sylvester Fedor
Sylvester Fedor is relatively new to Bangkok and he's already helping to lead the charge in the craft beer revolution in Southeast Asia. As the General Manager of Mikkeller in...
Tropical Cocktails in the Tropics with Sebastian de la Cruz
Sebastian De La Cruz started working in bars in Stockholm where he was born and raised. A visit to Clover Club and Death & Co. in New York changed everything...
Beyond Sustainability with Vijay Mudaliar
Vijay Mudaliar is a soft-spoken gentleman in Singapore. He runs a small bar named Native that seats no more than 30 people. But the way he operates his bar is...
Ronan Keilthy, Champion of Cocktails
Ronan Keilthy has made quite a name for himself in recent years – despite being just 22-years-old. He works for Proof & Company, the company behind some of Singapore's (and...
Spirits Education with Jessica Taylor
Jessica Taylor worked her way through beer bars in the 90's, slinging drinks that ended in "tini", and learning the craft. After spending several years with J.W. Marriott, she transitioned...
Harper Voit: Terroir & Obsession
Winemaker Drew Voit, when interviewed by Wine Enthusiast, said "I promise compromise-free, non-efficient, non-cost effective, hyper-focused winemaking." And that is Drew in a nutshell. He is obsessed with the terroir...
Domaine de Cristia with Baptiste Grangeon
Châteauneuf-du-Pape. It can be difficult to pronounce for non-native speakers so, rather than just order a bottle and learn more about the wine, we often pass it over and order...
Backbone Bourbon with Bill Kennedy
Bill Kennedy, the Founder and Operator of Backbone Bourbon Company, joins us this week to talk about his path from young bartender in the 1970's, to sommelier in the 1980's...
Five Generations of Hayman's Gin
In an era of mergers and acquisitions by multinational alcohol conglomerates, it is rare to find a family-owned distillery with a 150-year history of making world-renowned products. Hayman's Gin is...
Back in Black: Arthur Returns from the Far East
It's been almost nine months since we've heard from Arthur Black. Last Fall, he left his well-paying position with a national distributor, cashed in his 401K, and set out to...
Jailbird: Bucking the Trend
Joshua Gonzales was one of the first guests on the show, has talked about mental health and sobriety in the service business, and even guest-hosted our interview with Don Lee...
Creating Community with Books n' Brews
Growing up in an entrepreneurial family, Jason Wuerful knew from a young age that he wanted to be his own boss. After a stint playing minor league baseball and even...
Fear and Loathing with Beachbum Berry
EDITOR'S NOTE: At this point in the chronology, Ed and Jeff "Beachbum" Berry appear to have broken down completely; the original recording is so splintered that we were forced to...
Decoding Riesling with Thomas Haehn
Riesling is perhaps one of the most misunderstood grapes outside of Germany and Alsace. The labels can offer far too much information, or too little. "Blue bottle" Rieslings that popped...
Epic Beer Cellars with Dave Delaplaine
Just before one last winter snowstorm rolled through Washington D.C. I sat down with Dave Delaplaine, the General Manager and Chief Brew Guru of Roofer's Union in Adams Morgan (just...
|
{
"redpajama_set_name": "RedPajamaCommonCrawl"
}
| 7,402
|
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) [2013] [The FURTHeR Project]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:jee="http://www.springframework.org/schema/jee"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/jee
http://www.springframework.org/schema/jee/spring-jee-3.0.xsd
">
<!-- =========================================== -->
<!-- Properties files -->
<!-- =========================================== -->
<!--
Property file locations: suppressed here because it might override the
main context file's resources. The main context is responsible for
defining them.
-->
<!-- =========================================== -->
<!-- Annotation configuration -->
<!-- =========================================== -->
<context:annotation-config />
<!-- DS Persistent layer -->
<context:component-scan base-package="edu.utah.further.ds.data" />
</beans>
|
{
"redpajama_set_name": "RedPajamaGithub"
}
| 2,388
|
Breaking Free is a 2015 film directed by Sridhar Rangayan and produced by Solaris Pictures. In this documentary, filmmaker and gay activist Sridhar Rangayan embarks on a personal journey to expose the human rights violations faced by the LGBTQ community in India due to a draconian law Section 377 and homophobic social mores of a patriarchal society.
The film was selected to be part of the Indian Panorama (non-Fiction) and screened at International Film Festival of India in 2015.
It won the Rajat Kamal National Award for Best Editing (Non-Fiction) in 2016 for its editors Pravin Angre and Sridhar Rangayan. It also won the Barbara Gittings Human Rights Award at qFLIX Philadelphia in 2016.
It is currently streaming on Netflix.
Cast
Anand Grover
Arvind Narrain
Ashok Row Kavi
Jaya Sharma
Manohar Elavarthi
Maya Sharma
Pallav Patankar
Shobhna Kumar
Sridhar Rangayan
Vivek Anand
References
External links
Solaris Pictures
2015 films
Indian LGBT-related films
LGBT-related films based on actual events
2015 LGBT-related films
Documentary films about LGBT topics
|
{
"redpajama_set_name": "RedPajamaWikipedia"
}
| 7,764
|
Click to hide titles of your bookmarks.
Click again to restore them.
Allow users to track changes in their app using New Relic deployment markers from the browser. Please Note: This extension is not associated with New Relic Inc.
This extension monitor JSON pages and convert them into a human-readable object. You can view, edit, search through values and keys. You can even change a format of a key or drag it into a new place.
?"The pathway to happiness is found in gratitude." ?
It has been scientifically proven that taking time to count your blessings and to be thankful makes you happier!
Assigning TAGs for your Google Drive files, design dynamic workflow process, and realtime file activity detection.
|
{
"redpajama_set_name": "RedPajamaC4"
}
| 7,803
|
Q: Restrict certain products to specific customer groups I'm using magento 1.9. Is there a way to make certain products only available to specific customer groups?
If this is not possible with the basic system, is there a free extension that handles that?
A: Yes, there is an open source extension in github: https://github.com/Vinai/groupscatalog2
It's unsupported but it has worked in production for years.
|
{
"redpajama_set_name": "RedPajamaStackExchange"
}
| 7,566
|
In this lesson plan, a reading text introduces students to the components of a computer and includes a computer diagram to label and a listening exercise narrates the history of computing. Useful phrases for when talking about computers, effective reading and writing tips, vocabulary builder exercises and three project ideas are also included.
Who invented the teabag? When was the paperclip invented? Which invention might you find in a kitchen and a church? This series of activities gets students in teams to find out the answers to these questions while learning all sorts of fascinating facts! A follow-up activity focuses on past tenses used in the inventions texts provided.
In this lesson plan, students work in pairs to discuss some of the problems in the developing world and identify possible solutions.
|
{
"redpajama_set_name": "RedPajamaC4"
}
| 3,333
|
Q: Add text to image animated with matplotlib ArtistAnimation I have several images as 2d arrays and I want to create an animation of these images and add a text that changes with the image.
So far I managed to get the animation but I need your help to add a text to each of the images.
I have a for loop to open each of the images and add them to the animation, and let say that I want to add the image number (imgNum) to each of the images.
Here is my code that is working to generate a movie of the images, without text.
ims = []
fig = plt.figure("Animation")
ax = fig.add_subplot(111)
for imgNum in range(numFiles):
fileName= files[imgNum]
img = read_image(fileName)
frame = ax.imshow(img)
ims.append([frame])
anim = animation.ArtistAnimation(fig, ims, interval=350, blit=True, repeat_delay=350)
anim.save('dynamic_images.mp4',fps = 2)
plt.show()
So, how can I add to each of the images a text with imgNum ?
Thanks for your help!
A: You can add text with annotate and add the Annotation artist to the list artists that you pass to ArtistAnimation. Here's an example based on your code.
import matplotlib.pyplot as plt
from matplotlib import animation
import numpy as np
ims = []
fig = plt.figure("Animation")
ax = fig.add_subplot(111)
for imgNum in range(10):
img = np.random.rand(10,10) #random image for an example
frame = ax.imshow(img)
t = ax.annotate(imgNum,(1,1)) # add text
ims.append([frame,t]) # add both the image and the text to the list of artists
anim = animation.ArtistAnimation(fig, ims, interval=350, blit=True, repeat_delay=350)
plt.show()
|
{
"redpajama_set_name": "RedPajamaStackExchange"
}
| 6,209
|
We had a fantastic WOW day today and the children's costumes looked brilliant! We had lots of explorers and jungle and arctic animals. We made iced penguin biscuits and the children rolled and cut out the shapes carefully. We also painted penguin paper plates and used water colours to paint arctic and jungle animals. Then we drew penguins on the board, cut out snowflakes and made arctic collages. In the afternoon we listened to dramatic music and draw along with it.
Throughout the day we did a science experiment; we had 5 ice burgs with penguins stuck inside. We chose 5 different places to leave the ice and predicted the ice in the sun would melt first. We thought the ice in the fridge would melt last. At the end of the day we look at how the water in the sun had even begun to evaporate!
|
{
"redpajama_set_name": "RedPajamaC4"
}
| 2,592
|
\section{Introduction}
Since the original prediction by Fujita et al.\cite{Fujita}, edge states in pristine graphene have been heralded as ideal ballistic channels with potential in electronic applications. However, their detection has remained elusive due to their fragility in the absence of spin-orbit interactions (small in graphene)\cite{KaneMele}, and the presence of disorder at the edges. Numerical studies for ribbons with rough edge terminations confirm that edge disorder destroys ballistic motion along the edges\cite{Disorder}, and provides an explanation for the difficulties encountered in their experimental detection in transport measurements\cite{Kimribbons1,Kimribbons2,Klaus,GoldhaberGordon}. To better understand the nature of these states, Sasaki et al \cite{Sasaki} studied the effects of a highly localized strain defect along different crystal directions (modeled by a $\delta$-function gauge field in a Dirac model). The analytic solution showed the emergence of states along the zigzag direction with properties similar to those of edge states: pseudo-spin polarization, i.e., local sublattice symmetry breaking, and same flat band dispersion, but localized at the position of the deformation. These characteristics are well understood in terms of the effective pseudo-magnetic field generated by the deformation\cite{Moldovan, Peeters2, Peeters3, Carrillo, Martin, Blanter, Wakker, AntiPekka1, AntiPekka2}.
The suggestion of using strain to tailor electronic properties has been advanced by several authors \cite{GuineaGeim, Vitor1,Vitor2,Fernando,MFV,Barraza1,Moldovan,Prada1,Fogler,Vozmediano2,Falko1,Daiara,Gerardo1,Gradinar,Bahamon,Carrillo,Yang,Chan,Villegas,Neek-Amal1,Neek-Amal2,Polini}, and pursued in experimental settings\cite{Lau, Klimov, KimY, Crommie1, Jang}. Several groups have observed clear signatures of equilibrium properties in strained areas predicted by various models, such as pseudo-Landau levels and sublattice symmetry breaking in STM images\cite{Georgiou,Crommie2,Morgenstern,KimY}. Recent works have reported transport measurements on ribbon geometries\cite{Han-Kim,APLreview}, with one study revealing ballistic transport at room temperatures along nanoribbons deposited on terraced SiC substrates (thus subject to deformations)\cite{Baringhaus}. This particular geometry highlights the possibility of creating extended strained fold-like structures with unusual transport properties.
\begin{figure}
\includegraphics[scale=0.43]{Fig1.pdf}
\caption{(Color online) Schematic representation of deformed zigzag graphene nanoribbon
(width $W$ and length $L$) connected to leads with a Gaussian fold-like out-of plane
deformation (amplitude $A$ and width $b$). Arrows indicate valley currents as described in main text. Color code given in Fig. 4 (d).
\label{Fig1}}
\end{figure}
While models for transport through strained areas have been the topic of several works, transport {\it along} deformed areas
has been less explored. In fact, due to the peculiar properties of graphene electronic states under strain, extended deformed areas \cite{KimY}, may act as natural electronic waveguides. In this work we show that longitudinal out-of-plane deformations along a graphene membrane, generate extra conductance channels running parallel to the structure with the remarkable property of being valley polarized. As a consequence, a current injected parallel to the axis of the deformation will naturally split in space, with states from one valley running along the crest while states of the other valley run along the sides. These channels survive in the presence of highly disordered edges and will behave as quasi-ballistic for smooth disorder realizations. These results point towards a realistic implementation of valley polarized channels that can be achieved in current experimental settings by appropriate design of substrates or sample preparation. We propose two specific experimental scenarios that can implement the model presented here: 1) a stretched fold configuration may be produced starting with a longitudinal slit covered by a graphene membrane in a sealed container. By pressuring the container with a gas (helium for example) an out-of-plane fold-like structure is formed with increased interatomic distance in the stretched region\cite{Bunch}; 2) another setup consists of a graphene membrane suspended on top of an extended longitudinal trench. Out of plane stretching is achieved by pulling the suspended region of graphene by the gate voltage located at a small distance on top or at the bottom of the membrane to produce a fold-like deformation. In contrast to previous works that used similar configurations to study transport across the deformed region and predict vanishing of ballistic channels in the two-terminal conductance\cite{Fogler,Vozmediano2}, we show that transport {\it along} the stretched region in fact enhances ballistic transport in the direction parallel to the deformation.
\section{Model}
The system is modeled by a zigzag terminated ribbon, with width and length $W, L$ on the vertical and horizontal directions respectively, and an extended out-of plane Gaussian deformation as shown in Fig.~\ref{Fig1} described by:
\begin{equation}
h\left( y_{i}\right) =A
e^{-\frac{(y_{i}-y_{0})^2}{b^2}},
\label{gaussian}
\end{equation}
with its center at $y_0=W/2$. $A$ and $b$ parametrize its amplitude and width, respectively. The strained fold axis is parallel to the ribbon length along the zigzag crystalline orientation. This particular geometry maximizes the effect of the deformation and produces optimal valley filtering as discussed below.
Electron dynamics is governed by a nearest neighbor tight-binding Hamiltonian
\begin{equation}
H=\sum\limits_{<i,j>} t_{ij}c_i^\dagger c_j + h.c.\,\,,
\end{equation}
where, $c_i^\dagger$ ($c_i$) is the creation (annihilation) field operator in the $i$-th site, and $t_{ij}$ is the modified nearest-neighbor hopping energy $t_{ij} = t_{0}e^{-\beta \left(\frac{l_{ij}}{a}-1\right)}$. Here $t_{0}= -2.8 $eV, $a=1.42\AA$ (interatomic distance in unstrained graphene), and $\beta=\left|\frac{\partial\log t_o}{\partial\log a}\right| \simeq 3$. The deformation is described using elasticity theory\cite{Landau,Katsnelson} with strain tensor $\varepsilon_{\mu \nu}=\frac{1}{2}\left(\partial_\nu u_\mu+\partial_\mu u_\nu+\partial_\mu h \partial_\nu h\right)$, with the in- and out-plane deformation, $u_\nu$ and $h$, respectively\cite{Carrillo,Moldovan}. It is included in the model in the distance
$l_{ij}=\frac{1}{a}\left(a^{2}+\varepsilon_{xx}x_{ij}^2+\varepsilon_{yy}y_{ij}^2+2\varepsilon_{xy}x_{ij}y_{ij}\right)$, where $x_{ij}$ and $y_{ij}$ correspond to the projected distance between sites $i$ and $j$ in $x$ and $y$ directions, before the deformation, respectively. According to the spatial dependence of the deformation (Eq.~\ref{gaussian}), the new interatomic distances are given by
\begin{equation}
l_{ij}= a\left(1+\varepsilon_{yy} y_{ij}^{2}/a^{2}\right).
\label{interatomic-distance}
\end{equation}
reaching the maximum value $l_{ij}= a\left(1+\varepsilon_{yy}\right)$ for atomic positions separated by $(x_{ij}=0; y_{ij} = a)$.
This effective 2D model represents the change in hopping parameters due to changes in the overlap of $\pi$ orbitals that occur when the deformation forms ($\sigma$ bonds are not explicitly included). The effect of strain can be cast in terms of an inhomogeneous pseudo-gauge field $\vec{A}(\vec{r})$ with components
\begin{equation}
\left(\begin{array}{c}
A_{x}\\
A_{y}
\end{array}\right)=\left(\begin{array}{c}
\varepsilon_{xx}-\varepsilon_{yy}\\
-2\varepsilon_{xy}
\end{array}\right)= \left(\begin{array}{c}
-2\frac{y^{2}}{b^{4}}h(y)^{2}\\
0
\end{array}\right)
\end{equation}
and pseudomagnetic field $\vec{B} = \bigtriangledown \times \vec{A}(\vec{r})$.
\begin{figure}
\includegraphics[scale=0.85]{Fig2.pdf}
\caption{(Color online) (a) Strain distribution and (b) pseudomagnetic field profile at $K$ valley due to an extended Gaussian out-of-plane deformation. Parameters: $W= 23.7 nm$, amplitude $A=0.7 nm$, and width $b=1.4 nm$.}
\label{Fig2}
\end{figure}
From here on we use the parameter $\alpha = A/b$ to indicate the maximum strain intensity $\varepsilon_{m} = \alpha^{2}/e$ ($e = 2.71828...$), and to obtain the corresponding maximum pseudomagnetic field amplitude $B_{pm} \propto \varepsilon_{m}/b$. In Fig. \ref{Fig2} (a) we analyze the strain distribution across the transversal direction to the strained fold for fixed deformation parameters. In panel (b) the corresponding pseudomagentic field profile at valley $K$ is shown for the same fold parameters (the values of the pseudomagnetic field are reversed at valley $K'$). Notice, for example, that a value of $\alpha^{2}=25\% $ in Fig. \ref{Fig3} (a), corresponds to a maximum strain below $10\%$.
The conductance and LDOS are obtained with standard recursive Green's function techniques optimized for graphene systems\cite{Mucciolo}. To avoid spurious effects due to mode mismatching at the contacts, the strained fold is extended to the leads. When we consider disorder along the edges below, we do not include it in the leads.
Results below are for fixed size zigzag ribbons with the strained fold at its center. We verified that changes in the position of the strained fold center within a radius of $\sim 0.3 \text{nm}$ in the unit cell, as well as offsets in its position up to $4 \text{nm}$ with respect to the ribbon center for ribbons of different sizes ($W=8$ to $37 \text{nm}$), do not significantly modify conductance and LDOS properties. In all cases studied the strained folds are fully embedded in the ribbon, i.e. in the regime $b/W \ll 1$.
\section{Conductance and LDOS}
\begin{figure}
\includegraphics[scale=0.53]{Fig3.pdf}
\caption{(Color online) (a) Conductance for ribbon ($L = 27.4 nm$ and $W = 25.8 nm$) with different strained folds parameters. Curves are shifted for clarity. Dashed horizontal lines mark zero value for proper comparison. (b) LDOS profile across the ribbon with upper/lower panels showing results for: $\varepsilon_{m} = 0\% - 9.2\%$ (black to green curves in (a)), (c) Enhanced total LDOS produced by the strained fold, and (d) Color map of sublattice polarization. Panels (b)-(d) obtained at $E=0.05 \text{eV}$. Parameters: $W=27.4 nm$, amplitude $A = 0.7 nm$, and width $b=1.4 nm$.
\label{Fig3}}
\end{figure}
Typical results for conductance are shown in Fig.~\ref{Fig2} (a) for no strain (black) and increasing strain values $\varepsilon_{m}= \alpha^{2}/e = 1.5\%$ (blue) to $9.2\%$ (green). For $\varepsilon_{m}=0$ (black) the first conductance plateau represents 2 ballistic channels (one per spin) due to edge states in the zero energy band while the second plateau contains 6 channels. As strain increases, the onset of the second conductance plateau moves to lower energies and becomes wider. The increase in width is produced by spectral transfer from other energies, and its onset at lower energies represents an effective increase in the conductance. The number of channels contributing to the conductance within the energy range of the first plateau in the unstrained ribbon (energies below 0.1 eV in Fig.~\ref{Fig2} (a)) increases with strain from 2 to 6 (with 4 channels added to the existing 2). Notice that these changes are in contrast to those obtained in models with uniaxial in-plane strain that exhibit conductance gaps when transport occurs across the strained region\cite{Gradinar,Bahamon}. Panel (b) shows profiles of LDOS at energy $E = 0.05 eV$ across the ribbon, with the upper/lower panels showing results for ribbons with $\varepsilon_{m} =0$ (black) and $9.2\%$ (green). An enhanced LDOS develops around the deformed region with a similar spatial distribution to the exhibited by the pseudo-magnetic field (see Fig.\ref{Fig5} bottom of panels (a),(b)). The increase in LDOS at the edges corresponds to edge states. Panel (c) shows the total LDOS at $E = 0.05 eV$ along the ribbon, with enhanced values along the strained fold. Panel (d) exhibits the characteristic sublattice symmetry breaking that appears around the stretched area \cite{Carrillo,Martin}, as well as the one produced by perfectly terminated zigzag edges (upper and bottom sides). While this last one is due to the zigzag termination (A sites at one edge and B sites at the opposite edge), the former can be understood within the tight-binding model as due to the breaking of inversion symmetry in the unit cells of the underlying lattice. Once the strained regions is created, the center of inversion in each unit cell that characterizes pristine graphene is absent from those unit cells located at the sides of the strained fold axis, i.e, the corresponding lattice vectors measured from sites A and B to the fold axis are at different distances from it\cite{Sasaki2}. The data suggests that the extra conductance channels are composed by sublattice polarized states localized around the strained area.
\begin{figure}
\includegraphics[scale=0.25]{Fig4.pdf}
\caption{(Color online) Band structure for a ribbon with a flat (a) and (b) a strained fold configurations. Panels (c) and (d) show a zoom in close to the Dirac point $K$ (c) Color scale indicates confinement level measured by parameter $F$ in units of $1/A_{c}^{2}$, ($A_{c}=$ unit cell area) as defined in main text. (d) Color scale indicates position across the ribbon measured by parameter $\delta \rho$ (in units of $1/A_{c}$) defined in main text. Parameters: $W= 23.7 nm$, amplitude $A=0.7 nm$, and width $b=1.4 nm$.}
\label{Fig4}
\end{figure}
In order to further characterize these channels, we analyze the changes produced by strain in the band structure and wavefunctions. Figs.~\ref{Fig4} (a) and (b) show band structures for pristine and deformed ribbons, respectively. The effect of strain appears clearly at bands close to zero-energy at the Dirac points as well as at higher energies near the band center. We confirmed that the positions of the $K, K'$ points shift towards each other with increasing strain as expected. Changes near the $K$ point are shown in panels $(c)$ and $(d)$. The color scale in panel $(c)$ represents values of the parameter $F$ (inverse participation ratio) that measures the degree of localization of states\cite{Ziman}. It is defined by $F = \sum_{i} |c_{i}|^{4}$, where $c_{i}$ represents the wavefunction amplitude at the $i$-th site\cite{ZhengBN} and the sum runs over all lattice sites. For example, states near the center of the zero energy band are more localized than those near the Dirac point. The data show localization for states in higher energy bands in the presence of the deformation. In panel $(d)$ we introduce the parameter $\delta \rho = \sum_{i > i_{m}}\{ |c_{i}^{(\varepsilon)}|^{2} - |c_{i}^{(\varepsilon=0)}|^{2}\} $ to determine the real space position of these localized states. $\delta \rho$ is calculated adding contributions from sites $i$ around the strained region (with $i_{m}$ determined by $h(y_{i_{m}}) \ge 0.01 \AA$). The color code shows that these states belong to higher energy bands. Bands around $K'$ are mirror images of the ones shown here.
\begin{figure}
\includegraphics[scale=0.30]{Fig5.pdf}
\caption {(Color online) Probability densities for states at energy $E=0.15 \text{eV}$. Blue (red) curves correspond to state $k_1$ ($k_2$) with negative (positive) velocity. Filled (empty) symbols indicate sublattice A (B). (a) States near Dirac point $K$. (b) States near Dirac point $K'$. Color scale indicates magnitude of pseudo magnetic field (bottom). (c) Position of states in band-structure: right $K$ and left $K'$ respectively. (d) Total LDOS with states from both valleys with same velocity. Color scale indicates location in band structure: yellow near $K$ and black near $K'$. Parameters: $W=23.7 nm$, amplitude $A = 0.7 nm$, and width $b=1.4 nm$.
\label{Fig5}}
\end{figure}
To visualize the real space distribution of these new localized states, we plot probability amplitudes in Fig.~\ref{Fig5} $(a)$ and $(b)$ for states at energy $E=0.15\text{ eV}$ located around $K$ and $K'$ respectively. The states, labeled by $k_1$ and $k_2$, are located at symmetric positions around both Dirac points (red and blue) as shown in panel $(c)$. Full and empty circles correspond to probability densities at sites in sublattices A and B, respectively. The color scale represents values of the pseudo-magnetic field at each valley, as depicted in the bottom part of the panels. Amplitudes of states with the same velocity ($v \propto \partial E /\partial k$), and originating at different valleys, appear larger in different regions across the strained fold. Thus, states from valley $K$ and positive velocity are concentrated at the center of the deformed region, while those from valley $K'$ have larger amplitudes along the sides of it. Panel $(d)$ shows a plot of the LDOS across the strained fold obtained by adding up all states at energy $E = 0.15 eV$ with the same velocity. The color code refers to states from valleys $K$ and $K'$, and identifies the valley separation: LDOS for states from valley $K$ is enhanced at the center (larger values of pseudomagnetic field) while that from valley $K'$ is larger at the sides. We have obtained similar results for different ribbon sizes and strain values. The numerical results confirm that the degree of valley filtering at fixed strain $\varepsilon_{m}$, is determined by the value of the pseudo-magnetic field, and it can be controlled by the ratio $b/W$. Narrow deformed structures exhibit better valley filtering properties with more focused conductance channels.
In order to probe the stability of these states we include edge disorder in a finite central region using the implementation developed in Ref.~\onlinecite{Disorder}. In Fig.~\ref{Fig6} $(a)$ we show results for the conductance averaged over 100 disorder realizations. As reported \cite{Disorder}, the first conductance plateau is greatly diminished because disorder eliminates the contribution of edge states. However, there remains a well defined second conductance plateau that shifts to lower energies with increasing strain, similar to the clean ribbon case. The conductance is increased by only two ballistic channels because disorder eliminates edge channels (vanishing of first conductance plateau), and also those running along the sides of the strained area, with the other two remaining at the center, as shown in panels $(b)$ (LDOS), and $(c)$ (sublattice polarization). The enhanced LDOS region across the strained fold is reduced, and the sublattice polarization on the upper and lower parts of the figure is greatly diminished when compared to Fig.~\ref{Fig3}$(c)$ and $(d)$ (except at the edges where it is modulated by the disorder). It is important to note that edge disorder is the most important source of randomness in suspended samples\cite{APLreview}. As strained folds are suspended structures, defects inherited in the fabrication process are also a possible source of disorder, although unlikely in good quality samples that exhibit a minimum amount of vacancies or impurities that could cause short-range scattering. These features plus the spatial valley-separation between channels provides further protection against bulk disorder.
Finally, it is straightforward to show that strained folds with their principal axis at an angle $\theta$ with respect to the zigzag direction, produce fields with amplitudes $B_{\theta} = B_{zg} \cos(3\theta)$, where $B_{zg}$ is the pseudomagnetic field of a strained fold along the zigzag direction. Thus, strained folds parallel to the armchair direction do not produce a field, and are not valley filters. These predictions can be tested by a proper alignment of the graphene membrane with respect to the direction of the trench on which it is suspended, or the substrate from which it is pulled from.
\begin{figure}
\includegraphics[scale=0.42]{Fig6.pdf}
\caption{(Color online) (a) Conductance for different fold amplitudes $A$ and widths $b$ averaged over 100 disorder realizations. Curves are shifted for clarity purposes. Dashed horizontal lines mark zero value for proper comparison. (b) LDOS and (c) sub-lattice polarization averaged over 10 disorder realizations. Parameters: $A = 0.7\text{nm}$, $b = 1.4 \text{nm}$, and energy $E=0.05 \text{eV}$. Scales (a.u.) normalized to exhibit areas with higher density of states. (Black color regions along the edges correspond to highly disordered sites.)}
\label{Fig6}
\end{figure}
\section{Conclusions} In summary, we have studied the effects of strain created by an engineered strained fold on the transport and LDOS properties of a graphene ribbon. Our results show an enhanced LDOS around the deformed area with the expected sublattice symmetry breaking as reported for other out-of-plane deformations. Conductance calculations reveal extra channels within the energy range corresponding to the first conductance plateau for the undeformed ribbon, in addition to those due to edge states. Band structure calculations confirm that these channels originate from higher energy states that localize along the strained fold-like area. Furthermore, states with the same velocity show real space valley polarization, i.e., a current injected along the deformed structure will be split into two currents: one along the center of the strained fold constituted by states from one valley, and another running at its sides with contributions from states of the other valley as shown schematically in Fig.1. Disorder along the edges destroys the contribution from edge states, and from states localized farther away from the strained region center. Due to this spatial separation of states, the current is expected to be composed mostly by states from one valley at a given point. Different strained fold orientations will produce varying degrees of valley filtering with strained folds parallel to the zigzag direction being optimal valley polarizers. These findings can be tested in transport measurements in appropriately prepared substrates.
While finishing this manuscript we became aware of Ref.~[\onlinecite{Peeters3}] on valley filtering properties for armchair ribbons with a local out-of plane deformation designed to produce snake states\cite{Peetersold}, consistent with previous findings for local deformations\cite{Dawei}.
\noindent{\it Acknowledgments } We acknowledge
discussions with J. Mao, Y. Jang, D. Zhai, F. Mireles, M. Asmar and G. Petersen.
This work was supported by SBF-APS Brazil-USA (R.C.), NSF-DMR 1508325 (D.F., N.S.), FAPERJ E-26/101.522/2010
(A.L., D.F.), CNPq (A.L., C.L.), DOE-FG02-99ER45742, NSF-DMR 1207108 (E.A.).
|
{
"redpajama_set_name": "RedPajamaArXiv"
}
| 1,261
|
Péter Tóth (Budapest, 12 de juliol de 1882 – Budapest, 28 de febrer de 1967) va ser un tirador d'esgrima hongarès que va competir durant el primer quart del .
El 1906 va disputar els primers Jocs Olímpics a Atenes. Allà guanyà la seva primera medalla de bronze en la competició de sabre, tres cops, i fou quart en sabre per equips, mentre en floret, espasa i sabre individual quedà eliminat en primera ronda.
El 1908, als Jocs de Londres, guanyà la medalla d'or en la competició de sabre per equips del programa d'esgrima, formant equip amb Jenő Fuchs, Oszkár Gerde, Lajos Werkner i Dezső Földes. En la prova de sabre individual fou cinquè, mentre en espasa individual quedà eliminat en primera ronda.
Quatre anys més tard, als Jocs d'Estocolm, guanyà una nova medalla d'or en la competició de sabre per equips. En la prova de sabre individual fou sisè, mentre en floret individual quedà eliminat en semifinals.
La seva darrera participació en uns Jocs hagué d'esperar 16 anys, ja que no es produí fins al 1928, quan fou cinquè en la competició de floret per equips.
Referències
Medallistes hongaresos als Jocs Olímpics d'estiu de 1906
Medallistes hongaresos als Jocs Olímpics d'estiu de 1908
Medallistes hongaresos als Jocs Olímpics d'estiu de 1912
Tiradors d'esgrima hongaresos
Tiradors d'esgrima de Budapest
Esportistes hongaresos als Jocs Olímpics d'estiu de 1928
Morts a Budapest
Morts per accident de trànsit
|
{
"redpajama_set_name": "RedPajamaWikipedia"
}
| 1,446
|
Q: Will a Crucial DDR3 8GB Ram Chip work with a Ramaxel DDR3 4GB Ram Chip I am thinking about upgrading the ram in my laptop (currently 6GB, consisting of two, a 4GB and a 2GB, Ramaxel DDR3 SODIMM chips), but I am going to replace the 2GB chip with an 8GB Crucial Chip.
The new Crucial RAM and the Ramaxel RAM are both 1333MHz, so I think thats about everything (in terms of compatibility) checked, so are there any other factors i need to take into account?
A: They'll work, but you won't get the best performance from unmatched RAM. However, since you don't have matched RAM anyway, you won't see a performance decrease. You'll still get the performance advantage from having more RAM.
DDR RAM works the fastest in dual channel mode, where you have 2 (or 4, etc) identical sticks. In this case identical means same speed, size, timings, etc. Generally to get dual channel mode you need 2 sticks from the same manufacturer.
|
{
"redpajama_set_name": "RedPajamaStackExchange"
}
| 1,446
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.