PercepLIE: A New Path to Perceptual Low-Light Image Enhancement

Authors: cong  wang
chengjin  yu
jie  mu
wei  wang
  perceplie
Venue: acmmm_org_ACMMM_2024_Conference
Published: 2024-04-08 03:15:01

Abstract: While current CNN-based low-light image enhancement (LIE) approaches have achieved significant progress, they often fail to generate better perceptual quality which requires restoring better details and more natural colors. To address these problems, we set a new path, called PercepLIE, by presenting the VQGAN with Multi-luminance Detail Compensation (MDC) and Global Color Adjustment (GCA). Specifically, observed that latent light features of the low-light images are quite different from those captured in normal light, we utilize VQGAN to explore the latent light representation of normal-light images to help the estimation of the low-light and normal-light mapping. Furthermore, we employ Gamma correction with varying Gamma values on the gradient to create multi-luminance details, forming the basis for our MDC module to facilitate better detail estimation. To optimize the colors of low-light input images, we introduce a simple yet effective GCA module that is based on spatially-varying representation between the estimated normal-light images in this module and low-light inputs. By combining the VQGAN with MDC and GCA within a stage-wise training mechanism, our method generates images with finer details and natural colors and achieves favorable performance on both synthetic and real-world datasets in terms of perceptual quality metrics including NIQE, PI, and LPIPS. The source codes will be made available at \url{https://github.com/supersupercong/PercepLIE}.

Main paper: 
 introduction: 
 Low-light image enhancement (LIE) aims to recover a normal-light image from the observed low-light one. LIE attracts lots of attention due to its significant applications in computer vision, video surveillance, and multimedia. Early works on LIE are based on statistical observations, e.g., histogram equalization [3, 48, 75] , gamma correction [13, 50] , and Retinex model [7, 35] . However, statistical observations do not sufficiently model the inherent proprieties of clear natural images and may lead to unnatural results.Recent LIE approaches [9, 36, 43, 63, 66, 82] mainly rely on deep convolutional neural networks (CNNs) [11, 12, 31] , by designing various networks with end-to-end training to directly obtain the restored results from the low-light input images. Although these CNN-based approaches achieve decent performance compared to conventional methods based on statistical observations, there remain critical challenges that need to be addressed.Challenges. First, the latent light representation of the low-light images is quite different from those captured in normal light, as shown in Figure 1 . Directly applying a deep model to low-light images will not effectively explore useful features for image enhancement. Thus, it is necessary to resort to the deep light representation extracted from normal light to guide the deep model for better restoration. Second, since recovering details is essential for image restoration, most existing methods [9, 15, 39, 63, 67, 82] are not effective for image details estimation. Although some approaches [47, 85] try to use structures to guide the estimation process of clear images, the adopted structures are usually decimated when applying convolution operations recurrently, thus may be not effective for better detail estimation. Third, LIE aims to generate images with not only fine structural details but also natural colors and better perceptual quality. Existing approaches do not effectively model various illumination distributions of low light, which usually leads to results with unnatural colors and lower perceptual quality. Thus, it is imperative to develop methods that can recover images with better structural details while having natural colors and higher perceptual quality. Solutions. To solve the above challenges, we in this paper propose the PercepLIE, which is a VQGAN-based model with Multiluminance Detail Compensation (MDC) and Global Color Adjustment (GCA) for perceptual LIE. As noted that the latent features of the low-light images are quite different from those captured in normal light, as shown in Figure 1 . VQGAN [5] is used to explore the latent light representations of normal-light images via learning the normal-light codebook priors to guide the deep models to enhance images by reducing the estimation error of the low-light and normal-light mapping (Section 4.1). To generate the results with finer details, we apply Gamma correction with different gamma values to generate multi-luminance details based on image gradient, as shown in Figure 2 , and develop an effective MDC scheme to compensate for the details for better detail estimation (Section 4.2). However, due to the influence of different illumination conditions, the restored images usually contain unnatural colors. We thus develop a simple yet effective GCA approach, which is built on the spatially-varying representation between the estimated images and low-light ones, to adjust the restored results toward more natural colors (Section 4.3). By training the VQGAN with MDC and GCA stage by stage, our PercepLIE can generate high-quality and realistic-looking images.Evaluation Criteria. The objective of LIE is to recover naturallooking and perceptually pleasing results from low-light inputs. However, we note that widely used distortion metrics such as Peak-Signal-to-Noise-Ratio (PSNR) [14] and Structural SIMilarity (SSIM) [64] are inadequate for measuring these properties [1, 32] . Notice that perceptual quality metrics such as Natural Image Quality Evaluator (NIQE) [44] and Perceptual Indexes (PI) [41] can estimate the perceptual quality and naturalness of the restoration result [9, 79] . Additionally, the Learned Perceptual Image Patch Similarity (LPIPS) [78] has been shown to closely match human Early research on LIE mainly utilizes histogram equalization [3, 48, 75] , sparse representation model [6] , and Retinex theory [73] . Benefiting from the powerful learning mapping ability of CNNs for visual problems [4, 16-21, 23-29, 53, 54, 56-59, 68-70, 74, 84] , recent research on LIE mainly focuses on designing varieties of deep neural networks. Inspired by Retinex theory [46] , some Retinex-based networks are developed [39, 66, 82] . To recover finer structures of enhanced images, a series of works have been proposed [47, 55, 71, 85] . By formulating the LIE task as a deep curve estimation problem [9] or illumination adjustment problem [43] , some unsupervised algorithms are proposed [9, 25, 36, 43] . Despite these efforts, these approaches may not generate results with better perceptual qualities and natural colors since they either do not explore the latent normal-light priors or cannot adjust the results toward natural colors. 
vqgan and its applications to restoration: 
 Esser et al. [5] propose to train the vector-quantized codebook [51] with the adversarial objective to achieve higher perceptual quality.Inspired by its ability in generating high-quality images, some recent works exploit VQGAN for image restoration [2, 8, 52, 65, 83] .To our knowledge, there has been no effort to exploit VQGAN for LIE. To better explore LIE, we first find that the latent feature space of low-light images is quite different from those of images captured in normal light. Hence, the VQGAN can be utilized to learn the codebook to guide the deep model. With the VQFAN, we propose multi-luminance detail compensation to compensate for details and global color adjustment to dynamically adjust the results for better natural colors according to different low-light observations. 
motivation: 
 To better motivate our method, we first revisit the learning-based formulation for LIE in Section 3.1, then introduce our new path to problem formulation for perceptual LIE in Section 3.2.We first revisit the learning-based problem formulation of LIE. Most existing approaches [22, 72] directly map the low-light images L to enhance ones Ĥ via a deep model N :EQUATIONWe note that (1) directly maps low-light inputs to estimated normal-light ones without considering the details and colors of generated results, which may lead to more unnatural results and worse perceptual quality as high-quality image restoration requires recovering results with both finer details and natural colors. However, the details are usually decimated when applying convolution operations recurrently and the colors of restored results may not be promising when handling various low-light scenarios with different illuminations. Hence, the formulation in (1) without considering both details and colors may not be able to recover more natural results.To solve these challenges in Section 3.1, we explore a new path to perceptual LIE by taking image content, details, and colors into consideration within a new formulation:EQUATIONwhere N content is used to restore image content of normal-light; N detail is used to compensate for details; N color is used to adjust the colors of the enhanced results. To achieve the above goals, we propose the PercepLIE, which consists of 1) VQGAN for exploring latent light representation, which is used to better help generate image content (Section 4.1); 2) a multi-luminance detail compensation module, which can better compensate for details (Section 4.2); 3) a global color adjustment module, which can help better adjust the colors (Section 4.3). Figure 3 illustrates the framework of our PercepLIE. 
perceplie: 
 As introduced in Section 1, our method mainly contains a VQGAN for exploring the latent light representation of normal-light images via learning the normal-light codebook, a multi-luminance detail compensation module to compensate details, and a globally controllable adjustment module to control the generated results with natural colors and perceptual quality. Figure 3 illustrates our method.We note that the latent light representations, i.e., codebook, of the low-light images are quite different from those captured in normal light, as shown in Figure 1 . Hence, enforcing this characteristic to guide the deep models to enhance images will be helpful for LIE. To that end, we employ the VQGAN [5] to learn the Vector-Quantized (VQ) codebook. The VQGAN consists of an encoder E, a decoder D, and a codebook Z = {𝑧 𝑘 } 𝑁 𝑘=1 with 𝑁 discrete codes. Given a normal-light image H ∈ R 𝐻 ×𝑊 ×3 , we first use an encoder E to extract feature ẑ = E(H) ∈ R ℎ×𝑤×𝑛 𝑧 from H, where 𝑛 𝑧 is the feature dimension. We then obtain the vector-quantized representation 𝑧 q by applying an element-wise quantization q(•) of each spatial code ẑ𝑖 𝑗 ∈ R 𝑛 𝑧 to its closest codebook entry 𝑧 𝑘 :EQUATIONThe decoder 𝐷 uses the quantized representation 𝑧 q to reconstruct image Ĥ:EQUATIONWe train the VQGAN and codebook in an end-to-end manner and use the following loss function to constrain the VQGAN and codebook:EQUATIONwhere 𝜆 per and 𝜆 adv are weight parameter. L vq , L per , and L adv are defined as:EQUATIONEQUATION)Here ||H -Ĥ|| 1 is the reconstruction loss. sg[•] denotes stop gradient operation. Φ(•) denotes the feature extractor of VGG19 [49] . 𝛽 is a weight parameter, which is empirically set to be 0.25 in all experiments. The codebook is updated by 2 2 , which is the commitment loss [51] . With the learned codebook of normal light which better represents the latent light feature, we can use it to guide the learning of the model in the next stages as we observe that the codebook of low light is different from those of normal light (Figure 1 ). Hence, enforcing normal-light codebook priors to guide the deep models will help better enhancement.||sg[E(H)] -𝑧 q || 2 2 + 𝛽 ||sg[𝑧 q ] - E(H)||We note that applying the Gamma correction with different Gamma 𝛾 on image gradients leads to multi-luminance results. These multiluminance results contain different image details, as shown in Figure 2 . The details from the multi-luminance outputs by the Gamma correction are complementary, which can provide finer details to guide the deep models for better detail estimation.To this end, we propose a Multi-luminance Detail Compensation (MDC) (see Figure 3 ) under the guidance of the multi-luminance outputs by the Gamma correction to better estimate details. Specifically, given a low-light input L ∈ R 𝐻 ×𝑊 ×3 , MDC first receives the features from the encoder of VQGAN. Then the MDC utilizes the shuffle Transformer fusion, as shown in Figure 3 (a), to aggregate features of different levels in the encoder of VQGAN. And then, the aggregated features are input to the MDC decoder (MDC-Dec). To better exploit and explore useful features in the encoder of VQGAN, we propose a Deformable Transformer Interaction with Encoder (DTP-Enc) module to improve the feature representation of the MDC decoder. Finally, MDC outputs estimated multiple luminance details S ∈ R 𝐻 ×𝑊 ×3 and corresponding weight maps M ∈ R 𝐻 ×𝑊 ×1 :EQUATIONwhere F 𝐸 denotes the features from the encoder in the VQGAN.As ground truth maps are not available, we do not impose any constraint on the weight maps. We use the learned details with corresponding weight maps to adaptively compensate the output of VQGAN Ĥvqgan by:EQUATION)At this stage, parameters in the encoder of the VQGAN and the MDC are optimized by:EQUATIONL det = || Ŝ0.5 -S 0.5 || 1 + || Ŝ1 -S 1 || 1 + || Ŝ3 -S 3 || 1 .Ŝ𝛾 and S 𝛾 denote the estimated details and corresponding multi-luminance gradient by applying Gamma correction with 𝛾 on the gradient. The reconstructed loss L 𝑟𝑒𝑐 is based on 1 -SSIM( Ĥ, H) as it is effective as evidenced by [55] .L code = || ẑq -𝑧 q || 2 2, where 𝑧 q is the normal-light codebook features while ẑq is the reconstructed features.Shuffle Transformer Modulator. The Shuffle Transformer Modulator (STM) aims to modulate features with different levels in the encoder of VQGAN. STM first exploits shuffle down [80] operation to re-scale different sizes to the smallest spatial size of the encoder of the VQGAN. Then, the shuffled features are concatenated and learned via 1 × 1 convolution followed by a Transformer. By inserting Transformer, STM is capable of modeling the global representation of the encoder of VQGAN to provide more useful features for the decoder of MDC (MDC-Dec) and GCA (GCA-Dec) for better enhancement. Figure 3 To ensure the generated results with natural colors and better perceptual quality, we develop a simple yet effective Global Color Adjustment module (GCA), which is motivated by both low-light and normal-light images contain useful luminance and information that can help improve the colorfulness of results. Hence, we propose to build on spatially-varying representations between the estimated images in the GCA and low-light input ones to control the generated images for better perceptual quality and natural colors.The GCA has a similar structure to MDC except for the input of the GCA decoder (GCA-Dec) and final outputs. For the input of GCA-Dec, with well-learned restored features after training MDC, we propose to deformable indicator by representative light to exploit the features 𝑧 q to better guide the learning of the decoder of GCA. The GCA outputs exploitable adjustment image Y GCA ∈ R 𝐻 ×𝑊 ×3 and corresponding weight mapEQUATIONThe learned Y GCA and M GCA are linearly added to the results in (8) to facilitate adjusting the generated results:EQUATIONwhere Ĥvqgan can be served as the results of N content (L) in (2); M 0.5 • S 0.5 +M 1 •S 1 +M 3 •S 3 can be served as the results of N detail (L) in (2); 𝛼M GCA Y GCA + (1 -𝛼)M GCA L can be served as the results of N color (L) in (2) . 𝛼 ∈ [0, 1] is the global spatially-varying color adjustment factor to adjust the colors of enhanced results.At this stage, parameters in the decoder of the VQGAN and the GCA are optimized by:EQUATIONwhereL gca = 1 -SSIM(Y GCA , H).Deformable Indicator by Representative Light. We propose the Deformable Indicator with Representative Light (DIRL) to guide the learning of GCA as the codebook has been optimized and the encoder can produce more representative features of normal light from low-light inputs after the stage of training the encoder and MDC. Thus the encoder features matched with the codebook via (3) can better represent the latent light of normal light, which will help the GCA learn better. The DIRL is shown in Figure 3(c) .Triple Feature Transformation Module. To better exploit useful features in decoders of MDC and GCA to improve the feature representation of the decoder in VQGAN for better image restoration, we develop the Triple Feature Transformation Module (TriFTM). The TriFTM is motivated by [62] and can effectively fuse useful features from MDC (F MDC ) and GCA (F GCA ) to the decoder of VQGAN, as shown in Figure 3 While iter ≤ iter GCA max do: Generate exploitable adjustment images and correspond map via (10) Optimize GCA and Decoder via ( 11) iter = iter + 1 End while stage of training GCA, while the stages of training VQGAN and MDC use ResBlocks [11] in the decoder of VQGAN. 
experiments: 
 In this section, we compare our PercepLIE with 17 state-of-the-art (SOTA) approaches. Extensive analysis is also conducted to verify the effectiveness of our PercepLIE.Synthetic datasets. LOL dataset [66] is a widely used synthetic dataset with 485/15 training/testing samples. We use it to evaluate the enhancement performance on the synthetic scenes. Following [63] , we also use VE-LOL dataset [38] to examine the models' generalization on unseen scenes by using the model trained on LOL. VE-LOL contains two sub-datasets: VE-LOL-real and VE-LOL-synthetic, which respectively contain 400/100 and 900/100 training/testing samples. Such large data (a total of 1,500 pairs of images) is enough to verify the models' generalization. Real-world datasets. DICM [33] , LIME [10] , MEF [42] , and NPE [61] are widely used real-world datasets. We use them to evaluate the effectiveness of the proposed method.Stage 1 for VQGAN (Section 4.1): We train the VQGAN with 2,000K iterations, i.e., iter vqgan max =2,000K, on LOL normal-light samples [66] , where data augment (e.g., flip, randomly crop, and rotate) Table 1 : Comparisons with SOTAs on synthetic datasets. The main metrics NIQE, PI, and LPIPS, evaluating naturalness and perceptual quality, are presented. PSNR and SSIM are also provided for reference. The best results are marked in red. ↑ (↓) means higher (lower) is better. Adj. denotes whether the method is adjustable or not. Cross-dataset verification means the model trained on LOL is used to verify models' generalization in unknown scenes. All the metrics are ensured to be re-computed using the same codes for fair comparisons.(a) Comparisons with SOTA methods on the LOL [66] . We use Swin Transformer block [40] with depth 2 as our Transformer block. The patch size is 256 × 256 for all the experiments. All the experiments are optimized via ADAM [30] and trained on two NVIDIA 3090 GPUs based on PyTorch [45] . Algorithm 1 describes the training process of our PercepLIE.Table 1 summarises the comparison results with SOTA methods on LOL [66] and cross-dataset verification results on the VE-LOL [38] .Table 2 : Comparisons with recent SOTAs on real-world datasets in terms of NIQE and PI. PercepLIE (𝛼) means setting 𝛼 in (11) at inference. As our PercepLIE is adjustable, adjusting 𝛼 can generate results with different perceptual qualities. Note that the model with 𝛼 = 0 performs the best, which indicates that low-light images can provide useful content to improve results toward better colors and perceptual quality, further suggesting the superiority of our PercepLIE.Methods SwinIR [37] Zero-DCE++ [34] RUAS [39] Restormer [76] SCL [36] SNR [72] SCI [43] UNIE [25] LLFlow [63] (a) Input (b) RUAS [39] (c) SCL [36] (d) SNR [72] (e) SCI [43] (f) UNIE [25] (g) LLFlow [63] (h) PercepLIE Both Table 1 (a) and Table 1 (b) show that our PercepLIE achieves the best NIQE, PI, and LPIPS, the metrics of measuring naturalness and perceptual quality, indicating the proposed algorithm is a better LIE model and has the best generalization with better naturalness and perceptual quality to unknown scenes. Visual results in Figure 4 show that our PercepLIE is capable of restoring results with better naturalness and preserving finer details while existing approaches always either hand down extensive noise or produce under-enhanced results or lose image details.Table 2 reports the comparison results on real-world datasets in terms of average NIQE and PI. Notice although the default method with 𝛼 = 0.8 is not the best but is adjustable, we can adjust 𝛼 to generate satisfactory results. We note that the PercepLIE with 𝛼 = 0 reaches the best, which indicates that low-light images can provide useful content to improve results toward better naturalness and perceptual quality, further suggesting the superiority and flexibility of the PercepLIE. In Figure 5 , these visual examples illustrate that our PercepLIE always produces more natural and realistic quality with finer structures while existing algorithms always generate kinds of unsatisfactory results.Effectiveness of MDC and GCA. As MDC and GCA modules are our proposed main contributions, it is of great interest to analyze their effect. Effectiveness of deformable Transformer preceptor with encoder (DTP-Enc). DTP-Enc is used to help the decoder of MDC and DCA learn more useful features from the encoder of VQGAN for better enhancement. Table 4 shows that our DTF-Enc performs better when we disable the module (Table 4( 4 illustrates that our DIRL is effective for better image enhancement (Table 4 (b) vs. (d)).Effectiveness of triple feature transformation module (TriFTM).In Stage 3, the TriFTM is employed to ameliorate the decoder's representation capability in VQGAN. This is accomplished by acquiring relevant features from MDC-Dec and GCA-Dec decoders which will help improve the overall effectiveness of the decoder in the VQGAN. Table 4 shows that disabling the TriFTM decreases the enhancement performance (Table 4 (c) vs. (d)).As our PercepLIE uses the global spatially-varying color adjustment factor 𝛼 in GCA to adjust the restoration results for better perceptional quality and natural colors, it is necessary to examine its effectiveness and flexibility. Figure 8 shows the NIQE and PI results with different 𝛼. Note that it is difficult to find an 𝛼 that works best for NIQE, PI, and LPIPS simultaneously. We argue that our PercepLIE is flexible as we can dynamically adjust 𝛼 to generate visually-pleasing results according to different low-light inputs. to generate results with different colors and perceptual quality. By adjusting 𝛼, the PercepLIE is able to produce better results with better colors and naturalness according to different low-light inputs with different illumination. In Figure 7 , higher 𝛼 for the first example results in better performance, while lower 𝛼 generates superior results for the second example. The two examples clearly suggest that our PercepLIE is flexible and superior when handling different low-light inputs with different illuminations. 
conclusion: 
 We have presented a new path to perceptual LIE, called PercepLIE, by introducing the VQGAN with multi-luminance detail compensation (MDC) and global color adjustment (GCA). The VQGAN is used to explore the latent light representations of normal-light images to guide the deep models for better image enhancement. The MDC generates diverse details to facilitate accurate structural detail estimation, while the GCA is employed to ensure natural colors and better perceptual quality in the generated images. Experiments demonstrate that our PercepLIE outperforms existing techniques on synthetic and real-world datasets based on various perceptual quality metrics, including NIQE, PI, and LPIPS. 
 
 Appendix:  


Decision: All reviewers suggest to accept the paper.

Reviews: review: paper_summary: paper_summary: This paper proposes a new path to perceptual low-light Image enhancement, which explores the VQGAN to low-light image enhancement task. To better generate perceptual image quality, the authors propose Multi-luminance Detail Compensation (MDC) and Global Color Adjustment (GCA). The MDC module is used to facilitate better detail estimation while the GCA module is used to optimize the colors of low-light input images. The experiments on both synthetic and real-world datasets demonstrate that the proposed PercepLIE is able to produce better perceptual image quality in terms of perceptual quality metrics including NIQE, PI, and LPIPS.
strength_weakness: strength_weakness: 1, This paper is well-motivated. The observation that latent light features of the low-light images are quite different from those captured in normal light is meaningful and natural property of low-light images and normal-light images.

2, This paper is well-written and this paper is easy to follow. The writing is professional and the logic of this paper is easy to understand.

3, The experiments are adequate and the results are good.

4, This network design is interesting.
limitations: limitations: 1, How do the authors adjust the result? I am confused about how to control the results.

2, How do authors get the codebook of low-light images and normal-light images? 

3, Will the source codes be released?

4, The authors should conclude the limitations of this paper.
paper_summary: paper_summary: This paper proposes a perceptual low-light image enhancement algorithm. This algorithm observes an interesting and natural phenomenon that the latent light codebook representation of low-light images is quite different from those of images captured in normal light. Hence, enforcing normal-light codebook priors to guide the deep models will help better enhance. To that end, the authors present the VQGAN with Multi-luminance Detail Compensation (MDC) and Global Color Adjustment (GCA). By combining the VQGAN with MDC and GCA within a stage-wise training mechanism, our method generates images with finer details and natural colors and achieves favorable performance on both synthetic and real-world datasets in terms of perceptual quality metrics including NIQE, PI, and LPIPS.
strength_weakness: strength_weakness: 1, This paper is well written an easy to follow and the organization is clear.

2, The observed codebook prior in the low and normal light is interesting and meaningful, which is an inherent property for low-light image enhancement.

3, The results look better. Although current existing algorithms are driven by pursuing higher PSNR and SSIM, these solutions are usually not effective to handle cross-domain images, e.g., training on one synthetic dataset and then test on another synthetic testing date or training on synthetic dataset and then test on real images. The paper is effective on the above problems.

4, Perceptual quality obtained by this method is better and the method is better flexible.
limitations: limitations: 1, How the authors to adjust the controllable results? The authors should specify this more detailedly.

2, The network structure looks complicated. To eliminate the confusion of different modules, the authors should provide more explanation on each component.

3, How do the authors obtain the codebook priors? And how do the author utilize the priors? It seems to be not specific enough.
paper_summary: paper_summary: This paper proposes a perceptual low-light image enhancement by constructing a network to address (1) multiple gamma adjusted details and (2) global color adjustment. Two networks (MDC and GCA) are proposed to address the details part and the color parts based on the latent light representation (VQGAN). Experiments show the proposed method outperforms several other methods in several performance metrics.
strength_weakness: strength_weakness: This paper proposes to utilize the different revealed details via different level of gamma correction to improve the quality. The color is also addressed. The proposed framework works on the latent light representation, which is trained on low light database.
limitations: limitations: (1) This proposed result shows best performance in several considered performance metrics, but not all.  Those numbers are objective evaluation. It will be good to have real human subjects to evaluate the performance. From Figure 4, PerceptLIE seems having large color distortion on sky area comparing to GT.   Figure 5, the PerceptLIE seems color de-saturated with dark lift comparing to other methods. The effectiveness on human subjective testing remain unclear.
(2) How to select the set of gamma correction parameters? The paper shows using 0.5, 1.0, and 3.0.  Any particular reason/experiments to show these 3 are the best?  And for applying gamma correction process, does the algorithm needs to de-gramma back to linear domain, and apply gamma correction again, or just apply gamma correction on the existing picture?
(3) In table 3, the authors compare with and without VQ.  Please elaborate how to select n_z (feature dimension) so the performance can be optimized.