layer-wise style weighting, how it works
abstract
Neural Style Transfer (NST) synthesizes images by recombining structural content with artistic style using deep convolutional neural networks. In standard formulations, style loss is aggregated uniformly across multiple convolutional layers, limiting explicit control over spatial-scale contributions.
We propose a Layer-Wise Style Weighting (LWSW) framework that introduces independent coefficients for each selected VGG-19 feature layer. Because shallow layers encode fine textures while deeper layers capture higher-level abstractions, redistributing their contributions enables controllable transitions between texture-dominant and structure-dominant stylization.
example

content: Tübingen, Germany

style: The Starry Night, Van Gogh

output: stylized result
introduction
NST demonstrated that deep convolutional networks implicitly separate content and style representations. Content is preserved through high-level feature activations, while style is encoded through second-order feature correlations captured by Gram matrices.
In conventional NST, style loss is computed across multiple convolutional layers and combined using a single global coefficient. Convolutional neural networks are inherently hierarchical, with early layers capturing low-level textures and deeper layers encoding larger-scale abstractions.
Because receptive field sizes increase with depth, uniform aggregation of style losses restricts fine-grained control over spatial-scale stylization. LWSW introduces a layer-wise weighting mechanism to explicitly exploit this hierarchy and enable interpretable multi-scale stylization control.
VGG-19 style layers
methodology
Stylization is formulated as feature-space optimization over total loss:
Standard NST applies a single global scalar across all style layers:
This scalar aggregation treats all convolutional depths equally, preventing selective emphasis on texture vs. structure.
LWSW replaces this with per-layer coefficients, enabling independent control of each spatial scale:
The weights α_l are normalized before the optimization run so that their relative ratios determine emphasis, independent of absolute magnitude.
stylization profiles
fine-grain
Shallow layers dominate. Emphasises fine brush strokes, grain, and surface texture. Content structure remains legible.
balanced
Uniform weighting across all layers. Style influence is spread evenly, the default starting point.
abstract
Deep layers dominate. Emphasises large-scale compositional structure and colour fields. Local texture is subdued.
how to use
Upload images
Drag or click to upload a content image (the photo whose structure you want to keep) and a style image (the artwork whose texture you want to apply).
Set layer weights
Adjust the five LWSW sliders. Each controls how much a VGG-19 layer contributes to the style loss. Higher weight on relu1_1 gives fine texture; higher weight on relu5_1 gives abstract structure.
Tune optimization
Iterations controls how long the optimizer runs. More steps generally improve quality. Style weight controls the overall strength of the style relative to content.
Run
Click run style transfer. The server processes the request synchronously using LBFGS optimization. When complete, the output appears alongside the inputs. Download the result as PNG.
evaluation metrics
LPIPS
Learned Perceptual Image Patch Similarity. Measures perceptual distance between the stylized output and the content image using deep features. Lower = more content-faithful.
SSIM
Structural Similarity Index. Captures luminance, contrast, and structural similarity. Used to evaluate how well content structure is preserved under stylization.
paper
Layer-Wise Weighting for Granular Control in Neural Artistic Stylization
CMPUT 414
references