Hunchback (Hb) is a bifunctional transcription factor that activates and represses distinct enhancers. Here, we investigate the hypothesis that Hb can activate and repress the same enhancer. Computational models predicted that Hb bifunctionally regulates the even-skipped (eve) stripe 3+7 enhancer (eve3+7) in Drosophila blastoderm embryos. We measured and modeled eve expression at cellular resolution under multiple genetic perturbations and found that the eve3+7 enhancer could not explain endogenous eve stripe 7 behavior. Instead, we found that eve stripe 7 is controlled by two enhancers: the canonical eve3+7 and a sequence encompassing the minimal eve stripe 2 enhancer (eve2+7). Hb bifunctionally regulates eve stripe 7, but it executes these two activities on different pieces of regulatory DNA-it activates the eve2+7 enhancer and represses the eve3+7 enhancer. These two "shadow enhancers" use different regulatory logic to create the same pattern.enhancer | computational model | bifunctional transcription factor | Drosophila development | Hunchback T ranscription factors (TFs) are typically categorized as activators or repressors, but many TFs can act bifunctionally by both activating and repressing target genes (1-4). Changes in TF activity can result from posttranslational modifications, protein cleavage, or translocation of cofactors into the nucleus (5-7). However, in cases where a TF activates and represses genes in the same cells, bifunctionality is controlled by enhancer sequences, which are responsible for tissue-specific gene expression (8). For example, in Drosophila, Dorsal activates genes when it binds to enhancers alone or near Twist (9, 10) but represses genes when it binds near other TFs (11-13). The DNA sequence of a TF's binding site can also alter TF activity [e.g., the glucocorticoid receptor (14, 15)]. Identifying how the activity of bifunctional TFs is controlled will be critical for inferring accurate gene regulatory networks from genomic data (16).Here, we investigate how TF bifunctionality is controlled using a classic example: the Drosophila gene hunchback (hb) (1, 17, 18). Hb both activates and represses even-skipped (eve) by acting on multiple enhancers. Hb activates eve stripes 1 and 2 and represses stripes 4, 5, and 6 (19-22). Computational models from us and others support the hypothesis that Hb both activates and represses the enhancer that controls eve stripes 3 and 7 (eve3+7) (Fig. 1) (22-25).In contrast to others, our computational models of eve3+7 activity do not include regulatory DNA sequence (26-30). Instead, our modeling approach uses regression to identify the activators and repressors that control a given pattern; we refer to the identity and role of the regulators as "regulatory logic." Modeling regulatory logic without including DNA sequence enables a powerful strategy to dissect gene regulation in a complex locus. We can compare the regulatory logic of an enhancer reporter pattern to that of the corresponding portion of the endogenous pattern to determine whether the an...