SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2009.08128 · EMNLP Findings · 2020

Multi 2 OIE: Multilingual Open Information Extraction Based on Multi-Head Attention with BERT

Youngbin Ro, Yukyung Lee, Pilsung Kang

arXiv · PDF · Open in the Atlas

Code that ran

6 of 7 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (2 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 4 failures of our instrument; 1 no recorded run), measured 2026-11-22; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2009.08128.json · badge: /api/ran/2009.08128.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
youngbin-ro/Multi2OIE community
Papers with Code archive
6 ran · 1 no recorded run
FunctionStatusWhere it lives
ArgExtractorLayer Ran
ran on a synthesized input · constructed an object; no result was computed
youngbin-ro/Multi2OIE/model.py
code served (permissive licence) · get_code("19d102227a9593b8")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, ArgExtractorLayer: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Create sample tensors with distinct dimensions
# batch_size=2, seq_len=3, d_model=4
batch_size = 2
seq_len = 3
d_model = 4
d_feedforward = 8
n_heads = 2
dropout = 0.1

# Target tensor: (seq_len, batch_size, d_model)
target = torch.randn(seq_len, batch_size, d_model)

# Source tensor: (seq_len, batch_size, d_model)
source = torch.randn(seq_len, batch_size, d_model)

# Key mask tensor: (batch_size, seq_len)
# True values are masked (ignored)
key_mask = torch.zeros(batch_size, seq_len, dtype=torch.bool)
key_mask[0, 2] = True  # Mask last token of first batch

ARGS = {
    'd_model': d_model,
    'n_heads': n_heads,
    'd_feedforward': d_feedforward,
    'dropout': dropout,
    'activation': 'relu'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArgExtractorLayer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ArgExtractorLayer output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
ArgModule Ran
ran on a synthesized input · constructed an object; no result was computed
youngbin-ro/Multi2OIE/model.py
code served (permissive licence) · get_code("a33040d181118428")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, ArgModule: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import copy
from torch.nn.modules.container import ModuleList

torch.manual_seed(0)

def _get_clones(module, n):
    return ModuleList([copy.deepcopy(module) for _ in range(n)])

class ArgExtractorLayer(nn.Module):
    """Minimal ArgExtractorLayer that satisfies the forward call signature."""
    def __init__(self, d_model=4):
        super(ArgExtractorLayer, self).__init__()
        self.d_model = d_model
        self.linear = nn.Linear(d_model, d_model)
    
    def forward(self, target, source, key_mask=None):
        """
        Minimal implementation that takes target, source, and optional key_mask.
        
        :param target: tensor of shape (L, B, D)
        :param source: tensor of shape (L, B, D)
        :param key_mask: optional mask of shape (B, L)
        :return: output tensor of shape (L, B, D)
        """
        # Simple pass-through with linear transformation
        output = self.linear(target)
        return output

class ArgModule(nn.Module):

    def __init__(self, arg_layer, n_layers):
        """
        Module for extracting arguments based on given encoder output and predicates.
        It uses ArgExtractorLayer as a base block and repeat the block N('n_layers') times

        :param arg_layer: an instance of the ArgExtractorLayer() class (required)
        :param n_layers: the number of sub-layers in the ArgModule (required).
        """
        super(ArgModule, self).__init__()
        self.layers = _get_clones(arg_layer, n_layers)
        self.n_layers = n_layers

    def forward(self, encoded, predicate, pred_mask=None):
        """
        :param encoded: output from sentence encoder with the shape of (L, B, D),
            where L is the sequence length, B is the batch size, D is the embedding dimension
        :param predicate: output from predicate module with the shape of (L, B, D)
        :param pred_mask: mask that prevents attention to tokens which are not predicates
            with the shape of (B, L)
        :return: tensor like Transformer Decoder Layer Output
        """
        output = encoded
        for layer_idx in range(self.n_layers):
            output = self.layers[layer_idx](target=output, source=predicate, key_mask=pred_mask)
        return output

# Create setup arguments
d_model = 4
seq_length = 5
batch_size = 2
n_layers = 3

# Create base ArgExtractorLayer
arg_layer = ArgExtractorLayer(d_model=d_model)

# Create tensors for testing
encoded = torch.randn(seq_length, batch_size, d_model)
predicate = torch.randn(seq_length, batch_size, d_model)
pred_mask = torch.ones(batch_size, seq_length, dtype=torch.bool)

ARGS = {
    'arg_layer': arg_layer,
    'n_layers': n_layers,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArgModule — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ArgModule output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
_get_activation_fn Ran
ran; our contract draft was wrong, not the code
youngbin-ro/Multi2OIE/model.py
code served (permissive licence) · get_code("cc650062db9ad0fd")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned function. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn.functional as F

torch.manual_seed(0)

ARGS = {
    'activation': 'relu'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
_get_clones Ran
ran; our contract draft was wrong, not the code
youngbin-ro/Multi2OIE/model.py
code served (permissive licence) · get_code("cb0b5b4e93484793")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ModuleList. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
from torch.nn.modules.container import ModuleList
import copy

torch.manual_seed(0)

# The function _get_clones takes:
# - module: an nn.Module instance that will be deep copied n times
# - n: an integer specifying how many copies to make

# Build a simple nn.Module for testing
class SimpleModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
        self.relu = nn.ReLU()
    
    def forward(self, x):
        x = self.linear(x)
        x = self.relu(x)
        return x

# Create an instance of the module
module_instance = SimpleModule()

# The function is called with:
# - module: the nn.Module to clone
# - n: number of clones to create
ARGS = {
    "module": module_instance,
    "n": 5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ModuleList — a ModuleList output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ModuleList output the recorded ndim 1 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
_get_position_idxs Ran
ran; our contract draft was wrong, not the code
youngbin-ro/Multi2OIE/model.py
code served (permissive licence) · get_code("201ed56d9f42b81e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family int, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# pred_mask: boolean mask tensor indicating which positions are masked
# Should have zeros and non-zeros for the logic to work
pred_mask = torch.tensor([
    [1, 1, 0, 0],
    [1, 0, 0, 1]
], dtype=torch.long)

# input_ids: token ids with at least one non-zero per batch
# Used to find padding start position via nonzero()
input_ids = torch.tensor([
    [5, 7, 0, 0],
    [3, 4, 0, 0]
], dtype=torch.long)

ARGS = {
    "pred_mask": pred_mask,
    "input_ids": input_ids
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family int, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
_get_pred_feature Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
youngbin-ro/Multi2OIE/model.py
code served (permissive licence) · get_code("2a90b356afe75518")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 3, dtype family float, shape (2, 3, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create pred_hidden: shape (B, L, D) = (2, 3, 4)
# B=2 (batch size), L=3 (sequence length), D=4 (hidden dimension)
pred_hidden = torch.randn(2, 3, 4)

# Create pred_mask: shape (B, L) with values 0 and 1
# 0 indicates positions to aggregate, 1 indicates positions to ignore
pred_mask = torch.tensor([
    [0, 1, 0],  # batch 0: positions 0 and 2 are masked (value 0)
    [1, 0, 1]   # batch 1: position 1 is masked (value 0)
])

ARGS = {
    "pred_hidden": pred_hidden,
    "pred_mask": pred_mask
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (2, 3, 4) — shape (2, 3, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
Multi2OIE Not yet run
unverified (harvested, no recorded run)
youngbin-ro/Multi2OIE/model.py
code served (permissive licence) · get_code("07fdc99b724a3587")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 7 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

In this paper, we propose Multi 2 OIE, which performs open information extraction (open IE) by combining BERT (Devlin et al., 2019) with multi-head attention blocks (Vaswani et al., 2017). Our model is a sequence-labeling system with an efficient and effective argument extraction method. We use a query, key, and value setting inspired by the Multimodal Transformer (Tsai et al., 2019) to replace the previously used bidirectional long short-term memory architecture with multihead attention. Multi 2 OIE outperforms existing sequence-labeling systems with high computational efficiency on two benchmark evaluation datasets, Re-OIE2016 and CaRB. Additionally, we apply the proposed method to multilingual open IE using multilingual BERT. Experimental results on new benchmark datasets introduced for two languages (Spanish and Portuguese) demonstrate that our model outperforms other multilingual systems without training data for the target languages.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2009.08128")
get_code_for_paper("2009.08128")
have("2009.08128")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2009.08128.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2009.08128.svg)](https://syntology.ai/paper/2009.08128)

Connect an agent — have() is free.