TL;DR
This paper introduces an open-source, LLM-powered system that tackles the complex linguistic reasoning of cryptic crosswords. It generates potential answers and their wordplay explanations, then translates this reasoning into executable Python code for rigorous, automated verification, achieving state-of-the-art results on a challenging benchmark.
What Problem Does This Paper Address?
Cryptic crosswords are a unique type of linguistic puzzle that requires both understanding a definition and deciphering intricate wordplay to arrive at the correct answer. This wordplay acts as a self-contained logical proof for the answer, independent of external context. While LLMs have shown promise in various reasoning tasks, applying them to the nuanced and often ambiguous nature of cryptic crosswords, and critically, verifying their reasoning process, remains a significant challenge. The authors aim to bridge this gap by developing a system that not only solves these puzzles but also provides a verifiable, code-based explanation of its reasoning.
Methods
The system employs a multi-stage pipeline:
- Candidate Answer Generation: A fine-tuned Gemma2 9B model generates multiple potential answers for a given clue, filtering them based on pattern matching and a word list.
- Definition and Wordplay Suggestion: Another fine-tuned Gemma2 9B model takes a candidate answer and generates plausible definitions and wordplay explanations.
- Python Formalisation: A Gemini-Flash LLM (later replaced by Gemma2-9B-it) is prompted to translate the proposed wordplay into executable Python code. This code uses a domain-specific language (DSL) with functions like
is_synonym,is_abbreviation, andaction_typeto represent the logical steps of the wordplay. - Proof Verification with Hinting: A Python verifier analyzes the generated code. If assertions fail, it provides specific error messages and hints to the formalising LLM, enabling an iterative refinement process. This cycle continues until the proof is validated or a maximum number of rewrites is reached.
Datasets
- Cryptonite: A large-scale dataset of cryptic crossword clues from The Times and The Telegraph, used for training and evaluation. The authors note that they sampled from the validation and test sets due to computational constraints.
- Wordplay Dataset: A dataset of annotated cryptic crossword solutions, extracted from enthusiast websites, used for training the wordplay suggestion model.
Key Insights and Ideas
- Code as a Verifier for Linguistic Reasoning: The core innovation is using executable Python code as a formal verifier for the complex, linguistic reasoning involved in cryptic crosswords. This moves beyond simple accuracy metrics to provide interpretable and verifiable solutions.
- LLM-to-Code for Interpretability: Translating the informal wordplay into formal Python code offers unprecedented interpretability, allowing detailed inspection of the automated reasoning process.
- Iterative Refinement with Hinting: The verifier's ability to provide constructive hints to the formalising LLM is crucial for improving the accuracy and robustness of the generated proofs, mimicking a self-debugging loop.
- Open-Licensed Models for State-of-the-Art Performance: The system demonstrates that fine-tuned open-licensed models (Gemma2) can achieve competitive, and in some cases state-of-the-art, performance on this challenging task, making advanced capabilities more accessible.
- Wordplay Generation is the Bottleneck: While formalization and verification are effective, the "aha" moment of creating novel and accurate wordplay remains the most challenging aspect for current models, with humans still outperforming them.
Key Results
- The system achieves state-of-the-art performance on the Cryptonite dataset, with the Gemini-Flash formalizer reaching a Top-1 exact-match accuracy of 32.5% on the test set.
- The fine-tuned Gemma2-9B FT model, when used throughout the pipeline, also shows strong performance, with Bayesian IRT results suggesting it has a high probability of outperforming GPT-40 on hard clues.
- The formalization process was successfully transferred from Gemini-Flash to the open-licensed Gemma2-9B-it model with minimal performance loss, enabling local execution.
- Ablation studies show that the formalization and verification steps are essential, and simply ranking candidates by log-probability is insufficient.
Limitations and Future Work
- Limitations:
- The Python verifier does not completely cover all potential "shortcuts" in the generated Python functions, such as functions consisting solely of comments or conditional execution that bypasses assertions.
- The formalizing LLM is used in-context, meaning it doesn't learn from its mistakes in a reinforcement learning setting, which could be a target for abuse if not carefully managed.
- Human solvers still outperform current models in generating creative and accurate wordplay.
- Future Work:
- The authors hope their work sparks further research in the cryptic crossword domain, which presents a rich area for exploring challenging reasoning problems.
- Expanding the verifier's capabilities to cover more edge cases in Python code analysis.
- Investigating methods to improve the LLM's ability to generate more creative and accurate wordplay.
Summary updated