\section{Introduction}
\label{sec:intro}
Image manipulation is a task of interest in computer vision, which consists of the partial synthesis, change, or removal of the content in a given image. In recent years, this task has been explored using deep generative models, in particular utilizing Generative Adversarial Networks (GANs) \cite{goodfellow2014generative}. There have been different approaches towards image manipulation, in which the interface used to induce these changes by a user is an important choice. The utilization of segmentation maps for image modification \cite{hong2018learning,ntavelis2020sesame} requires direct manipulation of a semantic segmentation map at the pixel level. Recently, motivated by a more user-friendly interface, SIMSG \cite{dhamo2020semantic} proposed a semantic manipulation framework using scene graphs. Scene graphs define a scene by considering the objects in the scene as the nodes in the graph, and the edges as the relationships between the objects. In semantic image manipulation using scene graphs, the user simply needs to change the nodes or edges in a graph that represents the scene. The manipulation of scenes in SIMSG \cite{dhamo2020semantic} is performed by masking specific parts of data based on the manipulation mode, e.g., the object features or the bounding box information.

Despite the encouraging results, this model comes with a pitfall that the learned object features used for manipulation are intertwined, i.e., they encode both the pose and appearance features simultaneously. This becomes particularly evident when we want to preserve one of the aspects of an object while changing the other. For instance, in \cref{fig:compare} we observe a relationship change setup. When the \texttt{man} changes from \texttt{riding} to \texttt{near} the \texttt{wave} (left), or from \texttt{sitting} to \texttt{standing} in the \texttt{sand} (right), SIMSG \cite{dhamo2020semantic} (middle column) will lose some visual features of the man, in the process of adapting to the new pose, i.e. change of body shape or outfit color.

In this work, we propose \textbf{DisPositioNet}, a network for \textbf{Dis}entangled \textbf{Pos}e and \textbf{I}dentity in Semantic Image Manipula\textbf{tion}, which disentangles the object features using a self-supervised variational approach by employing two branches for encoding the pose and appearance features in the latent space. We hypothesize that, by disentangling the features in the image manipulation framework, the model would preserve features more reliably, and therefore generate more meaningful results. To disentangle the features further and make the extracted features from the scene graph more compatible with the variational embedding, we propose DSGN, a disentangled scene graph neural network for disentangled feature extraction from the scene graphs. We evaluate our model on standard benchmarks for image manipulation (Visual Genome \cite{krishna2017visual}, and Microsoft COCO \cite{lin2014microsoft}), showing superior performance compared to the baseline \cite{dhamo2020semantic} both quantitatively and qualitatively. The qualitative results show that our proposed method specifically outperforms SIMSG \cite{dhamo2020semantic} in cases where the appearance of the object should be preserved while changing its pose.

To summarize our contributions, we propose: 1) a self-supervised approach for disentanglement of pose and appearance for semantic image manipulation, that does not require label information for the disentanglement task, 2) a disentangled scene graph neural network, 3) a variational latent representation that provides higher diversity in image manipulation, 4) superior quantitative and qualitative performance compared to the state of the art on two public benchmarks. The source code of this work is provided in the supplementary material, and it will be publicly released upon its acceptance.

\section{Related Work}
\label{sec:rel}

\paragraph{Scene Graphs}
Scene graphs define a directed graph representation that describes an image \cite{johnson15}, where objects are the nodes and their relationships are the edges.
A broad line of works explores the generation of scene graphs from an image \cite{herzig2018mapping,qi2018attentive,zellers2018neural,li2017scene,newell2017pixels,tang2020unbiased,suhail2021energy} and recently also point clouds~\cite{3DSSG2020,wu2021scenegraphfusion}. The task boils down to identifying the underlying objects in a scene and their visual relationships. A diverse set of approaches has been explored for this purpose, such as iterative message-passing \cite{xu2017scenegraph}, decomposition of the graph into sub-graphs \cite{li2018factorizable} and attention mechanisms \cite{yang2018graph}. Recently, SceneGraphGen \cite{garg2021unconditional} explored this task unconditionally by learning an auto-regressive model on scene graphs. Scene graphs have shown to be a powerful alternative in conditional scene generation \cite{johnson2018image,luo2020end,graph2scene2021}, and manipulation \cite{dhamo2020semantic}, which we will review as it follows.

\paragraph{Image Generation}
The recent advances in image generation, for the most part, emerged from Generative Adversarial Networks \cite{goodfellow2014generative} and diffusion models \cite{nichol2021improved}. In particular, the community has explored conditional variants \cite{mirza2014conditional} which enable image generation conditioned on various modalities.
Pix2Pix \cite{isola2017image} represents a model for general translation between different image domains. Further, CycleGAN \cite{zhu2017unpaired} attempts this task by relaxing the need for image pairs for training. Other works \cite{karras2020analyzing,karras2021alias} explore unconditional generation, typically focused on a specific domain, such as faces. A line of methods \cite{chen2017photographic,wang2018high,park2019SPADE} propose semantic image generation, where an image results from an input semantic map.
Other works propose image generation from layout \cite{zhao2018image,Sun_2019_ICCV}, as a set of bounding boxes and class labels for each scene instance. More related to ours are methods that generate an image conditioned on a scene graph \cite{johnson2018image,ashual2019specifying,farshad2021_MIGS,ivgi2021scene}, where the layout arises as an intermediate step to translate the graph structure into image space. Johnson et al. \cite{johnson2018image} introduced Sg2im, the first method that tackles this task supervised via a combined object-level and image-level GAN loss. Following work further improve the performance in this challenging task by utilizing per-object neural image features to increase diversity \cite{ashual2019specifying}, exploiting meta-learning to better learn the highly diverse datasets (MIGS) \cite{farshad2021_MIGS}, and employing contextual information to refine the layout (CoLoR) \cite{ivgi2021scene}.

\paragraph{Interactive Image Manipulation} This task represents a form of partial image generation, which usually comes with a user interface to indicate the subject of change \cite{li2022cross}.
Early works perform scene-level image editing in a hand-crafted manner, which replaces some image parts with sample patches from a database \cite{hu2013patchnet}. One form of manipulation is image inpainting, where a user can indicate a mask for removing and automatically filling an image area \cite{pathak2016context}, that can be further extended with semantics \cite{yeh2017semantic} or edges \cite{Yu_2019_ICCV,nazeri2019edgeconnect} to guide the missing area.
Hong et al. \cite{hong2018learning} employ a learned model on a semantic layout representation, in which the user can make changes in the image by adding, moving, or removing bounding boxes.
SESAME \cite{ntavelis2020sesame} allows the user to draw a mask with semantic labels on an image to indicate the category of the changed pixels. Similarly, in EditGAN \cite{ling2021editgan} the user can modify a detailed object part segmentation map to alter object appearance.
SIMSG \cite{dhamo2020semantic} explores scene graphs as the interface, where the user can make changes in the nodes or edges of a graph to manipulate the image.
Recently, Su et al.  \cite{su2021fully} proposed an improvement to this model by relying on masks instead of bounding boxes for the object placement.
Different from these models, we want to model an object representation with disentangled appearance and pose.
\begin{figure}[tb]
\centering
    \includegraphics[width=\textwidth]{Figs/method_fig.pdf}
    \caption{\textbf{DisPositioNet{} Overview.} Our disentangled image manipulation framework performs by disentangling the graph representations, as well as the variational embeddings through learning the feature transformations.}
    \label{fig:method}

\end{figure}
\paragraph{Disentangled Representation Learning} Learning disentangled representation has been explored in many works using variational autoencoders \cite{esser2018variational,tatro2020unsupervised}, e.g., for changing the digit and handwriting in the MNIST dataset. Initial works on disentangled representation learning \cite{chen2016infogan} focused on variational mutual information maximization or decreasing the channel capacity of the variational autoencoder \cite{higgins2016beta}. Some recent works focus on disentanglement using deformable networks \cite{shu2018deforming,xing2019unsupervised}, contrastive learning \cite{bai2021contrastively,parmar2021dual} or disentangling identity and pose for face manipulation \cite{zeno2019ip}. Many of these works require labeled information for conditioning the model on the specific attributes for the disentangling. They also disentangle the data without knowing which feature belongs to which factor. Recently, \cite{skafte2019explicit} was proposed as an unsupervised way to disentangle pose and appearance. They used two branches to predict the image's transformation parameters and apply the learned transformation to the appearance features.
Disentanglement in graph neural networks (GNN) has been previously explored in \cite{ma2019disentangled,yang2020factorizable} where the graph features are divided into different factors that help disentangle the latent representation. These approaches, however, operate on regular graphs, which only consider neighboring nodes when computing the features. In contrast, GNNs designed for scene graphs also modulate edge features into the GNN network.

\section{Method}
\label{sec:method}
Our goal is to learn a disentangled representation for the appearance and pose of the objects in the latent space for the semantic image manipulation task to preserve the features of specific attributes. As it follows, we first discuss the semantic image manipulation framework. Then, we describe our proposed disentangled graph model and our variational disentanglement approach in detail. \cref{fig:method} shows an overview of our method.

\paragraph{Semantic Image Manipulation}\label{sec:method_simsg}
 Given an image $I$ and its corresponding scene graph $\mathcal{G} = \{\mathcal{O}, \mathcal{R}\}$, where $\mathcal{O}$ is the set of objects (nodes) in the scene and $\mathcal{R}$ represents the set of relationships (edges) between the objects, the goal is to obtain a modified image $I^{*}$ based on an altered version of the scene graph $\mathcal{G}^{*}$. Inspired by SIMSG~\cite{dhamo2020semantic} we formulate this image manipulation task via a reconstruction proxy objective, such that we do not need to rely on image pairs with changes for the training. To enable control on specific object attributes, the semantic graph representation is extended to obtain an augmented graph, where each node contains a semantic class embedding, a bounding box $x$, and a neural visual feature $z_I$. During training, object regions in the image, visual features, or bounding boxes are randomly masked using a noise vector, and the model's objective is to reconstruct the masked parts using the information from the scene graph $\mathcal{G}$ and the remaining regions in the image. $\mathcal{G}$ is defined as a set of triplets $\mathcal{G}_i = (s_i, r_i, o_i)$, where $s_i, r_i, o_i$ are the subject, predicate and object respectively. Each object in the graph belongs to a class of object categories $\mathcal{C} = \{c_1,c_2, ..., c_n\}$. Image features $z_I$ are extracted from the input image using a pre-trained classifier network such as VGG16 \cite{simonyan2014very}. The graph triplets are fed to a scene graph neural network (SGN) for message passing between the nodes. $z_\mathcal{G}$ is obtained from SGN with parameters $\Phi$, which processes the scene graph $\mathcal{G}$, the input bounding boxes $x$, and visual features $z_I$.

To disentangle the features based on the pose and appearance, we harness two encoder networks, namely $E_A$ and $E_P$, that receive the per-object features $z_\mathcal{G}$ as input and produce appearance features $z_{\mathcal{G}A}$ and pose features $z_{\mathcal{G}P}$ respectively. The object bounding boxes and pseudo-segmentation maps are predicted utilizing two networks that receive $z_{\mathcal{G}A}$ as input. Further, the scene layout $z_l$ is constructed by projecting the appearance features $z_{\mathcal{G}A}$ of each object in the image space, in the regions indicated by the respective predicted bounding boxes and segmentation maps. We further employ a pose decoder network $Q_P$ to predict a set of transformation parameters $\gamma$. These parameters are used to construct a transformation function $\tau$, which is applied to the pooled object features from the scene layout $z_l$. The object feature pooling is performed by cropping $z_l$ using the bounding boxes $x$ and applying the per-object transformations on the cropped feature vectors. Finally, the reconstructed image $\tilde I$ is generated by passing the transformed layout $\tau(z_l)$ to the image decoder network $Q_A$.

\paragraph{Disentangled Graph Neural Network}\label{sec:method_disengcn}
One main limitation in the SIMSG formulation is that the object features extracted by the SGN are entangled. Therefore, to increase the disentanglement between pose and appearance even further, we propose using a disentangled graph neural network. Inspired by \cite{ma2019disentangled}, we propose \textit{DSGN}, a disentangled scene graph network. DSGN not only considers the nodes in the graph as in \cite{ma2019disentangled}, but it also combines the edge features (here predicates) in the disentangled feature extraction, as this provides crucial information for the task at hand. Our network is thus adapted for triplets of the form $\mathcal{G}_i = (s_i, r_i, o_i)$. The DSGN utilizes disentangled convolutional layers combined with neighborhood routing mechanism \cite{sabour2017dynamic} for projection of the features into different subspaces. The neighborhood routing mechanism actively distinguishes the latent factor that could have caused the edge between a node and its neighbors. This would assign the neighbor to another channel to extract the features for that specific factor. The DSGN receives the triplets $\mathcal{G}_i = (s_i, r_i, o_i)$ as input, where $o_i, s_i \in \mathcal{O}$ and $r_i \in \mathcal{R}$. Each layer $e$ in the DSGN represents a function $f_e(.)$ which applies the edge features to the nodes in the graph and their neighbours:
\begin{equation}
    (\alpha_{ij}^{(t+1)}, \rho_{ij}^{(t+1)}, \beta_{ij}^{(t+1)}) = f_e\left(
    \nu_i^{(t)}, \,\rho_{ij}^{(t)}, \,\nu_j^{(t)}
    \right) ,
\end{equation}
with $\nu_i^{(0)} = o_i$, where $t$ represents the layers of the DSGN, which has a total of $T$ layers. The input is first processed by a Sparse Input Layer \cite{feng2017sparse} to decompose the node features $\nu_i^{(t)}$ into $k$ factors. The $k$ node features are then passed through $k$ separate neighbourhood routing layers. Finally, the object features $\nu_i^{(T)}$ are computed by concatenating the object features from all factors $k$.

\paragraph{Disentangled Variational Embedding}\label{sec:method_disenVAE}
 Our model is enforced to disentangle the perspective and appearance features in the latent embedding, through modelling and predicting the transformation in the features, based on \cite{skafte2019explicit}. The variational embedding disentanglement happens by employing two encoder and two decoder networks. The object features $z_\mathcal{G}$ are passed to the variational encoders $E_A, E_P$, that are composed of two subnetworks that model the mean $\mu$ and variance $\sigma$ of the data. They both output the latent representation $z$, obtained by applying the reparameterization trick $z = \mu + \sigma \epsilon$, where $\epsilon$ is a random noise vector.

$E_A$ encodes the appearance features, while $E_P$ encodes the perspective information. The transformation $\gamma$ for each object is predicted by a simple MLP network $Q_P$, which is then applied to the pooled object patches from the scene layout $z_l$. The intention behind predicting and applying the transformation $\gamma$ by $Q_P$ is to separate the pose information in the pose branch and enforce the model to only learn the appearance features in $E_A$. Finally, the image is reconstructed from the scene layout $z_l$ by $Q_A$, which is the SPADE \cite{park2019SPADE} generator here.

We define the affine transformation function $\tau$ given the input $z$ as follows:
\iffalse
\begin{equation}
\label{eq:transform_gen}
    \tau_\gamma (z) = \begin{bmatrix}
\gamma_{11} & \gamma_{12} & \gamma_{13}\\
\gamma_{21} & \gamma_{22} & \gamma_{23}\\
\gamma_{31} & \gamma_{32} & \gamma_{33}
\end{bmatrix}
\begin{bmatrix}
z_a \\
z_b \\
1
\end{bmatrix}
\end{equation}
which can be then defined as:
\fi
\begin{equation}
\begin{split}
  \tau_{\gamma,\text{affine}} (z) &= \begin{bmatrix}
\cos(\alpha) & -\sin(\alpha)\\
\sin(\alpha) & \cos(\alpha)
\end{bmatrix} \begin{bmatrix}
1 & m\\
0 & 1
\end{bmatrix} \begin{bmatrix}
\delta_{z_a} & 0\\
0 & \delta_{z_b}
\end{bmatrix} +
\begin{bmatrix}
t_{z_a} \\
t_{z_b}
\end{bmatrix}
\end{split}
\end{equation}
where $\alpha$ is the rotation angle, $m$ is the shear value, $\delta_{z_a}$ and $\delta_{z_b}$ are the scaling factors and $t_{z_a}$, $t_{z_a}$ are the translation parameters. These parameters, defined by $\gamma$ are modelled by an MLP represented by $Q_P$ that outputs these values per object.

\paragraph{Objective Functions}
The loss terms used for training our model are a combination of original losses used in \cite{dhamo2020semantic} and variational terms. The generative adversarial objective is:
\begin{equation}
  \mathcal{L}_\text{GAN} = \mathop{\mathbb{E}}_{q\sim p_{\textrm{data}}} \log D(q) + \mathop{\mathbb{E}}_{q\sim p_{\textrm{g}}} \log(1 - D(q)),
\end{equation}
where $p_g$ denotes the distribution of fake / generated images or object patches, $p_{data}$ is the distribution of the ground truth images or objects, and $q$ defines the input to the discriminator network $D$ sampled from the ground truth or generated data distributions. In addition to the global image discriminator $D_{image}$, an object discriminator $D_{obj}$ is used for cropped patches of objects in the image to improve the appearance and realism of the objects. The bounding box prediction loss is defined as $\mathcal{L}_{bbox} = \lambda_b \left\lVert x_i - \hat{x}_i \right\rVert_1^1$, while the generative objective is:

\begin{equation}
  \begin{split}
      \mathcal{L}_\text{generative} & =  \lambda_g \min_G \max_D \mathcal{L}_\text{GAN,image} +
      \lambda_o \min_G \max_D \mathcal{L}_\text{GAN,obj} \\  &\quad +
      \lambda_a \mathcal{L}_\text{aux,obj} + \mathcal{L}_{rec} +
      \lambda_p \mathcal{L}_p + \lambda_f \mathcal{L}_f,
  \end{split}
\end{equation}
where $\lambda_g$, $\lambda_o$, $\lambda_a$ are the constant weight multipliers. $\mathcal{L}_\text{aux,obj} $ is an auxiliary object classifier loss~\cite{Odena2017ConditionalIS}, and $\mathcal{L}_p,\mathcal{L}_f$ are respectively the perceptual and GAN feature loss terms borrowed from the SPADE generator \cite{park2019SPADE}, and $L_{rec} = \| I - \tilde{I} \|_1$ is the image reconstruction loss.

The variational objective for feature disentanglement tries to minimize the evidence lower bound (ELBO):

\begin{equation}
\begin{split}
    \mathcal{L}_{var} &= \mathbb{E}_{q_A,q_P} [log(p(I|z_{\mathcal{G}A}, z_{\mathcal{G}A}))]
    - D_{\mathbb{K}\mathbb{L}} (q_P(z_{\mathcal{G}P}|I)||p(z_{\mathcal{G}P})) \\  &\quad
    - \mathbb{E}_{q_P}[D_{\mathbb{K}\mathbb{L}} (q_A(z_{\mathcal{G}A}|I)||p(z_{\mathcal{G}A}))].
      \end{split}
\end{equation}

Then, the final objective becomes:
\begin{equation}
    \mathcal{L}_{total} = \mathcal{L}_{var} + \mathcal{L}_\text{generative} + \mathcal{L}_{bbox}
\end{equation}

\section{Experiments}
\label{sec:results}
In this section, we first discuss our framework's setup, including the hyperparameters and the metrics. Then we ablate the different components of our model, and report the quantitative and qualitative results of our experiments compared to previous work. We also provide the results of our performed user study. Finally, we discuss the results and the limitations of our work.
\subsection{Experimental Setup}
We evaluate our method on Visual Genome (VG) \cite{krishna2017visual} and Microsoft COCO \cite{lin2014microsoft} datasets which are commonly used in the image generation using scene graphs literature. The qualitative results on COCO are included in the supplementary material due to the space limitations.
\paragraph{Evaluation Metrics}
To evaluate the quality of generated images by our model, we use common similarity metrics used for GANs such as Inception Score (IS) \cite{salimans2016improved}, Frechet Inception Distance (FID) \cite{heusel2017gans}, structural similarity metric (SSIM) \cite{wang2004image}, Perceptual Similarity (LPIPS) \cite{zhang2018perceptual} and the Mean Absolute Error (MAE). We also measure the MAE and SSIM for the Region of Interest (RoI) where the change or reconstruction happens.

\paragraph{Implementation Details}
All models were trained on $64 \times 64$ images with batch size of $32$. The visual feature extraction model is a VGG-16 pretrained on ImageNet. The learning rate for all models is $2e-4$, and the disentangling factor $k$ in the Disentangled SGN is equal to $16$. All models were trained for $300k$ iterations on VG and COCO. The architectures of $E_P$, $E_A$, and $D_P$ are MLPs with two FC layers with 64 filters, 1 BN layer, and a LeakyReLU activation function. The decoder and discriminator architectures follow \cite{dhamo2020semantic}. The values of the hyperparameters were obtained empirically or based on previous works. The slight difference between the reported values and the ones in \cite{dhamo2020semantic} could be due to library version differences. We report the details of network architectures in the supplementary material.

\paragraph{Modification Modes}
During the testing phase, four modification modes are supported, i.e. relationship change, object replacement, object removal, and object addition. The model receives the source image, and the desired modification on the graph as input. Specific features are masked based on the modification mode and the target image is generated by the decoder. E.g., for relationship changes, the object features are retained while the bounding box features are masked. On the other hand, for object replacement, the object features are dropped while the bounding box features are preserved.

\subsection{Results}
\paragraph{Quantitative Results} Quantitative evaluation of image manipulation methods on a real-world dataset is a difficult task due to the lack of paired source and target data. Therefore, following previous work \cite{dhamo2020semantic}, we evaluate our method based on the reconstruction quality. The input images are partially masked, and the goal of the model is to reconstruct the masked parts from the information in the scene graph. The results of our experiments are presented in \cref{tab:vg} and \cref{tab:coco}. In the generative mode, the whole image is masked, and the model is generated purely from the scene graph to evaluate its image generation performance. The models are given either ground truth graphs as input or predicted ones by a scene graph to image model \cite{li2018factorizable}. The results show that, the DisPositioNet{} model outperforms the state-of-the-art in almost all metrics and scenarios. We also provide the results of our user study on the comparison between SIMSG and DisPositioNet{} for different manipulation modes in \cref{tab:user_study}.The user study details are provided in the supplementary material.

\paragraph{Qualitative Results} Some qualitative results of our method on VG dataset are shown in \cref{fig:vg_qualitative}. As it can be seen, our proposed method is able to learn better feature representations and therefore generate more meaningful results. We also provide some qualitative examples on diversity in the supplementary material, and show that in contrast to SIMSG, our model is able to generate diverse images in terms of color and texture.

\begin{figure}[!htb]
    \centering
    \includegraphics[width=\textwidth]{Figs/coco_disen_bear.pdf}
    \caption{\textbf{Qualitative results for image manipulation on COCO.} Our method shows more accurate positioning and better visual appearance in three main image manipulation tasks of (a) relationship change, (b) object replacement and (c) object removal.}
    \label{fig:qual_res_coco}
\end{figure}

\paragraph{Ablation Study}
The results of our ablation study are reported in \cref{tab:ablation}. First, we present the model performance without the disentanglement. Then, we evaluate the effect of disentangling the latent embeddings. Finally, we show the model performance with disentanglement in both latent embedding and the graph features. Notably, the disentanglement of both components leads to an improvement in most metrics.

\begin{minipage}[c]{0.49\textwidth}
\centering
\small
\captionof{table}{\textbf{Ablation Study on VG}}
\resizebox{0.95\textwidth}{!}{
\begin{tabular}{c@{\hskip 7pt} c@{\hskip 7pt} c @{\hskip 7pt} c@{\hskip 7pt} c @{\hskip 7pt} c@{\hskip 7pt} c}
\toprule
\multicolumn{2}{c}{Disentanglement} & \multicolumn{3}{c}{All pixels} & \multicolumn{2}{c}{RoI only} \\
 \cmidrule(l{1pt}r{9pt}){3-5} \cmidrule(l{1pt}r{3pt}){6-7}
Embeddings & Graph & \footnotesize{MAE $\downarrow$} & \footnotesize{SSIM $\uparrow$} & \footnotesize{LPIPS $\downarrow$} & \footnotesize{MAE $\downarrow$} & \footnotesize{SSIM $\uparrow$}\\ %
\midrule \midrule
\multicolumn{7}{c}{Generative} \\
\midrule
$-$ & $-$ & $41.88$ & $34.89$ & $0.27$ & N/A & N/A \\
\checkmark & $-$ & $41.80$ & $35.18$ & $0.26$ & N/A & N/A \\
\checkmark & \checkmark & $\bm{41.62}$ & $\bm{35.30}$ & $\bm{0.26}$  & N/A & N/A \\
\midrule \midrule
\multicolumn{7}{c}{GT Graphs} \\
\midrule
$-$ & $-$ & $8.61$ & $87.55$ & $0.050$ & $\bm{21.62}$ & $\bm{58.51}$ \\
\checkmark & $-$  & $8.47$ & $87.53$ & $0.048$ & $21.77$ & $58.30$ \\
\checkmark & \checkmark & $\bm{8.41}$ & $\bm{87.56}$ & $\bm{0.048}$ & $21.76$ & $58.18$ \\
\midrule \midrule
\multicolumn{7}{c}{Predicted Graphs} \\
\midrule
   $-$ & $-$ & $13.82$ & $83.98$ & $0.077$ & $28.82$ & $49.34$ \\
    \checkmark & $-$ & $9.65$ & $86.68$ & $0.054$ & $25.62$ & $51.19$ \\
    \checkmark & \checkmark & $\bm{9.39}$ & $\bm{86.91}$ & $\bm{0.052}$  & $\bm{25.40}$ & $\bm{51.85}$ \\
\bottomrule
\end{tabular}
}
\label{tab:ablation}
\end{minipage}
\begin{minipage}[c]{0.49\textwidth}
\centering
\small
\captionof{table}{\textbf{Image reconstruction on COCO}}
\resizebox{0.95\textwidth}{!}{
\begin{tabular}{l@{\hskip 7pt} c @{\hskip 7pt} c@{\hskip 7pt} c @{\hskip 7pt} c@{\hskip 7pt} c}
\toprule
 \multirow{2}{*}{Method} & \multicolumn{3}{c}{All pixels} & \multicolumn{2}{c}{RoI only} \\
 \cmidrule(l{1pt}r{9pt}){2-4} \cmidrule(l{1pt}r{3pt}){5-6}
 & \footnotesize{MAE $\downarrow$} & \footnotesize{SSIM $\uparrow$} & \footnotesize{LPIPS $\downarrow$} & \footnotesize{MAE $\downarrow$} & \footnotesize{SSIM $\uparrow$}\\ %
\midrule \midrule
\multicolumn{6}{c}{Generative} \\
\midrule
SIMSG \cite{dhamo2020semantic} & $54.03$ & $24.12$ & $0.490$ & N/A & N/A \\
DisPositioNet{} (Ours) & $\bm{51.07}$ & $\bm{26.53}$ & $\bm{0.418}$  & N/A & N/A \\
\midrule \midrule
\multicolumn{6}{c}{Non Generative} \\
\midrule
SIMSG \cite{dhamo2020semantic}  & $9.36$ & $87.00$ & $0.086$ & $27.68$ & $49.93$ \\
DisPositioNet{} (Ours) & $\bm{9.24}$ & $\bm{88.26}$ & $\bm{0.057}$ & $\bm{27.52}$ & $\textbf{50.35}$ \\
\bottomrule
\end{tabular}
}
\label{tab:coco}
\vspace{20pt}
\captionof{table}{\textbf{User study on VG}}
\resizebox{0.95\textwidth}{!}{
    \begin{tabular}{ccccc}
    Method & Removal & Replacement & Relationship Change & Mean \\ \hline
        SIMSG \cite{dhamo2020semantic} & 14.06 & 27.68 & 26.95 & 23.51 \\ \hline
        DisPositioNet{} (Ours) & \textbf{85.94} & \textbf{72.32} & \textbf{73.04} & \textbf{76.49}\\
    \end{tabular}

    \label{tab:user_study}
    }
\end{minipage}

\subsection{Discussion}
We showed that our proposed model outperforms the previous works in all scenarios by generating images with higher quality and more meaningful results. We also showed that the generated images by our method have higher diversity and less artifacts. In our user study, the users were given the option to choose which model performs better image manipulation in terms of image quality and how well the change in the image corresponds to the modification in the graph. The DisPositioNet{} model was chosen as the best model compared to SIMSG \cite{dhamo2020semantic} in $76.49\%$ of the cases. Nevertheless, our method has some limitations similar to the related work, which we discuss here.
\paragraph{Limitations}
The dominant limitations of our approach are manipulating high-resolution images and the reconstruction of faces and complex scenes. We believe that these limitations originate from the difficulty in generating high-quality images from scene graphs \cite{johnson2018image} that could be due to the wild nature of images in the VG dataset and occasional errors in the scene graph annotations. We assume that, it would be possible to overcome this issue by using a higher quality dataset with scene graphs and semantic segmentation annotations. Regarding the face reconstruction problem, although this is an easy task given datasets of pure face images, the model fails to generalize well to the faces when combined with images in the wild. We present some failure case examples in the supplementary material.

\section{Conclusions}
\label{sec:conc}
We presented a novel disentangling framework for image manipulation using scene graphs. The results of our experiments showed that using disentangled representation in the latent embedding for semantic image manipulation is an effective way to improve image generation and manipulation quality. The variational representation for object features enables generating diverse images compared to previous work. Further, we showed that using a disentangled graph neural network for extracting the scene graph features provides more meaningful and useful features for the disentangled latent embedding, resulting in higher reconstruction performance. As a future direction, we consider improving the decoder network by taking advantage of diffusion models.
\section{Graphical Model}
A graphical model of our method compared to SIMSG \cite{dhamo2020semantic} can be seen in \cref{fig:graphical_model}.
\begin{figure}[htb]
    \centering
    \includegraphics[width=0.9\linewidth]{Figs/graphical_model.pdf}
    \caption{\textbf{A graphical model of our approach compared to SIMSG \cite{dhamo2020semantic}.} The inputs to both models are image $I$ and scene graph $\mathcal{G}$. The differences between the two methods are shown by the blue color. While SIMSG reconstructs the image directly from the latent embedding $z_l$, DisPositioNet{} disentangles both the graph representation and the latent embeddings.}
    \label{fig:graphical_model}
\end{figure}

\section{Results on COCO \cite{lin2014microsoft}}
The qualitative results on the COCO \cite{lin2014microsoft} dataset are presented in \cref{fig:qual_res_coco}. As it can be seen, our model predicts the target bounding box for repositioning the object more effectively due to the disentanglement of pose and appearance. The modifications by our model have less artefacts and look more realistic compared to the baseline model.

\begin{figure}[!htb]
    \centering
    \includegraphics[height=0.9\textheight]{Figs/coco_disen.pdf}
    \caption{Qualitative results for image manipulation on COCO}
    \label{fig:qual_res_coco}
\end{figure}

\section{Additional Qualitative Results on VG \cite{krishna2017visual}}
More qualitative results compared to \cite{dhamo2020semantic} are provided in \cref{fig:qual_res}. Similar to the results on the COCO dataset, our model modifies the objects more realistically on the VG dataset.
\begin{figure}[!htb]
    \centering
    \includegraphics[height=0.9\textheight]{Figs/Supplementary.pdf}
    \caption{Additional qualitative results for image manipulation on VG}
    \label{fig:qual_res}
\end{figure}

\section{Diversity Comparison Results}
Our method is able to generate more diverse images compared to SIMSG \cite{dhamo2020semantic}. The reason behind this diversity is the variational representation for the object features, which enables probabilistic sampling of features in the latent space. However, the diversity of the generated images by our model sometimes comes with a cost of quality loss in the objects. For example, as seen in \cref{fig:diversity}, the sand generated by our model can also look like grass which is not realistic. Therefore, our model is more beneficial in scenarios where higher diversity is needed.

\begin{figure*}
    \centering
    \includegraphics[width=\textwidth]{Figs/diversity.pdf}
    \caption{\textbf{Diversity in image generation.} As a result of using variational embedding in the object features, our model is able to generate diverse images in contrast to the previous work. As it can be seen, our model generated objects with different textures, sizes, and colors, while SIMSG generated the same image over different iterations.}
    \label{fig:diversity}
\end{figure*}

\section{User Study}
In order to compare the qualitative results of our method to the SIMSG baseline \cite{dhamo2020semantic}, we have performed a user study for different image manipulation modes on the Visual Genome \cite{krishna2017visual} dataset. The user study consists of 21 questions with images before and after the manipulation by the two methods. The users had to choose the image that corresponds better to the specified change. The number of participants in the user study is $37$ and the summary of their responses is provided in the main paper. The order of the methods for each example in the study is kept random, to avoid bias. The values reported in the user study table provided in the main text, shows the percentage of images chosen as having higher quality and correspondence to the specified change by the participants. The results show that our method significantly outperforms SIMSG in all manipulation modes.

\section{Architecture Details}

\subsubsection{DSGN architecture} The input to the DSGN is the visual features from a VGG-16~\cite{simonyan2014very} network, bounding box coordinates, node embeddings, and the edge embeddings, along with the edges. The DSGN has two subnetworks, with the same architecture shown in \cref{tab:gcn_arch}. The first network produces latent features by applying the edge information to the concatenated features. The second network receives these latent features and produces the final object features, which are later used by the pose and appearance encoder network. Each DSGN subnetwork reduces the input dimensionality via a Sparse input layer \cite{feng2017sparse} to $k * nhidden$, where $nhidden=14$ is the size of the hidden dimension in the neighborhood routing (NeibRouting) layer, and $k=16$ determines the disentangling factor. The routing is performed for $12$ iterations for each of the $10$ NeibRouting layers. The output of these layers is then processed by a fully connected layer, 1D Batchnnorm, and an activation function.

\begin{table}[]
    \centering
    \caption{DisenGCN Architecture}
    \begin{tabular}{|c|}
    \hline
         \textbf{Input}: node\_features (node\_dim), edges (edge\_dim) \\ \hline
         SparseInputLayer (node\_dim, k * nhidden) \\ \hline
         LeakyRelu \\ \hline
         10X NeibRouting (k * nhidden) \\ \hline
         FC (k * nhidden, out\_dim) \\ \hline
         BatchNorm1D (out\_dim) \\ \hline
         LeakyRelu \\ \hline
         \textbf{Output}: $z_\mathcal{G}$ (out\_dim) \\ \hline
    \end{tabular}

    \label{tab:gcn_arch}
\end{table}

\subsubsection{Appearance decoder $Q_A$} The appearance decoder network consists of $5$ SPADE Residual Blocks from the original implementation \cite{park2019SPADE} with up-sampling layers in between, followed by a Conv2D, an activation function, and another Conv2D layer as shown in \cref{tab:spade_arch}.

\begin{table}[]
    \centering
    \caption{Appearance decoder architecture}
    \begin{tabular}{|c|}
    \hline
         \textbf{Input}: $z_l$ (in\_dim) \\ \hline
         SPADEResBlock (in\_dim, 1024) \\ \hline
         Upsample (scale=2) \\ \hline
         SPADEResBlock (1024, 512) \\ \hline
         Upsample (scale=2) \\ \hline
         SPADEResBlock (512, 256) \\ \hline
         Upsample (scale=2) \\ \hline
         SPADEResBlock (256, 128) \\ \hline
         Upsample (scale=2) \\ \hline
         SPADEResBlock (128, 64) \\ \hline
         Conv2D (64, 64, kernel=(3,3), padding=1) \\ \hline
         LeakyRelu \\ \hline
         Conv2D (64, 3, kernel=(1,1)) \\ \hline
         \textbf{Output}: Image (64, 64, 3) \\ \hline
    \end{tabular}

    \label{tab:spade_arch}
\end{table}

\subsubsection{Encoder architectures}
For both $E_A$, $E_P$, we use small convolutional networks to encode the object features. Both encoders have the same architecture and consist of two encoders, one for modeling data mean $\mu$ and one for the data variance $\sigma$. The variance encoder branch has a \textit{SoftPlus} activation layer in the output. \cref{tab:encoder_arch} shows the architecture of the encoders.

\begin{table}[]
    \centering
    \caption{Encoder Architecture}
    \begin{tabular}{|c|}
    \hline
         \textbf{Input}: $z_\mathcal{G}$ (in\_dim) \\ \hline
         BatchNorm2D (in\_dim) \\ \hline
         Conv2D (in\_dim, 128, kernel=(1,1), stride=1) \\ \hline
         LeakyRelu \\ \hline
         BatchNorm2D (128) \\ \hline
         Conv2D (128, in\_dim, kernel=(1,1), stride=1) \\ \hline
         LeakyRelu \\ \hline
         \textbf{Output}: $z_{\mathcal{G}A/P}$ (in\_dim)\\ \hline
    \end{tabular}

    \label{tab:encoder_arch}
\end{table}

\subsubsection{Pose Decoder $Q_P$} The pose decoder network $Q_P$ receives the latent embeddings from the pose encoder $E_P$ and outputs a vector with the size of $6$ per object for each of the transformation parameters. As shown in \cref{tab:decoder_arch}, the final output has the shape of $out\_dim$, which is equal to $6$ here. Similar to the encoders, the $Q_P$ has two subnetworks with the same architecture for modeling $\mu$ and $\sigma$. The $\sigma$ branch, again has a \textit{SoftPlus} layer in the output.

\begin{table}[]
    \centering
    \caption{Pose Decoder Architecture}
    \begin{tabular}{|c|}
    \hline
         \textbf{Input}: $z_{\mathcal{G}P}$ (in\_dim) \\ \hline
         FC (in\_dim, 64) \\ \hline
         LeakyRelu \\ \hline
         FC (64, out\_dim) \\ \hline
         LeakyRelu \\ \hline
         \textbf{Output}: $\gamma$ (out\_dim = 6)\\ \hline
    \end{tabular}
    \label{tab:decoder_arch}
\end{table}

\subsubsection{Discriminator architecture} Both global and local discriminators follow the implementation of Multiscale Discriminator from SPADE \cite{park2019SPADE}. There are three discriminator networks at different scale values, with each having 3 Conv2D layers.

\section{Experimental Setting} The weighting hyperparameters are presented in \cref{tab:lambdas}. The optimizer used for all the experiments is Adam ~\cite{kingma2014adam} with an initial learning rate of $0.0002$. The batch size used for all trainings is set to $32$.

\begin{table}[h]
    \centering
    \caption{Loss weighting multiplier values}
    \begin{tabular}{|l|c|}
    \hline
        Weight Multiplier & Value \\
        \hline
       $\lambda_o$ & $0.1$ \\ %
       $\lambda_a$ & $0.1$\\ %
       $\lambda_g$ & $1$ \\ %
     $\lambda_f$ & 10 \\
        $\lambda_p$ & 10 \\
        $\lambda_b$ & 50 \\
       \hline
    \end{tabular}
    \label{tab:lambdas}
\end{table}


\section{\@startsection {section}{1}{\z@
                                   {-3.5ex \@plus -1ex \@minus -.2ex
                                   {2.3ex \@plus.2ex
                                   {\normalfont\large\bfseries}}
\makeatother
\newtheorem{Definition}{Definition}
\newtheorem{Corollary}{Corollary}
\newtheorem{Remark}{Remark}
\newtheorem{Theorem}{Theorem}
\newtheorem{Lemma}{Lemma}
\newtheorem{Example}{Example}

\def\Theorem{\refstepcounter{Theorem}\paragraph{\bf Theorem \theTheorem}}
\def\Example{\refstepcounter{Example}\paragraph{\bf Example \theExample}}
\def\definition{\refstepcounter{definition}\paragraph{\bf Definition \thedefinition}}
\def\remark{\refstepcounter{remark}\paragraph{\bf Remark \theremark}}
\def\Corollary{\refstepcounter{Corollary}\paragraph{\bf Corollary \theCorollary}}

\begin{document}
\doublespace
\title[]{Dynamic Cumulative Residual Entropy Generating Function and its properties}
\author[
{S\lowercase{mitha} S.$^{\lowercase{a}}$, S\lowercase{udheesh} K. K\lowercase{attumannil}$^{\lowercase{b}}$  \lowercase{and}   S\lowercase{reedevi} E. P.$^{\lowercase{c}}$  \\
 $^{\lowercase{a}}$K E C\lowercase{ollege} M\lowercase{annanam,} K\lowercase{erala}, I\lowercase{ndia},\\
 $^{\lowercase{b}}$I\lowercase{ndian} S\lowercase{tatistical} I\lowercase{nstitute},
  C\lowercase{hennai}, I\lowercase{ndia,}\\
$^{\lowercase{c}}$M\lowercase{aharaja's} C\lowercase{ollege} E\lowercase{ranakulam}, K\lowercase{erala}, I\lowercase{ndia.}}
\thanks{{$^{\dag}$}{Corresponding E-mail: \tt skkattu@isichennai.res.in }}
\maketitle
\vspace{-0.2in}
\begin{abstract}
In this work, we study the properties of  cumulative residual entropy generating function.
We then introduce dynamic cumulative residual entropy generating function (DCREGF).  It is shown that the
DCREGF determines the distribution uniquely. We study some
characterization results using the relationship between DCREGF and hazard rate
and mean residual life function. A new class of life distribution based on decreasing DCREGF is introduced. Finally we develop a test for decreasing DCREGF and study its performance.
\\\noindent Keywords: Entropy; Entropy generating function;  U-statistics.
\end{abstract}
\vspace{-0.1in}
\section{Introduction}
Entropy is an important concept in the field of information theory and Shannon (1948) was the first who formally introduced it.  To measure
the uncertainty contained in a random variable $X$,  entropy is defined as
\begin{equation}\label{eq1}
  H(X)=-\int_{0}^{\infty}\log f (x)f(x)dx=E(-\log f(X)),
\end{equation} where `log' denotes the natural logarithm. Several measures of entropy have been introduced in the  literature each one  suitable for some specific situations. The widely used  measures of entropy are cumulative residual entropy (CRE) is given by (Rao et al., 2004)
\begin{equation}\label{rent}
     \mathcal{E}(X)=-\int_{0}^{\infty}\bar{F}(x)\log \bar{F}(x)dx,
\end{equation}
where  $\bar{F}(x)=1-F(x)$ is the survival function of $X$.
Di Crescenzo and Longobardi (2009) introduced  cumulative entropy (CE) for estimating the uncertainty in the past  lifetime of a system as
\begin{equation}\label{cent}
     \mathcal{CE}(X)=-\int_{0}^{\infty}F(x)\log F(x)dx.
\end{equation}
The weighted versions of  $\mathcal{E}(X)$ and $\mathcal{CE}(X)$ have been studied in the literature as well.  These are given by (Mirali et al., 2016)
\begin{equation}\label{wcent}
     \mathcal{E}^{w}(X)=-\int_{0}^{\infty}x\bar{F}(x)\log \bar{F}(x) dx.
\end{equation} and (Mirali and Baratpour, 2017)
\begin{equation}\label{wrent}
     \mathcal{CE}^{w}(X)=-\int_{0}^{\infty}xF(x)\log F(x)dx.
\end{equation} For recent development in this area we refer to Kharazmi  and Balakrishnan  (2020, 2021a, 2021b), Hashempour et al. (2022), Kazemi et al. (2022) and Sudheesh et al. (2022).   Among these,  Sudheesh et al. (2022) defined a  generalized cumulative residual entropy and study its properties  They show that cumulative residual entropy,  weighted cumulative residual entropy are special cases of the proposed measure.

The moment generating function (m.g.f) of a probability distribution is a convenient tool for evaluating mean, variance and other moments of a probability distribution. The successive derivative of the m.g.f at a point zero gives the successive moments of the probability distribution provided  these moments exists. In information theory, generating functions has been defined for probability density function to determine
information quantities such as Shannon information, extropy and Kullback-Leibler divergence.
 Golomb (1966) introduced entropy generating of a probability distribution and is given by
$$
B(s)=\int f^{s}(x) d x ; s>1 .
$$
It may be noted that the first derivative of this function at $s=1$, gives the negative of  Shannon's entropy given in (\ref{eq1}).

The study of time to event of a subject is of interest in reliability, survival analysis and many other fields. Considering the importance of $B(s)$, in such practical situations we had developed residual entropy generating function using the residual r.v, $X_{t}=X-t \mid X>t$, is given by
$$
B_{t}(s)=\int_{t}^{\infty}\left(\frac{f(x)}{\bar{F}(t)}\right)^{s} d x ; s>1 .
$$
Also $-\frac{d}{d t} B_{t}(s) \mid s=1$ gives residual entropy introduced by Ebrahimi (1996).

Rao et al. (2004) introduced a new measure of uncertainty called cumulative residual entropy (CRE) in a distribution function $F$ and obtained some properties, which is given by
\begin{equation}\label{cre}
  \xi(X)=-\int_{0}^{\infty} \bar{F}(x) \log \bar{F}(x) d x.
\end{equation}Asadi and Zohrevand (2007) have modified the definition of CRE in order to accommodate the current age of the system is given by
\begin{equation}\label{dcre}
  \xi(X ; t)=-\int_{t}^{\infty} \frac{\bar{F}(x)}{\bar{F}(t)} \log \left(\frac{\bar{F}(x)}{\bar{F}(t)}\right) d x .
\end{equation}The measure $\xi(X ; t)$ is known as dynamic cumulative residual entropy function. Obviously $\xi(X ; 0)=\xi(X)$. For more properties and applications of (\ref{cre}) and (\ref{dcre}) one may refer to Rao et al.  (2004). Asadi and Zohrevand (2007), Navarro et al. (2010) and the references therein.

The rest of the paper is organized as follows. In Section 2 study some properties of cumulative residual entropy generating function (CREGF). We also discuss the nonparametric estimation of CREGF.    In section 3, we introduce dynamic cumulative residual entropy generating function. We prove that the proposed measure determines the distribution uniquely. We also study some characterization results using the relationship of DCREGF with hazard rate and mean residual life function. In Section $4$, we develop a test for testing decreasing DCREGF. In Section 5, we conduct a Monte Carlo simulation   study to assess the finite sample performance the proposed test. Some concluding remarks with some open problems are given in Section 6.

\section{Cumulative residual entropy generating function}
Let $X$ be non-negative continuous random variable having distribution function $F(x0$. Let $\bar{F}(x)$ is the survival function of $X$.
The survival function is more useful in lifetime studies. This motivate us to study the properties of CREGF.

\begin{definition}
  Let $X$ be a non-negative random variable having an absolutely continuous   survival function $\bar{F}(x)$, CREGF denoted by $C_{s}(X)$ is defined as
\begin{equation}\label{cregf}
  C_{s}(X)=\int_{0}^{\infty}(\bar{F}(x))^{s} d x ,\,\,s>0.
\end{equation}
\end{definition}
We noted that Kharazmi and Balakrishnan  (2021) discussed the measure in (\ref{cregf}) and obtained some relationship with Gini mean difference. They also discussed relative cumulative residual information generating measure to study the closeness between two survival function. We further  study some properties of  $C_{s}(X)$.   We also discuss the nonparametric estimation of $C_{s}(X)$.

It may be noted that negative of the first derivative of $C_{s}(X)$ at $s=1$  gives the cumulative residual entropy function given in (\ref{cre}). Also note that (prime denote the derivative)
$$
\left.C_{s}^{\prime}(X)\right|_{s=2}=\int_{0}^{\infty}(\bar{F}(x))^{2} \log \bar{F}(x) d x .
$$
The Table 1 gives the expression of $C_{s}(X)$ for some well-known distributions.
\begin{table}[h]
  \centering
   \caption{Expression of $C_{s}(X)$ for some well-known distributions}
\begin{tabular}{|c|l|c|c|c|}
\hline
 & Distribution & $\bar{F}(x)$ & $C_s(X)$ & $\mathcal{CE}(X)$ \\
\hline
$(i)$ & $U(0, a)$ & $1-\frac{x}{a} ,\,>0$ & $\frac{a}{s+1}$ & $\frac{a}{4}$ \\
\hline
$(i i)$ & $\operatorname{GPD}$ & $\left(1+\frac{a x}{b}\right)^{-\left(1+\frac{1}{a}\right)} ,\,x>0, a>-1, b>0$ & $\frac{b}{(a+1) s-a}$ & $b(a+1)$ \\
\hline
$(i i i)$ & Pareto $(k ; \alpha)$ & $\left(\frac{k}{x}\right)^{\alpha} ,\, x \geq k$ & $\frac{k}{\alpha s-1}$ & $\frac{k \alpha}{(\alpha-1)^{2}}$ \\
\hline
$(i v)$ & $\exp (\lambda)$ & $\exp \{-\lambda x\} ,\, x \geq 0$ & $\frac{1}{\lambda s}$ & $\frac{1}{\lambda}$ \\
\hline
$(v)$ & Pareto $I I$ & $\left(1+\frac{x}{a}\right)^{-b} ,\, x \geq 0$ & $\frac{a}{b s-1}$ & $\frac{a b}{(b-1)^{2}}$ \\
\hline
\end{tabular}
\end{table}
Next, we prove some properties of $C_s(X)$.
In the following property, we show that $C_{s}(X)$ is a shift independent measure.
\begin{theorem}
 Let $X$ be continuous nonnegative random variable and  $Y=a X+b$, with $a>0$ and $b \geq 0$, then we have
$$
C_{s}(Y)=a \cdot C_{s}(X).
$$
\end{theorem}
\noindent{\bf Proof:}  The result follows by noting that $\bar{F}_{a X+b}(x)=\bar{F}_{X}\left(\frac{x-b}{a}\right)$ for all $x>b$.

\begin{theorem}
  Suppose $X$ and $Y$ are two random variable admitting the proportional hazard model given by
  $$
\bar{F}_{\theta}^{*}(x)=(\bar{F}(x))^{\theta},\, \theta>0, x>0.
$$
Then the following statements hold;

(a) $C_{s}\left(Y_{\theta}\right)=C_{s \theta}(X)$

(b) $C_{s}(Y)=\theta \cdot C_{s}(\theta X)$.
\end{theorem}

\begin{corollary}
  Let $X$ be  non-negative random variable having  absolutely continuous distribution function $F$. Let $X_{1: n}$ be the first order statistic based on a  random sample  $X_{1}, X_{2}, \ldots, X_{n}$ from  $F$. We have $\bar{F}_{X_{1: n}}(x)=(\bar{F}(x))^{n}$ and so $C_{s}\left(X_{1: n}\right)=C_{n s}(X)$.
\end{corollary}

\begin{Example}
  Suppose $X \sim \exp (\lambda)$, then $C_{s}\left(Y_{\theta}\right)=\frac{1}{\lambda \theta s}, C_{s \theta}(X)=\frac{1}{\lambda \theta s}$ and $C_{s}(X)=\frac{1}{\lambda s}$. So we have $C_{s}\left(Y_{\theta}\right)=C_{s \theta}(X)$ and $C_{s}(X)=\theta \cdot C_{s \theta}(X)$.
\end{Example}
In the next theorem, we give bound of CREGF based on the mean of $X$.
\begin{theorem}
  Let $X$ be a non-negative continuous random variable  with finite  mean $\mu$ and CREGF $C_{s}(X)$ then $C_{s}(X)<\mu$.
\end{theorem}
\noindent{\bf Proof:} We have,
$$
(\bar{F}(x))^{s}<\bar{F}(x),\, s>1 .
$$
Integrating both sides of the above equation with respect to  $x$,
$$
\int_{0}^{\infty}(\bar{F}(x))^{s} d x<\int_{0}^{\infty} \bar{F}(x) d x .
$$
That is,
$$
C_{s}(X)<\mu .
$$

Next, we find an estimator for $C_{s}(X)$. Here we assume that $s$ is positive integer. Let $X_{1: n}$ be the first order statistic based on a  random sample  $X_{1}, \ldots, X_{n}$ from  $F$.  Then we have $\bar{F}_{X_{1: n}}(x)=(\bar{F}(x))^{n}$. For a non-negative random variable $X$, we have $\mu=E(X)=\int_{0}^{\infty}\bar{F}(x)dx$. Hence, we can write
\begin{equation}\label{cregfnew}
  C_{s}(X)=\int_{0}^{\infty}(\bar{F}(x))^{s} d x=E(X_{1: s}).
\end{equation}
Hence a U-statistic based  estimator of $C_{s}(X)$ is given by
\begin{equation}\label{est}
 \widehat{C}_{s}(X) =\frac{1}{C_{s,n}} \sum\limits_{C_{s,n}}\min{(X_{i_1},X_{i_2},\cdots,X_{i_{s}})},
\end{equation}where the summations is over the set  $C_{s,n}$ of all combinations of $s$ distinct elements $\lbrace i_1,i_2,\cdots,i_{s}\rbrace$ chosen from $\lbrace 1,2,\cdots,n\rbrace$.
Now, we express $\widehat{\Delta} $ in a simple form.
Let $X_{i: n}$ be the $i$-th order statistics based on $n$ random sample $X_1,\ldots,X_n$ from $F$.
In terms of the order statistics we have the following equivalent expressions
\begin{equation*}
\sum\limits_{i = 1}^n \sum\limits_{j = 1,j<i}^n\min\{X_1,X_2\} =\sum\limits_{i = 1}^n {(n - i)X_{1: n} }
\end{equation*}
 and
\begin{eqnarray*}
\sum\limits_{i = 1}^n \sum\limits_{j= 1,j<i}^n\sum\limits_{k = 1,k<j}^n\min\{X_1,X_2,X_3\} &=&\sum\limits_{i = 1}^n {\frac{{(n - i - 1)(n - i)X_{1: n} }}{2}}  \\&=& \sum\limits_{i = 1}^n {\binom{n - i}{2} } X_{1: n}.
\end{eqnarray*}
Therefore,  the  estimator given in (\ref{est}) can be expressed  as
\begin{equation}\label{uses}
 \widehat{C}_{s}(X) =\frac{1}{C_{s,n}}  \sum\limits_{i = 1}^n {\binom{n - i}{s-1} X_{1: n} }.
\end{equation}
Next we study the asymptotic properties of  $ \widehat{C}_{s}(X)$. Clearly $ \widehat{C}_{s}(X)$ is an unbiased and consistent estimator of  ${C}_{s}(X)$ (Lehmann, 1951). In the following result we establish the asymptotic distribution of $ \widehat{C}_{s}(X)$.
\begin{theorem}
  As $n\rightarrow \infty$,  $\sqrt{n}(\widehat{C}_{s}(X)-{C}_{s}(X))$ converges in distribution to a normal random variable with mean zero and variance $s^2\sigma^2$, where $\sigma^2$ is given by
  \begin{small}
 \begin{equation}\label{estvar}
\sigma^{2}=Var\Big(X{{\bar F}^{s- 1}}(X) + (s-1)\int_0^X {{{y \bar F}^{s  - 2}}(y)} d{F}(y)\Big).
\end{equation}
\end{small}
\end{theorem}
\noindent {\bf Proof:} Using the central limit theorem for U-statistics  we have the asymptotic  normality of $ \widehat{C}_{s}(X)$. The asymptotic variance is $s^2\sigma_1^2$ where $\sigma_1^2$ is given by (Lee, 2019)
\begin{equation}\label{estvar1}
\sigma_1^2= Var\left[E\left(\min(X_1,\ldots,X_{s})|X_{1}\right)\right].
\end{equation}Denote $Z=\min(X_2,X_3,...,X_s)$, then the survival function of $Z$ is given by $\bar{F}^{s-1}(x)$.  Consider
\begin{eqnarray*}\label{eq4}
E\left[ {\min \left( {x,{X_2},{X_3},...,{X_{s} }} \right)} \right]& =& E\left[ {xI(Z > x)} \right] + E\left[ {ZI(Z \le x)} \right]\nonumber\\&=&x{{\bar F}^{s- 1}}(x) + (s-1)\int_0^x {{{y \bar F}^{s  - 2}}(y)} d{F}(y).
\end{eqnarray*}
Therefore, from (\ref{estvar1}) we obtain the variance expression specified in  equation (\ref{estvar}). THis completes the proof of the theorem.
\\ The finite sample performance of the estimator given in (11) is evaluated through Monte Carlo simulation and the results of the same is reported in Section 5.
\vspace{-0.2in}
\section{Dynamic cumulative residual entropy generating function }\vspace{-0.1in}
In this section, we define dynamic cumulative residual entropy generating function (DCREGF). We  establish some characterization results for some  well-known distributions in terms of DCREGF.
 Let $X$ be the lifetime of a component or system under the condition that the system has survived up to an age $t$. In such cases, we are interested in studying  dynamic or time dependent random variable $X_{t}=(X-t \mid X>t)$ having survival function
$$
\bar{F}_{t}(x)= \begin{cases}\frac{\bar{F}(x)}{\bar{F}(t)}, & \text { where } x>t \\ 1, & \text { otherwise. }\end{cases}
$$
Using the survival function of  $X_{t}$, we define  DCREGF of $X$.

\begin{definition}Let $X$ be a continuous random variable with distribution function $F(x)$.  Then DCREGF of $X$ is defined as
   \begin{equation}\label{dcregf}
  C_{s}(X ; t)=\int_{t}^{\infty}\left(\frac{\bar{F}(x)}{\bar{F}(t)}\right)^{s} d x ,\,\, s \geq 1.
\end{equation}
\end{definition}

From  Definition 2, we readily observe the following properties of $C_s(X)$.
\begin{enumerate}
  \item For $t=0, C_{s}(X ; t)=C_{s}(X)$;
  \item When $s=1$,  $C_{1}(X ; t)=m(t)$;
  \item Differentiating  $C_{s}(X ; t)$ with respect to $s$ and taking $s=1$, we obtain the negative of the dynamic cumulative residual entropy given in (\ref{dcre}).
\end{enumerate}
\begin{theorem}
  For a non negative random variable $X$, let $Y=a X+b$, where $a>0$ and  $b \geq 0$. Then we have  $$C_{s}(Y ; t)=a \cdot C_{s}\left(X ; \frac{t-b}{a}\right),\,\,\, t \geq b.$$
\end{theorem} \noindent{\bf Proof:} Consider
$$
\begin{aligned}
C_{s}(Y ; t) &=\int_{t}^{\infty}\left(\frac{\bar{F}_{X}\left(\frac{x-b}{a}\right)}{\bar{F}(t)}\right)^{s} d x \\
&=a \int_{\frac{t-b}{a}}^{\infty}\left(\frac{\bar{F}_{x}(u)}{\bar{F}(t)}\right)^{s} d u \\
&=a \cdot C_{s}\left(X ; \frac{t-b}{a}\right), t \geq b.
\end{aligned}
$$
From the above theorem, the following property can be easily obtained for  particular choice of $C_{s}(Y ; t)$.
\begin{corollary}We have

  (a) $C_{s}(a X ; t)=a \cdot C_{s}\left(X ; \frac{t}{a}\right)$.

(b) $C_{s}(X+b ; t)=C_{s}(X ; t-b)$.
\end{corollary}
\begin{theorem}Let $X$ be a continuous random variable with distribution function $F(x)$. Also defined the hazard rate of $X$ as $h(t)=f(t)/\bar{F}(t)$.
 The relationship between hazard rate and DCREGF is given by
\begin{equation}\label{rhd}
  h(t) =\frac{1+C_{s}^{\prime}(X ; t)}{s \cdot C_{s}(X ; t)}.
\end{equation}
\end{theorem}
\noindent{\bf Proof:}  From the definition in (\ref{dcregf}), we have
$$
(\bar{F}(t))^{s} C_{s}(X ; t)=\int_{t}^{\infty}(\bar{F}(x))^{s} d x .
$$
Differentiating both side of the above equation  with respect to  $t$, we obtain
$$
\begin{aligned}
(\bar{F}(t))^{s} C_{s}^{\prime}(X ; t)-C_{s}(X ; t) \cdot s \cdot(\bar{F}(t))^{s-1} f(t) &=-(\bar{F}(t))^{s},
\end{aligned}
$$where prime denotes the derivative. In terms of hazard rate, the above eqaution can be written as
$$C_{s}^{\prime}(X ; t)-s \cdot h(t) \cdot C_{s}(X ; t)+1 =0.$$
Hence, we obtain
$$
\begin{aligned}
h(t) &=\frac{1+C_{s}^{\prime}(X ; t)}{s \cdot C_{s}(X ; t)}.
\end{aligned}
$$
In the following theorem, we show that the dynamic cumulative residual entropy generating function determines the distribution of $X$ uniquely.
\begin{theorem}\vspace{-0.2in}
 Let $X$ be a non-negative random variable  with density function $f(x)$, the survival function $\bar{F}(x)$ and the hazard rate $h(x)$. Then $C_{s}(F ; t)$ uniquely determines the survival function $\bar{F}(t)$.
\end{theorem}\vspace{-0.2in}
\noindent{\bf Proof:} From the relationship between the hazard rate and the DCREGF given (\ref{rhd}), we have
$$-\frac{d}{d t} \log \bar{F}(t) =\frac{1+C_{s}^{\prime}(X ; t)}{s \cdot C_{s}(X ; t)}. $$
 Integrating over the interval $(0,t)$, we obtain
 $$ -\log \bar{F}(t) =\int_{0}^{t}\frac{1+C_{s}^{\prime}(X ; t)}{s \cdot C_{s}(X ; t)}dt.$$
That is
$$
\bar{F}(t)=\exp \left[-\int_{0}^{t}\left(\frac{1+C_{s}^{\prime}(X ; t)}{s . C_{s}(X ; t)}\right) d t\right] \text {. }
$$
This shows that the knowledge of $C_{s}(X ; t)$ enables us to determine the distribution.

Now, suppose that $F(x)$ and $G(x)$ are two distribution functions such that
\begin{equation}\label{rbdyn}
  C_{s}(F ; t)=C_{s}(G ; t).
\end{equation}
That is,
$$
\frac{1}{(\bar{F}(t))^{s}} \int_{t}^{\infty}(\bar{F}(x))^{s} d x=\frac{1}{(\bar{G}(t))^{s}} \int_{t}^{\infty}(\bar{G}(x))^{s} d x.
$$
Differentiating with respect to  $t$, we have
$$
\begin{aligned}
&{[\bar{F}(t)]^{-s} \cdot-(\bar{F}(t))^{s}+\left(\int_{t}^{\infty}(\bar{F}(x))^{s} d x\right) \cdot s(\bar{F}(t))^{-s-1} f(t)} \\
&=[\bar{G}(t)]^{-s} \cdot-(\bar{G}(t))^{s}+\left(\int_{t}^{\infty}(\bar{G}(x))^{s} d x\right) \cdot s(\bar{G}(t))^{-s-1} g(t).
\end{aligned}
$$
In terms of hazard functions  $h_1=f(t)/\bar{F}(t)$ and $h_2=g(t)/\bar{G}(t)$, we have
$$
h_{1}(t) \cdot \frac{1}{(\bar{F}(t))^{s}} \int_{t}^{\infty}(\bar{F}(x))^{s} d x=h_{2}(t) \cdot \frac{1}{(\bar{G}(t))^{s}} \int_{t}^{\infty}(\bar{G}(x))^{s} d x,
$$
which gives
$$
h_{1}(t) C_{s}(F ; t)=h_{2}(t) C_{s}(G ; t).
$$
In view of (\ref{rbdyn}), we obtain
$$
h_{1}(t)=h_{2}(t).
$$
This implies that  $C_{s}(F ; t)$   determines the distribution of $X$ uniquely.\\Next theorem shows that the dynamic cumulative residual entropy generating function is independent of  $t$  if and only $X$ is a exponential random variable.
\begin{theorem}\vspace{-0.2in}
  If $X$ is a non-negative random variable admitting an absolutely continuous  distribution function $F(x)$, then the dynamic cumulative residual entropy generating function is independent of  $t$ if and only if $X$ has exponential distribution.
\end{theorem}\vspace{-0.2in}
\noindent {\bf Proof}. Let $C_{s}(F ; t)=k $, where $k$ is a positive constant. Hence
$$\vspace{-0.1in}
C_{s}^{\prime}(F ; t)=0 .
$$\vspace{-0.2in}
From (\ref{rhd}), we obtain
\begin{equation*}
  sk. h(t)=1.
\end{equation*} Hence, $h(t)=\frac{1}{s k}=\beta$,  a constant.
Constant hazard rate  characterizes the exponential distribution. Therefore, $X$ is distributed as an exponential random variable with parameter  $\beta$.

Conversely, assume that $X \sim \exp (\beta)$ where the survival function is given by  $\bar{F}(x)=\exp(-\beta x)$. Therefore,
$$
\begin{aligned}
C_{s}(F ; t) &=\frac{1}{e^{-\beta t s}} \int_{t}^{\infty} e^{-\beta s x} d x \\
&=\frac{1}{\beta s},
\end{aligned}
$$which is a constant. That is, DCREGF is independent  of  $t$ if and only if $X$ has exponential distribution.

\noindent The next theorem provides a characterization result for the generalized Pareto distribution based on a functional form for the dynamic cumulative residual entropy generating function.
\begin{theorem}\vspace{-0.2in}
  Let $X$ be a non-negative continuous random variable with survival function $\bar{F}(x)$. The dynamic cumulative residual entropy generating function is a linear function of $t$ if and only if $X$ follows generalized Pareto distribution.
\end{theorem}\vspace{-0.2in}
\noindent{Proof:} Assume that, $C_{s}(F ; t)=a+b t ; b \neq 0$. Then $C_{s}^{\prime}(F ; t)=b$. From (\ref{rhd}),
$$
\begin{aligned}
b-s \cdot h(t)(a+b t)+1 &=0.
\end{aligned}
$$Or
$$h(t)(a+b t) =\frac{b+1}{s}.$$
Differentiating with respect to   $t$,  we obtain
$$h(t) b+(a+b t) h^{\prime}(t) =0.$$
That is
$$a+b t =-\frac{b h(t)}{h^{\prime}(t)}.$$Or
$$
\begin{aligned}
-\frac{h^{\prime}(t)}{h(t)} &=\frac{b}{a+b t}=\frac{1}{k+t} ; k=\frac{a}{b}.
\end{aligned}
$$
The above equation can be written as
$$
-\frac{d}{d t} \log h(t)=\frac{1}{k+t} .
$$
Integrating with respect to $t$, we have
$$
\begin{aligned}
&-\log h(t)=\log (k+t)+\log c.
\end{aligned}
$$Or
$$-\log h(t)=\log ((k+t) c).$$
That is\vspace{-0.1in}
$$
\begin{aligned}
\frac{1}{h(t)} &=(k+t) c \\
h(t) &=\frac{1}{c t+d} ,
\end{aligned}
$$where $ d=k c.$ This is the hazard rate of GPD. Since the distribution function uniquely determined by the hazard rate, $X \sim G P D$.

Conversely assume that, $X \sim G P D$, where the survival function of $X$ is given by
$$
\bar{F}(x)=\left(1+\frac{a x}{b}\right)^{-\left(1+\frac{1}{a}\right)}.
$$
Using (14) we get
$$
C_{s}(t)=k(b+a t),\quad k=\frac{1}{(a+1) s-a}.
$$
That is, $C_{s}(t)$ is linear function in  $t$. Hence the theorem.

Now, we provide some characterization results in terms of relationship between the DCREGF and the hazard rate function $h(t)$.
\begin{theorem}\vspace{-0.1in}
  Let $X$ be a non-negative random variable with survival function $\bar{F}(t)$, hazard rate function $h(t)$ and DCREGF  $C_{s}(t)$, then  the following relationship
\begin{equation}\label{rel16}
  C_{s}(t)=k(h(t))^{-1},
\end{equation}
where $k$ is a positive constant, holds if and only if $F(x)$ is the GPD with survival function
$$
\bar{F}(x)=\left(1+\frac{a x}{b}\right)^{-\left(1+\frac{1}{a}\right)},\,\, a>-1, b>0.
$$
\end{theorem}\vspace{-0.2in}
\noindent{\bf Proof}: Under the assumption that (\ref{rel16}) holds, we obtain
$$
C_{s}^{\prime}(t)=-k(h(t))^{-2} h^{\prime}(t).
$$
Using (\ref{rhd}), we have
$$
(s k-1)=-k \frac{h^{\prime}(t)}{(h(t))^{2}}.
$$
That is
$$
\frac{d}{d t}\left(\frac{1}{h(t)}\right)=\left(s-\frac{1}{k}\right) .
$$
Integrating on both sides of the above equation, we have
$$
\frac{1}{h(t)}=\left(\frac{s k-1}{k}\right) t+d_{2} .
$$
That is
$$
\frac{1}{h(t)}=d_{1} t+d_{2} .
$$
Therefore
\begin{equation}\label{eq17}
  h(t)=\frac{1}{d_{1} t+d_{2}},
\end{equation}
where $d_{1}=\frac{s k-1}{k}$ and $d_{2}^{-1}=h(0)$.
Hall and Wellner (1981) has shown that  (\ref{eq17}) is a characteristic property of GPD. Conversely, assume that the random variable $X$ follows GPD. By direct calculation, we obtain
$$
\begin{aligned}
C_{s}(t) &=\frac{b+a t}{(a+1) s-a} \\
&=\left(\frac{b+a t}{a+1}\right)\left(\frac{a+1}{(a+1) s-a}\right) \\
&=k \frac{1}{h(t)}=k(h(t))^{-1}.
\end{aligned}
$$where $ k=\frac{a+1}{(a+1) s-a}$.
Hence we have the proof of the theorem.\\
In the following theorem, we characterize the distribution of $X$ using the relationship between the DCREGF and the mean residual life function (MRL).
\begin{theorem}\vspace{-0.2in}
   If $X$ is a non-negative random variable admitting an absolutely continuous distribution function  $F(x)$. Define MRL of $X$ as $m(t)=E(X-t|X>t)$. Then the relationship, $C_{s}(t)=k . m(t)$  holds for every $t>0$, if and only if $X \sim G P D$.
\end{theorem}\vspace{-0.2in}
\noindent{\bf Proof}:  Assume
\begin{equation}\label{eq18}
C_{s}(t)=k \cdot m(t).
\end{equation}
Differentiating with respect to  $t$, we have
$$
C_{s}^{\prime}(t)=k \cdot m^{\prime}(t) .
$$
From (15), we have
$$
\text { s. } h(t) \cdot C_{s}(t)-1=k \cdot m^{\prime}(t) .
$$
Using (\ref{eq18}), we obtain
$$
k \cdot s \cdot h(t) \cdot m(t)-1=k \cdot m^{\prime}(t)
$$
Now, we have the relationship between the hazard rate and the mean residual life given by
$$
\frac{1+m^{\prime}(t)}{m(t)}=h(t) .
$$
Therefore, we have
$$
\begin{aligned}
k \cdot s\left(1+m^{\prime}(t)\right) &=1+k \cdot m^{\prime}(t) \\
(k s-k) m^{\prime}(t) &=1-k \cdot s \\
m^{\prime}(t) &=\frac{1-k s}{k s-k}=\text { a constant},
\end{aligned}
$$
which implies that $m(t)$ is a linear function in $t$. Linear mean residual life function  is a characteristic property of GPD.

Conversely, assume that $X \sim G P D$. By direct calculation, we obtain
\begin{equation}\label{eq19}
  C_{s}(X ; t)=k(b+a t)=k \cdot m(t),
\end{equation}
where $k=\frac{1}{(a+1) s-a}$. This proves the if part.
\begin{remark}
  Differentiate both sides of (\ref{eq19}) with respect to  $s$ and setting $s=1$ and evaluating  it with negative sign, we obtain Theorem 4.8 of Asadi and Zohervand (2007).
\end{remark}

\noindent Next, using DCREGF we introduce two new classes of lifetime distributions
\begin{definition}
   A random variable $X$ is said to have increasing (decreasing) DCREGF, denoted by IDCREGF (DDCREGF) if $C_{s}(X ; t)$ is increasing (decreasing) function in $t, \forall t \geq 0$.
\end{definition}
\noindent The following theorem gives the bounds for $C_{s}(X ; t)$ in terms of hazard rate function.
\begin{theorem}\vspace{-0.2in}
  The distribution function  $F$ is increasing (decreasing) DCREGF if and only if for all $t>0$
$$
C_{s}(F ; t) \geq(\leq) \frac{1}{s \cdot h(t)},\,\,\,s \geq 1.
$$
\end{theorem}\vspace{-0.2in}
\noindent{\bf Proof:} From the definition of new classes of lifetime distributions, the distribution function  $F$ is said to be increasing (decreasing) if $\left.C_{s} F ; t\right)$ is increasing (decreasing) in $t$. That is \vspace{-0.1in}$$C_{s}^{\prime}(F ; t)\ge(\le) 0.$$ Hence
$$\vspace{-0.1in}
\begin{gathered}
s \cdot h(t) \cdot C_{s}(F ; t)-1\ge(\le) 0.
\end{gathered}\vspace{-0.1in}
$$Or
$$C_{s}(F ; t)\ge (\le) \frac{1}{s \cdot h(t)}.$$
\begin{theorem}\vspace{-0.2in}
  Let $X$ and $Y$ be two non-negative absolutely continuous random variable's with survival functions $\bar{F}(t)$ and $\bar{G}(t)$ and hazard rate functions $h_{1}(t)$ and $h_{2}(t)$, respectively. If $X \geq^{h r} Y$, that is, $\left.h_1(t\right) \leq h_{2}(t)\, \forall t \geq 0$, then $C_{s}(F ; t) \geq$ $C_{s}(G ; t)$.
\end{theorem}\vspace{-0.2in}
\noindent{\bf Proof:} Let  $X \geq^{h r} Y$, then we have
$$
\begin{aligned}
h_{1}(t) \leq h_{2}(t) & \Longrightarrow \quad \bar{F}_{X_{t}}(t) \geq \bar{G}_{Y_{t}}(t) \\
& \Longrightarrow \frac{\bar{F}(x)}{\bar{F}(t)} \geq \frac{\bar{G}(x)}{\bar{G}(t)} \\
& \Longrightarrow \int_{t}^{\infty}\left(\frac{\bar{F}(x)}{\bar{F}(t)}\right)^{s} d x \geq\left(\frac{\bar{G}(x)}{\bar{G}(t)}\right)^{s} \\
& \Longrightarrow C_{s}(F ; t) \geq C_{s}(G ; t).
\end{aligned}
$$

\noindent The following theorem shows that the exponential distribution is the only distribution which is both IDCREGF and DDCREGF.
\noindent The following example gives an application of Theorem 11 in order statistics.
\begin{Example}
  Let $X_{1},  \ldots, X_{n}$ be independent and identical non-negative random variable's with survival function $\bar{F}(x)$. If $X_{i: n}$ denotes the $i$- th order statistic based on a random sample $X_{1}, \ldots, X_{n}$ from $F$, then the following results holds.

(i) $C_{s}\left(X_{i: n} ; t\right) \leq C_{s}\left(X_{i+1: n} ; t\right)$

(ii) $C_{s}\left(X_{i: n} ; t\right) \leq C_{s}\left(X_{1: n-1} ; t\right)$

(iii) $C_{s}\left(X_{n: n} ; t\right) \geq C_{s}\left(X_{n-1: n-1} ; t\right)$.
\end{Example}
\begin{theorem}
 Let $X$ be a non-negative random variable having IDCREGF and DDCREGF, then $X$ has exponential distribution.
\end{theorem
\noindent{\bf Proof:} As $X$ possess both IDCREGF and DDCREGF properties, $C_{s}(X ; t)$ is a constant. Hence, from Theorem 8, $X$ has exponential distribution.
\begin{corollary}
Let $X$ be $D D C R E G F$ (IDCREGF), then
$$
\bar{F}(t) \geq(\leq) \exp \left[-\int_{0}^{t} \frac{1}{s . C_{s}(F ; t)} d x\right].
$$
\end{corollary}
\noindent{\bf  Proof:}  Let $X$ be DDCREGF, then
$$
h(t) \leq \frac{1}{s \cdot C_{s}(F ; t)}.
$$
Again, using the relation relationship between $\bar{F}(t)$ and $h(t)$, we have
$$
\bar{F}(t)=\exp \left[-\int_{0}^{t} h(u) d u\right] \geq \exp \left[-\int_{0}^{t} \frac{1}{s \cdot C_{s}(F ; t)} d x\right].
$$
Similarly, we can show that if $X$ has IDCREGF, then
$$
\bar{F}(t) \leq \exp \left\{-\int_{0}^{t} \frac{1}{s \cdot C_{s}(F ; t)} d x\right\}.
$$
\section{Test for decreasing DCREGF}\vspace{-0.5in}
In the previous section, we proved that the DCREGF characterize the distribution of $X$.  As constant DCREGF is a characterization  of  exponential random variable,  we develop a test for testing exponentiality  against the decreasing DCREGF class.

Let $X_1,\ldots X_n$ be a random sample of size $n$ from $F$. We are interested in testing the null hypothesis\vspace{-0.1in}
$$H_0: X \text{ has exponential distribution} $$
 against the alternative\vspace{-0.1in}
 $$H_1: X \text{ has decreasing DCREGF and not exponential.}$$
  For testing the above hypothesis first we define a departure measure which discriminate between null and alternative hypothesis.
  Note that $C_{s}(X ; t)$ is decreasing in $t$ if $C_{s}^{'}(X ; t)\le 0.$ That is,
  $$\frac{sf(t)}{\bar{F}^{s+1}(t)}\int_{t}^{\infty}\bar{F}^s(x)dx-\frac{1}{\bar{F}^{s}(t)}\bar{F}^{s}(t)\le 0$$
  or
  $${\bar{F}^{s+1}(t)}-{sf(t)}\int_{t}^{\infty}\bar{F}^s(x)dx\ge 0.$$
  Hence, we consider  a measure of departure $ \Delta(F)$ given by
\begin{eqnarray}\label{deltam}
\Delta(F)=\int_{0}^{\infty}\left({\bar{F}^{s+1}(t)}-{sf(t)}\int_{t}^{\infty}\bar{F}^s(x)dx\right)dt.
\end{eqnarray}Clearly, $\Delta(F)$ is zero under  $H_0$ and positive  under $H_1$. Accordingly,  $\Delta(F)$  can be considered as a measure of departure  from $H_0$ towards  $H_1$. As the proposed test is based on U-statistics, first we express  $\Delta(F)$ in terms of expectation of the function of random variables. For a non-negative random variable $X$, $E(X)=\int_{0}^{\infty}\bar{F}(x)dx$. Also, observe that $\bar{F}^{n}(x)$ is the survival function of $\min(X_1,\ldots,X_n)$.  Consider
\begin{eqnarray}\label{delta}
\Delta(F)&=&\int_{0}^{\infty}\left({\bar{F}^{s+1}(t)}-{sf(t)}\int_{t}^{\infty}\bar{F}^s(x)dx\right)dt\nonumber\\
&=&E(\min(X_1,\ldots,X_{s+1}))-\int_{0}^{\infty}\int_{t}^{\infty}{sf(t)}\int_{t}^{\infty}\bar{F}^s(x)dxdt.
\end{eqnarray}
Changing the order of integration, we have
\begin{eqnarray}\label{delta1}
\Delta(F)&=&E(\min(X_1,\ldots,X_{s+1}))-s\int_{0}^{\infty}\bar{F}^s(x)\int_{0}^{t}f(t)dtdx\nonumber\\
&=&E(\min(X_1,\ldots,X_{s+1}))-s\int_{0}^{\infty}\bar{F}^s(x)(1-\bar{F}(x))dx\nonumber\\
&=&(s+1)E(\min(X_1,\ldots,X_{s+1}))-sE(\min(X_1,\ldots,X_{s})).
\end{eqnarray}
We find the test statistic using theory of U-statistics.  Consider a symmetric kernel
\begin{eqnarray*}
  h_1(X_1,\ldots,X_{s+1})= (s+1)\min(X_1,\ldots,X_{s+1})-\frac{1}{s+1}\sum_{C_s}s\min(X_{i_{1}},\ldots,X_{i_{s}}),
\end{eqnarray*}where summation is over the set $C_s$ of all  combination of  $s$ integers $i_1<i_2<\ldots<i_s$ chosen from the set $(1,\ldots,s+1)$.
Hence a U-statistic based  test statistic is given by
\begin{equation}\label{test}
 \widehat{\Delta} =\frac{1}{C_{m,n}} \sum\limits_{C_{m,n}}h{(X_{i_1},X_{i_2},\cdots,X_{i_{s+1}})},
\end{equation}where the summations is over the set  $C_{m,n}$ of all combinations of $(s+1)$ distinct elements $\lbrace i_1,i_2,\cdots,i_{s+1}\rbrace$ chosen from $\lbrace 1,2,\cdots,n\rbrace$.

We reject the null hypothesis $H_0$ against the alternative  $H_1$ for large value of $\widehat{\Delta}$.
\begin{remark}
  When $s=1$, the testing problem reduces to testing decreasing mean residual life, a important problem in the lifetime data analysis.
\end{remark}

We find a critical region of the test using the asymptotic distribution of $ \widehat{\Delta}$.  Next we find the asymptotic distribution of $\widehat{\Delta} $.
\begin{theorem}\vspace{-0.3in}
  As $n\rightarrow \infty$,  $\sqrt{n}(\widehat{\Delta}-\Delta(F))$ converges in distribution to normal random variable with mean zero and variance $(s+1)^2\sigma^2$, where $\sigma^2$ is given by
 \begin{eqnarray}\label{vart}
 \sigma^2&=&Var\Big((s+1)X{{\bar F}^{s}}(X) + s(s+1)\int_0^X {{{y \bar F}^{s -1}}(y)} d{F}(y)\nonumber\\
 &&\quad-\frac{s^2}{(s+1)}X{{\bar F}^{s-1}}(X) -\frac{(s-1)s^2}{(s+1)}\int_0^X {{{y \bar F}^{s -2}}(y)} d{F}(y)\Big).
\end{eqnarray}
\end{theorem}
\noindent {\bf Proof:} Using the central limit theorem for U-statistics  we have the asymptotic  normality of $ \widehat{\Delta}^*$. The asymptotic variance is $(s+1)^2\sigma_1^2$ where $\sigma_1^2$ is given by (Lee, 2019)
\begin{equation}\label{var1}
\sigma_1^2= Var\left[E\left(h(X_{1},\ldots,X_{(s+1)})|X_{1}\right)\right].
\end{equation}Denote $Z=\min(X_2,X_3,...,X_s)$, then the distribution of $Z$ is given by $1-\bar{F}^{s-1}(x)$, where $\bar{F}(x)=1-F(x)$.  Consider
\begin{eqnarray*}\label{eq4}
E\left[ {\min \left( {x,{X_2},{X_3},...,{X_{s} }} \right)} \right]& =& E\left[ {xI(Z > x)} \right] + E\left[ {ZI(Z \le x)} \right]\nonumber\\&=&x{{\bar F}^{s- 1}}(x) + (s-1)\int_0^x {{{y \bar F}^{s  - 2}}(y)} d{F}(y).
\end{eqnarray*}\vspace{-0.1in}Similar way, we obtain
\begin{eqnarray*}\label{eq4}
E\left[ {\min \left( {x,{X_2},{X_3},...,{X_{s+1} }} \right)} \right]&=&x{{\bar F}^{s}}(x) + s\int_0^x {{{y \bar F}^{s  - 1}}(y)} d{F}(y).
\end{eqnarray*}\vspace{-0.1in}Hence \vspace{-0.1in}
\begin{eqnarray*}\label{eq4}
 &&\hskip-1.inE\left(h\big( {{X_1},{X_2},...,{X_s }}|X_1=x\big) \right)\\&=&(s+1)x{{\bar F}^{s}}(x) + s(s+1)\int_0^x {{{y \bar F}^{s -1}}(y)} d{F}(y)\\
 &&\quad-\frac{s^2}{(s+1)}x{{\bar F}^{s-1}}(x) -\frac{(s-1)s^2}{(s+1)}\int_0^x {{{y \bar F}^{s -2}}(y)} d{F}(y)+\frac{sk}{(s+1)},
\end{eqnarray*}where $k=E(\min(X_2,\ldots, X_{s+1}))$, a constant.
\noindent Therefore, from (\ref{var1}) we obtain the variance expression specified in the theorem.

Under the null hypothesis $H_0$, $\Delta{(F)}=0$. Hence we have the following corollary.
\begin{corollary}\vspace{-0.3in}
 Under $H_0$, as $n\rightarrow \infty$,  $\sqrt{n}\widehat{\Delta}$ converges in distribution to a Gaussian random variable with mean zero and variance $\sigma_0^2$, where $\sigma_0^2$ is given by
 \begin{equation}\label{nullvarg}
   \sigma_0^2= \frac{s}{(4s^2-1)\lambda^2}.
 \end{equation}
\end{corollary}
\noindent{Proof:} For the exponential distribution the mean is equal to the mean residual life function. Hence
\begin{equation*}
  \int_0^x {{{sy \bar F}^{s -1}}(y)} d{F}(y)=\frac{1}{s\lambda}-\bar{F}^s(x)\left(x+\frac{1}{s\lambda}\right).
\end{equation*}Also
\begin{equation*}
  \int_0^x {{{(s-1)y \bar F}^{s -2}}(y)} d{F}(y)=\frac{1}{(s-1)\lambda}-\bar{F}^{s-1}(x)\left(x+\frac{1}{(s-1)\lambda}\right).
\end{equation*}Therefore, the variance expression in (\ref{vart}) reduces to
\begin{eqnarray*}
  \sigma_{1}^{2} &=& Var\left(\frac{s^2}{(s+1)(s-1)\lambda}\bar{F}^{s-1}(X)-\frac{(s+1)}{s\lambda }\bar{F}^{s}(X)\right) \\
   &=& \frac{1}{(s+1)^2\lambda^2}Var\left( \frac{s^2}{(s-1)}\bar{F}^{s-1}(X)-\frac{(s+1)^2}{s} \bar{F}^{s}(X)\right)
   \\
   &=& \frac{1}{(s+1)^2\lambda^2}\Bigg\{Var\left( \frac{s^2}{(s-1)}\bar{F}^{s-1}(X)\right)+Var\left(\frac{(s+1)^2}{s} \bar{F}^{s}(X)\right)\\&&\quad-\frac{2s(s+1)^2}{(s-1)}Cov(\bar{F}^{s}(X),\bar{F}^{s-1}(X))\Bigg\}.
   \\
   &=& \frac{1}{(s+1)^2\lambda^2}\Bigg\{\frac{s^2}{2s-1}+\frac{(s+1)^2}{2s+1}-(s+1)\Bigg\}= \frac{s}{(s+1)^2(4s^2-1)\lambda^2}.
\end{eqnarray*}  Hence the asymptotic null variance is equal to $s/(4s^2-1)\lambda^2$, which prove the theorem.

In view of the null  variance specified in (\ref{nullvarg}), we consider a scale invariant test given by
$$\widehat{\Delta}^*=\frac{\widehat{\Delta}}{\bar{X}},$$where $\bar{X}$ is the sample mean.  Using Slutsky's theorem we have the following result.
\begin{corollary}
 Under $H_0$, as $n\rightarrow \infty$,  $\sqrt{n}\widehat{\Delta}^*$ converges in distribution to a Gaussian random variable with mean zero and variance $\sigma_0^2$, where $\sigma_0^2$ is given by
 \begin{equation}\label{nullvar}
   \sigma_0^2= \frac{s}{(4s^2-1)}.
 \end{equation}
\end{corollary}

An asymptotic critical region of the test can be obtained  using Corollary 5.  We reject the null hypothesis $H_{0}$ against the alternative hypothesis $H_{1}$ at a significance level $\alpha$, if
\begin{equation*}
 \frac{ \sqrt{n(4s^2-1)} |\widehat{\Delta}^*| }{\sqrt{s}}>Z_{\alpha/2},
  \end{equation*}
where $Z_{\alpha}$ is the upper $\alpha$-percentile point of the standard normal distribution.

\section{Simulation and data analysis}
We conduct Monte Carlo simulation studies using R software to evaluate the finite sample performance of the estimator $\widehat {C}_s(X)$ and the proposed test for DDCREGF. The simulation is repeated ten thousand times.

First, we evaluate the performance of the estimator $\widehat {C}_s(X)$ in terms of bias and MSE. In the simulation study, we generate observations from various lifetime distributions including exponential, gamma, Weibull, lognrmal and Makeham distributions. Various parameters are chosen for generating these observations. The MSE and the absolute bias of the estimators based on samples of sizes $n=10,20,30,40$ and $50$ are calculated. Different choices of $s$ are used in the simulation study. The results of the simulation study are presented in Table 2.  From Table 2, we can observe that both the MSE and the absolute bias are negligible for all distributions and both decrease as $n$ increases.

Next, we conduct an extensive simulation study to assess the performance of the proposed test for decreasing DCREGF. The exponential distribution with different choices of parameters is used to find the empirical type I error of the test.  For finding the empirical power of the test, lifetime distributions including, gamma, Weibull, lognormal, Makeham and linear failure rate, which are members of the DDCREGF class are used.  Random samples of sizes $n=10,20,30,40$ and $50$ are generated from these distributions where the parameters are chosen in such a way that the distribution belongs to decreasing DCREGF family. Different choices of the  $s$ are considered in the study. The results of the simulation study are presented in Tables 3-5. In Table  3, 4 and 5 we reported the results for $s=1$, $s=2$ and $s=3$, respectively.

From Tables 3-5, we can see that empirical type I error of the test approaches chosen significance level for all choices of parameters of the exponential distribution.  For all choices of alternatives, the test yields good power also. When the samples are generated from a gamma distribution with parameters such that, the distribution is approaching exponential, we observe small power. The random samples from Makeham distribution also show low power, compared to the other distributions. The proposed test yield very good power for all the other distributions with various choices of parameters we considered in the simulation.

Next, we use two real life data sets to illustrate the proposed testing procedure. \\
\textbf{Example 1.}  The following data set represents the failure times (in minutes) for a sample of 15 electronic components in an accelerated life test, Lawless (2011).\\
Data: 1.4, 5.1, 6.3, 10.8, 12.1, 18.5, 19.7, 22.2, 23.0, 30.6, 37.3, 46.3, 53.9, 59.8 ,66.2.\\
After applying the above testing procedure, we obtain the test statistic value (for $s=1$) as $0.8409$. Hence,  we accept the null hypothesis that above data set  is exponentially distributed. Our conclusion is same as previous studies on this data.    \\
\textbf{Example 2.}  The second data set is also taken from Lawless (2011).  We considered the data which arose in tests on endurance of deep groove ball bearings. The data are the number of million
revolutions before failure for each of the 23 ball bearings in the life tests and the complete data is given below.\\
Data :17.88, 28.92, 33.00, 41.52, 42.12, 45.60, 48.40, 51.84, 51.96, 54.12, 55.56, 67.80,\\
68.64, 68.64, 68.88, 84.12, 93.12, 98.64, 105.12, 105.84, 127.92, 128.04, 173.40.\\
We obtain the test statistic value (for $s=1$)  as $3.5099$. This concludes that for this data set, we reject the null hypothesis and that it is DCREGF. We use the the function `fitdist' in R-package `fitdistrplus' to fit the ball bearing data. Weibull and lognormal distributions are the two possible models which fit the data and belong to  DCREGF class of distributions.

\section{Conclusions}

In this article, we studied the properties of the cumulative residual entropy generating function (CREGF). We obtain the non-parametric estimator of CREGF and evaluated its performance. We then introduced a dynamic version of the cumulative residual entropy generating function (DCREGF).  We have shown that DCREGF determines the distribution uniquely. Further, we studied the relationships between DCREGF, hazard rate and mean residual life function. This led to the development of a non-parametric test for decreasing DCREGF. We evaluated the finite sample behavior of the proposed test through an extensive Monte Carlo simulation study. The empirical type I of the test is well maintained.   The practical applications of the test are illustrated using real-life examples.  The proposed test can be used for testing decreasing mean residual life function.

Different extensions of measures of entropy and extropy are extensively studied in the literature. We can extend the generating function approach to study these measures.  One can consider developing the empirical likelihood and jackknife empirical likelihood inference for these measures.