  Neural-network-based approaches recently emerged in the field of data
compression and have already led to significant progress in image compression,
especially in achieving a higher compression ratio. In the lossless image
compression scenario, however, existing methods often struggle to learn a
probability model of full-size high-resolution images due to the limitation of
the computation source. The current strategy is to crop high-resolution images
into multiple non-overlapping patches and process them independently. This
strategy ignores long-term dependencies beyond patches, thus limiting modeling
performance. To address this problem, we propose a hierarchical latent variable
model with a global context to capture the long-term dependencies of
high-resolution images. Besides the latent variable unique to each patch, we
introduce shared latent variables between patches to construct the global
context. The shared latent variables are extracted by a self-supervised
clustering module inside the model's encoder. This clustering module assigns
each patch the confidence that it belongs to any cluster. Later, shared latent
variables are learned according to latent variables of patches and their
confidence, which reflects the similarity of patches in the same cluster and
benefits the global context modeling. Experimental results show that our global
context model improves compression ratio compared to the engineered codecs and
deep learning models on three benchmark high-resolution image datasets, DIV2K,
CLIC.pro, and CLIC.mobile.
