An accurate flatness measure to estimate the generalization performance of CNN models

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Taleghani, Rahman, Mohammadi, Maryam, Marchetti, Francesco
Format: Preprint
Published: 2026
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912957834723328
author Taleghani, Rahman
Mohammadi, Maryam
Marchetti, Francesco
author_facet Taleghani, Rahman
Mohammadi, Maryam
Marchetti, Francesco
contents Flatness measures based on the spectrum or the trace of the Hessian of the loss are widely used as proxies for the generalization ability of deep networks. However, most existing definitions are either tailored to fully connected architectures, relying on stochastic estimators of the Hessian trace, or ignore the specific geometric structure of modern Convolutional Neural Networks (CNNs). In this work, we develop a flatness measure that is both exact and architecturally faithful for a broad and practically relevant class of CNNs. We first derive a closed-form expression for the trace of the Hessian of the cross-entropy loss with respect to convolutional kernels in networks that use global average pooling followed by a linear classifier. Building on this result, we then specialize the notion of relative flatness to convolutional layers and obtain a parameterization-aware flatness measure that properly accounts for the scaling symmetries and filter interactions induced by convolution and pooling. Finally, we empirically investigate the proposed measure on families of CNNs trained on standard image-classification benchmarks. The results obtained suggest that the proposed measure can serve as a robust tool to assess and compare the generalization performance of CNN models, and to guide the design of architecture and training choices in practice.
format Preprint
id arxiv_https___arxiv_org_abs_2603_09016
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle An accurate flatness measure to estimate the generalization performance of CNN models
Taleghani, Rahman
Mohammadi, Maryam
Marchetti, Francesco
Machine Learning
Computer Vision and Pattern Recognition
Neural and Evolutionary Computing
68T07, 62M45, 65F30, 68T05, 49Q12
Flatness measures based on the spectrum or the trace of the Hessian of the loss are widely used as proxies for the generalization ability of deep networks. However, most existing definitions are either tailored to fully connected architectures, relying on stochastic estimators of the Hessian trace, or ignore the specific geometric structure of modern Convolutional Neural Networks (CNNs). In this work, we develop a flatness measure that is both exact and architecturally faithful for a broad and practically relevant class of CNNs. We first derive a closed-form expression for the trace of the Hessian of the cross-entropy loss with respect to convolutional kernels in networks that use global average pooling followed by a linear classifier. Building on this result, we then specialize the notion of relative flatness to convolutional layers and obtain a parameterization-aware flatness measure that properly accounts for the scaling symmetries and filter interactions induced by convolution and pooling. Finally, we empirically investigate the proposed measure on families of CNNs trained on standard image-classification benchmarks. The results obtained suggest that the proposed measure can serve as a robust tool to assess and compare the generalization performance of CNN models, and to guide the design of architecture and training choices in practice.
title An accurate flatness measure to estimate the generalization performance of CNN models
topic Machine Learning
Computer Vision and Pattern Recognition
Neural and Evolutionary Computing
68T07, 62M45, 65F30, 68T05, 49Q12
url https://arxiv.org/abs/2603.09016