SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.19465 · 2024

Towards Tracing Trustworthiness Dynamics: Revisiting Pre-training Period of Large Language Models

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 (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; 6 failures of our instrument; 1 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; 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/2402.19465.json · badge: /api/ran/2402.19465.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
chnq/tracingllm canonical (classifier label)
classifier basis: census
6 ran · 1 no recorded run
FunctionStatusWhere it lives
create_intervene_hook Ran
ran; our contract draft was wrong, not the code
chnq/tracingllm/src/eval_trustworthiness.py
code served (permissive licence) · get_code("b4c2a455a1162ef1")
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 as nn

torch.manual_seed(0)

# The function creates a hook that modifies output tensors
# The hook expects:
# - direction: a tensor to add to output
# - alpha: a scalar multiplier
# - token_pos: an integer index for the token dimension
# - The hook modifies output[0][:, token_pos, :] by adding direction * alpha

# Create a small direction tensor (batch=2, hidden_dim=4)
direction = torch.randn(2, 4)

# alpha is a scalar multiplier
alpha = 0.5

# token_pos is an integer index (using -1 for last token)
token_pos = -1

ARGS = {
    "direction": direction,
    "alpha": alpha,
    "token_pos": token_pos,
}
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
distmat Ran
ran; our contract draft was wrong, not the code
chnq/tracingllm/src/mi_estimators.py
code served (permissive licence) · get_code("2663196c40a3f458")
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

torch.manual_seed(0)

# The function takes a single parameter X which should be a torch tensor
# Looking at the function body:
# - It handles 1D tensors by reshaping to (-1, 1)
# - It performs matrix operations: sum, view, mm (matrix multiply), transpose, expand_as
# - It works with 2D tensors of shape (N, D) where N is number of samples and D is dimensionality

# Create a small 2D tensor: 2 samples, 4 dimensions
X = torch.randn(2, 4)

ARGS = {
    "X": X
}
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 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
get_acts Ran
ran; our contract draft was wrong, not the code
chnq/tracingllm/src/generate_activations.py
code served (permissive licence) · get_code("f0744a5e41385253")
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 dict. 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 import Tensor

torch.manual_seed(0)

# Create a minimal tokenizer stand-in
class MinimalTokenizer:
    def encode(self, text, return_tensors=None):
        # Return a simple tensor of token IDs
        tokens = torch.tensor([[1, 2, 3, 4]], dtype=torch.long)  # shape (1, 4)
        return tokens

# Create a minimal model with layers attribute
class MinimalLayer(nn.Module):
    def __init__(self, hidden_dim=4):
        super().__init__()
        self.linear = nn.Linear(hidden_dim, hidden_dim)
    
    def forward(self, x):
        return self.linear(x)

class MinimalModel(nn.Module):
    def __init__(self, hidden_dim=4, num_layers=3):
        super().__init__()
        self.model = nn.Module()
        self.model.layers = nn.ModuleList([MinimalLayer(hidden_dim) for _ in range(num_layers)])
    
    def forward(self, input_ids):
        # Simulate processing: convert input_ids to embeddings and pass through layers
        batch_size, seq_len = input_ids.shape
        x = torch.randn(batch_size, seq_len, 4)  # Simulate embedding output
        for layer in self.model.layers:
            x = layer(x)
        return x

# Create instances
tokenizer = MinimalTokenizer()
model = MinimalModel(hidden_dim=4, num_layers=3)
device = 'cpu'

# Create test statements
statements = [
    "Hello world",
    "This is a test"
]

# Specify layers to hook
layers = [0, 1]

# Define all arguments for get_acts
ARGS = {
    'statements': statements,
    'tokenizer': tokenizer,
    'model': model,
    'layers': layers,
    'device': device,
    'token_pos': -1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
kernelmat Ran
ran; our contract draft was wrong, not the code
chnq/tracingllm/src/mi_estimators.py
code served (permissive licence) · get_code("f3fd137e74d1312c")
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 a small sample tensor for X
# Shape: (2, 4) - batch size 2, dimension 4
X = torch.randn(2, 4)

# Create arguments dict for kernelmat function
ARGS = {
    'X': X,
    'sigma': 1.0,
    'ktype': 'gaussian'
}
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
load_statements Ran
ran; our contract draft was wrong, not the code
chnq/tracingllm/src/generate_activations.py
code served (permissive licence) · get_code("f0cc63177ce8b7a1")
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 list, 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 pandas as pd
import tempfile
import os

# Create a temporary CSV file with the expected structure
temp_dir = tempfile.mkdtemp()
dataset_name = "test_dataset"
csv_path = os.path.join(temp_dir, f"{dataset_name}.csv")

# Create a sample CSV with a 'statement' column
df = pd.DataFrame({
    'statement': [
        'This is the first statement.',
        'This is the second statement.',
        'This is the third statement.'
    ]
})
df.to_csv(csv_path, index=False)

# Monkey-patch the datasets directory to use our temp directory
import sys
from unittest.mock import patch

# Create a mock that redirects to our temp directory
original_read_csv = pd.read_csv

def mock_read_csv(filepath, *args, **kwargs):
    if 'datasets/' in filepath:
        # Replace datasets/ with our temp directory
        filename = filepath.replace('datasets/', '')
        filepath = os.path.join(temp_dir, filename)
    return original_read_csv(filepath, *args, **kwargs)

pd.read_csv = mock_read_csv

ARGS = {
    'dataset_name': 'test_dataset'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list 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
sigma_estimation Ran
ran; our contract draft was wrong, not the code
chnq/tracingllm/src/mi_estimators.py
code served (permissive licence) · get_code("8ede5c4129a729ae")
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 float32, 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 small sample tensors
# X: batch_size=2, features=4
X = torch.randn(2, 4)

# Y: batch_size=3, features=4 (different batch size to make it distinct)
Y = torch.randn(3, 4)

ARGS = {
    "X": X,
    "Y": Y,
}
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 float32, 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
load_model Not yet run
unverified (harvested, no recorded run)
chnq/tracingllm/src/generate_activations.py
code served (permissive licence) · get_code("e1c7e2781771e313")
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, 7 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 2 later) and 0 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
sigma_estimation 11 other papers
5 dated earlier, 5 later, 1 same year, order not determinable
1908.01580 (2019-08)
The HSIC Bottleneck: Deep Learning without Back-Propagation
2106.01939 (2021-06)
Causal Effect Inference for Structured Treatments
2106.02734 (2021-06)
Revisiting Hilbert-Schmidt Information Bottleneck for Adversarial Robustness
and 8 more not named here
load_statements 4 other papers
1 dated earlier, 2 later, 1 same year, order not determinable
2310.06824 (2023-10)
The Geometry of Truth: Emergent Linear Structure in Large Language Model Representations of True/False Datasets
2024.findings-acl.290 (2024 (year only))
Towards Tracing Trustworthiness Dynamics: Revisiting Pre-training Period of Large Language Models
2407.12831 (2024-07)
Truth is Universal: Robust Detection of Lies in LLMs
and 1 more not named here
create_intervene_hook 1 other paper
1 same year, order not determinable
2024.findings-acl.290 (2024 (year only))
Towards Tracing Trustworthiness Dynamics: Revisiting Pre-training Period of Large Language Models
distmat 1 other paper
1 same year, order not determinable
2024.findings-acl.290 (2024 (year only))
Towards Tracing Trustworthiness Dynamics: Revisiting Pre-training Period of Large Language Models
get_acts 1 other paper
1 same year, order not determinable
2024.findings-acl.290 (2024 (year only))
Towards Tracing Trustworthiness Dynamics: Revisiting Pre-training Period of Large Language Models
kernelmat 1 other paper
1 same year, order not determinable
2024.findings-acl.290 (2024 (year only))
Towards Tracing Trustworthiness Dynamics: Revisiting Pre-training Period of Large Language Models
load_model 1 other paper
1 same year, order not determinable
2024.findings-acl.290 (2024 (year only))
Towards Tracing Trustworthiness Dynamics: Revisiting Pre-training Period of Large Language Models

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

Ensuring the trustworthiness of large language models (LLMs) is crucial. Most studies concentrate on fully pre-trained LLMs to better understand and improve LLMs' trustworthiness. In this paper, to reveal the untapped potential of pre-training, we pioneer the exploration of LLMs' trustworthiness during this period, focusing on five key dimensions: reliability, privacy, toxicity, fairness, and robustness. To begin with, we apply linear probing to LLMs. The high probing accuracy suggests that \textit{LLMs in early pre-training can already distinguish concepts in each trustworthiness dimension}. Therefore, to further uncover the hidden possibilities of pre-training, we extract steering vectors from a LLM's pre-training checkpoints to enhance the LLM's trustworthiness. Finally, inspired by~\citet{choi2023understanding} that mutual information estimation is bounded by linear probing accuracy, we also probe LLMs with mutual information to investigate the dynamics of trustworthiness during pre-training. We are the first to observe a similar two-phase phenomenon: fitting and compression~\citep{shwartz2017opening}. This research provides an initial exploration of trustworthiness modeling during LLM pre-training, seeking to unveil new insights and spur further developments in the field. We will make our code publicly accessible at \url{https://github.com/ChnQ/TracingLLM}.

For agents

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

get_harvested_code_for_paper("2402.19465")
get_code_for_paper("2402.19465")
have("2402.19465")

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

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

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

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

Connect an agent — have() is free.