feat(eval): add audio classification evaluation and refresh Gustking deepfake recipes - #1390
ssss141414 wants to merge 2 commits into
Conversation
|
APPROVE No blocking findings. Reviewed exact candidate Fresh evidence and independent reruns agree: L0 is Analyze is valid partial success with expected exit 1: FP32 Commit topology is genuinely separable: PR #1390 is OPEN draft by Exact-head GitHub checks:
Coverage is full: verified Disposition: terminal skill-level APPROVE. Keep the PR draft. This is an ordinary conversation comment, not a GitHub Review state. |
Summary
This L2 contribution adds generalized
audio-classificationEval support and refreshes the existing FP32 and FP16 CPU recipes forGustking/wav2vec2-large-xlsr-deepfake-audio-classification. It enables bounded, semantically checked real-versus-fake audio evaluation while preserving exact recipe tuple identities. Candidatec76c0eff5c99dd9fddfbd550e19dd91d3776a058reached Goal L3 PASS with full coverage and no deferred tuples; the shipped Outcome remains L2.Model metadata
What the model does
This checkpoint accepts speech waveforms and emits two sequence-classification logits interpreted as real human speech or fake/synthetic speech for deepfake-audio detection. Evidence: the pinned config declares
Wav2Vec2ForSequenceClassificationandid2label={0: real, 1: fake}; the pinned model card states deepfake audio classification and reports ASVspoof2019 evaluation; and the graph isinput_values[1,16000] -> logits[1,2]. Confidence:verified.Primary user stories
verified.Supported tasks
audio-classificationacross checkpoint, Transformers, and WinML support surfaces. Evidence: Hubpipeline_tag=audio-classification, TransformersAutoModelForAudioClassification, and WinML inspect resolvingaudio-classificationwithWav2Vec2OnnxConfig. Confidence:verified.Model architecture
Gustking/wav2vec2-large-xlsr-deepfake-audio-classification@f7050b586236dc910d1157f430def2d0647b02b4, pinned config dimensions, TransformersWav2Vec2ForSequenceClassificationsource, and hierarchy metadata (409 modules, 315,701,634 parameters, 118 traced modules);verified.Validation and support evidence
Baseline
mainatbe3e59dd412d4918c5a852aa4d8f0207c34aaf6f, WinML0.0.1.dev0. Main advanced from8d631f6f1e5db26a04e8c13045280408c6f984dc; Planner issued a fail-closed PARTIAL-RERUN becausesrc/winml/modelkit/__init__.pychanged ONNX Runtime initialization and its paired test was deleted.Wav2Vec2ForSequenceClassification, 315.7M parameters, with FLOATinput_values[1,16000] -> logits[1,2]; perf mean 139.492 ms, p50 134.010 ms, throughput 7.17 samples/s, total RSS delta 91.05 MB; and pinned-PyTorch parity cosine 0.9999999985074244, maximum absolute error 0.000011314637959003448, top-1 match. These baseline measurements remain explicitly bound to the prior main evidence commit and are not presented as current-candidate results.audio-classification,AutoModelForAudioClassification, andtransformers_attention=eager. Optimum 2 had no vendor Wav2Vec2 registrations until WinML registration; verdictWINML-ONLY.audio-classificationwas absent from WinML Eval. Baseline Analyze was CLI-BLOCKED because runtime rule Parquets were absent; an independent graph census found 873 nodes / 14 op types, dominated by Add=227, MatMul=194, Transpose=111, Reshape=96, and Mul=88.c76c0eff5c99dd9fddfbd550e19dd91d3776a058; no superseded-candidate measurement is used below.Goal
Outcome
c76c0eff5c99dd9fddfbd550e19dd91d3776a058; treec2beedf4dee41579cd4323f43934be761daca897; basebe3e59dd412d4918c5a852aa4d8f0207c34aaf6f.bf781055f334676ba8dc6af6981347d48b866792; target-only recipe refresh and recipe regression coverage are isolated inc76c0eff5c99dd9fddfbd550e19dd91d3776a058.wav2vec2-027..030capture artifact/architecture facts, CPU precision tradeoffs, exact bounded real/fake semantics, and static Analyze interpretation. They are published separately in Lane A draft PR Save op columns to json files. #312 at head8d010b1dbc646b41aabf006a57b15b231bbba32a.bf781055owns shared evaluator support, whilec76c0effowns only the Model14 recipes and recipe regression. If either PR merges before shipment or review, stop; Planner must rebase and compare the merged implementation, drop or reconcilebf781055, retain/rebase the target-only commit only when still needed, and route every impacted stage back to Tester before this body may be used.Per-EP/device/precision results and Functional smoke Eval
L0 artifact and graph signatures
input_valuesFLOAT[1,16000]; outputlogitsFLOAT[1,2]; CPUExecutionProvider output[1,2]was finite.input_valuesFLOAT[1,16000]andlogitsFLOAT[1,2]; CPUExecutionProvider output[1,2]was finite.L1 memory details
L2 numeric parity
[0.008207489736378193, -0.007818397134542465]; ONNX logits[0.008219093084335327, -0.007830348797142506]; reference and ONNX class 0 (real). Bounds: cosine >= 0.99999, maximum absolute error <= 0.001, predicted-class match required. Provider: CPUExecutionProvider; inputinput_values[1,16000]tensor(float).[0.008207489736378193, -0.007818397134542465]; ONNX logits[0.010719520039856434, -0.010408125817775726]; reference and ONNX class 0 (real). Bounds: cosine >= 0.999, maximum absolute error <= 0.02, predicted-class match required. Provider: CPUExecutionProvider; inputinput_values[1,16000]tensor(float).Functional smoke Eval
FP32 CPU Eval PASS on candidate
c76c0eff5c99dd9fddfbd550e19dd91d3776a058using public, ungated CC-BY-4.0 datasetgarystafford/deepfake-audio-detection@fcf5344bb7f82b54b6b932291326d29750ef1e82, configdefault, splittrain, with deterministic first usable row per ClassLabel. Dataset and checkpoint labels matched exactly as raw scalar/ClassLabel IDs:0=real,1=fake; media came from embedded FLAC bytes/path and was decoded with SoundFile rather than inferred from filenames.The selected real row was
yt_0000_p2_part_167.flac: 477,353 bytes, 44,100 Hz, stereo, 230,951 frames, 5.236984126984127 seconds. The selected fake row wasel_0001_c_part_002.flac: 131,470 bytes, 16,000 Hz, mono, 57,792 frames, 3.612 seconds.Accounting was exact: scan 934, eligible 1,866, selected 2, processed 2, inference windows 4, truncated 2, rejected 0. Each utterance was converted to mono, resampled to 16,000 Hz, normalized through the feature extractor, capped at 2 seconds / 32,000 samples, split into at most two 16,000-sample windows, and reduced once per utterance by arithmetic mean of window logits; total inference was capped at 4 windows. Targets and predictions were
real -> realonce andfake -> fakeonce. Accuracy was 1.0 and macro-F1 was 1.0, with 2/2 represented classes and class coverage 1.0.This is functional-smoke evidence of end-to-end operability only. Two selected utterances are not representative accuracy or benchmark-quality evidence, and no Eval accuracy claim is made for FP16 or another EP.
Quality gates
not e2e and not npu and not gpu.Success: no issues found in 442 source files; both also noted unused pyproject sections foronnxruntime_genai.*,openvino.*,tests, andtests.*.Delta
Recipe refresh
Both existing exact-tuple recipe files change only JSON pointer
/export/compatibility/transformers_attentionfromnullto"eager":examples/recipes/Gustking_wav2vec2-large-xlsr-deepfake-audio-classification/cpu/cpu/audio-classification_fp16_config.json.examples/recipes/Gustking_wav2vec2-large-xlsr-deepfake-audio-classification/cpu/cpu/audio-classification_fp32_config.json.The delta is reducibility-consistent with the charter. Recipe authority was verified without recipe-owned CLI overrides. The production
examples/recipes/README.mdremains untouched.Complete changed paths
Droppable shared evaluator commit
bf781055f334676ba8dc6af6981347d48b866792:src/winml/modelkit/commands/eval.pysrc/winml/modelkit/eval/__init__.pysrc/winml/modelkit/eval/audio_classification_evaluator.pysrc/winml/modelkit/eval/config.pysrc/winml/modelkit/eval/evaluate.pysrc/winml/modelkit/utils/eval_utils.pytests/unit/eval/test_audio_classification_evaluator.pyTarget-only commit
c76c0eff5c99dd9fddfbd550e19dd91d3776a058:examples/recipes/Gustking_wav2vec2-large-xlsr-deepfake-audio-classification/cpu/cpu/audio-classification_fp16_config.jsonexamples/recipes/Gustking_wav2vec2-large-xlsr-deepfake-audio-classification/cpu/cpu/audio-classification_fp32_config.jsontests/unit/recipes/test_cpu_recipes.pyNo other-model recipe, recipe README, or checkpoint-hardcoded behavior is included.
Bug fix explanation
winml eval --task audio-classificationfailed before dataset loading because the task was absent from the Eval registry; an explicit audio dataset and a standard single-logits audio classifier were sufficient to trigger the missing path.WinMLAudioClassificationEvaluator,_AudioModelAdapter,DatasetConfig.max_duration_seconds,_EVALUATOR_REGISTRY, andTASK_SCHEMASadd raw bytes/path decoding, mono conversion, rational resampling, feature-extractor normalization, bounded static windows, utterance-mean logits, exact scalar/ClassLabel mapping, predictions, accuracy/macro-F1, errors, and accounting.task=audio-classification, one static audio input, and one rank-2[batch,classes]logits output. Dataset/checkpoint label namespaces must match exactly. No checkpoint ID, filename, model-specific recipe, or positional-label inference controls evaluator behavior.Analyze summary - component level and op level
Analyze completed with
ANALYZE-PARTIAL-SUCCESSand exit code 1 for each artifact because four requested EPs had no shipped rule data. This is static rule compatibility analysis, not accelerator runtime execution.Component-level summary
graph_input_cast0)Mapping confidence is
mapped. FP16 has 749 graph operators but 748 mapped component nodes: its classifier region includes one Cast, while the separate graph-input Cast remains unmapped. That gap is retained rather than promoted to full component coverage.Op-level summary
The complete FP32 inventory is Unsqueeze 1, Conv 8, Transpose 111, LayerNormalization 57, Gelu 32, Reshape 244, Gemm 147, Slice 1, Add 49, MatMul 48, Mul 24, Softmax 24, and ReduceMean 1. FP16 adds Cast 2.
CUDAExecutionProvider, MIGraphXExecutionProvider, TensorrtExecutionProvider, and DmlExecutionProvider have no check results because no rule data is shipped for them. These are absent-rule results, not unsupported operators, and they provide no runtime-support claim.
Reproduce commands