SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2207.06512 · 2022

A Generalized Framework for Microstructural Optimization using Neural Networks

arXiv · PDF · Open in the Atlas

Code that ran

8 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; 1 honoured the contract we drafted, 0 violated it and 7 have no contract verdict; 0 failures of our instrument; 0 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/2207.06512.json · badge: /api/ran/2207.06512.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
uw-ersl/microtounn canonical (classifier label)
classifier basis not recorded on the link
8 ran · 0 no recorded run
FunctionStatusWhere it lives
applySensitivityFilter Ran
ran on a synthesized input
uw-ersl/microtounn/OC_optimization.py
code served (permissive licence) · get_code("68ee45d468778a3b")
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 2, 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 numpy as np

# Analyze the function:
# - ft: dict with keys 'type', 'H', 'Hs' (and possibly more)
# - x: array-like, used in element-wise operations
# - dc: array-like, used in matrix multiplication with ft['H']
# - dv: array-like, used in matrix multiplication with ft['H']
# 
# ft['H'] is used in np.matmul, so it's a 2D array
# ft['Hs'] is used in division, so it's array-like
# x, dc, dv are used in element-wise ops and matmul

# Create small test data
# Let's say H is (5, 4) - maps from 4D to 5D
# x should be (4,) - matches second dim of H
# dc should be (4,) or (5,) depending on type
# dv should be (4,) or (5,) depending on type

H = np.random.randn(5, 4)  # (5, 4) matrix
Hs = np.ones(5)  # (5,) for normalization

x = np.ones(4)  # (4,) - element-wise with dc in type 1
dc = np.ones(4)  # (4,) - will be multiplied by H which expects (4,) input
dv = np.ones(4)  # (4,) - similar

# For type 1: dc gets (H @ (x * dc / Hs / max(0.001, x)))
# This means dc (4,) * x (4,) -> (4,), divide by Hs (5,) -> ERROR
# Actually looking closer: the result of np.matmul(H, ...) should match original dc shape
# So dc must be shaped to work with the matmul result

# Let me reconsider: if H is (5, 4), then matmul(H, v) where v is (4,) gives (5,)
# So dc should be (5,) initially, but then we compute based on x which is (4,)
# Looking at type 1: np.multiply(x, dc) - x is (4,), dc is (5,)? Won't broadcast well
# 
# More likely: x and dc are both (n,), H is (n, n), Hs is (n,)

n = 4
H = np.random.randn(n, n)
Hs = np.ones(n)
x = np.ones(n) + 0.1  # avoid division by near-zero
dc = np.ones(n)
dv = np.ones(n)

ft_type1 = {
    'type': 1,
    'H': H,
    'Hs': Hs
}

ft_type2 = {
    'type': 2,
    'H': H,
    'Hs': Hs
}

# Test with type 1
ARGS = {
    'ft': ft_type1,
    'x': x,
    'dc': dc,
    'dv': dv
}
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 tuple, ndim 2, 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
computeFilter Ran
ran on a synthesized input
uw-ersl/microtounn/OC_optimization.py
code served (permissive licence) · get_code("f3c09959419a7cf6")
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

# The function computeFilter takes three parameters:
# - nx: integer, number of grid points in x direction
# - ny: integer, number of grid points in y direction
# - rmin: float, minimum radius for filter computation

ARGS = {
    "nx": 4,
    "ny": 3,
    "rmin": 1.5
}
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 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
computeFilter Ran
ran on a synthesized input
uw-ersl/microtounn/projections.py
code served (permissive licence) · get_code("987cf90458ada531")
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 torch
import numpy as np

torch.manual_seed(0)

def to_torch(x):
    return torch.tensor(x).float()

def computeFilter(nx, ny, rmin):
    H = np.zeros((nx * ny, nx * ny))
    for i1 in range(nx):
        for j1 in range(ny):
            e1 = i1 * ny + j1
            imin = max(i1 - (np.ceil(rmin) - 1), 0.0)
            imax = min(i1 + np.ceil(rmin), nx)
            for i2 in range(int(imin), int(imax)):
                jmin = max(j1 - (np.ceil(rmin) - 1), 0.0)
                jmax = min(j1 + np.ceil(rmin), ny)
                for j2 in range(int(jmin), int(jmax)):
                    e2 = i2 * ny + j2
                    H[e1, e2] = max(0.0, rmin - np.sqrt((i1 - i2) ** 2 + (j1 - j2) ** 2))
    Hs = np.sum(H, 1)
    return (to_torch(H), to_torch(Hs))

ARGS = {
    'nx': 2,
    'ny': 3,
    'rmin': 1.5
}
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 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
getLameMaterialProperties Ran
ran on a synthesized input
uw-ersl/microtounn/torchHomogenization.py
code served (permissive licence) · get_code("c17f689283be9b04")
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 2, 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 numpy as np

# Construct valid arguments for getLameMaterialProperties
# The function takes two parameters: E (Young's modulus) and nu (Poisson's ratio)
# Both should be numpy arrays where we iterate through E.shape[0]

# Create small numpy arrays for E and nu
E = np.array([200.0, 100.0])  # Young's modulus values
nu = np.array([0.3, 0.25])     # Poisson's ratio values

ARGS = {
    "E": E,
    "nu": nu
}
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 tuple, ndim 2, 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
oc Ran
ran on a synthesized input
uw-ersl/microtounn/OC_optimization.py
code served (permissive licence) · get_code("1890f4677e925c54")
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

# Set random seed for reproducibility
np.random.seed(0)

# Create small arrays for the optimization problem
# rho: design variable array
rho = np.random.rand(12)

# dc: sensitivity w.r.t. compliance (derivative)
dc = np.random.rand(12) * -1.0

# dv: sensitivity w.r.t. volume (derivative)
dv = np.random.rand(12) * 0.1 + 0.01

# ft: filter/type dictionary
# The function checks ft['type'] and uses ft['H'] and ft['Hs'] when type == 2
ft = {
    'type': 2,
    'H': np.random.rand(12, 12),
    'Hs': np.sum(np.random.rand(12, 12), axis=1)
}

# vf: volume fraction constraint (target average density)
vf = 0.3

ARGS = {
    'rho': rho,
    'dc': dc,
    'dv': dv,
    'ft': ft,
    'vf': vf
}
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 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
to_np Ran
ran, honoured the contract we drafted
uw-ersl/microtounn/torchHomogenization.py
pointer only (licence: MIT); the stored copy get_code serves, from ytong6/Taylor-net, is pointer only (licence: NONE) · get_code("d47dad9ee74d1b3d")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from ytong6/Taylor-net, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

to_torch Ran
ran on a synthesized input
uw-ersl/microtounn/projections.py
code served (permissive licence) · get_code("6f6b806cb66560ab")
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 1, dtype family float, shape (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 to_torch takes a parameter 'x' and converts it to a torch tensor
# It can accept various input types that are convertible to tensors

# Create valid test inputs
list_input = [1.0, 2.0, 3.0, 4.0]
numpy_input = np.array([[1.0, 2.0], [3.0, 4.0]])
nested_list = [[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]]
scalar = 5.0

ARGS = {
    "x": list_input
}
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 1, dtype family float, shape (4,) — shape (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
to_torch Ran
ran on a synthesized input
uw-ersl/microtounn/torchHomogenization.py
code served (permissive licence) · get_code("00386a39779ae95c")
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 1, dtype family float, shape (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 to_torch takes a single parameter 'x' and converts it to a torch tensor
# Looking at the function body:
# - It calls torch.tensor(x) which accepts array-like inputs
# - It calls .double() on the result to convert to float64
# The parameter x should be array-like (list, numpy array, etc.)

# Create a small array-like input
x = [1.0, 2.0, 3.0, 4.0]

ARGS = {
    "x": x
}
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 1, dtype family float, shape (4,) — shape (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 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, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 1 later) and 7 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
to_np 4 other papers
1 dated earlier, 3 later
2005.04986 (2020-05)
Symplectic Neural Networks in Taylor Series Form for Hamiltonian Systems
2302.02561 (2023-02)
Domain-Indexing Variational Bayes: Interpretable Domain Index for Domain Adaptation
2307.13943 (2023-07)
Topology-aware Robust Optimization for Out-of-Distribution Generalization
and 1 more not named here

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

Microstructures, i.e., architected materials, are designed today, typically, by maximizing an objective, such as bulk modulus, subject to a volume constraint. However, in many applications, it is often more appropriate to impose constraints on other physical quantities of interest. In this paper, we consider such generalized microstructural optimization problems where any of the microstructural quantities, namely, bulk, shear, Poisson ratio, or volume, can serve as the objective, while the remaining can serve as constraints. In particular, we propose here a neural-network (NN) framework to solve such problems. The framework relies on the classic density formulation of microstructural optimization, but the density field is represented through the NN's weights and biases. The main characteristics of the proposed NN framework are: (1) it supports automatic differentiation, eliminating the need for manual sensitivity derivations, (2) smoothing filters are not required due to implicit filtering, (3) the framework can be easily extended to multiple-materials, and (4) a high-resolution microstructural topology can be recovered through a simple post-processing step. The framework is illustrated through a variety of microstructural optimization problems.

For agents

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

get_harvested_code_for_paper("2207.06512")
get_code_for_paper("2207.06512")
have("2207.06512")

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

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

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

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

Connect an agent — have() is free.