Overview
This paper introduces BERT-Joint, a hierarchical multi-task learning framework designed to handle "out-of-scope" (OOS) queries in dialog systems. By jointly modeling domain and intent classification and feeding domain-level representations into intent-level layers, the model significantly improves the detection of queries the system isn't trained to handle, outperforming state-of-the-art models like ToD-BERT.
The Challenge of Out-of-Scope Queries
In ideal dialog scenarios, users only submit queries that match a system's pre-defined intents. However, real-world users often provide "out-of-scope" (OOS) queries—questions that may be topically related to a domain (e.g., banking) but are not supported by a specific intent (e.g., asking about a credit card's color when the app only supports balance checks).
Traditional Natural Language Understanding (NLU) systems often struggle with these queries, frequently force-fitting them into the nearest supported intent. Existing solutions typically use two-stage pipelines or treat OOS as a simple additional category, often ignoring the rich semantic correlation between a broad domain and a specific intent.
The BERT-Joint Framework
The proposed BERT-Joint model addresses these limitations through a hierarchical architecture built on three main pillars:
- Shared BERT Encoder: A pre-trained BERT-base-uncased model generates base representations of user queries.
- Hierarchical Joint Modeling: Instead of treating tasks as independent, the model extracts a domain representation ($d$), which is then integrated with the original BERT output and fed into the intent encoder. This "information inheritance" mimics human cognition, identifying a general topic before pinpointing a specific goal.
- Joint Learning & Residual Connections: The model uses a joint loss function for domain and intent errors. Residual connections ensure that deeper intent layers retain the original query context.
To further refine performance, a threshold-based post-processing step is applied. If the model’s confidence in its top intent prediction falls below a probability threshold ($\tau$), the query is automatically flagged as OOS.
Experimental Evaluation
The researchers evaluated BERT-Joint using the OOS (CLINC150) dataset, which includes 150 in-scope intents across 10 domains. Testing was conducted across four variants: Full (standard large-scale), Small (few-shot), Imbalanced, and OOS+ (high OOS proportion).
Key Results
BERT-Joint established new benchmarks on the OOS dataset, demonstrating that intent classification benefits significantly from domain-level information.
As shown in the results table, BERT-Joint achieved an OOS $F_1$ score of 0.649 on the "Full" dataset, a substantial improvement over the standard BERT baseline (0.537) and ToD-BERT (0.436–0.463). With threshold-based post-processing, overall accuracy reached 0.920, and OOS recall jumped to 0.761. The model remained robust across all dataset variants, proving its effectiveness regardless of data distribution.
Conclusion
By leveraging a domain-to-intent hierarchy, BERT-Joint provides a more nuanced understanding of user queries. While the model still faces challenges with complex multi-sentence structures and deep semantic inference, its ability to share signals between domain and intent classification marks a significant step forward in robust OOS detection for dialog systems.
Summary updated