用图形化方式组合复杂训练流程,让模型协作更直观。
DiagrammaticLearning: A Graphical Language for Compositional Training Regimes
- 用图形描述训练过程,自动转为可优化的损失函数
- 支持少样本多任务、知识蒸馏等经典场景的可视化建模
- 适合需要灵活组合训练策略的研究者和工程师
针对深度学习中多个相互作用但独立的模型组件,我们提出学习图(learning diagrams),一种将训练配置以图形化方式表示的方法,将参数化学习过程作为数据而非代码处理。每个学习图可编译为一个唯一的损失函数,用于训练各组件模型,训练结果是预测一致的模型集合。我们证明了少样本多任务学习、知识蒸馏和多模态学习等常见训练范式均可通过学习图表达。我们还实现了一个支持PyTorch和Flux.jl模型的库,使用户能通过图形组合构建复杂模型,识别工作流关系,并在训练中或训练后动态调整模型。基于范畴论框架,我们为学习图建立了严谨语义,使其操作具有坚实的数学基础。
原文摘要 · Abstract (English)
Motivated by deep learning regimes with multiple interacting yet distinct model components, we introduce learning diagrams, graphical depictions of training setups that capture parameterized learning as data rather than code. A learning diagram compiles to a unique loss function on which component models are trained. The result of training on this loss is a collection of models whose predictions ``agree" with one another. We show that a number of popular learning setups such as few-shot multi-task learning, knowledge distillation, and multi-modal learning can be depicted as learning diagrams. We further implement learning diagrams in a library that allows users to build diagrams of PyTorch and Flux.jl models. By implementing some classic machine learning use cases, we demonstrate how learning diagrams allow practitioners to build complicated models as compositions of smaller components, identify relationships between workflows, and manipulate models during or after training. Leveraging a category theoretic framework, we introduce a rigorous semantics for learning diagrams that puts such operations on a firm mathematical foundation.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。