SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2602.04917 · 2026

Multi-Aspect Mining and Anomaly Detection for Heterogeneous Tensor Streams

Yasuko Matsubara, Yasushi Sakurai, Ren Fujiwara, Soshi Kakio

arXiv · PDF · Open in the Atlas

Code that ran

8 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; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 8 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/2602.04917.json · badge: /api/ran/2602.04917.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
kaki005/HeteroComp canonical (classifier label)
classifier basis: census
8 ran · 1 no recorded run
FunctionStatusWhere it lives
blocktensor_to_blockdiagmatrix Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
kaki005/HeteroComp/_src/gp/bayesnewton_ops.py
code served (permissive licence) · get_code("9aae62a9f99047b2")
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 ArrayImpl, ndim 2, dtype family float, shape (6, 6) 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 jax.numpy as jnp
import jax

# Create a small blocktensor of shape [N, D, D]
# N=2 batches, D=3 dimensions
N = 2
D = 3

# Create a simple blocktensor with shape [2, 3, 3]
blocktensor = jnp.array([
    [[1.0, 2.0, 3.0],
     [4.0, 5.0, 6.0],
     [7.0, 8.0, 9.0]],
    [[10.0, 11.0, 12.0],
     [13.0, 14.0, 15.0],
     [16.0, 17.0, 18.0]]
])

ARGS = {
    "blocktensor": blocktensor
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, ndim 2, dtype family float, shape (6, 6) — shape (6, 6) 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
gauss_hermite Ran
ran; our contract draft was wrong, not the code
kaki005/HeteroComp/_src/gp/bayesnewton_cubature.py
code served (permissive licence) · get_code("2bf235dc5954887b")
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. 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 jax.numpy as np
from numpy.polynomial.hermite import hermgauss
import itertools

def mvhermgauss(H: int, D: int):
    """
    This function is adapted from GPflow: https://github.com/GPflow/GPflow

    Return the evaluation locations 'xn', and weights 'wn' for a multivariate
    Gauss-Hermite quadrature.

    The outputs can be used to approximate the following type of integral:
    int exp(-x)*f(x) dx ~ sum_i w[i,:]*f(x[i,:])

    :param H: Number of Gauss-Hermite evaluation points.
    :param D: Number of input dimensions. Needs to be known at call-time.
    :return: eval_locations 'x' (H**DxD), weights 'w' (H**D)
    """
    gh_x, gh_w = hermgauss(H)
    x = np.array(list(itertools.product(*(gh_x,) * D)))
    w = np.prod(np.array(list(itertools.product(*(gh_w,) * D))), 1)
    return (x, w)

def gauss_hermite(dim=1, num_quad_pts=20):
    """
    Return weights and sigma-points for Gauss-Hermite cubature
    """
    sigma_pts, weights = mvhermgauss(num_quad_pts, dim)
    sigma_pts = np.sqrt(2) * sigma_pts.T
    weights = weights.T * np.pi ** (-0.5 * dim)
    return (sigma_pts, weights)

ARGS = {
    "dim": 3,
    "num_quad_pts": 5,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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_blocks Ran
ran; our contract draft was wrong, not the code
kaki005/HeteroComp/_src/gp/bayesnewton_ops.py
code served (permissive licence) · get_code("6f157040825f5857")
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 (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
import numpy as np

torch.manual_seed(0)

# The function get_blocks indexes into a block diagonal matrix
# It takes a blockdiagmatrix (appears to be 2D), D (block size), and i (block index)
# and returns a submatrix at position [0+D*i:D+D*i, 0+D*i:D+D*i]

# Create a simple block diagonal matrix
# Let's say we have 3 blocks of size 4x4, so total is 12x12
D = 4
num_blocks = 3
total_size = D * num_blocks

# Create a block diagonal matrix
blockdiagmatrix = torch.zeros(total_size, total_size)
for block_idx in range(num_blocks):
    start = D * block_idx
    end = D * (block_idx + 1)
    blockdiagmatrix[start:end, start:end] = torch.eye(D) * (block_idx + 1)

# Test with block index i=1
i = 1

ARGS = {
    "blockdiagmatrix": blockdiagmatrix,
    "D": D,
    "i": i
}
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 (4, 4) — shape (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
get_diag_and_offdiag_components Ran
ran; our contract draft was wrong, not the code
kaki005/HeteroComp/_src/gp/bayesnewton_ops.py
code served (permissive licence) · get_code("1886c3dfe4b4324c")
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 ArrayImpl, ndim 2, dtype family float, shape (9, 9) 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 jax.numpy as jnp
import jax

# Set seed for reproducibility
jax.config.update("jax_platform_name", "cpu")

# Build arguments for get_diag_and_offdiag_components
num_latents = 3
zeros = jnp.zeros(9)  # num_latents * num_latents = 9
i = 4  # index into zeros
noise_cov = jnp.array([1.0, 2.0, 3.0])  # diagonal noise covariance with size matching num_latents

ARGS = {
    "num_latents": num_latents,
    "zeros": zeros,
    "i": i,
    "noise_cov": noise_cov,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, ndim 2, dtype family float, shape (9, 9) — shape (9, 9) 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
merge_dummies Ran
ran; our contract draft was wrong, not the code
kaki005/HeteroComp/_src/load_dataset.py
code served (permissive licence) · get_code("8222665c14c44e82")
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 DataFrame. 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 pandas as pd
import numpy as np

# Create a sample DataFrame with dummy columns
df = pd.DataFrame({
    'base_col': [False, False, False],
    'merge_col_1': [True, False, True],
    'merge_col_2': [False, True, False],
    'merge_col_3': [True, True, False],
    'other_col': ['a', 'b', 'c']
})

ARGS = {
    'df': df,
    'base_col': 'base_col',
    'merge_cols': ['merge_col_1', 'merge_col_2', 'merge_col_3']
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 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
mvhermgauss Ran
ran; our contract draft was wrong, not the code
kaki005/HeteroComp/_src/gp/bayesnewton_cubature.py
code served (permissive licence) · get_code("0eeed36a96e1f3a7")
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. 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 jax.numpy as np
from numpy.polynomial.hermite import hermgauss
import itertools

# Set seed for reproducibility
import numpy as onp
onp.random.seed(0)

# Define arguments for mvhermgauss
# H: Number of Gauss-Hermite evaluation points (small value)
# D: Number of input dimensions (small value)

ARGS = {
    "H": 3,
    "D": 2,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
plot_pr_curve Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
kaki005/HeteroComp/calc_anomalyscore.py
code served (permissive licence) · get_code("50956041b281a8fe")
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. 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 numpy as np
from pathlib import Path
import tempfile

# Create a temporary directory for the figure
temp_dir = tempfile.mkdtemp()
fig_path = Path(temp_dir) / "pr_curve.png"

# Create synthetic data for binary classification
# true_labels: binary labels (0 or 1)
np.random.seed(0)
true_labels = np.array([0, 1, 1, 0, 1, 0, 1, 1])

# anomaly_scores: continuous scores (higher = more anomalous)
anomaly_scores = np.array([0.1, 0.9, 0.8, 0.2, 0.85, 0.15, 0.95, 0.7])

ARGS = {
    "fig_path": fig_path,
    "true_labels": true_labels,
    "anomaly_scores": anomaly_scores,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
process_cci18_csv Ran
ran; our contract draft was wrong, not the code
kaki005/HeteroComp/_src/load_dataset.py
code served (permissive licence) · get_code("a7b7668436a2c5c9")
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 DataFrame. 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 pandas as pd
import tempfile
import os

# Create a temporary CSV file with sample data
temp_dir = tempfile.gettempdir()
csv_path = os.path.join(temp_dir, 'cci18_sample.csv')

# Create sample data with:
# - A time column with dates >= 2018
# - Continuous columns with non-negative floats
sample_data = {
    'date': ['2018-01-15', '2019-06-20', '2020-12-10', '2017-05-01'],
    'value1': ['10.5', '20.3', '-5.2', '15.0'],
    'value2': ['100.0', '200.5', '150.3', '175.0'],
    'category': ['A', 'B', 'C', 'D']
}

df = pd.DataFrame(sample_data)
df.to_csv(csv_path, index=False)

ARGS = {
    'path': csv_path,
    'time_idx': 'date',
    'continuous_idx': ['value1', 'value2']
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 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
prepare_event_tensor Not yet run
unverified (harvested, no recorded run)
kaki005/HeteroComp/_src/preprocess.py
code served (permissive licence) · get_code("d2f73eb49d7ab153")
How it ran

no invocation recorded.

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, 0 the same month, 0 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
blocktensor_to_blockdiagmatrix 1 other paper
1 dated earlier
2111.01721 (2021-11)
Bayes-Newton Methods for Approximate Bayesian Inference with PSD Guarantees
gauss_hermite 1 other paper
1 dated earlier
2111.01721 (2021-11)
Bayes-Newton Methods for Approximate Bayesian Inference with PSD Guarantees
get_blocks 1 other paper
1 dated earlier
2111.01721 (2021-11)
Bayes-Newton Methods for Approximate Bayesian Inference with PSD Guarantees
get_diag_and_offdiag_components 1 other paper
1 dated earlier
2111.01721 (2021-11)
Bayes-Newton Methods for Approximate Bayesian Inference with PSD Guarantees
mvhermgauss 1 other paper
1 dated earlier
2111.01721 (2021-11)
Bayes-Newton Methods for Approximate Bayesian Inference with PSD Guarantees

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

Analysis and anomaly detection in event tensor streams consisting of timestamps and multiple attributes -such as communication logs (time, IP address, packet length)-are essential tasks in data mining. While existing tensor decomposition and anomaly detection methods provide useful insights, they face the following two limitations. (i) They cannot handle heterogeneous tensor streams, which comprises both categorical attributes (e.g., IP address) and continuous attributes (e.g., packet length). They typically require either discretizing continuous attributes or treating categorical attributes as continuous, both of which distort the underlying statistical properties of the data. Furthermore, incorrect assumptions about the distribution family of continuous attributes often degrade the model's performance. (ii) They discretize timestamps, failing to track the temporal dynamics of streams (e.g., trends, abnormal events), which makes them ineffective for detecting anomalies at the group level, referred to as "group anomalies" (e.g, DoS attacks). To address these challenges, we propose HeteroComp, a method for continuously summarizing heterogeneous tensor streams into "components " representing latent groups in each attribute and their temporal dynamics, and detecting group anomalies. Our method employs Gaussian process priors to model unknown distributions of continuous attributes, and temporal dynamics, which directly estimate probability densities from data. Extracted components give concise but effective summarization, enabling accurate group anomaly detection. Extensive experiments on real datasets demonstrate that HeteroComp outperforms the state-of-the-art algorithms for group anomaly detection accuracy, and its computational time does not depend on the data stream length. • Information systems → Data stream mining; • Computing methodologies → Factorization methods.

For agents

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

get_harvested_code_for_paper("2602.04917")
get_code_for_paper("2602.04917")
have("2602.04917")

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

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

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

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

Connect an agent — have() is free.