diff --git "a/data_all_eng_slimpj/shuffled/split2/finalzzezvq" "b/data_all_eng_slimpj/shuffled/split2/finalzzezvq" new file mode 100644--- /dev/null +++ "b/data_all_eng_slimpj/shuffled/split2/finalzzezvq" @@ -0,0 +1,5 @@ +{"text":"\\section{Introduction}\n\nThis paper examines split-improvement feature importance scores for tree-based methods. Starting with Classification and Regression Trees \\citep[CART;][]{breiman1984classification} and C4.5 \\citep{quinlan2014c4}, decision trees have been a workhorse of general machine learning, particularly within ensemble methods such as Random Forests \\citep[RF;][]{breiman2001random} and Gradient Boosting Trees \\citep{friedman2001greedy}. They enjoy the benefits of computational speed, few tuning parameters and natural ways of handling missing values. Recent statistical theory for ensemble methods \\citep[e.g.][]{denil2014narrowing,scornet2015consistency,mentch2016quantifying,wager2018estimation,zhou2018boulevard} has provided theoretical guarantees and allowed formal statistical inference. \\textcolor{black}{Variants of these models have also been proposed such as Bernoulli Random Forests \\citep{yisen2016bernoulli,wang2017novel} and Random Survival Forests \\citep{ishwaran2008random}.} For all these reasons, tree-based methods have seen broad applications including in protein interaction models \\citep{meyer2017interactome} in product suggestions on Amazon \\citep{sorokina2016amazon} and in financial risk management \\citep{khaidem2016predicting}.\n\nHowever, in common with other machine learning models, large ensembles of trees act as ``black boxes'', providing predictions but little insight as to how they were arrived at. There has thus been considerable interest in providing tools either to explain the broad patterns that are modeled by these methods, or to provide justifications for particular predictions. This paper examines variable or feature\\footnote{We use ``feature'', ``variable'' and ``covariate'' interchangeably here to indicate individual measurements that act as inputs to a machine learning model from which a prediction is made.} importance scores that provide global summaries of how influential a particular input dimension is in the models' predictions. These have been among the earliest diagnostic tools for machine learning and have been put to practical use as screening tools, see for example \\citet{diaz2006gene} and \\citet{menze2009comparison}. Thus, it is crucial that these feature importance measures reliably produce well-understood summaries.\n\nFeature importance scores for tree-based models can be broadly split into two categories. Permutation methods rely on measuring the change in value or accuracy when the values of one feature are replaced by uninformative noise, often generated by a permutation. These have the advantage of being applicable to any function, but have been critiqued by \\citet{hooker2007generalized,strobl2008conditional,hooker2019please} for forcing the model to extrapolate. By contrast, in this paper we study the alternative split-improvement scores \\textcolor{black}{(also known as Gini importance, or mean decrease impurity)} that are specific to tree-based methods. These naturally aggregate the improvement associated with each note split and can be readily recorded within the tree building process \\citep{breiman1984classification,friedman2001greedy}. In Python, split-improvement is the default implementation for almost every tree-based model, including \\textbf{RandomForestClassifier}, \\textbf{RandomForestRegressor}, \\textbf{GradientBoostingClassifier} and \\textbf{GradientBoostingRegressor} from \\textbf{scikit-learn} \\citep{pedregosa2011scikit}.\n\nDespite their common use, split-improvement measures are biased towards features that exhibit more potential splits and in particular towards continuous features or features with large numbers of categories. \\textcolor{black}{This weakness was already noticed in \\citet{breiman1984classification} and \\citet{strobl2007bias} conducted thorough experiments followed by more discussions in \\citet{boulesteix2011random} and \\citet{nicodemus2011letter}\\footnote{See \\underline{https:\/\/explained.ai\/rf-importance\/} for a popular demonstration of this.}.} While this may not be concerning when all covariates are similarly configured, in practice it is common to have a combination of categorical and continuous variables in which emphasizing more complex features may mislead any subsequent analysis. For example, gender will be a very important binary predictor in applications related to medical treatment; whether the user is a paid subscriber is also central to some tasks such as in Amazon and Netflix. But each of these may be rated as less relevant to age \\textcolor{black}{which is a more complex feature} in either case. \\textcolor{black}{In the task of ranking single nucleotide polymorphisms with respect to their ability to predict a target phenotype, researchers may overlook rare variants as common ones are systematically favoured by the split-improvement measurement. \\citep{boulesteix2011random}}.\n\nWe offer an intuitive rationale for this phenomenon and design a simple fix to solve the bias problem. The observed bias is similar to overfitting in training machine learning models, where we should not build the model and evaluate relevant performance using the same set of data. To fix this, split-improvement calculated from a separate test set is taken into consideration. We further demonstrate that this new measurement is unbiased in the sense that features with no predictive power for the target variable will receive an importance score of zero in expectation. \\textcolor{black}{These measures can be very readily implemented in tree-based software packages.} We believe the proposed measurement provides a more sensible means for evaluating feature importance in practice.\n\nIn the following, we introduce some background and notation for tree-based methods in Section \\ref{tree}. In Section \\ref{FI}, split-improvement is described in detail and its bias and limitations are presented. The proposed unbiased measurement is introduced in Section \\ref{USI}. Section \\ref{real} applies our idea to a simulated example and three real world data sets. We conclude with some discussions and future directions in Section \\ref{dis}. Proofs and some additional simulation results are collected in Appendix \\ref{proof} and \\ref{sim} respectively. \n\n\\section{Tree-Based Methods}\\label{tree}\n\nIn this section, we provide a brief introduction and mathematical formulation of tree-based models \\textcolor{black}{that will also serve to introduce our notation}. We refer readers to relevant chapters in \\citet{friedman2001elements} for a more detailed presentation. \n\n\\subsection{Tree Building Process}\\label{cart}\n\nDecision trees are a non-parametric machine learning tool for constructing prediction models from data. They are obtained by recursively partitioning feature space by axis-aligned splits and fitting a simple prediction function, usually constant, within each partition. The result of this partitioning procedure is represented as a binary tree. Popular tree building algorithms, such as CART and C4.5, may differ in how they choose splits or deal with categorical features. Our introduction in this section mainly reflects how decision trees are implemented in \\textbf{scikit-learn}.\n\nSuppose our data consists of $p$ inputs and a response, denoted by $z_i = (x_i, y_i)$ for $i = 1, 2, \\ldots, n$, with $x_i = (x_{i1}, x_{i2}, \\ldots, x_{ip})$. For simplicity we assume our inputs are continuous\\footnote{Libraries in different programming languages differ on how to handle categorical inputs. \\textbf{rpart} and \\textbf{randomForest} libraries in \\textbf{R} search over every possible subsets when dealing with categorical features. However, tree-based models in \\textbf{scikit-learn} do not support categorical inputs directly. Manually transformation is required to convert categorical features to integer-valued ones, such as using dummy variables, or treated as ordinal when applicable.}. Labels can be either continuous (regression trees) or categorical (classification trees). Let the data at a node $m$ represented by $Q$. Consider a splitting variable $j$ and a splitting point $s$, which results in two child nodes: \n$$\nQ_{l} = \\{(x, y)|x_j \\leq s \\}\n$$\n$$\nQ_{r} = \\{(x, y)|x_j > s \\}.\n$$\nThe impurity at node $m$ is computed by a function $H$, which acts as a measure for goodness-of-fit \\textcolor{black}{and is invariant to sample size}. Our loss function for split $\\theta = (j, s)$ is defined as the weighted average of the impurity at two child nodes:\n$$\nL(Q, \\theta) = \\frac{n_{l}}{n_m}H(Q_{l}) + \\frac{n_{r}}{n_m}H(Q_{r}),\n$$\nwhere $n_m, n_l, n_r$ are the number of training examples falling into node $m, l, r$ respectively.\nThe best split is chosen by minimizing the above loss function:\n\\begin{equation}\\label{best}\n \\theta^* = \\argmin_{\\theta}L(Q, \\theta).\n\\end{equation}\nThe tree is built by recursively splitting child nodes until some stopping criterion is met. For example, we may want to limit tree depth, or keep the number of training samples above some threshold within each node.\n\nFor regression trees, $H$ is usually chosen to be mean squared error, using average values as predictions within each node. At node $m$ with $n_m$ observations, $H(m)$ is defined as:\n$$\n\\bar{y}_m = \\frac{1}{n_m}\\sum_{x_i \\in m}y_i,\n$$\n$$\nH(m) = \\frac{1}{n_m}\\sum_{x_i \\in m}(y_i - \\bar{y}_m)^2.\n$$\nMean absolute error can also be used depending on specific application.\n\nIn classification, there are several different choices for the impurity function $H$. Suppose for node $m$, the target $y$ can take values of $1, 2, \\ldots, K$, define\n$$\np_{mk} = \\frac{1}{n_m}\\sum_{x_i \\in m}\\mathbbm{1}(y_i = k)\n$$\nto be the proportion of class $k$ in node $m$, for $k = 1, 2, \\ldots, K$. Common choices are:\n\\begin{enumerate}\n\\item Misclassification error:\n$$\nH(m) = 1 - \\max_{1 \\leq k \\leq K} p_{mk}.\n$$\n\\item Gini index:\n$$\nH(m) = \\sum_{k \\neq k'}p_{mk}p_{mk'} = 1 - \\sum_{k = 1}^K p_{mk}^2.\n$$\n\\item Cross-entropy or deviance:\n$$\nH(m) = -\\sum_{k=1}^K p_{mk}\\log p_{mk}.\n$$\n\\end{enumerate}\n\nThis paper will focus on mean squared error for regression and Gini index for classification. \n\n\\subsection{Random Forests and Gradient Boosting Trees}\n\nThough intuitive and interpretable, there are two major drawbacks associated with a single decision tree: they suffer from high variance and in some situations they are too simple to capture complex signals in the data. Bagging \\citep{breiman1996bagging} and boosting \\citep{friedman2001greedy} are two popular techniques used to improve the performance of decision trees.\n\nSuppose we use a decision tree as a base learner $t(x; z_1, z_2, \\ldots, z_n)$, where $x$ is the input for prediction and $z_1, z_2, \\ldots, z_n$ are training examples as before. Bagging aims to stabilize the base learner $t$ by resampling the training data. In particular, the bagged estimator can be expressed as:\n$$\n\\hat{t}(x) = \\frac{1}{B}\\sum_{b=1}^Bt(x; z^*_{b1}, z^*_{b2}, \\ldots, z^*_{bn})\n$$\nwhere $z^*_{bi}$ are drawn independently with replacement from the original data (bootstrap sample), and $B$ is the total number of base learners. Each tree is constructed using a different bootstrap sample from the original data. Thus approximately one-third of the cases are left out and not used in the construction of each base learner. We call these \\textit{out-of-bag} samples.\n\nRandom Forests \\citep{breiman2001random} are a popular extension of bagging with an additional randomness injected. At each step when searching for the best split, only $p_0$ features are randomly selected from all $p$ possible features and the best split $\\theta^*$ must be chosen from this subset. When $p_0 = p$, this reduces to bagging. Mathematically, the prediction is written as \n$$\n\\hat{t}^{RF}(x) = \\frac{1}{B}\\sum_{b=1}^Bt(x; \\xi_b, z^*_{b1}, z^*_{b2}, \\ldots, z^*_{bn})\n$$\nwith $\\xi_b \\stackrel{\\mbox{iid}}{\\sim} \\Xi$ denoting the additional randomness for selecting from a random subset of available features.\n\nBoosting is another widely used technique by data scientists to achieve state-of-the-art results on many machine learning challenges \\citep{chen2016xgboost}. Instead of building trees in parallel as in bagging, it does this sequentially, allowing the current base learner to correct for any previous bias. In \\citet{ghosal2018boosting}, the authors also consider boosting RF to reduce bias. We will skip over some technical details on boosting and restrict our discussion of feature importance in the context of decision trees and RF. Note that as long as tree-based models combine base learners in an additive fashion, their feature importance measures are naturally calculated by (weighted) average across those of individual trees. \n\n\n\\section{Measurement of Feature Importance}\\label{FI}\n\nAlmost every feature importance measures used in tree-based models belong to two classes: split-improvement or permutation importance. Though our focus will be on split-improvement, permutation importance is introduced first for completeness. \n\n\\subsection{Permutation Importance}\n\nArguably permutation might be the most popular method for assessing feature importance in the machine learning community. Intuitively, if we break the link between a variable $X_j$ and $y$, the prediction error increases then variable $j$ can be considered as important. \n\nFormally, we view the training set as a matrix $X$ of size $n \\times p$, where each row $x_i$ is one observation. Let $X^{\\pi, j}$ be a matrix achieved by permuting the $j^{th}$ column according to some mechanism $\\pi$. If we use $l(y_i, f(x_i))$ as the loss incurred when predicting $f(x_i)$ for $y_i$, then the importance of $j^{th}$ feature is defined as:\n\\begin{equation} \\label{p}\n\\text{VI}^{\\pi}_j = \\sum_{i=1}^n l(y_i, f(x_i^{\\pi, j}) - l(y_i, f(x_i)))\n\\end{equation}\nthe increase in prediction error when the $j^{th}$ feature is permuted. Variations include choosing different permutation mechanism $\\pi$ or evaluating Equation (\\ref{p}) on a separate test set. In Random Forests, \\citet{breiman2001random} suggest to only permute the values of the $j^{th}$ variable in the \\textit{out-of-bag} samples for each tree, and final importance for the forest is given by averaging across all trees. \n\nThere is a small literature analyzing permutation importance in the context of RF. \\citet{ishwaran2007variable} studied paired importance.\n\\citet{hooker2007generalized, strobl2008conditional, hooker2019please} advocated against permuting features by arguing it emphasizes behavior in regions where there is very little data. More recently, \\citet{gregorutti2017correlation} conducted a theoretical analysis of permutation importance measure for an additive regression model. \n\n\\subsection{Split-Improvement}\n\nWhile permutation importance measures can generically be applied to any prediction function, \nsplit-improvement is unique to tree-based methods, and can be calculated directly from the training process. Every time a node is split on variable $j$, the combined impurity for the two descendent nodes is less than the parent node. Adding up the weighted impurity decreases for each split in a tree and averaging over all trees in the forest yields an importance score for each feature.\n\nFollowing our notation in Section \\ref{cart}, the impurity function $H$ is either mean squared error for regression or Gini index for classification. The best split at node $m$ is given by $\\theta^*_m$ which splits at $j^{th}$ variable and results in two child nodes denoted as $l$ and $r$. Then the decrease in impurity for split $\\theta^*$ is defined as:\n\\begin{equation} \\label{di}\n\\Delta(\\theta^*_m) = \\omega_mH(m) - (\\omega_lH(l) + \\omega_rH(r)),\n\\end{equation}\nwhere $\\omega$ is the proportion of observations falling into each node, i.e., $\\omega_m = \\frac{n_m}{n}$, $\\omega_l = \\frac{n_l}{n}$ and $\\omega_r = \\frac{n_r}{n}$. Then, to get the importance for $j^{th}$ feature in a single tree, we add up all $\\Delta(\\theta^*_m)$ where the split is at the $j^{th}$ variable:\n\\begin{equation} \\label{t}\n\\text{VI}^{\\text{T}}_j = \\sum_{m, j \\in \\theta^*_m}\\Delta(\\theta^*_m).\n\\end{equation}\nHere the sum is taken over all non-terminal nodes of the tree, and we use the notation $j \\in \\theta^*_m$ to denote that the split is based on the $j^{th}$ feature. \n\nThe notion of split-improvement for decision trees can be easily extended to Random Forests by taking the average across all trees. Suppose there are $B$ base learners in the forest, we could naturally define\n\\begin{equation} \\label{si}\n\\text{VI}^{\\text{RF}}_j = \\frac{1}{B}\\sum_{b = 1}^B\\text{VI}^{\\text{T(b)}}_j = \\frac{1}{B}\\sum_{b = 1}^B\\sum_{m, j \\in \\theta^*_m}\\Delta_b(\\theta^*_m).\n\\end{equation}\n\n\n\\subsection{Bias in Split-Improvement}\n\n\\citet{strobl2007bias} pointed out that the split-improvement measure defined above is biased towards increasing the importance of continuous features or categorical features with many categories. This is because of the increased flexibility afforded by a larger number of potential split points. We conducted a similar simulation to further demonstrate this phenomenon. All our experiments are based on Random Forests which gives more stable results than a single tree.\n\nWe generate a simulated dataset so that $X_1 \\sim N(0, 1)$ is continuous, and $X_2, X_3, X_4, X_5$ are categorically distributed with $2, 4, 10, 20$ categories respectively. The probabilities are equal across categories within each feature. In particular, $X_2$ is Bernoulli distribution with $p=0.5$. In classification setting, the response $y$ is also generated as a Bernoulli distribution with $p=0.5$, but independent of all the $X$'s. For regression, $y$ is independently generated as $N(0, 1)$. We repeat the simulation 100 times, each time generating $n=1000$ data points and fitting a Random Forest model\\footnote{Our experiments are implemented using \\textbf{scikit-learn}. Unless otherwise noted, default parameters are used.} using the data set. Here categorical features are encoded into dummy variables, and we sum up importance scores for corresponding dummy variables as final measurement for a specific categorical feature. In Appendix \\ref{sim}, we also provide simulation results when treating those categorical features as (ordered) discrete variables. \n\n\\begin{figure}\n \\centering\n \\begin{subfigure}[b]{0.45\\textwidth}\n \\centering\n \\includegraphics[width=\\textwidth]{Split_Improvement_for_Classification_Dummy.png}\n \\caption{Classification}\n \\label{fig:si_cls}\n \\end{subfigure}\n \\hfill\n \\begin{subfigure}[b]{0.45\\textwidth}\n \\centering\n \\includegraphics[width=\\textwidth]{Split_Improvement_for_Regression_Dummy.png}\n \\caption{Regression}\n \\label{fig:si_regr}\n \\end{subfigure}\n \\hfill\n \n \\caption{Split-improvement measures on five predictors. Box plot is based on 100 repetitions. 100 trees are built in the forest and maximum depth of each tree is set to 5.}\n \\label{fig:si}\n \n\\end{figure}\n\nBox plots are shown in Figure \\ref{fig:si_cls} and \\ref{fig:si_regr} for classification and regression respectively. The continuous feature $X_1$ is frequently given the largest importance score in regression setting, and among the four categorical features, those with more categories receive larger importance scores. Similar phenomenon is observed in classification as well, while $X_5$ appears to be artificially more important than $X_1$. Also note that all five features get positive importance scores, though we know that they have no predictive power for the target value $y$.\n\nWe now explore how strong a signal is needed in order for the split-improvement measures to discover important predictors. We generate $X_1, X_2, \\ldots, X_5$ as before, but in regression settings set $y = \\rho X_2 + \\epsilon $ where $\\epsilon \\sim N(0, 1)$. We choose $\\rho$ to range from 0 to 1 at step size 0.1 to encode different levels of signal. For classification experiments, we first make $y = X_2$ and then flip each element of $y$ according to $P(U > \\frac{1 + \\rho}{2})$ where $U$ is Uniform$[0,1]$. This way, the correlation between $X_2$ and $y$ will be approximately $\\rho$. We report the average ranking of all five variables across 100 repetitions for each $\\rho$. The results are shown in Figure \\ref{fig:rank}.\n\nWe see that $\\rho$ needs to be larger than 0.2 to actually find $X_2$ is the most important predictor in our classification setting, while in regression this value increases to 0.6. And we also observe that a clear order exists for the remaining (all unimportant) four features. \n\n\\begin{figure}\n \\centering\n \\begin{subfigure}[b]{0.45\\textwidth}\n \\centering\n \\includegraphics[width=\\textwidth]{Average_Ranking_for_Classification_Dummy.png}\n \\caption{Classification}\n \\label{fig:c_rank}\n \\end{subfigure}\n \\hfill\n \\begin{subfigure}[b]{0.45\\textwidth}\n \\centering\n \\includegraphics[width=\\textwidth]{Average_Ranking_for_Regression_Dummy.png}\n \\caption{Regression}\n \\label{fig:r_rank}\n \\end{subfigure}\n \\hfill\n \n \\caption{Average feature importance ranking across different signal strengths over 100 repetitions. 100 trees are built in the forest and maximum depth of each tree is set to 5.}\n \\label{fig:rank}\n \n\\end{figure}\n\n\nThis bias phenomenon could make many statistical analyses based on split-improvement invalid. For example, gender is a very common and powerful binary predictor in many applications, but feature screening based on split-improvement might think it is not important compared to age. In the next section, we explain intuitively why this bias is observed, and provide a simple but effective adjustment. \n\n\\subsection{Related Work}\n\n\\textcolor{black}{Before presenting our algorithm, we review some related work aiming at correcting the bias in split-improvement. Most of the methods fall into two major categories: they either propose new tree building algorithms by redesigning split selection rules, or perform as a post hoc approach to debias importance measurement.} \n\n\\textcolor{black}{There has been a line of work on designing trees which do not have such bias as observed in classical algorithms such as CART and C4.5. For example, Unbiased and Efficient Statistical Tree \\citep[QUEST;][]{loh1997split} removed the bias by using F-tests on ordered variables and contingency table chi-squared tests on categorical variables. Based on QUEST, CRUISE \\citep{kim2001classification} and GUIDE \\citep{loh2009improving} were developed. We refer readers to \\citet{loh2014fifty} for a detailed discussion in this aspect. In \\citet{strobl2007bias}, the authors resorted to a different algorithm called cforest \\citep{hothorn2010party}, which was based on a conditional inference framework \\citep{hothorn2006unbiased}. They also implemented a stopping criteria based on multiple test procedures.} \n\n\\textcolor{black}{\\citet{sandri2008bias} expressed split-improvement as two components: a heterogeneity reduction and a positive bias. Then the original dataset $( \\mathbf{X}, Y)$ is augmented with pseudo data $\\mathbf{Z}$ which is uninformative but shares the structure of $\\mathbf{X}$ \\citep[this idea of generating pseudo data is later formulated in a general framework termed ``knockoffs'';][]{barber2015controlling}. The positive bias term is estimated by utilizing the pseudo variables $\\mathbf{Z}$ and subtracted to get a debiased estimate. \\citet{nembrini2018revival} later modified this approach to shorten computation time and provided empirical importance testing procedures. Most recently, \\citet{li2019debiased} derived a tight non-asymptotic bound on the expected bias of noisy features and provided a new debiased importance measure. However, this approach only alleviates the issue and still yields biased results.}\n\n\\textcolor{black}{Our approach works as a post hoc analysis, where the importance scores are calculated after a model is built. Compared to previous methods, it enjoys several advantages: \n\\begin{itemize}\n \\item It can be easily incorporated into any existing framework for tree-based methods, such as Python or R.\n \\item It does not require generating additional pseudo data or computational repetitions as in \\citet{sandri2008bias, nembrini2018revival}.\n \\item Compared to \\citet{li2019debiased} which does not have a theoretical guarantee, our method is proved to be unbiased for noisy features.\n\\end{itemize}}\n\n\\section{Unbiased Split-Improvement}\\label{USI}\n\nWhen it comes to evaluating the performance of machine learning models, we generally use a separate test set to calculate generalization accuracy. The training error is usually smaller than the test error as the algorithm is likely to \"overfit\" on the training data. This is exactly why we observe the bias with split-improvement. Each split will favor continuous features or those features with more categories, as they will have more flexibility to fit the training data. The vanilla version of split-improvement is just like using train error for evaluating model performance. \n\nBelow we propose methods to remedy this bias phenomenon by utilizing a separate test set, and prove that for features with no predictive power, we're able to get an importance score of 0 in expectation for both classification and regressions settings. Our method is entirely based on the original framework of RF, requires barely no additional computational efforts, and can be easily integrated into any existing software libraries.\n\nThe main ingredient of the proposed method is to calculate the impurity function $H$ using additional information provided from test data. In the context of RF, we can simply take \\textit{out-of-bag} samples for each individual tree. \\textcolor{black}{Our experiments below are based on this strategy. In the context of the honest trees proposed in \\citet{wager2018estimation} that divide samples into a partition used to determine tree structures and a partition used to obtain leaf values, the latter could be used as our test data below. In boosting, it is common not to sample, but to keep a test set separate to determine a stopping time.} Since the choice of impurity function $H$ is different for classification and regression, in what follows we will treat them separately. \n\nFigure \\ref{fig:test} and \\ref{fig:urank} shows the results on previous classification and regression tasks when our unbiased method is applied\\footnote{Relevant codes can be found at \\href{https:\/\/github.com\/ZhengzeZhou\/unbiased-feature-importance}{https:\/\/github.com\/ZhengzeZhou\/unbiased-feature-importance}.}. Feature scores for all variables are spread around $0$, though continuous features and categorical features with more categories tend to exhibit more variability. In the case where there is correlation between $X_2$ and $y$, even for the smallest $\\rho = 0.1$, we can still find the most informative predictor, whereas there are no clear order for the remaining noise features. \n\n\n\\begin{figure}\n \\centering\n \\begin{subfigure}[b]{0.45\\textwidth}\n \\centering\n \\includegraphics[width=\\textwidth]{Unbiased_Split_Improvement_for_Classification_Dummy.png}\n \\caption{Classification}\n \\label{fig:test_cls}\n \\end{subfigure}\n \\hfill\n \\begin{subfigure}[b]{0.45\\textwidth}\n \\centering\n \\includegraphics[width=\\textwidth]{Unbiased_Split_Improvement_for_Regression_Dummy.png}\n \\caption{Regression}\n \\label{fig:test_regr}\n \\end{subfigure}\n \\hfill\n \n \\caption{Unbiased split-improvement. Box plot is based on 100 repetitions. 100 trees are built in the forest and maximum depth of each tree is set to 5. Each tree is trained using bootstrap samples and \\textit{out-of-bag} samples are used as test set.}\n \\label{fig:test}\n \n\\end{figure}\n\n\\begin{figure}\n \\centering\n \\begin{subfigure}[b]{0.45\\textwidth}\n \\centering\n \\includegraphics[width=\\textwidth]{Unbiased_Average_Ranking_for_Classification_Dummy.png}\n \\caption{Classification}\n \\label{fig:uc_rank}\n \\end{subfigure}\n \\hfill\n \\begin{subfigure}[b]{0.45\\textwidth}\n \\centering\n \\includegraphics[width=\\textwidth]{Unbiased_Average_Ranking_for_Regression_Dummy.png}\n \\caption{Regression}\n \\label{fig:ur_rank}\n \\end{subfigure}\n \\hfill\n \n \\caption{Unbiased feature importance ranking across different signal strengths averaged over 100 repetitions. 100 trees are built in the forest and maximum depth of each tree is set to 5. Each tree is trained using bootstrap samples and \\textit{out-of-bag} samples are used as test set.}\n \\label{fig:urank}\n \n\\end{figure}\n\n\n\\subsection{Classification}\n\nConsider a root node $m$ and two child nodes, denoted by $l$ and $r$ respectively. The best split $\\theta^*_m = (j, s)$ was chosen by Formula (\\ref{best}) and Gini index is used as impurity function $H$. \n\nFor simplicity, we focus on binary classification. Let $p$ denote class proportion within each node. For example, $p_{r, 2}$ denotes the proportion of class 2 in the right child node. Hence the Gini index for each node can be written as:\n$$\nH(m) = 1 - p_{m,1}^2 - p_{m,2}^2,\n$$\n$$\nH(l) = 1 - p_{l,1}^2 - p_{l,2}^2,\n$$\n$$\nH(r) = 1 - p_{r,1}^2 - p_{r,2}^2.\n$$\nThe split-improvement for a split at $j^{th}$ feature when evaluated using only the training data is written as in Equation (\\ref{di}). This value is always positive no matter which feature is chosen and where the split is, which is exactly why a selection bias will lead to overestimate of feature importance.\n\nIf instead, we have a separate test set available, the predictive impurity function for each node is modified to be:\n\\begin{equation}\n \\label{pi}\n \\begin{aligned}\n H'(m) &= 1 - p_{m,1}p'_{m,1} - p_{m,2}p'_{m,2}, \\\\ \n H'(l) &= 1 - p_{l,1}p'_{l,1} - p_{l,2}p'_{l,2}, \\\\\n H'(r) &= 1 - p_{r,1}p'_{r,1} - p_{r,2}p'_{r,2},\n \\end{aligned}\n\\end{equation}\nwhere $p'$ is class proportion evaluating on the test data.\nAnd similarly, \n\\begin{equation}\n \\label{delta_c}\n \\begin{aligned}\n\\Delta'(\\theta^*_m) & = \\omega_mH'(m) - (\\omega_lH'(l) + \\omega_rH'(r)) \\\\\n& = \\omega_l(H'(m) - H'(l)) + \\omega_r(H'(m) - H'(r)).\n \\end{aligned}\n\\end{equation}\n\\textcolor{black}{Using these definitions, we first demonstrate that an individual split is unbiassed in the sense that if $y$ has no bivariate relationship with $X_j$, $\\Delta'(\\theta^*_m)$ will have expectation 0.}\n\\begin{lemma}\\label{l_c}\nIn classification settings, for a given feature $X_j$, if $y$ is marginally independent of $X_j$ within the region defined by node $m$, then \n$$\nE\\Delta'(\\theta^*_m) = 0\n$$\nwhen splitting at the $j^{th}$ feature.\n\\end{lemma}\n\n\\begin{proof}\nSee Appendix \\ref{proof}.\n\\end{proof}\nSimilar to Equation (\\ref{t}), split-improvement of $x_j$ in a decision tree is defined as:\n\\begin{equation} \\label{ut}\n\\text{VI}^{\\text{T,C}}_j = \\sum_{m, j \\in \\theta^*_m}\\Delta'(\\theta^*_m).\n\\end{equation}\n\\textcolor{black}{We can now apply Lemma \\ref{l_c} to provide a global result so long as $X_j$ is always irrelevant to $y$.}\n\\begin{theorem}\nIn classification settings, for a given feature $X_j$, if $y$ is independent of $X_j$ in every hyper-rectangle subset of the feature space, then we always have\n$$\nE\\text{VI}^{\\text{T,C}}_j = 0.\n$$\n\\end{theorem}\n\n\\begin{proof}\nThe result follows directly from Lemma \\ref{l_c} and Equation (\\ref{ut}). \n\\end{proof}\n\nThis unbiasedness result can be easily extended to the case of RF by (\\ref{si}), as it's an average across base learners. \\textcolor{black}{We note here that our independence condition is designed to account for relationships that appear before accounting for splits on other variables, possibly due to relationships between $X_j$ and other features, and afterwards. It is trivially implied by the independence of $X_j$ with both $y$ and the other features. Our condition may also be stronger than necessary, depending on the tree-building process. We may be able to restrict the set of hyper-rectangles to be examined, but only by analyzing specific tree-building algorithms.}\n\n\\subsection{Regression}\n\nIn regression, we use mean squared error as the impurity function $H$:\n$$\n\\bar{y}_m = \\frac{1}{n_m}\\sum_{x_i \\in m}y_i,\n$$\n$$\nH(m) = \\frac{1}{n_m}\\sum_{x_i \\in m}(y_i - \\bar{y}_m)^2.\n$$\nIf instead the impurity function $H$ is evaluated on a separate test set, we define \n$$\nH'(m) = \\frac{1}{n'_m}\\sum_{i=1}^{n'_m}(y'_{m,i} - \\bar{y}_m)^2 \n$$\nand similarly\n$$\n\\Delta'(\\theta^*_m) = \\omega_mH'(m) - (\\omega_lH'(l) + \\omega_rH'(r)).\n$$\nNote that here $H'(m)$ measures mean squared error within node $m$ on test data with the fitted value $\\bar{y}_m$ from training data. If we just sum up $\\Delta'$ as feature importance, it will end up with negative values as $\\bar{y}_m$ will overfit the training data and thus make mean squared error much larger deep in the tree. In other words, it \\textit{over-corrects} the bias. For this reason, our unbiased split-improvement is defined slightly different from the classification case (\\ref{ut}):\n\\begin{equation} \\label{utr}\n\\text{VI}^{\\text{T,R}}_j = \\sum_{m, j \\in \\theta^*_m} (\\Delta(\\theta^*_m) + \\Delta'(\\theta^*_m)).\n\\end{equation}\n\nNotice that although Equation (\\ref{ut}) and (\\ref{utr}) are different, they originates from the same idea by correcting bias using test data. Unlike Formula (\\ref{pi}) for Gini index, where we could design a predictive impurity function by combining train and test data together, it's hard to come up with a counterpart in regression setting. \n\nJust as in the classification case, we could show the following unbiasedness results:\n\n\\begin{lemma}\\label{l_r}\nIn regression settings, for a given feature $X_j$, if $y$ is marginally independent of $X_j$ within the region defined by node $m$, then \n$$\nE(\\Delta(\\theta^*_m) + \\Delta'(\\theta^*_m)) = 0\n$$\nwhen splitting at the $j^{th}$ feature.\n\\end{lemma}\n\n\\begin{proof}\nSee Appendix \\ref{proof}.\n\\end{proof}\n\\begin{theorem}\nIn regression settings, for a given feature $X_j$, if $y$ is independent of $X_j$ in every hyper-rectangle subset of the feature space, then we always have\n$$\nE\\text{VI}^{\\text{T,R}}_j = 0.\n$$\n\\end{theorem}\n\n\n\n\\section{Empirical Studies}\\label{real}\n\n\\textcolor{black}{In this section, we apply our method to one simulated example and three real data sets. We compare our results to three other algorithms: the default split-improvement in \\textbf{scikit-learn}, cforest \\citep{hothorn2006unbiased} in R package \\textbf{party} and bias-corrected impurity \\citep{nembrini2018revival} in R package \\textbf{ranger}. We did not include comparison with \\citet{li2019debiased} since their method does not enjoy the unbiased property. In what follows, we use shorthand SI for the default split-improvement, UFI for our method (unbiased feature importance).}\n\n\\subsection{Simulated Data}\n\n\\textcolor{black}{The data has 1000 samples and 10 features, where $X_i$ takes values in $0, 1, 2, \\ldots, i - 1$ with uniform probability for $1 \\leq i \\leq 10$. Here, we assume only $X_1$ contains true signal and all remaining nine features are noisy features. The target value $y$ is generated as follows:\n\\begin{itemize}\n \\item Regression: $y = X_1 + 5 \\epsilon$, where $\\epsilon \\sim \\mathcal{N}(0, 1)$.\n \\item Classification: $P(y = 1 | X) = 0.55$ if $X_1 = 1$, and $P(y = 1 | X) = 0.45$ if $X_1 = 0$.\n\\end{itemize}\nNote that this task is designed to be extremely hard by choosing the binary feature as informative, and adding large noise (regression) or setting the signal strength low (classification). To evaluate the results, we look at the ranking of all features based on importance scores. Ideally $X_1$ should be ranked $1^{st}$ as it is the only informative feature. Table \\ref{table:sum} shows the average ranking of feature $X_1$ across 100 repetitions. The best result of each column is marked in \\textbf{bold}. Here we also compare the effect of tree depth by constructing shallow trees (with tree depth 3) and deep trees (with tree depth 10). Since cforest does not provide a parameter for directly controlling tree depth, we change the values of mincriterion as an alternative. }\n\n\\begin{table}[h]\n\\centering\n\\begin{tabular}{|c|c|c|c|c|}\n\\hline\n\\multirow{2}{*}{} & \\multicolumn{2}{c|}{Tree depth = 3} & \\multicolumn{2}{c|}{Tree depth = 10} \\\\ \\cline{2-5} \n & R & C & R & C \\\\ \\hline\nSI & 3.71 & 4.10 & 10.00 & 10.00 \\\\ \\hline\nUFI & \\textbf{1.47} & 1.39 & \\textbf{1.55} & \\textbf{1.69} \\\\ \\hline\ncforest & 1.57 & \\textbf{1.32} & 1.77 & 1.88 \\\\ \\hline\nranger & 1.54 & 1.64 & 2.46 & 1.93 \\\\ \\hline\n\\end{tabular}\n\\caption{Average importance ranking of informative feature $X_1$. R stands for regression and C for classification. The result averages over 100 repetitions. Lower values indicate better abilities in identifying informative features. In cforest, we set mincriterion to be 2.33 (0.99 percentile of normal distribution) for shallow trees and 1.28 (0.9 percentile) for deep trees.}\n\\label{table:sum}\n\\end{table}\n\n\\textcolor{black}{We can see that our method UFI achieves the best results in three situations except the classification case for shallow trees, where it is only slightly worse than cforest. Another interesting observation is that deeper trees tend to make the task of identifying informative features harder when there are noisy ones, since it is more likely to split on noisy features for splits deep down in the tree. This effect is most obvious for the default split-improvement, where it performs the worst especially for deep trees: the informative feature $X_1$ is consistently ranked as the least important ($10^{th}$ place). UFI does not seem to be affected too much from tree depth.}\n\n\\subsection{RNA Sequence Data}\nThe first data set examined is the prediction of C-to-U edited sites in plant mitochondrial RNA. This task was studied statistically in \\citet{cummings2004simple}, where the authors applied Random Forests and used the original split-improvement as feature importance. Later, \\citet{strobl2007bias} demonstrated the performance of cforest on this data set. \n\nRNA editing is a molecular process whereby an RNA sequence is\nmodified from the sequence corresponding to the DNA\ntemplate. In the mitochondria of land plants, some cytidines\nare converted to uridines before translation \\citep{cummings2004simple}. \n\nWe use the \\textit{Arabidopsis thaliana} data file\\footnote{The data set can be downloaded from \\href{https:\/\/bmcbioinformatics.biomedcentral.com\/articles\/10.1186\/1471-2105-5-132}{https:\/\/bmcbioinformatics.biomedcentral.com\/articles\/10.1186\/1471-2105-5-132}.} as in \\citet{strobl2007bias}. The features are based on the nucleotides surrounding the edited\/non-edited sites and on the estimated folding energies of those regions. After removing missing values and one column which will not be used, the data file consists of 876 rows and 45 columns:\n\\begin{itemize}\n \\item the response (binary).\n \\item 41 nucleotides at positions -20 to 20 relative to the\nedited site (categorical, one of A, T, C or G).\n \\item the codon position (also 4 categories).\n \\item two continuous variables based on on the estimated folding energies.\n\\end{itemize} \n\nFor implementation, we create dummy variables for all categorical features, and build forest using 100 base trees. The maximum tree depth for this data set is not restricted as the number of potential predictors is large. We take the sum of importance across all dummy variables corresponding to a specific feature for final importance scores. All default parameters are used unless otherwise specified.\n\nThe results are shown in Figure \\ref{fig:ctou}. Red error bars depict one standard deviation when the experiments are repeated 100 times. From the default split-improvement (Figure \\ref{fig:si_ctou}), we can see that except several apparently dominant predictors (nucleotides at position -1 and 1, and two continuous features \\textit{fe} and \\textit{dfe}), the importance for the remaining nearly 40 features are indistinguishable. The feature importance scores given by UFI (Figure \\ref{fig:ufi_ctou}) and cforest (Figure \\ref{fig:cf_ctou}) are very similar. Compared with SI, although all methods agree on top three features being the nucleotides at position -1 and 1, and the continuous one \\textit{fe}, there are some noticeable differences. Another continuous feature \\textit{dfe} is originally ranked at the fourth place in Figure \\ref{fig:si_ctou}, but its importance scores are much lower by UFI and cforest. The result given by ranger (Figure \\ref{fig:ranger_ctou}) is slightly different from UFI and cforest, where it seems to have more features with importance scores larger than 0. In general, we see a large portion of predictors with feature importance close to 0 for three improved methods, which makes subsequent tasks like feature screening easier. \n\n\n\\begin{figure}\n \\centering\n \\begin{subfigure}[b]{0.495\\textwidth}\n \\centering\n \\includegraphics[width=\\textwidth]{SI_on_CtoU.png}\n \\caption{SI}\n \\label{fig:si_ctou}\n \\end{subfigure}\n \\hfill\n \\begin{subfigure}[b]{0.495\\textwidth}\n \\centering\n \\includegraphics[width=\\textwidth]{UFI_on_CtoU.png}\n \\caption{UFI}\n \\label{fig:ufi_ctou}\n \\end{subfigure}\n \\hfill\n\n \\begin{subfigure}[b]{0.495\\textwidth}\n \\centering\n \\includegraphics[width=\\textwidth]{cforest_on_CtoU.png}\n \\caption{cforest}\n \\label{fig:cf_ctou}\n \\end{subfigure}\n \\hfill\n \\begin{subfigure}[b]{0.495\\textwidth}\n \\centering\n \\includegraphics[width=\\textwidth]{ranger_on_CtoU.png}\n \\caption{ranger}\n \\label{fig:ranger_ctou}\n \\end{subfigure}\n \n \\caption{Feature importance for RNA sequence data. 100 trees are built in the forest. Red error bars depict one standard deviation when the experiments are repeated 100 times.}\n \\label{fig:ctou}\n \n\\end{figure}\n\n\n\\subsection{Adult Data}\n\nAs a second example, we will use the Adult Data Set from UCI Machine Learning Repository\\footnote{\\href{https:\/\/archive.ics.uci.edu\/ml\/datasets\/adult}{https:\/\/archive.ics.uci.edu\/ml\/datasets\/adult}}. The task is to predict whether income exceeds \\$50K\/yr based on census data. We remove all entries including missing values, and only focus on people from Unites States. In total, there are 27504 training samples and Table \\ref{table:adult} describes relevant feature information. Notice that we add a standard normal random variable, which is shown in the last row. We randomly sample 5000 entries for training. \n\n\\begin{table}[]\n\\centering\n\\begin{tabular}{|c|c|}\n\\hline\nAttribute & Description \\\\ \\hline\nage & continuous \\\\ \\hline\nworkclass & categorical (7) \\\\ \\hline\nfnlwgt & continuous \\\\ \\hline\neducation & categorical (16) \\\\ \\hline\neducation-num & continuous \\\\ \\hline\nmarital-status & categorical (7) \\\\ \\hline\noccupation & categorical (14) \\\\ \\hline\nrelationship & categorical (6) \\\\ \\hline\nrace & categorical (5) \\\\ \\hline\nsex & binary \\\\ \\hline\ncapital-gain & continuous \\\\ \\hline\ncapital-loss & continuous \\\\ \\hline\nhours-per-week & continuous \\\\ \\hline\nrandom & continuous \\\\ \\hline\n\\end{tabular}\n\\caption{Attribute description for adult data set.}\n\\label{table:adult}\n\\end{table}\n\n\nThe results are shown in Figure \\ref{fig:adult}. UFI (\\ref{fig:ufi_adult}), cforest(\\ref{fig:cf_adult}) and ranger (\\ref{fig:ranger_adult}) display similar feature rankings which are quite different from the original split-improvement (\\ref{fig:si_adult}). Notice the random normal feature we added (marked in black) is actually ranked the third most important in \\ref{fig:si_adult}. This is not surprising as most of the features are categorical, and even for some continuous features, a large portion of the values are actually 0 (such as \\textit{capital-gain} and \\textit{capital-loss}). For UFI, cforest and ranger, the random feature is assigned an importance score close to 0. Another feature with big discrepancy is \\textit{fnlwgt}, which is ranked among top three originally but is the least important for other methods. \\textit{fnlwgt} represents final weight, the number of units in the target population that the responding unit represents. Thus it is unlikely to have strong predictive power for the response. For this reason, some analyses deleted this predictor before fitting models\\footnote{\\href{http:\/\/scg.sdsu.edu\/dataset-adult\\_r\/}{http:\/\/scg.sdsu.edu\/dataset-adult\\_r\/}}.\n\n\\begin{figure}\n \\centering\n \\begin{subfigure}[b]{0.49\\textwidth}\n \\centering\n \\includegraphics[width=\\textwidth]{SI_on_adult_data.png}\n \\caption{SI}\n \\label{fig:si_adult}\n \\end{subfigure}\n \\hfill\n \\begin{subfigure}[b]{0.49\\textwidth}\n \\centering\n \\includegraphics[width=\\textwidth]{UFI_on_adult_data.png}\n \\caption{UFI}\n \\label{fig:ufi_adult}\n \\end{subfigure}\n \\hfill\n \n \\begin{subfigure}[b]{0.49\\textwidth}\n \\centering\n \\includegraphics[width=\\textwidth]{cforest_on_adult_data.png}\n \\caption{cforest}\n \\label{fig:cf_adult}\n \\end{subfigure}\n \\hfill\n \\begin{subfigure}[b]{0.49\\textwidth}\n \\centering\n \\includegraphics[width=\\textwidth]{ranger_on_adult_data.png}\n \\caption{ranger}\n \\label{fig:ranger_adult}\n \\end{subfigure}\n \n \\caption{Feature importance for adult data. 20 trees are built in the forest. Red error bars depict one standard deviation when the experiments are repeated 100 times.}\n \\label{fig:adult}\n\\end{figure}\n\n\n\\subsection{Boston Housing Data}\n\n\\textcolor{black}{We also conduct analyses on a regression example using the Boston Housing Data\\footnote{\\href{https:\/\/archive.ics.uci.edu\/ml\/machine-learning-databases\/housing\/}{https:\/\/archive.ics.uci.edu\/ml\/machine-learning-databases\/housing\/}}, which has been widely studied in previous literature \\citep{bollinger1981book, quinlan1993combining}. The data set contains 12 continuous, one ordinal and one binary features and the target is median value of owner-occupied homes in \\$1000's. We add a random feature distributed as $\\mathcal{N}(0, 1)$ as well.}\n\n\\begin{figure}[h]\n \\centering\n \\begin{subfigure}[b]{0.49\\textwidth}\n \\centering\n \\includegraphics[width=\\textwidth]{SI_on_boston_data.png}\n \\caption{SI}\n \\label{fig:si_boston}\n \\end{subfigure}\n \\hfill\n \\begin{subfigure}[b]{0.49\\textwidth}\n \\centering\n \\includegraphics[width=\\textwidth]{UFI_on_boston_data.png}\n \\caption{UFI}\n \\label{fig:ufi_boston}\n \\end{subfigure}\n \\hfill\n \n \\begin{subfigure}[b]{0.49\\textwidth}\n \\centering\n \\includegraphics[width=\\textwidth]{cf_on_boston_data.png}\n \\caption{cforest}\n \\label{fig:cf_boston}\n \\end{subfigure}\n \\hfill\n \\begin{subfigure}[b]{0.49\\textwidth}\n \\centering\n \\includegraphics[width=\\textwidth]{ranger_on_boston_data.png}\n \\caption{ranger}\n \\label{fig:ranger_boston}\n \\end{subfigure}\n \n \\caption{Feature importance for Boston housing data. 100 trees are built in the forest. Red error bars depict one standard deviation when the experiments are repeated 100 times.}\n \\label{fig:boston}\n\\end{figure}\n\n\\textcolor{black}{All four methods agree on two most important features: RM (average number of rooms per dwelling) and LSTAT (\\% lower status of the population). In SI, the random feature still appears to be more important than several other features such as INDUS (proportion of non-retail business acres per town) and RAD (index of accessibility to radial highways), though the spurious effect is much less compared to Figure \\ref{fig:si_adult}. As expected, the importance of random feature is close to zero in UFI. In this example, the SI did not seem to provide misleading result as most of the features are continuous, and the only binary feature CHAS (Charles River dummy variable) turns out to be not important. }\n\n\\subsection{Summary}\n\n\\textcolor{black}{Our empirical studies confirm that the default split-improvement method is biased towards increasing the importance of features with more potential splits. The bias is more severe in deeper trees. Compared to three other approaches, our proposed method performs the best in a difficult task to identify the only important feature from 10 noisy features. For real world data sets, though we do not have a ground truth for feature importance scores, our method gives similar and meaningful outputs as two state-of-the-art methods cforest and ranger.}\n\n\\section{Discussions}\\label{dis}\n\nTree-based methods are widely employed in many applications. One of the many advantages is that these models come naturally with feature importance measures, which practitioners rely on heavily for subsequent analysis such as feature ranking or screening. It is important that these measurements are trustworthy.\n\nWe show empirically that split-improvement, as a popular measurement of feature importance in tree-based models, is biased towards continuous features, or categorical features with more categories. This phenomenon is akin to overfitting in training any machine learning model. We propose a simple fix to this problem and demonstrate its effectiveness both theoretically and empirically. Though our examples are based on Random Forests, the adjustment can be easily extended to any other tree-based model. \n\nThe original version of split-improvement is the default and only feature importance measure for Random Forests in \\textbf{scikit-learn}, and is also returned as one of the measurements for \\textbf{randomForest} library in R. Statistical analyses utilizing these packages will suffer from the bias discussed in this paper. Our method can be easily integrated into existing libraries, and require almost no additional computational burden. \\textcolor{black}{As already observed, while we have used \\textit{out-of-bag} samples as a natural source of test data, alternatives such as sample partitions -- thought of as a subsample of \\textit{out-of-bag} data for our purposes -- can be used in the context of honest trees, or a held-out test set will also suffice. The use of subsamples fits within the methods used to demonstrate the asymptotic normality of Random Forests developed in \\citet{mentch2016quantifying}. This potentially allows for formal statistical tests to be developed based on the unbiased split-improvement measures proposed here.} Similar approaches have been taken in \\citet{zhou2018approximation} for designing stopping rules in approximation trees. \n\n\n\nHowever, feature importance itself is very difficult to define exactly, with the possible exception of linear models, where the magnitude of coefficients serves as a simple measure of importance. There are also considerable discussion on the subtly introduced when correlated predictors exist, see for example \\cite{strobl2008conditional, gregorutti2017correlation}. We think \\textcolor{black}{that clarifying the relationship between split-improvement and the topology of the resulting function represents an important} future research direction. \n\n\\subsection*{Acknowledgements}\nThis work was supported in part by NSF grants DMS-1712554, DEB-1353039 and TRIPODS 1740882. \n\n\\bibliographystyle{ACM-Reference-Format}\n","meta":{"redpajama_set_name":"RedPajamaArXiv"}} +{"text":"\\section{Introduction}\nIn environmental epidemiology, we are often interested in making inference about the relationships between spatially-referenced exposures and spatially-referenced health outcomes. Spatial structure in exposures can arise from underlying environmental processes and human activities, while health outcomes can have spatial structure derived from both the exposure of interest and other spatially-varying factors. For example, coronary heart disease is associated with socioeconomic status \\citep{DiezRoux2001}, which can have geographic structure and is associated with air pollution \\citep{Brochu2011, Jerrett2004, Mensah2005}. When not measured (or measured incompletely), these factors can cause \\emph{unmeasured spatial confounding}, which is the inability to distinguish the effect of a spatially-varying exposure from residual spatial variation in a health outcome, resulting in biased point estimates and standard errors \\citep{Paciorek2010}.\n\nEarly discussion of spatial confounding in the literature includes \\citet{Clayton1993}, who described the `confounding effect due to location' in regression models for ecological studies, which they attributed to unmeasured confounding factors. \\citet{Clayton1993} advocated for the inclusion of a spatially-correlated error term in hierarchical models for spatial data \\citep{Clayton1987, Besag1991} and claimed this would account for confounding bias but might result in conservative inference.\nSince then, the approach of adding spatially structured error terms has frequently been used in spatial models for areal data \\citep{Reich2006, Wakefield2007, Hodges2010, Hughes2013, Hanks2015, Page2017}. In a causal inference framework, confounding due to geography has been recently addressed using spatial propensity scores \\citep{Papadogeorgou2019, Davis2019}, however in those settings the exposure of interest was not explicitly spatial.\n\nFor point-referenced data, \\citet{Paciorek2010} provided a rigorous discussion of spatial confounding and \n the importance of the spatial scales of variability in the exposure and outcome.\n\\cite{Paciorek2010} demonstrated that reductions in bias could be obtained when the scale of unconfounded variability in the exposure, which he quantified by the spatial range parameter in a Matern covariance function, is smaller than the scale of confounded variability. \n\nOne approach in the literature for adjusting for spatial confounding at broad scales with point-referenced data is to estimate the coefficient of interest from a semi-parametric model that includes spatial splines \\citep{Paciorek2010, Chan2015}. This approach is a natural extension of time series studies, where flexible, one-dimensional basis functions can account for confounding due to unmeasured temporal variation \\citep{Burnett1991,Schwartz1994, Dominici2003a, Dominici2004, SzpiroSheppard2014}. Thin-plate regression splines (TPRS) \\citep{Wood2003} are a commonly used basis and the amount of adjustment can be tuned using the degrees of freedom ($df$) parameter \\citep{Paciorek2010}. However, particular values of $df$ do not have clear spatial scale or interpretation. Generalizing inference about associations between exposures and health outcomes is difficult when the extent of spatial confounding adjustment is not easily quantified.\n\n\\subsection{Air Pollution in the NIEHS Sister Study}\n\\label{sec:spatconf_motivatingexmp}\nThis work is motivated by an analysis of systolic blood pressure and fine particulate matter (PM$_{2.5}$) in the NIEHS Sister Study. \\citet{Chan2015} found that a 10 $\\upmu$g\/m$^3$ difference in long-term exposure to ambient fine particulate matter (PM$_{2.5}$) was associated with 1.4 mmHg (95\\% Confidence Interval [CI]: 0.6, 2.3) higher systolic blood pressure (SBP) at baseline. \nTo account for spatial confounding from unmeasured regional differences in socioeconomic and health patterns, \\citet{Chan2015} included TPRS with 10 $df$ in their model. \n\n\nHere we consider a re-analysis of this cohort using PM$_{2.5}$ exposures at grid locations, rather than at subject residences, to accommodate the methods we describe below. \nWe use predictions of the 2006 annual average ambient concentration from the universal kriging model of \\citet{Sampson2013}, made on a 25km by 25km grid across the contiguous United States.\nFor each of the 47,206 Sister Study subjects, we assign exposure based upon the closest grid cell center.\n Using the same measured confounders as \\citet{Chan2015}, but no spatial adjustment, we find that a difference of 10 $\\upmu$g\/m$^3$ in PM$_{2.5}$ is associated with 0.26 mmHg higher SBP (95\\% CI: -0.14, 0.66). However, when TPRS with 10 $df$ are added to the model then the estimated difference in SBP is 0.77 mmHg (95\\% CI: 0.14, 1.41). \n Figure~\\ref{fig:sister_tprsdf} shows the estimates for other amounts of adjustment. \nThe change in the estimates as a function of $df$\n suggests that some form of spatial confounding is present, but it is not clear from Figure~\\ref{fig:sister_tprsdf} on what scales the confounding is occurring, how much adjustment should be done, and which estimate should be reported.\n\n\\begin{figure}[t]\n\\begin{center}\n\\includegraphics[width=0.9\\textwidth]{Sister_Est_TPRS_Semipar.pdf}\n\\caption{Estimated difference in SBP (in mmHg) associated with a difference of 10 $\\upmu$g\/m$^3$ in annual average ambient PM$_{2.5}$, when adjusting for TPRS with varying values of $df$ in the outcome model. The square marker (\\mysquare{black}) at $df=0$ is the estimate without spatial adjustment and has error bars indicating a 95\\% confidence interval. The thick black curve (\\drawline{ultra thick}) represents estimates for different choices of $df$ and the thin black curves (\\drawline{}) represent point-wise 95\\% confidence intervals.}\n\\label{fig:sister_tprsdf}\n\\end{center}\n\\end{figure}\n\n\\subsection{Manuscript Outline}\nIn the remainder of this paper, we address the question of how to interpret and select the spatial scale of adjustment.\nIn Section~\\ref{sec:adjustment} we introduce the statistical framework and procedures for spatial confounding adjustment.\nIn Section~\\ref{sec:spatial_scales} we describe three choices of spatial basis (TPRS, a Fourier basis, and a wavelet basis) and present a method for assigning variation in these bases to a spatial distance. In Section~\\ref{sec:choosing_m} we describe approaches for selecting the amount of adjustment and compare the approaches in simulations in Section~\\ref{sec:simulations}. \nIn Section~\\ref{sec:sisterfullapp} we apply the adjustment approaches to the motivating Sister Study cohort. Section~\\ref{sec:discussion} provides a concluding discussion.\n\n\\section{Methods for Spatial Confounding Adjustment}\n\\label{sec:adjustment}\n\n\\subsection{Statistical Framework}\n\\label{sec:framework}\nWe consider a cohort study of $n$ subjects with measured health outcomes $y_i$, exposures $x_i$, and observed confounder covariates ${\\bm z}_i$. \nWe partition the spatial domain into a rectangular grid $\\mathcal{S}$ with distinct locations $\\{1, \\dots, S\\}$. \nEach subject is assigned to a location ${\\bm s}_i \\in \\{1, \\dots, S\\}$. We assume \nthat the subjects are distributed evenly across the locations; we discuss non-uniform sampling of subject locations in Section~\\ref{sec:pop_spatial_dist}.\n\nExtending the framework of \\cite{SzpiroSheppard2014} to a spatial setting, \nwe assume that the exposure for each individual is measured without error and takes the form\n\\begin{equation}\nx_i = x({\\bm s}_i) = g({\\bm s}_i) + \\xi({\\bm s}_i),\n\\end{equation}\nwhere $g({\\bm s}_i)$ is a smooth spatial surface and $\\xi_i$ is (fixed) residual spatial variation. We decompose the observed confounders in a similar manner as ${\\bm z}_i = \\bm w({\\bm s}_i) + \\bm\\zeta_i$, except that $\\bm\\zeta_i$ is not a function of space and is modelled as $N(0, \\sigma_\\zeta^2{\\bm I})$. The stochasticity of $\\bm\\zeta$ arises from the sampling of subjects.\n\nWe assume that the observed health outcomes $y_i$ arise from the model\n\\begin{equation}\n\\label{eq:dgm}\ny_i = \\beta_0 + \\beta x_i + {\\bm z}_i^\\ensuremath{\\mathsf{T}} \\bm\\gamma + f({\\bm s}_i) + \\epsilon_i,\n\\end{equation}\nwhere $f({\\bm s}_i)$ is an unknown, fixed spatial surface and $\\epsilon_i \\stackrel{iid}{\\sim} N(0, \\sigma_\\epsilon^2)$. The target of inference is the parameter $\\beta \\in \\mathbb{R}$, which represents the association between exposure $x_i$ and the outcome $y_i$ \\emph{conditional} on $\\bm z$ and $f$. The $f({\\bm s}_i)$ term represents unmeasured spatial variability in $y_i$, which we assume to be fixed and unknown. \n\n\nIn contrast to the approach taken by ``restricted spatial regression'', which targets the unconditional effect of exposure on outcome \\citep{Hodges2010,Hughes2013}, our parameter of interest here is the exposure-outcome association conditional on the unmeasured confounder $f$. In observational air pollution epidemiology studies, the conditional association is targeted in order to provide information that is generalizable beyond the specific time and location of the study cohort \\citep[e.g.][]{Peng2006}.\n\nTo model the spatially-varying terms in \\eqref{eq:dgm}, we employ a set of hierarchical spatial basis functions $\\{h_1(\\cdot), h_2(\\cdot), \\dots. \\}$ that are in order of non-increasing resolution.\n For compactness of notation, let ${H}_m = \\begin{bmatrix} \\bm h_1 & \\dots & \\bm h_m\\end{bmatrix}$ denote the $n \\times m$ matrix of the first $m$ basis functions evaluated at the $n$ subject locations.\nFollowing \\citet{Dominici2004} and \\citet{SzpiroSheppard2014}, we decompose $g(\\cdot)$, $\\bm w(\\cdot)$, and $f(\\cdot)$ as:\n \\begin{align}\n\\notag g({\\bm s}_i) &= \\sum_{k=1}^{m_1} \\alpha_kh_k({\\bm s}_i) = \\bm e_i^\\ensuremath{\\mathsf{T}}{H}_{m_1}\\bm\\alpha\\\\\n \\label{eq:gwf_basis} w_j({\\bm s}_i) & = \\sum_{k=1}^{m_2} \\delta_{jk}h_k({\\bm s}_i) = \\bm e_i^\\ensuremath{\\mathsf{T}}{H}_{m_2}\\bm\\delta_j\\\\\n\\notag f({\\bm s}_i) &= \\sum_{k=1}^{m_3} \\theta_kh_k({\\bm s}_i) = \\bm e_i^\\ensuremath{\\mathsf{T}}{H}_{m_3}\\bm\\theta,\n \\end{align}\n where $\\bm e_i$ is the unit vector with 1 as the $i$th element.\nWe assume\n$m_1 > m_3$. This assumption means that there is finer scale variability in the exposure surface than in the unobserved confounding surfaces, which \\citet{Paciorek2010} identified as a necessary condition to achieve reductions in bias via adjustment.\nIn Section~\\ref{sec:spatial_scales}, we consider three different choices of $h_j$: a regression spline basis, a Fourier basis, and a wavelet basis.\n\nThe ordinary least squares estimator from the model ${\\rm E}[y_i] = {\\beta}_0 + {\\beta}_1x_i + {\\gamma} {\\bm z}_i$\n will be biased due to the correlation of the observed $g({\\bm s}_i)$ and $\\bm w({\\bm s}_i)$ with the unobserved $f({\\bm s}_i)$. In the literature, this correlation is sometimes referred to as\n \\textit{concurvity} \\citep{Hastie1990, Ramsay2003,Ramsay2003a}.\n We describe two strategies for adjusting for this correlation in order to eliminate the confounding bias.\n \n \\subsection{Adjustment in Outcome Model}\n\\label{sec:adjust_health}\nA straightforward way to adjust for the unmeasured spatial structure $f({\\bm s}_i)$ is to fit the semiparametric regression model\n\\begin{equation}\n\\label{eq:adj_in_health_model}\n{\\rm E}[y_i] = \\breve{\\beta}_0 + \\breve{\\beta}_1x_i + {\\bm z}_i^\\ensuremath{\\mathsf{T}}\\breve{\\gamma} + {H}_m\\breve{\\bm \\theta},\n\\end{equation}\nfor a chosen value of $m$.\nThis is a direct extension of confounding-adjustment approaches used in time series methods \\citep{Dominici2004,Peng2006} and was the approach taken by \\cite{Chan2015} and in Figure~\\ref{fig:sister_tprsdf}. For basis functions such as TPRS that are easily computed, fitting model \\eqref{eq:adj_in_health_model} in standard statistical software is straightforward. \n\nIf $m \\ge m_3$, then the ordinary least squares estimator $\\widehat{\\breve{\\beta}}_1$ from model \\eqref{eq:adj_in_health_model} will be unbiased, because the inclusion of ${H}_m$ fully adjusts for variation in its column space, which includes $f$. \nIf $m < m_3$, then $\\widehat{\\breve{\\beta}}_1$ will remain biased because of correlation between $x({\\bm s})$ and the $m_3 - m$ terms of $f({\\bm s})$ (from the decomposition in \\eqref{eq:gwf_basis}) that are not within the column space of ${H}_m$.\n \n \n\\subsection{Pre-adjusting Exposure}\n\\label{sec:preadjust}\n\nA second approach to confounding adjustment is to first `pre-adjust' the exposure, to remove variation in the exposure that is correlated with the confounding surface. In comparison to the semi-parametric adjustment approach described above, the pre-adjustment approach does not necessarily require the explicit construction of ${H}_m$, which allows for additional choices of spatial basis.\n\\cite{SzpiroSheppard2014} outlined how preadjustment can be done for cohort studies with time series exposures, and here we present an extension of that approach to spatial settings. This approach can be considered a form of spatial filtering \\citep[e.g.][]{Haining1991, Tiefelsdorf2007}\n\nWe decompose the vector of observed exposures ${\\bm x} = \\begin{bmatrix} x({\\bm s}_1) & \\cdots &x({\\bm s}_n)\\end{bmatrix}^\\ensuremath{\\mathsf{T}} $ into two components, ${\\bm x}_1$ and ${\\bm x}_2$, such that ${\\bm x}_2$ is orthogonal to ${H}_m$ for some $m$ (we discuss methods for selecting $m$ in Section~\\ref{sec:choosing_m}). \nIn settings when ${H}_m$ can be explicitly computed, this decomposition can be accomplished by taking ${\\bm x}_1$ to be the projection of ${\\bm x}$ onto ${H}_m$ ($\\bm x_1 = {H}_m({H}_m^\\ensuremath{\\mathsf{T}}{H}_m)^{-1}{H}_m^\\ensuremath{\\mathsf{T}}{\\bm x}$) and ${\\bm x}_2$ to be its complement ($\\bm x_2 = {\\bm x} - {\\bm x}_1)$.\nWhen it is not practical to explicitly construct ${H}_m$, as in the Fourier and wavelet approaches we discuss in Section~\\ref{sec:spatial_scales}, we use a filtering procedure in the frequency domain to achieve this decomposition. \n\n\n\nOnce ${\\bm x}$ has been partitioned into ${\\bm x}_1$ and ${\\bm x}_2$, we fit the model\n\\begin{equation}\n\\label{eq:preadj_model}\ny_i = \\tilde{\\beta}_0 + \\tilde{\\beta}_1x_{1i} + \\tilde{\\beta}_2x_{2i}+ \\tilde{\\gamma} {\\bm z}_i + \\tilde{\\epsilon}_i\n\\end{equation}\nwhere $\\tilde\\epsilon_i = \\epsilon_i + f(s_i)$ and $\\tilde\\beta_1, \\tilde\\beta_2 \\in \\mathbb{R}$. Because $\\sum x_1x_2 = 0$, the bias of $\\hat{\\tilde{\\beta}}_2$ is proportional to\n\\begin{equation}\n\\label{eq:beta2bias}\n\\sum x_2f\\left(\\sum x_1z^2 - \\sum x_1^2\\sum z^2\\right) + \\sum x_2z\\left(\\sum x_1^2\\sum zf - \\sum x_1z\\sum x_1f\\right),\n\\end{equation}\nwhere the summations are over $i$. If $m \\ge m_3$, then ${\\bm x}_2$ is by construction orthogonal to $\\bm f$ and so $\\sum x_2 f = 0$. If $m \\ge m_2$, then ${\\bm x}_2$ is orthogonal to $\\bm z$ and so $\\sum x_2z=0$. Under these two conditions, the bias of $\\hat{\\tilde{\\beta}}_2$ given in \\eqref{eq:beta2bias} is zero.\nIf either $m < m_2$ or $m < m_3$, then $\\hat{\\tilde{\\beta}}_2$ will be biased. Forcing $f(s_i)$ into the error term creates correlation between the $\\tilde\\epsilon_i$, but this can be accounted for using `sandwich' standard error estimates \\citep{White1980}. \n\n\n\\subsection{Non-Uniform Spatial Distributions of People}\n\\label{sec:pop_spatial_dist}\n\nSo far we have assumed that all locations $s \\in \\mathcal{S}$ have an observed subject and that the number of subjects was that same at each location. This assumption was necessary to achieve the orthogonality of the pre-adjusted exposure (${\\bm x}_2$) and the basis functions matrix $H_m$ (and thus ${\\bm x}_1$, ${\\bm z}$, and $\\bm f$). \nAdjustment in the outcome model or exposure pre-adjustment in which $H_m$ can be explicitly constructed do not require that the locations be spatially uniform. However, pre-adjustment using the filtering approaches does require that all locations be observed the same number of times.\n\nTo implement pre-adjustment in the presence of duplicate locations, first the duplicated locations are removed (and unobserved locations added) to create the vector $\\bm x'$. The filtering pre-adjustment is done on $\\bm x'$ to generate $\\bm x_1'$ and $\\bm x_2'$. By construction $\\bm x_2'^\\ensuremath{\\mathsf{T}} \\bm h_j' = 0 $, where $\\bm h_j'$ is the $j$th basis function evaluated at all locations in $\\mathcal{S}$ once.\nThe duplicated locations are then added back in by repeating the relevant entries in ${\\bm x}_2'$ to form $\\bm x_2$ (and similarly for $\\bm x_1$). However, the duplicated locations means that in general $\\bm x_2^\\ensuremath{\\mathsf{T}} \\bm h_j \\ne 0$. To recover the orthogonality necessary to eliminate the bias term \\eqref{eq:beta2bias}, the outcome model can use re-weighting.\n\nSuppose that subject locations are distributed according to a spatial distribution $\\Phi({\\bm s})$, which has positive support across all of $\\mathcal{S}$. \nTo recover orthogonality of ${\\bm x}_2$ and $\\bm h_j$ ($j=1, \\dots, m$), we reweight the study population by its spatial distribution. Specifically, we fit a weighted least squares (WLS) version of \\eqref{eq:preadj_model} where the observation weights are proportional to the inverse of $\\frac{d}{d {\\bm s}} \\Phi({\\bm s}) = \\phi({\\bm s})$. \nThis assures orthogonality of ${\\bm x}_2$ and $\\bm h_j$ as $n\\to \\infty$, since\n\\begin{equation*}\n \\frac{S}{n} \\sum_{i=1}^n \\frac{1}{\\phi({\\bm s}_i)}x_2({\\bm s}_i)h_j({\\bm s}_i) \\rightarrow \\sum_{{\\bm s} \\in \\mathcal{S}} \\phi({\\bm s}) \\left(\\frac{1}{\\phi({\\bm s})} x_2'({\\bm s})h_j'({\\bm s})\\right) = \\sum_{{\\bm s} \\in \\mathcal{S}} x_2'({\\bm s}) h_j'({\\bm s}) = \\bm x_2'^\\ensuremath{\\mathsf{T}}\\bm h_j' = 0.\n\\label{eq:reweighting}\n \\end{equation*}\n\n\nThis WLS approach essentially downweights the contribution of people living in highly-populated areas and gives added weight to those who live in more sparsely populated areas. The parameter being estimated remains the same. For applications in air pollution epidemiology, the correlation between high exposures and population density means that this has the effect of weighting subjects with different exposure levels differently. This is similar in spirit to propensity score weighting, in which groups are re-weighted by their probability of exposure in order to remove bias due to confounding \\citep{Stuart2010}.\n\n\n\n\n\\section{Interpreting Spatial Scales of Adjustment} \n\\label{sec:spatial_scales}\n\n\nHere we present specific details for three different choices of spatial basis functions: thin-plate regression splines, Fourier basis, and wavelet basis. We describe how to implement adjustment for each basis and how to interpret the amount of adjustment in terms of physical distance. \nWe will describe methods for selecting the amount of adjustment in Section~\\ref{sec:choosing_m}.\n\n\\subsection{Effective Bandwidth $\\hat k$}\nFor each basis, we describe how to relate the amount of confounding adjustment (i.e. $m$) to a physical spatial scale. We call this scale, denoted by $\\hat k$, the \\emph{effective bandwidth} of the adjustment. Heuristically, the effective bandwidth is the width of the smoothing kernel induced by the choice of basis function. This allows for adjustment using $m$ basis functions to be interpreted as adjusting for confounding by smoothing at $\\hat k$ distance. In the context of particular application, $\\hat k$ may represent a national, regional, or metropolitan scales of variation. \n\n\\subsection{Thin-plate regression splines}\n\\label{sec:tprs}\nThin-plate regression splines (TPRS) are low-rank approximations to thin-plate smoothing splines \\citep{Wood2003}. The full-rank thin-plate splines are derived from a set of radial basis functions, and TPRS achieve computational benefits by using a truncated eigenbasis to approximate the radial basis. TPRS are based upon the spatial locations of observed points, eliminating the need for knot-selection.\n\nFor problems of inference, unpenalized TPRS are indexed by the degrees of freedom ($df$), which controls the dimension of the basis and can be fixed to yield a set of hierarchical basis functions $h_1(s), h_2(s), \\dots, h_{df}(s)$ where higher values of $df$ correspond to adjustment at a finer scale. The \\texttt{mgcv} package in R \\citep{Wood2003} makes explicit construction of the TPRS basis straightforward, so both the semi-parametric adjustment and pre-adjustment approaches can be used with this basis.\n\nWe propose the following procedure for computing the effective bandwidth for a chosen number of TPRS basis functions. The smoothing induced by TPRS can be represented in the smoothing matrix $ S = {H}_{df}({H}_{df}^\\ensuremath{\\mathsf{T}}{H}_{df})^{-1}{H}_{df}^\\ensuremath{\\mathsf{T}}$. Unlike the frequency-based methods discussed below, the amount of smoothing, which is given by the columns of $ S$, varies at each location due to the location of neighboring points, which is also impacted by the geometry of the domain. We compute $\\hat k$ by finding the distance at which the ``average'' value of the smoothing matrix values first cross zero. For each observation $i$, we first compute the vector of distances $\\bm d_i$ to all other points. We then fit a loess smooth to ${\\bm s}_i$, the $i$th column of $S$, as a function of $\\bm d_i$. The procedure is repeated across all locations, and the pointwise median of the loess smooths computed. The distance at which this median smooth first crosses zero is $\\hat k$. A detailed description of this procedure is provided in Supplementary Material Section A. The publicly-available R package \\texttt{spconf} implements this procedure for any provided spline or smoothing matrix values.\n\n\n\\subsection{Fourier decomposition and Frequency-based filtering}\n\\label{sec:fourier}\nA second choice for basis $\\{h_j\\}$ is the set of sinusoidal Fourier basis functions. Without loss of generality, let $u=0, \\dots, M-1$ and $v=0, \\dots, N-1$ denote coordinates of $\\mathcal{S}$. \nThe value of the function $g(u, v)$ can be written as a linear combination of sine and cosine functions, whose coefficients are determined by the Discrete Fourier Transform (DFT) of $g(u, v)$ \\citep{Gonzalez2008}. \nSpectral methods have been widely used in spatial statistics, often as a means to approximate covariance functions \\citep[e.g.][]{Guinness2017, Royle2005,Fuentes2007}.\n \nAllowing for ties as necessary, we can use the spectral coordinates $(p, q)$ to order the spatial basis functions by \\emph{effective frequency}: $\\omega_{(p, q)} = \\sqrt{\\left(\\frac{p}{M}\\right)^2 + \\left(\\frac{q}{N}\\right)^2}$ \\citep{Burger2009}.\nBecause each basis function is oriented to a particular angle, there may be multiple basis functions with the same frequency $\\omega$ but different orientation. \n\nTo avoid explicit construction of all $MN$ basis functions, we apply the pre-adjustment approach described in Section~\\ref{sec:preadjust} for a selected frequency $\\omega$. We decompose ${\\bm x}$ into its projection onto $H_{\\omega}$ and corresponding complement by applying a high-pass filter in the frequency domain. The values of the filter\n are\n\\begin{equation}\nF_{\\omega}(p, q) = \\begin{cases} 1 & \\text{ if } \\omega_{(p, q)}> \\omega \\\\ 0 & \\text{ if } \\omega_{(p, q)} \\le \\omega \\end{cases}.\n\\end{equation}\nTo implement pre-adjustment, we first compute the DFT $\\mathcal{X}(p,q)$ of $\\bm x'$, which is the gridded exposure surface ${\\bm x}({\\bm s})$ with duplicated locations removed. We then define $\\mathcal{X}_{\\omega}$ to be the element-wise product of $\\mathcal{X}$ and $F_{\\omega}$. The inverse DFT of $\\mathcal{X}_{\\omega}$ provides ${\\bm x}_2'$. Duplicated locations are assigned the same value from ${\\bm x}_2'$, yielding ${\\bm x}_2$.\n\nOne interpretation of removing variation described by frequencies $\\omega$ and lower is that it removes periodic variation with periods $1\/\\omega$ and higher. %\nThe analogue of $\\hat k$ for the Fourier basis is the effective bandwidth of the kernel smoother in the spatial domain that corresponds to the frequency filter $F_{\\omega}$. \nThis smoother is given by the inverse Fourier transform of $F_{\\omega}$, which is analytically a 'sinc' function. However, edge effects from finite grids mean the inverse DFT of $F_{\\omega}$ does not exactly follow the expected analytic form. Therefore, we compute the effective bandwidth $\\hat k$ of $F_{\\omega}$ empirically in a manner similar to the approach for TPRS: Let $F'_\\omega(u, v)$ denote the inverse DFT of $F_{\\omega}$. We take $\\hat k$ to be the minimum value of $\\sqrt{u^2 + v^2}$, scaled by grid size, for which $F'_\\omega(u, v)=0$. \n\n\\subsection{Wavelet Basis and Thresholding}\n\\label{sec:wavelets}\nA third choice of spatial basis $\\{h_j\\}$ is a set of wavelets. Like Fourier basis functions, wavelets are localized in frequency, but they are also localized in space \\citep{Nason2008}. This means that wavelets can compactly describe variation at different frequencies in different areas of a spatial domain. There are many different sets of wavelets, and here we use the smooth Daubechies wavelets \\citep{Daubechies1988}.\n Wavelet basis functions are indexed by \\emph{level}, based upon successive halving of the spatial domain. Within each level $L$ (and thus, within each frequency $2^{L}$), there are multiple wavelet basis functions with different orientations and spatial positions. The effective bandwidth that corresponds to each level is $\\hat k = 2^{-L}$.\n \n Multi-resolution approaches such as wavelets have recently been used to quantify spatial variation of air pollution exposures \\citep{Antonelli2017}. However, \\cite{Antonelli2017} only described exposures with variation at ``low\" and ``high'' frequencies, and did not attempt to use wavelets for explicit confounding adjustment nor did they provide a specific distance to these labels. De-correlation of the exposure and outcome via wavelets was presented in an ecological context by \\citet{Carl2008}. However, they applied the thresholding to the exposure and the outcome jointly and performed regression on the wavelet coefficients, which is not practical for the large grids and when we have other confounders in the model.\n \n For finite data on a discrete grid, the Discrete Wavelet Transform (DWT) maps any surface to a set of wavelet coefficients. \n Unlike the DFT, the DWT requires that the grid have length equal to a power of two. Data on a non-square grid can be embedded within a larger grid with dyadic dimension to apply the DWT. We use an implementation of the DWT available in the R package \\texttt{wavethresh} \\citep{Nason2008}.\n\nTo pre-adjust exposure using wavelets, we apply a filtering approach similar to that used for a Fourier basis. We first compute the DWT $\\mathcal{W}$ of ${\\bm x}'$. We then threshold all coefficients at levels $\\ell = 0, \\dots, L$ to get a modified wavelet transform $\\mathcal{W}_L$.\n We then apply the inverse wavelet transform to $\\mathcal{W}_L$ to get the pre-adjusted exposure ${\\bm x}_2'$.\nAlthough we use a global threshold of all wavelet coefficients up to a particular level, the extent of thresholding could be varied across the exposure domain if desired.\n\n\n\\section{Selecting the amount of adjustment}\n\\label{sec:choosing_m}\n\nA critical question for data analysis is how much adjustment to do or, equivalently, what value of $\\hat k$ or $m$ should be chosen. In both approaches presented in Section~\\ref{sec:adjustment}, the estimates of $\\beta$ are unbiased only if $m \\ge m_3$ (with an additional condition of $m \\ge m_2$ for the pre-adjustment approach) and if the basis for adjustment is correctly chosen. \nBut in most practical settings, the true values of $m_1$, $m_2$, and $m_3$ and the correct choice of basis $\\{h(\\cdot)\\}$ are unknown. \nIn this section, we describe different approaches to choosing the amount of adjustment ($m$ or $\\hat k$).\n\nIf there is specific knowledge of assumed unmeasured confounders or other external, content-area knowledge, then $m$ could be selected \\emph{a priori}. Exact knowledge of $m_3$ is unlikely to be known, but a choice of $m$ or $\\hat k$ might be based upon a combination of known scale of variation in the exposure (e.g. if it is predicted from a spatial model with known parameter values) and the approximate scale of the possible confounders (e.g. regional variation in socioeconomic status). This choice might also be influenced by estimates of $m_1$ and $m_2$, which could be estimated from the data. While an \\emph{a priori} choice of $m$ may not necessarily lead to an unbiased estimate, it does provide a way to pre-specify the extent and interpretation of adjustment, without risking overfitting the model to the outcome data $\\bm y$.\n\nIn the absence of external knowledge, the amount of adjustment $m$ can be selected in a data-driven manner. Estimating $m_3$ directly is challenging, since it requires knowing the amount of variation in $y$ that is due to $\\bm x$ and $\\bm z$--exactly what we are trying to estimate. However, measures of model fit (for either \\eqref{eq:adj_in_health_model} or \\eqref{eq:preadj_model}) can be used to calculate the scale of spatial variation in $\\bm y$. Specifically, after fitting the outcome model with a range of choices for $m$, the model that minimizes the Akaike Information Criterion (AIC) \\citep{Akaike1973} or Bayesian Information Criterion (BIC) \\citep{Schwarz1978} can provide a selection of the model that best fits the data. However, selecting the model that best fits $\\bm y$ is not guaranteed to reduce error in the estimate of $\\beta$.\n\nA variation of this procedure for estimating the scale of relevant spatial variation in $\\bm y$ is to fit outcome models that include the adjustment basis but do not include the exposure. The amount of adjustment that leads to the smallest AIC or BIC can be chosen as $m$ for the primary model. Observed confounders can either be included in the model, or first projected out from $\\bm y$. Here we consider the former approach and refer to is as the ``AIC-NE'' approach for choosing $m$, respectively, where ``NE'' stands for ``No Exposure''. The BIC alternative is named in the analogous manner.\nThe rationale of this approach is that if the unmeasured confounders have a strong impact on the values of $\\bm y$ and the association of interest ($\\beta$) is relatively weak (a relatively common occurrence in environmental epidemiology), this approach can yield a choice of $m$ without overfitting the relationship between $\\bm y$ and $\\bm x$. Because it involves fitting a model with the outcome $\\bm y$, this approach is mostly limited to adjustment bases such as TPRS that can be explicitly computed. If all locations on the grid had a single outcome value, then this approach could be used for Fourier and wavelet filtering, but that setting is unlikely to occur in practice. \n\nAn approach that targets estimation error directly is to choose $m$ to minimize the estimated MSE of $\\hat{\\beta}(m)$. Let $m'$ be some large value for which it is assumed the estimator $\\hat{\\beta}$ is unbiased. Then estimate the bias of $\\hat{\\beta}(m)$ as $\\hat{\\beta}(m) - \\hat{\\beta}(m')$ and estimate ${\\rm Var}(\\hat{\\beta}(m))$ via the `sandwich' estimator \\citep{White1980} for the fitted model. Together these provide a method for selecting $m$:\n\\begin{equation}\n\\label{eq:pick_m_mse}\n\\hat{m}_{MSE} = \\argmin_{\\tilde{m}} \\widehat{\\text{MSE}}(\\hat{\\beta}(\\tilde{m})) = \n\\argmin_{\\tilde{m}} \\left\\{\\left[\\hat{\\beta}(\\tilde{m}) - \\hat{\\beta}(m')\\right]^2 + \\widehat{\\rm Var}(\\hat{\\beta}(\\tilde{m}))\\right\\}\n\\end{equation}\nThis approach, however, has the clear drawback that $\\hat{\\beta}(m')$ may not be an unbiased estimator (see Section~\\ref{sec:overadj}).\n\nApproaches that are more \\emph{ad hoc} are also possible. One such option is to choose $m$ by selecting a point right after a ``knee'' in the plot of $\\hat{\\beta}$ against $m$ (for example, Figure~\\ref{fig:sister_tprsdf}). While visually intuitive, this approach requires a cumbersome formal definition. We define $\\hat{m}_{knee}$ to be:\n\\begin{equation}\n\\label{eq:pick_m_knee}\n\\hat{m}_{knee} = \\argmin_{\\tilde m} \\left\\{|D^1(\\hat{\\beta}(\\tilde m))| \\Big| |D^1(\\hat{\\beta}(\\tilde m))| < |D^1(\\hat{\\beta}(\\tilde m + 1)), \\tilde{m} \\in \\mathcal{M}\\right\\},\n\\end{equation} \nwhere $D^k(\\cdot)$ is a $k$-order difference operator and $\\mathcal{M} = \\{m | m > \\argmax_\\omega D^2(\\hat{\\beta}(\\omega))\\}$.\nThe set $\\mathcal{M}$ limits to values of $m$ that are beyond the largest second-order difference, an approximation of curvature, in the $\\hat{\\beta}(m)$ sequence. Within this set, the value of $m$ that gives the first minimum in the first-order differences is selected. Importantly, this approach does not account for differences in the resolution of $m$ and can be greatly impacted by the noise in the finite differences.\n\n\n \n\n\\subsection{Impact of over-adjustment}\n\\label{sec:overadj}\nIf the choice of basis functions exactly matches the underlying confounding surface $f(s)$, then sufficiently rich adjustment will remove bias. However, if the choice of basis functions does not match the underlying confounding surface $f(s)$, then residual bias may remain regardless of the choice of $k$. This could lead to increases in bias, since the adjustment basis ($H_m$) then becomes a near-instrumental variable (IV) that is highly correlated with the exposure $x(s)$ but only weakly related to the outcome $y$. Adjustment for a near-IV in contexts with residual confounding can amplify bias from the residual confounders at a rate greater than any bias reduction due to confounding by the near-IV \\citep{Pearl2011}. This suggests that the MSE approach presented above may perform quite poorly if the choice of basis functions is incorrect.\n\n\n\n\\section{Simulations}\n\\label{sec:simulations}\n\\subsection{Primary Setup}\nWe conducted a set of simulations to compare the different adjustment approaches, demonstrating both different choices of spatial basis and the different methods for selecting the scale of adjustment.\nThe data for the simulations are created at points $(u,v)$ lying on a $512 \\times 512$ grid over the unit square $[0, 1) \\times [0, 1)$. \nFor each simulation, we constructed a fixed exposure surface $x(u, v)$ and a fixed unmeasured confounder surface $f(u, v)$ on this grid. \n\nWe considered six different unmeasured confounder surfaces, $f_1, \\dots, f_6$, constructed to have ``large'' and ``fine'' scale variation for each of three choices of basis: TPRS, sinusoidal functions, and a spatial Gaussian process (GP). Table~\\ref{tab:simf} summarizes these surfaces, and mathematical detail on their definitions is provided in the Supplemental Material, Section B.1. \n\n\\begin{table}\n\\caption{Description of the different confounder surfaces in the simulations.\n\\label{tab:simf}}\n\\centering\n\\fbox{\n\\begin{tabular}{ll}\nSurface & Description\\\\\n\\hline\n$f_1$ & TPRS with 10 df\\\\ %\n$f_2$ & TPRS with 50 df\\\\\n$f_3$ & Sinusoidal up to frequency $\\sqrt{40}$\\\\ %\n$f_4$ & Sinusoidal up to frequency $\\sqrt{500}$\\\\ %\n$f_5$ & Exponential GP with range 0.5 \\\\ %\n$f_6$ & Exponential GP with range 0.15\\\\ %\n\\hline\n\\end{tabular}\n}\n\\end{table}\n\n\n\nWe constructed the exposure surface as $x(u, v) = \\theta f(u, v) + g(u, v)$, where $g(u, v)$ is a fixed realization of a Gaussian process with exponential covariance structure.\nThis structure for $x$ allows for the amount of correlation between $x$ and $f$ to be controlled, without requiring that they are generated in the same manner (e.g. correlated Gaussian process as used by \\cite{Page2017}).\n For Simulations 1 and 2, we considered two values for the range parameter in the covariance function used to generate $g(u,v)$: 0.05 and 0.50, respectively. The value of 0.05 results in smaller scale spatial variation than the candidate confounders, which is needed to eliminate bias. The value of 0.50 results in spatial variation at a coarser scale than some of the confounder surfaces, which may lead to the persistence of bias but is also a situation that could reasonably arise in practice. The parameter $\\theta$ controls the correlation between $x$ and $f$ and thus the amount of bias due to unmeasured confounding. Because the correlations between $g(u, v)$ and $f(u, v)$ differ for each choice of $f(u, v)$, we calculated $\\theta$ so that the amount of bias was equal for all confounder surfaces, which makes comparison of the results more straightforward. Plots of the surfaces $g, f_1, \\dots, f_6$ and the formula for $\\theta$ are provided in Supplemental Material Section B.2. The values of $x(u, v)$ and $f(u, v)$ were standardized to have mean zero and unit variance.\n\nFor each simulation replication, the outcome was constructed as\n$y(u,v) = \\beta x(u, v) + f(u, v) + \\epsilon(u, v),$\n where $\\epsilon(u, v) \\stackrel{iid}{\\sim} N(0, 16)$. This setup is designed to reflect a feature of the Sister Study application in that the residual variation in the outcome, even after accounting for unmeasured confounding, is large relative to the exposure variation.\n We redrew a sample of $n=2,000$ observation locations (selected from the grid of points) for 1,000 replications of each simulation.\nFor Simulations 1 and 2, we set $\\beta = 1$ and chose $\\theta$ such that the uncorrected bias would be 0.2. For each simulation we also conducted a variation with no effect ($\\beta = 0$) to estimate Type 1 error at the nominal $\\alpha=0.05$ level.\n \nWe compare estimates from four sets of models: \n (i) a model with semi-parametric adjustment via TPRS in the outcome model and models with pre-adjustment of exposure (ii) by TPRS (at observed locations), (iii) via a high-pass Fourier filter, and (iv) via wavelet thresholding. We present estimates for a sequence of adjustment amounts and using the selection methods from Section~\\ref{sec:choosing_m}.\n\n\\subsection{Effective bandwidth } \n The effective bandwidths $\\hat k$ for TPRS and a high-pass filter on the unit square are shown in Figure~\\ref{fig:eff_band_unit_square}. The difference in ranges of $\\hat k$ between the two bases is clear, with the high-pass frequency filter spanning a much larger range of spatial scales than TPRS. The slight ``hiccup'' in Figure~\\ref{fig:eff_bandwidth_tprs_unit_square} at $df= 10$ is an artifact of the shape of that particular basis function (and the constraints of the gridded locations). For the high-pass filter, the spatial smoother corresponding to high-pass filters $F_1$ and $F_2$ never cross zero, which is why points are only shown for $\\omega \\ge 3$. For both adjustment bases, there is an approximately linear relationship between tuning parameter ($df$ or $\\omega$) and $\\hat k$ on the log-log scale.\n\n\n\\begin{figure}\n\\begin{center}\n\\subfloat[\\label{fig:eff_bandwidth_tprs_unit_square}]{\n\\includegraphics[width=0.45\\textwidth]{Grid_TPRS_Median_Effective_Bandwidth.pdf}\n}\n\\subfloat[\\label{fig:eff_bandwidth_hpf_unit_square}]{\n\\includegraphics[width=0.45\\textwidth]{Grid_HPF_Effective_Bandwidth.pdf}\n}\n\\caption{Effective bandwidth (a) by df for TPRS and (b) by frequency for HPF on a $512 \\times 512$ grid over the unit square.}\n\\label{fig:eff_band_unit_square}\n\\end{center}\n\\end{figure}\n \n \\subsection{Simulation Results}\n The point estimates for the different choices of adjustment basis and unobserved confounder surfaces are provided in \nFigure~\\ref{fig:sim_S1_g1_results} for Simulation 1 (exposure with fine scale variation) and Figure~\\ref{fig:sim_S1_g2_results} for Simulation 2 (exposure with larger scale variation). In each figure, each panel shows the mean estimate for the estimators that automatically select $\\hat m$ and across a range of fixed values of $m$. For both simulations, the bias of the unadjusted estimator that ignores the unmeasured confounding is 1.2, by construction.\n\n\\begin{figure}[tb]\n\\begin{center}\n\\includegraphics[width=\\textwidth]{Simulation_S1_M512_Results_g1_Paper.pdf}\n\\caption{Estimates (\\drawline{thick}) of $\\beta$ in Simulation 1 when pre-adjusting exposure with different choices of spatial basis (panel columns) and different underlying confounding surfaces (panel rows). The far left column shows the unadjusted estimate. The dashed lines (\\drawline{dashed}) and error bars indicate 2x the standard error. The true parameter value $\\beta =1$ is plotted as a dotted line (\\drawline{thick, blue,densely dotted}).}\n\\label{fig:sim_S1_g1_results}\n\\end{center}\n\\end{figure}\n\n\n\\begin{figure}[tb]\n\\begin{center}\n\\includegraphics[width=\\textwidth]{Simulation_S1_M512_Results_g2_Paper.pdf}\n\\caption{Estimates (\\drawline{thick}) of $\\beta$ in Simulation 2 when pre-adjusting exposure with different choices of spatial basis (panel columns) and different underlying confounding surfaces (panel rows). The far left column shows the unadjusted estimate. The dashed lines (\\drawline{dashed}) and error bars indicate 2x the standard error. The true parameter value $\\beta =1$ is plotted as a dotted line (\\drawline{thick, blue,densely dotted}).}\n\\label{fig:sim_S1_g2_results}\n\\end{center}\n\\end{figure}\n\n\n \\subsubsection{Results for fixed $m$}\n \nWhen the adjustment approach matches the basis used to generate the confounder, we see that the bias can be removed after sufficient adjustment. For Simulation 1 when confounding is due to $f_1$ and $f_2$, this occurs when there is TPRS adjustment of at least $df=10$ and $df=50$, respectively. In addition to leading to low bias (top-left panels of Figures~\\ref{fig:sim_S1_g1_results}), this leads to low MSE that matches or beats all other estimators (Supplemental Materials Table~1), and nearly correct coverage rates (94\\% for nominal 95\\% confidence interval [CI]; see Supplemental Materials Table~2).\nFor $f_3$ and $f_4$, complete adjustment occurs when there is a high pass filter with cutoff at a frequency of 7 and 23, respectively. However the variance of the estimates from the Fourier filtering approach increases greatly with the amount of adjustment, so the MSE remains relatively large despite the lack of bias (Supplemental Materials Table~1).\n\nWhen the adjustment approach does not match the basis generating the confounder, we see that in some cases most bias can still be eliminated but in other cases bias can persist. \nWhen the unmeasured confounder has large scale variation ($f_1$, $f_3$, and $f_5$), we see that all approaches are able to eliminate most bias after sufficient adjustment.\nHowever, for the confounder surfaces that have small scale variation, we see the persistence of bias regardless of the amount of adjustment ($f_6$) and bias amplification with increasing adjustment ($f_4$). This bias amplification occurs even when the correct adjustment basis is chosen, which can seen by the increase in bias for confounder surface $f_4$ when adjusting with Fourier filtering up to $\\omega = 22$.\n\nIn general, we see that TPRS can successfully adjust for confounding even when the unobserved confounder is generated from a different basis. For example, when $f=f_3$, adjustment with TPRS is able to remove the confounding bias for $df>100$. However, when $f=f_4$, the bias is not eliminated even for very high choices of $df$ relative to the sample size of $n=2,000$. This difference is due to the smaller range of effective bandwidths of TPRS compared to those of the high-pass filter approach (Figure~\\ref{fig:eff_band_unit_square}). By construction, variation in $f_2$ and $f_3$ extends up to $\\omega =\\sqrt{40} \\approx 6.3$ and $\\omega = \\sqrt{500} \\approx 22.4$, respectively. Using the relationship in Figure~\\ref{fig:eff_bandwidth_hpf_unit_square}, this corresponds to values of $\\hat{k}$ of approximately 0.12 and 0.03, respectively. A value of $df = 85$ corresponds to approximately $\\hat k = 0.12$, but there is not value of $df$ for which TPRS can achieve $\\hat k = 0.03$. \n\n\nFor Simulation 2, in which the exposure has larger scale spatial variation, we see similar trends to most of the Simulation 1 results. However, we do see greater effects of bias amplification, which now appears when the confounder is $f_2$ as well as when the confounder is $f_4$ (Figure~\\ref{fig:sim_S1_g2_results}). Unlike in Simulation 1, the bias induced by $f_6$ is not reduced at all.\n\n\nIn both sets of simulations, empirical Type I error when $\\beta = 0$ followed the same patterns as the coverage rates when $\\beta = 1$. Specifically, the error rates were at or close to 0.05 when the correct amount of adjustment was done using the correct basis (Supplemental Materials Table~3).\n\n\n\n\n\n\n \\subsubsection{Results when selecting $m$ automatically}\n\nThe estimators that automatically select $\\hat m$ using information criteria perform generally well. For adjustment using TPRS in the outcome model in Simulation 1, the model selected by minimizing AIC from the outcome model without exposure (AIC-NE) performs the best in almost all settings. For confounders other than $f_4$, a large amount of adjustment is selected, which leads to reduced bias (Figure~\\ref{fig:sim_S1_g1_results}). The MSE of the estimator with adjustment selected by AIC-NE is smaller than the MSE for estimators using fixed values of $m$ (Supplemental Materials Table~1). For some surfaces, the amount of adjustment selected by BIC-NE yielded slightly smaller MSE, but coverage rates were always better for selection by AIC-NE (Supplemental Materials Table~2). \nIn Simulation 2, selection using BIC-NE performs best in bias (Figure~\\ref{fig:sim_S1_g2_results}) and MSE (Supplemental Materials Table~4) for all settings except when the confounder is $f_2$. This reflects the benefit of greater penalization for model complexity (which leads to less adjustment) in settings with extensive bias amplification. When the confounder is $f_2$, selection using BIC from the full outcome model performs the best. However, coverage rates are slightly better using AIC-NE for selection in most cases.\n\nWhen pre-adjusting with TPRS at observed locations in Simulation 1, the amount of adjustment selected by minimizing AIC-NE was also better in most settings. Again while MSE was slightly lower for the estimator with amount of adjustment selected by BIC-NE, coverage rates were always better for selection by AIC-NE. Performance in all settings was similar to using adjustment for TPRS in the outcome model.\n In Simulation 2, minimizing BIC-NE does better in most settings, having lower variance since it tends to select a smaller model. \n\nFor adjustment using Fourier or wavelet filtering, the minimally-adjusted model is almost always selected when minimizing AIC and BIC since the number of parameters estimated for filtering increases exponentially. This results in lower MSE and better coverage than the unadjusted models, but poorer performance than adjusting with TPRS (Supplemental Materials Tables~1 through 5). The exception is in Simulation 2 for confounders $f_2$ and $f_4$, when the models selected by AIC and BIC do much worse than the unadjusted model.\n\nSelecting the amount of adjustment by the estimated-MSE criterion (equation \\eqref{eq:pick_m_mse}) reduced most of the bias in Simulation 1. However, it let to standard errors that were much larger than the other approaches, as can be seen in Figure~\\ref{fig:sim_S1_g1_results}. For Fourier and wavelet filtering, the standard errors were so large that a single estimate provided little information. The corresponding MSE was much larger than all other estimators (Supplemental Materials Table~1). In Simulation 2, the bias amplification led to estimates that were as bad or worse.\nThe \\emph{ad hoc} ``knee'' based approach (equation \\eqref{eq:pick_m_knee}) performed similarly poorly to the estimated-MSE approach, although had better coverage.\n\n\\subsection{Additional Simulations}\nWe conducted additional simulations that included measured confounders $\\bm z$, and the results were not substantively different from Simulation 1 and 2 so are not shown here.\nWe also conducted simulations in which the number of distinct locations was smaller than the number of subjects, leading to repeated locations. However, little difference was observed between those results compared to the primary results presented here. Approaches to reweighting had some benefit in terms of reducing variance in settings with extreme bias (small variance in $\\epsilon$ and $\\theta$ chosen for large relative bias), but no practical impact on the amount of bias.\n\n\n\\subsection{Simulation Conclusions}\n\\label{sec:sim_conclusions}\nBased on the results of Simulation 1 and 2, the best overall approach to reducing confounding bias is adjustment with TPRS at observed locations, either in the outcome model or using exposure pre-adjustment. The best approach for selecting the amount of adjustment is to minimize AIC-NE or BIC-NE (AIC or BIC from an outcome model without the exposure). In cases where bias amplification may be a concern, due to either only large scale variation in the exposure surface or very fine scale confounding, preference should be given to BIC-NE over AIC-NE. \n\n\n\n\\section{Sister Study Application}\n\\label{sec:sisterfullapp}\nWe now compare these different spatial confounding adjustment approaches in the Sister Study example of the association between SBP and PM$_{2.5}$.\nThe estimates from performing exposure pre-adjustment using TPRS across all observed grid locations, with each location repeated for the number of subjects at the same location, are provided \n in Figure~\\ref{fig:sister_obsgrid}.\nThese results are similar to those in Figure~\\ref{fig:sister_tprsdf}, as the adjustment basis is the same and the pre-adjustment that leads to Figure~\\ref{fig:sister_obsgrid} repeated locations as needed. Based upon the simulations (Section~\\ref{sec:sim_conclusions}), the preferred method for selecting the appropriate amount of adjustment is to minimize AIC-NE or BIC-NE. Because the exposure surface in this application is quite coarse (25km grid), we use BIC-NE for selecting our primary result to reduce the impact of bias amplification from over-adjustment. This choice results in adjustment using $m=3$ TPRS basis functions. When adjustment is done in the health model, the estimated association is a difference of 0.96 mmHg (95\\% CI: 0.50, 1.42) in SBP for each 10 $\\mu g\/m^3$ difference in PM$_{2.5}$ (Table~\\ref{tab:sister_tprs_res}). When the exposure is pre-adjusted, the estimated association is a difference of 0.92 mmHg (95\\% CI: 0.46, 1.41) in SBP for each 10 $\\mu g\/m^3$ difference in PM$_{2.5}$. \n\n\n\\begin{figure}[t]\n\\begin{center}\n\n\\subfloat[\\label{fig:sister_obsgrid}]{\n\\includegraphics[width=0.47\\textwidth]{Sister_Est_TPRS_PW_obsgrid.pdf}\n}\n\\subfloat[\\label{fig:sister_obs1grid}]{\n\\includegraphics[width=0.47\\textwidth]{Sister_Est_TPRS_PW_obs1grid.pdf}\n}\\\\\n\\subfloat[\\label{fig:sister_tprs_grid}]{\n\\includegraphics[width=0.47\\textwidth]{Sister_Est_TPRS_PW_grid.pdf}\n}\n\\caption{Estimates (\\drawline{ultra thick}) and pointwise confidence intervals (\\drawline{black}) of the association between SBP and PM$_{2.5}$ for different amounts of confounding adjustment using TPRS. The horizontal line (\\drawline{blue, dashed}) is at zero.}\\label{fig:sister_tprs}\n\\end{center}\n\\end{figure}\n\n\n \\begin{table}\n\\caption{\\label{tab:sister_tprs_res}Point estimates and 95\\% confidence intervals of the difference in SBP (in mmHg) associated with a difference of 10 $\\upmu$g\/m$^3$ in PM$_{2.5}$ exposure in the Sister Study, corresponding to different scales of adjustment using TPRS.}\n\\centering\n\\fbox{\n\\begin{tabular}{l c c c c cc}\n& \\multicolumn{2}{c}{Outcome Model} & \\multicolumn{2}{c}{Pre-Adjustment} \\\\\n& \\multicolumn{2}{c}{Adjustment} &\\multicolumn{2}{c}{Observed Locations} \\\\\n& $m$ & $\\hat \\beta$ (95\\% CI) & $m$ & $\\hat \\beta$ (95\\% CI) \\\\\n \\hline\n BIC-NE & 3 & $0.96$ ($0.50$, 1.42) & 3&0.92 (0.46, 1.41) \\\\\n AIC-NE & 401 & $-0.49$ ($-1.44$, 0.45) & 401 & $-0.43$ ($-1.38$, 0.52) \\\\\n BIC & 3 & $0.96$ ($0.50$, 1.42) & 3 &0.92 (0.46, 1.41) \\\\\n AIC & 401 & $-0.49$ ($-1.44$, 0.45) & 4 &0.95 (0.49, 1.41) \\\\\n $\\hat k = $ 1,000 km & 12 & 1.05 (0.37, 1.73) & 12 & 0.87 (0.20, 1.55) \\\\\nMSE & 352 & $-0.59$ ($-1.52$, 0.33) & 113 & $-0.37$ ($-1.18$, 0.44) \\\\\nKnee & 11& $1.10$ (0.43, 1.78) & 11 & $0.93$ ($0.26$, 1.60) \\\\\n\\hline\n\\hline\n& \\multicolumn{2}{c}{Pre-Adjustment} & \\multicolumn{2}{c}{Pre-Adjustment} \\\\\n& \\multicolumn{2}{c}{Observed Locations (1 time each) } & \\multicolumn{2}{c}{All Locations (1 time each)}\\\\\n& $m$ & $\\hat \\beta$ (95\\% CI) & $m$ & $\\hat \\beta$ (95\\% CI) \\\\\n \\hline\nAIC & 4 & 0.88 (0.43, 1.33) & 5 & 1.34 (0.81, 1.86)\\\\\nBIC & 3 & 0.80 (0.35, 1.26) & 4 & 0.81 (0.36, 1.26) \\\\\n$\\hat k = $1,000 km & 12 & 1.32 (0.68, 1.96) & 12 & 1.34 (0.73, 1.95) \\\\\nMSE & 268 &0.23 ($-0.58$, 1.03) & 3 & 0.62 (0.17, 1.07) \\\\\nKnee & 5 & 1.41 (0.86, 1.96) & 5 & 1.34 (0.81, 1.86) \\\\\n\\end{tabular}}\n\\end{table}\n\n\nFor comparison, Table~\\ref{tab:sister_tprs_res} also includes the results for the other approaches to selecting $m$. Using AIC-NE or AIC results in a large amount of adjustment being selected ($m=401$). This appears to be extensive overfitting of the model; the increases in the value of the log-likelihood as $m$ increases are small relative to the large sample size ($n=47,206$). The MSE approach also chooses a large amount of adjustment: $m=352$ for outcome model adjustment and $m=113$ for exposure pre-adjustment. All of these approaches with large adjustment result in negative point estimates due to the downward trend observed in Figures~\\ref{fig:sister_tprsdf} and \\ref{fig:sister_obsgrid}. This downward trend is likely due to bias amplification from residual confounding, since PM$_{2.5}$ only explains a small fraction of the variation in SBP and the measured confounders, while numerous, likely cannot capture all of the confounding relationships. Furthermore, the coarse spatial scale of the exposure means that variation due to unmeasured confounders is likely finer-scale than the exposure.\n\n\n\nResults from two alternative approaches to exposure pre-adjustment are presented in Figures~\\ref{fig:sister_obs1grid} and \\ref{fig:sister_tprs_grid}. These figures correspond, respectively, to pre-adjustment at observed locations, with duplicated locations removed, and pre-adjustment over all locations in the domain, with each location included once. \nThe point estimates corresponding to the different selection methods for these adjustment approaches are provided in the bottom half of Table~\\ref{tab:sister_tprs_res}. The amount of adjustment selected by AIC and BIC (using the full outcome model) is small, ranging from $m=3$ to $m=5$. These choices of adjustment yield point estimates ($0.80$ to $1.34$) similar to the main results from the models that adjust at all observed locations ($0.96$ and $0.92$).\nThe difference in estimates between Figures~\\ref{fig:sister_obs1grid} and \\ref{fig:sister_tprs_grid} is relatively small, suggesting that the restriction of the pre-adjustment to the observed locations does not have a large impact on the results. However, there is a notable qualitative difference between these results and those that included duplicate locations for the adjustment (Figures~\\ref{fig:sister_tprsdf} and \\ref{fig:sister_obsgrid}). While all four approaches show a negative trend in the point estimates for large values of $m$, the approaches that adjust using observed locations including duplicates decrease at smaller values of $m$ and yield negative point estimates. \nWe explored using reweighting to correct for the impact of the duplicated locations in the pre-adjustment approaches and obtained results that were either qualitatively similar to the results without reweighting or were highly unstable (see Supplemental Materials Section C.2). The magnitude of the difference in the point estimates from these alternative approaches using TPRS (including or excluding duplicate locations) suggests that residual confounding is likely occurring in this setting.\n\nEstimates for a fixed choice of $\\hat k = $ 1,000 km are also provided in Table~\\ref{tab:sister_tprs_res}. This corresponds to adjustment using $12$ degrees of freedom (Supplemental Materials Section C.1).\n A bandwidth of this size smooths large scale variation across the contiguous United States (which is approximately 4,500 km by 2,900 km). Because there are well-established large-scale trends in health outcomes across the United States \\citep{Mensah2005}, this value was chosen so that the analysis accounts for long-scale trends in systolic blood pressure. \n\n \nBased on the simulation results and duplicated observed locations, we recommend adjustment using TPRS as described above instead of using the Fourier or wavelet approaches. However, we present results for those approaches here for illustration.\nTo apply the pre-adjustment approaches with Fourier and wavelet basis functions, we embed the gridded locations within a larger square grid. \nBecause the predictions of 2006 annual average PM$_{2.5}$ of \\citet{Sampson2013} are only defined over the contiguous United States, \nthe added points are assigned exposure concentration of zero. This results in a grid of size 184 $\\times$ 184 for the Fourier approach and 256 $\\times $ 256 for the wavelet approach. We see from Figures~\\ref{fig:sister_hpf} and \\ref{fig:sister_wave} that the point estimates are relatively stable for all amounts of adjustment. This is probably due in part to the sinusoidal and wavelet basis functions not being representative of the spatial structure of the real-world unmeasured confounders, so increased adjustment removes little variation from the outcome or exposure. Additionally, because these adjustment methods rely on each location being present only a single time, we expect trends similar to Figures~\\ref{fig:sister_obs1grid} and \\ref{fig:sister_tprs_grid}.\n\n\n\n\\begin{figure}[t]\n\\begin{center}\n\\subfloat[\\label{fig:sister_hpf}]{\n\\includegraphics[width=0.47\\textwidth]{Sister_Est_HPF_PW.pdf}\n}\n\\subfloat[\\label{fig:sister_wave}]{\n\\includegraphics[width=0.47\\textwidth]{Sister_Est_Wave_PW.pdf}\n}\n\\caption{Estimates (\\drawline{ultra thick}) and pointwise confidence intervals (\\drawline{black}) of the association between SBP and PM$_{2.5}$ for different amounts of confounding adjustment using Fourier and wavelet filtering. The horizontal line (\\drawline{blue, dashed}) is at zero.\n\\label{fig:sister_all}\n\\end{center}\n\\end{figure}\n\n\n\n\n\n\n\\section{Discussion}\n\\label{sec:discussion}\nWe have examined different approaches to adjusting for unmeasured spatial confounding and quantifying and selecting the scale of adjustment. These approaches are motivated as extensions of time series methods for temporal confounding \\citep{Peng2006,SzpiroSheppard2014}. \nWe presented a method for comparing the spatial scales across choices of basis using the effective bandwidth $\\hat k$. We showed examples using TPRS, a Fourier basis, and wavelets, each of which indexes variability in different forms and on different scales.\nWe showed that adjustment with TPRS is limited to a smaller range of spatial scales than the Fourier approach. However, the smaller bandwidth range of TPRS can have more flexibility at these scales. But when the true variation is beyond the scales TPRS can reach, it fails to remove confounding bias.\n\nFor a particular application, a choice of the amount of adjustment must be made. We identified selecting the amount of adjustment using AIC-NE and BIC-NE as the preferred approaches for most settings.\nWhen there is substantive knowledge available about the scales of variation involved, $\\hat k$ can be chosen \\emph{a priori}.\n\\emph{Ad hoc} approaches such as the ``knee'' and estimated MSE methods performed poorly.\n\nPre-adjusting the exposure by Fourier filtering or wavelet thresholding is attractive due to the orthogonality of those bases. However, they are both severely limited by the requirement of a square grid, assumptions of periodicity, and the need to reweight the population. For wavelets, the thresholding at dyadic levels also leads to limited available intervals for adjustment. Although in settings where there is a priori knowledge about confounding relationships, non-uniform thresholding of the wavelet coefficients could add flexibility. \nFor these reasons, the more flexible TPRS are likely to be preferred over the Fourier or wavelet basis for settings where TPRS can represent variation at the scale of interest, such as the example study of PM$_{2.5}$ in the Sister Study.\nThe Fourier basis ccould be chosen when very-fine scale adjustment is needed or there is external evidence to support periodic variation in the confounders.\n\nOne of the key results from our simulations is that the addition of spatial basis functions, or an equivalent pre-adjustment procedure, does not necessarily reduce bias in the point estimate. In fact, it can lead to substantial bias amplification. \nThis is an important contrast to the time series settings, in which more aggressive adjustment is recommended to reduce bias from unmeasured confounding \\citep{Peng2006}. The exposure in a time series settings are typically measured directly, which means that there is substantial residual variation in the exposure at each time point, whereas the use of an exposure prediction model in a spatial context means that spatial exposures are often quite smooth.\nThe potential for bias amplification means that using changes in the point estimates is often not a good approach to assessing the extent of confounding bias.\n\nWe have presented results here in the context of a linear health model. However, these approaches to spatial confounding adjustment can be applied in generalized linear model settings. The patterns of bias reduction (or increase) for a sequence of adjustment values $m$ will differ by context and choice of link function, but the connection between adjustment basis, spatial scale, and overall interpretation remains the same as the linear case. For example, \\cite{Keet2018} used TPRS to adjust for large-scale confounding across the contiguous United States in an analysis of particulate matter and asthma-related outcomes. Automated selection could be done using extensions of information criteria such as QIC \\citep{Pan2001}.\n\nIn summary, we have presented methods for describing and selecting the spatial scale of spatial confounding adjustment using different choices of basis. \nThese methods can be used to more accurately describe the extent of spatial confounding adjustment in future studies with spatial exposures.\n\n\n\\section*{Acknowledgements}\nThis work was supported by grants T32ES015459 and R21ES024894 from the the National Institute for Environmental Health Sciences (NIEHS). The Sister Study supported in part by the Intramural Research Program of the NIH, NIEHS (Z01ES044005). This work was also supported in part by the US Environmental Protection Agency (EPA) through awards RD83479601 and RD835871. This was work has not been formally reviewed by the EPA. The views expressed in this document are solely those of the authors and do not necessarily reflect those of the Agency. EPA does not endorse any products or commercial services mentioned in this publication.\n\n\n\\bibliographystyle{chicago}\n","meta":{"redpajama_set_name":"RedPajamaArXiv"}} +{"text":"\\section{\\@startsection {section}{1}{\\z@\n {-3.5ex \\@plus -1ex \\@minus -.2ex\n {2.3ex \\@plus.2ex\n {\\normalfont\\large\\bfseries}}\n\\renewcommand\\subsection{\\@startsection{subsection}{2}{\\z@\n {-3.25ex\\@plus -1ex \\@minus -.2ex\n {1.5ex \\@plus .2ex\n {\\normalfont\\bfseries}}\n\n\\parskip 6 pt\n\n \\marginparwidth 0pt\n \\oddsidemargin -0.3cm\n \\evensidemargin -0.3cm\n \\marginparsep 0pt\n \\topmargin -0.4in\n \\textwidth 7.1in\n \\textheight 9.0 in\n\n\\newcommand{\\be}{\\begin{equation}}\n\\newcommand{\\ee}{\\end{equation}}\n\\newcommand{\\bea}{\\begin{eqnarray}}\n\\newcommand{\\eea}{\\end{eqnarray}}\n\\newcommand{\\bse}{\\begin{subequations}}\n\\newcommand{\\ese}{\\end{subequations}}\n\\newcommand{\\beqa}{\\begin{eqnarray}}\n\\newcommand{\\eeqa}{\\end{eqnarray}}\n\\newcommand{\\beqar}{\\begin{eqnarray*}}\n\\newcommand{\\eeqar}{\\end{eqnarray*}}\n\\newcommand{\\bi}{\\begin{itemize}}\n\\newcommand{\\ei}{\\end{itemize}}\n\\newcommand{\\bn}{\\begin{enumerate}}\n\\newcommand{\\en}{\\end{enumerate}}\n\\newcommand{\\labell}[1]{\\label{#1}\\qquad_{#1}}\n\\newcommand{\\fixme}[1]{\\textbf{FIXME: }$\\langle$\\textit{#1}$\\rangle$}\n\\newcommand{\\note}[1]{\\textbf{NOTE: }$\\langle$\\textit{#1}$\\rangle$}\n\\newcommand{\\ba}{\\begin{array}}\n\\newcommand{\\ea}{\\end{array}}\n\\newcommand{\\bc}{\\begin{center}}\n\\newcommand{\\ec}{\\end{center}}\n\\newcommand{\\nnr}{\\nonumber \\\\}\n\\newcommand{\\nn}{\\nonumber}\n\n\\newcommand{\\cf}{{\\em cf.}\\ }\n\\newcommand{\\ie}{{\\em i.e.}\\ }\n\\newcommand{\\eg}{{\\em e.g.} }\n\\newcommand{\\viz}{{\\em viz.}\\ }\n\\newcommand{\\nb}{{\\em N.B.}\\ }\n\\newcommand{\\etal}{{\\em et al.}\\ }\n\n\\newcommand{\\tcb}{\\textcolor{blue}}\n\\newcommand{\\tcr}{\\textcolor{red}}\n\\definecolor{darkgreen}{rgb}{0,0.3,0}\n\\definecolor{darkblue}{rgb}{0,0,0.3}\n\\definecolor{darkred}{rgb}{0.7,0,0}\n\\definecolor{VioletRed4}{rgb}{0.55,0.13,0.32}\n\\definecolor{VioletRed}{rgb}{0.82,0.13,0.56}\n\\definecolor{VioletRed2}{rgb}{0.93,0.23,0.55}\n\\newcommand{\\tcdr}{\\textcolor{darkred}}\n\\newcommand{\\tcdg}{\\textcolor{darkgreen}}\n\\newcommand{\\tcdb}{\\textcolor{darkblue}}\n\n\n\n\\makeatother\n\n\\begin{document}\n\n\\newcommand{\\email}[1]{\\footnote{\\href{mailto:#1}{#1}}}\n\n\n\n\\title{\\bf\\Large{One-loop Photon's Effective Action in the Noncommutative Scalar QED$_{3}$}}\n\n\\author{\\bf{M.~Ghasemkhani}\\email{ghasemkhani@ipm.ir} $^{a}$, \\bf{R.~Bufalo}\\email{rodrigo.bufalo@ufla.br} $^{b}$, \\bf{V.~Rahmanpour}\\email{v.rahmanpour@mail.sbu.ac.ir} $^{a}$ and M.~Alipour\\email{moj.alipour@yahoo.com} $^{a}$ \\\\\\\\\n\\textit{\\small$^a$ Department of Physics, Shahid Beheshti University, G.C., Evin, Tehran 19839, Iran}\\\\\n\\textit{\\small $^b$ Departamento de F\\'isica, Universidade Federal de Lavras,}\\\\\n\\textit{\\small Caixa Postal 3037, 37200-000 Lavras, MG, Brazil}\\\\\n}\n\\maketitle\n\n\\begin{abstract}\nIn this paper, we consider the evaluation of the effective action for photons coupled to charged scalar fields in the framework of a $(2+1)$-dimensional noncommutative spacetime.\nIn order to determine the noncommutative Maxwell Lagrangian density, we follow a perturbative approach, by integrating out the charged scalar fields, to compute the respective graphs for the vev's $\\left\\langle AA \\right\\rangle$, $\\left\\langle AAA \\right\\rangle$ and $\\left\\langle AAAA \\right\\rangle$.\nSurprisingly, it is shown that these contributions are planar and that, in the highly noncommutative limit, correspond to the Maxwell effective action and its higher-derivative corrections.\nIt is explicitly verified that the one-loop effective action is gauge invariant, as well as under discrete symmetries: parity, time reversal, and charge conjugation.\nMoreover, a comparison of the main results with the noncommutative QED$_{3}$ is established.\nIn particular, the main difference is the absence of parity violating terms in the photon's effective action coming from integrating out the charged scalar fields.\n\n\\end{abstract}\n\n\n\n\\setcounter{footnote}{0}\n\\renewcommand{\\baselinestretch}{1.05} \n\n\\newpage\n\\tableofcontents\n\\section{Introduction}\n\\label{sec1}\n\nIn recent years a great amount of attention has been paid in the analysis and calculation of covariant effective action for different types of quantum fields, exploring the diversity of new interactions that mainly depend on the spin of the fields involved as well as the spacetime dimensionality \\cite{Bonora:2016otz, Bonora:2017ykb, Quevillon:2018mfl}.\nOne may say that the canonical example of a complete analysis is the Euler-Heisenberg effective action \\cite{Heisenberg:1935qt}, where quantum effects from QED are responsible to induce nonlinear interactions among photons.\nMoreover, the effective action framework has served as an important tool to explore different point of views about the quantum gravitational theory, where the Einstein-Hilbert action is augmented by metric and\/or torsion fields higher-order terms \\cite{Buchbinder:1992rb,Masud}.\n\nNaturally, since the framework of effective action is a powerful tool, there is a great expectation that this approach can be used to make contact with modern phenomenology of physics beyond the standard model.\nThe main idea behind this formulation is that at energies below some cutoff scale $\\mu$, \\footnote{That may signal symmetry violation, for instance Lorentz symmetry violation.} all the effects of the massive degrees of freedom above $\\mu$ can be encoded as new interactions among the fields remaining active below $\\mu$.\nThe effective action approach has been extensively used to the study of Lorentz violating field theories, where the energy scale $\\mu$ is related to the Planck energy scale $E_{\\rm Pl}$ (or length $\\ell_{\\rm Pl}$) where our notion of smooth geometry is expected to break \\cite{ref53,Bluhm:2005uj}.\nIn this case, the current understanding is that the low energy Lorentz violating terms come as quantum corrections from heavy modes \\cite{Borges:2013eda,Borges:2016uwl}.\n\n\nAlthough the majority of studies of Lorentz violating field theories is developed in a four-dimensional spacetime, there are considerable interests in the description of\nthree-dimensional (3D) ones \\cite{Charneski:2008hy, Nascimento:2014owa, Casana:2015hda}.\nBesides the algebraic richness of odd dimensional spacetimes, one may say that the most appealing aspect of 3D field theories is the UV finiteness in some models.\nThis feature might provide an ambiguity free description of Lorentz violation, allowing thus a close contact of violating effects with physical planar phenomena.\nIn particular, it is worth recall the example of the description of quantum hall fluids in terms of noncommutative geometry \\cite{Susskind:2001fb,Douglas:2001ba}.\n\nOver the past two decades, field theories defined in a noncommutative (NC) geometry have been considered as one of the most prominent candidates presenting Lorentz violation to make contact with quantum gravity phenomenology \\cite{Douglas:2001ba,AmelinoCamelia:2008qg}.\nWithin this description, the noncommutativity measurement parameter is related to a length scale $\\ell_{\\rm nc} \\sim \\sqrt{\\theta}$.\nIn one hand, this length scale can be seen as a manifestation of the discreteness of the spacetime, presenting a smooth profile in the UV region \\cite{Arzano:2017uuh}.\nOn the other hand, this same scale is responsible for introducing instabilities in the dispersion relations of the fields, the so-called UV\/IR mixing \\cite{Matusis:2000jf}.\n\nNC field theories have been studied through the effective action approach, where the behavior of the new couplings was deeply analyzed \\cite{Vassilevich:2005vk}, where the presence of UV\/IR mixing in the 1PI functions signals that applying the usual Wilsonian field theory notions and techniques to NC QFT's one should be careful.\nThis type of analysis was also developed to two and three-dimensional NC models\n\\cite{Ghasemkhani:2013bs, Ghasemkhani:2017bjp, Chu:2000bz, Banerjee:2007ua, Bufalo:2014ooa}.\nThese studies of effective action in 3D models were exclusive to the coupling of gauge and fermion fields, no much attention has been paid to the case involving scalar fields, in particular the case of spinless charged fields interacting with photons.\n\n\nIn one hand, it is of physical significance to study scalars in 3D field theories independently of fermions in condensed matter systems, as in Quantum Hall systems, since we have scalar quasiparticle excitations.\nOn the other hand, recently 3D versions of fermionization\/bosonization have also been introduced \\cite{Hsin:2016blu,Benini:2017dus}.\nIn these studies, it was discussed the duality between nonspin\nChern-Simons theory and a spin Chern-Simons theory, exploring precisely the spin structure of the given models.\nIn this sense, the present work could be the first step in extending such analysis to the NC case.\nMotivated by these facts, we will analyze throughout the paper to what extent the spin of the matter fields can change the effective action when charged scalar and fermion fields are considered in the presence of the spacetime noncommutativity.\nA straightforward result is that in the case of the 3D scalar quantum electrodynamics (scalar QED$_{3}$), it is not possible to generate the parity odd Chern-Simons terms, showing thus that the dynamics of the 3D gauge field is significantly different in the presence of either charged scalar or fermion fields. It is well known that the presence of the degree of freedom associated with the spin changes in most of the cases only the magnitude of physical quantities, e.g. the beta function \\cite{Ghasemkhani:2016zjy} and electron's magnetic moment \\cite{Panigrahi:2004cf}.\n\nIn this paper we discuss the effective action for the photon in the scalar QED in the noncommutative three-dimensional spacetime.\nIn Sec.~\\ref{sec2} we present an overview of the scalar QED, where the charged scalar fields are minimally coupled with the photons.\nThere we define the main aspects regarding the Moyal product used in our analysis,\\footnote{The noncommutativity we will be using in the paper is\ndefined by the algebra $[\\hat{x}_\\mu,\\hat{x}_\\nu] = i \\theta_{\\mu\\nu}$. So in order to construct a noncommutative field theory, using the Weyl-Moyal (symbol)\ncorrespondence, the ordinary product is replaced\nby the Moyal star product as defined below.}\nwe also discuss the content of discrete symmetries in the NC 3D spacetime.\nIn addition, all the Feynman rules are presented for the propagators and 1PI vertices.\nSection \\ref{sec4} is focused in the perturbative computation of the relevant graphs corresponding to the one-loop effective action for the photon gauge field.\nIt is also discussed the generation of higher-derivative terms, similarly to the\nAlekseev-Arbuzov-Baikov effective Lagrangian for non-Abelian fields.\nIn Sec.~\\ref{sec5} we establish a comparison of the obtained results for the effective action in the NC-scalar QED to those of ordinary NC-QED, exploring the part played by the spin in these cases.\nWe present our final remarks in Sec.~\\ref{conc}.\n\n\n\n\\section{The model}\n\\label{sec2}\nIn this section, we introduce the model and fix our notation.\nThe noncommutative extension of the bosonic electrodynamics is described by the following action\n\\begin{equation}\nS=\\int d^{3}x\\Big[\\left(D_{\\mu}\\phi\\right)^{\\dagger}\\star D^{\\mu}\\phi-m^{2}\\phi^{\\dagger}\\star \\phi\\Big],\n\\label{eq:a1}\n\\end{equation}\nthis functional action consists of the interaction of charged scalar fields minimally coupled with an external gauge field.\nWe consider the covariant derivative form in the fundamental representation $D_{\\mu}\\phi=\\partial_{\\mu}\\phi+ieA_{\\mu}\\star\\phi$.\nThis action is invariant under the infinitesimal gauge transformation\n\\begin{equation}\n\\delta A_{\\mu}=\\partial_{\\mu}\\lambda+ie[A_{\\mu},\\lambda]_{\\star}~,\\quad \\delta\\phi=ie\\lambda\\star\\phi,\n\\label{eq:a2}\n\\end{equation}\nwhere $[\\,\\, ,\\,]_{\\star}$ is the Moyal bracket.\nMoreover, the Moyal star product between the functions $f$ and $g$ is defined as\n\\begin{equation}\nf\\left( x\\right)\\star g\\left(x\\right) = f\\left( x\\right) \\exp \\left(\\frac{i}{2}\\theta ^{\\mu \\nu}\n\\overleftarrow{\\partial_\\mu}\n \\overrightarrow{\\partial_\\nu}\\right) g\\left( x\\right),\n \\label{eq:a3}\n\\end{equation}\nwhere $\\theta^{\\mu\\nu}=-\\theta^{\\nu\\mu}$ are constant parameters that measure the noncommutative structure of the space-time.\nIn order to avoid unitarity violation, we assume that $\\theta^{0i}=0$, hence we have only one nonzero independent component $\\theta^{12}$ in our model.\n\nIt is worth mentioning that although the couplings \\eqref{eq:a1} are simply modified by the presence of a nonplanar phase due to the Moyal product, the noncommutativity of spacetime coordinates shows its importance in the computation of the one-loop effective action for the gauge field, where nonlinear self-couplings are present solely due to the NC framework.\nThe one-loop effective action for the gauge field\ncan be readily obtained by integrating out the charged scalar fields of \\eqref{eq:a1}\n\\begin{equation}\ne^{i\\Gamma_{\\rm eff}[A]}=\\int D\\phi^{\\dagger} D\\phi~e^{-i\\int d^{3}x~\\phi^{\\dagger}\\star(D^{2}+m^{2})\\star\\phi}.\n\\end{equation}\nUsing the Gaussian functional integration formulas for the case of interacting charged scalar fields, we can write the noncommutative 1PI effective action as below\n\\begin{equation}\ni\\Gamma_{\\rm eff}[A]={\\rm Tr}\\ln\\left[\\frac{(i\\partial_{\\mu}-eA_{\\mu})\\star(i\\partial^{\\mu}-eA^{\\mu})\\star-m^{2}}{-\\partial^{2}-m^{2}}\\right],\n\\end{equation}\nwhere ${\\rm Tr}$ is a sum over eigenvalues of the operator inside the bracket which can also be evaluated in momentum space.\nSimilarly to the description of one-loop effective action for the gauge field in the case of NC-QED \\cite{Bufalo:2014ooa}, one can show that $\\Gamma_{\\rm eff}[A]$ has a convergent series expansion in coupling constant $e$. From a diagrammatic point of view, it includes the one-loop graphs contributing to the gauge field $n$-point functions which is considered as\n\\begin{equation}\n\\Gamma_{\\rm eff}[A]={\\cal{S}}_{\\rm eff}[AA]+{\\cal{S}}_{\\rm eff}[AAA]+{\\cal{S}}_{\\rm eff}[AAAA]+\\cdots.\n\\label{eq:aa}\n\\end{equation}\nHowever, the functional $\\Gamma_{\\rm eff}[A]$, in comparison to the NC-QED case, has more graphs due to the presence of an additional interacting vertex.\n\nMoreover, it is important to emphasize that as we will show in our model,\nsimilarly to the case of NC-QED \\cite{Ghasemkhani:2017bjp}, the one-loop effective action for the photons is completely planar.\nExplicitly, in the evaluation of the one-loop diagrams with an arbitrary number of external legs of photons, for energies below the mass scale $m$, only planar diagrams contribute. This means the absence of IR\/UV mixing.\n\n\\subsection{Discrete symmetries}\n\\label{sec2.1}\n\nSince we are interested in computing the one-loop effective action for the photon, it is useful to analyze the behavior of the original action \\eqref{eq:a1} under discrete symmetries: parity, charge conjugation and time reversal.\nThis study will allow us to determine which of them may be anomalous in the obtained results for the one-loop order effective action.\n\n\\begin{itemize}\n\\item{\\emph{Parity}}\n\nParity transformation in $d=2+1$ is defined as $x_{1} \\rightarrow -x_{1}$ and $x_{2}\\rightarrow x_{2}$, in this case we have that the field $\\phi$ is even under parity, and the components of the gauge field $A_{\\mu}$ behave as $A_{0}\\rightarrow A_{0}$, $A_{1}\\rightarrow -A_{1}$ and $A_{2}\\rightarrow A_{2}$.\nMoreover, we observe from the NC algebra that the $\\theta$ parameter changes under this transformation as $\\theta^{12}\\rightarrow -\\theta^{12}$ .\nWith these considerations, it is easy to show that the whole of the action \\eqref{eq:a1} is parity invariant.\n\\item{\\emph{Time Reversal}}\n\nUnder time reversal, we have that $x_{0} \\rightarrow -x_{0}$. In this case, the components of the gauge field behave as $\\left( A_{0}, A_i\\right) \\rightarrow \\left( A_0,-A_i\\right)$.\nBy demanding that the scalar field does not change $\\phi \\to \\phi $, and that necessarily the NC parameter transforms as $\\theta^{12}\\rightarrow -\\theta^{12}$ under time reversal, we are left with a $T$-invariant action.\n\\item{\\emph{Charge Conjugation}}\n\nAs we know, the behavior of the gauge field under charge conjugation is given by $A_{\\mu}\\rightarrow -A_{\\mu}$ for any space-time dimensionality. Taking the scalar field to be unchanged under $C$, and the transformation for the NC parameter $\\theta\\rightarrow-\\theta$, we conclude that the action \\eqref{eq:a1} is $C$-invariant.\n\\end{itemize}\n\n\n\\subsection{Propagators and vertex functions}\n\\label{sec3}\n\nIn order to discuss the computation of the perturbative effective action, we must determine the basic propagators and 1PI vertex functions.\nFrom the functional action described in \\eqref{eq:a1}, we can obtain the bosonic propagator\n\\begin{equation}\n{\\cal{D}}(p) = \\frac{i}{{p^{2}-m^{2}}},\n \\label{eq:b1}\n\\end{equation}\nthe cubic vertex $\\left \\langle A \\,\\phi \\, \\phi^\\dagger \\right \\rangle$\n\\begin{align}\n\\Gamma^\\mu(p,q)= -ie\\left(p+q\\right)^{\\mu}\\exp\\Big(\\frac{i}{2} p \\wedge q\\Big),\n \\label{eq:b2}\n\\end{align}\nand the quartic vertex $\\left \\langle AA\\,\\phi \\,\\phi^\\dagger \\right \\rangle$\n\\begin{align}\n\\Lambda^{\\mu\\nu}(p,q,s)=2ie^{2}\\eta^{\\mu\\nu}\\exp{\\Big(\\frac{i}{2}k \\wedge s\\Big)}\\cos\\Big(\\frac{p \\wedge q}{2}\\Big),\n \\label{eq:b3}\n\\end{align}\nwhere we have introduced the notation $p \\wedge q = p_\\mu \\theta^{\\mu\\nu}q_\\nu$.\nA straightforward difference of the scalar and fermionic electrodynamics is the presence of the quartic vertex $\\left \\langle AA\\phi \\phi^\\dagger \\right \\rangle$, which increases significantly the number of the one-loop graphs.\nMoreover, the scalar vertices are rather simpler due to the absence of the Dirac $\\gamma$ matrices, resulting in a much simpler algebraic analysis.\n\n\n\\section{Perturbative Effective Action}\n \\label{sec4}\n\nNow that we have determined the basic Feynman rules for the 1PI functions, we shall proceed to the computation of the one-loop diagrams related to the effective action for the gauge field.\nFor this purpose, we shall compute along this section the respective contributions: the free part of the effective action $\\left\\langle AA \\right\\rangle$, and the interacting parts for the cubic vertex $\\left\\langle AAA \\right\\rangle$ and quartic vertex $\\left\\langle AAAA \\right\\rangle$.\nIn general, the final results of our analysis related to the graphs contributing to $\\left\\langle AA \\right\\rangle$, $\\left\\langle AAA \\right\\rangle$ and $\\left\\langle AAAA \\right\\rangle$ vertices shall be a function of $e$, $\\tilde{p}_\\mu = \\theta_{\\mu \\nu } p^\\nu$ and $p^2\/m^2$.\n\nTo highlight the effects of noncommutativity in the low energy effective action and the photon two, three and four-point functions, while we take the external momenta $p$ such that $p^2\/m^2\\ll 1$, we also take the highly noncommutative limit, i.e., the low-energy regime $p^2\/m^2 \\to 0$ while $\\tilde{p}$ is kept finite.\nIn this limit the noncommutative (planar) phase factors, which are a function of $\\tilde{p}$, remain finite.\nMoreover, we shall focus our attention on those terms of order $m^{-1}$.\nWe present by complementarity, at the next to leading order, the terms of order $m^{-3}$ that correspond to higher-derivative corrections.\n \\subsection{One-loop $\\left\\langle AA \\right\\rangle$ part}\n\nFrom the Feynman rules we can compute the one-loop contribution to the $AA$-term corresponding to the free part of the photon effective action.\nThe two diagrams contributing at this order are depicted in Fig.~\\ref{oneloop1}, which the respective expressions have the form\n\\begin{align}\n\\Pi^{\\mu\\nu}_{(a)}(p) &= e^{2} \\int \\frac{d^{d}k}{(2\\pi)^{d}} \\frac{(p+2k)^{\\mu}(p+2k)^{\\nu}}{[(p+k)^{2}-m^{2}][k^{2}-m^{2}]}, \\nonumber \\\\\n\\Pi^{\\mu\\nu}_{(b)}(p) &= -e^{2} \\int \\frac{d^{d}k}{(2\\pi)^{d}} \\frac{2\\eta^{\\mu\\nu}[(p+k)^{2}-m^{2}]}{[(p+k)^{2}-m^{2}][k^{2}-m^{2}]},\n \\label{eq:c1}\n\\end{align}\nso that the full contribution is written as\n\\begin{align}\n\\Pi^{\\mu\\nu}(p) &= e^{2}\\int \\frac{d^{d}k}{(2\\pi)^{d}} \\frac{(p+2k)^{\\mu}(p+2k)^{\\nu}-2\\eta^{\\mu\\nu}[(p+k)^{2}-m^{2}]}{[(p+k)^{2}-m^{2}][k^{2}-m^{2}]}.\n \\label{eq:c2}\n\\end{align}\n\nA first comment is that this piece is completely planar, carrying no noncommutative effects.\nThe explicit computation is straightforward using dimensional regularization.\nAfter some algebraic calculation, we can consider the low-energy limit, $p^2\/m^2 \\to 0$, resulting into\n\\begin{align}\n\\Pi^{\\mu\\nu}(p) =\\frac{ie^{2}}{48\\pi m}\\left(p^{\\mu}p^{\\nu}-\\eta^{\\mu\\nu}p^{2}\\right).\n \\label{eq:c3}\n\\end{align}\nMoreover, for the next to leading order contribution, ${\\cal{O}}(m^{-3})$, we find that\n\\begin{equation}\n\\Pi^{\\mu\\nu}_{\\rm hd}(p)=\\frac{ie^{2}}{960\\pi m^{3}}\\left(p^{\\mu}p^{\\nu}-\\eta^{\\mu\\nu}p^{2}\\right)p^{2}.\n \\label{eq:c4}\n\\end{equation}\nThese two terms Eqs.~\\eqref{eq:c3} and \\eqref{eq:c4} satisfy straightforwardly the Ward identity, $p_\\mu \\Pi^{\\mu\\nu}=0$, as we expected.\nWe can determine the respective contribution to the effective action by means of\n\\begin{equation}\ni{\\cal{S}}_{\\rm eff}[AA]=\\int\\int d^{3}x_{1}d^{3}x_{2}~A_{\\mu}(x_{1})\\Gamma^{\\mu\\nu}(x_{1},x_{2})A_{\\nu}(x_{2}),\n \\label{eq:c5}\n\\end{equation}\nwhere ${\\cal{S}}_{\\rm eff}[AA]$ is the quadratic part of the effective action $\\Gamma[A]$ in \\eqref{eq:aa}. Here, we have defined by simplicity\n\\begin{equation}\n\\Gamma^{\\mu\\nu}(x_{1},x_{2})=\\int\\frac{d^{3}p}{(2\\pi)^{3}} e^{-i p\\cdot (x_{1}-x_{2})}\\Pi^{\\mu\\nu}(p ).\n \\label{eq:c6}\n\\end{equation}\n\\begin{figure}[t]\n\\vspace{-1.2cm}\n\\includegraphics[height=6\\baselineskip]{2-point.eps}\n \\centering\\caption{Relevant graphs for the induced $AA$-term.}\n\\label{oneloop1}\n\\end{figure}\n\nAfter some algebra, the quadratic part of the induced effective action for the photon, considering \\eqref{eq:c3} and \\eqref{eq:c4}, is given by\n\\begin{align}\ni{\\cal{S}}_{\\rm eff}[AA]&=-\\frac{ie^{2}}{48\\pi m}\\int d^{3}x\\Big(\\partial_{\\mu}A_{\\nu}\\partial^{\\mu}A^{\\nu}-\\partial^{\\mu}A_{\\nu}\\partial^{\\nu}A_{\\mu}\\Big) \\nonumber \\\\\n&+\\frac{ie^{2}}{960\\pi m^{3}}\\int d^{3}x\\Big(\\partial_{\\mu}A_{\\nu}\\Box\\partial^{\\mu}A^{\\nu}-\\partial^{\\mu}A_{\\nu}\\Box\\partial^{\\nu}A_{\\mu}\\Big).\n \\label{eq:c7}\n\\end{align}\nAs we have previously mentioned, the first term of the expression \\eqref{eq:c7} corresponds to the kinetic part of the noncommutative Maxwell action, ${\\cal O}(m^{-1})$, while the second term is the higher-derivative correction to the kinetic term, of order ${\\cal O}(m^{-3})$.\nMoreover, the obtained result does not contain any noncommutativity effect, since the produced phase factors cancel for $n=2$.\nIt is worth noticing the absence of the parity odd Chern-Simons term in the scalar QED$_{3}$, which in turn is generated in the fermionic electrodynamics due to the algebraic structure of the two-dimensional realization of $\\gamma$ matrices.\n\n\n\\subsection{One-loop $\\left\\langle A AA\\right\\rangle$ vertex}\n\nThe relevant graphs for the $\\left\\langle A AA\\right\\rangle$ part of the effective action are shown in Fig.~\\ref{oneloop2}.\nHowever, in order to determine correctly the full contribution to the effective action, it is necessary to consider all different permutations of the external bosonic lines of the given graphs.\nIt is easy to see that the diagram (a) has an additional contribution (b), corresponding to a permutation of the external photon legs, which has an equivalent structure but with a reversed momentum flow, which comes exactly from the S-matrix expansion at the order of $e^{3}$.\nWith help of the Feynman rules, we can easily write the relevant expression for the sum of the graphs (a) and (b)\n\\begin{equation}\n\\Pi^{\\mu\\nu\\rho}_{(a+b)}(p,q)=2i e^{3}\\int \\frac{d^{d}k}{(2\\pi)^{d}} \\frac{(p+2k)^{\\mu}(2p+2k+q)^{\\nu}(p+q+2k)^{\\rho}}{[(p+k)^{2}-m^{2}][(p+q+k)^{2}-m^{2}][k^{2}-m^{2}]} \\sin\\big(\\frac{p \\wedge q}{2}\\big),\n \\label{eq:c8}\n\\end{equation}\nwhich is a planar quantity, we can see that its integrand is independent of the noncommutativity.\nThe contribution from the graph (c) also has a simple planar structure, which is given by the expression\n\\begin{equation}\n\\Pi^{\\mu\\nu\\rho}_{(c)}(p,q)= -e^{3}\\int \\frac{d^{d}k}{(2\\pi)^{d}} \\frac{\\eta^{\\mu\\nu}(p+q+2k)^{\\rho}}{[(p+q+k)^{2}-m^{2}][k^{2}-m^{2}]} \\cos\\big(\\frac{p \\wedge q}{2}\\big).\n \\label{eq:c9}\n\\end{equation}\n\nSince the graph (c) is planar, one can perform straightforward manipulations to show that this contribution is identically zero, i.e. $\\Pi^{\\mu\\nu\\rho}_{(c)}=0$, for any value of the external momenta. Hence the full contribution for the $\\left\\langle A AA\\right\\rangle$ vertex reads\n\\begin{align}\n\\Pi^{\\mu\\nu\\rho}(p,q)=2i e^{3}\\int \\frac{d^{d}k}{(2\\pi)^{d}} \\frac{(2k+p)^{\\mu}(2k+p+s)^{\\nu}(s+2k)^{\\rho}}{[(p+k)^{2}-m^{2}][(s+k)^{2}-m^{2}][k^{2}-m^{2}]} \\sin\\big(\\frac{p \\wedge q}{2}\\big).\n \\label{eq:c10}\n\\end{align}\n\\begin{figure}[t]\n\\vspace{-1.2cm}\n\\includegraphics[height=8\\baselineskip]{3-point.eps}\n \\centering\\caption{Relevant graphs for the induced $AAA$-term.}\n\\label{oneloop2}\n\\end{figure}\n\nThe computation of the loop integral is lengthy but straightforward using dimensional regularization, and in the low-energy limit $p^{2},q^{2}\\ll m^{2}$, we find that\n\\begin{equation}\n\\Pi^{\\mu\\nu\\rho}(p,q)=\\frac{e^{3}}{12\\pi m}\\bigg[\\big(p-q\\big)^{\\rho}\\eta^{\\mu\\nu}-\\big(2p+ q\\big)^{\\nu}\\eta^{\\mu\\rho} +\\big(p+2 q\\big)^{\\mu}\\eta^{\\nu\\rho}\\bigg] \\sin\\big(\\frac{p \\wedge q}{2}\\big).\n \\label{eq:c11}\n\\end{equation}\nHere, we notice that the Eq.~\\eqref{eq:c11} corresponds exactly to the standard Feynman vertex of the 3-photon interaction term in the NC spacetime.\nMoreover, in the next to leading order, ${\\cal{O}}(m^{-3})$, we have the contribution from the higher-derivative terms\n\\begin{align}\n\\Pi^{\\mu\\nu\\rho}_{\\rm hd}(p,q)=-\\frac{e^3}{240\\pi m^3}\n\\bigg\\{&\\eta^{\\mu\\nu}\\Big[ p^2(2q-p)^{\\rho}+q^2(q-2p)^{\\rho}+(p.q)(q-p)^{\\rho}\\Big]\\nonumber\\\\\n+&\\eta^{\\mu\\rho}\\Big[p^2(4p+2q)^{\\nu}+q^2(3p+q)^{\\nu}+(p.q)(4p+q)^{\\nu}\\Big]\\nonumber\\\\\n-& \\eta^{\\nu\\rho}\\Big[p^2(p+3q)^{\\mu}+q^2(2p+4q)^{\\mu}+(p.q)(p+4q)^{\\mu}\\Big]\\nonumber\\\\\n+&p^{\\mu}q^{\\rho}(q-p)^{\\nu}+p^{\\rho}q^{\\mu}(q-p)^{\\nu}-p^{\\mu}\np^{\\rho}(2p+q)^{\\nu}+q^{\\mu}q^{\\rho}(p+2q)^{\\nu}\\bigg\\}\\sin\\big(\\frac{p\\wedge q}{2}\\big).\n \\label{eq:c12}\n\\end{align}\nThis expression corresponds to the higher-derivative correction to the 3-photon vertex.\n\nIt is important to observe that in the commutative limit, the graphs (a) and (b) cancel each other, so that the induced 3-photon vertex is completely removed in the scalar QED.\nWe can understand this result from the charge conjugation invariance of the scalar QED in any space-time dimension, known as Furry's theorem, that forbids the presence of an odd number of photon lines in the case of commutative theory.\nAnother important aspect from our analysis is the absence of the Chern-Simons self-coupling $\\epsilon_{\\mu\\nu\\lambda}A^{\\mu}\\star A^{\\nu}\\star A^{\\lambda}$ for the noncommutative scalar QED$_{3}$ effective action \\eqref{eq:c11}, which is only generated in the case of fermionic electrodynamics \\cite{Bufalo:2014ooa}.\n\n\n\\subsection{One-loop $\\left\\langle AA AA \\right\\rangle$ vertex}\n\nThe full contribution to the $\\left\\langle AA AA \\right\\rangle$ part is determined by considering three different types of diagrams that are depicted in Fig.~\\ref{oneloop3}. Since all of these graphs have 4 external bosonic legs, 24 different permutations for each graph must be considered in order to obtain the fully symmetrized contribution.\nHence, the full contribution can be formally written as\n\\begin{align}\n \\Gamma^{\\mu\\nu\\rho\\sigma}_{\\rm total}= \\Gamma^{\\mu\\nu\\rho\\sigma}_{(a)} +\n \\Gamma^{\\mu\\nu\\rho\\sigma}_{(b)} +\\Gamma^{\\mu\\nu\\rho\\sigma}_{(c)} =\\sum_{i=1}^{24}\\Gamma^{\\mu\\nu\\rho\\sigma}_{(a,i)}+\n \\sum_{i=1}^{24}\\Gamma^{\\mu\\nu\\rho\\sigma}_{(b,i)}+\n \\sum_{i=1}^{24}\\Gamma^{\\mu\\nu\\rho\\sigma}_{(c,i)}.\n \\label{eq:c17}\n\\end{align}\nWe shall present next the explicit discussion for the first contribution of each graph, whereas the remaining graphs are obtained by a direct permutation of momenta and spacetime indices.\n\\begin{figure}[t]\n\\vspace{-1.2cm}\n\\includegraphics[height=8\\baselineskip]{4-point.eps}\n \\centering\\caption{Relevant graphs for the induced $AAAA$-term.}\n\\label{oneloop3}\n\\end{figure}\n\nThe box diagram contribution represented in graph (a) has the following expression\n\\begin{align}\n\\Pi^{\\mu\\nu\\rho\\sigma}_{(a,1)}&=e^{4}\\int \\frac{d^{d}k}{(2\\pi)^{d}} \\frac{(p+2k)^{\\mu}(2p+q+2k)^{\\nu}(2p+2q+s+2k)^{\\rho}(p+q+s+2k)^{\\sigma}}{[(p+q+s+k)^{2} -m^{2}][(p+q+k)^{2}-m^{2}][(p+k)^{2}-m^{2}][k^{2}-m^{2}]}\ne^{\\frac{i}{2}p \\wedge q}e^{\\frac{i}{2}(p+q)\\wedge s},\n \\label{eq:c13}\n\\end{align}\nwhere we have labeled the momenta $(p,q,s,r)$ accordingly to the spacetime indices of the external legs $(\\mu,\\nu,\\rho,\\sigma)$.\nMoreover we have adopted the notation, in order to satisfy the energy-momentum conservation, where the momenta flow satisfies the relation $r = p+q+s$.\nThe remaining contributions from the other 23 box diagrams, coming from the S-matrix expansion, can easily be obtained from the equation \\eqref{eq:c13} by considering the respective permutation.\nNext, we have the contribution from the bubble diagram represented in (b), which is given by\n\\begin{align}\n\\Pi^{\\mu\\nu\\rho\\sigma}_{(b,1)} =e^{4} \\int \\frac{d^{d}k}{(2\\pi)^{d}} \\frac{\\eta^{\\mu\\nu}\\eta^{\\rho\\sigma}}{[(p+q+k)^{2}-m^{2}][k^{2}-m^{2}]}\\cos\\big(\\frac{p \\wedge q}{2}\\big)\\cos\\big(\\frac{s\\wedge (p+q)}{2}\\big).\n \\label{eq:c14}\n\\end{align}\nAt last, the triangle contribution shown in graph (c) is written as\n\\begin{align}\n\\Pi^{\\mu\\nu\\rho\\sigma}_{(c,1)} =-e^{4}\\int \\frac{d^{d}k}{(2\\pi)^{d}} \\frac{\\eta^{\\mu\\nu}(2p+2q+s+2k)^{\\rho}(p+q+s+2k)^{\\sigma}}{[(p+q+s+k)^{2}-m^{2}][(p+q+k)^{2}-m^{2}][k^{2}-m^{2}]}\\cos\\big( \\frac{p \\wedge q}{2}\\big) e^{\\frac{i}{2} (p+q) \\wedge s}.\n \\label{eq:c15}\n\\end{align}\nThe Feynman expressions of the graphs (a), (b) and (c) show that all of them are planar, making the evaluation of the momentum integration easier by dimensional regularization.\nHence the resulting expressions from the contributions \\eqref{eq:c13} to \\eqref{eq:c15}, evaluated in the highly noncommutative limit, where $p^2,q^2,s^2 \\ll m^{2}$, are written as follows\n\\begin{align}\n\\Gamma^{\\mu\\nu\\rho\\sigma}_{(a,1)}&=\\frac{1}{4}\\times \\frac{ie^{4}}{12\\pi m}\\Big(\\eta^{\\mu\\nu}\\eta^{\\rho\\sigma}+\\eta^{\\mu\\rho}\\eta^{\\nu\\sigma}+\\eta^{\\mu\\sigma}\\eta^{\\nu\\rho}\\Big)\n~e^{\\frac{i}{2}p\\wedge q}e^{\\frac{i}{2}r\\wedge s},\\nonumber\\\\\n\\Gamma^{\\mu\\nu\\rho\\sigma}_{(b,1)}&= \\frac{1}{2}\\times\\frac{ie^{4}}{8\\pi m}\\eta^{\\mu\\nu}\\eta^{\\rho\\sigma}\n\\cos\\big(\\frac{p\\wedge q}{2}\\big)\\cos\\big(\\frac{r\\wedge s}{2}\\big),\\nonumber\\\\\n\\Gamma^{\\mu\\nu\\rho\\sigma}_{(c,1)}&=1\\times \\frac{-ie^{4}}{8\\pi m} ~\\eta^{\\mu\\nu}\\eta^{\\rho\\sigma}\\cos\\big(\\frac{p\\wedge q}{2}\\big)\\cos\\big(\\frac{r\\wedge s}{2}\\big),\n \\label{eq:c16}\n\\end{align}\nwhere the coefficients $\\frac{1}{4}$, $\\frac{1}{2}$ and $1$ are the symmetry factors for the graphs (a), (b) and (c) of Fig.~\\ref{oneloop3}, respectively.\nWe then apply to the results \\eqref{eq:c16} all the 24 permutations, necessary to evaluate \\eqref{eq:c17}, yielding\n\\begin{align}\n\\Gamma^{\\mu\\nu\\rho\\sigma}_{(a)}&=\\frac{ie^{4}}{6\\pi m}\\Big(\\eta^{\\mu\\nu}\\eta^{\\rho\\sigma}+\\eta^{\\mu\\rho}\\eta^{\\nu\\sigma}+\\eta^{\\mu\\sigma}\\eta^{\\nu\\rho}\\Big)\n\\Big[\\cos\\big(12\\big)\\cos\\big(34\\big)+\\cos\\big(13\\big)\\cos\\big(24\\big)+\\cos\\big(14\\big)\\cos\\big(23\\big)\\Big],\n\\nonumber\\\\\n\\Gamma^{\\mu\\nu\\rho\\sigma}_{(b)}&=\\frac{ie^{4}}{2\\pi m}\n\\Big[\\eta^{\\mu\\nu}\\eta^{\\rho\\sigma}\\cos\\big(12\\big)\\cos\\big(34\\big)+\\eta^{\\mu\\rho}\n\\eta^{\\nu\\sigma}\\cos\\big(13\\big)\\cos\\big(24\\big)+\n\\eta^{\\mu\\sigma}\\eta^{\\nu\\rho}\\cos\\big(14\\big)\\cos\\big(23\\big)\\Big],\n\\nonumber\\\\\n\\Gamma^{\\mu\\nu\\rho\\sigma}_{(c)}&=- \\frac{ie^{4}}{\\pi m}\n\\Big[\\eta^{\\mu\\nu}\\eta^{\\rho\\sigma}\\cos\\big(12\\big)\\cos\\big(34\\big)+\\eta^{\\mu\\rho}\n\\eta^{\\nu\\sigma}\\cos\\big(13\\big)\\cos\\big(24\\big)+\n\\eta^{\\mu\\sigma}\\eta^{\\nu\\rho}\\cos\\big(14\\big)\\cos\\big(23\\big)\\Big],\n \\label{eq:c18}\n\\end{align}\nwhere we have introduced, by simplicity of the upcoming analysis, the following notation for the NC momenta product: $\\left(12 \\right) \\equiv \\left(\\frac{p\\wedge q}{2}\\right)$, $\\left(13 \\right) \\equiv \\left(\\frac{p\\wedge s}{2}\\right)$, $\\left(14 \\right) \\equiv \\left(\\frac{p\\wedge r}{2}\\right)$, $\\left(23 \\right) \\equiv \\left(\\frac{q\\wedge s}{2}\\right)$, $\\left(24 \\right) \\equiv \\left(\\frac{q\\wedge r}{2}\\right)$, and $ \\left(34\\right) \\equiv \\left(\\frac{s\\wedge r}{2}\\right)$.\nFinally, we substitute the results \\eqref{eq:c18} into the Eq.~\\eqref{eq:c17} to obtain the total one-loop contribution expression corresponding to the photon 4-point function\n\\begin{align}\n\\Gamma^{\\mu\\nu\\rho\\sigma}_{\\rm total}=\\frac{ie^{4}}{\\pi m}\\Bigg\\{\n&\\frac{1}{6}\\Big(\\eta^{\\mu\\nu}\\eta^{\\rho\\sigma}+\\eta^{\\mu\\rho}\\eta^{\\nu\\sigma}+\\eta^{\\mu\\sigma}\\eta^{\\nu\\rho}\\Big) \\Big[\\cos(12)\\cos(34)+\\cos(14)\\cos(23)+\\cos(13)\\cos(24)\\Big]\\nonumber\\\\\n-&\\frac{1}{2} \\Big[\\eta^{\\mu\\nu}\\eta^{\\rho\\sigma}\\cos(12)\n\\cos(34)+\\eta^{\\mu\\rho}\\eta^{\\nu\\sigma}\\cos(13)\\cos(24)+\\eta^{\\mu\\sigma}\\eta^{\\nu\\rho}\\cos(14)\\cos(23)\\Big]\\Bigg\\}.\n \\label{eq:c19}\n\\end{align}\nWe can verify whether the quartic vertex \\eqref{eq:c19} satisfy the Ward identity in scalar QED. First, we consider the commutative limit, i.e. $\\theta\\rightarrow 0$, so that the one-loop contribution \\eqref{eq:c19} is reduced to\n\\begin{equation}\n\\lim_{\\theta\\rightarrow 0}\\Gamma^{\\mu\\nu\\rho\\sigma}_{\\rm total}=\\frac{ie^{4}}{\\pi m}\n\\Big(\\eta^{\\mu\\nu}\\eta^{\\rho\\sigma}+\\eta^{\\mu\\rho}\\eta^{\\nu\\sigma}+\\eta^{\\mu\\sigma}\\eta^{\\nu\\rho}\\Big) \\Big(\\frac{1}{2}+\\frac{1}{2}-1\\Big)=0,\n \\label{eq:c20}\n\\end{equation}\nshowing that the photon quartic self-coupling in the order ${\\cal{O}}(m^{-1})$ is absent in the Abelian theory; however higher order contributions could be nonvanishing, corresponding to nonlinear Euler-Heisenberg-like terms.\nMoreover, in the case of the violation of the Ward identity, a nonvanishing result for the contribution \\eqref{eq:c20} would generate a four photon interaction term in the effective action of the type\n\\begin{align}\n\\lim_{\\theta\\rightarrow 0}{\\cal{S}}_{\\rm eff}[AAAA]\\sim\\int d^{3}x~\\Big(\\eta^{\\mu\\nu}\\eta^{\\rho\\sigma}+\\eta^{\\mu\\rho}\\eta^{\\nu\\sigma}+\\eta^{\\mu\\sigma}\\eta^{\\nu\\rho}\\Big)A_{\\mu}(x) A_{\\nu}(x) A_{\\rho}(x)A_{\\sigma}(x),\n \\label{eq:c21}\n\\end{align}\nthat is not explicitly gauge invariant. Hence, with the result \\eqref{eq:c20} we conclude that the gauge invariance is satisfied in our analysis of ${\\cal{O}}(m^{-1})$ terms at the one-loop approximation.\n\nOn the other hand, in the noncommutative case, as it is well known, we expect to find the relevant Feynman rule corresponding to the 4-photon interaction term at this order.\nTo accomplish that, we start working separately each one of the tensor terms present in the function $\\Gamma^{\\mu\\nu\\rho\\sigma}_{\\rm total}$ Eq.~\\eqref{eq:c19}.\nWe shall illustrate the analysis for the terms proportional to $\\eta^{\\mu\\nu}\\eta^{\\rho\\sigma}$, the remaining terms can be evaluated in the same fashion.\nHence, by picking the pieces that are proportional to $\\eta^{\\mu\\nu}\\eta^{\\rho\\sigma}$ in \\eqref{eq:c19}, we have that\n\\begin{equation}\n\\mathcal{I}^{\\mu\\nu,\\rho\\sigma}\\equiv\n\\frac{ie^{4}}{6\\pi m}\\eta^{\\mu\\nu}\\eta^{\\rho\\sigma}\\Big[-2\\cos(12)\\cos(34)+ \\cos(14)\\cos(23)+\\cos(13)\\cos(24)\\Big]. \\label{eq:c22}\n\\end{equation}\nThe major work here consist in simplifying the trigonometric part of this function by making use of the energy-momentum conservation $r = p+q+s$, which in the new notation is renamed as $4=1+2+3$, together with the manipulation of some trigonometric identities, e.g. $\\cos\\alpha\\cos\\beta =\\cos(\\alpha+\\beta)+\\sin\\alpha\\sin\\beta$.\nAfter some laborious but straightforward calculation, we arrive at the desired expression\n\\begin{equation}\n\\mathcal{I}^{\\mu\\nu,\\rho\\sigma}=\\frac{ie^{4}}{6\\pi m}\\eta^{\\mu\\nu}\\eta^{\\rho\\sigma}\\Big[\\sin(14)\\sin(23)+\\sin(13)\\sin(24)\\Big].\n \\label{eq:c24}\n\\end{equation}\nSimilarly, we can apply the same process in order to simplify the remaining terms, proportional to $\\eta^{\\mu\\rho}\\eta^{\\nu\\sigma}$ and $\\eta^{\\mu\\sigma}\\eta^{\\nu\\rho}$, so that it yields to\n\\begin{align}\n\\mathcal{I}^{\\mu\\rho,\\nu\\sigma}&=\\frac{ie^{4}}{6\\pi m}\\eta^{\\mu\\rho}\\eta^{\\nu\\sigma}\\Big[\\sin(12)\\sin(34)-\\sin(14)\\sin(23)\\Big],\n\\nonumber\\\\\n\\mathcal{I}^{\\mu\\sigma,\\nu\\rho}&=- \\frac{ie^{4}}{6\\pi m}\\eta^{\\mu\\sigma}\\eta^{\\nu\\rho}\\Big[\\sin(12)\\sin(34)+\\sin(13)\\sin(24)\\Big].\n \\label{eq:c25}\n\\end{align}\n\nHence, by considering the results from our manipulations, Eqs.~\\eqref{eq:c24} and \\eqref{eq:c25}, we can rewrite \\eqref{eq:c19} in a convenient form as the following\n\\begin{align}\n\\Gamma^{\\mu\\nu\\rho\\sigma}_{\\rm total}=\\frac{ie^{4}}{6\\pi m}\\bigg[&\\Big(\\eta^{\\mu\\nu}\\eta^{\\rho\\sigma}-\\eta^{\\mu\\sigma}\\eta^{\\nu\\rho}\\Big)\\sin\\big(\\frac{p\\wedge s}{2}\\big)\\sin\\big(\\frac{q\\wedge r}{2}\\big)\\nonumber\\\\\n+&\\Big(\\eta^{\\mu\\nu}\\eta^{\\rho\\sigma}-\\eta^{\\mu\\rho}\\eta^{\\nu\\sigma}\\Big)\\sin\\big(\\frac{p\\wedge r}{2}\\big)\\sin\\big(\\frac{q\\wedge s}{2}\\big)\\nonumber\\\\\n+&\\Big(\\eta^{\\mu\\rho}\\eta^{\\nu\\sigma}-\\eta^{\\mu\\sigma}\\eta^{\\nu\\rho}\\Big)\\sin\\big(\\frac{p\\wedge q}{2}\\big)\n\\sin\\big(\\frac{s\\wedge r}{2}\\big)\\bigg],\n \\label{eq:c27}\n\\end{align}\nwhere we have reintroduced the notation in terms of the external momenta $p,q,s,r$.\nAs we can observe, the expression inside the bracket corresponds exactly to the Feynamn vertex of the 4-photon interaction within the noncommutative $U_{\\star}(1)$ gauge theory.\n\nFinally, we can gather the leading ${\\cal{O}}(m^{-1})$ contributions from the one-loop order parts related to the two, three and four-point functions, Eqs.~\\eqref{eq:c3}, \\eqref{eq:c11} and \\eqref{eq:c27}, respectively, so that we can write the complete expression of the NC Maxwell action as\n\\begin{equation}\ni{\\cal{S}}_{\\rm eff}\\bigg|_{{\\cal{O}}(m^{-1})}=-\\frac{ie^{2}}{96\\pi m}\\int~d^{3}x~F_{\\mu\\nu}\\star F^{\\mu\\nu},\n\\label{eq:c28}\n\\end{equation}\nin which the field strength tensor in the NC framework is defined as $F_{\\mu\\nu}=\\partial_{\\mu}A_{\\nu}-\\partial_{\\nu}A_{\\mu}+ie[A_{\\mu},A_{\\nu}]_{\\star}$.\nAs we have previously discussed, this action is manifestly $U_{\\star}(1)$ gauge invariant under the transformation $U=e^{ie\\lambda}_{\\star}$, where the field strength has the following transformation law $F_{\\mu\\nu}\\rightarrow U\\star F_{\\mu\\nu}\\star U^{-1}$.\n\nRegarding the higher-derivative corrections to the 4-photon vertex \\eqref{eq:c27}, corresponding to the next to leading order ${\\cal{O}}(m^{-3})$ terms, we arrive at a result involving a long expression which can be found in the Appendix \\ref{sec-appA}.\nThis ${\\cal{O}}(m^{-3})$ result can be seen as the 3D version of the Euler-Heisenberg Lagrangian.\nWe notice that in the commutative limit, the gauge invariant field strength is defined as $f_{\\mu\\nu}=\\partial_{\\mu}A_{\\nu}-\\partial_{\\nu}A_{\\mu}$, so that the commutative version of the effective action \\eqref{eq:c28} only receives contribution from the one-loop $\\langle AA\\rangle$ part, the remaining contributions are vanishing.\nThus, the commutative one-loop effective action in the presence of the higher-derivative term, at the next to leading order, is described as\n \\begin{equation}\n \\lim\\limits_{\\theta\\rightarrow 0}i{\\cal{S}}_{\\rm eff}\\bigg|_{{\\cal{O}}(m^{-3})}=\n -\\frac{ie^{2}}{96\\pi m}\\int d^{3}x~f_{\\mu\\nu}f^{\\mu\\nu}+\\frac{ie^{2}}{1920\\pi m^{3}}\\int d^{3}x~\nf_{\\mu\\nu}\\Box f^{\\mu\\nu}\n\\end{equation}\n\nSome comments about the result \\eqref{eq:c28} are now in place.\nRegarding discrete symmetries, following the aforementioned discussion in Sec. \\ref{sec2.1}, it is easy to show that the above one-loop effective action is also invariant under all of the discrete symmetries and therefore we have not faced any anomalous symmetry at this order.\n\nSince the effective action \\eqref{eq:c28}, arising from the 2, 3 and 4-point functions at the order ${\\cal{O}}(m^{-1})$, is exactly gauge invariant, it is possible to conclude that no further ${\\cal{O}}(m^{-1})$ terms are generated from higher-order graphs with $n>4$ external photon legs.\nAccording to this reasoning, we can also discuss the gauge invariance of the higher-derivative terms generated by considering the next to leading order ${\\cal{O}}(m^{-3})$ of our expansion.\nActually, it is possible to make use of a dimensional analysis, based on arguments of gauge invariance, to establish the perturbative generation of all possible gauge invariant higher-derivative terms in the one-loop effective action \\cite{Bufalo:2014ooa}.\nAs an example, if we consider all of the ${\\cal{O}}(m^{-3})$ contributions up to the diagrams with $n=6$ external photon legs, we can generate the following effective higher-derivative Lagrangian\n\\begin{equation}\n\\mathcal{L}_{\\rm hd} = \\frac{1}{6\\mu^2} \\nabla _\\mu F^{\\mu \\nu }\\star \\nabla^\\lambda F_{\\lambda \\nu }\n+\\frac{1}{6\\mu^2} \\nabla _\\lambda F^{\\mu \\nu }\\star \\nabla^\\lambda F_{\\mu \\nu }\n- \\frac{e}{18\\mu^2} F^{\\mu \\nu }\\star F_{\\nu \\lambda}\\star F^{\\lambda } _{\\;\\;\\; \\mu},\n\\end{equation}\nwhere $\\nabla _\\mu = \\partial_\\mu +i e \\left[A_\\mu, \\,\\right]_{\\star} $ is the covariant derivative in the adjoint representation and $\\mu \\sim m$ is the mass scale of the theory.\nThis expression can been seen as a noncommutative extension of the Alekseev-Arbuzov-Baikov effective Lagrangian \\cite{Quevillon:2018mfl,Alekseev:1981fu}.\n\nOne last comment about the photon effective action is in regard of some of the nonlinear contributions.\nIt is well known that either fermionic or scalar electrodynamics generate nonlinear corrections of quantum character to the photon dynamics \\cite{Quevillon:2018mfl}.\nIn the case of a $(2+1)$ spacetime the effective Euler-Heisenberg Lagrangian density has the appearance of fractional powers of the field strength \\cite{Redlich:1983dv}\n\\begin{equation}\n\\mathcal{L}_{\\rm EH} \\sim \\left( e \\sqrt{B^2-E^2} \\right)^{\\frac{3}{2}}.\n\\end{equation}\nHence, it is reasonable to expect that the coordinates noncommutativity would also present corrections to this nonlinear coupling term.\n\n \\section{Comparison with NC-QED$_{3}$}\n\\label{sec5}\n\nIn this section, we shall present a comparative discussion of the 2,3 and 4-point functions in the case of fermionic and bosonic matter fields coupled to the photon.\nIt is notable that the presence of the trace of $\\gamma$ matrices in fermionic QED$_{3}$ leads to two sectors characterized as: odd and even in regard to parity symmetry.\nThe former is related to the induced Chern-Simons (CS) terms, appearing with odd powers of the fermion mass $m_e$, while the latter sector contributes to the induced Maxwell (M) terms, with even powers of $m_e$.\nNow in the scalar framework, odd parity terms are absent, and only parity preserving terms are present in the induced effective action, which can be understood as the main difference between these two matter fields.\nThese results can be briefly described in terms of a mass expansion as the following:\n\n\\begin{center}\n\\begin{tabular}{|c|c|c|c|c|c|c|}\n\\hline\n{\\color{blue}Order} & {\\color{blue}Induced action} & {\\color{blue}NC-QED$_{3}$}& {\\color{blue}NC-scalar QED$_{3}$} \\\\\n\\hline\n${\\cal{O}}(m^{0})$ & ordinary~NC-CS & $\\checkmark$ & $\\times$ \\\\\n\\hline\n~${\\cal{O}}(m^{-1})$ & ordinary~NC-M~ & $\\checkmark$ & $\\checkmark$ \\\\\n\\hline\n~${\\cal{O}}(m^{-2})$& higher-derivative~NC-CS & $\\checkmark$ & $\\times$ \\\\\n\\hline\n~${\\cal{O}}(m^{-3})$& higher-derivative~NC-M~ & $\\checkmark$ & $\\checkmark$\\\\\n\\hline\n\\vdots& \\vdots& \\vdots& \\vdots\\\\\n\\hline\n~~${\\cal{O}}(m^{-2\\ell})$& higher-derivative~NC-CS & $\\checkmark$ & $\\times$\\\\\n\\hline\n~~~~~${\\cal{O}}(m^{-2\\ell-1})$& higher-derivative~NC-M~ & $\\checkmark$ & $\\checkmark$\\\\\n\\hline\n\\end{tabular}\n\\end{center}\nHere some important comments are in order.\nIn NC-QED$_{3}$, the structure of the kinetic part, coming from the $n=2$ photon external legs analysis, has the contribution of two types of terms:\na CS-type parity violating term $e^{2}A \\partial\\Box^{\\ell} A$, at the order ${\\cal{O}}(m^{-2\\ell})$, and a M-type parity preserving term $e^{2}A\\partial\\partial \\Box^{\\ell} A$, at the order ${\\cal{O}}(m^{-2\\ell-1})$.\nWe can observe that the mass dimension of the CS and M-type terms is given by $3+2\\ell$ and $4+2\\ell$, respectively.\nThus, we can conclude that in order to have a gauge invariant CS-type action at the order ${\\cal{O}}(m^{-2\\ell})$, it is necessary to consider all contributions originating from the graphs with $n=2,3,\\ldots, 3+2\\ell$ photon legs.\nOn the other hand, to obtain a gauge invariant M-type action at the order ${\\cal{O}}(m^{-2\\ell-1})$, it is necessary to consider all contributions arising from the relevant graphs with $n=2,3,\\ldots, 4+2\\ell$ photon legs.\n\n\nFurthermore, in $(2+1)$ dimensions, the number of degrees of freedom of the charged boson and Dirac fermion (in the 2 dimensional representation) is equal and hence it is easy to see that the numerical coefficient appearing in the 2-point function \\eqref{eq:c7} would be the same as in the fermionic QED$_{3}$.\nNow for the $n=3$ graphs, in the case of NC-QED$_{3}$, there are only the contribution of two triangle graphs in the one-loop order.\nThese contributions are the same as in the NC-scalar QED$_{3}$ because the additional graph is identically zero.\nThus, it is easy to realize that the final result in the parity preserving sector for both cases is the same \\cite{Bufalo:2014ooa}.\nThe last type of diagrams is for $n=4$ legs, that for the fermionic case we have the contribution of the box diagram only, i.e. type (a).\nThe expression for this diagram at the leading order of ${\\cal{O}}(m^{-1})$ is given by\n\\begin{equation}\n\\Gamma^{\\mu\\nu\\rho\\sigma}_{(a,1)}\\bigg|_{\\tiny\\mbox{NC-QED}}=-\\frac{ie^{4}}{3\\pi m}\\Big(\\eta^{\\mu\\sigma}\\eta^{\\nu\\rho}-2\\eta^{\\mu\\rho}\\eta^{\\nu\\sigma}+ \\eta^{\\mu\\nu}\\eta^{\\rho\\sigma}\\Big)e^{\\frac{i}{2}p\\wedge q}e^{\\frac{i}{2}r\\wedge s}.\n\\end{equation}\nBy considering all of the 24 permutations and some manipulations we obtain the following\n\\begin{align}\n\\Gamma^{\\mu\\nu\\rho\\sigma}_{\\rm total}\\bigg|_{\\tiny\\mbox{NC-QED}}=\\frac{4ie^4}{3\\pi m}\\bigg[ \\Big(&\\eta^{\\mu\\nu}\\eta^{\\rho\\sigma}-\\eta^{\\mu\\rho}\\eta^{\\nu\\sigma}\\Big)\\sin{\\big(\\frac{p\\wedge r}{2}\\big)}\\sin{\\big(\\frac{q\\wedge s}{2}\\Big)}\\nonumber\\\\\n+\\Big(&\\eta^{\\mu\\nu}\\eta^{\\rho\\sigma}-\\eta^{\\mu\\sigma}\\eta^{\\nu\\rho}\\Big)\\sin{\\big(\\frac{q\\wedge r}{2}\\big)}\\sin{\\big(\\frac{p\\wedge s}{2}\\big)}\\nonumber\\\\\n+\\Big(&\\eta^{\\mu\\rho}\\eta^{\\nu\\sigma}-\\eta^{\\mu\\sigma}\\eta^{\\nu\\rho}\\Big)\\sin{\\big(\\frac{p\\wedge q}{2}\\big)}\\sin{\\big(\\frac{s\\wedge r}{2}\\big)}\\bigg],\n\\end{align}\nwhich has the same tensor and momenta structure as the standard 4-photon vertex \\eqref{eq:c27}, but with a different numerical coefficient.\nIn this case, we can conclude that the commutative limit of this function is also satisfied, and have a vanishing result as we would expect.\n\\section{Final remarks}\n\\label{conc}\n\nIn this paper we have considered the perturbative evaluation of the effective action for photon in the context of scalar QED in the $(2+1)$ noncommutative spacetime.\nOur main interest was to determine to what extent the spin of the matter fields can change the effective action in the presence of the spacetime noncommutativity.\nSince the number of degrees of freedom of the charged boson and Dirac fermion (in the 2 dimensional representation) is equal, the main difference between these fields is solely to the well known presence of different couplings in the case of scalar QED, implying in new types of graphs.\nAn important drawback from the scalar QED in terms of the induced effective action for the photon is the absence of parity violating terms, showing that no Chern-Simons terms are generated when charged scalar fields are considered.\n\nThe perturbative analysis followed the computation of the $\\left\\langle AA \\right\\rangle$, $\\left\\langle AA A \\right\\rangle$ and $\\left\\langle AA AA \\right\\rangle$ vertex functions.\nA more detailed and careful analysis was necessary to the computation of the 4 point vertex, where the process of symmetrization is rather intricate.\nThe evaluation of the noncommutative Maxwell action $\\int F_{\\mu\\nu}\\star F^{\\mu\\nu} $ was done by considering the highly noncommutative limit of these $1PI$ functions at order ${\\cal{O}}(m^{-1})$.\n\nIn addition, we have considered the generation of ${\\cal{O}}(m^{-3})$ terms, which are higher-derivative terms for the photon fields, and can be seen as the noncommutative generalization of the phenomenological Alekseev-Arbuzov-Baikov effective Lagrangian.\nAnother possible terms to be present in the gauge invariant photon's effective action are those nonlinear couplings, e.g. analogous to the Euler-Heisenberg action, thus within our study of NC-scalar QED, we would find noncommutative corrections to the fractional powers of the field strength that appear in the $(2+1)$ dimensional Euler-Heisenberg action.\n\n \\subsection*{Acknowledgements}\n\n We are grateful to M.M. Sheikh-Jabbari for fruitful discussions and comments on the manuscript. R.B. acknowledges partial support from Conselho Nacional de Desenvolvimento Cient\\'ifico e Tecnol\\'ogico (CNPq Projects No. 304241\/2016-4 and 421886\/2018-8 ) and Funda\\c{c}\\~{a}o de Amparo \\`a Pesquisa do Estado de Minas Gerais (FAPEMIG Project No. APQ-01142-17).\n\n\n","meta":{"redpajama_set_name":"RedPajamaArXiv"}} +{"text":"\\section{Introduction}\n\nAn important part in the design of non-player characters (NPCs) in video-games has to do \nwith the artificial intelligence (AI) of the characters in terms of their actions in the \ngame. This amounts to handling a variety of problems that also involve low-level aspects \nof the game, including for example pathfinding, detection of conditions, execution \nmonitoring for the actions of the characters, and many more. \n\nWhile many of these aspects have been studied extensively separately, for instance \npathfinding has been traditionally a very active research topic with significant impact on \nthe video-game industry, others such as execution monitoring are typically treated in per \ncase basis as part of the implementation of the underlying game engine or the particular\ncharacter in question. As NPCs become more of real autonomous entities in the game, \nhandling such components in a more principled way becomes very important. This is relevant\nboth from the designers and developers point of view that benefit from an architecture \nthat is easier to maintain and reuse, but also from the point of view of the more refined \ninteractions with the game-world that NPCs can achieve.\n\nIn this paper we propose an architecture for specifying the interaction of NPCs in the \ngame-world in a way that abstracts common tasks in four main conceptual components, \nnamely \\emph{perception, deliberation, control, action}. The architecture is inspired by \nAI research on autonomous agents and robots, in particular the notion of \\emph{high-level\ncontrol} for \\emph{cognitive robotics} as it is used in the context of deliberative\nagents and robots such as \\cite{levesque98highlevel,Shanahan01Highlevel}. \nThe motivation is that by adopting a clear role for each component and specifying a simple \nand clean interface between them, we can have several benefits as we discuss next. \n\nFirst, as there are many techniques for specifying how an NPC decides on the next action \nto pursue in the game world, an architecture that abstracts this part in an appropriate \nway could allow to easily switch between approaches. For example, it could facilitate \nexperimentation with a finite-state machine \\cite{Rabin02FSM}, a behavior tree\n\\cite{Isla05BehaviorTrees} or a goal-oriented action planning approach \\cite{orkin06fear} \nfor deciding on NPC actions, in a way that keeps all other parts of the architecture \nagnostic to the actual method for deliberation.\n\nSecond, this can provide the ground for a thorough investigation among the different ways\nof combining the available methodologies for different components, possibly leading \nto novel ways of using existing approaches. Also, this clear-cut separation of roles can \nencourage the development of modules that encapsulate existing approaches that have not \nbeen abstracted out of their application setting before, increasing re-usability of \ncomponents.\n\nWe also believe that this type of organization is a necessary prerequisite for enabling \nmore advanced behaviors that rely on each NPC holding a \\emph{personalized view} of the \ngame-world that is separated from the current (updated and completely specified) state \nof affairs. In particular, we argue that it is important for believable NPCs to adopt a \nhigh-level view of relevant aspects of the game-world including the topology and \nconnectivity of available areas in the world. In such cases then, when the deliberation \nis more tightly connected with low-level perception and action, we believe that a \nwell-principled AI architecture becomes important for maintaining and debugging the \ndevelopment process.\n\nFor example, typically the game engine includes a pathfinding module that is used by all\nNPCs in order to find their way in the game world. But what happens when one NPC knows \nthat one path to the target destination is blocked while another NPC does not possess this\ninformation? The approach of handling all requests with a single pathfinding module cannot \nhandle this differentiation unless the pathfinder takes into account the personalized \nknowledge of each NPC. This type of mixing perception, deliberation, and action can\nbe handled in the low-level of pathfinding using various straightforward tricks, but \nmaking a separation of the high-level knowledge for each NPC and the low-level game-world\nstate can be very useful.\n\nAdopting this separation, each NPC may keep a personalized high-level view of the \ngame-world in terms of available areas or zones in the game and their connectivity, and\nuse the low-level pathfinding module as a service only for the purpose of finding paths \nbetween areas that are \\emph{known to the NPC} to be connected or points in the same area. \nA simple coarse-grained break-down of the game-world in large areas can ensure that the \ndeliberation needed in the high-level is very simple and does not require effort that is\nat all similar to the low-level pathfinding. Alternatively, a more sophisticated approach\nwould be to model this representation based on the actual one used by a hierarchical \npathfinding approach such as \\cite{Botea04HPAstar}, so that the high-level personalized \ndeliberation is also facilitated by the pathfinding module but using the NPCs version of\nthe higher level of the map.\n\nThe rest of the paper is organized as follows. We continue with the \ndescription of our proposed \\emph{CogBot} architecture. We then introduce a motivating \nexample that shows the need for personalized knowledge of the game-world for NPCs, and\nreport on an implementation of CogBots in the popular game engine of \nUnity.\\footnote{\\url{www.unity3d.com}} \nThen we continue with a discussion on the \nstate-of-the-art for approaches that deal with AI for NPCs wrt to actions in the \ngame-world, and finally, we conclude with our view on what are \ninteresting future directions to investigate. \n\n\\section{The CogBot NPC AI architecture}\n\nThe proposed architecture formalizes the behavior of NPCs as far as their actions in the \ngame-world is concerned, in terms of four basic components as follows. \n\n\\medskip\n\\centerline{\\includegraphics[width=0.95\\linewidth]{img\/GeneralArchitecture.png}}\n\\smallskip\n\n\\begin{itemize}\n\\item The \\emph{perception} component (\\emph{CogBotPerception}) is responsible for \nidentifying objects and features \nof the game-world in the field of view of the NPC, including conditions or events that \noccur, which can be useful for the deliberation component. \n\\item The \\emph{deliberation} component (\\emph{CogBotDeliberation}) is responsible for \ndeciding the immediate action that should be performed by the NPC by taking into account\nthe input from the perception component as well as internal representations. This component \nmay be used to abstract the logic or strategy that the NPC should follow which could be \nfor instance expressed in terms of reactive or proactive behavior following any of \nthe existing approaches.\n\\item The \\emph{control} component (\\emph{CogBotControl}) is responsible for going \nover a loop that passes information between the perception and deliberation components,\nand handling the execution of actions as they are decided. In particular, the controller is \nagnostic of the way that perception, deliberation and action is implemented, but is responsible\nfor coordinating the information between the components while handling exceptions, monitoring \nconditions and actions, and allocating resources to the deliberator accordingly.\n\\item The \\emph{action} component (\\emph{CogBotAction}) is responsible for realizing the \nconceptual actions that are decided by the deliberator in the game-world and provide \ninformation about the state of action execution, e.g., success or failure.\n\\end{itemize}\n\nEssentially, the control component acts as a mediator that distributes information between\nthe other components. Note that more than one instance of each component may be used in an\nNPC architecture. This particular specification of components should be seen as a means for\nstructuring the number of various processes that need to operate and coordinate so that an \nNPC can perform challenging tasks in a game-world environment. One may think of cases where\na single controller is used as a hub that manages many perception, deliberation, and action\ncomponents, or other cases where networks of one instance of each these four components are\nused to mange different aspects of the NPC behavior.\n\n\n\\subsection{Perception}\n\nThe perception component is the main information source for the NPC control component. In \nthe typical case it is attached to a mesh object surrounding the NPC and it provides instant\ninformation about all the game objects that lie in the area of the mesh object, e.g., a \nsight cone positioned on the head of the NPC. Also, the perception component may be \nmonitoring the field of view for conditions or events which are also propagated to the\ncontrol component.\n\nThe communication with the control component is asynchronous as the perception component\npushes information to the control component by calling appropriate callback functions as\nfollows. \n\n\\begin{itemize}\n\\item An ``Object Entering FoV'' and ``Object Leaving FoV'' callback function is \ncalled when an object enters or leaves the field of view of the NPC.\n\\item A ``Notify Object Status'' is called when the internal state of an object in the \nfield of view is changed. \n\\item A ``Notify Event'' callback function is called whenever an implemented monitoring\ncondition check is triggered.\n\\end{itemize}\n\n\\medskip\n\\centerline{\\includegraphics[width=.95\\linewidth]{img\/PerceptionControl.png}}\n\\medskip\n\nMoreover, a the perception component provides a filtering mechanism based on the type of\nobjects and conditions so that only the ones for which the NPC registers for will be reported \nand others will be ignored. In general an NPC may have more than one instance of a perception \ncomponent, each of which may have a different range and can be used to track different \nobject types. A simple example is an NPC having one perception mesh for sight and one \nfor hearing, which are both set up to communicate with the same control component.\n\nFinally, note that conditions that may be triggered in the environment are propagated as\nnotification of events. This type of information is also used in other parts of the \ncommunication between components. This is adopted as a means to provide a simple uniform\nmechanism for communication between components.\n\n\\subsection{Deliberation}\n\nThe deliberation component is the bridge between the low-level space of perception and\naction in the game-world and the high-level space of conceptual representation of the\nstate of affairs as far as the NPC is concerned. The deliberation component exposes an\ninterface for the control component to asynchronously invoke communication as follows. \n\\begin{itemize}\n\\item A ``Get Next Action'' function abstracts the decision by the deliberation component\nwith respect to the next immediate action to be performed by the NPC.\n\\item A ``Notify Object'' function notifies the deliberation component about relevant \nobjects that become visible or have changed their state.\n\\item A ``Notify Event'' function notifies the deliberation component about relevant \nconditions received by the perception component that may affect the internal \nrepresentation of the state or knowledge of the NPC.\n\\end{itemize}\n\n\\medskip\n\\centerline{\\includegraphics[width=0.95\\linewidth]{img\/DeliberatorControl.png}}\n\\medskip\n\nThe deliberation component is responsible for modeling the decision making of the \nNPC with respect to action executing in the game-world, using the information that\nis provided by the control component and other internal representations that are\nappropriate for each approach or specific implementation.\n\nIn particular, one useful view is to think of the deliberation component as maintaining\nan internal model of the game-world that is initiated and updated by the low-level input \ncoming from the perception component, and using this model along with other models of \naction-based behavior in order to specify the course of action of the NPC. The actual\nimplementation or method for the model of the game-world and the model of desired \nbehavior is not constrained in any way other than the type of input that is provided \nand the type of action descriptions that can be passed to the action component.\n\nUnder this abstraction an NPC may for example just keep track of \nsimple conditions in the game-world and a representation of its internal state in\nterms of health and inventory, and use a finite-state machine approach to specify\nthe immediate next action to be performed at any time. Similarly, but following a\ntotally different methodology, an NPC may keep track of a propositional logic\nliteral-based model of the current state of the game-world, and use a automated planning\ndecision making process for deciding on the next immediate action to be performed as\npart of a longer plan that achieves a desired goal for the NPC.\n\nObserve that in the general case this level of abstraction allows the decision making of\nthe NPC to possess information that is different that the true state of affairs in the \ngame-world. This may be either because some change happened for which the NPC was not\ninformed by the perception component, for example because the NPC was simply not able\nto perceive this information, or even because the perception component itself is \nimplemented in such way as to provide filtered or altered information, serving some \naspect of the game design and game-play.\n\n\n\\subsection{Control}\n\nAs we mentioned earlier, the control component acts as a mediator that distributes \ninformation between the other components, including notifications about the state of \nobjects, notifications about conditions in the game-world, as well as feedback about \naction execution. In order to do so it propagates a callback invocation from one \ncomponent to the other (as for example in the case of the perception and deliberation \ncomponent). The way in which this is performed depends on the particular\ncase and implementation choices. For example different types of information may be \ndelivered to different instances of the same component as we discussed earlier in \nthis section.\n\nAlso, the controller component goes over a loop that handles action execution. In its\nmost simple form this could be just repeatedly calling in sequence the corresponding\nfunction of the deliberation component that informs about the next action to be\nperformed, and then pass on this information to the action component so that the\naction is actually executed in the game-world. The architecture does not limit or \nprescribe the way that this loop should be implemented and indeed should be done in\na variable way depending on the characteristics of the game. Nonetheless, the intention\nis that under this abstraction the control component can encourage more principled \napproaches for action execution monitoring, handling exceptions, and reviving from \nerrors.\n\n\n\\subsection{Action}\n\nThe action component abstracts the actions of the NPC in the game-world, allowing the \nrest of the architecture to work at a symbolic level and the other components be\nbe agnostic as per the implementation details for each action. Note that the architecture\nview we adopt does not prescribe the level of detail that these actions should be \nabstracted to. For some cases an action could be an atomic low-level task in the game-world\nas for example the task of turning the face of the NPC toward some target, while at other\ncases a more high-level view would be appropriate, essentially structuring NPC action \nbehavior in terms of strategies or macro-actions. In the latter case, the action component\nmay be used for example to connect a conceptual high-level view of low-level \nimplementations of behaviors as it would be typically done when a finite-state machine\nis used for reactive behavior.\n\n\nIn terms of the communication of the action component with the control component, again\na very simple interface is adopted for asynchronous interaction as follows.\n\\begin{itemize}\n\\item An ``Invoke Action'' function abstracts the action execution from the point of view\nof the architecture, initiating an implemented internal function that operates in the \ngame-world.\n\\item A ``Notify Event'' callback function is called to inform the control component about\ninformation related to action execution, such as that the action has finished with success\nor that some error occurred, etc.\n\\end{itemize}\n \n\\medskip\n\\centerline{\\includegraphics[width=0.95\\linewidth]{img\/ActionControl.png}}\n\\medskip\n\nAs in the deliberation component an internal representation is assumed to model the\npersonalized view of the game-world for the NPC, in the action component a similar \nconceptual representation needs to be utilized in order to capture the available actions\nand their characteristics. As in this case the representation can be more straightforward,\nwe also assume the following simple schema for registering actions in the architecture.\nAn new action can be registered by means of calling an internal ``Register Action'' \nfunction which requires i) a string representing the action name (for instance move-to, \npick-up, etc, and ii) a reference to a function that implements the action. An appropriate\naccount for additional parameters for actions is needed but this is an implementation \ndetail.\n\n\nWe now proceed do discuss a concrete scenario that shows how the CogBot architecture and an\nappropriate separation between the low-level state of affairs in the game-world and a personalized\nconceptual view of the game-world can enable novel behaviors for NPCs.\n \n\n\\section{A motivating example}\n\nAs a motivating running example we will consider a simple case of a room-based \ngame-world in which the human player and some NPCs can move between rooms, pickup and \ndrop objects, and use some of them to block pathways or set traps. Suppose also that the \ngoal of the game is to eventually get hold of a special item and deliver it at the a \ndesignated spot. \n\nNow consider the scenario according to which the player decides to block a passage that \nworks as a shortcut to some room, by putting some obstacle in the way after he passes \nthrough. This means that the characters will have to go round using a different route in\norder to get close to the human player. This is an important piece of information that\nactually should affect greatly how the NPCs will decide to move in the game-world. \n\nFor example, at first, no NPC knows that the passage is blocked so perhaps an NPC that \nwants to go to the room in question will have to go through the normal (shortest) route \nthat goes through the shortcut, see that it is blocked, and then go round using the \nalternative route. From then on and until the NPC sees or assumes that the passage is \ncleared, this is what the NPC would be expected to do in order to act in a believable way, \nand this line of reasoning should be adopted for each one of the NPCs separately.\n\nHow would this behavior be realized in a game though? This simple scenario suggests that\nthe pathfinding module of the game-engine should somehow keep track of which obstacles \neach NPC is aware and return a different \\emph{personalized path} for each one that is \nconsistent with their knowledge. To see why simpler ways to handle this would hurt the \nbelievability of NPCs consider that the pathfinding module follows an NPC-agnostic \napproach for finding a route such that i) does not take into account object obstacles \nand ii) does take into account object obstacles. In both cases, NPCs are assumed to \nreplan if the planned route turns out to be unrealizable.\n\nIt is easy to see that both approaches are problematic. In the first case, an NPC may\ntry to go through the shortcut more than once, in a way that exposes that they has no\nway of remembering that the shortcut is blocked. In the second case, an NPC that did \nnot first try to use the shortcut will nonetheless immediately choose to follow the \nalternative route even though they did not observe that the shortcut is blocked, probably\nruining the player's plan to slow down other NPCs. \n\nEssentially, in order to maintain \nthe believability of NPCs, each one should be performing pathfinding based on the \ninformation they possess which needs to be updated accordingly from their observations.\nNote how this account of knowledge of topology sets the ground for other more advanced\nfeatures for NPCs as for example the capability of exchanging information in the sense\nthat if a player sees that NPCs gathered together and talked his little trick is no\nlonger able to slow down other NPCs any more.\n\nWe now continue to discuss an application of the CogBot architecture in an implemented\nversion of this scenario, which is able to handle the intended behavior for NPCs \nmaking use of an appropriate separation of the actual state of the game-world and\nthe personalized view of the NPCs. \n\n\\section{CogBots in GridWorld}\n\n\\emph{GridWorld} is a grid-based environment developed in the Unity game engine modeled after the \nmotivating example we introduced in the previous section. It was specifically designed to be used\nfor performing automated tests with respect to NPC action-based behavior, therefore all of the\ncomponents of the game-world are procedurally generated from an input text file that specifies\nthe topology as well as the available objects and their state. For example we can design a map \nconsisting of rooms interconnected through doors and use it to observe the behavior of one (or \nmore) NPCs navigating in the environment while the user opens or closes the doors. In particular\nwe will experiment with a prototype implementation of our proposed architecture.\n\n\n\n\\subsection{GridWorld}\n\nThe main component of GridWorld is the \\emph{map} generated from an ASCII file that is taken as\ninput. Each element in the grid including wall sections, floor tiles, and doors, is a low-level\ngame-object of Unity with a component containing some basic information about the object such as:\na flag that indicates whether the object is static or not and its type. Non-static objects, that \nis, objects that may be in more than one states, have an additional component for handle the\ninternal state representation and the way it changes by means of interactions in the game-world.\n\nA simple A* heuristic search path-finding procedure is implemented based on the grid representation \nin order to provide a low-level navigation system. Moreover, in the initialization phase a processing \nof the map takes place that decomposes the map into interconnected areas using the standard method of \nconnected-component labeling \\cite{Dillencourt92Component} from the area of image processing. The \nresulting high-level topology is represented as:\n\\begin{itemize} \n\\item A list of \\emph{areas}. An area is a fully connected set of tiles in which the movement from \nany tile to any tile is guaranteed to succeed.\n\\item A list of \\emph{way-points} between areas. In our case these way-points are explicitly\nrepresented by \\emph{doors}. Each door connects two adjacent areas and has an internal state that\ncan be open or close.\n\\item A list of \\emph{points of interest} that can be used to model the tiles in the map that are\npotential target destinations for the NPC with respect to the scenario in question.\n\\end{itemize}\n\nThis type of information will be maintained by our prototype CogBot NPC, which as we will see \nshortly, combined with the low-level pathfinding procedure can address the challenges raised by\nthe motivating example we introduced earlier.\nThe map data ground truth is stored in a global object in the root of the game scene graph. This \nobject can be accessed by any other object in the game to ask for world information such as the\nsize of the map, the object type in some $(i,j)$ position, etc.\n\n\n\\subsection{CogBots}\n\nA prototype NPC in GridWorld is implemented following the CogBot architecture described in\nthe previous section. The CogBot NPC consists of a standard game character object with a\nmesh, colliders, and animations. In addition to these the NPC has the following components:\n\n\\begin{itemize}\n\\item A \\emph{conic collider} representing the field of view of the NPC. This collider is attached \nto the main body of the NPC positioned in such way as to simulate its sight cone.\n\\item A \\emph{CogBotPerception} component attached to the conic collider. The perception component\nis implemented so as to pass information about all visible objects in the field of view of the NPC.\nIn this example, no conditions are raised by means of events by the perception component.\n\\item A \\emph{CogBotController} component that simply acts as a bridge for communication between\nperception, deliberation, and action.\n\\item A \\emph{PlayerAction} component. This component is a collection of actions of the human\nplayer\/spectator in GridWorld that instruct the NPC to perform some activity. \nIn this simple example we only have actions from the PlayerAction component that invoke\nmoving actions for the NPC in order to reach a target destination tile.\n\\item A \\emph{CogBotAction} component that implements the moving actions of the NPC.\n\\item A \\emph{ManualDeliberator} component. This is an implementation\nof the CogBotDeliberator interface that provides the immediate action to be performed by the NPC\nbased on an internal representation and an model for activity that we will describe with an example\nnext.\n\\end{itemize}\n\n\\subsection{A simple example}\n\nConsider the following setting for the map of GridWorld.\\footnote{\nOur prototype implementation of the GridWorld test-bed and the CogBots architecture are \navailable at \\url{https:\/\/github.com\/THeK3nger\/gridworld} and\n\\url{https:\/\/github.com\/THeK3nger\/unity-cogbot}. The simple example reported here can \nbe found in the ``KBExample'' folder in the GridWorld repository.}\n\n\\medskip\n\\centerline{\\includegraphics[width=0.8\\linewidth]{img\/GridWorldShortcutMap.png}}\n\\medskip\n\nAfter the decomposition of the map we have three areas: area 1 where the NPC is located, area 2 that is\nsymmetrical to area 1 connected through a door, and area 3, a little room that intervenes between areas \n1 and 2 and connects to both with a door. In particular we call $D_{1,2}$ the door connect areas 1 and 2, and\n$D_{1,3}$, $D_{3,2}$ the doors that connect the little room depicted as area 3 with the other two areas.\n\nIn this example the human player\/observer can instruct the NPC to move to particular tiles by clicking on\nthem. Suppose for example that the player asks the NPC to go from the initial position in area 1 into area \n2 in a symmetrical position. The actual path to follow would be different depending on which doors are open\nallowing the NPC to go through. \n\nSimilarly, assuming an internal representation for the connectivity of \n areas, and a personalized internal representation of the state of the doors, the NPC could\n\\emph{deliberate in the level of areas} about the path to take. In other words, the NPC can first build a\ncoarse-grained high-level plan of the form $\\{$``move to area X'', ``move to area Y''$\\}$, and then can use\nthe low-level pathfinding procedure to generate paths for each part of the plan. Apart from achieving a\nhierarchical form of pathfinding that could be beneficial for various reasons, this approach actually \nhandles the type of believability property that we discussed in the motivating example.\n\nAt the beginning of the simulation the internal knowledge of the NPC assumes all doors to be closed.\nIn this situation instructing the NPC to move to area 2, the deliberation component returns no plan as \naccording to the NPC's knowledge it is impossible to go there as all doors are closed.\nIf we open the doors between 1 and 2 by clicking on them, the deliberation component is still unable to\nfind a plan because the NPC was not able to get this information through the perception component and its\nfield of view. Even though the pathfinding procedure would return a valid path, this is irrelevant for the\npersonalized view of the NPC.\n\nNow assume that we move the NPC close to the doors and the internal representation is updated to reflect\nthe real world state and take it back to the starting point. If we instruct the NPC to move to area 2, the \ndeliberation component produces the straightforward plan which is executed using the pathfinding procedure. \nSimilarly, if we open the door $D_{1,3}$, the deliberate component would still return the same plan, as in\norder to get the shortest path that goes through area 3 the NPC needs to see that the door is open. \n\n\n \n\n\\section{Challenges and related work}\n\nThere is a variety of work that aims for action-based AI for NPCs.\nTraditionally, a combination of scripts and finite state machine are used in interactive games for controlling NPCs. These methods, even if fairly limited, allow the game designer to control every aspect of the NPCs actions. This approach has been employed in different types of succesfull videogames such as the Role Playing Game (RPG) \\textit{Never Winter Nights} or the First Person Shooter (FPS) \\textit{Unreal Tournament}. Scripts are written off-line in a high-level language and are used to define simple behaviors for NPCs. Procedural script generation has been proposed in \\cite{Mcnaughton04scriptease:generative} by using simple patter templates which are tuned and combined by hand. Complex behaviors can be developed in a short amount of time but many of the intricacies of the classical scripting approach are not solved and it remains difficult to manage the NPCs as the complexity of the virtual world increases.\n\nState machines are still the preferred way to control NPCs in modern games, from FPS like the \\textit{Quake} series to RTS like Blizzard's \\textit{Warcraft III}. A problem with state machines is that they allow little reusability and they must often be rebuilt for every different case \\cite{Orkin2003}. Furthermore, the number of the states grows exponentially if the behavior of the character becomes slightly more sophisticated which is problematic in the design, maintenance, and debugging of NPC behavior.\nIn Bungie's \\textit{Halo 2}, a form of hierarchical state machines or behavior trees are used \\cite{Isla05BehaviorTrees}.\nIn the FPSs from Monolith \\textit{F.E.A.R.} and Epic's \\textit{Unreal Tournament}, STRIPS and HTN planning have been used to define complex behaviors such as NPCs able to coordinate as squads and perform advanced strategies as sending for backup or flanking \\cite{orkin06fear}.\nIn Bethesda's \\textit{Elder Scrolls IV Oblivion}, NPCs are controlled by \ngoals that involve scheduling and are given for NPCs to achieve. \nThis allows to define behaviors and tasks that depends on preconditions and scheduled times. \nNonetheless, there is much less effort on standardizing approaches for action-based\nAI in a framework that would allow better comparison or collaboration between the existing\ntechniques. To that end, our proposed architecture allows to:\n\\begin{itemize}\n\\item Try out different existing approaches and decision algorithms by abstracting them in the \nas different deliberation compoments that can be easily switched, allowing a comparative AI \nperformance analysis.\n\\item Build NPC that are able to dynamically change the underlying AI method depending on\nthe state of the game or the vicinity of the player.\nFor example a simple FSM can be used while an NPC is idle or far away from the player,\nand then switch to BT or GOAP when it must defend a location or attack the player.\n\\item Build NPC that are able to use a combination of existing decision algorithms. For example\nwe could think of a system that combines BTs for low level decisions and GOAP for high level \ntactical reasoning. The high level planner then would return a sequence of actions, each of \nwhich would invoke a corresponding BT.\n\\item Develop NPCs with a \\emph{personalized} conceptual representation of the game-world that\nenables rich and novel behaviors. The motivating example we examined is just a very simple \ncase which to the best of our knowledge has not been handled by approaches in the literature.\nMoreover this view can lead to more interesting cases involving also communication between NPC \nand their personalized knowledge.\n\\end{itemize}\n\n\n\n\n\n \n\\section{Conclusions}\n\nIn this paper we have introduced a robotics-inspired architecture for\nhandling non-player character artificial intelligence for the purposes of specifying\naction in the game world. We demonstrated that certain\nbenefits can come out of the principled approach for decomposing the artificial \nintelligence\neffort in components, in particular with respect to a separation between the \nlow-level ground truth for the \nstate of the game-world and a personalized conceptual representation of the world for each NPC.\n\nOur proposed architecture provides modularity allowing each of the four main \ncomponents of the architecture, namely, perception, deliberation, control, and\naction, to encapsulate a self-contained independent functionality through a clear\ninterface. We expect that this way of developing characters can enable better code \nreusability and speed up prototyping, testing and debugging.\nMoreover our proposed architecture provides the ground for revisiting problems and\ntechniques that have been extensively studied, such as pahtfinding, and arrive to\nfeasible methods for developing believable characters with their own view of the\ntopology and connectivity of the game-world areas.\n\n \n\n\\clearpage\n\n\\bibliographystyle{aaai}\n","meta":{"redpajama_set_name":"RedPajamaArXiv"}} +{"text":"\\section{Overview}\n\nThe concept of a $G$-\\emph{principal bundle} for a topological or\nLie group $G$ is fundamental in \nclassical topology and differential\ngeometry, e.g. \\cite{Husemoeller}. More generally, for $G$ a \\emph{geometric}\ngroup in the sense of a \\emph{sheaf of groups} over some site, the notion of \n$G$-principal bundle or \\emph{$G$-torsor} is fundamental in \\emph{topos theory}\n\\cite{Johnstone,Moerdijk}.\nIts relevance rests in the fact that \n$G$-principal bundles constitute natural geometric representatives \nof cocycles in degree 1 nonabelian cohomology\n$H^1(-,G)$ and that general fiber bundles are \n\\emph{associated} to principal bundles.\n\nIn recent years it has become clear that\nvarious applications, notably in \n``\\emph{String-geometry}'' \\cite{SSS,Schreiber}, involve a notion of principal bundles where\ngeometric groups $G$ are generalized to \\emph{geometric grouplike $A_\\infty$-spaces},\nin other words\n\\emph{geometric $\\infty$-groups}: geometric objects that are equipped with a group\nstructure up to higher coherent homotopy. The resulting \\emph{principal $\\infty$-bundles}\nshould be natural geometric representatives of geometric nonabelian \\emph{hypercohomology}:\n{\\v C}ech cohomology with coefficients in arbitrary positive degree. \n\nIn the \\emph{absence} of geometry, \nthese principal $\\infty$-bundles are essentially just the classical \\emph{simplicial} principal bundles \nof simplicial sets \\cite{May} (this we discuss in Section 4.1 of \\cite{NSSb}). However,\nin the presence of non-trivial geometry the situation is both more subtle and richer, and plain \nsimplicial principal bundles can only serve as a specific \\emph{presentation}\nfor the general notion (section 3.7.2 of \\cite{NSSb}).\n\nFor the case of \\emph{principal 2-bundles}, \nwhich is the first step after ordinary principal bundles,\naspects of a geometric definition and theory have been proposed and developed by\nvarious authors, see section 1 of \\cite{NSSb} for references and see \n\\cite{NikolausWaldorf} for a comprehensive discussion.\nNotably the notion of a \\emph{bundle gerbe} \\cite{Mur}\nis, when regarded as an extension of a {\\v C}ech-groupoid, \nalmost manifestly that of a principal 2-bundle, \neven though this perspective is not prominent in the respective literature.\nWe discuss these relations in detail in \\cite{NSSc}.\nThe oldest definition of geometric 2-bundles is conceptually different, but closely related:\nGiraud's \\emph{$G$-gerbes} \\cite{Giraud} are by definition not principal 2-bundles but are \nfiber 2-bundles \\emph{associated} to $\\mathbf{Aut}(\\mathbf{B}G)$-principal 2-bundles,\nwhere $\\mathbf{B}G$ is the \\emph{geometric moduli stack} of $G$-principal bundles.\nThis means that $G$-gerbes provide the universal \\emph{local coefficients}, in the sense\nof \\emph{twisted cohomology}, for $G$-principal bundles.\n\nFrom the definition of principal 2-bundles\/bundle gerbes it is fairly clear that these\nought to be just the first step (or second step) in an infinite tower of higher analogs. Accordingly, \ndefinitions of \\emph{principal 3-bundles} have been considered in the literature, \nmostly in the guise of\n\\emph{bundle 2-gerbes} \\cite{Stevenson} (we discuss the relation in \\cite{NSSc}). \nThe older notion\nof Breen's \\emph{$G$-2-gerbes} \\cite{Breen} (also discussed by Brylinski-MacLaughlin), \nis, as before, not that of a principal \n3-bundle, but that of a fiber 3-bundle which is\n\\emph{associated} to an $\\mathbf{Aut}(\\mathbf{B}G)$-principal 3-bundle, \nwhere now\n$\\mathbf{B}G$ is the \\emph{geometric moduli 2-stack} of $G$-principal 2-bundles\n(details are also in \\cite{NSSc}).\n\nGenerally, for every $n \\in \\mathbb{N}$ and every geometric $n$-group $G$, \nit is natural to consider the theory of \n$G$-principal $n$-bundles \\emph{twisted} by an $\\mathbf{Aut}(\\mathbf{B}G)$-principal\n$(n+1)$-bundle, hence by the associated \\emph{$G$-$n$-gerbe}. \nA complete theory of principal bundles therefore needs to involve \nthe notion of principal $n$-bundles \nand also that of twisted principal $n$-bundles\nin the limit as $n \\to \\infty$. \n\nAs $n$ increases, the piecemeal \nconceptualization of principal $n$-bundles quickly becomes tedious \nand their structure opaque, without a general theory of higher geometric\nstructures. In recent years such a theory -- long conjectured and with many precursors -- \nhas materialized in a comprehensive and elegant form, now known as \\emph{$\\infty$-topos theory} \n\\cite{ToenVezzosiToposb, Rezk, Lurie}. \nWhereas an ordinary topos is a category of \\emph{sheaves} over \nsome site\\footnote{Throughout \\emph{topos} here stands for \\emph{Grothendieck topos},\nas opposed to the more general notion of \\emph{elementary topos}.}, an \n$\\infty$-topos is an \\emph{$\\infty$-category} of \\emph{$\\infty$-sheaves} or equivalently\nof \\emph{$\\infty$-stacks} over some \\emph{$\\infty$-site}, where the prefix ``$\\infty-$''\nindicates that all these notions are generalized to structures up to \n\\emph{coherent higher homotopy} (as in the older terminology of \n$A_\\infty$-, $C_\\infty$-, $E_\\infty$- and $L_\\infty$-algebras, all of which re-appear\nas algebraic structures in $\\infty$-topos theory). \nIn as far as an ordinary topos is a context\nfor general \\emph{geometry}, an $\\infty$-topos is a context for what is called\n\\emph{higher geometry} or \\emph{derived geometry}: the pairing of the notion of\n\\emph{geometry} with that of \\emph{homotopy}.\n(Here ``derived'' alludes to \n``derived category'' and ``derived functor'' in homological algebra, \nbut refers in fact to a nonabelian generalization of these concepts.) \n\nAs a simple instance of this pairing, \none observes that\nfor any geometric abelian group (sheaf of abelian groups) \n$A$, the higher degree (sheaf) cohomology $H^{n+1}(-,A)$ in ordinary geometry\nmay equivalently be understood as the degree-1 cohomology\n$H^1(-,\\mathbf{B}^{n}A)$ in higher geometry, where \n$\\mathbf{B}^{n}A$ is the geometric $\\infty$-group obtained by\nsuccessively \\emph{delooping} $A$ geometrically. \nMore generally, there are geometric $\\infty$-groups $G$ not of this abelian form.\nThe general degree-1 geometric cohomology\n$H^1(X,G)$ is a nonabelian and simplicial generalization of \\emph{sheaf hypercohomology},\nwhose cocycles are morphisms $X \\to \\mathbf{B}G$ into the geometric delooping of $G$. \nIndeed, delooping plays a central role \nin $\\infty$-topos theory; \na fundamental fact of $\\infty$-topos theory (recalled as \nTheorem \\ref{DeloopingTheorem} below) says that, quite generally, under internal \nlooping and delooping, $\\infty$-groups $G$ in an $\\infty$-topos $\\mathbf{H}$ are equivalent\nto connected and \\emph{pointed} objects in $\\mathbf{H}$:\n$$\n \\xymatrix{\n \\left\\{\n\t \\mbox{\n\t groups in $\\mathbf{H}$\n\t }\n\t\\right\\}\n\t\t\\ar@{<-}@<+5pt>[rrr]^<<<<<<<<<<<<<{\\mbox{\\small looping}\\; \\Omega}\n\t\\ar@<-5pt>[rrr]_<<<<<<<<<<<<<{\\mbox{\\small delooping}\\; \\mathbf{B}}^<<<<<<<<<<<<<\\simeq\n &&&\n\t\\left\\{\n\t \\mbox{\\begin{tabular}{c} pointed connected \\\\ objects in $\\mathbf{H}$ \\end{tabular}}\n\t\\right\\}\n }\n \\,.\n$$\nWe will see that this fact plays a key role in the theory of \nprincipal $\\infty$-bundles. \n \nTopos theory is renowned for providing a general convenient context for the development\nof geometric structures. In some sense, $\\infty$-topos theory \nprovides an even more convenient context, due to the fact that\n\\emph{$\\infty$-(co)limits} or \\emph{homotopy (co)limits} in an $\\infty$-topos\nexist, and refine or \\emph{correct} the corresponding naive (co)limits. \nThis convenience manifests itself in the central definition of \nprincipal $\\infty$-bundles (Definition~\\ref{principalbundle} below): whereas the \ntraditional definition of a $G$-principal bundle over $X$ as a quotient map\n$P \\to P\/G \\simeq X$ requires the additional clause that the quotient be\n\\emph{locally trivial}, $\\infty$-topos theory comes pre-installed with the correct homotopy quotient for\nhigher geometry, and as a result the local triviality of $P \\to P\/\\!\/G =: X$ is automatic;\nwe discuss this in more detail in Section \\ref{PrincBund-Intro} below.\nHence \nconceptually, $G$-principal $\\infty$-bundles are in fact simpler than their\ntraditional analogs, and so their theory is stronger. \n\n\n\nA central theorem of topos theory is \\emph{Giraud's theorem}, which \nintrinsically characterizes \ntoposes as those presentable categories that satisfy three simple \nconditions: 1.\\ coproducts are disjoint, 2.\\ colimits are preserved by pullback, and\n3.\\ quotients are effective. The analog of this characterization turns out\nto remain true essentially verbatim in $\\infty$-topos theory: \nthis is the \\emph{Giraud-To{\\\"e}n-Vezzosi-Rezk-Lurie} characterization\nof $\\infty$-toposes, recalled as Definition \\ref{GiraudRezkLurieAxioms} below. \nWe will show that given an $\\infty$-topos $\\mathbf{H}$, the second\nand the third of these axioms \nlead directly to the {\\em classification theorem} for principal $\\infty$-bundles \n(Theorem~\\ref{PrincipalInfinityBundleClassification} below) which states that \nthere is an equivalence of $\\infty$-groupoids \n\\[\n\\begin{array}{cccc}\nG \\mathrm{Bund}(X)\n\t &\n\t \\simeq\n\t &\n\t \\mathbf{H}(X, \\mathbf{B}G)\n\\\\\n\\\\\n \t\\left\\{\n\t \\begin{array}{c}\n\t \\mbox{$G$-principal $\\infty$-bundles}\n\t \\\\\n\t \\mbox{over $X$}\n\t \\end{array}\n\t \\raisebox{20pt}{\n\t \\xymatrix{\n\t P \\ar[d] \\\\ X\n\t }}\n\t\\right\\}\n &\\simeq&\n \t\\left\\{\n\t \\mbox{cocycles}\\;\\;\\;\n\t g : X \\to \\mathbf{B}G\n\t\\right\\}\n\t \t\\end{array}\n\\]\t\nbetween the $\\infty$-groupoid of $G$-principal $\\infty$-bundles on $X$, \nand the mapping space $\\mathbf{H}(X,\\mathbf{B}G)$. \n\nThe mechanism underlying the proof of this theorem is summarized \nin the following diagram, which is supposed to indicate that the geometric $G$-principal $\\infty$-bundle corresponding \nto a cocycle is nothing but the\ncorresponding homotopy fiber:\n $$\n \\raisebox{50pt}{\n \\xymatrix@C=-7pt@R=2pt{\n \\vdots && \\vdots\n \\\\\n P \\times G \\times G \n\t \\ar[rr] \\ar@<-4pt>[ddd] \\ar@<+0pt>[ddd] \\ar@<+4pt>[ddd] \n\t &&\n\tG \\times G\n \\ar@<-4pt>[ddd] \\ar@<+0pt>[ddd] \\ar@<+4pt>[ddd]\t\n \\\\\n\t\\\\\n \\\\\n P \\times G \\ar[rr] \\ar@<-3pt>[ddd]_{p_1} \\ar@<+3pt>[ddd]^\\rho \n\t&& G\n\t\\ar@<-3pt>[ddd]_{} \\ar@<+3pt>[ddd]\n \\\\\n\t\\\\ && & \\mbox{\\small $G$-$\\infty$-actions}\n\t\\\\\n P \\ar[rr] \\ar[ddd] && {*} \\ar[ddd] & \\mbox{\\small total objects}\n\t\\\\\n\t\\\\ & \\mbox{\\small $\\infty$-pullback} && \n\t\\\\\n\tX \\ar[rr]_{g } && \\mathbf{B}G & \\mbox{\\small quotient objects}\n\t\\\\\n\t\\mbox{\\small \\begin{tabular}{c} $G$-principal \\\\ $\\infty$-bundle \\end{tabular}}\n\t\\ar@{}[rr]_{\\mbox{\\small cocycle}}\n\t&& \\mbox{\\small \\begin{tabular}{c} universal \\\\ $\\infty$-bundle \\end{tabular}}\n }\n }\n$$\nThe fact that all geometric $G$-principal $\\infty$-bundles arise this\nway, up to equivalence, is quite useful in applications, and also sheds helpful light \non various existing constructions and provides more examples; we discuss this in \\cite{NSSc}. \n\nNotably, the implication\nthat \\emph{every} geometric $\\infty$-action $\\rho : V \\times G \\to V$ \nof an $\\infty$-group $G$ on an object $V$ \nhas a classifying morphism $\\mathbf{c} : V\/\\!\/G \\to \\mathbf{B}G$,\ntightly connects the theory of associated $\\infty$-bundles with that of\nprincipal $\\infty$-bundles (Section~\\ref{StrucRepresentations} below):\nthe fiber sequence\n$$\n \\raisebox{20pt}{\n \\xymatrix{\n V \\ar[r] & V\/\\!\/G \n\t\\ar[d]^{\\mathbf{c}}\n\t\\\\\n\t& \\mathbf{B}G\n }\n }\n$$\nis found to be the $V$-fiber $\\infty$-bundle which is \\emph{$\\rho$-associated} \nto the universal $G$-principal $\\infty$-bundle $* \\to \\mathbf{B}G$. \nAgain, using the $\\infty$-Giraud axioms, \nan $\\infty$-pullback of $\\mathbf{c}$ along a cocycle $g_X : X \\to \\mathbf{B}G$ \nis identified with the $\\infty$-bundle $P \\times_G V$ that is \\emph{$\\rho$-associated}\nto the principal $\\infty$-bundle $P \\to X$ classified by $g_X$ \n(Proposition \\ref{RhoAssociatedToUniversalIsUniversalVBundle}) and \nevery $V$-fiber $\\infty$-bundle arises this way, associated to an \n$\\mathbf{Aut}(V)$-principal $\\infty$-bundle (Theorem \\ref{VBundleClassification}).\n\nUsing this, we may observe that the space $\\Gamma_X(P \\times_G V)$ \nof \\emph{sections} of $P \\times_G V$ is equivalently\nthe space $\\mathbf{H}_{\/\\mathbf{B}G}(g_X, \\mathbf{c})$ \nof cocycles $\\sigma : g_X \\to \\mathbf{c}$ in the slice $\\infty$-topos \n$\\mathbf{H}_{\/\\mathbf{B}G}$:\n$$\n \\begin{array}{cccc}\n \\Gamma_X(P \\times_G V)\n\t &\n\t \\simeq\n\t &\n\t \\mathbf{H}_{\/\\mathbf{B}G}(g_X, \\mathbf{c})\n\t \\\\\n\t \\\\\n \t\\left\\{\n\t \\raisebox{20pt}{\n\t \\xymatrix{\n\t P \\times_G V \\ar[r] \\ar[d] & V \/\\! \/ G\n\t\t \\ar[d]^\\rho\n\t \\\\\n\t X \\ar[r]_-{g_X} \n\t\t\\ar@\/^1pc\/@{-->}[u]^{\\sigma}\n\t\t& \\mathbf{B}G\n\t }\n\t }\n\t\\right\\}\n &\\simeq&\n \t\\left\\{\n\t \\raisebox{20pt}{\n\t \\xymatrix{\n\t & V \/\\! \/ G\n\t\t \\ar[d]^\\rho\n\t \\\\\n\t X \\ar[r]_-{g_X} \n\t\t\\ar@{-->}[ur]^{\\sigma}\n\t\t& \\mathbf{B}G\n\t }\n\t }\n\t\\right\\}\n\t\\end{array}\n$$\nMoreover, by the above classification theorem of $G$-principal $\\infty$-bundles, \n$g_X$ trivializes over some\ncover $\\xymatrix{U \\ar@{->>}[r] & X}$, \nand so the universal property of the $\\infty$-pullback implies that\n\\emph{locally} a section $\\sigma$ is a $V$-valued function\n$$\n \\raisebox{20pt}{\n \\xymatrix{\n & V \\ar[r] & V \/\\! \/ G\n\t \\ar[d]^{\\mathbf{c}}\n \\\\\n U \\ar@{->>}[r]_<<<{\\mathrm{cover}}\\ar@{-->}[ur]^{\\sigma|_U} & X \\ar[r]^{g_X} \n\t& \\mathbf{B}G\\, .\n }\n }\n$$\nFor $V$ an ordinary space, hence a \\emph{0-truncated} object in the $\\infty$-topos,\nthis is simply the familiar statement about sections of associated bundles. \nBut in higher geometry $V$ may more generally itself be a higher \nmoduli $\\infty$-stack, which makes the general theory of sections more\ninteresting.\nSpecifically, if $V$ is a pointed connected object, this\nmeans that it is locally a cocycle for an $\\Omega V$-principal $\\infty$-bundle, \nand so globally is a \\emph{twisted $\\Omega V$-principal $\\infty$-bundle}.\nThis identifies $\\mathbf{H}_{\/\\mathbf{B}G}(-, \\mathbf{c})$ as the \n\\emph{twisted cohomology} induced by the \\emph{local coefficient bundle $\\mathbf{c}$}\nwith \\emph{local coefficients} $V$.\nThis yields a geometric and unstable analogue \nof the \npicture of twisted cohomology discussed in \\cite{AndoBlumbergGepner}.\n\nGiven $V$, the most general \ntwisting group is the \\emph{automorphism $\\infty$-group} \n$\\mathbf{Aut}(V) \\hookrightarrow [V,V]_{\\mathbf{H}}$, \nformed in the $\\infty$-topos (Definition \\ref{InternalAutomorphismGroup}). If \n$V$ is pointed connected and hence of the form $V = \\mathbf{B}G$, this means that the\nmost general universal local coefficient bundle is\n$$\n \\raisebox{20pt}{\n \\xymatrix{\n \\mathbf{B}G \\ar[r] \n\t & \n\t (\\mathbf{B}G)\/\\!\/\\mathbf{Aut}(\\mathbf{B}G) \n\t \\ar[d]^{\\mathbf{c}_{\\mathbf{B}G}}\n\t \\\\\n\t & \\mathbf{B}\\mathbf{Aut}(\\mathbf{B}G).\n }}\n$$\nThe corresponding associated twisting $\\infty$-bundles are \n\\emph{$G$-$\\infty$-gerbes}: fiber $\\infty$-bundles with typical fiber \nthe moduli $\\infty$-stack $\\mathbf{B}G$. These are the\nuniversal local coefficients for twists of $G$-principal $\\infty$-bundles.\n\nWhile twisted cohomology in $\\mathbf{H}$ is hence identified simply with ordinary cohomology \nin a slice of $\\mathbf{H}$, the corresponding geometric representatives, the \n$\\infty$-bundles, do not translate to the \nslice quite as directly. The reason is that a universal local coefficient bundle\n$\\mathbf{c}$ as above is rarely a pointed connected object in the slice\n(if it is, then it is essentially trivial) and so the theory of principal \n$\\infty$-bundles does not directly apply to these coefficients. \nIn Section~\\ref{ExtensionsOfCohesiveInfinityGroups} we show that what \ndoes translate is a notion of\n\\emph{twisted $\\infty$-bundles}, a generalization of the twisted bundles known from \ntwisted K-theory: given a section $\\sigma : g_X \\to \\mathbf{c}$ as above, \nthe following pasting diagram of $\\infty$-pullbacks\n$$\n \\xymatrix{\n Q \n\t\\ar[d] \\ar[r] & {*} \\ar[d]\n\t&&\n\t\\mbox{$P$-twisted $\\Omega V$-principal $\\infty$-bundle}\n \\\\\n P \\ar[d] \\ar[r] & V \\ar[r] \\ar[d] & {*} \\ar[d] & \\mbox{$G$-principal $\\infty$-bundle}\n \\\\\n X \\ar[r]^\\sigma \\ar@\/_2pc\/[rr]_{g_X} & V\/\\!\/G \n \\ar[r]^{\\mathbf{c}} & \\mathbf{B}G & \\mbox{section of $\\rho$-associated $V$-$\\infty$-bundle}\n }\n$$\nnaturally identifies an $\\Omega V$-principal $\\infty$-bundle $Q$ on the total space $P$\nof the twisting $G$-principal $\\infty$-bundle, and since this is classified by \na $G$-equivariant morphism $P \\to V$ it enjoys itself a certain twisted $G$-equivariance\nwith respect to the defining $G$-action on $P$. We call such $Q \\to P$ the\n\\emph{$[g_X]$-twisted $\\Omega V$-principal bundle} classified by $\\sigma$.\nAgain, a special case of special importance is that where \n$V = \\mathbf{B}A$ is pointed connected, \nwhich identifies the universal $V$-coefficient bundle with an \n\\emph{extension of $\\infty$-groups}\n$$\n \\raisebox{20pt}{\n \\xymatrix{\n \\mathbf{B}A \\ar[r] & \\mathbf{B}\\hat G\n\t\\ar[d]\n\t\\\\\n\t& \\mathbf{B}G.\n }\n }\n$$\nAccordingly, $P$-twisted $A$-principal $\\infty$-bundles are equivalently\n\\emph{extensions} of $P$ to $\\hat G$-principal $\\infty$-bundles.\n\nA direct generalization of the previous theorem yields the \nclassification Theorem \\ref{ClassificationOfTwistedGEquivariantBundles}, \nwhich identifies $[g_X]$-twisted $A$-principal $\\infty$-bundles with cocycles in twisted cohomology\n$$\n \\begin{array}{cccc}\n \t A \\mathrm{Bund}^{[g_X]}(X)\n\t &\n\t \\simeq\n\t &\n\t \\mathbf{H}_{\/\\mathbf{B}G}(g_X, \\mathbf{c}_{\\mathbf{B}G})\n \\\\\n \\\\\n \t\\left\\{\n\t \\begin{array}{c}\n\t \\mbox{$[g_X]$-twisted}\n\t \\\\\n\t \\mbox{$A$-principal $\\infty$-bundles}\n\t \\\\\n\t \\mbox{over $X$}\n\t \\end{array}\n\t \\raisebox{40pt}{\n\t \\xymatrix{\n\t Q \\ar[d] \\\\ P = (g_X)^* {*} \\ar[d] \\\\ X\n\t }}\n\t\\right\\}\n &\\simeq&\n \t\\left\\{\n\t \\mbox{twisted cocycles}\\;\\;\\;\n\t \\sigma : g_X \\to \\mathbf{c}_{\\mathbf{B}G}\n\t\\right\\}\n\t\\end{array}\n$$\nFor instance if $\\mathbf{c}$ is the connecting homomorphism\n$$\n \\xymatrix{\n \\mathbf{B}\\hat G \\ar[r] & \\mathbf{B}G \\ar[d]^{\\mathbf{c}}\n\t\\\\\n\t& \\mathbf{B}^2 A\n }\n$$\nof a central \nextension of ordinary groups $A \\to \\hat G \\to G$, then\nthe corresponding twisted $\\hat G$-bundles are those known from geometric models of\ntwisted K-theory (discussed in \\cite{NSSc}).\n\nWhen the internal \\emph{Postnikov tower} of a coefficient object is regarded as \na sequence of local coefficient bundles as above, the induced \ntwisted $\\infty$-bundles are decompositions of nonabelian principal $\\infty$-bundles\ninto ordinary principal bundles together with\nequivariant abelian hypercohomology cocycles on their total spaces. \nThis construction identifies much of equivariant cohomology theory\nas a special case of higher nonabelian cohomology. \nSpecifically, when applied to a Postnikov stage of the delooping of an\n$\\infty$-group of internal automorphisms, the corresponding \ntwisted cohomology reproduces\nthe notion of Breen \\emph{$G$-gerbes with band} (Giraud's \\emph{lien}s); \nand the corresponding \ntwisted $\\infty$-bundles are their incarnation as \nequivariant \\emph{bundle gerbes} over principal bundles. \n\n\\medskip\n\n\nThe classification statements for principal and fiber $\\infty$-bundles in this article, \nTheorems \\ref{PrincipalInfinityBundleClassification} \nand \\ref{VBundleClassification} are not surprising, they say exactly what one would\nhope for. It is however useful to see how they flow naturally from the abstract\naxioms of $\\infty$-topos theory, and to observe that they immediately imply \na series of classical as well as recent theorems as special cases, \nsee Remark \\ref{ReferencesOnClassificationOfVBundles}. \nAlso the corresponding long exact sequences in (nonabelian) cohomology,\nTheorem \\ref{LongExactSequenceInCohomology}, reproduce classical theorems, \nsee Remark \\ref{ReferencesOnLongSequences}.\nSimilarly the\ndefinition and classification of lifting of principal $\\infty$-bundles, \nTheorem \\ref{ExtensionsAndTwistedCohomology}, and of twisted principal $\\infty$-bundles \nin Theorem \\ref{ClassificationOfTwistedGEquivariantBundles} flows naturally\nfrom the $\\infty$-topos theory and yet it immediately implies various\nconstructions and results in the literature as special cases, see \nRemark \\ref{ReferencesOnLiftings} and Remark \\ref{ReferencesTwistedBundles}, respectively.\nIn particular the notion of nonabelian twisted cohomology itself is elementary\nin $\\infty$-topos theory,\nSection \\ref{TwistedCohomology}, and yet it sheds light on a wealth of \napplications, see Remark \\ref{ReferencesOnTwisted}.\n\nThis should serve to indicate that the theory of (twisted) principal $\\infty$-bundles\nis rich and interesting. \nThe present article is intentionally written in general abstraction only, aiming to present\nthe general theory of (twisted) principal $\\infty$-bundles as elegantly as possible, \ntrue to its roots in \nabstract higher topos theory. We believe that this serves to usefully make transparent \nthe overall picture. In the companion article \n\\cite{NSSb} we give a complementary discussion and construct \nexplicit presentations of the structures appearing here that lend themselves\nto explicit computations. \nFinally in \\cite{NSSc} we use the combination of the general abstract \nformulation and its explicit presentations to discuss a list of \ninteresting examples and applications.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\\section{Preliminaries}\n\\label{structures}\n\nThe discussion of principal $\\infty$-bundles in \nSection~\\ref{Principal infinity-bundles general abstract} \nbelow builds on \nthe concept of an \\emph{$\\infty$-topos} and on a handful\nof basic structures and notions that are present in any $\\infty$-topos,\nin particular the notion of \\emph{group objects} and of \\emph{cohomology} with coefficients\nin these group objects. The relevant theory has been\ndeveloped in \\cite{ToenVezzosiToposb, Rezk, Lurie, LurieAlgebra}. \nWhile we assume the reader to be familiar with basic ideas of this theory, \nthe purpose of this section\nis to recall the main aspects that we need, to establish our notation, and to \nhighlight some aspects of the general theory \nthat are relevant to our discussion and which have perhaps \nnot been highlighted in this way in the\nexisting literature. \n\n\\medskip\n\nFor many purposes the notion of \\emph{$\\infty$-topos} is best thought of as \na generalization of the notion of a sheaf topos --- the category \nof sheaves over some site is replaced by an \n\\emph{$\\infty$-category of $\\infty$-stacks\/$\\infty$-sheaves}\nover some $\\infty$-site (there is also supposed to be a more general notion of an \n\\emph{elementary $\\infty$-topos}, which however we do not consider here). \nIn this context the $\\infty$-topos $\\mathrm{Gpd}_\\infty$ of $\\infty$-groupoids\nis the natural generalization of the punctual topos $\\mathrm{Set}$ to \n$\\infty$-topos theory. A major achievement\nof \\cite{ToenVezzosiToposb}, \\cite{Rezk} and \\cite{Lurie} was to provide a more intrinsic characterization of\n$\\infty$-toposes, which generalizes the classical characterization of \nsheaf toposes (Grothendieck toposes) originally given by Giraud. \nWe will show that the theory of \nprincipal $\\infty$-bundles is naturally expressed in terms of these intrinsic\nproperties, and therefore we here take these \\emph{Giraud-To{\\\"e}n-Vezzosi-Rezk-Lurie axioms}\nto be the very definition of an $\\infty$-topos \n(\\cite{Lurie}, Theorem 6.1.0.6, the main ingredients will be recalled below):\n\\begin{definition}[$\\infty$-Giraud axioms]\n \\label{GiraudRezkLurieAxioms}\n An \\emph{$\\infty$-topos} is a presentable $\\infty$-category $\\mathbf{H}$ that satisfies the\n following properties.\n \\begin{enumerate}\n \\item {\\bf Coproducts are disjoint.} For every two objects \n $A, B \\in \\mathbf{H}$, the intersection of $A$ and \n $B$ in their coproduct is the initial object: in other words the diagram\n\t$$\n\t \\xymatrix{\n\t \\emptyset \\ar[r] \\ar[d] & B \\ar[d]\n\t\t\\\\\n\t\tA \\ar[r] & A \\coprod B\n\t }\n\t$$\n\tis a pullback.\n\t\n\t\\item {\\bf Colimits are preserved by pullback.} \n\t For all morphisms $f\\colon X\\to B$ in $\\mathbf{H}$ and all \n\t small diagrams $A\\colon I\\to \\mathbf{H}_{\/B}$, there is an \n\t equivalence \n\t $$\n\t \\varinjlim_i f^*A_i \\simeq f^*(\\varinjlim_i A_i)\n\t $$\t \n\t between the pullback of the colimit and the colimit over the pullbacks of its\n\t components.\n\t\\item \n\t {\\bf Quotient maps are effective epimorphisms.} Every simplicial object\n\t $A_\\bullet : \\Delta^{\\mathrm{op}} \\to \\mathbf{H}$ that satisfies the\n\t groupoidal Segal property (Definition~\\ref{GroupoidObject}) is the {\\v C}ech nerve of its quotient projection:\n\t $$\n\t A_n \\simeq \n\t\tA_0 \\times_{\\varinjlim_n A_n} A_0 \\times_{\\varinjlim_n A_n} \\cdots \\times_{\\varinjlim_n A_n} A_0\n\t\t\\;\\;\\;\n\t\t\\mbox{($n$ factors)}\n\t\t\\,.\n\t $$\n \\end{enumerate}\n\\end{definition}\nRepeated application of the second and third axiom provides the proof of \nthe classification of principal $\\infty$-bundles, \nTheorem \\ref{PrincipalInfinityBundleClassification} and the\nuniversality of the universal associated $\\infty$-bundle, \nProposition \\ref{UniversalAssociatedBundle}.\n\nAn ordinary topos is famously characterized by the existence of a classifier object\nfor monomorphisms, the \\emph{subobject classifier}. \nWith hindsight, this statement already carries in it the seed \nof the close relation between topos theory and bundle theory, for we may think of \na monomorphism $E \\hookrightarrow X$ as being a \\emph{bundle of $(-1)$-truncated fibers}\nover $X$. The following axiomatizes the existence of arbitrary universal bundles\n\\begin{definition}\n An \\emph{$\\infty$-topos} $\\mathbf{H}$ is a presentable $\\infty$-category with the following\n properties.\n \\begin{enumerate}\n\t\\item {\\bf Colimits are preserved by pullback.} \n\t\\item {\\bf There are universal $\\kappa$-small bundles.}\n\t For every sufficiently large regular cardinal $\\kappa$, there exists \n\t a morphism $\\widehat {\\mathrm{Obj}}_\\kappa \\to \\mathrm{Obj}_\\kappa$ in $\\mathbf{H}$, \n\t such that for every other object $X$, pullback along morphisms $X \\to \\mathrm{Obj}$\n\t constitutes an equivalence\n\t $$\n\t \\mathrm{Core}(\\mathbf{H}_{\/_{\\kappa}X})\n\t\t\\simeq\n\t\t\\mathbf{H}(X, \\mathrm{Obj}_\\kappa)\n\t $$\n\t between the $\\infty$-groupoid of bundles (morphisms) $E \\to X$ which are $\\kappa$-small over $X$\n\t and the $\\infty$-groupoid of morphisms from $X$ into $\\mathrm{Obj}_\\kappa$.\t \n \\end{enumerate}\n \\label{RezkCharacterization}\n\\end{definition}\nThese two characterizations of $\\infty$-toposes, Definition \\ref{GiraudRezkLurieAxioms}\nand Definition \\ref{RezkCharacterization} are equivalent;\nthis is due to Rezk and Lurie, appearing as Theorem 6.1.6.8 in \\cite{Lurie}.\nWe find that the second of these axioms \ngives the equivalence between $V$-fiber bundles and \n$\\mathbf{Aut}(V)$-principal $\\infty$-bundles\nin Proposition \\ref{VBundleIsAssociated}.\n\n\nIn addition to these axioms, a basic property of $\\infty$-toposes\n(and generally of $\\infty$-categories with pullbacks) which we will \nrepeatedly invoke, is the following.\n\\begin{proposition}[pasting law for pullbacks]\n Let $\\mathbf{H}$ be an $\\infty$-category with pullbacks. If \n $$\n \\xymatrix{\n\t A \\ar[r]\\ar[d] & B \\ar[r]\\ar[d] & C \\ar[d]\n\t \\\\\n\t D \\ar[r] & E \\ar[r] & F\n\t}\n $$\n is a diagram in $\\mathbf{H}$ such that the right \n square is an $\\infty$-pullback, then the left square is an $\\infty$-pullback precisely\n if the outer rectangle is.\n \\label{PastingLawForPullbacks}\n\\end{proposition}\nNotice that here and in all of the following\n\\begin{itemize}\n \\item all square diagrams are filled by a 2-cell, even if we do not indicate this\n notationally;\n \\item\n all limits are $\\infty$-limits\/homotopy limits\n\t(hence all pullbacks are $\\infty$-pullbacks\/homotopy pullbacks), and so on;\n\\end{itemize}\nthis is the only consistent way of speaking about $\\mathbf{H}$ in generality.\nOnly in the followup article \\cite{NSSb} do we consider presentations of \n$\\mathbf{H}$ by 1-categorical data; there we will draw a careful \ndistinction between 1-categorical\nlimits and $\\infty$-categorical\/homotopy limits.\n\n\n\\subsection{Epimorphisms and monomorphisms}\n\\label{StrucEpi}\n\nIn an $\\infty$-topos there is an infinite tower of notions of epimorphisms and monomorphisms:\nthe $n$-connected and $n$-truncated morphisms for all $-2 \\leq n \\leq \\infty$\n\\cite{Rezk, Lurie}. \nThe case when $n = -1$ is the most direct generalization of the 1-categorical notion, and this\nis what we need in the following. Here we briefly recall the main definitions and properties.\n\n\\medskip\n\n\n\\begin{definition}\nLet $\\mathbf{H}$ be an $\\infty$-topos. \nFor $X \\to Y$ any morphism in $\\mathbf{H}$, there is a\n simplicial object $\\check{C}(X \\to Y)$ in $\\mathbf{H}$ (the {\\em \\v{C}ech \n nerve} of $f\\colon X\\to Y$) which in degree $n$ is the \n $(n+1)$-fold $\\infty$-fiber product of $X$ over $Y$ with itself\n $$\n \\check{C}(X \\to Y) : [n] \\mapsto X^{\\times^{n+1}_Y}\n $$\n A morphism $f : X \\to Y$ in $\\mathbf{H}$ is an \\emph{effective epimorphism}\n if it is the colimiting cocone under its own {\\v C}ech nerve:\n $$\n f : X \\to \\varinjlim \\check{C}(X\\to Y)\n\t\\,.\n $$ \n Write $\\mathrm{Epi}(\\mathbf{H}) \\subset \\mathbf{H}^I$ for the collection of \n effective epimorphisms.\n \\label{EffectiveEpi}\n\\end{definition}\n\\begin{proposition}\n A morphism $f : X \\to Y$ in the $\\infty$-topos $\\mathbf{H}$\n is an effective epimorphism precisely if its 0-truncation\n $\\tau_0 f : \\tau_0 X \\to \\tau_0 Y$ is an epimorphism (necessarily effective)\n in the 1-topos $\\tau_{\\leq 0} \\mathbf{H}$.\n \\label{EffectiveEpiIsEpiOn0Truncation}\n\\end{proposition}\nThis is Proposition 7.2.1.14 in \\cite{Lurie}.\n\\begin{proposition}\n The classes $( \\mathrm{Epi}(\\mathbf{H}), \\mathrm{Mono}(\\mathbf{H}) )$\n constitute an orthogonal factorization system.\n \\label{EpiMonoFactorizationSystem}\n\\end{proposition}\nThis is Proposition 8.5 in \\cite{Rezk} and Example 5.2.8.16 in \\cite{Lurie}.\n\\begin{definition}\n For $f : X \\to Y$ a morphism in $\\mathbf{H}$, we write its\n epi\/mono factorization given by Proposition \\ref{EpiMonoFactorizationSystem}\n as\n $$\n f : \n \\xymatrix{\n\t X \\ar@{->>}[r] & \\mathrm{im}(f)\\ \\ar@{^{(}->}[r] & Y \n\t}\n $$\n and we call $\\xymatrix{\\mathrm{im}(f)\\ \\ar@{^{(}->}[r] & Y}$ the \\emph{$\\infty$-image}\n of $f$.\n \\label{image}\n\\end{definition}\n\n\n\n\\subsection{Groupoids}\n\\label{StrucInftyGroupoids}\n\nIn any $\\infty$-topos $\\mathbf{H}$ we may consider groupoids \\emph{internal}\nto $\\mathbf{H}$, in the sense of internal category theory \n(as exposed for instance in the introduction of \\cite{Lurie2}). \n\nSuch a \\emph{groupoid object} \n$\\mathcal{G}$ in $\\mathbf{H}$ is an $\\mathbf{H}$-object $\\mathcal{G}_0$ ``of $\\mathcal{G}$-objects''\ntogether with an $\\mathbf{H}$-object $\\mathcal{G}_1$ ``of $\\mathcal{G}$-morphisms''\nequipped with source and target assigning morphisms $s,t : \\mathcal{G}_1 \\to \\mathcal{G}_0$,\nan identity-assigning morphism $i : \\mathcal{G}_0 \\to \\mathcal{G}_1$ and a composition\nmorphism $\\mathcal{G}_1 \\times_{\\mathcal{G}_0} \\mathcal{G}_1 \\to \\mathcal{G}_1$\nwhich together satisfy all the axioms of a groupoid (unitality, associativity, existence of\ninverses) up to coherent homotopy in $\\mathbf{H}$. One way to formalize what it\nmeans for these axioms to hold up to coherent homotopy is as follows.\n\nOne notes that\nordinary groupoids, i.e.\\ groupoid objects internal to $\\mathrm{Set}$, are \ncharacterized by the fact that their nerves are simplicial sets \n$\\mathcal{G}_\\bullet : \\Delta^{\\mathrm{op}} \\to \\mathrm{Set}$ \nwith the property that the groupoidal Segal maps \n\\[\n\\mathcal{G}_n\\to \\mathcal{G}_1\\times_{\\mathcal{G}_0} \n\\mathcal{G}_1\\times_{\\mathcal{G}_0} \\cdots \\times_{\\mathcal{G}_0} \n\\mathcal{G}_1 \n\\]\nare isomorphisms for all $n\\geq 2$. This last condition \nis stated precisely in Definition~\\ref{GroupoidObject} below, \nand clearly gives a characterization of groupoids that makes sense more generally, in\nparticular it makes sense internally to higher categories: \na groupoid object in $\\mathbf{H}$ is an $\\infty$-functor \n$\\mathcal{G} : \\Delta^{\\mathrm{op}} \\to \\mathbf{H}$ such that all groupoidal \nSegal morphisms are equivalences in $\\mathbf{H}$.\nThese $\\infty$-functors $\\mathcal{G}$ form the \nobjects of an $\\infty$-category $\\mathrm{Grpd}(\\mathbf{H})$\nof groupoid objects in $\\mathbf{H}$.\n\nHere a subtlety arises that is the source of a lot of interesting structure\nin higher topos theory: the objects of $\\mathbf{H}$ are themselves\n ``structured $\\infty$-groupoids''. Indeed, there is a \nfull embedding $\\mathrm{const} : \\mathbf{H} \\hookrightarrow \\mathrm{Grpd}(\\mathbf{H})$\nthat forms constant simplicial objects and thus regards every object $X \\in \\mathbf{H}$\nas a groupoid object which, even though it has a trivial object of morphisms, already\nhas a structured $\\infty$-groupoid of objects. This embedding is in fact \nreflective, with the reflector given by forming the $\\infty$-colimit\nover a simplicial diagram, the ``geometric realization''\n$$\n \\xymatrix{\n \\mathbf{H}\n \\ar@{<-}@<+1.25ex>[rr]^-{\\varinjlim}\n\t \\ar@{^{(}->}@<-1.25ex>[rr]_-{\\mathrm{const}}^-{\\perp}\n\t &&\n\t \\mathrm{Grpd}(\\mathbf{H})\n }\n \\,.\n$$\nFor $\\mathcal{G}$ a groupoid object in $\\mathbf{H}$, the object \n$\\varinjlim \\mathcal{G}_\\bullet$ in $\\mathbf{H}$ \nmay be thought of as the \n$\\infty$-groupoid obtained by ``gluing together the object of objects of\n$\\mathcal{G}$ along the object of morphisms of $\\mathcal{G}$''. \nThis idea that groupoid objects in an $\\infty$-topos are \nlike structured $\\infty$-groupoids together with gluing information \nis formalized by the statement recalled as \nTheorem~\\ref{NaturalThirdGiraud} below, which says that groupoid objects in \n$\\mathbf{H}$ are equivalent to the \\emph{effective epimorphisms} \n$\\xymatrix{Y \\ar@{->>}[r] & X}$ in $\\mathbf{H}$, the intrinsic notion of\n\\emph{cover} (of $X$ by $Y$) in $\\mathbf{H}$. The effective epimorphism\/cover\ncorresponding to a groupoid object $\\mathcal{G}$ is the colimiting cocone\n$\\xymatrix{\\mathcal{G}_0 \\ar@{->>}[r] & \\varinjlim \\mathcal{G}_\\bullet}$.\n\n\\medskip\n\nAfter this preliminary discussion we state the \nfollowing definition of groupoid object in \nan $\\infty$-topos (this definition appears in \\cite{Lurie}\nas Definition 6.1.2.7, using Proposition 6.1.2.6).\n\n\\begin{definition}[\\cite{Lurie}, Definition 6.1.2.7] \n \\label{GroupoidObject}\n A \\emph{groupoid object} in an $\\infty$-topos $\\mathbf{H}$ is \n a simplicial object\n $$\n \\mathcal{G} : \\Delta^{\\mathrm{op}} \\to \\mathbf{H}\n $$\n all of whose groupoidal Segal maps are equivalences: \n in other words, for every\n $n \\in \\mathbb{N}$\n and every partition $[k] \\cup [k'] = [n]$ into two subsets \n such that $[k] \\cap [k'] = \\{*\\}$, the canonical diagram\n \\[\n \\xymatrix{\n \\mathcal{G}_n \\ar[r] \\ar[d] & \\mathcal{G}_k \\ar[d]\n \\\\\n \\mathcal{G}_{k'} \\ar[r] & \\mathcal{G}_{0}\n }\n \\]\n is an $\\infty$-pullback diagram. We write\n \\[\n \\mathrm{Grpd}(\\mathbf{H}) \\subset \\mathrm{Func}(\\Delta^{\\mathrm{op}}, \\mathbf{H})\n \\]\n for the full subcategory of the $\\infty$-category of simplicial\n objects in $\\mathbf{H}$ on the groupoid objects. \n\\end{definition}\nThe following example is fundamental. In fact the third $\\infty$-Giraud axiom\nsays that up to equivalence, all groupoid objects are of this form. \n\\begin{example}\n For $X \\to Y$ any morphism in $\\mathbf{H}$, the \\v{C}ech \n nerve $\\check{C}(X\\to Y)$ of $X\\to Y$ (Definition~\\ref{EffectiveEpi}) is a\n groupoid object $\\check{C}(Y \\to X)$. This example appears in \\cite{Lurie} as Proposition 6.1.2.11.\n\\end{example}\n \n\nThe following statement refines\nthe third $\\infty$-Giraud axiom, Definition \\ref{GiraudRezkLurieAxioms}.\n\\begin{theorem}\n \\label{NaturalThirdGiraud}\n There is a natural equivalence of $\\infty$-categories\n $$\n \\mathrm{Grpd}(\\mathbf{H})\n \\simeq\n (\\mathbf{H}^{\\Delta[1]})_{\\mathrm{eff}}\n \\,,\n $$ \n where $(\\mathbf{H}^{\\Delta[1]})_{\\mathrm{eff}}$ \n is the full sub-$\\infty$-category of the \n arrow category $\\mathbf{H}^{\\Delta[1]}$ \n of $\\mathbf{H}$ on the effective epimorphisms, Definition \\ref{EffectiveEpi}.\n\\end{theorem}\nThis appears below Corollary 6.2.3.5 in \\cite{Lurie}.\n\n\n\\subsection{Groups}\n\\label{StrucInftyGroups}\n\nEvery $\\infty$-topos \ncomes with a notion of \\emph{$\\infty$-group objects} that generalize both the\nordinary notion of group objects in a topos as well as that of\ngrouplike $A_\\infty$-spaces in $\\mathrm{Top} \\simeq \\mathrm{Grpd}_{\\infty}$.\n\n\\medskip\n\nThroughout the following, let $\\mathbf{H}$ be an $\\infty$-topos.\nAn explicit definition of group objects in $\\mathbf{H}$ is the following \n(this appears as Definition 5.1.3.2 together with\nRemark 5.1.3.3 in \\cite{LurieAlgebra}). \n\\begin{definition}[Lurie \\cite{LurieAlgebra}] \n\\label{inftygroupinootopos}\n An \\emph{$\\infty$-group} in $\\mathbf{H}$\n is an $A_\\infty$-algebra $G$ in $\\mathbf{H}$ such that\n the sheaf of connected components\n $\\pi_0(G)$ is a group object in $\\tau_{\\leq 0} \\mathbf{H}$. \n Write\n $\\mathrm{Grp}(\\mathbf{H})$ for the $\\infty$-category\n of $\\infty$-groups in $\\mathbf{H}$.\n\\end{definition}\n\nWe will mostly conceive group objects in $\\mathbf{H}$ as loop space\nobjects of connected objects.\n\\begin{definition}\n Write \n \\begin{itemize}\n \\item $\\mathbf{H}^{*\/}$ for the\n $\\infty$-category of pointed objects in $\\mathbf{H}$;\n \\item $\\mathbf{H}_{\\geq 1}$ \n for the full sub-$\\infty$-category of $\\mathbf{H}$ on the \n connected objects;\n \\item\n $\\mathbf{H}^{*\/}_{\\geq 1}$ for the full sub-$\\infty$-category\n of the pointed objects on the connected objects.\n \\end{itemize}\n\\end{definition}\n\\begin{definition}\n \\label{loop space object}\n Write \n $$\n \\Omega : \\mathbf{H}^{*\/} \\to \\mathbf{H}\n $$\n for the $\\infty$-functor that sends a pointed object $* \\to X$\n to its \\emph{loop space object}, i.e.\\ the $\\infty$-pullback\n $$\n \\raisebox{20pt}{\n \\xymatrix{\n \\Omega X \\ar[r]\\ar[d] & {*} \\ar[d]\n \\\\\n {*} \\ar[r] & X\\,.\n }\n }\n $$\n\\end{definition}\n\\begin{theorem}[Lurie]\n \\label{DeloopingTheorem}\n \\label{delooping}\n Every loop space object canonically has the structure of an \n $\\infty$-group, and this construction extends to an \n $\\infty$-functor\n $$\n \\Omega : \\mathbf{H}^{*\/} \\to \\mathrm{Grp}(\\mathbf{H})\n \\,.\n $$\n This $\\infty$-functor constitutes part of an equivalence of $\\infty$-categories\n $$\n (\\Omega \\dashv \\mathbf{B})\n :\n \\xymatrix{\n \\mathrm{Grp}(\\mathbf{H})\n \\ar@{<-}@<+5pt>[r]^<<<<<<{\\Omega}\n \\ar@<-5pt>[r]_<<<<<<{\\mathbf{B}}^<<<<<<\\simeq\n &\n \\mathbf{H}^{*\/}_{\\geq 1}\\, .\n } \n $$ \n\\end{theorem}\nThis is Lemma 7.2.2.1 in \\cite{Lurie}. \n(See also Theorem 5.1.3.6 of \\cite{LurieAlgebra} \nwhere this is the equivalence denoted $\\phi_0$ in the proof.) For \n$\\mathbf{H} = \\mathrm{Grpd}_{\\infty} \\simeq \\mathrm{Top}$ this \nreduces to various classical\ntheorems in homotopy theory, for instance the \nconstruction of classifying spaces (Kan and Milnor) and de-looping theorems (May and Segal).\n\\begin{definition}\nWe call the inverse \n$\\mathbf{B} : \\mathrm{Grp}(\\mathbf{H}) \\to \\mathbf{H}^{*\/}_{\\geq 1}$\nin Theorem~\\ref{DeloopingTheorem} above the \n\\emph{delooping} functor of $\\mathbf{H}$. By convenient abuse\nof notation we write $\\mathbf{B}$ also for the composite\n$\\mathbf{B} : \\mathrm{Grpd}(\\mathbf{H}) \\to \\mathbf{H}^{*\/}_{\\geq 1} \n\\to \\mathbf{H}$ with the functor that forgets the basepoint and the\nconnectivity.\n\\end{definition}\n\\begin{remark}\n Even if the connected objects involved admit an essentially\n unique point,\n the homotopy type of the full hom-$\\infty$-groupoid \n $\\mathbf{H}^{*\/}(\\mathbf{B}G, \\mathbf{B}H)$ \n of pointed objects in general differs\n from the hom $\\infty$-groupoid $\\mathbf{H}(\\mathbf{B}G, \\mathbf{B}H)$\n of the underlying unpointed objects. \n For instance let $\\mathbf{H} := \\mathrm{Grpd}_{\\infty}$ and let $G$ be \n an ordinary group, regarded as a group object in $\\mathrm{Grpd}_{\\infty}$.\n Then $\\mathbf{H}^{*\/}(\\mathbf{B}G, \\mathbf{B}G) \\simeq \\mathrm{Aut}(G)$\n is the ordinary automorphism group of $G$, but\n $\\mathbf{H}(\\mathbf{B}G, \\mathbf{B}G) = \\mathrm{Aut}(\\mathbf{B}G)$ is the \n automorphism 2-group of $G$, we discuss this \n further around Example~\\ref{automorphism2GroupAbstractly} below.\n\\end{remark}\n\\begin{proposition}[Lurie]\n \\label{InfinityGroupObjectsAsGroupoidObjects}\n $\\infty$-groups $G$ in $\\mathbf{H}$ are equivalently \n those groupoid objects $\\mathcal{G}$ in $\\mathbf{H}$ (Definition~\\ref{GroupoidObject}) \n for which $\\mathcal{G}_0 \\simeq *$. \n\\end{proposition}\nThis is the statement of the compound equivalence\n$\\phi_3\\phi_2\\phi_1$ in the proof of Theorem 5.1.3.6 in \n\\cite{LurieAlgebra}.\n\\begin{remark}\n \\label{PointIntoBGIsEffectiveEpimorphism}\n \\label{Cech nerve of * -> BG}\n This means that for $G$ an $\\infty$-group object, \n the {\\v C}ech nerve extension of its delooping fiber\n sequence $G \\to * \\to \\mathbf{B}G$ is the simplicial \n object\n $$\n \\xymatrix{\n \\cdots\n \\ar@<+6pt>[r] \\ar@<+2pt>[r] \\ar@<-2pt>[r] \\ar@<-6pt>[r]\n &\n G \\times G\n \\ar@<+4pt>[r] \n \\ar[r] \n \\ar@<-4pt>[r] \n & \n G \n \\ar@<+2pt>[r] \\ar@<-2pt>[r] \n & \n {*}\n \\ar@{->>}[r]\n &\n \\mathbf{B}G\n }\n $$\n that exhibits $G$ as a groupoid object over $*$.\n In particular it means that for $G$ an $\\infty$-group, the\n essentially unique morphism $* \\to \\mathbf{B}G$\n is an effective epimorphism.\n \\end{remark}\n\n\n\n\n\\subsection{Cohomology}\n\\label{StrucCohomology}\n\\label{section.Cohomology}\n\nThere is an intrinsic notion of \\emph{cohomology} \nin every $\\infty$-topos $\\mathbf{H}$: it is simply given by the \nconnected components of mapping spaces. Of course such mapping spaces\nexist in every $\\infty$-category, but we need some extra conditions on \n$\\mathbf{H}$ in order for them to behave like cohomology sets. For\ninstance, if $\\mathbf{H}$ has pullbacks then there is a notion of\nlong exact sequences in cohomology. \nOur main theorem (Theorem~\\ref{PrincipalInfinityBundleClassification} below) will show that the second\nand third $\\infty$-Giraud axioms imply that this intrinsic\nnotion of cohomology has the property that it \\emph{classifies} \ncertain geometric structures in the $\\infty$-topos.\n\n\\begin{definition}\n \\label{cohomology}\nFor $X,A \\in \\mathbf{H}$ two objects, we say that\n$$\n H^0(X,A) := \\pi_0 \\mathbf{H}(X,A)\n$$\nis the \\emph{cohomology set}\\index{cohomology!general abstract} of $X$ with coefficients in $A$. \nIn particular if $G$ is an $\\infty$-group we write\n$$\n H^1(X,G) := H^0(X,\\mathbf{B}G) = \\pi_0 \\mathbf{H}(X, \\mathbf{B}G)\n$$\nfor cohomology with coefficients in the delooping \n$\\mathbf{B}G$ of $G$. \nGenerally, if $K \\in \\mathbf{H}$ has a $n$-fold delooping \n$\\mathbf{B}^nK$ for some non-negative integer $n$, we write\n$$\n H^n(X,K) := H^0(X,\\mathbf{B}^n K) = \\pi_0 \\mathbf{H}(X, \\mathbf{B}^n K)\n \\,.\n$$\n\\end{definition}\nIn the context of cohomology on $X$ wth coefficients in $A$ we say that\n\\begin{itemize}\n\\item\n the hom-space $\\mathbf{H}(X,A)$ is the \\emph{cocycle $\\infty$-groupoid}\\index{\n!cocycle};\n\\item\n an object $g : X \\to A$ in $\\mathbf{H}(X,A)$ is a \\emph{cocycle};\n\\item \n a morphism: $g \\Rightarrow h$ in $\\mathbf{H}(X,A)$ is a \\emph{coboundary} between cocycles.\n\\item \n a morphism $c : A \\to B$ in $\\mathbf{H}$ \n represents the \\emph{characteristic class}\\index{characteristic class!general abstract}\n $$\n [c] : H^0(-,A) \\to H^0(-,B)\n \\,.\n $$\n\\end{itemize}\nIf $X\\simeq Y\/\\!\/G$ is a homotopy quotient, then the cohomology of $X$ is \nequivariant cohomology of $Y$. Similarly, for general $X$ this notion of cohomology\nincorporates various local notions of equivariance.\n\\begin{remark}\n \\label{CohomologyOverX}\nOf special interest is the cohomology defined by a slice \n$\\infty$-topos \n$$\n \\mathcal{X} := \\mathbf{H}_{\/X}\n$$ \nover some $X \\in \\mathbf{H}$.\nSuch a slice is canonically equipped with the \n{\\'e}tale geometric morphism (\\cite{Lurie}, Remark 6.3.5.10)\n$$\n (X_! \\dashv X^* \\dashv X_*)\n :\n \\xymatrix{\n \\mathbf{H}_{\/X}\n\t \\ar@<1.3ex>[rr]^-{X_!}\n\t \\ar@{<-}[rr]|-{X^*}\n\t \\ar@<-1.3ex>[rr]_-{X_*}\n\t &&\n\t \\mathbf{H}\n } \n \\,,\n$$\nwhere $X_!$ simply forgets the morphism to $X$ and \nwhere $X^* = X \\times (-)$ forms the product with $X$. \nAccordingly $X^* (*_{\\mathbf{H}}) \\simeq *_{\\mathcal{X}} =: X$ \nand $X_! (*_{\\mathcal{X}}) = X \\in \\mathbf{H}$. Therefore \ncohomology over $X$ with coefficients of the form $X^* A$ is \nequivalently the cohomology in $\\mathbf{H}$ of $X$ with coefficients in $A$:\n$$\n \\mathcal{X}(X, X^* A) \\simeq \\mathbf{H}(X,A)\n \\,.\n$$ \nBut for a general coefficient object $A \\in \\mathcal{X}$ the \n$A$-cohomology over $X$ in $\\mathcal{X}$ is a \n\\emph{twisted} cohomology of $X$ in $\\mathbf{H}$.\nThis we discuss below in Section~\\ref{TwistedCohomology}.\n\\end{remark}\nTypically one thinks of a morphism $A \\to B$ in \n$\\mathbf{H}$ as presenting a \\emph{characteristic class} of $A$ if\n$B$ is ``simpler'' than $A$, notably if $B$ is an Eilenberg-MacLane object $B = \\mathbf{B}^n K$ for\n$K$ a 0-truncated abelian group in $\\mathbf{H}$. In this case the characteristic class may\nbe regarded as being in the degree-$n$ $K$-cohomology of $A$\n$$\n [c] \\in H^n(A,K)\n \\,.\n$$\n\n\\begin{definition}\n For $f : Y \\to Z$ any morphism in $\\mathbf{H}$\n and $z : * \\to Z$ a point, the \\emph{$\\infty$-fiber} or\n \\emph{homotopy fiber} of $f$ over this point is the $\\infty$-pullback \n $ X := {*} \\times_Z Y$\n $$\n \\raisebox{20pt}{\n \\xymatrix{\n X \\ar[r] \\ar[d]& {*} \\ar[d]\n \\\\\n Y \\ar[r]^f & Z\\,.\n }\n\t}\n $$\n\\end{definition}\n\\begin{observation}\n Let $f\\colon Y\\to Z$ in $\\mathbf{H}$ \n be as above. Suppose that $Y$ is pointed and $f$ is a morphism of pointed objects.\n Then the $\\infty$-fiber of an $\\infty$-fiber is the loop object of the base.\n\\end{observation}\nThis means that we have a diagram\n $$\n \\xymatrix{\n \\Omega Z \\ar[d] \\ar[r] & X \\ar[r] \\ar[d]& {*} \\ar[d]\n \\\\\n {*} \\ar[r] & Y \\ar[r]^f & Z\n }\n $$\nwhere the outer rectangle is an $\\infty$-pullback if the left square is an \n$\\infty$-pullback. This follows from the pasting law, Proposition~\\ref{PastingLawForPullbacks}.\n\\begin{definition}\n \\label{fiber sequence}\n \\label{LongFiberSequence}\nFor every morphism $c : \\mathbf{B}G \\to \\mathbf{B}H \\in \\mathbf{H}$ define the \n\\emph{long fiber sequence to the left}\n$$\n \\cdots \n \\to \n \\Omega G\n \\to \n \\Omega H \n \\to \n F\n \\to \n G \n \\to \n H \n \\to \n \\mathbf{B} F \n \\to \n \\mathbf{B}G\n \\stackrel{c}{\\to} \n \\mathbf{B}H\n$$\nby the consecutive pasting diagrams of $\\infty$-pullbacks\n$$\n \\xymatrix{\n & \\ar@{..}[d] & \\ar@{..}[d]\n \\\\\n \\ar@{..}[r] & F \\ar[d]\\ar[r]& G \\ar[r] \\ar[d] & {*} \\ar[d]\n \\\\\n & {*} \\ar[r] & H \\ar[r] \\ar[d] & \\mathbf{B}F \\ar[r] \\ar[d] & {*} \\ar[d]\n \\\\\n & & {*} \\ar[r] & \\mathbf{B}G \\ar[r]^c & \\mathbf{B}H\n }\n$$\n\\end{definition}\n\\begin{theorem}\n\\begin{enumerate}\n\\item The long fiber sequence to the left of \n$c : \\mathbf{B}G \\to \\mathbf{B}H$ becomes constant on the point after $n$ iterations if $H$ is $n$-truncated. \n\\item For every object $X \\in \\mathbf{H}$ we have a long exact sequence of pointed cohomology sets\n $$ \n \\cdots \\to H^0(X,G) \\to H^0(X,H) \\to H^1(X,F) \\to H^1(X,G) \\to H^1(X,H)\n \\,.\n $$\n\\end{enumerate}\n \\label{LongExactSequenceInCohomology}\n\\end{theorem}\n\\proof\nThe first statement follows from the observation that a \nloop space object $\\Omega_x A$ is a fiber of the free loop space object $\\mathcal{L} A$\nand that this may equivalently be computed by the \n$\\infty$-powering $A^{S^1}$, where $S^1 \\in \\mathrm{Top} \\simeq \\mathrm{Grpd}_{\\infty}$ is the circle. \n\nThe second statement follows by observing that the \n$\\infty$-hom-functor \n$$\n \\mathbf{H}(X,-) : \\mathbf{H} \\to \\mathrm{Grpd}_\\infty\n$$\npreserves all $\\infty$-limits, so that we have $\\infty$-pullbacks in $\\mathrm{Grpd}_{\\infty}$ of the form \n$$ \n \\xymatrix{\n \\mathbf{H}(X,F) \\ar[r] \\ar[d] & {*} \\ar[d]\n \\\\\n \\mathbf{H}(X,G) \\ar[r] & \\mathbf{H}(X,H)\n }\n$$\nat each stage of the fiber sequence. \nThe statement then follows from the familiar long exact sequence for homotopy groups \nin $\\mathrm{Top} \\simeq \\mathrm{Grpd}_{\\infty}$.\n\\hfill{$\\square$}\\\\\n\\begin{remark}\n For the special case that $G$ is a 1-truncated $\\infty$-group (or\n \\emph{2-group}) Theorem \\ref{LongExactSequenceInCohomology} is \n a classical result due to \\cite{BreenBitorseurs}. The first and\n only nontrivial\n stage of the internal Postnikov tower \n $$\n \\xymatrix{\n\t \\mathbf{B}^2 A \\ar[r] & \\mathbf{B}G \\ar[d]\n\t \\\\\n\t & \\mathbf{B} H\n\t}\n $$ \n of the delooped 2-group (with $H := \\tau_0 G\\in \\tau_{\\leq 0} \\mathrm{Grp}(\\mathbf{H})$ \n an ordinary group object and $A := \\pi_1 G \\in \\tau_{\\leq 0} \\mathrm{Grp}(\\mathbf{H})$\n an ordinary abelian group object) yields the long exact sequence of pointed cohomology\n sets\n $$\n 0 \\to H^1(-,A) \\to H^0(-,G) \\to H^0(-,H) \\to H^2(-,A) \\to H^1(-,G) \\to \n\tH^1(-,H) \\to H^3(-,A)\n $$\n (see also \\cite{NikolausWaldorf2}.)\n Notably, the last morphism gives the obstructions against lifting traditional\n nonabelian cohomology $H^1(-,H)$ to nonabelian cohomology $H^1(-,G)$ with values\n in the 2-group. This we discuss further in Section \\ref{ExtensionsOfCohesiveInfinityGroups}.\n \\label{ReferencesOnLongSequences}\n\\end{remark}\n\nGenerally, to every cocycle $g : X \\to \\mathbf{B}G$ is \ncanonically associated its $\\infty$-fiber \n$P \\to X$ in $\\mathbf{H}$, the $\\infty$-pullback\n$$\n \\raisebox{20pt}{\n \\xymatrix{\n P \\ar[r] \\ar[d]& {*} \\ar[d]\n \\\\\n X \\ar[r] ^g & \\mathbf{B}G\n \\,.\n }\n }\n$$\nWe discuss now that each such $P$ canonically has the structure of a \n\\emph{$G$-principal $\\infty$-bundle} and that $\\mathbf{B}G$ is the \n\\emph{fine moduli object} (the \\emph{moduli $\\infty$-stack}) for \n$G$-principal $\\infty$-bundles.\n\n\n\n\\section{Principal bundles}\n\\label{Principal infinity-bundles general abstract}\n\\label{PrincipalInfBundle}\n\n\nWe define here $G$-principal $\\infty$-bundles in any $\\infty$-topos\n$\\mathbf{H}$, discuss their basic properties and show that they are classified\nby the intrinsic $G$-cohomology in $\\mathbf{H}$, as discussed in \nDefinition~\\ref{cohomology}.\n\n\\subsection{Introduction and survey}\n\\label{PrincBund-Intro}\n\nLet $G$ be a topological group, or Lie group or \nsome similar such object. The traditional \ndefinition of \\emph{$G$-principal bundle} is the following: \nthere is a map \n$$\n P \\to X := P\/G\n$$ \nwhich is the quotient projection\ninduced by a \\emph{free} action \n$$\n \\rho : P \\times G \\to P\n$$ \nof $G$ on a space (or manifold, depending on context) $P$,\nsuch that there is a cover $U \\to X$ over which the quotient projection is isomorphic\nto the trivial one $U \\times G \\to U$.\n \nIn higher geometry, if $G$ is a topological or smooth \n$\\infty$-group, the quotient projection must be \nreplaced by the $\\infty$-quotient (homotopy quotient) \nprojection \n\\[\nP\\to X := P\/\\!\/ G\n\\]\nfor the action of $G$ on a topological or smooth $\\infty$-groupoid \n(or $\\infty$-stack) $P$. It is a remarkable fact that this \nsingle condition on the map $P\\to X$ \nalready implies that $G$ acts freely on $P$ and that $P\\to X$ \nis locally trivial, when the latter notions are understood in the \ncontext of higher geometry. We will therefore define \na $G$-principal $\\infty$-bundle to be such a map $P\\to X$. \n\n \n\nAs motivation for this, notice that if a Lie group $G$ acts properly, \nbut not freely, then the quotient $P \\to X := P\/G$ differs from the homotopy quotient.\nSpecifically, if precisely the subgroup $G_{\\mathrm{stab}} \\hookrightarrow G$ acts trivially, then \nthe homotopy quotient is \ninstead the \\emph{quotient stack} $X \/\\!\/ G_{\\mathrm{stab}}$ \n(sometimes written $[X\/\\!\/G_{\\mathrm{stab}}]$, \nwhich is an orbifold if $G_{\\mathrm{stab}}$ is finite). The ordinary \nquotient coincides with the homotopy quotient if and only if the stabilizer subgroup\n$G_{\\mathrm{stab}}$ is trivial, and hence if and only if the action of $G$ is free.\n\nConversely this means that in the context of higher geometry a non-free action\nmay also be principal: with respect not to a base space, but with respect to a base groupoid\/stack.\nIn the example just discussed, we have that the projection $P \\to X\/\\!\/ G_{\\mathrm{stab}}$\nexhibits $P$ as a $G$-principal bundle over the action groupoid \n$P \/\\!\/ G \\simeq X\/\\!\/ G_{\\mathrm{stab}}$. For instance if $P = V$ is a\nvector space equipped with a $G$-representation, then $V \\to V\/\\!\/ G$ is a\n$G$-principal bundle over a groupoid\/stack.\nIn other words, the traditional requirement of freeness in a principal action is not so much\na characterization of principality as such, as rather a condition that ensures that the\nbase of a principal action is a 0-truncated object in higher geometry.\n\nBeyond this specific class of 0-truncated examples, this means that we have the following \nnoteworthy general statement: in higher geometry \\emph{every} $\\infty$-action \nis principal with respect to\n\\emph{some} base, namely with respect to its $\\infty$-quotient. In this sense\nthe notion of principal bundles is (even) more fundamental to higher geometry than\nit is to ordinary geometry. \nAlso, several constructions in ordinary geometry that are\ntraditionally thought of as conceptually different from the notion of principality\nturn out to be special cases of principality in higher geometry. For instance\na central extension of groups $A\\to \\hat G \\to G$ turns out to be \nequivalently a higher principal bundle, namely a $\\mathbf{B}A$-principal 2-bundle\nof moduli stacks $\\mathbf{B}\\hat G \\to \\mathbf{B}G$. Following this\nthrough, one finds that the topics \nof principal $\\infty$-bundles, of $\\infty$-group extensions (\\ref{ExtensionsOfCohesiveInfinityGroups}), \nof $\\infty$-representations (\\ref{StrucRepresentations}), \nand of $\\infty$-group cohomology\nare all different aspects of just one single concept in higher geometry.\n\nMore is true: in the context of an $\\infty$-topos \nevery $\\infty$-quotient projection of an $\\infty$-group action \nis locally trivial, with respect to\nthe canonical intrinsic notion of cover, hence of locality. Therefore\nalso the condition of local triviality in the classical definition of principality\nbecomes automatic. This is a direct consequence of the third\n$\\infty$-Giraud axiom, Definition~\\ref{GiraudRezkLurieAxioms}\nthat ``all $\\infty$-quotients are effective''.\nThis means that the projection map $P \\to P \/\\!\/ G$ is always a cover\n(an \\emph{effective epimorphism}) and so, since every $G$-principal $\\infty$-bundle\ntrivializes over itself, it exhibits a local trivialization of itself; \neven without explicitly requiring it to be locally trivial.\n\nAs before, this means that the local triviality clause appearing in the\ntraditional definition of principal bundles is not so much a characteristic of\nprincipality as such, as rather a condition that ensures that a given quotient \ntaken in a category of geometric spaces coincides with the ``correct'' quotient\nobtained when regarding the situation in the ambient $\\infty$-topos. \n\nAnother direct consequence of the $\\infty$-Giraud axioms\nis the equivalence of the definition of principal bundles as quotient maps, which \nwe discussed so far, with the other main definition of principality: the condition \nthat the ``shear map'' $ (\\mathrm{id}, \\rho) : P \\times G \\to P \\times_X P$ is an equivalence. \nIt is immediate to verify in traditional 1-categorical contexts that this is \nequivalent to the action being properly free and exhibiting $X$ as its quotient\n(we discuss this in detail in \\cite{NSSc}). \nSimple as this is, one may observe, in view of the above discussion, \nthat the shear map being an equivalence is much more fundamental even: notice\nthat $P \\times G$ is the first stage of the \\emph{action groupoid object}\n$P\/\\!\/G$, and that $P \\times_X P$ is the first stage of the \\emph{{\\v C}ech nerve groupoid object}\n$\\check{C}(P \\to X)$ of the corresponding quotient map. Accordingly, the shear map equivalence\nis the first stage in the equivalence of groupoid objects in the $\\infty$-topos\n$$\n P \/\\!\/G \\simeq \\check{C}(P \\to X)\n \\,.\n$$\nThis equivalence is just the explicit statement of the fact mentioned before: the groupoid object\n$P\/\\!\/G$ is effective -- as is any groupoid object in an $\\infty$-topos -- and, equivalently,\nits principal $\\infty$-bundle map $P \\to X$ is an effective epimorphism.\n\nFairly directly from this fact, finally, springs the classification theorem of \nprincipal $\\infty$-bundles. For we have a canonical morphism of groupoid objects\n$P \/\\!\/G \\to * \/ \\!\/G$ induced by the terminal map $P \\to *$. By the $\\infty$-Giraud\ntheorem the $\\infty$-colimit over this sequence of morphisms of groupoid objects\nis a $G$-cocycle on $X$ (Definition~\\ref{cohomology}) canonically induced by $P$:\n$$\n \\varinjlim \\left(\\check{C}(P \\to X)_\\bullet \\simeq (P \/\\!\/G)_\\bullet \\to (* \/\\!\/G)_\\bullet \\right) \n = \n (X \\to \\mathbf{B}G) \n \\;\\;\\;\n \\in \\mathbf{H}(X, \\mathbf{B}G)\n \\,.\n$$\nConversely, from any such $G$-cocycle one finds that one obtains a $G$-principal \n$\\infty$-bundle simply by forming its $\\infty$-fiber: the $\\infty$-pullback of\nthe point inclusion ${*} \\to \\mathbf{B}G$. We show in \\cite{NSSb} that in presentations\nof the $\\infty$-topos theory by 1-categorical tools, the computation of this homotopy\nfiber is \\emph{presented} by the ordinary pullback of a big resolution of the point, \nwhich turns out to be nothing but the universal $G$-principal bundle. \nThis appearance of the universal $\\infty$-bundle as just \na resolution of the point inclusion may be understood in light of the above discussion \nas follows. \nThe classical characterization of the \nuniversal $G$-principal bundle $\\mathbf{E}G$ is as a space that is homotopy equivalent\nto the point and equipped with a \\emph{free} $G$-action. But by the above, freeness of the\naction is an artefact of 0-truncation and not a characteristic of principality in higher\ngeometry. Accordingly, in higher geometry the universal $G$-principal $\\infty$-bundle\nfor any $\\infty$-group $G$ may be taken to \\emph{be} the point, equipped with the \ntrivial (maximally non-free) $G$-action. As such, it is a bundle not over the \nclassifying \\emph{space} $B G$ of $G$, but over the full moduli $\\infty$-stack $\\mathbf{B}G$.\n\nThis way we have natural assignments of $G$-principal $\\infty$-bundles to \ncocycles in $G$-nonabelian cohomology, and vice versa. We find (see \nTheorem~\\ref{PrincipalInfinityBundleClassification} below) that\nprecisely the second $\\infty$-Giraud axiom of Definition~\\ref{GiraudRezkLurieAxioms}, \nnamely the fact that in an $\\infty$-topos $\\infty$-colimits are preserved by\n$\\infty$-pullback, \nimplies that these \nconstructions constitute an equivalence of $\\infty$-groupoids, hence \nthat $G$-principal $\\infty$-bundles are classified by $G$-cohomology.\n\nThe following table summarizes the relation between\n$\\infty$-bundle theory and the $\\infty$-Giraud axioms as indicated above, and as \nproven in the following section.\n\n\\medskip\n\\begin{center}\n\\begin{tabular}{c|c}\n {\\bf $\\infty$-Giraud axioms} & {\\bf principal $\\infty$-bundle theory}\n \\\\\n \\hline\n \\hline\n quotients are effective & \n \\begin{tabular}{c} \\\\ every $\\infty$-quotient $P \\to X := P\/\\!\/ G$ \\\\is principal \\\\ \\ \\end{tabular}\n \\\\\n \\hline\n colimits are preserved by pullback & \n \\begin{tabular}{c}\\\\ $G$-principal $\\infty$-bundles \\\\ are classified by $\\mathbf{H}(X,\\mathbf{B}G)$\\\\\n \\end{tabular}\n\\end{tabular}\n\\end{center}\n\n\\subsection{Definition and classification}\n\\label{DefintionAndClassification}\n\n\n\\begin{definition} \n \\label{ActionInPrincipal}\n For $G \\in \\mathrm{Grp}(\\mathbf{H})$ a group object,\n we say a \\emph{$G$-action} on an object $P \\in \\mathbf{H}$\n is a groupoid object $P\/\\!\/G$ (Definition~\\ref{GroupoidObject}) of the form\n $$\n \\xymatrix{\n \\cdots\n \\ar@<+6pt>[r] \\ar@<+2pt>[r] \\ar@<-2pt>[r] \\ar@<-6pt>[r]\n &\n P \\times G \\times G\n \\ar@<+4pt>[r] \n \\ar[r] \n \\ar@<-4pt>[r] \n & \n P \\times G \n \\ar@<+2pt>[r]^<<<<<{\\rho := d_0 } \\ar@<-2pt>[r]_{d_1} \n & P\n }\n $$\n such that $d_1 : P \\times G \\to P$ is the projection, and such that \n the degreewise projections \n $P \\times G^n \\to G^n $ constitute a morphism of groupoid\n objects\n $$\n \\xymatrix{\n \\cdots\n \\ar@<+6pt>[r] \\ar@<+2pt>[r] \\ar@<-2pt>[r] \\ar@<-6pt>[r]\n &\n P \\times G \\times G\n \\ar[d]\n \\ar@<+4pt>[r] \n \\ar[r] \n \\ar@<-4pt>[r] \n & \n P \\times G \n \\ar[d]\n \\ar@<+2pt>[r] \\ar@<-2pt>[r] \n & P\n \\ar[d]\n \\\\\n \\cdots\n \\ar@<+6pt>[r] \\ar@<+2pt>[r] \\ar@<-2pt>[r] \\ar@<-6pt>[r]\n &\n G \\times G\n \\ar@<+4pt>[r] \n \\ar[r] \n \\ar@<-4pt>[r] \n & \n G \n \\ar@<+2pt>[r] \\ar@<-2pt>[r] \n & {*} \n }\n $$\nwhere the lower simplicial object exhibits $G$ as a groupoid \nobject over $\\ast$ (see Remark~\\ref{Cech nerve of * -> BG}). \n \n With convenient abuse of notation we also write\n $$ \n P\/\\!\/G := \\varinjlim (P \\times G^{\\times^\\bullet})\\;\\; \n \\in \\mathbf{H}\n $$\n for the corresponding $\\infty$-colimit object, the \\emph{$\\infty$-quotient} of this \n action. \n \n Write\n $$\n G \\mathrm{Action}(\\mathbf{H}) \\hookrightarrow \\mathrm{Grpd}(\\mathbf{H})_{\/({*}\/\\!\/G)}\n $$\n for the full sub-$\\infty$-category of groupoid objects over $*\/\\!\/G$\n on those that are $G$-actions. \n\\end{definition}\n\\begin{remark}\n \\label{ActionMapEncodedInGBundle}\n The remaining face map $d_0$\n $$\n \\rho := d_0 : P \\times G \\to P\n $$\n is the action itself.\n\\end{remark}\n\\begin{remark}\n Using this notation in Proposition~\\ref{InfinityGroupObjectsAsGroupoidObjects}\n we have\n $$\n \\mathbf{B}G \\simeq *\/\\!\/G\n \\,.\n $$\n\\end{remark}\nWe list examples of $\\infty$-actions below as Example \\ref{ExamplesOfActions}.\nThis is most conveniently done after astablishing the theory of \nprincipal $\\infty$-actions, to which we now turn.\n\n\\begin{definition}\n \\label{principalbundle}\n Let $G \\in \\infty \\mathrm{Grp}(\\mathbf{H})$ be an \n $\\infty$-group and let $X$ be an object of $\\mathbf{H}$. \n A {\\em $G$-principal $\\infty$-bundle} over $X$ \n (or \\emph{$G$-torsor over $X$}) \n is \n \\begin{enumerate}\n \\item a morphism $P \\to X$ in $\\mathbf{H}$;\n\t\\item together with a $G$-action on $P$;\n \\end{enumerate} \n such that $P \\to X$ is the colimiting cocone exhibiting the quotient map\n $X \\simeq P\/\\!\/G$ (Definition \\ref{ActionInPrincipal}).\n \n A \\emph{morphism} of $G$-principal $\\infty$-bundles over $X$ is a morphism of $G$-actions \n that fixes $X$; the $\\infty$-category of $G$-principal $\\infty$-bundles over $X$\n is the homotopy fiber of $\\infty$-categories\n $$\n G \\mathrm{Bund}(X) := G \\mathrm{Action}(\\mathbf{H}) \\times_{\\mathbf{H}} \\{X\\}\n $$\n over $X$ of the quotient map\n $$\n \\xymatrix{\n G \\mathrm{Action}(\\mathbf{H}) \n\t \\ar@{^{(}->}[r] & \\mathrm{Grpd}(\\mathbf{H})_{\/(*\/\\!\/G)} \n\t \\ar[r] &\n\t \\mathrm{Grpd}(\\mathbf{H}) \n\t \\ar[r]^-{\\varinjlim}\n\t &\n\t \\mathbf{H}\n\t}\n\t\\,.\n $$\n\\end{definition}\n\\begin{remark}\n \\label{GBundlesAreEffectiveEpimorphisms}\n By the third $\\infty$-Giraud axiom (Definition~\\ref{GiraudRezkLurieAxioms})\n this means in particular that a \n $G$-principal $\\infty$-bundle $P \\to X$ is an \n effective epimorphism in $\\mathbf{H}$.\n\\end{remark}\n\\begin{remark}\n Even though $G \\mathrm{Bund}(X)$ is by definition a priori an $\\infty$-category,\n Proposition \\ref{MorphismsOfInfinityBundlesAreEquivalences} below says\n that in fact it happens to be $\\infty$-groupoid: all\n its morphisms are invertible.\n\\end{remark}\n\\begin{proposition}\n \\label{PrincipalityCondition}\n A $G$-principal $\\infty$-bundle $P \\to X$ satisfies the\n \\emph{principality condition}: the canonical morphism\n $$\n (\\rho, p_1)\n\t:\n \\xymatrix{\n\t P \\times G \n\t \\ar[r]^{\\simeq}\n\t &\n\t P \\times_X P\n\t}\n $$\n is an equivalence, where $\\rho$ is the $G$-action.\n\\end{proposition}\n\\proof\n By the third $\\infty$-Giraud axiom (Definition~\\ref{GiraudRezkLurieAxioms}) the groupoid object\n $P\/\\!\/G$ is effective, which means that it is equivalent\n to the {\\v C}ech nerve of $P \\to X$. In first degree this implies\n a canonical equivalence $P \\times G \\to P \\times_X P$. Since\n the two face maps $d_0, d_1 : P \\times_X P \\to P$ in the\n {\\v C}ech nerve are simply the projections out of the fiber product, \n it follows that the two components of this canonical equivalence\n are the two face maps $d_0, d_1 : P \\times G \\to P$ of $P\/\\!\/G$.\n By definition, these are the projection onto the first factor\n and the action itself. \n\\hfill{$\\square$}\\\\\n\\begin{proposition}\n \\index{principal $\\infty$-bundle!construction from cocycle}\n \\label{BundleStructureOnInfinityFiber}\n \\label{PrincipalBundleAsHomotopyFiber}\n For $g : X \\to \\mathbf{B}G$ any morphism, its homotopy fiber\n $P \\to X$ canonically carries the structure of a \n $G$-principal $\\infty$-bundle over $X$.\n\\end{proposition}\n\\proof\n That $P \\to X$ is the fiber of $g : X \\to \\mathbf{B}G$\n means that we have an $\\infty$-pullback diagram\n $$\n \\raisebox{20pt}{\n \\xymatrix{\n P \\ar[d]\\ar[r] & {*}\\ar[d]\n \\\\\n X \\ar[r]^g & \\mathbf{B}G.\n }\n\t}\n $$\n By the pasting law for $\\infty$-pullbacks, Proposition~\\ref{PastingLawForPullbacks},\n this induces a compound diagram\n $$\n \\xymatrix{\n \\cdots\n \\ar@<+6pt>[r] \\ar@<+2pt>[r] \\ar@<-2pt>[r] \\ar@<-6pt>[r]\n &\n P \\times G \\times G\n \\ar[d]\n \\ar@<+4pt>[r] \n \\ar[r] \n \\ar@<-4pt>[r] \n & \n P \\times G \n \\ar[d]\n \\ar@<+2pt>[r] \\ar@<-2pt>[r] \n & \n P\n \\ar[d]\n \\ar@{->>}[r]\n &\n X\n \\ar[d]^g\n \\\\\n \\cdots\n \\ar@<+6pt>[r] \\ar@<+2pt>[r] \\ar@<-2pt>[r] \\ar@<-6pt>[r]\n &\n G \\times G\n \\ar@<+4pt>[r] \n \\ar[r] \n \\ar@<-4pt>[r] \n & \n G \n \\ar@<+2pt>[r] \\ar@<-2pt>[r] \n & \n {*} \n \\ar@{->>}[r]\n &\n \\mathbf{B}G\n }\n $$\n where each square and each composite rectangle is an \n $\\infty$-pullback. \n This exhibits the $G$-action on $P$. \n Since $* \\to \\mathbf{B}G$\n is an effective epimorphism, so is its $\\infty$-pullback\n $P \\to X$. Since, by the $\\infty$-Giraud theorem, $\\infty$-colimits are preserved\n by $\\infty$-pullbacks we have that $P \\to X$ exhibits the \n $\\infty$-colimit $X \\simeq P\/\\!\/G$. \n\\hfill{$\\square$}\\\\\n\\begin{lemma}\n For $P \\to X$ a $G$-principal $\\infty$-bundle\n obtained as in Proposition~\\ref{BundleStructureOnInfinityFiber}, and for\n $x : * \\to X$ any point of $X$, we have \n a canonical equivalence\n $$\n \\xymatrix{\n\t x^* P \\ar[r]^{\\simeq} & G\n\t}\n $$\n between the fiber $x^*P$ and the $\\infty$-group object $G$.\n\\end{lemma}\n\\proof\n This follows from the pasting law for $\\infty$-pullbacks, which \n gives the diagram\n $$\n \\xymatrix{\n G \\ar[d] \\ar[r] & P \\ar[d]\\ar[r] & {*} \\ar[d]\n \\\\\n {*} \\ar[r]^x & X \\ar[r]^g & \\mathbf{B}G\n }\n $$\n in which both squares as well as the total rectangle are\n $\\infty$-pullbacks.\n\\hfill{$\\square$}\\\\\n\\begin{definition}\n \\label{TrivialGBundle}\n The \\emph{trivial} $G$-principal $\\infty$-bundle $(P \\to X) \\simeq (X \\times G \\to X)$\n is, up to equivalence, the one obtained via Proposition~\\ref{BundleStructureOnInfinityFiber}\n from the morphism $X \\to * \\to \\mathbf{B}G$. \n\\end{definition}\n\\begin{observation}\n \\label{PullbackOfInfinityTorsors}\n For $P \\to X$ a $G$-principal $\\infty$-bundle and $Y \\to X$ any morphism, the\n $\\infty$-pullback $Y \\times_X P$ naturally inherits the structure of \n a $G$-principal $\\infty$-bundle.\n\\end{observation}\n\\proof\n This uses the same kind of argument as in Proposition~\\ref{BundleStructureOnInfinityFiber}\n (which is the special case of the pullback of what we will see is the\n universal $G$-principal $\\infty$-bundle $*\\to \\mathbf{B}G$ below in \n Proposition~\\ref{LocalTrivialityImpliesCocycle}).\n\\hfill{$\\square$}\\\\\n\\begin{definition}\n \\label{GInfinityBundleAndMorphism}\n \\label{GPrincipalInfinityBundle}\n A $G$-principal $\\infty$-bundle $P \\to X$ is called\n \\emph{locally trivial}\n if there exists an effective epimorphism $\\xymatrix{U \\ar@{->>}[r] & X}$\n and an equivalence of $G$-principal $\\infty$-bundles\n $$\n U \\times_X P \\simeq U \\times G\n $$\n from the pullback of $P$ (Observation~\\ref{PullbackOfInfinityTorsors})\n to the trivial $G$-principal $\\infty$-bundle over $U$ (Definition~\\ref{TrivialGBundle}).\n\\end{definition}\n\\begin{proposition}\n \\label{EveryGBundleIsLocallyTrivial}\n Every $G$-principal $\\infty$-bundle is locally trivial.\n\\end{proposition}\n\\proof\n For $P \\to X$ a $G$-principal $\\infty$-bundle, it is, by \n Remark~\\ref{GBundlesAreEffectiveEpimorphisms}, itself an effective\n epimorphism. The pullback of the $G$-bundle to its \n own total space along this morphism is trivial,\n by the principality condition\n (Proposition~\\ref{PrincipalityCondition}). Hence setting $U := P$ \n proves the claim.\n\\hfill{$\\square$}\\\\\n\\begin{remark}\n This means that every $G$-principal $\\infty$-bundle is in particular a\n $G$-fiber $\\infty$-bundle (in the evident sense of Definition~\\ref{FiberBundle} below).\n But not every $G$-fiber bundle is $G$-principal, since the local trivialization\n of a fiber bundle need not respect the $G$-action. \n\\end{remark}\n\\begin{proposition}\n \\label{LocalTrivialityImpliesCocycle}\n For every $G$-principal $\\infty$-bundle $P \\to X$ the square\n $$\n \\xymatrix{\n & P \\ar[d] \\ar[r] & {*} \\ar[d]\n \\\\\n X \\ar@{}[r]|<<<\\simeq\n & \\varinjlim_n (P \\times G^{\\times_n})\n \\ar[r]\n &\n \\varinjlim_n G^{\\times_n}\n \\ar@{}[r]|\\simeq\n &\n \\mathbf{B}G\n }\n $$\n is an $\\infty$-pullback diagram.\n\\end{proposition}\n\\proof\n Let $U \\to X$ be an effective epimorphism\n such that $P \\to X$ pulled back to $U$ becomes the trivial $G$-principal\n $\\infty$-bundle. By Proposition~\\ref{EveryGBundleIsLocallyTrivial} this exists.\n By definition of morphism of $G$-actions and \n by functoriality of the $\\infty$-colimit, this induces \n a morphism in ${\\mathbf{H}^{\\Delta[1]}}_{\/(* \\to \\mathbf{B}G)}$ \n corresponding to the diagram\n $$\n \\raisebox{20pt}{\n \\xymatrix{\n\t U \\times G \\ar@{->>}[r] \\ar@{->>}[d] & P \\ar[r] \\ar@{->>}[d] & {*} \\ar@{->>}[d]^{\\mathrm{pt}}\n\t \\\\\n\t U \\ar@{->>}[r] & X \\ar[r] & \\mathbf{B}G\n\t}\n\t}\n\t\\;\\;\n\t\\simeq\n\t\\;\\;\n \\raisebox{20pt}{\n \\xymatrix{\n\t U \\times G \\ar@{->>}[rr] \\ar@{->>}[d] & & {*} \\ar@{->>}[d]^{\\mathrm{pt}}\n\t \\\\\n\t U \\ar[r] & {*} \\ar[r]^{\\mathrm{pt}} & \\mathbf{B}G\n\t}\n\t}\n $$\n in $\\mathbf{H}$. \n By assumption, in this diagram the outer rectangles and the square on the very left \n are $\\infty$-pullbacks. We need to show that\n the right square on the left is also an $\\infty$-pullback.\n \n Since $U \\to X$ is an effective epimorphism by assumption, and since these are\n stable under $\\infty$-pullback, $U \\times G \\to P$ is also an effective epimorphism,\n as indicated. This means that \n $$\n P \\simeq {\\varinjlim_n}\\, (U \\times G)^{\\times^{n+1}_P}\n\t\\,.\n $$\n We claim that for all $n \\in \\mathbb{N}$ the fiber products in the colimit on the right\n are naturally equivalent to $(U^{\\times^{n+1}_X}) \\times G$. For $n = 0$ this is\n clearly true. Assume then by induction that \n it holds for some $n \\in \\mathbb{N}$. Then\n with the pasting law (Proposition~\\ref{PastingLawForPullbacks}) we find an \n $\\infty$-pullback diagram of the form\n $$\n \\raisebox{30pt}{\n \\xymatrix{\n\t (U^{\\times^{n+1}_X}) \\times G \t \n\t \\ar@{}[r]|\\simeq\n\t & \n\t (U \\times G)^{\\times^{n+1}_P}\n\t \\ar[r] \\ar[d] \n\t & \n\t (U \\times G)^{\\times^n_P}\n \\ar[d]\n\t \\ar@{}[r]|{\\simeq}\n\t &\n\t (U^{\\times^{n}_X}) \\times G \n\t \\\\\n\t & U \\times G \\ar[r] \\ar[d] & P \\ar[d]\n\t \\\\\n\t & U \\ar[r] & X.\n\t}\n\t}\n $$\n This completes the induction.\n With this the above expression for $P$ becomes\n $$\n \\begin{aligned}\n P & \\simeq {\\varinjlim_n}\\, (U^{\\times^{n+1}_X}) \\times G\n\t \\\\\n\t & \\simeq {\\varinjlim_n} \\,\\mathrm{pt}^* \\, (U^{\\times^{n+1}_X}) \n\t \\\\\n\t & \\simeq \\mathrm{pt}^* \\, {\\varinjlim_n}\\, (U^{\\times^{n+1}_X}) \t \n\t \\\\\n\t & \\simeq \\mathrm{pt}^* \\, X,\n\t\\end{aligned}\n $$\n where we have used that by the second $\\infty$-Giraud axiom (Definition~\\ref{GiraudRezkLurieAxioms})\n we may take the $\\infty$-pullback out of the $\\infty$-colimit and \n where in the last step we \n used again the assumption that $U \\to X$ is an effective epimorphism.\n\\hfill{$\\square$}\\\\\n\\begin{example}\n The fiber sequence \n $$\n \\xymatrix{\n\t G \\ar[r] & {*} \\ar[d]\n\t \\\\\n\t & \\mathbf{B}G\n\t}\n $$\n which exhibits the delooping $\\mathbf{B}G$ of $G$ according to \n Theorem \\ref{DeloopingTheorem} is a $G$-principal $\\infty$-bundle\n over $\\mathbf{B}G$, with \\emph{trivial} $G$-action on its total space\n $*$. Proposition \\ref{LocalTrivialityImpliesCocycle} says that this is \n the \\emph{universal $G$-principal $\\infty$-bundle} in that every\n other one arises as an $\\infty$-pullback of this one. \n In particular, $\\mathbf{B}G$ is a classifying object for $G$-principal\n $\\infty$-bundles. \n \n Below in Theorem \\ref{ClassificationOfTwistedGEquivariantBundles} \n this relation is strengthened:\n every \\emph{automorphism} of a $G$-principal $\\infty$-bundle, and in fact\n its full automorphism $\\infty$-group arises from pullback of the above\n universal $G$-principal $\\infty$-bundle: $\\mathbf{B}G$ is the fine\n \\emph{moduli $\\infty$-stack} of $G$-principal $\\infty$-bundles.\n \n The traditional definition of universal $G$-principal bundles in terms of \n contractible objects equipped with a free $G$-action has no intrinsic\n meaning in higher topos theory. Instead this appears in \n \\emph{presentations} of the general theory in model categories\n (or categories of fibrant objects)\n as \\emph{fibrant representatives}\n $\\mathbf{E}G \\to \\mathbf{B}G$ of the above point inclusion.\n This we discuss in \\cite{NSSb}. \n \\label{UniversalPrincipal}\n\\end{example}\nThe main classification Theorem \\ref{PrincipalInfinityBundleClassification} below\nimplies in particular that every morphism in $G\\mathrm{Bund}(X)$ is an equivalence.\nFor emphasis we note how this also follows directly:\n\\begin{lemma}\n \\label{EquivalencesAreDetectedOverEffectiveEpimorphisms}\n Let $\\mathbf{H}$ be an $\\infty$-topos and let $X$ be an \n object of $\\mathbf{H}$. A morphism \n $f\\colon A\\to B$ in $\\mathbf{H}_{\/X}$ \n is an equivalence if and only if $p^*f$ is an equivalence in \n $\\mathbf{H}_{\/Y}$ for any effective epimorphism $p\\colon Y\\to X$ in \n $\\mathbf{H}$. \n\n \n\\end{lemma}\n\\proof\n It is clear, by functoriality, that $p^* f$ is a weak equivalence if $f$ is. \n Conversely, assume that $p^* f$ is a weak equivalence. \n Since effective epimorphisms as well as \n equivalences are preserved by pullback \n we get a simplicial diagram of the form\n $$\n \\raisebox{20pt}{\n \\xymatrix{\n \\cdots\n \\ar@<+4pt>[r]\n \\ar@<+0pt>[r]\n \\ar@<-4pt>[r]\n &\n p^* A \\times_A p^* A\n \\ar@<+2pt>[r]\n \\ar@<-2pt>[r]\n \\ar[d]^\\simeq\n &\n p^* A\n \\ar[d]^\\simeq\n \\ar@{->>}[r]\n & \n A\n \\ar[d]^f\n \\\\\n \\cdots\n \\ar@<+4pt>[r]\n \\ar@<+0pt>[r]\n \\ar@<-4pt>[r]\n &\n p^* B \\times_B p^* B\n \\ar@<+2pt>[r]\n \\ar@<-2pt>[r]\n &\n p^* B\n \\ar@{->>}[r]\n & \n B\n }\n\t}\n $$\n where the rightmost horizontal morphisms are effective epimorphisms, as indicated.\n By definition of effective epimorphisms this exhibits\n $f$ as an $\\infty$-colimit over equivalences, hence as\n an equivalence.\n\\hfill{$\\square$}\\\\\n\\begin{proposition}\n \\label{MorphismsOfInfinityBundlesAreEquivalences}\n Every morphism between $G$-actions over $X$ that are \n $G$-principal $\\infty$-bundles over $X$ is an equivalence.\n\\end{proposition}\n\\proof\n Since a morphism of $G$-principal bundles\n $P_1 \\to P_2$ is a morphism of {\\v C}ech nerves that fixes \n their $\\infty$-colimit $X$, up to equivalence, \n and since $* \\to \\mathbf{B}G$ is an effective \n epimorphism,\n we are, by Proposition~\\ref{LocalTrivialityImpliesCocycle}, in the situation of \n Lemma~\\ref{EquivalencesAreDetectedOverEffectiveEpimorphisms}.\n\\hfill{$\\square$}\\\\\n\\begin{theorem}\n \\label{PrincipalInfinityBundleClassification}\n For all $X, \\mathbf{B}G \\in \\mathbf{H}$ there is a natural\n equivalence of $\\infty$-groupoids\n $$\n G \\mathrm{Bund}(X)\n \\simeq\n \\mathbf{H}(X, \\mathbf{B}G)\n $$ \n which on vertices is the construction of Definition~\\ref{BundleStructureOnInfinityFiber}:\n a bundle $P \\to X$ is mapped to a morphism\n $X \\to \\mathbf{B}G$ such that $P \\to X \\to \\mathbf{B}G$ is a fiber\n sequence.\n\\end{theorem}\nWe therefore say\n\\begin{itemize}\n \\item $\\mathbf{B}G$ is the \\emph{classifying object} \n or \\emph{moduli $\\infty$-stack} for \n $G$-principal $\\infty$-bundles;\n \\item a morphism $c : X \\to \\mathbf{B}G$ is a \\emph{cocycle}\n for the corresponding $G$-principal $\\infty$-bundle and its class \n $[c] \\in \\mathrm{H}^1(X,G)$ is its \n \\emph{characteristic class}.\n\\end{itemize}\n\\proof\n By Definitions~\\ref{ActionInPrincipal} \n and~\\ref{principalbundle} and using \n the refined statement of the third $\\infty$-Giraud axiom \n (Theorem~\\ref{NaturalThirdGiraud}), the\n $\\infty$-groupoid of $G$-principal $\\infty$-bundles over $X$ is \n equivalent to the fiber over $X$\n of the\n sub-$\\infty$-category \n of the slice\n of the arrow $\\infty$-topos \n on those squares\n $$\n \\xymatrix{\n\t P \\ar[r] \\ar@{->>}[d] & {*} \\ar@{->>}[d]\n\t \\\\\n\t X \\ar[r] & \\mathbf{B}G\n\t}\n $$\n that exhibit $P \\to X$ as a $G$-principal $\\infty$-bundle. By \n Proposition~\\ref{BundleStructureOnInfinityFiber} and\n Proposition~\\ref{LocalTrivialityImpliesCocycle} these are \n the $\\infty$-pullback squares \n $\n \\mathrm{Cart}({\\mathbf{H}^{\\Delta[1]}}_{\/{(* \\to \\mathbf{B}G)}})\n \\hookrightarrow {\\mathbf{H}^{\\Delta[1]}}_{\/{(* \\to \\mathbf{B}G)}}\n $, hence\n $$\n G \\mathrm{Bund}(X) \\simeq \n\t \\mathrm{Cart}({\\mathbf{H}^{\\Delta[1]}}_{\/{(* \\to \\mathbf{B}G)}}) \\times_{\\mathbf{H}} \\{X\\}\n\t \\,.\n $$\n By the universality of the $\\infty$-pullback\n the morphisms between these are fully determined by their value on $X$,\n so that the above is equivalent to \n $$\n \\mathbf{H}_{\/\\mathbf{B}G} \\times_{\\mathbf{H}} \\{X\\}\n\t\\,.\n $$\n (For instance in terms of model categories: choose a model structure for\n $\\mathbf{H}$ in which all objects are cofibrant, choose a fibrant representative\n for $\\mathbf{B}G$ and a fibration resolution $\\mathbf{E}G \\to \\mathbf{B}G$\n of the universal $G$-bundle. Then the slice model structure of the arrow model structure\n over this presents the slice in question and the statement follows from the analogous\n 1-categorical statement.)\n This finally is equivalent to \n $$\n\t\\mathbf{H}(X, \\mathbf{B}G)\n\t\\,.\n $$\n (For instance in terms of quasi-categories: the projection \n $\\mathbf{H}_{\/\\mathbf{B}G} \\to \\mathbf{H}$ is a fibration by \n Proposition 2.1.2.1 and 4.2.1.6 in \\cite{Lurie}, hence the homotopy fiber\n $\\mathbf{H}_{\/\\mathbf{B}G} \\times_{\\mathbf{X}} \\{X\\}$ \n is the ordinary fiber of quasi-categories. This is manifestly \n the\n $\\mathrm{Hom}^R_{\\mathbf{H}}(X, \\mathbf{B}G)$ from Proposition 1.2.2.3 of \\cite{Lurie}.\n Finally, by Proposition 2.2.4.1 there, this is equivalent to $\\mathbf{H}(X,\\mathbf{B}G)$.)\n\\hfill{$\\square$}\\\\\n\\begin{corollary}\n Equivalence classes of $G$-principal $\\infty$-bundles over $X$ are\n in natural bijection with the degree-1 $G$-cohomology of $X$:\n $$\n G \\mathrm{Bund}(X)_{\/\\sim} \\simeq H^1(X, G)\n\t\\,.\n $$\n\\end{corollary}\n\\proof\n By Definition \\ref{cohomology} this is the restriction of \n the equivalence $G \\mathrm{Bund}(X) \\simeq \\mathbf{H}(X, \\mathbf{B}G)$ to\n connected components.\n\\hfill{$\\square$}\\\\\n\n\\section{Twisted bundles and twisted cohomology}\n\\label{StrucTwistedCohomology}\n\nWe show here how the general notion of cohomology in an \n$\\infty$-topos, considered above in Section~\\ref{StrucCohomology}, subsumes the notion of\n\\emph{twisted cohomology} and we discuss the corresponding\ngeometric structures classified by twisted cohomology: \n\\emph{extensions} of principal $\\infty$-bundles and \\emph{twisted $\\infty$-bundles}.\n \nWhereas ordinary cohomology is given by a derived hom-$\\infty$-groupoid, \ntwisted cohomology is given by the $\\infty$-groupoid of \n\\emph{sections of \na local coefficient bundle} in an $\\infty$-topos, \nwhich in turn is \nan \\emph{associated $\\infty$-bundle} induced via a representation \nof an $\\infty$-group $G$ from a $G$-principal $\\infty$-bundle\n(this is a geometric and unstable variant of the picture \nof twisted cohomology developed in \\cite{AndoBlumbergGepner,MaySigurdsson}).\n\nIt is fairly immediate that, given a \\emph{universal} local coefficient bundle\nassociated to a universal principal $\\infty$-bundle,\nthe induced twisted cohomology is equivalently ordinary\ncohomology in the corresponding slice $\\infty$-topos. This\nidentification provides a clean formulation of the contravariance\nof twisted cocycles. However, a universal coefficient bundle\nis a pointed connected object in the slice $\\infty$-topos only\nwhen it is a trivial bundle, so that twisted cohomology does not classify\nprincipal $\\infty$-bundles in the slice. We show below that instead\nit classifies \\emph{twisted principal $\\infty$-bundles}, which are\nnatural structures that generalize the twisted bundles familiar from\ntwisted K-theory.\nFinally, we observe that twisted cohomology in an $\\infty$-topos \nequivalently classifies extensions of structure groups\nof principal $\\infty$-bundles. \n\nA wealth of structures turn out to be special cases of \nnonabelian twisted cohomology and of twisted\nprincipal $\\infty$-bundles and also turn out to be usefully informed by the\ngeneral theory of twisted cohomology, we will discuss some of these structures in \\cite{NSSc}.\n\n\n\n\\subsection{Actions and associated $\\infty$-bundles}\n\\label{StrucRepresentations}\n\nLet $\\mathbf{H}$ be an $\\infty$-topos, $G \\in \\mathrm{Grp}(\\mathbf{H})$\nan $\\infty$-group.\nFix an action $\\rho : V \\times G \\to V$ (Definition \\ref{ActionInPrincipal}) on an object $V\\in \\mathbf{H}$.\nWe discuss the induced notion of \\emph{$\\rho$-associated $V$-fiber $\\infty$-bundles}.\nWe show that there is a \\emph{universal} $\\rho$-associated $V$-fiber bundle over \n$\\mathbf{B}G$ and observe that under Theorem \\ref{PrincipalInfinityBundleClassification}\nthis is effectively identified with the action itself. Accordingly, we also further discuss\n$\\infty$-actions as such.\n\n\\medskip\n\n\\begin{definition}\n For $V,X \\in \\mathbf{H}$ any two objects, \na \\emph{$V$-fiber $\\infty$-bundle} over $X$ is a morphism $E \\to X$, \nsuch that there is an effective epimorphism\n$\\xymatrix{U \\ar@{->>}[r] & X}$ and an $\\infty$-pullback of the form\n$$\n \\raisebox{20pt}{\n \\xymatrix{\n U \\times V \\ar[r] \\ar[d] & E \\ar[d]\n\t\\\\\n\tU \\ar@{->>}[r] & X\\, .\n }\n }\n$$ \n \\label{FiberBundle}\n\\end{definition}\nWe say that $E \\to X$ locally trivializes with respect to $U$.\nAs usual, we often say \\emph{$V$-bundle} for short.\n\n\\begin{definition}\n For $P \\to X$ a $G$-principal $\\infty$-bundle, we write\n $$ \n P \\times_G V := (P\\times V)\/\\!\/G \n $$ \n for the $\\infty$-quotient of the diagonal $\\infty$-action of $G$ on $P \\times V$.\n Equipped with the canonical morphism\n $P \\times_G V \\to X$ we call this the $\\infty$-bundle \\emph{ $\\rho$-associated} to $P$.\n \\label{AssociatedBundle}\n\\end{definition}\n\\begin{remark}\n The diagonal $G$-action on $P \\times V$ is the product in \n $G \\mathrm{Action}(\\mathbf{H})$ of the given actions on $P$ and on $V$.\n Since $G\\mathrm{Action}(\\mathbf{H})$ is a full sub-$\\infty$-category of a slice\n category of a functor category, the product is given by a degreewise\n pullback in $\\mathbf{H}$:\n $$\n \\raisebox{20pt}{\n \\xymatrix{\n\t P \\times V \\times G^{\\times_n} \n\t \\ar[r]\n\t \\ar[d]\n\t &\n\t V \\times G^{\\times_n}\n\t \\ar[d]\n\t \\\\\n\t P \\times G^{\\times_n}\n\t \\ar[r]\n\t &\n\t G^{\\times_n}\\,.\n\t}\n\t}\n $$\n and so\n $$\n P \\times_G V \\simeq \\varinjlim_n (P \\times V \\times G^{\\times_n})\n\t\\,.\n $$\n The canonical bundle morphism of the corresponding $\\rho$-associated\n $\\infty$-bundle is the realization of the left morphism of this diagram:\n $$\n \\raisebox{20pt}{\n \\xymatrix{\n\t P \\times_G V\n\t \\ar@{}[r]|<<<<{:=}\n\t \\ar[d]\n\t &\n\t \\varinjlim_n (P \\times V \\times G^{\\times_n})\n\t \\ar[d]\n\t \\\\\n\t X \\ar@{}[r]|<<<<<<<<<{\\simeq} & \n\t \\varinjlim_n (P \\times G^{\\times_n})\\,.\n\t}\n\t}\n $$\n \\label{ProductActionByPullback}\n\\end{remark}\n\\begin{example}\nBy Theorem \\ref{PrincipalInfinityBundleClassification} every $\\infty$-group action\n$\\rho : V \\times G \\to V$ has a classifying morphism $\\mathbf{c}$ defined on its homotopy\nquotient, which fits into a fiber sequence of the form\n$$\n \\raisebox{20pt}{\n \\xymatrix{\n V \\ar[r] & V\/\\!\/G \\ar[d]^{\\mathbf{c}} \n \\\\\t \n\t & \\mathbf{B}G\\,.\n }\n }\n$$\n\n Regarded as an \n $\\infty$-bundle, this is\n $\\rho$-associated to the universal $G$-principal $\\infty$-bundle\n $\\xymatrix{{*} \\ar[r] & \\mathbf{B}G}$ from Example \\ref{UniversalPrincipal}:\n $$\n V\/\\!\/G \\simeq {*} \\times_G V\n\t\\,.\n $$\n \\label{ActionGroupoidIsRhoAssociated}\n\\end{example}\n\\begin{lemma}\n The realization functor $\\varinjlim : \\mathrm{Grpd}(\\mathbf{H}) \\to \\mathbf{H}$\n preserves the $\\infty$-pullback of Remark \\ref{ProductActionByPullback}:\n $$\n P \\times_G V \\simeq \\varinjlim_n (P \\times V \\times G^{\\times_n})\n\t\\simeq\n\t(\\varinjlim_n P \\times G^{\\times_n}) \\times_{(\\varinjlim_n G^{\\times_n})} (\\varinjlim_n V \\times G^{\\times_n})\n\t\\,.\n $$\n \\label{RealizationPreservesProductOfRepresentations}\n\\end{lemma}\n\\proof\n Generally, let $X \\to Y \\leftarrow Z \\in \\mathrm{Grpd}(\\mathbf{H})$ be a\n diagram of groupoid objects, such that in the induced diagram\n $$\n \\xymatrix{\n\t X_0 \\ar[r] \\ar@{->>}[d] & Y_0 \\ar@{<-}[r] \\ar@{->>}[d] & Z_0 \\ar@{->>}[d]\n\t \\\\\n\t \\varinjlim_n X_n \\ar[r] & \\varinjlim_n Y_n \\ar@{<-}[r] & \\varinjlim_n Z_n\n\t}\n $$\n the left square is an $\\infty$-pullback. By the third \n $\\infty$-Giraud axiom (Definition~\\ref{GiraudRezkLurieAxioms}) the vertical \n morphisms are effective epi, as indicated. \n By assumption we have a pasting of $\\infty$-pullbacks as shown on the\n left of the following diagram, and by\n the pasting law (Proposition \\ref{PastingLawForPullbacks}) this is equivalent to\n the pasting shown on the right:\n $$\n \\raisebox{38pt}{\n \\xymatrix{\n\t X_0 \\times_{Y_0} Z_0 \\ar[r] \\ar[d] & Z_0 \\ar[d]\n\t \\\\\n\t X_0 \\ar[r] \\ar[d] & Y_0 \\ar[d]\n\t \\\\\n\t \\varinjlim_n X_n \\ar[r] & \\varinjlim_n Y_n\n\t}\n\t}\n\t\\;\\;\\;\n\t\\simeq\n\t\\;\\;\\;\n \\raisebox{38pt}{\n \\xymatrix{\n\t X_0 \\times_{Y_0} Z_0 \\ar[r] \\ar@{->>}[d] & Z_0 \\ar@{->>}[d]\n\t \\\\\n\t (\\varinjlim_n X_n) \\times_{(\\varinjlim_n Y_n)} (\\varinjlim_n Z_n) \\ar[r] \\ar[d] & \n\t \\varinjlim_n Z_n \\ar[d]\n\t \\\\\n\t \\varinjlim_n X_n \\ar[r] & \\varinjlim_n Y_n.\n\t}\n\t}\n $$\nSince effective epimorphisms are stable under $\\infty$-pullback, this identifies \nthe canonical morphism \n$$\n X_0 \\times_{Y_0} Z_0\n \\to \n (\\varinjlim_n X_n) \\times_{(\\varinjlim_n Y_n)} (\\varinjlim_n Z_n)\n$$\nas an effective epimorphism, as indicated. \n\nSince $\\infty$-limits commute over each other, the {\\v C}ech nerve of this morphism \nis the groupoid object $[n] \\mapsto X_n \\times_{Y_n} Z_n$.\nTherefore the third $\\infty$-Giraud axiom now says that $\\varinjlim$ preserves the\n$\\infty$-pullback of groupoid objects:\n$$\n \\varinjlim (X \\times_Y Z) \n \\simeq \n \\varinjlim_n (X_n \\times_{Y_n} Z_n )\n \\simeq\n (\\varinjlim_n X_n) \\times_{(\\varinjlim_n Y_n)} (\\varinjlim_n Z_n)\n \\,.\n$$\n\nConsider this now in the special case that $X \\to Y \\leftarrow Z$ is \n$(P \\times G^{\\times_\\bullet}) \\to G^{\\times_\\bullet} \\leftarrow (V \\times G^{\\times_\\bullet})$.\nTheorem \\ref{PrincipalInfinityBundleClassification} implies that the initial assumption above is \nmet, in that $P \\simeq (P\/\\!\/G) \\times_{*\/\\!\/G} {*} \\simeq X \\times_{\\mathbf{B}G} {*}$, \nand so the claim follows.\n\\hfill{$\\square$}\\\\\n\\begin{proposition}\n For $g_X : X \\to \\mathbf{B}G$ a morphism and $P \\to X$\n the corresponding $G$-principal $\\infty$-bundle according to Theorem \n \\ref{PrincipalInfinityBundleClassification}, \n there is a natural equivalence\n $$\n g_X^*(V\/\\!\/G) \\simeq P \\times_G V\n $$\n over $X$, between the pullback of the\n $\\rho$-associated $\\infty$-bundle\n $\\xymatrix{V\/\\!\/G \\ar[r]^{\\mathbf{c}} & \\mathbf{B}G}$\n of Example \\ref{ActionGroupoidIsRhoAssociated}\n and the $\\infty$-bundle $\\rho$-associated to $P$ by Definition \\ref{AssociatedBundle}.\n \\label{UniversalAssociatedBundle}\n\\end{proposition}\n\\proof\n By Remark \\ref{ProductActionByPullback} the product action is given by the \n pullback \n $$\n \\xymatrix{\n P \\times V \\times G^{\\times_\\bullet}\n\t \\ar[r]\n\t \\ar[d]\n\t &\n\t V \\times G^{\\times_\\bullet}\n\t \\ar[d]\n\t \\\\\n\t P \\times G^{\\times_\\bullet} \\ar[r] & G^{\\times_\\bullet}\n }\n $$\n in $\\mathbf{H}^{\\Delta^{\\mathrm{op}}}$. \n By Lemma $\\ref{RealizationPreservesProductOfRepresentations}$ the realization functor\n preserves this $\\infty$-pullback. By \n Remark \\ref{ProductActionByPullback} it sends the left morphism to the \n associated bundle, and by Theorem \\ref{PrincipalInfinityBundleClassification}\n it sends the bottom morphism to $g_X$. Therefore it produces an $\\infty$-pullback\n diagram of the form\n $$\n \\raisebox{20pt}{\n \\xymatrix{\n V \\times_G P \\ar[r] \\ar[d] & V\/\\!\/G \\ar[d]^{\\mathbf{c}}\n\t \\\\\n\t X \\ar[r]^{g_X} & \\mathbf{B}G\\,.\n }\n }\n $$ \n\\hfill{$\\square$}\\\\\n\\begin{remark}\n This says that $\\xymatrix{V\/\\!\/G \\ar[r]^{\\mathbf{c}} & \\mathbf{B}G}$ is both, \n the $V$-fiber $\\infty$-bundle \n $\\rho$-associated to the universal $G$-principal $\\infty$-bundle, Observation\n \\ref{ActionGroupoidIsRhoAssociated}, \n as well as the universal $\\infty$-bundle for $\\rho$-associated $\\infty$-bundles.\n \\label{RhoAssociatedToUniversalIsUniversalVBundle}\n\\end{remark}\n\\begin{proposition}\n Every $\\rho$-associated $\\infty$-bundle is a $V$-fiber $\\infty$-bundle, \n Definition \\ref{FiberBundle}.\n \\label{AssociatedIsFiberBundle}\n\\end{proposition}\n\\proof\n Let $P \\times_G V \\to X$ be a $\\rho$-associated $\\infty$-bundle.\n By the previous Proposition \\ref{UniversalAssociatedBundle} it is \n the pullback $g_X^* (V\/\\!\/G)$ of the universal $\\rho$-associated bundle.\n By Proposition \\ref{EveryGBundleIsLocallyTrivial} there exists an \n effective epimorphism $\\xymatrix{U \\ar@{->>}[r] & X}$ over which\n $P$ trivializes, hence such that $g_X|_U$ factors through the point, up\n to equivalence. In summary and by the pasting law, Proposition \\ref{PastingLawForPullbacks},\n this gives a pasting of $\\infty$-pullbacks of the form\n $$\n \\raisebox{20pt}{\n \\xymatrix@R=8pt{\n\t U \\times V\n\t \\ar[dd]\n\t \\ar[r]\n\t &\n\t P \\times_G V\n\t \\ar[r]\n\t \\ar[dd]\n\t &\n\t V\/\\!\/G\n\t \\ar[dd]\n\t \\\\\n\t \\\\\n\t U \\ar@{->>}[r] \n\t \\ar[dr]\n\t & \n\t X\n\t \\ar[r]^{g_X}\n\t &\n\t \\mathbf{B}G\n\t \\\\\n\t & {*}\n\t \\ar[ur]\n\t}\n\t}\n $$\n which exhibits $P \\times_G V \\to X$ as a $V$-fiber bundle by a local trivialization\n over $U$.\n\\hfill{$\\square$}\\\\\n\nSo far this shows that every $\\rho$-associated $\\infty$-bundle is a\n$V$-fiber bundle. We want to show that, conversely, every $V$-fiber bundle\nis associated to a principal $\\infty$-bundle.\n\\begin{definition}\n Let $V \\in \\mathbf{H}$ be a $\\kappa$-compact object, for some regular cardinal $\\kappa$. \n By the characterization of Definition \\ref{RezkCharacterization}, there exists\n an $\\infty$-pullback square in $\\mathbf{H}$ of the form\n $$\n \\raisebox{20pt}{\n \\xymatrix{\n\t V \\ar[r] \\ar[d] & \\widehat {\\mathrm{Obj}}_\\kappa \\ar[d]\n\t \\\\\n\t {*} \\ar[r]^<<<<<<{\\vdash V} & \\mathrm{Obj}_\\kappa\n\t}\n\t}\n $$\n Write\n $$\n \\mathbf{B}\\mathbf{Aut}(V) := \\mathrm{im}(\\vdash V)\n $$\n for the $\\infty$-image, Definition \\ref{image}, \n of the classifying morphism $\\vdash V$ of $V$. \n By definition this comes with an effective epimorphism \n $$\n \\xymatrix{\n\t {*} \\ar@{->>}[r] & \\mathbf{B}\\mathbf{Aut}(V)\n\t \\ar@{^{(}->}[r] & \\mathrm{Obj}_\\kappa\n\t}\n\t\\,,\n $$\n and hence, by Proposition \\ref{InfinityGroupObjectsAsGroupoidObjects},\n it is the delooping of an $\\infty$-group \n $$\n \\mathbf{Aut}(V) \\in \\mathrm{Grp}(\\mathbf{H})\n $$\n as indicated. We call this the \\emph{internal automorphism $\\infty$-group} of $V$.\n \n By the pasting law, Proposition \\ref{PastingLawForPullbacks}, \n the image factorization gives a pasting\n of $\\infty$-pullback diagrams of the form\n $$\n \\xymatrix{\n\t V \\ar[r] \\ar[d] & V\/\\!\/\\mathbf{Aut}(V) \\ar[r] \\ar[d]^{\\mathbf{c}_V} & \n\t \\widehat {\\mathrm{Obj}}_\\kappa \\ar[d]\n\t \\\\\n\t {*} \\ar@{->>}[r]^<<<<<<{\\vdash V} & \\mathbf{B}\\mathbf{Aut}(V) \\ar@{^{(}->}[r] & \n\t \\mathrm{Obj}_\\kappa\n\t}\n $$\n By Theorem~\\ref{PrincipalInfinityBundleClassification} this defines a canonical \n $\\infty$-action \n $$\n \\rho_{\\mathbf{Aut}(V)} : V \\times \\mathbf{Aut}(V) \\to V\n $$\n of $\\mathbf{Aut}(V)$ on $V$ with homotopy quotient $V\/\\!\/\\mathbf{Aut}(V)$\n as indicated. \n \\label{InternalAutomorphismGroup}\n\\end{definition}\n\\begin{proposition}\n Every $V$-fiber $\\infty$-bundle is $\\rho_{\\mathbf{Aut}(V)}$-associated to an \n $\\mathbf{Aut}(V)$-principal $\\infty$-bundle.\n \\label{VBundleIsAssociated}\n\\end{proposition}\n\\proof\n Let $E \\to V$ be a $V$-fiber $\\infty$-bundle. \n By Definition \\ref{FiberBundle} there exists an effective epimorphism\n $\\xymatrix{U \\ar@{->>}[r] & X}$ along which the bundle trivializes locally.\n It follows \n by the second Axiom in Definition \\ref{RezkCharacterization}\n that on $U$ the morphism $\\xymatrix{X \\ar[r]^<<<<<{\\vdash E} & \\mathrm{Obj}_\\kappa}$\n which classifies $E \\to X$ factors through the point\n $$\n \\raisebox{20pt}{\n \\xymatrix@R=8pt{\n\t U \\times V \\ar[r]\\ar[dd] & E \\ar [r] \\ar[dd] & \\widehat{\\mathrm{Obj}}_\\kappa \\ar[dd]\n\t \\\\\n\t \\\\\n\t U \\ar@{->>}[r] \\ar[dr] & X \\ar[r]^<<<<<{\\vdash E} & \\mathrm{Obj}_\\kappa.\n\t \\\\\n\t & {*} \\ar[ur]_<<<<<{\\vdash V}\n\t}\n\t}\n $$\n Since the point inclusion, in turn, factors through its $\\infty$-image \n $\\mathbf{B}\\mathbf{Aut}(V)$, Definition \\ref{InternalAutomorphismGroup},\n this yields the outer commuting diagram of the following form\n $$\n \\raisebox{20pt}{\n \\xymatrix{\n\t U \\ar[r] \\ar@{->>}[d] & {*} \\ar[r] & \\mathbf{B}\\mathbf{Aut}(V) \\ar@{^{(}->}[d]\n\t \\\\\n\t X \\ar[rr]_{\\vdash E} \n\t \\ar@{-->}[urr]^{g}\n\t && \\mathrm{Obj}_\\kappa\n\t}}\n $$\n By the epi\/mono factorization system of Proposition \\ref{EpiMonoFactorizationSystem}\n there is a diagonal lift $g$ as indicated. Using again the \n pasting law and by Definition \\ref{InternalAutomorphismGroup}\n this factorization induces a pasting of $\\infty$-pullbacks of the form\n $$\n \\raisebox{20pt}{\n \\xymatrix{\n\t E \\ar[r] \\ar[d] & V\/\\!\/\\mathbf{Aut}(V) \\ar[r] \\ar[d]^{\\mathbf{c}_V} & \n\t \\widehat {\\mathrm{Obj}}_\\kappa \\ar[d]\n\t \\\\\n\t X \\ar[r]^<<<<}[r] & \\mathrm{Obj}_\\kappa\n\t}\n\t}\n $$\n Finally, by Proposition \\ref{UniversalAssociatedBundle}, this \n exhibits $E \\to X$ as being $\\rho_{\\mathbf{Aut}(V)}$-associated to the \n $\\mathbf{Aut}(V)$-principal $\\infty$-bundle with class $[g] \\in H^1(X,G)$.\n\\hfill{$\\square$}\\\\\n\\begin{theorem}\n $V$-fiber $\\infty$-bundles over $X \\in \\mathbf{H}$ are classified by \n $H^1(X, \\mathbf{Aut}(V))$.\n \\label{VBundleClassification}\n\\end{theorem}\n Under this classification, the $V$-fiber $\\infty$-bundle corresponding to \n $[g] \\in H^1(X, \\mathbf{Aut}(V))$ is identified,\n up to equivalence, with the $\\rho_{\\mathbf{Aut}(V)}$-associated $\\infty$-bundle \n (Definition~\\ref{AssociatedBundle}) to the $\\mathbf{Aut}(V)$-principal $\\infty$-bundle\n corresponding to $[g]$ by Theorem~\\ref{PrincipalInfinityBundleClassification}.\n \\\\\n\\proof\n By Proposition~\\ref{VBundleIsAssociated} every morphism \n $\\xymatrix{\n X \\ar[r]^<<<<<{\\vdash E} & \\mathrm{Obj}_\\kappa\n }$\n that classifies a small $\\infty$-bundle $E \\to X$ \n which happens to be a $V$-fiber $\\infty$-bundle factors via some $g$\n through \n the moduli for $\\mathbf{Aut}(V)$-principal $\\infty$-bundles\n $$ \n \\xymatrix{\n\t X\n\t \\ar[r]^<<<<<{g}\n\t \\ar@\/_1pc\/[rr]_{\\vdash E}\n\t &\n \\mathbf{B}\\mathbf{Aut}(V) \n\t \\ar@{^{(}->}[r]\n\t & \\mathrm{Obj}_\\kappa\n }\n\t \\,.\n $$ \n Therefore it only remains to show that also every homotopy \n $(\\vdash E_1) \\Rightarrow (\\vdash E_2)$ factors \n through a homotopy $g_1 \\Rightarrow g_2$. \n This follows by applying the epi\/mono lifting property of \n Proposition \\ref{EpiMonoFactorizationSystem} to the diagram\n $$\n \\xymatrix{\n\t X \\coprod X \\ar[r]^<<<<<{(g_1, g_2)} \\ar@{->>}[d] & \\mathbf{B}\\mathbf{Aut}(V) \n\t \\ar@{^{(}->}[d]\n\t \\\\\n\t X \\ar[r] \\ar@{-->}[ur] & \\mathrm{Obj}_\\kappa\n\t }\n $$\n The outer diagram exhibits the original homotopy. The left morphism is \n an effective epi (for instance immediately by Proposition \\ref{EffectiveEpiIsEpiOn0Truncation}), \n the right morphism is a monomorphism by construction. Therefore the dashed\n lift exists as indicated and so the top left triangular diagram exhibits\n the desired factorizing homotopy.\n\\hfill{$\\square$}\\\\\n\\begin{remark}\n In the special case that $\\mathbf{H} = \\mathrm{Grpd}_{\\infty}$, the classification \n Theorem \\ref{VBundleClassification}\n is classical \\cite{Stasheff,May}, traditionally\n stated in (what in modern terminology is) the \n presentation of $\\mathrm{Grpd}_{\\infty}$ by simplicial sets\n or by topological spaces. Recent discussions include \\cite{BlomgrenChacholski}.\n For $\\mathbf{H}$ a general 1-localic $\\infty$-topos (meaning: with a 1-site of definition), \n the statement of Theorem \\ref{VBundleClassification} appears in \\cite{Wendt}, \n formulated there in terms of the presentation of $\\mathbf{H}$ by simplicial presheaves.\n (We discuss the relation of these presentations to the above general abstract result \n in \\cite{NSSb}.)\n Finally, one finds that the classification of \\emph{$G$-gerbes} \\cite{Giraud} and \n \\emph{$G$-2-gerbes} in \\cite{Breen} is the special case of the general statement,\n for $V = \\mathbf{B}G$ and $G$ a 1-truncated $\\infty$-group. \n This we discuss below in Section~\\ref{StrucInftyGerbes}.\n \\label{ReferencesOnClassificationOfVBundles}\n\\end{remark}\n\nWe close this section with a list of some fundamental classes \nof examples of $\\infty$-actions, or equivalently, \nby Remark \\ref{RhoAssociatedToUniversalIsUniversalVBundle}, \nof universal associated $\\infty$-bundles. \nFor doing so we use again that, \nby Theorem \\ref{PrincipalInfinityBundleClassification}, to give an \n$\\infty$-action of $G$ on $V$ is equivalent to giving a fiber\nsequence of the form $V \\to V\/\\!\/G \\to \\mathbf{B}G$.\nTherefore the following list mainly serves to associate a tradition\n\\emph{name} with a given $\\infty$-action.\n\\begin{example}\n \\label{ExamplesOfActions}\n The following are $\\infty$-actions.\n \\begin{enumerate}\n \\item\n\t For every $G \\in \\mathrm{Grp}(\\mathbf{H})$, the fiber sequence\n\t $$\n\t \\raisebox{20pt}{\n\t \\xymatrix{\n\t G \\ar[d]\n\t\t \\\\\n\t\t {*} \\ar[r] & \\mathbf{B}G\n\t }\n\t }\n\t $$\n\t which defines $\\mathbf{B}G$ by Theorem \\ref{DeloopingTheorem}\n\t induces the \\emph{right action of $G$ on itself}\n\t $$\n\t * \\simeq G\/\\!\/G\n\t \\,.\n\t $$\n\t At the same time\n\t this sequence, but now regarded as a bundle over $\\mathbf{B}G$, \n\t is the universal $G$-principal $\\infty$-bundle, Remark \\ref{UniversalPrincipal}.\n \\item\n For every object $X \\in \\mathbf{H}$ write \n\t $$\n\t \\mathbf{L}X := X \\times_{X \\times X} X\n\t $$ \n\t for its \\emph{free loop space} object, the $\\infty$-fiber product of the \n\t diagonal on $X$ along itself\n\t $$\n\t \\raisebox{20pt}{\n\t \\xymatrix{\n\t \\mathbf{L}X \\ar[r] \\ar[d]_{\\mathrm{ev}_{*}} & X \\ar[d]\n\t\t \\\\\n\t\t X \\ar[r] & X \\times X\n\t }\n\t }.\n\t $$\n For every $G \\in \\mathrm{Grp}(\\mathbf{H})$ there is a fiber sequence\n\t $$\n\t \\raisebox{20pt}{\n\t \\xymatrix{\n\t G \n\t\t \\ar[d]\n\t\t \\\\\n\t\t \\mathbf{L}\\mathbf{B}G\n\t\t \\ar[r]^{\\mathrm{ev}_{*}}\n\t\t &\n\t\t \\mathbf{B}G\n\t }\n\t }\n\t \\,.\n\t $$\n\t This exhibits the \\emph{adjoint action of $G$ on itself}\n\t $$\n\t \\mathbf{L}\\mathbf{B}G \\simeq G\/\\!\/_{\\mathrm{ad}} G\n\t \\,.\n\t $$\n\t\\item\n\t For every $V \\in \\mathbf{H}$ there is the canonical \n\t $\\infty$-action of the \\emph{automorphism $\\infty$-group}\n\t $$\n\t \\raisebox{20pt}{\n\t \\xymatrix{\n\t\t V\n\t\t \\ar[d]\n\t\t \\\\\n\t\t V\/\\!\/\\mathbf{Aut}(V)\n\t\t \\ar[r]\n\t\t &\n\t\t \\mathbf{B}\\mathbf{Aut}(V)\n\t\t}\n\t\t}\n\t\t\\,,\n\t $$\n\t introduced in Definition \\ref{InternalAutomorphismGroup}, this exhibits the\n\t \\emph{automorphism action}.\n \\end{enumerate}\n\\end{example}\n\n\\subsection{Sections and twisted cohomology}\n\\label{TwistedCohomology}\n\nWe discuss a general notion of \\emph{twisted cohomology} or \n\\emph{cohomology with local coefficients} in any $\\infty$-topos $\\mathbf{H}$, \nwhere the \\emph{local coefficient $\\infty$-bundles} are \nassociated $\\infty$-bundles as discussed above, and where the cocycles are\n\\emph{sections} of these local coefficient bundles.\n\n\\medskip\n\n\\begin{definition}\n Let $p : E \\to X$ be any morphism in $\\mathbf{H}$, to be regarded as an \n $\\infty$-bundle over $X$. A \\emph{section} of $E$ is a diagram\n $$\n \\raisebox{20pt}{\n \\xymatrix@!C=40pt@!R=30pt{\n\t & E \\ar[d]^p\n\t \\\\\n\t X \\ar[r]_{\\mathrm{id}}^{\\ }=\"t\" \n\t \\ar[ur]^{\\sigma}_{\\ }=\"s\"\n\t & X\n\t %\n\t \\ar@{=>}^{\\simeq} \"s\"; \"t\"\n\t}\n\t}\n $$\n (where for emphasis we display the presence of the homotopy filling the diagram).\n The \\emph{$\\infty$-groupoid of sections} of $E \\stackrel{p}{\\to} X$ is the homotopy fiber\n $$\n \\Gamma_X(E) := \\mathbf{H}(X,E) \\times_{\\mathbf{H}(X,X)} \\{\\mathrm{id}_X\\}\n $$\n of the space of all morphisms $X \\to E$ on those that cover the identity on $X$.\n \\label{Sections}\n\\end{definition}\nWe record two elementary but important observations about spaces of sections.\n\\begin{observation}\n There is a canonical identification\n $$\n \\Gamma_X(E) \\simeq \\mathbf{H}_{\/X}(\\mathrm{id}_X, p)\n $$\n of the space of sections of $E \\to X$ with the hom-$\\infty$-groupoid in the \n slice $\\infty$-topos $\\mathbf{H}_{\/X}$ between the identity on $X$ and the bundle map $p$.\n \\label{SectionBySliceMaps}\n\\end{observation}\n\\proof\n For instance by Proposition 5.5.5.12 in \\cite{Lurie}.\n\\hfill{$\\square$}\\\\\n\\begin{lemma}\n Let \n $$\n \\xymatrix{\n\t E_1 \\ar[r] \\ar[d]^{p_1} & E_2 \\ar[d]^{p_2}\n\t \\\\\n\t B_1 \\ar[r]^{f} & B_2\n\t}\n $$ \n be an $\\infty$-pullback diagram in $\\mathbf{H}$\n and let $\\xymatrix{X \\ar[r]^{g_X} & B_1}$ be any morphism. Then \n post-composition with $f$ induces\n a natural equivalence of hom-$\\infty$-groupoids\n $$\n \\mathbf{H}_{\/B_1}(g_X, p_1)\n\t\\simeq\n\t\\mathbf{H}_{\/B_2}(f\\circ g_X, p_2)\n\t\\,.\n $$\n \\label{SliceMapsIntoPullbacks}\n\\end{lemma}\n\\proof\n By Proposition 5.5.5.12 in \\cite{Lurie}, the left hand side is given by the homotopy pullback\n $$\n \\raisebox{20pt}{\n \\xymatrix{\n\t \\mathbf{H}_{\/B_1}(g_X, p_1) \\ar[r] \\ar[d] & \\mathbf{H}(X, E_1) \n\t \\ar[d]^{\\mathbf{H}(X,p_1)}\n\t \\\\\n\t \\{g_X\\} \\ar[r] & \\mathbf{H}(X,B_1)\\,.\n\t}\n\t}\n $$\n Since the hom-$\\infty$-functor\n $\\mathbf{H}(X,-) : \\mathbf{H} \\to \\mathrm{Grpd}_{\\infty}$ \n preserves the $\\infty$-pullback $E_1 \\simeq f^* E_2$, this\n extends to a pasting of $\\infty$-pullbacks, which by the pasting law \n (Proposition \\ref{PastingLawForPullbacks}) is\n $$\n \\raisebox{20pt}{\n \\xymatrix{\n\t \\mathbf{H}_{\/B_1}(g_X, p_1) \\ar[r] \\ar[d] \n\t & \n\t \\mathbf{H}(X, E_1) \\ar[d]^{\\mathbf{H}(X,p_1)} \\ar[r]\n\t &\n\t \\mathbf{H}(X, E_2)\n\t \\ar[d]^{\\mathbf{H}(X, p_2)}\n\t \\\\\n\t \\{g_X\\} \\ar[r] & \\mathbf{H}(X,B_1)\n\t \\ar[r]_-{\\mathbf{H}(X, f)} &\n \\mathbf{H}(X, B_2)\t \n\t}\n\t}\n\t\\;\\;\\;\n\t\\simeq\n\t\\;\\;\\;\n\t\\raisebox{20pt}{\n\t\\xymatrix{\n\t \\mathbf{H}_{\/B_2}(f \\circ g_X, p_2)\n\t \\ar[r]\n\t \\ar[d]\n\t &\n\t \\mathbf{H}(X, E_2)\n\t \\ar[d]^{\\mathbf{H}(X, p_2)}\n\t \\\\\n\t \\{f\\circ g_X\\}\n\t \\ar[r]\n\t &\n\t \\mathbf{H}(X, B_2).\n\t}\n\t}\n $$\n\\hfill{$\\square$}\\\\\nFix now an $\\infty$-group $G \\in \\mathrm{Grp}(\\mathbf{H})$ and an \n$\\infty$-action $\\rho : V \\times G \\to V$. Write \n$$\n \\xymatrix{\n V \\ar[r] & V\/\\!\/G \\ar[d]^{\\mathbf{c}}\n\t\\\\\n\t& \\mathbf{B}G\n }\n$$\nfor the corresponding \\emph{universal $\\rho$-associated $\\infty$-bundle} \nas discussed in Section~\\ref{StrucRepresentations}.\n\\begin{proposition}\n For $g_X : X \\to \\mathbf{B}G$ a cocycle and $P \\to X$ the corresponding\n$G$-principal $\\infty$-bundle according to Theorem \\ref{PrincipalInfinityBundleClassification},\nthere is a natural equivalence\n$$\n \\Gamma_X(P \\times_G V) \\simeq \\mathbf{H}_{\/\\mathbf{B}G}(g_X, \\mathbf{c})\n$$\nbetween the space of sections of the corresponding $\\rho$-associated $V$-bundle \n(Definition~\\ref{AssociatedBundle}) and the hom-$\\infty$-groupoid of the slice\n$\\infty$-topos of $\\mathbf{H}$ over $\\mathbf{B}G$, between $g_X$ and $\\mathbf{c}$. \nSchematically:\n\\[\n\\left\\{ \n\t\\begin{xy} \n\t\t(10,10)*+{E}=\"1\";\n\t\t(-10,-10)*+{X}=\"2\";\n\t\t(10,-10)*+{X}=\"3\"; \n\t\t(5,0)*+{}=\"4\";\n\t\t(3,-5)*+{}=\"5\"; \n\t\t{\\ar^-{p} \"1\";\"3\"};\n\t\t{\\ar^-{\\sigma} \"2\";\"1\"}; \n\t\t{\\ar_-{\\mathrm{id}} \"2\";\"3\"};\t\n\t\t{\\ar@{=>}^-{\\simeq} \"4\";\"5\"};\n\t\\end{xy} \n\\right\\} \n \\;\\;\n \\simeq\n \\;\\;\n\\left\\{\n\\begin{xy} \n\t\t(10,10)*+{V\/\\!\/G}=\"1\";\n\t\t(-10,-10)*+{X}=\"2\";\n\t\t(10,-10)*+{\\mathbf{B}G}=\"3\"; \n\t\t(5,0)*+{}=\"4\";\n\t\t(3,-5)*+{}=\"5\"; \n\t\t{\\ar^-{\\mathbf{c}} \"1\";\"3\"};\n\t\t{\\ar^-{\\sigma} \"2\";\"1\"}; \n\t\t{\\ar_-{\\mathrm{g_X}} \"2\";\"3\"};\t\n\t\t{\\ar@{=>}^-{\\simeq} \"4\";\"5\"};\n\t\\end{xy} \n\\right\\} \n\\]\n\\label{SectionsAndSliceHoms}\n\\end{proposition}\n\\proof\n By Observation \\ref{SectionBySliceMaps} and Lemma \\ref{SliceMapsIntoPullbacks}.\n\\hfill{$\\square$}\\\\\n\\begin{observation}\n If in the above the cocycle $g_X$ is trivializable, in the sense that it factors through the\n point $* \\to \\mathbf{B}G$ (equivalently if its class $[g_X] \\in H^1(X,G)$ is\n trivial) then there is an equivalence\n $$\n \\mathbf{H}_{\/\\mathbf{B}G}(g_X, \\mathbf{c})\n\t\\simeq\n\t\\mathbf{H}(X,V)\n\t\\,.\n $$\n \\label{TwistedCohomologyIsLocallyVCohomology}\n\\end{observation}\n\\proof\n In this case the homotopy pullback on the right in the proof of\n Proposition \\ref{SectionsAndSliceHoms} is\n $$\n\t\\raisebox{20pt}{\n\t\\xymatrix{\n\t \\mathbf{H}_{\/\\mathbf{B}G}(g_X, \\mathbf{c})\n\t \\ar@{}[r]|{\\simeq}\n\t &\n\t \\mathbf{H}(X, V)\n\t \\ar[r]\n\t \\ar[d]\n\t &\n\t \\mathbf{H}(X, V\/\\!\/G)\n\t \\ar[d]^{\\mathbf{H}(X, \\mathbf{c})}\n\t \\\\\n\t \\{g_X\\}\n\t \\ar@{}[r]|\\simeq\n\t &\n\t \\mathbf{H}(X, {*})\n\t \\ar[r]\n\t &\n\t \\mathbf{H}(X, \\mathbf{B}G)\n\t}\n\t}\n $$\n using that $V \\to V\/\\!\/G \\stackrel{\\mathbf{c}}{\\to} \\mathbf{B}G$ is a fiber\n sequence by definition, and that $\\mathbf{H}(X,-)$ preserves this fiber sequence.\n\\hfill{$\\square$}\\\\\n\\begin{remark}\n Since by Proposition~\\ref{EveryGBundleIsLocallyTrivial} \n every cocycle $g_X$ trivializes locally over some cover \n $\\xymatrix{U \\ar@{->>}[r] & X}$\n and equivalently, by Proposition \\ref{AssociatedIsFiberBundle}, every\n $\\infty$-bundle $P \\times_G V$ trivializes locally, \n Observation \\ref{TwistedCohomologyIsLocallyVCohomology} says that\n elements $ \\sigma \\in \\Gamma_X(P \\times_G V) \\simeq \\mathbf{H}_{\/\\mathbf{B}G}(g_X, \\mathbf{c})$\n \\emph{locally} are morphisms $\\sigma|_U : U \\to V$ with values in $V$.\n They fail to be so \\emph{globally} to the extent that $[g_X] \\in H^1(X, G)$ is non-trivial,\n hence to the extent that $P \\times_G V \\to X$ is non-trivial.\n\\end{remark}\nThis motivates the following definition.\n\\begin{definition}\n We say that \n the $\\infty$-groupoid\n $\\Gamma_X(P \\times_G V) \\simeq \\mathbf{H}_{\/\\mathbf{B}G}(g_X, \\mathbf{c})$\n from Proposition \\ref{SectionsAndSliceHoms}\n is the $\\infty$-groupoid of \\emph{$[g_X]$-twisted cocycles} with values in $V$, with respect to the\n \\emph{local coefficient $\\infty$-bundle} $V\/\\!\/G \\stackrel{\\mathbf{c}}{\\to} \\mathbf{B}G$.\n \n Accordingly, its set of connected components we call the \n \\emph{$[g_X]$-twisted $V$-cohomology} with respect to the local coefficient bundle $\\mathbf{c}$\n and write:\n $$\n H^{[g_X]}(X, V) := \\pi_0 \\mathbf{H}_{\/\\mathbf{B}G}(g_X, \\mathbf{c})\n\t\\,.\n $$\n \\label{TwistedCohomologyInOvertopos}\n\\end{definition}\n\\begin{remark}\n The perspective that twisted cohomology is the theory of sections of \n associated bundles whose fibers are classifying spaces is maybe most famous\n for the case of twisted K-theory, where it was described in this form in \n \\cite{Rosenberg}. But already the old theory of \n \\emph{ordinary cohomology with local coefficients} is of this form, \n as is made manifest in \\cite{BFG} (we discuss this in detail in \\cite{NSSc}).\n \n A proposal for a comprehensive theory in terms of bundles of topological spaces is\n in \\cite{MaySigurdsson} and a systematic formulation \n in $\\infty$-category theory and\n for the case of multiplicative generalized cohomology theories is in \n \\cite{AndoBlumbergGepner}. The formulation above refines this, unstably, \n to geometric cohomology\n theories\/(nonabelian) sheaf hypercohomology, \n hence from bundles of classifying spaces to \n $\\infty$-bundles of moduli $\\infty$-stacks. \n \n A wealth of examples and applications of such geometric nonabelian twisted cohomology\n of relevance in quantum field theory and in string theory is discussed in \n \\cite{SSS,Schreiber}. We discuss further examples in \\cite{NSSc}.\n \\label{ReferencesOnTwisted}\n\\end{remark}\n\\begin{remark}\n Of special interest is the case where \n $V$ is pointed connected, hence (by Theorem \\ref{DeloopingTheorem}) \n of the form $V = \\mathbf{B}A$ for some $\\infty$-group $A$, and so \n (by Definition \\ref{cohomology}) the coefficient for degree-1 $A$-cohomology, \n and hence itself (by Theorem \\ref{PrincipalInfinityBundleClassification}) the moduli $\\infty$-stack for\n $A$-principal $\\infty$-bundles. \n In this case $H^{[g_X]}(X, \\mathbf{B}A)$ is\n \\emph{degree-1 twisted $A$-cohomology}. Generally, if $V = \\mathbf{B}^n A$\n it is \\emph{degree-$n$ twisted $A$-cohomology}. In analogy with Definition \n \\ref{cohomology} this is sometimes written\n $$\n H^{n+[g_X]}(X,A) := H^{[g_X]}(X,\\mathbf{B}^n A)\n\t\\,.\n $$\n \n Moreover, in this case $V\/\\!\/G$ is itself pointed connected, hence of the form\n $\\mathbf{B}\\hat G$ for some $\\infty$-group $\\hat G$, and so the universal local \n coefficient bundle\n $$\n \\xymatrix{\n\t \\mathbf{B}A \\ar[r] & \\mathbf{B}\\hat G \\ar[d]^{\\mathbf{c}}\n\t \\\\\n\t & \\mathbf{B}G\n\t}\n $$\n exhibits $\\hat G$ as an \\emph{extension of $\\infty$-groups} of $G$ by $A$.\n This case we discuss below in Section \\ref{ExtensionsOfCohesiveInfinityGroups}.\n \\label{PointedConnectedLocalCoefficients}\n\\end{remark}\nIn this notation the local coefficient bundle $\\mathbf{c}$ is left implicit.\nThis convenient abuse of notation is justifed to some extent by the fact that there\nis a \\emph{universal local coefficient bundle}:\n\\begin{example}\n The classifying morphism of the $\\mathbf{Aut}(V)$-action on some \n $V \\in \\mathbf{H}$ from Definition \\ref{InternalAutomorphismGroup} according to \n Theorem \\ref{PrincipalInfinityBundleClassification} yields a local coefficient \n $\\infty$-bundle of the form\n $$\n \\raisebox{20pt}{\n \\xymatrix{\n\t V \\ar[r] & V\/\\!\/\\mathbf{Aut}(V)\\ar[d]\n\t \\\\\n\t & \\mathbf{B}\\mathbf{Aut}(V)\n\t}\n\t}\n $$\n which we may call the \\emph{universal local $V$-coefficient bundle}.\n In the case that $V$ is pointed connected and hence of the form\n $V = \\mathbf{B}G$\n $$\n \\raisebox{20pt}{\n \\xymatrix{\n\t \\mathbf{B}G \\ar[r] & (\\mathbf{B}G)\/\\!\/\\mathbf{Aut}(\\mathbf{B}G)\\ar[d]\n\t \\\\\n\t & \\mathbf{B}\\mathbf{Aut}(\\mathbf{B}G)\n\t}\n\t}\n $$\n the universal twists of the corresponding twisted $G$-cohomology are \n the \\emph{$G$-$\\infty$-gerbes}. These we discuss below in section\n \\ref{StrucInftyGerbes}.\n \\label{UniversalTwistByAutomorphisms}\n\\end{example}\n\n\n\n\n\\subsection{Extensions and twisted bundles}\n\\label{ExtensionsOfCohesiveInfinityGroups}\n\n\nWe discuss the notion of \\emph{extensions} of $\\infty$-groups\n(see Section~\\ref{StrucInftyGroups}), generalizing the traditional notion of \ngroup extensions. \nThis is in fact a special case of the notion of \nprincipal $\\infty$-bundle, Definition~\\ref{principalbundle}, for base space objects that \nare themselves deloopings of $\\infty$-groups. \nFor every extension of $\\infty$-groups, there is the \ncorresponding notion of \n\\emph{lifts of structure $\\infty$-groups} of principal $\\infty$-bundles. \nThese are classified equivalently by trivializations of an \\emph{obstruction class}\nand by the twisted cohomology with coefficients in the extension itself, regarded\nas a local coefficient $\\infty$-bundle.\n\nMoreover, we show\nthat principal $\\infty$-bundles with an extended structure $\\infty$-group\nare equivalent to principal $\\infty$-bundles with unextended structure $\\infty$-group\nbut carrying a principal $\\infty$-bundle for the \\emph{extending} $\\infty$-group on their\ntotal space, which on fibers restricts to the given $\\infty$-group extension.\nWe formalize these \\emph{twisted (principal) $\\infty$-bundles}\nand observe that they are classified by twisted cohomology, \nDefinition~\\ref{TwistedCohomologyInOvertopos}.\n\n\\medskip \n\n\\begin{definition}\n \\label{ExtensionOfInfinityGroups}\nWe say a sequence of $\\infty$-groups (Definition~\\ref{inftygroupinootopos}),\n\\[\n A \\to \\hat G \\to G\n\\]\nin $\\mathrm{Grp}(\\mathbf{H})$\n\\emph{exhibits $\\hat G$ as an extension of $G$ by $A$} if $\\hat G \\to G$ \nin $\\mathbf{H}$ is the\nquotient map $\\hat G \\to \\hat G \/\\!\/A$, such that the cocycle \n$G \\to \\mathbf{B}A$ in $\\mathbf{H}$ in $\\mathbf{H}$ corresponding\nto this by Theorem \\ref{PrincipalInfinityBundleClassification} is once deloopable.\n\nHence, by \nTheorem~\\ref{DeloopingTheorem}, the extension corresponds to a \nfiber sequence in $\\mathbf{H}$, Definition~\\ref{fiber sequence} of the form\n$$\n \\xymatrix{\n \\mathbf{B}A \\ar[r] & \\mathbf{B}\\hat G \\ar[r]^{\\mathbf{p}} & \\mathbf{B}G\n\t\\ar[r]^{\\mathbf{c}} & \\mathbf{B}^2 A\n\t\\,.\n }\n$$\nWe write \n$$\n \\mathrm{Ext}(G,A) := \\mathbf{H}(\\mathbf{B}G, \\mathbf{B}^2 A)\n \\simeq (\\mathbf{B}A)\\mathrm{Bund}(\\mathbf{B}G)\n$$\nfor the \\emph{$\\infty$-groupoid of extensions} of $G$ by $A$.\n\\end{definition}\n\\begin{definition}\nGiven an $\\infty$-group extension \n$\\xymatrix{A \\ar[r] & \\hat G \\ar[r]^{\\Omega \\mathbf{c}} & G}$ \nand given a $G$-principal $\\infty$-bundle $P \\to X$ in $\\mathbf{H}$, we say that a \n\\emph{lift} $\\hat P$ of $P$ to a $\\hat G$-principal $\\infty$-bundle is a lift \n$\\hat g_X$ of its classifying \ncocycle $g_X : X \\to \\mathbf{B}G$, under the equivalence of Theorem\n\\ref{PrincipalInfinityBundleClassification}, through the extension:\n$$\n \\raisebox{20pt}{\n \\xymatrix{\n & \\mathbf{B} {\\hat G}\n \\ar[d]^{\\mathbf{p}}\n \\\\\n X \\ar@{-->}[ur]^{\\hat g_X} \\ar[r]_-{g_X} & \\mathbf{B}G.\n }\n }\n$$\nAccordingly, the \\emph{$\\infty$-groupoid of lifts} of $P$ with respect to \n$\\mathbf{p}$ is \n$$\n \\mathrm{Lift}(P,\\mathbf{p}) := \\mathbf{H}_{\/\\mathbf{B}G}(g_X, \\mathbf{p})\n \\,.\n$$\n\\label{PrincipalInfinityBundleExtension}\n\\end{definition}\n\\begin{observation}\n By the universal property of the $\\infty$-pullback, a lift exists precisely if the \n cohomology class\n $$\n [\\mathbf{c}(g_X)] := [\\mathbf{c}\\circ g_X] \\in H^2(X, A)\n $$\n is trivial. \n \\label{ObstructionClassObstructs}\n\\end{observation}\nThis is implied by Theorem \\ref{ExtensionsAndTwistedCohomology}, to which we turn after\nintroducing the following terminology.\n\\begin{definition}\n In the above situation, \n we call $[\\mathbf{c}(g_X)]$ the \\emph{obstruction class} to the extension;\n and we call $[\\mathbf{c}] \\in H^2(\\mathbf{B}G, A)$ the\n \\emph{universal obstruction class} of extensions through $\\mathbf{p}$.\n \n We say that a \\emph{trivialization} of the obstruction cocycle\n $\\mathbf{c}(g_X)$ is a morphism $\\mathbf{c}(g_X) \\to *_X$ in $\\mathbf{H}(X, \\mathbf{B}^2 A)$,\n where ${*}_X : X \\to * \\to \\mathbf{B}^2 A$ is the trivial cocycle. Accordingly, the\n \\emph{$\\infty$-groupoid of trivializations of the obstruction} is\n $$\n \\mathrm{Triv}(\\mathbf{c}(g_X)) := \\mathbf{H}_{\/\\mathbf{B}^2 A}(\\mathbf{c}\\circ g_X, *_X)\n\t\\,.\n $$\n \\label{Obstructions}\n\\end{definition}\nWe give now three different characterizations of spaces of extensions of $\\infty$-bundles.\nThe first two, by spaces of twisted cocycles and by spaces of trivializations \nof the obstruction class, are immediate consequences of the previous discussion:\n\\begin{theorem}\n Let $P \\to X$ be a $G$-principal $\\infty$-bundle corresponding by\n Theorem \\ref{PrincipalInfinityBundleClassification} to a cocycle $g_X : X \\to \\mathbf{B}G$.\n \\begin{enumerate}\n \\item \n\t There is a natural equivalence \n\t $$\n\t \\mathrm{Lift}(P, \\mathbf{p}) \\simeq \\mathrm{Triv}(\\mathbf{c}(g_X))\n\t $$\n\t between the $\\infty$-groupoid of lifts of $P$ through $\\mathbf{p}$, \n Definition \\ref{PrincipalInfinityBundleExtension},\t \n\t and the $\\infty$-groupoid of trivializations \n\t of the obstruction class, Definition \\ref{Obstructions}.\n\t \\item \n\t There is a natural equivalence\n\t $\\mathrm{Lift}(P, \\mathbf{p}) \\simeq \\mathbf{H}_{\/\\mathbf{B}G}(g_X, \\mathbf{p})$\n\t between the $\\infty$-groupoid of lifts and the $\\infty$-groupoid of \n\t $g_X$-twisted cocycles relative to $\\mathbf{p}$, Definition \\ref{TwistedCohomologyInOvertopos},\n\t hence a classification\n\t $$\n\t \\pi_0 \\mathrm{Lift}(P, \\mathbf{P}) \\simeq H^{1+[g_X]}(X, A)\n\t $$\n\t of equivalence classs of lifts by the $[g_X]$-twisted $A$-cohomology of $X$\n\t relative to the local coefficient bundle\n $$\n \\raisebox{20pt}{\n \\xymatrix{\n \\mathbf{B}A \\ar[r] & \\mathbf{B}\\hat G \\ar[d]^{\\mathbf{p}} \n \t \\\\\n\t & \\mathbf{B}G\\,.\n }\n }\n $$ \n\\end{enumerate}\n \\label{ExtensionsAndTwistedCohomology}\n\\end{theorem}\n\\proof\n The first statement is the special case of Lemma \\ref{SliceMapsIntoPullbacks}\n where the $\\infty$-pullback $E_1 \\simeq f^* E_2$ in the notation there is identified\n with $\\mathbf{B}\\hat G \\simeq \\mathbf{c}^* {*}$.\n The second is evident after unwinding the definitions.\n\\hfill{$\\square$}\\\\\n\\begin{remark}\n For the special case that $A$ is 0-truncated, we may, by the discussion in \n \\cite{NikolausWaldorf, NSSc}, identify \n $\\mathbf{B}A$-principal $\\infty$-bundles with $A$-\\emph{bundle gerbes},\n \\cite{Mur}.\n Under this identification the $\\infty$-bundle classified by the \n obstruction class $[\\mathbf{c}(g_X)]$ above is what is called the\n \\emph{lifting bundle gerbe} of the lifting problem, see for instance \n \\cite{CBMMS} for a review. \n In this case \n the first item of Theorem \\ref{ExtensionsAndTwistedCohomology} reduces to\n Theorem 2.1 in \\cite{Waldorf} and Theorem A (5.2.3) in \\cite{NikolausWaldorf2}. \n The reduction of this statement to \n connected components, \n hence the special case of Observation \\ref{ObstructionClassObstructs},\n was shown in \\cite{BreenBitorseurs}.\n \\label{ReferencesOnLiftings}\n\\end{remark}\nWhile, therefore, the discussion of extensions of $\\infty$-groups and of \nlifts of structure $\\infty$-groups\nis just a special case of the discussion in the previous sections, this special case\nadmits geometric representatives of cocycles in the corresponding twisted cohomology by\ntwisted principal $\\infty$-bundles. This we turn to now. \n\\begin{definition}\n \\label{TwistedBundle}\n Given an extension of $\\infty$-groups $A \\to \\hat G \\xrightarrow{\\Omega \\mathbf{c}} G$\n and given a $G$-principal $\\infty$-bundle $P \\to X$, with class $[g_X] \\in H^1(X,G)$, \n a \\emph{$[g_X]$-twisted $A$-principal $\\infty$-bundle} on $X$ is an $A$-principal\n $\\infty$-bundle $\\hat P \\to P$ such that the cocycle $q : P \\to\\mathbf{B}A$\n corresponding to it under Theorem \\ref{PrincipalInfinityBundleClassification}\n is a morphism of $G$-$\\infty$-actions.\n \n The \\emph{$\\infty$-groupoid of $[g_X]$-twisted $A$-principal $\\infty$-bundles on $X$} is \n $$\n A\\mathrm{Bund}^{[g_X]}(X)\n\t:=\n\tG \\mathrm{Action}( P, \\mathbf{B}A )\n\t\\subset\n\t\\mathbf{H}(P, \\mathbf{B}A)\n\t\\,.\n $$\n\\end{definition}\n\\begin{observation}\n \\label{BundleOnTotalSpaceFromExtensionOfBundles}\n Given an $\\infty$-group extension $A \\to \\hat G \\stackrel{\\Omega \\mathbf{c}}{\\to} G$,\n an extension of a $G$-principal $\\infty$-bundle $P \\to X$\n to a $\\hat G$-principal $\\infty$-bundle, Definition \\ref{PrincipalInfinityBundleExtension}, induces\n an $A$-principal $\\infty$-bundle $\\hat P \\to P$ \n fitting into a pasting diagram of $\\infty$-pullbacks of the form\n$$\n \\raisebox{30pt}{\n \\xymatrix{\n \\hat G \\ar[r] \\ar[d]^{\\Omega \\mathbf{c}} & \\hat P \\ar[r] \\ar[d] & {*} \\ar[d]\n \\\\\n G \\ar[r] \\ar[d] & P \\ar[r]^{q} \\ar[d]& \\mathbf{B}A \\ar[r] \\ar[d] & {*} \\ar[d]\n \\\\\n {*} \\ar[r]^{x}&\n X \\ar@\/_1pc\/[rr]_g \\ar[r]^{\\hat g} & \\mathbf{B}\\hat G\n \\ar[r]^{\\mathbf{c}}& \\mathbf{B}G.\n }\n }\n$$\n In particular, it has the following properties: \n \\begin{enumerate}\n \\item $\\hat P \\to P$ is a $[g_X]$-twisted $A$-principal bundle, Definition \\ref{TwistedBundle};\n\t\\item for all points $x : * \\to X$ the restriction of $\\hat P \\to P$ to the \n\tfiber $P_x$ is equivalent to the $\\infty$-group extension $\\hat G \\to G$.\n \\end{enumerate} \n\\end{observation}\n\\proof\nThis follows from repeated application of the pasting law for $\\infty$-pullbacks, \nProposition~\\ref{PastingLawForPullbacks}.\n\nThe bottom composite $g : X \\to \\mathbf{B}G$ is a cocycle for the given $G$-principal $\\infty$-bundle \n$P \\to X$ and it factors through $\\hat g : X \\to \\mathbf{B}\\hat G$ by assumption of the existence of \nthe extension $\\hat P \\to P$. \n\nSince also the bottom right square is an $\\infty$-pullback by the given $\\infty$-group extension, \nthe pasting law asserts that the square over $\\hat g$ is also an $\\infty$-pullback, and then that so \nis the square over $q$. This exhibits $\\hat P$ as an $A$-principal $\\infty$-bundle over $P$ classified\nby the cocycle $q$ on $P$. By Proposition~\\ref{ClassificationOfTwistedGEquivariantBundles}\nthis $\\hat P \\to P$ is twisted $G$-equivariant.\n\nNow choose any point $x : {*} \\to X$ of the base space \nas on the left of the diagram. Pulling this back upwards \nthrough the diagram and using the pasting law and the \ndefinition of loop space objects $G \\simeq \\Omega \n\\mathbf{B}G \\simeq * \\times_{\\mathbf{B}G} *$ the diagram \ncompletes by $\\infty$-pullback squares on the left as indicated, which proves the claim.\n\\hfill{$\\square$}\\\\\n\n\\begin{theorem}\n The construction of Observation \\ref{BundleOnTotalSpaceFromExtensionOfBundles}\n extends to an equivalence of $\\infty$-groupoids\n $$\n A\\mathrm{Bund}^{[g_X]}(X)\n\t\\simeq\n\t\\mathbf{H}_{\/\\mathbf{B}G}(g_X, \\mathbf{c})\n $$\n between that of $[g_X]$-twisted $A$-principal bundles on $X$, \n Definition \\ref{TwistedBundle}, and the cocycle $\\infty$-groupoid of\n degree-1 $[g_X]$-twisted $A$-cohomology, Definition \\ref{TwistedCohomologyInOvertopos}.\n \n In particular the classification of $[g_X]$-twisted $A$-principal bundles is\n $$\n A\\mathrm{Bund}^{[g_X]}(X)_{\/\\sim}\n\t\\simeq\n\tH^{1+[g_X]}(X, A)\n\t\\,.\n $$\n \\label{ClassificationOfTwistedGEquivariantBundles}\n\\end{theorem}\n\\proof\n For $G = *$ the trivial group, the statement reduces to \n Theorem~\\ref{PrincipalInfinityBundleClassification}. The general proof\n works along the same lines as the proof of that theorem.\n The key step is the generalization of the proof of Proposition~\\ref{LocalTrivialityImpliesCocycle}.\n This proceeds verbatim as there, only with $\\mathrm{pt} : * \\to \\mathbf{B}G$ generalized to\n $i : \\mathbf{B}A \\to \\mathbf{B}\\hat G$. \n The morphism of $G$-actions\n $P \\to \\mathbf{B}A$ and a choice of effective epimorphism $U \\to X$ over\n which $P \\to X$ trivializes gives rise to a morphism in \n $\\mathbf{H}^{\\Delta[1]}_{\/(* \\to \\mathbf{B}G)}$ which involves the diagram\n $$\n \\raisebox{20pt}{\n \\xymatrix{\n\t U \\times G \\ar@{->>}[r] \\ar[d] & P \\ar[r] \\ar[d] & \\mathbf{B}A \\ar[d]^{i}\n\t \\\\\n\t U \\ar@{->>}[r] & X \\ar[r] & \\mathbf{B}\\hat G\n\t}\n\t}\n\t\\;\\;\n\t\\simeq\n\t\\;\\;\n \\raisebox{20pt}{\n \\xymatrix{\n\t U \\times G \\ar@{->>}[rr] \\ar[d] & & \\mathbf{B}A \\ar[d]^{i}\n\t \\\\\n\t U \\ar[r] & {*} \\ar[r]^{\\mathrm{pt}} & \\mathbf{B}\\hat G\n\t}\n\t}\n $$\n in $\\mathbf{H}$. (We are using that for the 0-connected object $\\mathbf{B}\\hat G$\n every morphism $* \\to \\mathbf{B}G$ factors through $\\mathbf{B}\\hat G \\to \\mathbf{B}G$.)\n Here the total rectangle and the left square on the left are $\\infty$-pullbacks,\n and we need to show that the right square on the left is then also an \n $\\infty$-pullback. Notice that by the pasting law the rectangle on the\n right is indeed equivalent to the pasting of $\\infty$-pullbacks\n $$ \n \\raisebox{20pt}{\n \\xymatrix{\n\t U \\times G \\ar@{->}[r] \\ar[d] & G \\ar[r] \\ar[d] & \\mathbf{B}A \\ar[d]^{i}\n\t \\\\\n\t U \\ar[r] & {*} \\ar[r]^{\\mathrm{pt}} & \\mathbf{B}\\hat G\n\t}\n\t}\n $$\n so that the relation\n $$\n U^{\\times^{n+1}_X} \\times G\n\t\\simeq\n\ti^* (U^{\\times^{n+1}_X})\n $$\n holds. With this the proof finishes as in the proof of \n Proposition~\\ref{LocalTrivialityImpliesCocycle}, with $\\mathrm{pt}^*$\n generalized to $i^*$. \n\\hfill{$\\square$}\\\\\n\n\\begin{remark}\n Aspects of special cases of this theorem can be identified in the literature.\n For the special case of ordinary extensions of ordinary Lie groups,\n the equivalence of the corresponding extensions of a principal bundle with \n certain equivariant structures on its total space is essentially the content\n of \\cite{Mackenzie, Androulidakis}. \n In particular the twisted unitary bundles or \\emph{gerbe modules}\n of twisted K-theory \\cite{CBMMS}\n are equivalent to such structures.\n\n For the case of $\\mathbf{B}U(1)$-extensions of Lie groups, such as the\n $\\mathrm{String}$-2-group, the equivalence of the corresponding \n $\\mathrm{String}$-principal 2-bundles, \n by the above theorem, to certain bundle gerbes on the total spaces of \n principal bundles underlies constructions such as in \\cite{Redden}.\n Similarly the bundle gerbes on double covers considered in \n \\cite{SSW} are $\\mathbf{B}U(1)$-principal 2-bundles on $\\mathbb{Z}_2$-principal\n bundles arising by the above theorem from the extension \n $\\mathbf{B}U(1) \\to \\mathbf{Aut}(\\mathbf{B}U(1)) \\to \\mathbb{Z}_2$,\n a special case of the extensions that we consider in the next Section\n \\ref{StrucInftyGerbes}.\n \n These and more examples we discuss in detail in \\cite{NSSc}.\n \\label{ReferencesTwistedBundles}\n\\end{remark}\n\n\n\n\\subsection{Gerbes}\n\\label{section.InfinityGerbes}\n\\label{StrucInftyGerbes}\n\nRemark \\ref{PointedConnectedLocalCoefficients} above indicates that of special relevance are those\n$V$-fiber $\\infty$-bundles $E \\to X$ in an $\\infty$-topos $\\mathbf{H}$ \nwhose typical fiber $V$ is pointed connected,\nand hence is the moduli $\\infty$-stack $V = \\mathbf{B}G$ of $G$-principal \n$\\infty$-bundles for some $\\infty$-group $G$. \nDue to their local triviality, \nwhen regarded as objects in the slice $\\infty$-topos $\\mathbf{H}_{\/X}$,\nthese $\\mathbf{B}G$-fiber $\\infty$-bundles are themselves \\emph{connected objects}.\nGenerally, for $\\mathcal{X}$ an $\\infty$-topos regarded as an $\\infty$-topos\nof $\\infty$-stacks over a given space $X$, it makes sense to consider\nits connected objects as $\\infty$-bundles over $X$. Here we discuss these\n\\emph{$\\infty$-gerbes}.\n\n\\medskip\n\nIn the following discussion it is useful to consider two $\\infty$-toposes:\n\\begin{enumerate}\n \\item an ``ambient'' $\\infty$-topos $\\mathbf{H}$ as before, to be thought of \n as an $\\infty$-topos ``of all geometric homotopy types'' for a given notion of geometry, \n\tin which $\\infty$-bundles are given by \\emph{morphisms} and the terminal \n\tobject plays the role of the geometric point $*$;\n \\item an $\\infty$-topos $\\mathcal{X}$, to be thought of as the topos-theoretic\n incarnation of a single geometric homotopy type (space) $X$, hence as \n an $\\infty$-topos of\n ``geometric homotopy types {\\'e}tale over $X$'', in which an $\\infty$-bundle over $X$\n is given by an \\emph{object} and the terminal object plays the role of the base space $X$. \n \n In practice, $\\mathcal{X}$ is the slice\n $\\mathbf{H}_{\/X}$ of the previous ambient $\\infty$-topos over $X \\in \\mathbf{H}$, or\n the smaller $\\infty$-topos $\\mathcal{X} = \\mathrm{Sh}_\\infty(X)$ of (internal)\n $\\infty$-stacks over $X$. \n\\end{enumerate}\nIn topos-theory literature the role of $\\mathbf{H}$ above is sometimes referred to as that of a \n\\emph{gros} topos and then the role of $\\mathcal{X}$ is referred to as that of a \\emph{petit} topos. \nThe reader should beware that much of the classical literature on gerbes is written\nfrom the point of view of only the \\emph{petit} topos $\\mathcal{X}$. \n\n\n\\medskip\n\nThe original definition of a \\emph{gerbe} \non $X$ \\cite{Giraud} is: a stack $E$ (i.e.\\ a \n1-truncated $\\infty$-stack) over $X$ that is \n1. \\emph{locally non-empty} and 2. \\emph{locally connected}. \nIn the more intrinsic language of higher topos theory, these \ntwo conditions simply say that $E$ is \na \\emph{connected object} (Definition 6.5.1.10 in \\cite{Lurie}): \n1. the terminal morphism $E \\to *$ is an \neffective epimorphism and 2. the 0th homotopy sheaf is trivial, \n$\\pi_0(E) \\simeq *$. This reformulation is \nmade explicit in the literature for instance in \nSection 5 of \\cite{JardineLuo} and in Section 7.2.2 of \\cite{Lurie}. Therefore:\n\\begin{definition}\n For $\\mathcal{X}$ an $\\infty$-topos, a \\emph{gerbe} in $\\mathcal{X}$ is an object $E \\in \\mathcal{X}$ which is\n \\begin{enumerate}\n \\item connected;\n\t\\item 1-truncated.\n \\end{enumerate}\n For $X \\in \\mathbf{H}$ an object, a \\emph{gerbe $E$ over $X$} is a gerbe in the slice\n $\\mathbf{H}_{\/X}$. This is an object $E \\in \\mathbf{H}$ together with an effective epimorphism $E \\to X$ such that $\\pi_i(E) = X$ for all $i \\neq 1$. \n \\label{Gerbe}\n\\end{definition}\n\\begin{remark}\n Notice that conceptually this is different from the\n notion of \\emph{bundle gerbe} introduced in \\cite{Mur} \n (see \\cite{NikolausWaldorf} for a review). \n We discuss in \\cite{NSSc} that \n bundle gerbes are presentations of \\emph{principal} $\\infty$-bundles \n (Definition \\ref{principalbundle}).\n But gerbes -- at least the \\emph{$G$-gerbes}\n considered in a moment in Definition \\ref{G-Gerbe} -- \n are $V$-fiber $\\infty$-bundles (Definition \\ref{FiberBundle})\n hence \\emph{associated} to principal $\\infty$-bundles \n (Proposition \\ref{VBundleIsAssociated}) with the special \n property of having pointed connected fibers. \n By Theorem \\ref{VBundleClassification} \n $V$-fiber $\\infty$-bundles may be identified with their underlying $\\mathbf{Aut}(V)$-principal \n $\\infty$-bundles and so one may identify $G$-gerbes with nonabelian \n $\\mathrm{Aut}(\\mathbf{B}G)$-bundle gerbes\n (see also around Proposition~\\ref{ClassificationOfGGerbes} below), \n but considered generally, neither of these\n two notions is a special case of the other. Therefore the terminology is \n slightly unfortunate, but it is standard.\n\\end{remark}\nDefinition \\ref{Gerbe} has various obvious generalizations. The following is considered in \\cite{Lurie}.\n\\begin{definition}\n \\index{$\\infty$-gerbe!EM $n$-gerbe}\n For $n \\in \\mathbb{N}$, an \\emph{EM $n$-gerbe} is an object $E \\in \\mathcal{X}$ which is\n \\begin{enumerate}\n \\item $(n-1)$-connected;\n \\item $n$-truncated.\n \\end{enumerate}\n\\end{definition}\n\\begin{remark}\nThis is almost the definition of an \n\\emph{Eilenberg-Mac Lane object} in $\\mathcal{X}$, \nonly that the condition requiring a global section \n$* \\to E$ (hence $X \\to E$) is missing. Indeed, the \nEilenberg-Mac Lane objects of degree $n$ in \n$\\mathcal{X}$ are precisely the EM $n$-gerbes of \n\\emph{trivial class}, according to Proposition~\\ref{ClassificationOfGGerbes} below.\n\\end{remark}\nThere is also an earlier established definition of \n\\emph{2-gerbes} in the literature \\cite{Breen}, which is \nmore general than EM 2-gerbes. Stated in the above fashion it reads as follows.\n\\begin{definition}[Breen \\cite{Breen}]\n \\index{$\\infty$-gerbe!2-gerbe}\n \\index{2-gerbe}\n A \\emph{2-gerbe} in $\\mathcal{X}$ is an object $E \\in \\mathcal{X}$ which is\n \\begin{enumerate}\n \\item connected;\n\t\\item 2-truncated.\n \\end{enumerate}\n\\end{definition}\nThis definition has an evident generalization to arbitrary degree, which we adopt here.\n\\begin{definition}\n \\label{nGerbe}\n An \\emph{$n$-gerbe} in $\\mathcal{X}$ is an object $E \\in \\mathcal{X}$ which is \n \\begin{enumerate}\n \\item connected;\n\t \\item $n$-truncated.\n \\end{enumerate}\nIn particular an \\emph{$\\infty$-gerbe} is a connected object.\n\\end{definition}\nThe real interest is in those $\\infty$-gerbes which have a prescribed\ntypical fiber:\n\\begin{remark}\nBy the above, $\\infty$-gerbes (and hence EM $n$-gerbes \nand 2-gerbes and hence gerbes) are much like deloopings \nof $\\infty$-groups (Theorem \\ref{DeloopingTheorem}) \nonly that there is no requirement that there \nexists a global section. An $\\infty$-gerbe for which there exists a \nglobal section $X \\to E$ is called \\emph{trivializable}. By \nTheorem~\\ref{DeloopingTheorem} trivializable $\\infty$-gerbes are equivalent to $\\infty$-group objects in $\\mathcal{X}$ \n(and the $\\infty$-groupoids of all of these are equivalent \nwhen transformations are required to preserve the canonical global section).\n\\end{remark}\nBut \\emph{locally} every $\\infty$-gerbe $E$ is of this form. For let\n$$\n (x^* \\dashv x_*) :\n \\xymatrix{\n \\mathrm{Grpd}_{\\infty}\n\t \\ar@{<-}@<+3pt>[r]^-{x^*}\n\t \\ar@<-3pt>[r]_-{x_*}\n\t\t&\n \\mathcal{X}\t \n }\n$$\nbe a topos point. Then the stalk $x^* E \\in \\mathrm{Grpd}_{\\infty}$ \nof the $\\infty$-gerbe is connected: because inverse images \npreserve the finite $\\infty$-limits involved in the definition of homotopy sheaves, and preserve the terminal object. Therefore\n$$\n \\pi_0\\, x^* E \\simeq x^* \\pi_0 E \\simeq x^* * \\simeq *\n \\,.\n$$\nHence for every point $x$ we have a stalk $\\infty$-group $G_x$ and an equivalence \n$$\n x^* E \\simeq B G_x \n \\,.\n$$\nTherefore one is interested in the following notion.\n\\begin{definition}\n For $G \\in \\mathrm{Grp}(\\mathcal{X})$ an $\\infty$-group \n object, a \\emph{$G$-$\\infty$-gerbe} is an $\\infty$-gerbe $E$ such that there exists \n \\begin{enumerate}\n \\item an effective epimorphism $\\xymatrix{U \\ar@{->>}[r] & X}$;\n\t\\item an equivalence $E|_U \\simeq \\mathbf{B} G|_U$.\n \\end{enumerate}\n Equivalently: a $G$-$\\infty$-gerbe is a $\\mathbf{B}G$-fiber $\\infty$-bundle,\n according to Definition \\ref{FiberBundle}.\n \\label{G-Gerbe}\n\\end{definition}\nIn words this says that a $G$-$\\infty$-gerbe is one that locally looks like the \nmoduli $\\infty$-stack of $G$-principal $\\infty$-bundles.\n\\begin{example}\n For $X$ a topological space and $\\mathcal{X} = \n \\mathrm{Sh}_\\infty(X)$ the $\\infty$-topos of $\\infty$-sheaves over it, these notions reduce to the following.\n \\begin{itemize}\n \\item a 0-group object $G \\in \\tau_{0}\\mathrm{Grp}(\\mathcal{X}) \n \\subset \\mathrm{Grp}(\\mathcal{X})$ is a sheaf of groups on $X$ \n (here $\\tau_0\\mathrm{Grp}(\\mathcal{X})$ denotes the 0-truncation of \n $\\mathrm{Grp}(\\mathcal{X})$;\n\t\\item for $\\{U_i \\to X\\}$ any open cover, the canonical \n\tmorphism $\\coprod_i U_i \\to X$ is an effective epimorphism to the terminal object;\n\t\\item $(\\mathbf{B}G)|_{U_i}$ is the stack of \n\t $G|_{U_i}$-principal bundles ($G|_{U_i}$-torsors).\n \\end{itemize}\n\\end{example}\nIt is clear that one way to construct a $G$-$\\infty$-gerbe \nshould be to start with an $\\mathbf{Aut}(\\mathbf{B}G)$-principal \n$\\infty$-bundle, Remark \\ref{UniversalTwistByAutomorphisms},\nand then canonically \\emph{associate} a fiber $\\infty$-bundle to it.\n\\begin{example}\n \\label{automorphism2GroupAbstractly}\n For $G \\in \\tau_{0}\\mathrm{Grp}(\\mathrm{Grpd}_{\\infty})$ an \n ordinary group, $\\mathbf{Aut}(\\mathbf{B}G)$ is usually called the \n \\emph{automorphism 2-group} of $G$. Its underlying groupoid is equivalent to\n \\[\n \\mathbf{Aut}(G) \\times G\\rightrightarrows \n \\mathbf{Aut}(G), \n \\]\n the action groupoid for the action of $G$ on $\\mathbf{Aut}(G)$ \n via the homomorphism $\\mathrm{Ad}\\colon G\\to \\mathbf{Aut}(G)$. \n\\end{example}\n\\begin{corollary}\n Let $\\mathcal{X}$ be a 1-localic $\\infty$-topos \n (i.e.\\ one that has a 1-site of definition). \n Then for $G \\in \\mathrm{Grp}(\\mathcal{X})$ any \n $\\infty$-group object, $G$-$\\infty$-gerbes are classified by $\\mathbf{Aut}(\\mathbf{B}G)$-cohomology:\n $$\n \\pi_0 G \\mathrm{Gerbe}\n\t\\simeq\n\t\\pi_0 \\mathcal{X}(X,\\mathbf{B}\\mathbf{Aut}(\\mathbf{B}G))\n\t=:\n\tH^1_{\\mathcal{X}}(X,\\mathbf{Aut}(\\mathbf{B}G))\n\t\\,.\n $$\n \\label{ClassificationOfGGerbes}\n\\end{corollary}\n\\proof\n This is the special case of Theorem \\ref{VBundleClassification}\n for $V = \\mathbf{B}G$.\n\\hfill{$\\square$}\\\\\nFor the case that $G$ is 0-truncated (an ordinary group object) \nthis is the content of Theorem 23 in \\cite{JardineLuo}.\n\\begin{example}\n For $G \\in \\mathrm{Grp}(\\mathcal{X}) \\subset \n \\tau_{\\leq 0}\\mathrm{Grp}(\\mathcal{X})$ an ordinary 1-group object, \n this reproduces the classical result of \\cite{Giraud}, \n which originally motivated the whole subject: \n by Example~\\ref{automorphism2GroupAbstractly} in this case $\\mathbf{Aut}(\\mathbf{B}G)$ is the traditional automorphism 2-group and \n $H^1_{\\mathcal{X}}(X, \\mathbf{Aut}(\\mathbf{B}G))$\n is Giraud's nonabelian $G$-cohomology that classifies $G$-gerbes\n (for arbitrary \\emph{band}, see Definition \\ref{BandOfInfinityGerbe} below).\n \n For $G \\in \\tau_{\\leq 1}\\mathrm{Grp}(\\mathcal{X}) \\subset \n \\mathrm{Grp}(\\mathcal{X})$ a 2-group, we recover the classification of 2-gerbes\n as in \\cite{Breen,BreenNotes}.\n\\end{example}\n\\begin{remark}\n In Section 7.2.2 of \\cite{Lurie} the special case that here\n we called \\emph{EM-$n$-gerbes} is considered. Beware \n that there are further differences: for instance the notion \n of morphisms between $n$-gerbes as defined in \\cite{Lurie} is more \n restrictive than the notion considered here. For instance with our definition \n (and hence also that in \\cite{Breen}) each group automorphism of \n an abelian group object $A$ induces an automorphism of the \n trivial $A$-2-gerbe $\\mathbf{B}^2 A$. But, except for the identity, \n this is not admitted in \\cite{Lurie} (manifestly so by the diagram \n above Lemma 7.2.2.24 there). Accordingly, the classification \n result in \\cite{Lurie} is different: it involves the cohomology group \n $H^{n+1}_{\\mathcal{X}}(X, A)$. Notice that there is a canonical morphism\n $$\n H^{n+1}_{\\mathcal{X}}(X, A) \\to H^1_{\\mathcal{X}}(X, \\mathbf{Aut}(\\mathbf{B}^n A))\n $$ \n induced from the morphism $\\mathbf{B}^{n+1}A \\to \\mathbf{Aut}(\\mathbf{B}^n A)$.\n\\end{remark}\n\nWe now discuss how the $\\infty$-group extensions, Definition \\ref{ExtensionOfInfinityGroups},\ngiven by the Postnikov stages of $\\mathbf{Aut}(\\mathbf{B}G)$ induces the notion of\n\\emph{band} of a gerbe, and how the corresponding twisted cohomology,\naccording to Remark \\ref{ExtensionsAndTwistedCohomology}, reproduces \nthe original definition of nonabelian cohomology in \\cite{Giraud} and generalizes\nit to higher degree.\n\\begin{definition}\n \\label{outerAutomorphismInfinityGroup}\n Fix $k \\in \\mathbb{N}$. For $G \\in \\infty\\mathrm{Grp}(\\mathcal{X})$ a \n $k$-truncated $\\infty$-group object (a $(k+1)$-group), write\n $$\n \\mathbf{Out}(G) := \\tau_{k}\\mathbf{Aut}(\\mathbf{B}G)\n $$\n for the $k$-truncation of $\\mathbf{Aut}(\\mathbf{B}G)$. (Notice \n that this is still an $\\infty$-group, since by Lemma 6.5.1.2 in \n \\cite{Lurie} $\\tau_n$ preserves all $\\infty$-colimits and additionally \n all products.) We call this the \\emph{outer automorphism $n$-group} of $G$.\n \n In other words, we write\n $$\n \\mathbf{c} : \\mathbf{B}\\mathbf{Aut}(\\mathbf{B}G) \\to \\mathbf{B}\\mathbf{Out}(G)\n $$\n for the top Postnikov stage of $\\mathbf{B}\\mathbf{Aut}(\\mathbf{B}G)$.\n\\end{definition}\n\\begin{example}\n Let $G \\in \\tau_0\\mathrm{Grp}(\\mathrm{Grpd}_{\\infty})$ be \n a 0-truncated group object, an \n ordinary group,.\n Then by Example \\ref{automorphism2GroupAbstractly}, \n $\\mathbf{Out}(G) = \\mathbf{Out}(G)$ is the coimage of \n $\\mathrm{Ad} : G \\to \\mathrm{Aut}(G)$, which is the traditional group of outer automorphisms of $G$.\n\\end{example}\n\\begin{definition}\n Write $\\mathbf{B}^2 \\mathbf{Z}(G)$ for the $\\infty$-fiber of \n the morphism $\\mathbf{c}$ from Definition \\ref{outerAutomorphismInfinityGroup}, \n fitting into a fiber sequence\n $$\n \\xymatrix{\n \\mathbf{B}^2 \\mathbf{Z}(G) \\ar[r] & \n\t \\mathbf{B}\\mathbf{Aut}(\\mathbf{B}G) \\ar[d]^{\\mathbf{c}}\n\t \\\\\n\t & \\mathbf{B}\\mathbf{Out}(G)\n\t}\n\t\\,.\n $$\n We call $\\mathbf{Z}(G)$ the \\emph{center} of the $\\infty$-group $G$.\n \\label{Center}\n\\end{definition}\n\\begin{example}\n For $G$ an ordinary group, so that $\\mathbf{Aut}(\\mathbf{B}G)$ \n is the automorphism 2-group from Example \\ref{automorphism2GroupAbstractly},\n $\\mathbf{Z}(G)$ is the center of $G$ in the traditional sense.\n\\end{example}\nBy theorem \\ref{ClassificationOfGGerbes} there is an induced morphism\n$$\n \\mathrm{Band} \n : \n \\pi_0 G \\mathrm{Gerbe} \\to H^1(X, \\mathbf{Out}(G))\n \\,.\n$$\n\\begin{definition}\n \\label{BandOfInfinityGerbe}\n For $E \\in G \\mathrm{Gerbe}$ we call $\\mathrm{Band}(E)$ the \\emph{band} of $E$.\n\n By using Definition \\ref{Center} in Definition \\ref{TwistedCohomologyInOvertopos}, \n given a band $[\\phi_X] \\in H^1(X, \\mathbf{Out}(G))$, \n we may regard it as a twist for twisted $\\mathbf{Z}(G)$-cohomology,\n classifying $G$-gerbes with this band:\n $$\n \\pi_0 G \\mathrm{Gerbe}^{[\\phi_X]}(X) \\simeq H^{2+[\\phi_X]}(X, \\mathbf{Z}(G))\n\t\\,.\n $$\n\\end{definition}\n\\begin{remark}\n The original definition of \\emph{gerbe with band} in \\cite{Giraud} is slightly\n more general than that of \\emph{$G$-gerbe} (with band) in \\cite{Breen}: in the former\n the local sheaf of groups whose delooping is locally equivalent to the gerbe need not\n descend to the base. These more general Giraud gerbes are 1-gerbes in the sense of\n Definition \\ref{nGerbe}, but only the slightly more restrictive $G$-gerbes of Breen\n have the good property of being connected fiber $\\infty$-bundles. From our\n perspective this is the decisive property of gerbes, and the notion of band is \n relevant only in this case.\n\\end{remark}\n\\begin{example}\n For $G$ a 0-group this reduces to the notion of band as introduced in \\cite{Giraud},\n for the case of $G$-gerbes as in \\cite{Breen}.\n\\end{example}\n\n\\medskip\n\n\\noindent{\\bf Acknowledgements.}\nThe writeup of this article and the companions \\cite{NSSb, NSSc} was\ninitiated during a visit by the first two authors to the third author's institution, \nUniversity of Glasgow, in summer 2011. It was completed in summer 2012\nwhen all three authors were guests at the \nErwin Schr\\\"{o}dinger Institute in Vienna. \nThe authors gratefully acknowledge the support of \nthe Engineering and Physical Sciences Research Council \ngrant number EP\/I010610\/1 and the support of the ESI.\nU.S. thanks Domenico Fiorenza for inspiring discussion about\ntwisted cohomology.\n\n\n\n\n\\addcontentsline{toc}{section}{References}\n\n","meta":{"redpajama_set_name":"RedPajamaArXiv"}}