SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1909.04240 · 2019

Neural reparameterization improves structural optimization

arXiv · PDF · Open in the Atlas

Code that ran

8 of 11 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 8 have no contract verdict; 0 failures of our instrument; 3 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/1909.04240.json · badge: /api/ran/1909.04240.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
google-research/neural-structural-optimization community (classifier label)
classifier basis not recorded on the link
8 ran · 3 no recorded run
FunctionStatusWhere it lives
batched_topo_loss Ran
ran on a synthesized input
google-research/neural-structural-optimization/neural_structural_optimization/models.py
code served (permissive licence) · get_code("960af10f82b2596f")
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 1, dtype family float, shape (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 autograd.numpy as np
import numpy as real_np

class StandInEnv:
    """Minimal environment with objective method"""
    def __init__(self, env_id):
        self.env_id = env_id
    
    def objective(self, param, volume_contraint=False):
        """Return a scalar loss value"""
        # Simple objective: sum of params as a scalar
        return np.sum(param) + float(self.env_id)

# Create small parameter arrays (batch size 2, dim 4)
params = [
    np.array([0.1, 0.2, 0.3, 0.4]),
    np.array([0.5, 0.6, 0.7, 0.8])
]

# Create environment instances
envs = [
    StandInEnv(env_id=0),
    StandInEnv(env_id=1)
]

ARGS = {
    "params": params,
    "envs": envs
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
autograd, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (2,) — shape (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
convert_autograd_to_tensorflow Ran
ran on a synthesized input
google-research/neural-structural-optimization/neural_structural_optimization/models.py
code served (permissive licence) · get_code("595b1e48b9535a4f")
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 Bind. 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 autograd.numpy as np
import autograd
import tensorflow as tf

# Define a simple function that autograd can differentiate
def simple_func(x):
    # Simple differentiable function: f(x) = x^2 + 2*x
    return np.sum(x**2 + 2*x)

# Create a small numpy array to pass as argument
x_numpy = np.array([1.0, 2.0, 3.0, 4.0], dtype=np.float32)

ARGS = {
    "func": simple_func
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
autograd, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Bind — a Bind output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Bind 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
gaussian_filter Ran
ran on a synthesized input
google-research/neural-structural-optimization/neural_structural_optimization/autograd_lib.py
code served (permissive licence) · get_code("84190a23c8eac7e1")
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 3, dtype family float, shape (2, 4, 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 numpy as np
import scipy.ndimage

ARGS = {
    "x": np.random.randn(2, 4, 3),
    "width": 1.0,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
autograd, numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family float, shape (2, 4, 3) — shape (2, 4, 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
get_stiffness_matrix Ran
ran on a synthesized input
google-research/neural-structural-optimization/neural_structural_optimization/topo_physics.py
code served (permissive licence) · get_code("9d12998ad6a492ec")
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 (8, 8) 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 autograd.numpy as np

# The function takes two scalar parameters: young's modulus and poisson's ratio
# These are material properties used in finite element analysis (stiffness matrix calculation)

young = 210000.0  # Young's modulus in typical units (e.g., MPa)
poisson = 0.3     # Poisson's ratio (dimensionless, typically between 0 and 0.5)

ARGS = {
    'young': young,
    'poisson': poisson
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
autograd — 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 (8, 8) — shape (8, 8) 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
global_normalization Ran
ran on a synthesized input
google-research/neural-structural-optimization/neural_structural_optimization/models.py
code served (permissive licence) · get_code("cced8a245a08464f")
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 EagerTensor, 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 tensorflow as tf
import numpy as np

# Create a small input tensor for testing
# Using shape (2, 4) - batch size 2, feature dimension 4
inputs = tf.constant([
    [1.0, 2.0, 3.0, 4.0],
    [5.0, 6.0, 7.0, 8.0]
], dtype=tf.float32)

ARGS = {
    "inputs": inputs,
    "epsilon": 1e-06
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, 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
image_from_array Ran
ran on a synthesized input
google-research/neural-structural-optimization/neural_structural_optimization/pipeline_utils.py
code served (permissive licence) · get_code("0a13fa2dff4c06d2")
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 Image. 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 matplotlib.colors
import numpy as np
from PIL import Image

# Create a simple 2D numpy array with values in the range [0, 1]
data = np.array([
    [0.0, 0.3, 0.6, 0.9],
    [0.1, 0.4, 0.7, 1.0]
], dtype=np.float32)

ARGS = {
    'data': data,
    'cmap': 'Greys',
    'vmin': 0.0,
    'vmax': 1.0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, matplotlib, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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
ndarray_safe_lru_cache Ran
ran on a synthesized input
google-research/neural-structural-optimization/neural_structural_optimization/caching.py
code served (permissive licence) · get_code("ad569f452381703b")
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 functools
import numpy as np

class _WrappedArray:
    """Hashable wrapper for NumPy arrays."""

    def __init__(self, value):
        self.value = value

    def __eq__(self, other):
        return np.array_equal(self.value, other.value)

    def __hash__(self):
        return hash(repr(self.value.ravel()))

def ndarray_safe_lru_cache(maxsize=128):
    """An ndarray compatible version of functools.lru_cache."""

    def decorator(func):

        @functools.lru_cache(maxsize)
        def cached_func(*args, **kwargs):
            args = tuple((a.value if isinstance(a, _WrappedArray) else a for a in args))
            kwargs = {k: v.value if isinstance(v, _WrappedArray) else v for k, v in kwargs.items()}
            return func(*args, **kwargs)

        @functools.wraps(func)
        def wrapper(*args, **kwargs):
            args = tuple((_WrappedArray(a) if isinstance(a, np.ndarray) else a for a in args))
            kwargs = {k: _WrappedArray(v) if isinstance(v, np.ndarray) else v for k, v in kwargs.items()}
            return cached_func(*args, **kwargs)
        return wrapper
    return decorator


# Test function to decorate
@ndarray_safe_lru_cache(maxsize=128)
def test_func(arr, x, y=5):
    return np.sum(arr) + x + y


# Create test data
arr1 = np.array([1.0, 2.0, 3.0, 4.0])
arr2 = np.array([5.0, 6.0, 7.0, 8.0])

# Call the decorated function to verify it works
result1 = test_func(arr1, 10, y=2)
result2 = test_func(arr1, 10, y=2)  # Should hit cache
result3 = test_func(arr2, 10, y=2)  # Different array, should miss cache

ARGS = {
    "maxsize": 128
}
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 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
specified_task Ran
ran on a synthesized input
google-research/neural-structural-optimization/neural_structural_optimization/topo_api.py
code served (permissive licence) · get_code("d81f62f425d8b027")
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 autograd.numpy as np

class Problem:
    def __init__(self):
        self.width = 4
        self.height = 3
        self.density = 0.5
        
        # normals: shape (2*(width+1)*(height+1),) to determine fixdofs
        # Create a small normals array with some non-zero values at boundaries
        self.normals = np.zeros(2 * (self.width + 1) * (self.height + 1))
        self.normals[0:5] = 1  # Mark some boundary nodes as fixed
        self.normals = self.normals.reshape(-1, 1)
        
        # mask: used in params, shape should match problem grid
        self.mask = np.ones((self.width, self.height))
        
        # forces: flattened force vector
        # shape (2*(width+1)*(height+1),)
        self.forces = np.zeros((2 * (self.width + 1) * (self.height + 1),))
        self.forces[10] = 1.0  # Apply force at one node
        self.forces = self.forces.reshape(-1, 1)

problem = Problem()

ARGS = {
    'problem': problem
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
autograd — 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
cantilever_beam_full Not yet run
unverified (harvested, no recorded run)
google-research/neural-structural-optimization/neural_structural_optimization/problems.py
code served (permissive licence) · get_code("3aa4be46e4dbb782")
How it ran

no invocation recorded.

cantilever_beam_two_point Not yet run
unverified (harvested, no recorded run)
google-research/neural-structural-optimization/neural_structural_optimization/problems.py
code served (permissive licence) · get_code("c7e02c2b5d2c3800")
How it ran

no invocation recorded.

mbb_beam Not yet run
unverified (harvested, no recorded run)
google-research/neural-structural-optimization/neural_structural_optimization/problems.py
code served (permissive licence) · get_code("d1697c1116aad795")
How it ran

no invocation recorded.

Also present in other papers' code

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

Structural optimization is a popular method for designing objects such as bridge trusses, airplane wings, and optical devices. Unfortunately, the quality of solutions depends heavily on how the problem is parameterized. In this paper, we propose using the implicit bias over functions induced by neural networks to improve the parameterization of structural optimization. Rather than directly optimizing densities on a grid, we instead optimize the parameters of a neural network which outputs those densities. This reparameterization leads to different and often better solutions. On a selection of 116 structural optimization tasks, our approach produces the best design 50% more often than the best baseline method.

For agents

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

get_harvested_code_for_paper("1909.04240")
get_code_for_paper("1909.04240")
have("1909.04240")

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

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

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

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

Connect an agent — have() is free.