Implementing a Logical Inference System for J apanese Comparatives (2025)

Abstract: Natural Language Inference (NLI) involving comparatives is challenging because it requires understanding quantities and comparative relations expressed by sentences. While some approaches leverage Large Language Models (LLMs), we focus on logic-based approaches grounded in compositional semantics, which are promising for robust handling of numerical and logical expressions. Previous studies along these lines have proposed logical inference systems for English comparatives. However, it has been pointed out that there are several morphological and semantic differences between Japanese and English comparatives. These differences make it difficult to apply such systems directly to Japanese comparatives. To address this gap, this study proposes ccg-jcomp, a logical inference system for Japanese comparatives based on compositional semantics. We evaluate the proposed system on a Japanese NLI dataset containing comparative expressions. We demonstrate the effectiveness of our system by comparing its accuracy with that of existing LLMs.

## introduction natural language inference (nli) @xcite is the task of determining the entailment relation between premise and hypothesis sentences. in particular, this paper focuses on inferences involving comparative expressions (e.g., heavier, where the comparative morpheme -er is attached). in (1), for example, the premise (1a) and (1b) entail the hypothesis (1c). inferences involving comparatives like (1) are challenging to an nli system because the system needs to correctly understand the meaning of the quantity expression "70 kg" and the comparative relation between john's and bob's weights. there are two main approaches to nli. one is a deep learning (dl)-based approach. large language models (llms), such as gpt-4o, foot_0 have been performing accurately in various tasks, including nli. however, recent works @xcite @xcite have pointed out that even such models have difficulties in handling problems involving logical connectives such as negation and quantification. this fact indicates that dl-based models still have room for improvement. the other approach to nli is a logic-based approach @xcite @xcite @xcite , in which mathematical logic is utilized to perform nli involving various logical expressions robustly. in particular, inference systems based on compositional semantics have achieved high performance on nli problems composed of lexical, syntactic, and semantic phenomena. as for comparatives, @xcite proposed a logical inference system for english comparatives based on combinatory categorial grammar @xcite and degree semantics @xcite ). however, we cannot apply the system directly to japanese comparatives because of morphological and semantic differences between japanese and english comparatives, which we will describe in detail in section 4. in this study, we aim to develop a logical inference system for japanese comparatives based on ccg and degree semantics. inspired by the logical inference system for english comparatives proposed by @xcite , our system, named ccg-jcomp, compositionally derives the semantic sentence semantic representation john is heavy. our contributions are as follows: ## degree semantics in our study, we adopt a theoretical framework called degree semantics, which allows us to analyze the meanings of gradable adjectives and comparatives formally. its basic idea is to treat a gradable adjective as a binary predicate that takes an entity and a degree as arguments. for instance, "john is d feet tall" can be represented as tall(john, d) (for simplicity, we omit units such as "feet"). we handle comparatives following the so-called a-not-a analysis @xcite ) in degree semantics. according to this analysis, (2a) can be represented as (2b), which means that there exists a degree d such that john's weight is more than or equal to d and bob's weight is not. ## system overview figure 1 shows the overview of ccg-jcomp, our proposed system. the overall system flow follows haruta et al. (2022): ccg syntactic parsing, tree conversion, semantic parsing, and theorem proving. in what follows, we describe the details of each category word type semantic template n p common noun λe n f.∃x. (n (e, x) ∧ f (x)) s\n p positive adjective λe q n. q(λi.i, λx.n (e, λd.d, λd.d, λt.t, x)) s\n p negative adjective λe q n.q(λi.i, λx.n (e, λd.d, λd.-d, λt.¬t, x)) (s/s)\n p yori λe q v.v (λa x.q(λi.i, λy.∃d.(a(x, d) ∧ ¬a(y, d)))) (s/s)\n p yori (measure phrase) λe q v.v (λa f x.q(λi.i, λy.∃d.(a(x, d) ∧ f (@xmath0 ## challenges in handling japanese comparatives in this section, we explain some linguistic phenomena specific to japanese comparatives and how we treat them in this study. ## conclusion in this study, we have proposed ccg-jcomp, a logical inference system for japanese comparatives based on ccg, degree semantics, and some analyses of phenomena unique to japanese comparatives. in our experiments with the japanese nli dataset that involves comparatives, we demonstrated that our proposed system achieved higher accuracy than several llms. in future work, we are considering handling the ambiguity of certain sentences and the behavior of the adjective-like verbs discussed in section 6.2. additionally, it would be desirable to address adverbial comparatives, which are not covered in jsem.