snowchan's picture
Upload dataset README
cbb8980 verified
|
Raw
History Blame Contribute Delete
11.6 kB

CORA preprocessing Test 500 - no, general, CORA specific

데이터셋 개요

이 데이터셋은 CORA test split에서 500개 target-audio row를 균형 샘플링한 text-only subset입니다. 각 row는 하나의 target audio item에 대응하며, CORA에서 제공하는 5개 query type을 같은 row 안에 유지합니다.

각 원본 query에는 두 가지 전처리 방식의 rewrite 결과가 함께 제공됩니다.

  • general: query type 정보를 사용하지 않는 일반적인 audio retrieval query rewriting
  • cora_aware: CORA query type 정보를 사용해 caption-style audio description으로 정규화하는 rewriting

이 데이터셋에는 audio file이 포함되어 있지 않습니다. CORA metadata, 원본 query text, LLM으로 생성한 rewritten query text만 포함합니다.

Rows: 500
Source dataset: msnowchanj/CORA
Source config: default
Source split: test
Sampling unit: target-audio row
Preprocessing methods: general, cora_aware
Model used for rewriting: openai/gpt-4.1

사용 목적

이 데이터셋은 text-to-audio retrieval 실험에서 query preprocessing 방식에 따른 성능 차이를 비교하기 위해 만들었습니다.

  • 원본 CORA query와 rewritten query를 비교할 수 있습니다.
  • general rewriting과 cora_aware canonicalization을 같은 target audio set에서 비교할 수 있습니다.
  • CORA query type별로 preprocessing 효과를 분석할 수 있습니다.

원천 데이터

원천 데이터셋은 Hugging Face의 msnowchanj/CORA입니다. 본 subset은 default configuration의 test split에서 샘플링했습니다.

CORA dataset card 기준 test split은 3,367 examples를 포함합니다. 이 데이터셋에서는 그중 dataset field가 아래 네 값 중 하나인 row만 사용했습니다.

audiocaps
clotho
mecat
macs

관련 출처는 다음과 같습니다.

  • CORA dataset: msnowchanj/CORA, Hugging Face Datasets
  • AudioCaps: Kim et al., "AudioCaps: Generating Captions for Audios in The Wild", NAACL 2019
  • Clotho: Drossos, Lipping, Virtanen, "Clotho: an Audio Captioning Dataset", ICASSP 2020 / arXiv:1910.09387
  • ME-CAT과 MACS는 CORA의 dataset field에 포함된 source dataset name으로 사용했습니다.

데이터 구성

네 source dataset에서 각각 125개 row를 샘플링했습니다.

Source dataset Rows
audiocaps 125
clotho 125
mecat 125
macs 125
Total 500

각 sampled row는 CORA의 5개 query type을 유지합니다.

Query type Original column Output suffix
KeyPhrase key_phrase key_phrase
Statement statement statement
Question question question
Command command command
Indirect indirect indirect

각 preprocessing method는 2,500개 query를 rewrite합니다.

500 rows * 5 query types = 2,500 rewrites

두 method를 모두 합치면 총 5,000개의 rewritten query가 생성됩니다.

데이터 필드

최종 파일은 원본 CORA field를 유지하고, preprocessing 결과 column 10개를 추가한 wide format입니다.

Column group Columns
Original CORA fields audio_id, dataset, key_phrase, statement, question, command, indirect, 기타 CORA metadata fields
general rewrite fields general_key_phrase, general_statement, general_question, general_command, general_indirect
cora_aware rewrite fields cora_key_phrase, cora_statement, cora_question, cora_command, cora_indirect

Rewrite column 이름은 아래 규칙을 따릅니다.

general_<output_suffix>
cora_<output_suffix>

예시는 다음과 같습니다.

general_statement
cora_question

샘플링 방법

샘플링 단위는 개별 query가 아니라 target-audio row입니다. 따라서 같은 target audio에 대응하는 5개 query type이 한 row 안에 함께 유지됩니다.

샘플링 설정은 다음과 같습니다.

selected_datasets:
  - audiocaps
  - clotho
  - mecat
  - macs
sample_size_per_dataset: 125
random_seed: 42

샘플링 후 다음 조건을 확인했습니다.

  • 최종 sample이 500개 row인지 확인
  • 각 selected source dataset이 125개 row씩 포함되는지 확인
  • audio_id가 비어 있지 않은지 확인
  • audio_id가 sample 안에서 중복되지 않는지 확인
  • 5개 원본 query column이 모두 비어 있지 않은지 확인

Query rewriting 방법

두 preprocessing method는 동일한 500개 row와 동일한 5개 query type에 적용했습니다.

Method 목적
general Query type 정보를 사용하지 않는 일반 audio retrieval query rewriting
cora_aware Query type 정보를 사용해 caption-style audio description으로 정규화

LLM 호출은 system message와 user message로 구성했습니다.

[
  {"role": "system", "content": "<method-specific system prompt>"},
  {"role": "user", "content": "<method-specific user prompt>"}
]

LLM 응답에는 다음 후처리를 적용했습니다.

  • Markdown code fence 제거
  • 응답이 JSON string 또는 JSON list인 경우 string 값 추출
  • 앞뒤 quotation mark 제거
  • 최종 string을 rewritten query로 저장

Method: general

general은 일반적인 audio retrieval query rewriting baseline입니다. CORA query type 정보를 LLM에 제공하지 않고, 원래 의도와 audible content를 유지하면서 retrieval에 더 명확한 query로 바꾸도록 지시합니다.

System Prompt

You are an expert at rewriting user queries for the audio retrieval process.

User Prompt

Rewrite the following audio search query to improve information retrieval, preserving the original intent and all audible content while improving clarity and adding only relevant acoustic context. Return only the rewritten query.

Input Query: {query}
Output:

Template Variables

Variable Meaning
{query} 현재 query type에 해당하는 원본 CORA query text

Output Columns

general_key_phrase
general_statement
general_question
general_command
general_indirect

Method: cora_aware

cora_aware는 CORA query type label을 LLM에 제공하고, 모든 query를 caption-style audio description으로 rewrite합니다.

Question, Command, Indirect 같은 query type에서는 질문 형식, 검색 지시문, 공손 표현, conversational wrapper를 제거합니다. 목표 형식은 audible content를 직접 설명하는 caption-style 문장입니다.

System Prompt

Instruction: You are an expert at rewriting user queries for the audio retrieval process.

Requirement: Given an audio search query and its query type, your task is to provide a rewritten caption-style query. Please refer to the query rewriting guidelines and examples.

<Query Types and Rewriting Guidelines>

<Question>: Convert a yes/no or interrogative query into a direct declarative description of the audible content. Remove expressions such as "Can you hear," "Does this audio contain," and "Is there a recording of."

<Command>: Convert a direct retrieval instruction into a description of the audible content. Remove imperative and retrieval-oriented expressions such as "Find," "Search for," "Locate," and "Retrieve."

<Indirect>: Convert a polite or softened retrieval request into a direct description of the audible content. Remove politeness markers, conversational wrappers, hedging, and indirect request expressions.

<KeyPhrase>: Preserve the compressed phrase structure while rewriting it as a concise and natural audio caption.

<Statement>: Preserve the directly described sound scene while removing redundant wording and making the description concise.

Example:

Input Query: Is there a recording of rain pattering on metal while thunder rumbles in the distance?
Action: <Question>
Output: ["Rain pattering on metal while thunder rumbles in the distance."]

Input Query: Search for a recording of glass breaking followed by people shouting.
Action: <Command>
Output: ["Glass breaking followed by people shouting."]

Input Query: Could you please locate an audio file featuring waves crashing against rocks?
Action: <Indirect>
Output: ["Waves crashing against rocks."]

Input Query: Birds chirping, light wind, distant traffic
Action: <KeyPhrase>
Output: ["Birds chirping with light wind and distant traffic."]

Input Query: A train passes while a warning bell rings.
Action: <Statement>
Output: ["A train passing while a warning bell rings."]

User Prompt

Input Query: {query}
Action: <{query_type}>
Output:

Template Variables

Variable Meaning
{query} 현재 query type에 해당하는 원본 CORA query text
{query_type} CORA query type name: KeyPhrase, Statement, Question, Command, Indirect 중 하나

Output Columns

cora_key_phrase
cora_statement
cora_question
cora_command
cora_indirect

LLM 설정

Rewrite에는 아래 설정을 사용했습니다.

provider: OpenRouter
model: openai/gpt-4.1
temperature: 0
max_tokens: 256
timeout_seconds: 90
max_retries: 5
retry_sleep_seconds: 5

temperature0으로 설정했지만, hosted LLM의 특성상 시간이 지나거나 provider/model 상태가 바뀌면 완전히 동일한 text가 재현된다고 보장할 수 없습니다.

검증

최종 row 수는 다음과 같습니다.

total rows: 500

audiocaps: 125
clotho: 125
mecat: 125
macs: 125

Rewrite 수는 다음과 같습니다.

general: 2,500 rewritten queries
cora_aware: 2,500 rewritten queries
total: 5,000 rewritten queries

각 method는 query type별로 500개 rewrite를 포함합니다.

KeyPhrase: 500
Statement: 500
Question: 500
Command: 500
Indirect: 500

Prompt provenance

본 데이터셋의 prompt와 method 설계는 아래 자료를 참고해 구성했습니다. 참고 논문의 prompt를 그대로 복사하지는 않았고, audio retrieval query rewriting 목적에 맞게 지시문과 예시를 재구성했습니다.

Ref. 자료 참고한 부분
[1] OpenReview submission: https://openreview.net/forum?id=tmpVrh40jX#discussion Appendix A의 baseline prompt 구성
[2] Ye et al., "Q-PRM: Adaptive Query Rewriting for Retrieval-Augmented Generation via Step-level Process Supervision", Findings of the Association for Computational Linguistics: EMNLP 2025. ACL Anthology PDF Appendix D.2, "Prompt for Few-Shot Method"의 query rewriting prompt 구성

Method별 반영 방식은 다음과 같습니다.

Method 논문 prompt에서 참고한 부분 본 데이터셋에서 새로 정의한 부분
general [1]의 baseline prompt 형식과 [2] Appendix D.2의 query rewriting prompt 구성 Audio retrieval query에 맞게 원본 의도와 audible content를 보존하고, retrieval에 더 명확한 query로 rewrite하도록 지시
cora_aware [2] Appendix D.2의 prompt 구성과 query rewriting 지침 형식 CORA의 5개 query type label(KeyPhrase, Statement, Question, Command, Indirect)을 명시적으로 사용하고, query type별 rewrite guideline과 few-shot examples를 정의

이 데이터셋은 CORA의 text metadata와 query column을 사용합니다. 새로운 audio annotation은 추가하지 않았습니다.