SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2207.13081 · NeurIPS · 2023

Future-Dependent Value-Based Off-Policy Evaluation in POMDPs

Wen Sun, Nan Jiang, Masatoshi Uehara, Victor Chernozhukov, Nathan Kallus, Haruka Kiyohara, Andrew Bennett, Chengchun Shi

arXiv · PDF · Open in the Atlas

Code that ran

3 of 8 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 2 have no contract verdict; 1 failure of our instrument; 5 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/2207.13081.json · badge: /api/ran/2207.13081.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
aiueola/neurips2023-future-dependent-ope canonical (classifier label)
classifier basis: classifier_2025
3 ran · 5 no recorded run
FunctionStatusWhere it lives
ContinuousStateLSTMVfunction Ran
ran on a synthesized input
aiueola/neurips2023-future-dependent-ope/src/ope/value_based.py
code served (permissive licence) · get_code("02424e3e43163bbe")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, 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 torch
from torch import nn

from typing import Tuple, Optional, Union
import torch
from torch import nn
import torch.nn.functional as F

class ContinuousStateLSTMVfunction(nn.Module):

    def __init__(self, state_dim: int=4, n_actions: int=2, memory_length: int=0, future_length: int=0, emb_dim: int=4, lstm_hidden_dim: int=10, linear_hidden_dim: int=100):
        super().__init__()
        self.state_dim = state_dim
        self.n_actions = n_actions
        self.is_memory_dependent = memory_length > 0
        self.is_future_dependent = future_length > 0
        self.lstm = nn.LSTM(state_dim + n_actions, lstm_hidden_dim, batch_first=True, bidirectional=True)
        self.history_based_state_predictor = nn.Linear(lstm_hidden_dim * 2, state_dim)
        self.memory_based_state_predictor = nn.Linear(lstm_hidden_dim * 2, state_dim)
        self.future_based_state_predictor = nn.Linear(lstm_hidden_dim * 2, state_dim)
        self.fc1 = nn.Linear(state_dim + (state_dim + n_actions) * (memory_length + future_length), linear_hidden_dim)
        self.fc2 = nn.Linear(linear_hidden_dim, 1)
        self.mse_loss = nn.MSELoss()

    def _encode_state_action(self, states: torch.Tensor, actions: torch.Tensor):
        action_embs = F.one_hot(actions, num_classes=self.n_actions)
        return torch.cat([states, action_embs], dim=2)

    def _encode_sequence(self, states: torch.Tensor, actions: torch.Tensor, use_lstm: bool=False):
        input = self._encode_state_action(states, actions)
        if use_lstm:
            out = self.lstm(input)[1][0]
            out = torch.cat([out[0], out[1]], dim=1)
        else:
            out = input.reshape((input.shape[0], -1))
        return out

    def _predict_state(self, states: torch.Tensor, actions: torch.Tensor, input_type: str):
        input = self._encode_sequence(states, actions, use_lstm=True)
        if input_type == 'history':
            x = self.history_based_state_predictor(input)
        elif input_type == 'memory':
            x = self.memory_based_state_predictor(input)
        else:
            x = self.future_based_state_predictor(input)
        return F.softmax(x, dim=1)

    def forward(self, state: torch.Tensor, memory_states: Optional[torch.Tensor]=None, memory_actions: Optional[torch.Tensor]=None, future_states: Optional[torch.Tensor]=None, future_actions: Optional[torch.Tensor]=None):
        if self.is_memory_dependent:
            with torch.no_grad():
                state_ = self._encode_sequence(memory_states, memory_actions)
            state = torch.cat((state, state_), dim=1)
        if self.is_future_dependent:
            with torch.no_grad():
                state_ = self._encode_sequence(future_states, future_actions)
            state = torch.cat((state, state_), dim=1)
        x = F.relu(self.fc1(state))
        x = self.fc2(x)
        return x.squeeze()

    def state_prediction_loss(self, history_states: torch.Tensor, history_actions: torch.Tensor, memory_states: torch.Tensor, memory_actions: torch.Tensor, state: torch.Tensor, future_states: Optional[torch.Tensor]=None, future_actions: Optional[torch.Tensor]=None):
        state_history = self._predict_state(history_states, history_actions, input_type='history')
        loss = self.mse_loss(state_history, state)
        return loss


INIT_ARGS = {
    'state_dim': 4,
    'n_actions': 2,
    'memory_length': 0,
    'future_length': 0,
    'emb_dim': 4,
    'lstm_hidden_dim': 10,
    'linear_hidden_dim': 100,
}

ARGS = {
    'state': torch.randn(2, 4),
    'memory_states': None,
    'memory_actions': None,
    'future_states': None,
    'future_actions': None,
}

if __name__ == '__main__':
    model = ContinuousStateLSTMVfunction(**INIT_ARGS)
    output = model(**ARGS)
    print("Output shape:", output.shape)
    print("Output:", output)
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 1, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
DiscreteStateLSTMVfunction Ran
ran on a synthesized input
aiueola/neurips2023-future-dependent-ope/src/ope/value_based.py
code served (permissive licence) · get_code("c5356c33529b4921")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, 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 torch
import numpy as np

INIT_ARGS = {
    "n_states": 4,
    "n_actions": 3,
    "memory_length": 2,
    "future_length": 1,
    "lstm_hidden_dim": 5,
    "linear_hidden_dim": 7
}

# Create dummy data consistent with INIT_ARGS
batch_size = 2
history_length = 3
memory_length = INIT_ARGS["memory_length"]
future_length = INIT_ARGS["future_length"]

# States and actions for history, memory, and future
history_states = torch.randint(0, INIT_ARGS["n_states"], (batch_size, history_length))
history_actions = torch.randint(0, INIT_ARGS["n_actions"], (batch_size, history_length))
memory_states = torch.randint(0, INIT_ARGS["n_states"], (batch_size, memory_length))
memory_actions = torch.randint(0, INIT_ARGS["n_actions"], (batch_size, memory_length))
future_states = torch.randint(0, INIT_ARGS["n_states"], (batch_size, future_length))
future_actions = torch.randint(0, INIT_ARGS["n_actions"], (batch_size, future_length))
current_state = torch.randint(0, INIT_ARGS["n_states"], (batch_size,))

ARGS = {
    "state": current_state,
    "memory_states": memory_states,
    "memory_actions": memory_actions,
    "future_states": future_states,
    "future_actions": future_actions
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 1, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
to_tensor Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
aiueola/neurips2023-future-dependent-ope/src/ope/value_based.py
code served (permissive licence) · get_code("00dc3e8f76d44fbd")
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. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 numpy array for testing
arr = np.array([[1.0, 2.0, 3.0, 4.0],
                [5.0, 6.0, 7.0, 8.0]])

ARGS = {
    'arr': arr,
    'dtype': float,
    'device': 'cpu'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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, 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
BaseNeuralValueBasedOffPolicyEstimator Not yet run
unverified (harvested, no recorded run)
aiueola/neurips2023-future-dependent-ope/src/ope/value_based.py
code served (permissive licence) · get_code("c8f089d208af6389")
How it ran

no invocation recorded.

BaseOffPolicyEstimator Not yet run
unverified (harvested, no recorded run)
aiueola/neurips2023-future-dependent-ope/src/ope/value_based.py
code served (permissive licence) · get_code("67bf91a82b09ce05")
How it ran

no invocation recorded.

BasePolicy Not yet run
unverified (harvested, no recorded run)
aiueola/neurips2023-future-dependent-ope/src/ope/value_based.py
code served (permissive licence) · get_code("626f06ce600233a5")
How it ran

no invocation recorded.

BaseValueBasedOffPolicyEstimator Not yet run
unverified (harvested, no recorded run)
aiueola/neurips2023-future-dependent-ope/src/ope/value_based.py
code served (permissive licence) · get_code("3839b6d96f39e770")
How it ran

no invocation recorded.

NeuralFutureDependentValueBasedOPE Not yet run
unverified (harvested, no recorded run)
aiueola/neurips2023-future-dependent-ope/src/ope/value_based.py
code served (permissive licence) · get_code("7f505a88e43b7d23")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 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 8 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-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

We study off-policy evaluation (OPE) for partially observable MDPs (POMDPs) with general function approximation. Existing methods such as sequential importance sampling estimators suffer from the curse of horizon in POMDPs. To circumvent this problem, we develop a novel model-free OPE method by introducing future-dependent value functions that take future proxies as inputs and perform a similar role to that of classical value functions in fully-observable MDPs. We derive a new off-policy Bellman equation for future-dependent value functions as conditional moment equations that use history proxies as instrumental variables. We further propose a minimax learning method to learn future-dependent value functions using the new Bellman equation. We obtain the PAC result, which implies our OPE estimator is close to the true policy value under Bellman completeness, as long as futures and histories contain sufficient information about latent states. Our code is available at https://github.com/aiueola/neurips2023-future-dependent-ope.

For agents

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

get_harvested_code_for_paper("2207.13081")
get_code_for_paper("2207.13081")
have("2207.13081")

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

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

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

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

Connect an agent — have() is free.