Poor generalization performance caused by distribution shifts in unseen domains often hinders the trustworthy deployment of deep neural networks. Many domain generalization techniques address this problem by adding a domain invariant regularization loss terms during training. However, there is a lack of modular software that allows users to combine the advantages of different methods with minimal effort for reproducibility. DomainLab is a modular Python package for training user specified neural networks with composable regularization loss terms. Its decoupled design allows the separation of neural networks from regularization loss construction. Hierarchical combinations of neural networks, different domain generalization methods, and associated hyperparameters, can all be specified together with other experimental setup in a single configuration file. Hierarchical combinations of neural networks, different domain generalization methods, and associated hyperparameters, can all be specified together with other experimental setup in a single configuration file. In addition, DomainLab offers powerful benchmarking functionality to evaluate the generalization performance of neural networks in out-of-distribution data. The package supports running the specified benchmark on an HPC cluster or on a standalone machine. The package is well tested with over 95 percent coverage and well documented. From the user perspective, it is closed to modification but open to extension. The package is under the MIT license, and its source code, tutorial and documentation can be found at https://github.com/marrlab/DomainLab.
翻译:由于未见领域中分布偏移导致的泛化性能下降,往往阻碍深度神经网络的可信部署。许多领域泛化技术通过在训练过程中添加域不变正则化损失项来解决这一问题。然而,目前缺乏能够使用户以最小工作量组合不同方法优势以实现可复现性的模块化软件。DomainLab是一个模块化Python包,支持训练用户指定的神经网络,并具有可组合的正则化损失项。其解耦设计允许将神经网络与正则化损失构建分离。神经网络的分层组合、不同领域泛化方法及相关超参数,均可与其他实验设置一同在单个配置文件中指定。此外,DomainLab提供强大的基准测试功能,用于评估神经网络在分布外数据上的泛化性能。该包支持在HPC集群或单机上运行指定基准测试。代码测试覆盖率超过95%,并配有完善文档。从用户角度而言,该包对修改封闭但对扩展开放。此包采用MIT许可证,其源代码、教程和文档可于https://github.com/marrlab/DomainLab获取。