---
title: Context State Object Recognition
url: https://www.emergentmind.com/topics/context-state-object
type: topic
---

# Context State Object Recognition

Searching arXiv for the target paper and closely related object/state recognition work.
Joint object–state recognition is a visual classification problem in which an image is assigned both an object label and a state label, under the premise that the two are statistically and semantically coupled. In cooking imagery, the coupling is especially strong: object identity constrains plausible states, and state cues can sharpen object recognition. “Joint Object and State Recognition using Language Knowledge” formalizes this dependence by combining a two-headed convolutional architecture with semantic relatedness derived from Concept-Net, so that visual confidences and language-based object–state likelihoods jointly determine the final predictions [1905.08843].

## 1. Problem setting and formalization

The method assumes a single RGB image $x$ containing one cooking object in an unknown state. The prediction target is a pair of labels: an object label $o \in O=\{o_1,\dots,o_{N_{\mathrm{obj}}}\}$ and a state label $s \in S=\{s_1,\dots,s_{N_{\mathrm{state}}}\}$. The formulation is explicitly joint, because object and state are treated as correlated rather than independent variables. The paper therefore introduces the marginal posteriors $P(o \mid x)$ and $P(s \mid x)$ together with the joint posterior $P(o,s \mid x)$, and seeks estimates $\hat P(o \mid x)$ and $\hat P(s \mid x)$ obtained by combining visual evidence with language knowledge [1905.08843].

This framing departs from a purely appearance-based classifier in two ways. First, it assumes that some object–state combinations are semantically more likely than others, such as “creamy butter” relative to “creamy potato.” Second, it permits the final decision to be derived either from the joint posterior by selecting $(\hat o,\hat s)$ through an argmax over object–state pairs, or from independent marginal decisions. The core methodological claim is that object and state should be recognized together because each serves as context for the other [1905.08843].

## 2. Visual backbone and dual classification heads

The visual component begins with standard preprocessing. Each image is resized to $224 \times 224$, zero-centered, and normalized by Imagenet means. Standard data augmentation through random crops and flips is used to balance classes. The base network is ResNet-50 up through the global average-pooling layer, with all layers except the final block frozen to Imagenet-pretrained weights [1905.08843].

From the shared feature vector $f(x) \in \mathbb{R}^{2048}$, the network branches into two parallel fully connected plus softmax heads. One head predicts object confidences,
$$
P_{\mathrm{cnn}}(o_i \mid x)=\frac{\exp(w_{o_i}^{\top}f(x)+b_{o_i})}{\sum_{j=1}^{N_{\mathrm{obj}}}\exp(w_{o_j}^{\top}f(x)+b_{o_j})},
$$
and the other predicts state confidences,
$$
P_{\mathrm{cnn}}(s_k \mid x)=\frac{\exp(w_{s_k}^{\top}f(x)+b_{s_k})}{\sum_{\ell=1}^{N_{\mathrm{state}}}\exp(w_{s_\ell}^{\top}f(x)+b_{s_\ell})}.
$$
The two heads are trained jointly with cross-entropy losses $L_{\mathrm{obj}}(x)$ and $L_{\mathrm{state}}(x)$, summed as
$$
L_{\mathrm{CNN}}(x)=L_{\mathrm{obj}}(x)+L_{\mathrm{state}}(x).
$$
The resulting architecture is therefore a shared ResNet feature extractor with a double-classification layer, optimized so that object and state supervision act on the same representation [1905.08843].

The significance of this design is architectural economy rather than explicit structured prediction inside the CNN itself. Correlation between object and state is not imposed by a joint decoder at the visual stage; instead, the network produces two marginals that are subsequently re-scored using language knowledge.

## 3. Concept-Net as a semantic prior over object–state pairs

The language component is built from Concept-Net, described as a large graph whose nodes are words or phrases and whose edges carry weighted assertions such as RelatedTo and UsedFor. The method extracts from the RelatedTo relation a numerical relatedness score $R(o,s)$ for each object–state pair. Google N-gram frequencies can also be used instead, with the same procedure [1905.08843].

For each pair $(o_i,s_k)$, the semantic score is defined as
$$
S(o_i,s_k)=\mathrm{normalized}\max_{w \in \mathrm{WordSet}(o_i),\,v \in \mathrm{WordSet}(s_k)} \mathrm{ConceptNetRelatedness}(w,v),
$$
where $\mathrm{WordSet}(o_i)$ and $\mathrm{WordSet}(s_k)$ contain synonyms such as singular and plural lexical variants. The scores are then normalized so that
$$
\sum_{i=1}^{N_{\mathrm{obj}}}\sum_{k=1}^{N_{\mathrm{state}}} S(o_i,s_k)=1.
$$
The paper interprets $S$ as a joint prior, or semantic likelihood, that an object and a state co-occur in natural language [1905.08843].

This semantic layer functions as an external source of structured knowledge. It does not inspect the image; instead, it encodes linguistic regularities about which states are compatible with which objects. A plausible implication is that the system uses language statistics as a surrogate for commonsense constraints that are difficult to learn robustly from a limited visual dataset alone.

## 4. Fusion of visual confidences and language knowledge

The fusion stage combines the CNN outputs with the semantic prior through conditional tables derived from $S(o,s)$. The method first computes
$$
P_c(o_i \mid s_k)=\frac{S(o_i,s_k)}{\sum_{j=1}^{N_{\mathrm{obj}}}S(o_j,s_k)},
\qquad
P_c(s_k \mid o_i)=\frac{S(o_i,s_k)}{\sum_{\ell=1}^{N_{\mathrm{state}}}S(o_i,s_\ell)}.
$$
The ResNet priors are denoted
$$
P_r(o_i)=P_{\mathrm{cnn}}(o_i \mid x), \qquad P_r(s_k)=P_{\mathrm{cnn}}(s_k \mid x).
$$
The language-augmented marginals are then obtained by Bayes-style fusion:
$$
P_o(o_i)=\sum_{k=1}^{N_{\mathrm{state}}} P_r(s_k)\,P_c(o_i \mid s_k),
$$
$$
P_o(s_k)=\sum_{i=1}^{N_{\mathrm{obj}}} P_r(o_i)\,P_c(s_k \mid o_i).
$$
The intuition given in the paper is that each object hypothesis is re-scored by summing over all possible states, weighted by both the CNN state confidence and the semantic relatedness between that state and the object; the state update is symmetric [1905.08843].

The pipeline then performs a second fusion step. For objects, it constructs
$$
v_o=[P_r(o_1)\dots P_r(o_{N_{\mathrm{obj}}}),\,P_o(o_1)\dots P_o(o_{N_{\mathrm{obj}}})]^\top \in \mathbb{R}^{2N_{\mathrm{obj}}},
$$
and for states,
$$
v_s=[P_r(s_1)\dots P_r(s_{N_{\mathrm{state}}}),\,P_o(s_1)\dots P_o(s_{N_{\mathrm{state}}})]^\top \in \mathbb{R}^{2N_{\mathrm{state}}}.
$$
These are stacked into $v_{\mathrm{final}} \in \mathbb{R}^{2(N_{\mathrm{obj}}+N_{\mathrm{state}})}$ and passed to two small three-layer MLPs, one for object correction and one for state correction, each trained with cross-entropy to output $\hat P(o \mid x)$ or $\hat P(s \mid x)$ [1905.08843].

A further safeguard is introduced because the language graph can itself be misleading. The paper gives the example that “grated butter” may be overrepresented in Concept-Net. To address this, a refinement-selector gate is trained as a small CNN-based binary classifier that predicts, per image, whether the raw CNN head or the MLP output is more trustworthy. At test time, the gate selects between the two confidence sets on a per-sample basis [1905.08843]. This mechanism directly addresses a common misconception about language priors: they are not treated as uniformly reliable, but as potentially corrective and potentially error-inducing.

## 5. Dataset, protocol, and empirical results

The experiments are conducted on a cooking-object dataset of approximately 9,500 images, covering 15 object classes and 11 states. Two “mixed/other” states are dropped, leaving $N_{\mathrm{obj}}=15$ and $N_{\mathrm{state}}=9$. The split is 70% train, 15% validation, and 15% test, with flips and crops used to balance both object and state classes. Evaluation uses average per-class accuracy, defined as the average of recall over classes [1905.08843].

The reported test results show a consistent improvement from adding language knowledge on top of the two-head ResNet. The gains are larger for state recognition than for object recognition, but both tasks improve.

| Model | State acc. | Object acc. |
|---|---:|---:|
| ResNet (two-head only) | 79.4% | 74.1% |
| ResNet+Concept-Net (SVM fusion) | 79.7% | 74.2% |
| ResNet+Google N-gram + MLP | 80.1% | 74.2% |
| ResNet+Concept-Net + MLP | 80.4% | 74.3% |
| ResNet+Concept-Net + MLP + Refinement | 80.9% | 75.0% |

The paper states that incorporating a language prior always improves over the raw ResNet baseline. The best single-shot pipeline without refinement yields a $+1.0\%$ gain in state accuracy and a $+0.2\%$ gain in object accuracy. The refinement stage adds a further $+0.5\%$ for states and $+0.7\%$ for objects, reaching final scores of $80.9\%$ and $75.0\%$ respectively [1905.08843].

A qualitative example illustrates how the semantic prior changes the decision process: the raw CNN confuses “diced strawberry” with “tomato paste,” while Concept-Net re-scoring pushes the joint likelihood toward “tomato paste” [1905.08843]. This example is important because it shows that the method is not merely smoothing logits; it actively biases prediction toward semantically coherent object–state pairs.

## 6. Position within object-state and context-aware recognition

The 2019 formulation is narrowly defined: one cooking object, one image, and a single object label plus a single state label. Later work broadened the object-state problem in ways that expose the scope of this earlier model. “Learning Multiple Object States from Actions via Large Language Models” formulates object state recognition as a multi-label classification task because multiple states can coexist simultaneously, and it accumulates past state descriptions so that the current state depends on temporal context [2405.01090]. Relative to that later formulation, the 2019 pipeline addresses semantic compatibility between object and state, but not coexistence of multiple states or long-range temporal accumulation.

The method also differs from context-aware recognition approaches that model visual context rather than lexical co-occurrence. Context-LGM introduces correlated latent variables for object and context and conditions the contextual posterior on the object representation [2110.04042]. CATNet studies how contextual modulation depends on the amount, quality, and temporal dynamics of scene context in object recognition [1911.07349]. Spatial Memory Network models instance-level context and object–object relationships through a sequential memory update process [1704.04224]. ContextHOI uses a dedicated context branch to learn informative spatial context for human–object interaction recognition without manual background labels [2412.09050]. A plausible implication is that the 2019 paper occupies an intermediate methodological position: it is more structured than a pure two-head visual classifier, yet less expressive than later temporal, latent-variable, or spatial-memory formulations of context.

Its principal conceptual contribution is therefore specific and delimited. It shows that object recognition and state recognition can be improved by treating them as a joint prediction problem and by introducing a language knowledge graph as a semantic prior [1905.08843]. Its limitations are equally clear from the setup: the task is restricted to cooking imagery, the dataset contains a fixed set of 15 objects and 9 retained states, the semantic signal is sourced from external language statistics rather than learned end-to-end from multimodal corpora, and the language graph can encode spurious associations that must be filtered by a refinement gate [1905.08843]. Within those boundaries, the paper provides a concrete early example of how contextual language knowledge can improve fine-grained visual state recognition in robotic cooking scenarios.

Source: https://www.emergentmind.com/topics/context-state-object