SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2509.01337 · EMNLP · 2025

LLM-Guided Semantic Relational Reasoning for Multimodal Intent Recognition

Yifan Wang, Hanlei Zhang, Hua Xu, Qianrui Zhou, Xinzhi Dong

arXiv · PDF · Open in the Atlas

Code that ran

9 of 9 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 7 failures of our instrument; 0 no recorded run), measured 2026-11-23; 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/2509.01337.json · badge: /api/ran/2509.01337.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
thuiar/LGSRR canonical (classifier label)
classifier basis: census
9 ran · 0 no recorded run
FunctionStatusWhere it lives
add_config_param Ran
ran; our contract draft was wrong, not the code
thuiar/LGSRR/configs/base.py
code served (permissive licence) · get_code("1ef6337ae6763042")
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 EasyDict. 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 numpy as np
from easydict import EasyDict
import sys
import types

torch.manual_seed(0)

# Create a mock config module that will be imported
mock_config_module = types.ModuleType('configs.test_config')

# Create a mock Param class
class MockParam:
    def __init__(self, old_args):
        self.hyper_param = {
            'learning_rate': 0.001,
            'batch_size': 32,
            'num_epochs': 10,
            'model_name': 'test_model'
        }

mock_config_module.Param = MockParam

# Add the mock module to sys.modules so importlib can find it
sys.modules['configs'] = types.ModuleType('configs')
sys.modules['configs.test_config'] = mock_config_module

# Create the old_args dictionary
old_args_dict = {
    'config_file_name': 'test_config',
    'existing_param': 'value1',
    'another_param': 42
}

old_args = EasyDict(old_args_dict)

ARGS = {
    'old_args': old_args,
    'config_file_name': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
easydict, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EasyDict — a EasyDict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a EasyDict 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
dcg Ran
ran; our contract draft was wrong, not the code
thuiar/LGSRR/methods/LGSRR/loss.py
code served (permissive licence) · get_code("9b090a000fcecd10")
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 float, shape (2, 2) 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
import numpy as np

torch.manual_seed(0)

# Create small tensors for testing
# y_pred: prediction scores (batch_size=2, seq_len=4)
y_pred = torch.randn(2, 4)

# y_true: relevance labels (batch_size=2, seq_len=4)
y_true = torch.randint(0, 3, (2, 4)).float()

# ats: list of positions to evaluate DCG at
ats = [2, 4]

# gain_function: lambda that takes y_true and returns gains
gain_function = lambda x: torch.pow(2, x) - 1

# padding_indicator: value indicating padding
padding_indicator = -1

ARGS = {
    "y_pred": y_pred,
    "y_true": y_true,
    "ats": ats,
    "gain_function": gain_function,
    "padding_indicator": padding_indicator,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, 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 float, shape (2, 2) — shape (2, 2) 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
freeze_backbone_parameters Ran
ran; our contract draft was wrong, not the code
thuiar/LGSRR/backbones/SubNets/FeatureNets.py
code served (permissive licence) · get_code("ebb08d6d862368f0")
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 MockModel. 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)

class MockEncoder(nn.Module):
    def __init__(self):
        super().__init__()
        self.layer = nn.ModuleList([nn.Linear(4, 4) for _ in range(12)])
    
    def forward(self, x):
        return x

class MockPooler(nn.Module):
    def __init__(self):
        super().__init__()
        self.dense = nn.Linear(4, 4)
    
    def forward(self, x):
        return x

class MockModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.encoder = MockEncoder()
        self.pooler = MockPooler()
    
    def forward(self, x):
        x = self.encoder(x)
        x = self.pooler(x)
        return x

model = MockModel()

ARGS = {
    "model": model
}
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 MockModel — a MockModel output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MockModel 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
gelu Ran
ran, honoured the contract we drafted
thuiar/LGSRR/backbones/SubNets/FeatureNets.py
code served (permissive licence) · get_code("50e1ffed03f484ec")
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) and returned Tensor, ndim 2, dtype family float, 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
import math

torch.manual_seed(0)

# The gelu function takes a single parameter 'x' which should be a tensor
# The function applies element-wise operations: multiplication, addition, torch.erf, and division
# So x should be a tensor that supports these operations

x = torch.randn(2, 4)

ARGS = {
    "x": x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 float, 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
load_npy Ran
ran, honoured the contract we drafted
thuiar/LGSRR/utils/functions.py
code served (permissive licence) · get_code("8c6bc8fd52264b46")
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 ndarray, ndim 2, dtype family float, shape (2, 3) 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 os
import numpy as np
import tempfile

# Create a temporary directory and a valid .npy file for testing
temp_dir = tempfile.mkdtemp()
test_array = np.array([[1, 2, 3], [4, 5, 6]], dtype=np.float32)
test_file_name = "test_data.npy"
test_file_path = os.path.join(temp_dir, test_file_name)
np.save(test_file_path, test_array)

ARGS = {
    "path": temp_dir,
    "file_name": test_file_name
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (2, 3) — shape (2, 3) 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
neuralNDCG Ran
ran; our contract draft was wrong, not the code
thuiar/LGSRR/methods/LGSRR/loss.py
code served (permissive licence) · get_code("10143f06c61791b1")
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 0, dtype family float, shape () 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
import numpy as np

torch.manual_seed(0)

# Create a small args class with all required attributes
class Args:
    def __init__(self):
        self.temperature = 0.1
        self.powered_relevancies = True
        self.stochastic = False
        self.n_samples = 5
        self.beta = 1.0
        self.DEFAULT_EPS = 1e-10

args = Args()

# Create small tensors
batch_size = 2
seq_len = 4

# y_pred: prediction scores, shape (batch_size, seq_len)
y_pred = torch.randn(batch_size, seq_len, dtype=torch.float32)

# y_true: relevance labels, shape (batch_size, seq_len)
# Mix of real values and padding indicators (-1)
y_true = torch.tensor([
    [3.0, 2.0, 1.0, -1.0],
    [2.0, 1.0, -1.0, -1.0]
], dtype=torch.float32)

ARGS = {
    'y_pred': y_pred,
    'y_true': y_true,
    'args': args
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, shape () — shape () 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
restore_model Ran
ran; our contract draft was wrong, not the code
thuiar/LGSRR/utils/functions.py
code served (permissive licence) · get_code("f4e332ae47e0f422")
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 SimpleModel. 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 os
import tempfile

torch.manual_seed(0)

# Create a minimal nn.Module
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

# Create model instance
model = SimpleModel()

# Create a temporary directory and save a model state dict
temp_dir = tempfile.mkdtemp()
output_model_file = os.path.join(temp_dir, 'pytorch_model.bin')
torch.save(model.state_dict(), output_model_file)

# Set device to CPU
device = 'cpu'

ARGS = {
    'model': model,
    'model_dir': temp_dir,
    'device': device
}
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 SimpleModel — a SimpleModel output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SimpleModel 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
set_output_path Ran
ran; our contract draft was wrong, not the code
thuiar/LGSRR/utils/functions.py
code served (permissive licence) · get_code("d152ab9b27609574")
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 tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 os
import tempfile

class Args:
    def __init__(self):
        self.output_path = tempfile.mkdtemp()
        self.model_path = "checkpoints"

ARGS = {
    "args": Args(),
    "save_model_name": "test_model_v1"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
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
sinkhorn_scaling Ran
ran; our contract draft was wrong, not the code
thuiar/LGSRR/methods/LGSRR/loss.py
code served (permissive licence) · get_code("1f6328f8dc619bec")
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, 4, 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)

# Construct a valid matrix for sinkhorn_scaling
# Shape: (batch_size, dim, dim) = (2, 4, 4)
# Initialize with positive values for valid scaling
mat = torch.rand(2, 4, 4) + 0.1

# Construct a mask (optional parameter)
# Shape: (batch_size, dim) = (2, 4)
# True indicates masked positions, False indicates valid positions
mask = torch.zeros(2, 4, dtype=torch.bool)

# Set up the ARGS dictionary with all parameters
ARGS = {
    "mat": mat,
    "mask": mask,
    "tol": 1e-06,
    "max_iter": 50,
    "DEFAULT_EPS": 1e-10
}
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, 4, 4) — shape (2, 4, 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

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 1 the same month, 1 later) and 4 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.

FunctionAlso present inEarliest-datedOthers named
gelu 198 other papers
185 dated earlier, 1 the same month, 11 later, 1 same year, order not determinable · 32 only as an assembly brick
1408.5882 (2014-08)
Convolutional Neural Networks for Sentence Classification
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1901.10125 (2019-01)
Glyce: Glyph-vectors for Chinese Character Representations
and 195 more not named here
load_npy 2 other papers
2 dated earlier
2312.14667 (2023-12)
Token-Level Contrastive Learning with Modality-Aware Prompting for Multimodal Intent Recognition
2403.10943 (2024-03)
MIntRec2.0: A Large-scale Benchmark Dataset for Multimodal Intent Recognition and Out-of-scope Detection in Conversations
set_output_path 2 other papers
2 dated earlier
2312.14667 (2023-12)
Token-Level Contrastive Learning with Modality-Aware Prompting for Multimodal Intent Recognition
2403.10943 (2024-03)
MIntRec2.0: A Large-scale Benchmark Dataset for Multimodal Intent Recognition and Out-of-scope Detection in Conversations
add_config_param 1 other paper
1 dated earlier
2312.14667 (2023-12)
Token-Level Contrastive Learning with Modality-Aware Prompting for Multimodal Intent Recognition
freeze_backbone_parameters 1 other paper
1 dated earlier
2403.10943 (2024-03)
MIntRec2.0: A Large-scale Benchmark Dataset for Multimodal Intent Recognition and Out-of-scope Detection in Conversations

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-23.

Repositories linked to this paper

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

Abstract

Understanding human intents from multimodal signals is critical for analyzing human behaviors and enhancing human-machine interactions in real-world scenarios. However, existing methods exhibit limitations in their modality-level reliance, constraining relational reasoning over fine-grained semantics for complex intent understanding. This paper proposes a novel LLM-Guided Semantic Relational Reasoning (LGSRR) method, which harnesses the expansive knowledge of large language models (LLMs) to establish semantic foundations that boost smaller models' relational reasoning performance. Specifically, an LLM-based strategy is proposed to extract fine-grained semantics as guidance for subsequent reasoning, driven by a shallow-to-deep Chain-of-Thought (CoT) that autonomously uncovers, describes, and ranks semantic cues by their importance without relying on manually defined priors. Besides, we formally model three fundamental types of semantic relations grounded in logical principles and analyze their nuanced interplay to enable more effective relational reasoning. Extensive experiments on multimodal intent and dialogue act recognition tasks demonstrate LGSRR's superiority over state-of-theart methods, with consistent performance gains across diverse semantic understanding scenarios. The complete data and code are available at https://github.com/thuiar/LGSRR.

For agents

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

get_harvested_code_for_paper("2509.01337")
get_code_for_paper("2509.01337")
have("2509.01337")

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

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

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

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

Connect an agent — have() is free.