← All papers
First page of Executable Boundary Contracts for Sound Event Traces

Executable Boundary Contracts for Sound Event Traces

Faruk Alpay, Hamdi Alakkad

cs.LO May 19, 2026 · v1
A Lean 4 development machine-checks the finite frame core of the trace contract: obligation counting, neighborhood-witness monotonicity, and the Boolean implication evaluator.
Sound event reports often compress timed boundary behavior into frame, segment, or event scores. This paper defines executable boundary contracts for finite sound event traces. The frame fragment is a bounded Boolean fragment embeddable in STL after grid projection. The event layer adds declared interval matching, duration clauses, fragmentation clauses, and obligation restricted vector scoring. The aim is measurement, not a new general temporal logic and not a challenge leaderboard. The artifact evaluates controlled Mini LibriSpeech seeded scenes, MAESTRO Real soundscapes, frozen pretrained timing probes, and an official DCASE 2024 Task 4 baseline track. Across these tracks, standard scores and contract coordinates disagree in interpretable ways. The strongest real corpus finding is that union activity can hide typed boundary failure, while external DCASE outputs provide a class indexed challenge level reference. Code, generated tables, manifests, and Lean checks for the finite frame core are supplied as ancillary material.

Sound event detection benchmarks compress timed boundary behavior into scalar scores (frame F1, segment F1, event F1) that hide interpretable boundary failures. Union activity scores can mask typed boundary errors, and no existing specification language makes trace obligations executable and auditable.

The paper defines executable boundary contracts for finite sound event traces with two sorts: a frame sort (bounded Boolean fragment embeddable in STL after grid projection) and an event sort (declared interval matching, duration clauses, fragmentation clauses, obligation-restricted vector scoring). The monitor evaluates contracts and returns a typed vector of coordinates rather than a single scalar. Lean 4 is used to check the finite frame core logic. The system is evaluated on controlled Mini LibriSpeech scenes, MAESTRO Real soundscapes, frozen pretrained timing probes, and an official DCASE 2024 Task 4 baseline.

Standard scores and contract coordinates disagree in interpretable ways across all evaluation tracks. The strongest finding is that union activity can hide typed boundary failure. The contract-augmented detector (contract_tcn_aug) achieves 0.889 Frame F1 and 0.829 Boundary F1 versus 0.656 and 0.408 for the best non-contract baseline (dilated_cnn).

DetectorFrame F1Segment F1Event F1Boundary F1Logic
adaptive_energy0.5040.5680.2320.3100.514
spectral_flux0.6140.7390.2250.3580.560
temporal_cnn0.6070.7600.2940.3740.487
dilated_cnn0.6560.7890.3670.4080.522
contract_tcn_aug0.8890.9270.7050.8290.802
Detector performance comparison