Line patterning, in via first dual damascene approach, is conditioned by vias density: bottom anti–reflective coating (BARC), used to minimize thin film interference effects by reducing reflected light, and photoresist reflow into vias, leading to materials thickness variation, and so to unwanted modification of metal lines critical dimension (CD), due to local reflectivity change and to swing effect. Aim of the work is to assess CD variations to be expected at device level when applying via first integration scheme, in order to compensate them, where and when feasible, or to setup restrictions to vias density at design level, forbidding critical configurations that might lead to patterning failures. The paper presents an experimental characterization of metal line CD variation as a function of vias density based on the study of a test pattern, designed to explore a wide variety of vias and metals respective configurations, and investigates different approaches to model and predict CD deviations from expected targets. Vias densities, or their convolution with specific kernels, are extracted using conventional design rule check (DRC) tools, and are used as predictors to model metal lines CD variation behavior. Simple via density computation is not able to capture the effect, so we propose a flow, based on machine learning artificial neural network algorithms, able to predict metal line width variations to be expected on product devices as a function of the vias pattern underneath.