Skip to content

research(mir): STFT vs CQT 구조 세그멘테이션 비열등성 검증 #1225

Description

@seonghobae

문제

#1223은 chroma_cqt → chroma_stft가 synthetic/mock 조건에서 빨라질 가능성만 보였고, 실제 디코딩 음원에서 구조 경계·기능 라벨·반복 그룹 품질이 보존되는지는 검증하지 않았습니다. BandScope의 structure analysis는 rehearsal buyer truth이므로 계산시간만으로 production representation을 바꾸지 않습니다.

검증 질문은 chroma_stft가 현재 chroma_cqt 대비 사전 정의된 구조 품질 비열등성 기준을 만족하면서 같은 실제 음원·runtime·execution host에서 재현 가능한 latency 개선을 제공하는가입니다.

Production acceptance

  • synthetic waveform이 아니라 rights-cleared real decoded music corpus를 사용하고 license/provenance/audio SHA-256/annotation SHA-256을 고정합니다.
  • 동일 admitted finite PCM과 exact runtime/host identity에서 baseline/candidate를 paired 측정합니다.
  • duplicate audio_sha256은 독립 관측치처럼 세지 않습니다.
  • schema v1에는 dropout/exclusion 허용치가 없으므로 실패 track은 PASS를 막습니다.
  • claim boundary, noninferiority margin, latency threshold, aggregation, paired uncertainty, resample count/seed는 candidate 결과를 보기 전에 고정합니다.
  • production switch는 complete registered experiment PASS 뒤 별도 PR에서 수행합니다.

구현 상태 — canonical Draft #1228

Current exact head는 7eb2b9d1f08254d7ce7300a6f9a5b72ea06b3977, base는 canonical formatter prerequisite #1176 branch bolt-performance-chart-export-13223013812255847379@8fe6b6d99c009527ef0bcba419e6f6debdb23c23입니다. #1228은 Open / Draft / mergeable이고 production structure extraction default는 여전히 chroma_feature="cqt"입니다. 이 lane은 #1176의 formatter blob을 ancestry/content로 소비하며 별도 formatter writer를 만들지 않습니다.

Functional-label ACC는 pinned MIREX-2025 reproduction b9fa0b0b32e2145af31f35830f78fc9d09a4301b::music_structure_analysis.eval_script.calculate_accuracy의 200 ms grid를 사용합니다. Segmentation metrics는 content-addressed mir_eval==0.8.2에 고정하고 detection 0.5/3.0 s (beta=1.0, trim=True), deviation (trim=True), pairwise grouping (frame_size=0.1, beta=1.0)을 유지합니다.

macro-track-v1 / paired-track-bootstrap-v1은 equal-track aggregation, harmonic F reconstruction, macro deviation/ACC/latency means, maximum peak RSS, paired resampling with replacement, numpy.random.Generator(PCG64), NumPy linear 0.025/0.975 percentile bounds를 유지합니다. isolated-single-shot-v1은 macOS/Windows에서 각 track·lane을 fresh subprocess로 20회 single-shot 측정하고 same-process warm-up은 0회이며 CQT→STFT / STFT→CQT 순서를 교대합니다. Latency는 time.perf_counter_ns(), peak RSS는 process-lifetime maximum을 사용합니다.

Canonical execution host / experiment runner

registration.runtime.host_profile은 설명용 free-form 문자열이 아니라 structure-performance-host-v1:<sha256> canonical execution prerequisite입니다. Payload에는 platform, OS release/version, architecture, hardware model, CPU model, logical CPU count만 포함하고 hostname/account/serial/MAC/IP/path는 제외합니다. 실제 captured profile hash가 registration과 다르면 corpus admission 전에 fail closed합니다.

Canonical runner는 registration validation → exact host gate → corpus admission → canonical CQT/STFT quality/performance consumer → admission/evidence identity cross-check → schema-v1 track receipts → canonical aggregation/bootstrap → result admission → atomic path-free execution envelope 순으로 기존 owner를 조합하며 MIR/admission/aggregation 로직을 복제하지 않습니다.

Hosted Ruff RED → current repair

#1176을 실제 prerequisite ancestry로 채택한 predecessor 715dc1a6250095352cb5a9b250ddd4271a4656af의 hosted repository evidence에서 build-baseline, Security Scan, Semgrep, SBOM은 SUCCESS였고 repository CI는 exact Ruff I001 한 건으로 FAILURE였습니다. 대상은 services/analysis-engine/tests/test_structure_functional_label_contract_policy.py의 import grouping이며 metric·threshold·corpus·runtime·production feature 문제가 아니었습니다.

Current causal repair **7eb2b9d1f08254d7ce7300a6f9a5b72ea06b3977**는 그 파일의 import pytest와 sibling test-module import 사이 blank line 하나만 제거합니다. Fresh compare from 715dc1a...는 one commit / one file / +0/-1; assertion, metric, threshold, corpus, runtime, dependency, production structure feature, ignore/noqa, scientific claim 변화가 없습니다.

Current 7eb2b9d...에는 fresh repository-owned workflow generation이 0건입니다. 따라서 predecessor terminal receipt는 RCA/semantic evidence일 뿐 current-head GREEN으로 전용하지 않습니다. Zero runs는 missing evidence입니다. #1176이 protected ancestry가 된 뒤 이 lane은 current protected develop에 ordinary/non-force reconciliation하고 fresh exact-head/base repository/security/SBOM/CodeQL/scientific evidence와 qualifying independent review를 다시 받아야 합니다.

아직 닫히지 않은 scientific decision

Implementation 측에서는 metric/runtime identity, timing/RSS producer, track/aggregate receipt binding, exact execution-host gate, canonical end-to-end run path가 닫혔습니다. Production acceptance 전에 candidate 결과를 보지 않은 상태에서 다음을 승인·동결해야 합니다.

  • rights-cleared real corpus membership과 대표성
  • production noninferiority margins와 maximum candidate latency ratio
  • 실제 bootstrap resample count와 random seed
  • 선택한 macOS/Windows structure-performance-host-v1 payload/content address와 population/runtime claim boundary
  • 해당 corpus 규모와 paired-inference plan의 충분성

Host content address는 CPU frequency/thermal state/power policy/scheduler contention/page-cache state를 완전히 고정한다고 주장하지 않습니다. 이런 host-wide variance는 scientific review와 claim boundary에 남습니다.

이 선택을 동결한 뒤 complete admitted corpus를 canonical runner로 한 번 실행합니다. 통과하더라도 production default 변경은 별도 PR입니다. Current exact head의 terminal protected checks, zero valid unresolved findings, qualifying independent non-author approval과 normal protected integration도 별도 merge gate입니다.

참고 기준

  • Raffel, C., McFee, B., Humphrey, E. J., Salamon, J., Nieto, O., Liang, D., & Ellis, D. P. W. (2014). mir_eval: A transparent implementation of common MIR metrics. ISMIR.
  • Hall, P. (1988). Theoretical comparison of bootstrap confidence intervals. The Annals of Statistics, 16(3), 927–953. https://doi.org/10.1214/aos/1176350933
  • MIREX 2025 Music Structure Analysis / ismir-mirex/mirex-evaluation@b9fa0b0b32e2145af31f35830f78fc9d09a4301b.
  • Python 3.14 time.perf_counter_ns(); NumPy quantile(method="linear").
  • Apple sysctl, getrusage(2); Microsoft processor registry guidance and PROCESS_MEMORY_COUNTERS.PeakWorkingSetSize.

Related: #1223, #1228

Activity

  1. seonghobae commented on Sep 17, 2026

    @seonghobae
    CollaboratorAuthor

    #1228 Signal-MIR owner update — exact head 2b1aa6c7e230818951804f53b9425330a1bd7c54, protected base develop@314ddeae7b775a4957594b599358c8255617eb2e, ahead 127 / behind 0, Draft / mergeable.

    Fresh authority review corrected the functional-ACC preregistration. The current official ismir-mirex/mirex-evaluation MIREX-2025 reproduction at b9fa0b0b32e2145af31f35830f78fc9d09a4301b uses calculate_accuracy(..., frame_hop=0.2) with np.arange(0, gt_duration, frame_hop) and t >= segment_end boundary advancement. The previous 100 ms BandScope contract was therefore not exact evaluator parity.

    Current lineage:

    • RED 6c20500bf31be88cd145f30fe7355a915066bdfc → GREEN 0f1e3e732154ff0ea94beb5a60e5702ed46c2453: exact upstream commit/function, 200 ms grid, frame_grid_contract_version=1.0.
    • Fixtures 86e6be0b41547ecd14b4f837ff6c88cf8f770b0b / 02c73b1fff55def189bed8fe2d34d4b5ee83cb0a consume the same closed-world contract.
    • ACC adapter RED 5cffef1a5db37b700ee7a27012c0f8324855665f → GREEN e72b29565a6d906a9955907656cbae97cffa471a; consolidation c84c0acdf25159f9aa066e21f9420d9fdf72c50a / fe3ed61a3b1926af6b39b6302d6f857979f9bccc reuses the parser-owned segment contract instead of duplicating it.
    • TRACEABILITY is current at f03a6cedd9f8ba00dd646485323be71d417361cf / 2b1aa6c7e230818951804f53b9425330a1bd7c54.

    The adapter is limited to preregistered normalized labels. Upstream raw-label normalization (solo→inst, unknown→other, etc.) is not executed after preregistration; any source mapping must happen before annotation hashing/admission.

    Remaining scientific gap: wire the parser + pinned ACC adapter into the exact admitted-track consumer with the other recognized structure metrics, then implement the reviewed preregistered aggregation/paired-uncertainty procedure and execute paired CQT/STFT on the same rights-cleared real PCM/runtime identity. Production sections/segmenter.py remains unchanged on chroma_cqt.

    Exact-head CI/security/native-build/SBOM/SAST runs are fresh and currently non-terminal; predecessor evidence is not counted as merge evidence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions