We lifted 2 functions out of this paper's own repositories and ran 2 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.
| Repository | Role | Ran |
|---|---|---|
| chrishokamp/constrained_decoding | canonical | 2 of 2 |
| Function | Status | Where it lives |
|---|---|---|
| decode | Ran | chrishokamp/constrained_decoding/scripts/translate_nematus.py code served (permissive licence) · get_code("738876f89983e8fc") |
| load_config | Ran | chrishokamp/constrained_decoding/scripts/translate_nematus.py code served (permissive licence) · get_code("c686d28ba44f9fcd") |
Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.
We present Grid Beam Search (GBS), an algorithm which extends beam search to allow the inclusion of pre-specified lexical constraints. The algorithm can be used with any model that generates a sequence $ \mathbf{\hat{y}} = \{y_{0}\ldots y_{T}\} $, by maximizing $ p(\mathbf{y} | \mathbf{x}) = \prod\limits_{t}p(y_{t} | \mathbf{x}; \{y_{0} \ldots y_{t-1}\}) $. Lexical constraints take the form of phrases or words that must be present in the output sequence. This is a very general way to incorporate additional knowledge into a model's output without requiring any modification of the model parameters or training data. We demonstrate the feasibility and flexibility of Lexically Constrained Decoding by conducting experiments on Neural Interactive-Predictive Translation, as well as Domain Adaptation for Neural Machine Translation. Experiments show that GBS can provide large improvements in translation quality in interactive scenarios, and that, even without any user input, GBS can be used to achieve significant gains in performance in domain adaptation scenarios.
The same record, over MCP at https://syntology.ai/mcp:
get_harvested_code_for_paper("1704.07138")
get_code_for_paper("1704.07138")
have("1704.07138")
Connect an agent — have() is free.