目录 / 文档-技术白皮书 / 44-EFT.WP.Data.ModelCards v1.0
I. 章节目的与适用范围
的语义、类型、约束与落盘示例,提供可直接使用的 Schema 片段与校核要点;命名一律 snake_case,条文级引用采用“卷名 vX.Y:锚点”。 必填字段固化II. 字段总表(必填)
键名 | 类型 | 约束/正则 | 语义定义 | 交叉引用/锚点 |
|---|---|---|---|---|
model_id | string | ^[a-z0-9_\\-.]+$ | 模型唯一标识(对外发布与血缘引用的根键) | 导出组织见 DataSpec。 |
title | string | 长度 ≥ 3 | 人类可读标题 | — |
version | string | ^v\\d+\\.\\d+(\\.\\d+)?$ | 语义化版本(外部引用采用稳定线) | 引用规范 v0.1。 |
task | string | enum | 任务类型:`classification | retrieval |
io_schema | object | schema | I/O 模式(shape/dtype/约束/批处理/流式) | 与部署接口一致。 |
architecture | object | schema | 架构与参数(backbone/模块/参数量) | — |
training_data | object | schema | 训练数据引用与冻结切分映射 | 回指 DatasetCards。 |
preprocess | object | schema | 训练/推理前处理流水线与参数锁定 | 与计量校核一致。 |
optimization | object | schema | 目标函数、优化器与调度器 | — |
hyperparams | object | schema | 关键超参数与搜索口径 | — |
evaluation | object | schema | 评测协议与指标、显著性 | 冻结切分;见质量章。 |
calibration | object | schema | 概率校准方法与覆盖指标 | 计量/不确定度一致。 |
robustness | object | schema | 偏移/对抗扰动设置与鲁棒性报告 | — |
fairness | object | schema | 公平性维度与差异阈值 | — |
safety | object | schema | 使用限制、危害防控与安全审计 | 与合规对接。 |
deployment | object | schema | 部署形态/设备/并发与时延指标 | — |
resources | object | schema | 资源用量:M_param/FLOPs/T_inf/QPS/显存/功耗 | 单位由计量章统一。 |
export_manifest | object | schema | 导出清单,含 version、references[]、工件列表 | 机器可读引用。 |
III. 详细定义与示例
1) model_id
- 语义:跨版本稳定的主键,建议组织前缀(如 org.project.model)。
- 约束:^[a-z0-9_\\-.]+$;区分大小写:否。
- 示例:eift.vision.cls.resnet50。
- 引用:与导出结构绑定,见 DataSpec。
2) task
- 语义:模型面向的任务类型。
- 约束:枚举;与 evaluation.protocol、io_schema 一致。
- 示例:"classification"。
3) io_schema
- 语义:输入/输出数据契约。
- 结构:
- io_schema:
- inputs:
- - {name:"image", shape:"(H,W,3)", dtype:"uint8", range:"[0,255]"}
- outputs:
- - {name:"probs", shape:"(K,)", dtype:"float32", range:"[0,1]", semantics:"softmax"}
- batching: {mode:"static|dynamic", max_batch: 64}
- streaming: {enabled:false}
- 要求:与部署接口及评测脚本完全一致。
4) architecture
- 语义:核心网络/模块化结构与参数量。
- 结构:
- architecture:
- backbone: "resnet50"
- params: {M_param: 25.6, act: "relu", norm: "bn"}
- head: {type:"linear", out_dim: 1000}
5) training_data
- 语义:训练数据来源与冻结切分引用。
- 结构:
- training_data:
- refs:
- - "EFT.WP.Data.DatasetCards v1.0:Ch.11"
- - "EFT.WP.Data.DatasetCards v1.0:Ch.12"
- splits_ref: "eift.obs.demo@v1.0"
- contamination_policy: "forbid-cross-split"
- 要求:引用不复制;携带版本与锚点。
6) preprocess
- 语义:训练/推理前处理。
- 结构:
- preprocess:
- pipeline_id: "img-prep-v1"
- steps:
- - {name:"normalize", enabled:true, idempotent:true,
- params:{type:"zscore", stats_from:"train-only"}}
- parameter_lock: true
- 规则:统一单位与量纲;开启 parameter_lock。
7) optimization 与 hyperparams
- 语义:目标函数、优化器/调度器与关键超参。
- 结构:
- optimization:
- objective: {name:"cross_entropy"}
- optimizer: {name:"adamw", lr: 3.0e-4, weight_decay: 0.05}
- scheduler: {name:"cosine", warmup_steps: 500}
- hyperparams:
- batch_size: 256
- epochs: 200
- seed: 1701
8) evaluation
- 语义:评测协议、指标与显著性。
- 结构:
- evaluation:
- protocol:
- splits: "frozen"
- seeds: [0,1,2,3,4]
- repeats: 5
- significance: {test:"permutation", alpha:0.05}
- metrics: [{name:"f1_macro"}, {name:"roc_auc"}, {name:"ece"}, {name:"brier"}]
- 要求:冻结切分、显著性必备。
9) calibration
- 语义:概率校准方法与报告。
- 结构:
- calibration:
- method: "temperature"
- params: {t: 1.7}
- report: {ece: 0.018, brier: 0.072}
- 要求:与计量/不确定度条目一致。
10) robustness / fairness / safety
- 结构:
- robustness:
- shifts: ["snr_drop","time_jitter","spec_notch"]
- adversarial: {norm:"Linf", epsilon:0.01}
- thresholds: {drop_rel_max: 0.10}
- fairness:
- axes: ["class","region"]
- gap_metric: "abs_diff"
- threshold: 0.05
- safety:
- allowed_use: ["academic","benchmark"]
- prohibited_use: ["surveillance"]
- audits: ["redteam_v1"]
11) deployment 与 resources
- 结构:
- deployment:
- forms: ["rest","grpc"]
- devices: ["A100","CPU-AVX2"]
- latency_targets_ms: {p50: 5, p99: 20}
- concurrency: 512
- resources:
- M_param: 25.6 # M
- FLOPs: 4.1e9 # per inference
- T_inf: 3.8 # ms per sample
- vram_mb: 1024
- power_w: 210
- 要求:单位与量纲通过 check_dim。
12) export_manifest
- 语义:导出工件与引用清单(审计轨)。
- 结构:
- export_manifest:
- version: "v1.0"
- artifacts:
- - {path:"model_card.yaml", sha256:"…"}
- - {path:"eval/summary.csv", sha256:"…"}
- references:
- - "EFT.WP.Core.DataSpec v1.0:EXPORT"
- - "EFT.WP.Core.Metrology v1.0:check_dim"
- - "EFT.WP.Core.Equations v1.1:S20-1"
- 规则:version 与 references[] 为强制;禁止短码/别名。
IV. 与路径/到达时相关的必填登记(如适用)
- 若模型涉及路径依赖量(如 T_arr),在本章字段中至少落地:
- path_dependence:
- applies_to: ["T_arr"]
- delta_form: "const-factor" # 或 "general"
- path: "gamma(ell)"
- measure: "d ell"
- see:
- - "EFT.WP.Core.Equations v1.1:S20-1"
- - "EFT.WP.Core.Metrology v1.0:check_dim"
- 两种等价表达:
- T_arr = ( 1 / c_ref ) * ( ∫ n_eff d ell )
- T_arr = ( ∫ ( n_eff / c_ref ) d ell )
- 登记 delta_form、path、measure 并通过量纲校核。
V. 机器可读 Schema(节选,规范性)
# I15-1 Model Card Schema (required subset)
type: object
required:
[model_id,title,version,task,io_schema,architecture,training_data,
preprocess,optimization,hyperparams,evaluation,calibration,
robustness,fairness,safety,deployment,resources,export_manifest]
properties:
model_id: {type: string, pattern: "^[a-z0-9_\\-\\.]+$"}
title: {type: string, minLength: 3}
version: {type: string, pattern: "^v\\d+\\.\\d+(\\.\\d+)?$"}
task: {type: string}
io_schema:
type: object
required: [inputs,outputs]
properties:
inputs: {type: array}
outputs:{type: array}
batching:{type: object}
streaming:{type: object}
architecture: {type: object}
training_data:
type: object
required: [refs, splits_ref]
properties:
refs: {type: array, items: {type: string}}
splits_ref: {type: string}
preprocess: {type: object, required:[pipeline_id,steps]}
optimization: {type: object}
hyperparams: {type: object}
evaluation:
type: object
required: [protocol, metrics]
calibration: {type: object}
robustness: {type: object}
fairness: {type: object}
safety: {type: object}
deployment: {type: object}
resources:
type: object
properties:
M_param: {type: number}
FLOPs: {type: number}
T_inf: {type: number}
export_manifest:
type: object
required: [version, artifacts, references]
properties:
version: {type: string}
artifacts: {type: array, items: {type: object}}
references: {type: array, items: {type: string, pattern:"^[^:]+ v\\d+\\.\\d+:[A-Z].+$"}}
see:
- "EFT.WP.Core.DataSpec v1.0:EXPORT"
- "EFT.WP.Core.Metrology v1.0:check_dim"
- "EFT.WP.Core.Equations v1.1:S20-1"
(引用锚点/单位校核/禁混用符号按《全面清单 v0.1》与《引用规范 v0.1》执行。)
VI. 名称冲突与禁令(适用于本章所有字段)
并声明 gamma(ell)、d ell。必须加括号;含分式/积分/复合算符公式/符号/定义禁用中文;严格区分;n(数密度)与 n_eff(有效折射率)不可混用T_fil(张力)与 T_trans(透射系数)VII. 本章合规自检
- 表 II 所列全部必填键存在且通过类型/正则校验;保留名未被重定义。
- export_manifest 含 version 与 references[];references[]/see[] 采用 "卷名 vX.Y:锚点" 固定格式,不允许短码/别名。
- 涉及 T_arr 的条目已登记 delta_form、path、measure 并通过 check_dim。
- 数学表达满足反引号、括号与禁用中文规则;T_fil/T_trans 与 n/n_eff 不混用。
版权与许可(CC BY 4.0)
版权声明:除另有说明外,《能量丝理论》(含文本、图表、插图、符号与公式)的著作权由作者(“屠广林”先生)享有。
许可方式:本作品采用 Creative Commons 署名 4.0 国际许可协议(CC BY 4.0)进行许可;在注明作者与来源的前提下,允许为商业或非商业目的进行复制、转载、节选、改编与再分发。
署名格式(建议):作者:“屠广林”;作品:《能量丝理论》;来源:energyfilament.org;许可证:CC BY 4.0。
首次发布: 2025-11-11|当前版本:v5.1
协议链接:https://creativecommons.org/licenses/by/4.0/