Memo-SQL: 학습이 필요 없는 NL2SQL을 위한 구조적 분해 및 경험 기반 자가 수정
Memo-SQL: Structured Decomposition and Experience-Driven Self-Correction for Training-Free NL2SQL
기존 NL2SQL 시스템은 두 가지 결정적인 한계에 직면해 있습니다. (1) 정답 예시만을 활용하는 인컨텍스트 러닝(in-context learning)에 의존함으로써, 보다 견고한 자가 수정을 유도할 수 있는 과거 오류-수정 쌍(error-fix pairs)의 풍부한 정보를 간과합니다. (2) 테스트 타임 스케일링(test-time scaling) 방식은 종종 질문을 임의로 분해하여 실행마다 거의 동일한 SQL 후보를 생성함으로써 앙상블 효과를 저하시킵니다. 또한 이러한 방법들은 정확도와 효율성 간의 극심한 트레이드오프 문제를 겪는데, 높은 성능을 위해서는 과도한 연산이 요구되고 빠른 모델은 품질이 저하됩니다. 이에 우리는 구조적 분해와 경험 인식 자가 수정이라는 두 가지 간단한 아이디어를 통해 이러한 문제를 해결하는, 별도의 학습이 필요 없는 프레임워크인 Memo-SQL을 제안합니다. 우리는 분해를 우연에 맡기는 대신 개체 단위(entity-wise), 계층적(hierarchical), 원자적 순차(atomic sequential)라는 세 가지 명확한 전략을 적용하여 다양한 추론을 유도합니다. 수정을 위해서는 성공한 쿼리와 과거의 오류-수정 쌍으로 구성된 동적 메모리를 구축하고, 검색 증강 프롬프팅(retrieval-augmented prompting)을 사용하여 추론 시점에 관련 예시를 컨텍스트로 불러옵니다. 이 과정에서 미세 조정(fine-tuning)이나 외부 API는 필요하지 않습니다. BIRD 벤치마크에서 Memo-SQL은 68.5%의 실행 정확도를 달성하여, 기존 TTS 접근법 대비 10배 이상 적은 자원을 사용하면서도 개방형 제로 파인 튜닝(zero-fine-tuning) 모델 중 최고 성능(SOTA)을 기록했습니다.
Existing NL2SQL systems face two critical limitations: (1) they rely on in-context learning with only correct examples, overlooking the rich signal in historical error-fix pairs that could guide more robust self-correction; and (2) test-time scaling approaches often decompose questions arbitrarily, producing near-identical SQL candidates across runs and diminishing ensemble gains. Moreover, these methods suffer from a stark accuracy-efficiency trade-off: high performance demands excessive computation, while fast variants compromise quality. We present Memo-SQL, a training-free framework that addresses these issues through two simple ideas: structured decomposition and experience-aware self-correction. Instead of leaving decomposition to chance, we apply three clear strategies, entity-wise, hierarchical, and atomic sequential, to encourage diverse reasoning. For correction, we build a dynamic memory of both successful queries and historical error-fix pairs, and use retrieval-augmented prompting to bring relevant examples into context at inference time, no fine-tuning or external APIs required. On BIRD, Memo-SQL achieves 68.5% execution accuracy, setting a new state of the art among open, zero-fine-tuning methods, while using over 10 times fewer resources than prior TTS approaches.
No Analysis Report Yet
This paper hasn't been analyzed by Gemini yet.
Log in to request an AI analysis.