Isabelle Mejean
email: isabelle.mejean@polytechnique.edu

Cyrille Schwellnus
email: cyrille.schwellnus@oecd.org

Martine Carré

Matthieu Crozet

Jean Imbs

Daria Taglioni

PRICE CONVERGENCE IN THE EUROPEAN UNION: WITHIN FIRMS OR COMPOSITION OF FIRMS?*

Keywords: Convergence des prix, Hétérogénéité des firmes, Intégration européenne Price convergence, Firm heterogeneity, European integration Classification JEL: F12, F33, F40

Cet article utilise des données françaises de prix à l'export, désagrégées au niveau de la firme et du produit pour quantifier l'impact de l'intégration économique sur la convergence des prix. Nous utilisons l'expérience naturelle de l'intégration européenne et des données individuelles pour distinguer deux marges possibles d'ajustement : A la marge intensive, l'intégration économique est susceptible de modifier les stratégies de prix des firmes, tandis qu'à la marge extensive, elle peut induire un effet de composition entre firmes ayant des stratégies de prix différentes. Dans l'échantillon considéré, la convergence des prix est 40% plus rapide à l'intérieur de l'Union européenne que dans le groupe de contrôle. 30% de cet effet s'explique par le fait que les firmes servant les marchés européens ont, en moyenne, une propension plus faible à discriminer par les prix.

Introduction

In 1992 the twelve member states of the European Union (EU) completed the Single Market Program (SMP) that had been launched in 1986 to eliminate remaining barriers to economic integration. In particular, the approximately 300 measures in the 1985 White Paper aimed at reducing the real cost of trading across borders (e.g. remaining quotas, border checks, different norms and regulations) and the cost of entering specific markets (e.g. remaining capital controls, different legal frameworks). These measures were widely expected to lead to a considerable reduction in market segmentation across EU members (Cecchini et al., 1988). The introduction of a common currency, the Euro, among a subset of EU members in 1999 was supposed to give a further boost to market integration by increasing price transparency, reducing transaction costs and eliminating exchange rate fluctuations. The reduction in market segmentation resulting from the European economic integration process should be reflected in a reduction of the ability of firms to set market specific prices and an increase in the speed of convergence to the law of one price (LOOP).

Our first objective in this paper is to provide a quantitative estimate of the effect of European economic integration on the speed of price convergence. To this end, we use the prices set by French exporters in different export markets at a highly disaggregated product level to test whether there is any difference in the speed of price convergence between EU export markets and an appropriately defined control group. Our second objective is to examine in more detail the proposition that part of the reduction in market segmentation is attributable to a reduction in fixed entry costs. In contrast to previous studies, our unique micro-level data enable us to decompose the effect of European integration into a within firm effect, the intensive margin, and an effect on firm composition, the extensive margin. Given that nowadays most of the remaining barriers to market integration are of the entry restricting type [START_REF] Delgado | Single Market Trails Home Bias, Bruegel Policy Brief[END_REF][START_REF] Dierx | Steps towards a Deeper Economic Integration: The Internal Market in the 21st Century. A contribution to the Single Market Review[END_REF], in particular in services markets, the quantification of extensive margin effects is of considerable policy interest.

In recent years, several studies on the price impact of European economic integration, in particular of the introduction of the Euro, have become available. The first type of studies (Goldberg andVerboven, 2005, Gil-Pareja and[START_REF] Gil-Pareja | Price convergence in the European car market[END_REF] focus on one particular sector, the European automobile market, and find that the introduction of the Euro has increased price convergence. [START_REF] Baye | Did the Euro Foster Online Price Competition? Evidence from an International Price Comparison Site[END_REF] study the impact of the Euro on prices charged for 28 mostly electronic products by online retailers and find that there was no impact on price convergence. The second type of studies (Lutz, 2003, Engel and[START_REF] Engel | European product market integration after the euro[END_REF] consider retail prices in a wider range of sectors and find that the introduction of the Euro has had a small to negligible effect on price convergence. A third type of studies uses price indices, for two broad product categories in the case of [START_REF] Foad | Europe Without Borders? The Effect of the Euro on Price Convergence[END_REF] or more disaggregate product categories in the case of [START_REF] Allington | One Market, One Money, One Price?[END_REF] or Gil-Pareja & Sosvilla-Rivero (2004b) and finds that European integration and the introduction of the Euro have increased price convergence. To our knowledge only two studies use export unit values to analyse price convergence in the European Union. Gil-Pareja & Sosvilla-Rivero (2004a) use export unit values at the 8-digit product level from seven European Union countries to OECD destinations over the period 1988-2001. Their results suggest that convergence tends to be stronger between European Union destinations. However, they do not find an additional effect of exchange rate stability through participation in the European Exchange Rate Mechanism on price convergence. [START_REF] Knetter | Measuring product-market integration[END_REF] use export unit values in 16 US and 29 German industries to 17 developed and developing countries over the period 1973-1987 and find that there was a stronger decline in unit value dispersion across European export destinations. While the studies give a good picture of the extent of price convergence, results can, however, hardly be interpreted in terms of the underlying microeconomic mechanisms. Except in the case studies on the automobile sector or electronic goods, the data do not permit to identify the producer of the considered goods. As a consequence, it is impossible to say whether observed effects reflect a change in the pricing behaviour of firms or in the composition of exporters. This paper adds to the previous literature in three respects. Firstly, we use the (almost) exhaustive coverage of traded goods of the French customs data to answer the question of whether the results from the aforementioned sectoral case studies are generalisable or whether the effect of European integration is heterogeneous across goods. Secondly, we use firms' unit values in different export markets at the disaggregated product level as proxies for prices. Since they are derived from free on board (FOB) export values, they have the advantage to be uncontaminated by local cost factors, distribution margins or taxes. This price proxy should thus reflect only firms' strategic pricing behaviour. Further, the common critique that unit values do not account for within product quality differences is greatly mitigated at our level of disaggregation. We define as a product an extremely narrow product category at the 8-digit classification level exported by the same firm. For instance, our 8-digit product classification does not only distinguish between refrigerators and freezers but additionally distinguishes between 10 different types of freezers of different shape and capacity. Even for a priori undifferentiated products, there are often a multitude of different product categories in our data. For instance, there are more than 100 woven fabrics of different color, yarn, thickness, etc. Thirdly, this paper relates the EU's price impact to firm characteristics. In particular, the firm-level dimension of our dataset allows us to distinguish between two alternative hypotheses. On the one hand, the price impact of European integration may be attributable to intra-firm differences in strategic pricing between destination markets within and outside the EU.

On the other hand, the effect of the EU on average prices may be explained by differences in the distribution of firms serving intra-and extra-EU destination markets. In particular, it may be that firms with a high propensity to engage in price discrimination also have a high propensity to serve extra-EU markets. In other words, the EU's price effect may be due to an intensive margin effect, an extensive margin effect or a combination of both.

The data at hand make it possible to distinguish between these alternative hypotheses.

Two sets of results are presented. The first set of estimations derives results under the assumption of homogeneous firms. Convergence regressions show that the speed of price convergence is higher within the EU than outside. One possible explanation would be that arbitrage pressure is stronger within the EU. In this case, the EU indicator picks up the smaller ability of firms serving EU markets to price discriminate between these markets. This is a within firm or intensive margin effect. A different explanation would attribute the higher speed of convergence to selection of firms with low convergence speeds into non-EU markets, which is an extensive margin effect. To control for selection, the second set of results presented in this paper is derived under the assumption of heterogeneous firms. They suggest that 30 percent of the EU effect is attributable to selection. The degree of price discrimination is shown to be higher for larger firms which, in turn, are more likely to serve extra-EU destination markets.

The remainder of the paper is organised as follows. In the next section, we provide the main intuitions for the expected impact of European integration on French exporters' pricing strategies. Section 3 describes the data. Section 4 presents estimates of the effect of economic integration on price convergence under the assumption of homogeneous firms. Section 5 accounts for firm-level determinants of pricing behaviours. Finally, Section 6 concludes.

Concepts

A Simple Model of Market Segmentation

To illustrate the main mechanisms underlying the likely price impact of European integration, it is useful to sketch a simple partial equilibrium model. We consider a French exporter that can sell its product in N foreign markets under imperfect competition. As in the New Trade literature (see [START_REF] Krugman | Increasing Returns and Economic Geography[END_REF], exporting is supposed to involve a fixed cost of entry into each national market. This induces a selection mechanism in which a firm decides to export towards a specific market if and only if the additional profit foreign sales generate is high enough to compensate for the entry cost. If, in addition, firms are heterogeneous in terms of productivity, the selection process mirrors the distribution of individual productivities, with only the more productive firms serving markets with more difficult market access (see [START_REF] Melitz | The Impact of Trade on Intra-Industry Reallocations and Aggregate Industry Productivity[END_REF]. In this case, it can be shown that the mean size of entering firms is increasing in the market's difficulty of access, as measured by fixed entry costs.

In order to generate price discrimination at the firm-level, we assume preferences to be market-specific.

In a perfectly segmented world, optimising firms thus fix a specific price in each market that depends on the perceived price elasticity. If, on the contrary, markets are perfectly integrated, the firm has no choice but to set the same price in all foreign markets, irrespective of differences in demand across markets. The chosen mark-up then depends on the perceived elasticity of world demand, which is an average of market-specific elasticities weighted by the share of each market in the firm's export sales. In the intermediate case of imperfect market segmentation, the firm can set different prices in different export markets but price differentials are limited by arbitrage (see [START_REF] Anderton | The impact of monetary union on trade prices[END_REF].

As in [START_REF] Anderton | The impact of monetary union on trade prices[END_REF], market segmentation is assumed to be endogenously chosen by the firm. 1Namely, exporters can pay a fixed segmentation cost allowing them to discriminate between markets. In [START_REF] Szymanski | Parallel trade, price discrimination, investment and price caps[END_REF], this additional cost of segmentation is modeled as a vertical differentiation cost allowing the firm to develop a lower quality good for sales in low willingness to pay markets. It can also be thought of as the cost of lobbying for regulations protecting the firm against parallel trade. 2 The decision whether to pay the fixed segmentation cost is taken by comparing ex-post profits with and without segmentation.

Firms make their pricing decision in three stages. In a first stage, firms decide whether to enter a market, given the fixed entry cost. Then, they choose whether to price discriminate between export markets. Finally, they set the optimal price, conditional on the chosen segmentation strategy. In the segmentation case, the total profit of a firm f that entered in N S f foreign markets is:

Π S f = N S f c=1 (P f c -M c f )Q S f c -F c -F S (1)
where P f c is the first-best price that maximises profits in country c. M c f is the firm-specific marginal cost of producing. Q S f c is the demand of consumers in c when the price is P f c . F c is the fixed entry cost in market c while F S is the segmentation cost.

In the case of integrated markets, the export price P f is chosen by maximising aggregate profits:

Π I f = N I f c=1 (P f -M c f )Q I f c -F c (2)
where Q I f c is the demand exerted by consumers in c when the price is P f .

Of course, operational profits are always lower under integrated markets. Absent any segmentation cost, the firm would always choose to discriminate between markets. However, when segmentation is costly, it can be the case that the firm prefers lower operational profits to paying F S . This occurs when increases in operational profits due to segmentation are low relative to the fixed costs of segmentation. A single integrated price is therefore more likely to be the optimal strategy when preferences are similar across foreign markets. Moreover,

given market preferences, it can be shown that the firm's propensity to segment markets is increasing in the volume of its export sales. This means that larger firms are more likely to price discriminate. The intuition is straightforward. At a given markup difference between both regimes |P f c -P f |, the difference in operational profits is proportional to the volume of exports. Larger exporters are therefore suffering larger losses from not segmenting their export markets than smaller ones.

The first stage decision is standard in the recent trade literature with heterogeneous firms and has been discussed extensively by [START_REF] Melitz | The Impact of Trade on Intra-Industry Reallocations and Aggregate Industry Productivity[END_REF]: In the presence of fixed export costs, only the firms that make sufficiently high operational profits enter the export market. This is the case because, everything else equal, they get higher operational profits in each foreign market, allowing them to pay the fixed export cost. This means that the probability to export is, again, an increasing function of the firm's size.

Thus, our conceptual framework features a correlation between the decision to enter remote markets and the segmentation decision. The firms that are more likely to enter markets with more difficult access are also more likely to segment markets. This result suggests a new determinant of price convergence that has not previously been considered in the literature: The composition of firms entering a given export market affects the average level of market segmentation. In particular, a higher fixed cost of entering an export market leads to a higher share of price discriminating firms and thus to a higher average level of market segmentation. Only estimates of price convergence that control for firm heterogeneity in pricing behaviours can disentangle these extensive and intensive margin effects.

Impact of European Integration on Market Segmentation

According to our model, there are two distinct economic channels through which European integration may affect the extent of market segmentation. The first channel is an intensive margin effect linked to individual firms modifying their segmentation strategy. The second one is an extensive margin effect related to a selection mechanism whereby firms with different segmentation strategies serve different export markets.

The most intuitive reason why European integration could change a firm's propensity to engage in price discrimination is an increase in the fixed segmentation cost F S . One of the main objectives of the SMP was to facilitate intra-European trade flows in order to enhance competition. The adoption of the "community exhaustion" policy in the 1990s, whereby a good sold in an EU market can be resold anywhere without restriction, has facilitated parallel trade. Arbitrage behaviours may also have been facilitated by increased price transparency associated with monetary integration. At the same time European authorities have maintained a dual system in which countries outside the EU do not benefit from the same advantages. The community exhaustion policy does not apply to extra-EU sales and import restrictions for extra-EU imports. As a consequence, European integration may have increased price convergence within the union while maintaining large price differentials between the EU and the rest of the world.

An observed price differentiation between export markets at the aggregate level may also be affected by composition effects. Since larger firms are more likely to price discriminate between export markets, any difference in the composition of firms entering different export markets may be reflected in the observed aggregate extent of price differentiation. In our model, the selection of firms into export markets is correlated with the decision to discriminate between markets. If the European integration process has reduced the fixed costs of entering EU markets, then our model predicts firms that are exporting to EU markets to be on average smaller and engage in a lower degree of market segmentation than firms exporting to extra-EU markets. In this case we would observe lower market segmentation as measured by a higher speed of price convergence in the EU because of firm composition effects.

3 Empirical Strategy and Data

Empirical Strategy

Our empirical strategy follows a vast literature measuring the extent of cross-country price dispersion and the speed of price convergence. Early studies have used aggregate real exchange rates to test the Purchasing Power Parity (PPP) hypothesis in its absolute and relative versions (see Taylor & Taylor, 2004, for a survey). The same framework has also been used on disaggregated data to test whether the law of one price holds for traded goods. 3The standard approach in the literature on price convergence is to use the concept of β-convergence. 4 The typical estimating equation specifies changes in international relative prices as a function of the lagged relative price and a country fixed effect:

∆q cpt = γ c + βq cp,t-1 + ε cpt (3)
where q cpt is the logarithm of period t price of product p in country c relative to the price in a reference country.

∆ is the first-difference operator, γ c is the country fixed effect and ε cpt an i.i.d. residual term. The country fixed effect accounts for equilibrium price differences across countries. Note that it should not be interpreted as a long-run steady state price. Rather, it can be viewed as the equilibrium price that would prevail given the state of the economy if firms adjusted instantaneously to changes in market conditions. Equilibrium prices can differ across countries, among others, because of differences in factor costs or costs of non-traded inputs, differences in the market structure of the distribution sector, or inflation differentials. We argue that, even in perfectly integrated product markets, differences in these determinants of equilibrium prices can be persistent. Moreover, as pointed out by [START_REF] Broda | Understanding international price differences using barcode data[END_REF], equilibrium prices may differ across countries because of differences in the composition of consumed goods. Instead of using differences in the market fixed effects γ c as a measure of market segmentation, we therefore use the speed of convergence β to these market specific equilibrium prices: Under perfectly integrated markets firms that deviate from market specific equilibrium prices are disciplined by competitive pressures from international markets, not least through arbitrage, to instantly re-adjust to their prices (β = -1). Under perfectly segmented markets firms can maintain deviations from the equilibrium price indefinitely without facing competitive pressures from international markets (β = 0).

In the following empirical analysis we test whether European market integration has increased the speed of β price convergence. To this aim, we follow [START_REF] Goldberg | Market integration and convergence to the Law of One Price: evidence from the European car market[END_REF] and include an interaction of the lagged relative price with an indicator variable for the EU15 (EU ) to the above standard estimating equation.

Additionally, we allow country-specific equilibrium prices to vary in an unrestricted way over time by including country-year specific effects instead of country fixed effects:

∆q pct = γ ct + β 0 q pct-1 + β 1 EU × q pct-1 + ε pct (4)
β 1 measures the differential of convergence speeds between countries within and outside the EU. We expect it to be negative if the integration process has reduced market segmentation and increased the speed of β price convergence. 5

Equation ( 4) is first estimated by OLS without including any firm specific explanatory variables. [START_REF] Imbs | PPP Strikes Back: Aggregation and the Real Exchange Rate[END_REF] show that this may bias estimates in convergence regressions since heterogeneity between units of observations is not taken into account. In the next step, we therefore try to account for heterogeneity across firms by using our unique firm-level data. We first estimate equation ( 4) with a mean-group estimator at the firm-level which corrects for potential aggregation bias. 6 We then provide an explanation of this observed 5 Alternatively, we could have tested whether the European integration process has had an effect on σ price convergence. However, the required computation of price dispersion indicators within the EU and outside would have been problematic for the great majority of firms since most of them either do not export or export only to a very limited number of extra-EU markets. 6 If there is a firm-specific dimension to equilibrium prices, the mean-group estimator also eliminates the bias due to OLS estimation heterogeneity in convergence speeds.

Section 2 suggests that aggregate estimates can be influenced by self-selection of firms into export markets.

If firms that have a higher propensity to price discriminate are also more likely to enter extra-EU countries, a significant β 1 coefficient may be due to self-selection, even if market integration does not have any effect on intra-firm pricing behaviours. We test for this possibility by conducting different sampling exercises. More specifically, we estimate equation ( 4) on the sub-sample of firms that serve both EU and non-EU markets. This should eliminate from the sample firms that are not large enough to pay the fixed cost of exporting towards relatively inaccessible markets.

Data

The data provided by the French customs administration contain annual exports by country of destination at the firm and product level for the period 1995-2004. 7 In contrast to many other sources of firm-level information, the French customs data are (almost) exhaustive. 8 Any firm selling goods abroad reports the FOB value and the volume of any individual product for every destination market separately. Each observation is thus identified by a firm identifier (f ), a product identifier at the 8-digit level of disaggregation (p), an export destination (c) and a time period (t). From this, bilateral unit values are computed as ratios of value over volume and used as proxies for FOB export prices:

P f pct = V al f pct /V ol f pct
with V al f pct the value of the flow in Euros and V ol f pct its volume.

Two measures of volumes are available in the French customs dataset. The first measure is the physical weight of the product in kilograms and is reported for (almost) all export flows in the dataset. The second measure, physical units of the exported product, is only reported for a subset of the export flows. Note that using weights instead of physical units to calculate unit values may result in a less precise proxy for prices.

of the price convergence equation which, under this assumption, would require methods for dynamic panel data estimation with firmspecific intercepts (see [START_REF] Arellano | Some Tests of Specification for Panel Data: Monte Carlo Evidence and an Application to Employment Equations[END_REF].

However, this problem can be dealt with by using unit values at the firm-product level in relative terms. More specifically, every unit value within a firm-product category can be divided by an appropriately chosen reference unit value within the same firm-product category. This removes the measurement error that is common to the same firm-product category and makes relative unit values comparable across firm-product pairs. Given that the imprecision of unit values computed using physical weights can thus be reduced, it is decided to use physical weights on the grounds of their better availability in the French customs dataset.

A further common critique of the use of unit values as a proxy for prices is that quality differences between goods are not accounted for (see [START_REF] Kravis | International Trade Prices and Price Proxies[END_REF]. When using absolute unit values, this induces measurement error. However, the use of relative unit values at the firm-product level also reduces this measurement error since the component that is common to all importing markets is removed. As a consequence, the only remaining measurement error is due to firms vertically differentiating products across markets. While we cannot fully eliminate measurement error due to vertical differentiation at the firm-level, we are confident that the high level of disaggregation at the product level strongly reduces it.

Given that the use of relative unit values removes only the component of measurement error that is common to a given firm-product category across destination markets, further effort is put into cleaning them from market specific measurement error. To this end, unit values that are more than three times lower or higher than the median unit value within a firm-product category are dropped from the sample. This results in a loss of around 16.3% of all available unit values. Note that this is more restrictive than in [START_REF] Crucini | Understanding European Real Exchange Rates[END_REF] who restrict unit values to be in a range of one fifth and five relative to the median unit value. Besides eliminating gross measurement error in unit value levels, our restriction also has the advantage of eliminating the most volatile unit values. Whereas around 9% of unit values vary by more than 100% from one period to the next without restriction, only around 3% do so with our restriction on unit value levels.

Finally, VAT fraud may add additional measurement error to our unit value measures. Firms have an incentive to overreport their intra-EU exports because, since the removal of the EU's internal borders, intra-EU trade statistics are collected by VAT authorities and firms receive a VAT rebate corresponding to the domestic VAT rate times reported intra-EU exports. According to the destination principle they pay VAT on sales in the destination country at the foreign VAT rate. However, this should not affect our results in a quantitatively relevant way for the following two reasons. Firstly, firms that overreport the value of their exports probably do so by both overreporting prices and the quantities. It is therefore unlikely that the additional measurement error introduced by VAT fraud is systematic, in the sense that it systematically biases unit values up-or downward.

Secondly, even if unit values for intra-Eurozone export destinations were systematically up-or downward biased, there is no reason to believe that the fraud component changes over time. In other words, even if VAT fraud affects the level of unit values, there is no reason to believe that it affects estimates of convergence.

There are several conceivable choices for the reference unit value used in the calculation of the relative prices. The average unit value, the unit value in the cheapest market or the unit value in a reference market at the firm-product level are the most obvious out of these. Under the first two choices the reference country is allowed to vary over time which makes the relative unit value of a given destination sensitive to the sample entry or exit of destinations. On these grounds, it is chosen to use the unit value in a reference market for the calculation of relative unit values at the firm-product level. A natural choice for the reference market is Belgium: It is the main French export destination in terms of number of flows and thus maximises the number of observations on relative unit values (see Figure 1). As noted by [START_REF] Goldberg | Market integration and convergence to the Law of One Price: evidence from the European car market[END_REF], this approach has the drawback that the results on convergence are not invariant to the choice of the numeraire country.

To address this criticism we also estimate convergence equations using Germany and the UK as alternative benchmarks. Results are presented in Section 6. The relative unit value used as the dependent variable in the regressions reported below is thus defined as: q f pct = p f pct -p f prt where p f pct is the logarithm of P f pct and r is the numeraire country.

A final choice in the construction of the estimation sample is to restrict the sample to OECD export destinations. The reason is that, because of differences in economic structure, export destinations outside the OECD cannot be considered as an appropriate control group for European export destinations.

The resulting estimation sample contains observations on 5,406,590 relative unit values (henceforth denoted as relative prices) of 52,533 firms spanning 11,131 8-digit product categories in 27 destination markets9 over the period 1995-2004.

Last, the French customs data are merged with another firm-level dataset to get information about exporting firms, used in the regressions of section 5. Namely, we use the EAE (Enquête Annuelle d'Entreprises) dataset, a survey conducted by the French statistical institute (INSEE) covering any firm of more than 20 employees.

We use information about employment and value added to approximate the firm's size.

Descriptive Statistics

Figure 2 shows the mean of the absolute price deviation (from Belgium) in percent for the EU15 and the rest of the OECD. On average, prices appear to deviate less from the Belgian price within the EU15 than for other OECD economies. While price deviations appear to have decreased for the EU, they have first increased and then decreased for the rest of the OECD.

Figure 2 does neither account for country specific determinants of export unit values nor sectoral composition effects. With respect to the former, using data from the US Customs Service, [START_REF] Baldwin | Zeros, Quality and Space: Trade Theory and Trade Evidence[END_REF] find that export unit values increase, among others, with distance from the exporting country. If this statistical correlation also holds in the French data, the higher mean deviations from the Belgian price for non-European markets in Figure 2 may not be directly related to differences in the degree of market segmentation resulting from the integration process. Instead, they may be attributable to firms setting higher prices in non-European markets due to their higher average distance from France.

To provide statistically more rigorous evidence on whether the pattern of mean deviations in Figure 2 is attributable to distance and other observable price level determinants, sectoral composition effects, or to differences in the degree of market segmentation between European and non-European countries, the following strategy is adopted. The relative unit values are purged of their systematic price level components. In practice this is implemented through a first stage regression of the relative unit values on logarithms of distance, real GDP, real GDP/capita and a vector of sector dummies. We find that relative unit values increase with distance, real GDP and real GDP/capita. 10 The absolute value of the residual from this regression is the deviation from the Belgian price that remains unexplained by observable systematic determinants and is therefore akin to a measure of market segmentation. Figure A.1 in the appendix shows the average of this measure of market segmentation for EU15 countries and for the rest of the OECD. It can be seen that it is similar to Figure 2. 10 The detailed results from this regression are available from the authors upon request.

Homogeneous Firms Estimates

While the previous section has provided descriptive evidence on differences in relative prices within and outside the EU15, this section deals with the issue of whether European integration has had an effect on the speed of price convergence. To this aim, a standard price convergence equation is estimated, augmented with an interaction between the price lag and an indicator variable for membership in the European Union (equation ( 4) of Section 3).

Column (1) reports the results of regressing the first difference of the relative price on the lag of the relative price and time-varying destination indicators. The data clearly reject a unit root. Note that standard errors are clustered on destination markets, which allows the error terms to be correlated in an unrestricted way across firms, products and time within the same destination market. Clustering on destination markets is more demanding than clustering on firms since we only assume that the error term is independent across countries instead of assuming independence across firms. 11 The speed of convergence to the LOOP is high with a half life of deviations of around 0.84 years or 10 months.12 Our estimated persistence of price deviations is at the lower bound of existing estimates. [START_REF] Crucini | Understanding European Real Exchange Rates[END_REF] find half lives between 9 months and two years in a dataset of retail prices. [START_REF] Imbs | PPP Strikes Back: Aggregation and the Real Exchange Rate[END_REF] report half-lives of three years in a panel of aggregate real exchange rates. Half-lives are however strongly reduced when sectoral heterogeneity is controlled for (between 7 and 27 months).

Columns ( 2) and (3) test more specifically whether the speed of convergence differs between members and non-members of the EU. To this end, the indicator variable of the EU15 is interacted with the lag of the relative price and included in the convergence equation. The estimated coefficients on the price lag and the interaction term in column (2) imply that the speed of convergence is less than 9 months for EU15 countries and around 15 months for the rest of OECD countries.

To carry the analysis one step further, in column (3) we additionally include an interaction between the price lag and an indicator for the Eurozone. 13 With this specification, we test whether the "EU effect" found in column ( 2) is linked to product market integration or to monetary integration. This estimation is performed on the 1999-2004 period, i.e. after the introduction of the Euro. The coefficient associated with the interaction between the Euro dummy and the price lag is not significant. There does not appear to be any effect of monetary integration on the speed of price convergence in the EU, once product market integration is accounted for.

Columns ( 4) and ( 5) can be interpreted as differences-in-differences specifications: it is tested whether the introduction of the Euro increased the difference in estimated convergence speeds between Eurozone and non-Eurozone countries. We do neither detect an effect of the introduction of the Euro as an accounting currency in 1999 nor an effect of the actual introduction of Euro coins and notes in 2002.

The results on a missing Euro effect are somewhat surprising in the light of the pricing-to-market literature, which has general support for price discrimination induced by exchange rate movements (see Goldberg & Knetter, 1997, for a survey). In this sense, the introduction of the Euro should have reduced price discrimination and increased price convergence. However, it should be noted that exchange rate movements in the Eurozone countries were already limited before 1999 through the European Exchange Rate Mechanism (ERM) which fixed bilateral exchange rates within narrow bands and thereby increased arbitrage pressures. Most of the Euro effect on price discrimination may therefore have materialised before 1999.

The absence of a Euro effect in our data may also partly be due to the small size of extensive margin effects. [START_REF] Baldwin | Trade effects of the euro -evidence from sectoral data[END_REF] argue that the introduction of the Euro may both have increased exports of existing exporters and the probability of new exporters to enter Eurozone markets. If predominantly small firms that do not price discriminate across markets entered the Eurozone this should have increased the speed of price convergence. However, we do not detect this type of extensive margin effects in unreported differences-in-differences estimations. 14The results in Table 1 thus show a significant impact of European product market integration on the persistence of price deviations whereas European monetary integration does not seem to have increased price convergence. In the remainder of the paper, we therefore focus on the effects of product market integration in the EU15.

The most straightforward interpretation of the EU effect is that market integration has increased arbitrage pressures and reduced the capacity of firms to maintain price differentials across EU members. In other words, product market integration in the EU may have impacted on the pricing behaviour of firms at the intensive margin. A different interpretation would attribute differences in convergence speeds between EU15 markets and the rest of OECD markets as extensive margin effects. Thus far we have implicitly assumed that convergence speeds were homogeneous across sectors and firms. The following section, in contrast, analyses to which extent the observed EU effect can be attributed to firms adopting different pricing strategies across destination markets or to self-selection of firms with different pricing strategies into different destination markets. In other words, firms that price discriminate more may also be more likely to serve non-EU destination markets. In this case, the speed of convergence for non-EU destinations would be lower and the EU effect would be attributed to differences in the composition of firms serving EU and non-EU markets.

Heterogeneous Firms Estimates

As shown in Section 2, large firms are more likely to price discriminate than smaller ones. Recent trade models with heterogeneous firms (see [START_REF] Melitz | The Impact of Trade on Intra-Industry Reallocations and Aggregate Industry Productivity[END_REF]) also show that large firms have a higher propensity to select into markets with high fixed entry costs. If fixed entry costs for French firms are higher in non-EU markets than in EU markets, perhaps due to product market integration, then the assumption of a homogeneous convergence speed across firms may bias the EU effect at the intensive margin upwards: Firms that discriminate more have a higher propensity to select into non-EU markets. To eliminate this selection bias and to obtain unbiased estimates of the intensive margin effect, it is therefore crucial to control for heterogeneity in the price convergence regressions.15

Mean Group Estimator

To obtain unbiased estimates of the pure intensive margin effect, we re-estimate our convergence regressions with the mean group (MG) estimator. Essentially, the MG procedure consists in estimating the speed of convergence for each firm separately and then taking the arithmetic mean of the individual convergence speeds.

Standard errors are obtained by a bootstrapping procedure. 16 The results from the MG estimator are reported in Table 2.

To estimate separate convergence speeds for the EU15 and the rest of the OECD, we have to restrict the sample to firms that have a sufficient number of observations in both zones. In our preferred specification, we only keep firms with more than 50 observations in each zone over all products and years. Column (1) reports the results of pooled OLS estimation on this restricted sample. The estimated coefficients are very close to the ones obtained in Table 1, although the EU effect is slightly reduced because of the selection of larger firms. Column (2) repeats the estimation on the same sample using the MG estimator. The coefficient on the interaction between the EU15 indicator and the lag of the relative price is reduced from 0.16 to 0.09. i.e. by 40%. In other words, the intensive margin effect of product market integration in the EU does only account for around 60% of the overall effect. The remaining effect can be attributed to a different composition of firms serving intra-EU and extra-EU destination markets.17 Columns (3) and ( 4) repeat the MG estimation on more restricted samples. It can be seen that the results are robust to increasing the number of observations required in each market.

Sample Restrictions

Our explanation of the decreased impact of European Union in estimates that control for the cross-firm heterogeneity in convergence speeds relies on selection effects. If firms that have a higher propensity to price discriminate are also more likely to enter non-EU export markets, a higher convergence speed in the EU can be observed, that does not necessarily reflect stronger arbitrage pressures affecting firms' pricing behaviours.

To test for selection effects, we estimate our convergence regressions on different subsamples of the data.

Results are reported in Table 3. Column (1) is the reference regression from Table 1. Columns (2) and ( 3) respectively replicate the results for firms that export a given product to at least one or five destination markets in both the EU15 and the rest of the OECD in each year. This is more restrictive than in the first column of Table 2 since firms have to satisfy the inclusion criterion for each product and each year separately. It can be seen that the EU effect is considerably reduced. For firms that export to at least one destination market in both zones the estimated EU effect is reduced by around 50% and for firms that export to at least five different destination markets in both zones by 80%. In columns (4) to ( 6) we restrict the sample to firms above the 90% percentile of different measures of firm size: employment, value added and export values. We find again that the overall EU effect is reduced by around 35% if we restrict the sample to these firms. The similar coefficients in columns (4) to ( 6) are probably due to the high correlation among our measures of firm size. 18The results in Table 3 suggest that the magnitude of the EU effect is reduced when controlling for extensive margin effects through estimation on relevant subsamples of the data. Moreover, the result that the estimated EU effect is similar when we restrict the sample to firms that export both to intra-and extra-EU destinations and when we restrict it to firms above given size thresholds, appears to support the selection channel outlined in Section 2. Larger firms have a higher propensity to enter extra-EU markets and also a higher propensity to price discriminate across markets. The following subsection provides more detailed evidence on this mechanism.

Dissecting the Selection Channel

The mechanism we propose to explain the reduction of the EU effect on the speed of price convergence once extensive margin effects are taken into account is as follows. Firstly, large firms are assumed to price discriminate more between export markets. Figure 3 illustrates the positive relationship between employment and the speed of price convergence, obtained by estimating equation ( 3) for each firm.

This result is robust to the inclusion of sector fixed effects which implies that beside heterogeneity between sectors, there is heterogeneity within sectors in estimated convergence speeds. In unreported results we show that estimated sectoral convergence speeds are positively related to average firm size in the sector, suggesting that average firm size may explain part of the cross-sectoral heterogeneity in convergence speeds observed in studies at the sectoral level [START_REF] Chen | The behaviour of relative prices in the European Union: A sectoral analysis[END_REF][START_REF] Engel | European product market integration after the euro[END_REF].

The second element of our proposed mechanism relies on a higher propensity of large firms to enter non-EU export markets. This can be verified by estimating a probit model of the choice of non-EU export markets versus EU export markets, with different measures of firm size as dependent variables. Table A.1 in the appendix shows the results from these estimations. Figure 4 illustrates the positive relationship between the probability to export to non-EU markets and employment graphically. These results are consistent with the theoretical prediction that larger exporters are more likely to enter non-EU markets.

Given that the two elements of our proposed mechanism are supported by the data, we are confident that it is indeed driving our results.

Robustness

In Sections 4 and 5 we have argued that differences in convergence speeds between EU markets and the rest of the OECD can be attributed to product market integration and have discarded the hypothesis that it may be attributed to monetary integration. A different hypothesis would view the EU effect as driven by geography instead of product market or monetary integration. [START_REF] Baldwin | Zeros, Quality and Space: Trade Theory and Trade Evidence[END_REF], for instance, find that the level of export unit values increases, among others, with distance from the exporting country. Whether this level effect influences the speed of price convergence is not clear but in a first robustness check we nevertheless control for the effect of distance on the speed of price convergence. The results are reported in Table 4, column

(1).

From column (1) it can be seen that the coefficient on the interaction between the price lag and distance is significant at the 1% level. The interaction between the price lag and the EU indicator remains significant at the 1% level and its magnitude is only slightly reduced from -0.190 to -0.176 with respect to column (2) of Table 1. We therefore conclude that it is indeed product market integration that is driving our EU effect and not geography. In columns ( 2)-( 5) we include lags of the dependent variable in our convergence regressions to correct for potential autocorrelation in the residuals. 19 It can be seen that the inclusion of lags of the dependent variable reduces both the estimated speed of convergence and the estimated EU effect. However, our main result that the estimated EU effect can be decomposed into an intensive margin and an extensive margin is unaffected:

The EU effect is still reduced by 30 to 40% if the convergence regression is estimated on the subsample of firms that are above different size thresholds. 20As a final robustness check we repeat our estimations choosing different reference countries for the computation of relative unit values. Table 5 shows that the results are almost identical to the results in Table 3 of Section 5.2 when Germany instead of Belgium is chosen as a reference country. In unreported results we also repeated our estimations choosing the UK, which is not member of the Eurozone, as the reference country. We did not detect any significant changes in results.

Conclusion

In this paper we have analysed whether European integration has had an effect on market segmentation in the EU. We resort to an identification strategy that allows us to exploit the cross-country dimension of our data. It compares price convergence inside the European Union and in the rest of the OECD, distinguishing between the extensive and intensive margins of adjustment. Our approach is guided by a simple theoretical model of export pricing with heterogeneous firms. In this setting, we show that larger firms have a higher propensity to engage in market segmenting strategies due to the larger volume of sales over which a given price increase is distributed. At the same time, larger firms have a higher propensity to enter export markets for which the fixed cost of entry is high because they have a higher level of operational profits. Markets with high costs of entry are therefore predicted to have a large share of firms engaging in market segmenting strategies.

This model allows us to decompose the price impact of product market integration into two margins. At the intensive margin, it may reduce within-firm price discrimination through an increase in the cost of segmenting markets. At the extensive margin, product market integration may lead to a reduction in the fixed costs of entering European export markets. This should in turn facilitate the entry of smaller exporters that do not engage in market segmenting strategies. Both effects tend to increase observed aggregate price convergence in the EU as compared to non-EU markets. The difference is in interpretation: Whereas the intensive margin effect may be interpreted as the EU's impact on firms' pricing strategies, the extensive margin effect may be interpreted as its impact on their export decisions.

We first estimate a standard convergence equation assuming homogeneity across firms. The results suggest that the speed of convergence of international relative prices is by around 40% faster within the EU than outside.

To investigate whether the difference in convergence speeds is due to the intensive or the extensive margin, we then account for heterogeneity in firms' pricing decisions. The mean-group estimator suggests that the intensive margin effect of product market integration only accounts for around 60% of the overall effect. This result is confirmed in regressions in which we control for composition effects by analysing only firms that serve both EU and non-EU markets. The EU effect on price convergence is reduced by about one third.

We propose the following mechanism to explain the reduction of the EU effect on the speed of price convergence, once extensive margin effects are taken into account. Using firm-specific convergence speeds from the mean-group estimator, we show that large firms have a higher propensity to price discriminate between export markets. At the same time these firms are also more likely to enter non-EU markets. This correlation between segmentation and entry decisions may explain the extensive margin effects observed in the data. This result is of considerable policy interest, given that nowadays most remaining barriers to market integration in the EU are of the entry restricting type. Our results suggest that there are sizeable effects on market segmentation from reducing these barriers.

While European integration has had an effect on price convergence through the extensive margin, our results also suggest a large impact of European integration on the ability of firms to price discriminate between markets. Structural reforms aimed at improving the functioning of product markets, appear to have been an

effective tool to influence firm behaviour. European monetary integration, in contrast, does not appear to have reduced market segmentation, neither at the extensive nor at the intensive margin. 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 Rest of OECD EU 15 1995-2004 1995-2004 1999-2004 1995-2004 1995-2004 Robust standard errors in parentheses (adjusted for clustering at destination level) * significant at 10%; * * significant at 5%; * * * significant at 1%. ) 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 Rest of OECD EU 15

Figure

  Figure 2: Mean deviation from Belgian price

Figure 3 :

 3 Figure 3: Estimated speed of convergence and firms' employment

Figure 4 :

 4 Figure 4: Probability to export to both intra-and extra-European markets vs. intra-EU only

Figure A. 1 :

 1 Figure A.1: Mean deviation from Belgian price after controlling for observable determinants

  Taylor, A. M. & Taylor, M. P. (2004), 'The Purchasing Power Parity Debate', The Journal of Economic Per-

	Figure 1: Geographical distribution of French export flows
	spectives 18(4), 135-158.
	ISL NZL SVK MEX KOR AUS NOR HUN CZE TUR CAN FIN IRL POL SWE JPN DNK AUT GRC PRT USA NLD CHE GBR ITA ESP DEU BEL
	0	50,000	100000	150000	200000
			# export flows

Table 1 :

 1 Homogeneous firms estimates

		(1)	(2)	(3)	(4)	(5)
	Dependent variable			1st diff ln price
	ln price lag	-0.563 * * *	-0.416 * * *	-0.412 * * *	-0.495 * * *	-0.495 * * *
		(0.016)	(0.006)	(0.007)	(0.033)	(0.033)
	ln price lag x eu15		-0.190 * * *	-0.182 * * *
			(0.007)	(0.012)
	ln price lag x euro			-0.017	-0.109 * * *	-0.109 * * *
				(0.011)	(0.034)	(0.034)
	ln price lag * euro *post98				-0.007	-0.006
					(0.006)	(0.006)
	ln price lag * euro *post01					-0.003
						(0.003)
	Destination-year FE	Yes	Yes	Yes	Yes	Yes
	N	2,549,269	2,549,269	1,820,537	2,549,269	2,549,269
	R 2	0.28	0.29	0.29	0.28	0.28
	Sample

Table 2 :

 2 Mean group estimator

		(1)	(2)	(3)	(4)
	Dependent variable		1st diff ln price
	ln price lag	-0.419 * * *	-0.471 * * *	-0.461 * * *	-0.455 * * *
		(.006)	(.002)	(.003)	(.003)
	ln price lag x eu15	-0.160 * * *	-0.094 * * *	-0.089 * * *	-0.080 * * *
		(.007)	(.003)	(.003)	(.004)
	N	1,141,258	1,141,258	787,127	588,965
	R 2	0.28	-	-	-
	Estimation Method	OLS	MG by firm	MG by firm	MG by firm
	Sample	N per zone>50 N per zone>50 N per zone>100 N per zone>150
	Destination-year FE	Yes	Yes	Yes	Yes
	Robust standard errors in parentheses (adjusted for clustering at destination level)

* significant at 10%; * * significant at 5%; * * * significant at 1%

Table 3 :

 3 Convergence regressions on different subsamples zone 5 markets/zone Employment > 90% Value Added >90% Exports >90% Robust standard errors in parentheses (adjusted for clustering at destination level)

		(1)	(2)	(3)	(4)	(5)	(6)
	Dependent variable			1st diff ln price
	ln price lag	-0.416 * * *	-0.404 * * *	-0.351 * * *	-0.420 * * *	-0.418 * * *	-0.394 * * *
		(0.006)	(0.005)	(0.008)	(0.008)	(0.009)	(0.007)
	ln price lag x eu15	-0.190 * * *	-0.089 * * *	-0.035 * * *	-0.126 * * *	-0.123 * * *	-0.118 * * *
		(0.007)	(0.007)	(0.011)	(0.010)	(0.010)	(0.009)
	Dest-year FE	Yes	Yes	Yes	Yes	Yes	Yes
	N	2,549,269	893,195	149,474	442,867	445,858	399,822
	R 2	0.29	0.23	0.18	0.26	0.26	0.24
	Sample	Full	1 market/

* significant at 10%; * * significant at 5%; * * * significant at 1%

Table 4 :

 4 Robustness checks

		(1)	(2)	(3)	(4)	(5)
	Dependent variable			1st diff ln price
	ln price lag	-0.528 * * * -0.217 * * *	-0.235 * * *	-0.238 * * *	-0.206 * * *
		(0.042)	(0.005)	(0.007)	(0.008)	(0.007)
	ln price lag x eu15	-0.176 * * * -0.109 * * *	-0.074 * * *	-0.066 * * *	-0.064 * * *
		(0.009)	(0.007)	(0.008)	(0.009)	(0.008)
	ln price lag x distance	0.014 * * *
		(0.005)
	1st lag dependent variable		-0.303 * * *	-0.265 * * *	-0.266 * * *	-0.270 * * *
			(0.005)	(0.007)	(0.007)	(0.006)
	2nd lag dependent variable		-0.145 * * *	-0.126 * * *	-0.126 * * *	-0.128 * * *
			(0.003)	(0.003)	(0.004)	(0.004)
	3rd lag dependent variable		-0.063 * * *	-0.058 * * *	-0.057 * * *	-0.054 * * *
			(0.002)	(0.002)	(0.003)	(0.003)
	Destination-year FE	Yes	Yes	Yes	Yes	Yes
	N	2,549,269	732,969	153,64	154,046	138,369
	R 2	0.29	0.27	0.24	0.24	0.22
	Sample	Full	Full	Empl>90% VA>90% Exports>90%

Table 5 :

 5 Germany as a reference country zone 5 markets/zone Employment > 90% Value Added > 90% Exports > 90% Robust standard errors in parentheses (adjusted for clustering at destination level)

		(1)	(2)	(3)	(4)	(5)	(6)
	Dependent variable			1st diff ln price
	ln price lag	-0.425 * * *	-0.406 * * *	-0.346 * * *	-0.427 * * *	-0.429 * * *	-0.416 * * *
		(0.004)	(0.004)	(0.009)	(0.007)	(0.007)	(0.007)
	ln price lag x eu15	-0.176 * * *	-0.078 * * *	-0.009	-0.120 * * *	-0.114 * * *	-0.095 * * *
		(0.006)	(0.006)	(0.009)	(0.012)	(0.012)	(0.011)
	Destination-year FE	Yes	Yes	Yes	Yes	Yes	Yes
	Observations	2,455,440	927,799	150,565	459,156	466,764	344,142
	R 2	0.29	0.23	0.17	0.26	0.26	0.24
	Sample	Full	1 market/

* significant at 10%; * * significant at 5%; * * * significant at 1%

Table A

 A

	.1: Probit for non-EU exports
		(1)	(2)	(3)
	Dependent variable	Export to non-EU: yes/no
	ln employment	0.336 * * *
		(.009)
	ln value added		0.194 * * *
			(.005)
	ln exports			0.101 * * *
				(.003)
	N	80,577	80,091	226,187

Robust standard errors in parentheses (adjusted for clustering at firm level) * significant at 10%; * * significant at 5%; * * * significant at 1%

[START_REF] Friberg | Two monies, two markets?: Variability and the option to segment[END_REF] also develops a model of endogenous market segmentation in a dynamic setting.

An example cited by[START_REF] Szymanski | Parallel trade, price discrimination, investment and price caps[END_REF] is the case of the UK trademark Levi Strauss (UK) Ltd that precluded Tesco and Costco from purchasing products from US distributors and sell them in the UK. The European Court of Justice settled in favor of Levi Strauss in 2001. While, according to EU regulations, intra-EU parallel imports have been fully liberalised, European Court of Justice legislation is generally restricting parallel imports from outside the EU.

See among others[START_REF] Isard | How Far Can We Push the Law of One Price ?[END_REF] working at the seven-digit SITC level,[START_REF] Rogers | Haircuts or hysteresis? sources of movements in real exchange rates[END_REF] for 54 goods and services sold in the United States and Canada,[START_REF] Parsley | Convergence to the Law of One Price Without Trade Barriers or Currency Fluctuations[END_REF] for 51 goods in

US cities and Rogoff, Froot & Kim (2001) for seven commodities over seven centuries.4 See[START_REF] Rogoff | The Purchasing Power Parity Puzzle[END_REF] for a survey.

We are grateful to the customs administration for kindly making these data available. Special thanks go to Agnès Topiol who provided many detailed explanations of the dataset.

Below a threshold of 1,000 Euros firms do not have to declare their exports. Below a threshold of 460,000 Euros firms exporting only to the EU do not have to declare their export volumes. Unit values for these firms may thus be missing, resulting in non-random sample selection. Relative to the true population of firms that export only to the EU, their mean size in our estimation sample may be too large. Given our result below that large firms have lower convergence speeds, the true selection effect may therefore be even larger than reported in this paper.

The 30 members of the OECD minus France, Belgium (the reference country) and Luxembourg which is reported separately in the French customs data only after 1998.

The clustering procedure normalises residuals, which enables us to use the critical values from[START_REF] Levin | Unit Root Tests in Panel Data: Asymptotic and Finite-Sample Properties[END_REF] to test for the presence of unit roots in our data.

The half life of a deviations is computed as t 1/2 = ln(0.5)/ln(β + 1)

For Greece, which adopted the Euro in 2001, the Eurozone dummy is set to 1 from 2001 onwards and to 0 otherwise.

Available upon request.

Note that self-selection in the model in Section 2 is based on the firm's size, an observable variable. In contrast to models in which selection is based on unobservable variables and a selection model has to be estimated (see[START_REF] Heckman | Varieties of Selection Bias[END_REF] among others), here it is therefore sufficient to control for the selection variable.

Alternatively we could have estimated a firm fixed effects model. However, estimating a dynamic panel with firm fixed effects requires the use of GMM estimation techniques, which given our very high number of observations would be computationally too demanding.

In contrast to[START_REF] Imbs | PPP Strikes Back: Aggregation and the Real Exchange Rate[END_REF] we do not find evidence for a systematic upward bias of the β-coefficient estimated by pooled OLS attributable to differences in convergence speeds at the micro level. For non-EU export destinations the β-coefficient estimated by MG is indeed more negative than the one estimated by OLS but for non-EU export destinations it is less negative.

If we restrict the sample to high productivity firms the coefficient on the interaction of the price lag with the EU indicator is similar to the one in the full sample. A plausible explanation is that in our sample our measures of productivity are only weakly correlated with measures of firm size.

It is common practice to determine the number of lags using[START_REF] Campbell | Pitfalls and opportunities: what macroeconomists should know about unit roots[END_REF] top-down approach: In a first step an initial number of lags is chosen which is then progressively reduced until the t-statistic of the coefficient with the longest lag is larger than 1.96. Given our relatively short panel we do not resort to this approach. Instead, we choose ad hoc a lag number of three to avoid dropping more than three periods. The reported results are robust to choosing a higher lag number.

Similar results obtain if we restrict the sample to firms that export both to EU and non-EU markets.

Robust standard errors in parentheses (adjusted for clustering at destination level) * significant at 10%; * * significant at 5%; * * * significant at 1%


Hugo Gangloff
email: hugo.gangloff@irisa.fr

Minh-Tan Pham
email: minh-tan.pham@irisa.fr

Luc Courtrai
email: luc.courtrai@irisa.fr

Sébastien Lefèvre
email: sebastien.lefevre@irisa.fr

Leveraging Vector-Quantized Variational Autoencoder Inner Metrics for Anomaly Detection

Anomaly Detection (AD) is an important research topic, with very diverse applications such as industrial defect detection, medical diagnosis, fraud detection, intrusion detection, etc. Within the last few years, deep learning-based methods have become the standard approach for AD. In many practical cases, the anomalies are unknown in advance. Therefore, most of challenging AD problems need to be addressed in an unsupervised or weakly supervised framework. In this context, deep generative models are widely used, in particular Variational Autoencoder (VAE) models. VAEs have been extended to Vector-Quantized VAEs (VQ-VAEs), a model increasingly popular because of its versatility enabled by the discrete latent space. We present for the first time a robust approach which takes advantage of the inner metrics of VQ-VAEs for AD. We show that the distance between the output of the encoder and the codebook vectors of a VQ-VAE provides a valuable information which can be used to localize the anomalies. In our approach, this metric complements a reconstruction-based metric to improve AD results. We compare our model with state-of-the-art AD models on three standards datasets, including the MVTec, UCSD-Ped1 and CIFAR-10 datasets. Experiments show that the proposed method yields high competitive results.

I. INTRODUCTION

A. Anomaly Detection

Anomaly Detection (AD) is a field of research which has been of interest for several decades, with a wide variety in applications [START_REF] Marco | A review of novelty detection[END_REF]. As defined by [START_REF] Douglas | Identification of Outliers[END_REF], an anomaly is an observation that highly deviates from other observations, as much as to arouse suspicion that it was generated by a different mechanism. In other words, the anomalous observation deviates from some underlying concept of normality. As many other fields, it has been revolutionized by deep learning approaches which have yielded new state-of-the-art results thanks to the unprecedented possibilities of capturing and modeling the normality [START_REF] Ruff | A unifying review of deep and shallow anomaly detection[END_REF].

AD in an unsupervised context is the most common approach in practical cases. Indeed, anomalies are unknown in advance, hence the impossibility to gather labeled anomalous data to train the deep model. From now on, our work will focus on unsupervised AD with images. Following [START_REF] Wang | Image anomaly detection using normal data only by latent space resampling[END_REF], there are three main approaches (often mixed in practice) for unsupervised AD. The detection task can be:

• feature-extraction-based, which relies on a distance in the feature space [START_REF] Ruff | Deep semisupervised anomaly detection[END_REF], [START_REF] Defard | Padim: a patch distribution modeling framework for anomaly detection and localization[END_REF]; • probability-based, which makes use of distributions or statistical tests to detect anomalies [START_REF] Eric T Nalisnick | Detecting out-of-distribution inputs to deep generative models using a test for typicality[END_REF], [START_REF] Naval | Anomaly detection through latent space restoration using vector quantized variational autoencoders[END_REF];

• reconstruction-based, which computes distances between inputs and reconstructions [START_REF] Baur | Autoencoders for unsupervised anomaly segmentation in brain mr images: a comparative study[END_REF], [START_REF] Zimmerer | Unsupervised anomaly localization using variational autoencoders[END_REF]. Reconstruction-based methods are the most explored ones in the literature. They are often based on deep generative latent variable models called Variational Autoencoders (VAEs) which we now present. Note that our new approach presented in this paper can be seen as a combination of a reconstructionbased and a feature-extraction-based approaches.

Remark: When working with AD on images, it is significant to distinguish two tasks: image-wise AD and pixel-wise AD. Image-wise AD involves the detection of the anomalous image as a whole. On the other hand, pixel-wise AD corresponds to the localization of each anomaly. Both cases will be addressed in this article.

B. Related work: anomaly detection with VAE-like models

In the unsupervised and weakly supervised AD contexts, deep generative models are a popular choice of models [START_REF] Bond-Taylor | Deep generative modelling: A comparative review of VAEs, GANs, normalizing flows, energy-based and autoregressive models[END_REF]. Among these models, particular deep latent variable models called Variational Autoencoders (VAEs) [START_REF] Diederik | Auto-encoding variational Bayes[END_REF] have been widely used. They are defined in a probabilistic framework detailed in [START_REF] Diederik | An introduction to variational autoencoders[END_REF]. In a nutshell, VAEs transform an input image x x x into a compressed representation z z z through a stochastic encoder network q φ φ φ (z z z|x x x). The image is then reconstructed to form the reconstruction x x x, by sampling from a stochastic decoder network p θ θ θ (x x x|z z z). The model is trained, for both network parameters φ φ φ and θ θ θ, by minimizing the Evidential Lower Bound which reads:

L θ θ θ,φ φ φ (x x x) = E qφ φ φ(z z z|x x x) [log p θ θ θ (x x x|z z z)] reconstruction term -KL(q φ φ φ (z z z|x x x)||p θ θ θ (z z z)) regularization term . (1)
Intuitively, the first term encourages the reconstruction x x x to be similar to the input x x x under the constraint of a regularization term under the form of Kullback-Leibler (KL) divergence. It can be seen that VAEs give access to several metrics computed from the continuous latent space and the reconstructions. Such metrics form the foundation of many image-wise and pixelwise AD approaches. Some of these metrics are, for example: the residual images between x x x and x x x, the evaluation the reconstruction term and/or of the KL term of Equation 1, the derivative of Equation 1 with respect to x x x, etc. Many combinations of these ideas have been successfully applied to weakly supervised AD giving rise to an important number of recent studies such as [START_REF] Baur | Autoencoders for unsupervised anomaly segmentation in brain mr images: a comparative study[END_REF], [START_REF] Zimmerer | Unsupervised anomaly localization using variational autoencoders[END_REF], [START_REF] Liu | Towards visually explaining variational autoencoders[END_REF], [START_REF] Dehaene | Iterative energy-based projection on a normal data manifold for anomaly localization[END_REF], [START_REF] Venkataramanan | Attention guided anomaly localization in images[END_REF].

Recently, Vector-Quantized VAEs (VQ-VAEs) [START_REF] Van Den Oord | Neural discrete representation learning[END_REF], [START_REF] Ramesh | Zero-shot text-to-image generation[END_REF] have introduced the idea of a discrete latent space. We present them in details in Section II-A. In the literature, several recent studies have already reported use of VQ-VAEs for AD (e.g. [START_REF] Wang | Image anomaly detection using normal data only by latent space resampling[END_REF], [START_REF] Naval | Anomaly detection through latent space restoration using vector quantized variational autoencoders[END_REF], [START_REF] Hugo | Unsupervised brain anomaly detection and segmentation with transformers[END_REF]). However, these works focus on much more complex models and, in particular, they introduce, in a second step, autoregressive models trained on the latent space. Comparisons with such approaches are therefore out of scope of our paper. Indeed, our main contribution is to show that VQ-VAEs are able to learn a latent representation of the normality which provides robust and competitive metrics for AD, without additional complexity, in a similar way of the best results obtained with VAEs. Indeed, while the VAE metrics have been extensively studied, we aim at harnessing the inner metrics of the VQ-VAEs for AD, and then at comparing VQ-VAEs with VAEs on this precise point. To the best of our knowledge, this is the first effort to conduct such a study in the field of AD.

C. Organization of the article

Our paper is organized as follows. In the next section, we introduce VQ-VAEs and how they can be used to address AD problems. We then present a new and robust approach which is based on the inner metrics of the VQ-VAEs and which aims at AD both at the image and pixel levels, via the computation of an anomaly map. In the last section, we compare our approach with some other state-of-the-art approaches on the MVTec [START_REF] Bergmann | MVTec AD-A comprehensive real-world dataset for unsupervised anomaly detection[END_REF], UCSD-Ped1 [START_REF] Mahadevan | Anomaly detection in crowded scenes[END_REF] and CIFAR-10 [START_REF] Krizhevsky | Learning multiple layers of features from tiny images[END_REF] datasets for, respectively, the detection of anomalies on industrial images, the detection of anomalies on crowd monitoring images, and the classification of anomalous realworld images.

II. VECTOR-QUANTIZED VARIATIONAL AUTOENCODERS

A. The model VQ-VAEs, first introduced in [START_REF] Van Den Oord | Neural discrete representation learning[END_REF], are models which include discrete latent variables. They can learn rich, yet compressed, latent representations and have been used to produce much sharper reconstruction than traditional VAEs [START_REF] Ramesh | Zero-shot text-to-image generation[END_REF], [START_REF] Razavi | Generating diverse high-fidelity images with VQ-VAE-2[END_REF]. Therefore, this makes VQ-VAEs an interesting model for AD, suggesting much less noisy residual images in reconstructionbased approaches, for example.

To cope with the discrete latent space, VQ-VAEs are trained differently from standard VAEs. In particular, the encoder becomes deterministic while the decoder remains stochastic. We now denote the encoder by Enc φ φ φ . Let M be the number of possible states for the latent variable z k , ∀k ∈ {1, . . . , K}, K being the dimension of the latent space. VQ-VAEs integrate a codebook, i.e., a set of vectors (e 1 , . . . , e M ), each one in R D , with D a positive integer. From the encoder output, z z z Encφ φ φ(x x x) , we choose the closest codebook vector for z k , ∀k, following a deterministic decision, i.e.,

z k = arg min m∈{1,...,M } ∥(z Encφ φ φ(x x x) ) k -e m ∥ 2 .
(

) 2
This can be associated to a deterministic and categorical encoding distribution as follows:

q φ φ φ (z k = m|x x x) =    1 if m = arg min m∈{1,...,M } ∥(z Encφ φ φ ) k -e m ∥ 2 , 0 otherwise.
(3) The inputs of the decoder, denoted by z z z Dec θ θ θ , are then also deterministically set as (z Dec θ θ θ ) k = e z k , ∀k. Note that, as done in this article, when processing images with convolutional encoders and decoders, the latent space z z z can also be convolutional, i.e., it consists of a latent image.

The loss function is then composed of the same reconstruction term as in standard VAEs but also of a squared ℓ2 term to ensure that the codebook is learnt. Indeed, because of the deterministic operations, the gradient can not flow from the decoder input to the encoder output: it has to be automatically copied; thus bypassing the codebook which cannot be updated. This second term is called the codebook alignment term. A third regularizing term is also added in the loss for stability of the training procedure, which leads to the VQ-VAE loss, for an image x x x:

L V Q-V AE θ θ θ,φ φ φ,e e e (x x x) = log p θ θ θ (x x x|z z z Dec θ θ θ (x x x) )+ ∥sg[z z z Encφ φ φ(x x x) ] -e e e∥ 2 2 alignment term +β∥z z z Encφ φ φ(x x x) -sg[e e e]∥ 2 2 , (4)
with β a scalar parameter and sg the stop gradient operator.

B. Anomaly Detection with VQ-VAEs

Similar to the metrics used for VAEs, we now define metrics for AD with VQ-VAEs. Since we are interested in pixel-wise AD, following [START_REF] Bergmann | Improving unsupervised defect segmentation by applying structural similarity to autoencoders[END_REF], we define a reconstruction-based anomaly map, called SM, which uses the Structural Similarity Index Measure (SSIM) [START_REF] Wang | Image quality assessment: from error visibility to structural similarity[END_REF] measure. For each pixel i, we have: SM(x i ) = SSIM(p p p i , q q q i ) = (2µ p p p µ q q q + c 1 )(2σ pq pq pq + c 2 ) (µ 2 p p p + µ 2 q q q + c 1 )(σ 2 p p p + σ 2 q q q + c 2 ) ,

(5) where p p p i (resp. q q q i ) is a patch around pixel i of x x x (resp. x x x). µ p , σ p and σ pq represent, respectively, the mean, the standard deviation and the covariance of the patches. The scalars are set to c 1 = 0.01 and c 2 = 0.03 [START_REF] Wang | Image quality assessment: from error visibility to structural similarity[END_REF].

We also define a new metric producing a latent space anomaly map, intrinsic to VQ-VAEs, which we call the Alignment Map (AM):

AM(x x x) = ∥sg[z z z Encφ φ φ(x x x) ] -e e e∥ 2 2 . ( 6
)
The intuition behind the AM anomaly map is as follows.

During training time, the codebook vectors are trained to be close to the output of the encoder, and reciprocally, in virtue to the last two terms in Equation 4. Therefore, at testing time, the anomalies (encoded in z z z Encφ φ φ (x x x) ), which have not been seen yet by the model, will be far from the codebook vectors, relatively to the normal features (also encoded in z z z Encφ φ φ(x x x) ). This is what is reflected in the AM.

It should be noted that this particular anomaly map is defined in the latent space and is not directly usable. In the next section, we construct an approach to efficiently use the AM to segment anomalies.

Remark:

The AM resonates with the approaches which use the Kullback-Leibler divergence value of a VAE as a metric to localize anomalies [START_REF] Zimmerer | Unsupervised anomaly localization using variational autoencoders[END_REF]. However, as our experiments will show in Section III, the alignment loss of a VQ-VAE seems to be a much more robust and more interpretable way to localize anomalies as our results are competitive to those yielded by the state-of-the-art approaches.

C. Improved Anomaly Detection using the Alignment Map

The AM is a small image with same dimension as the latent space where some pixels stand out. Those pixels can be seen as markers. They correspond to the latent variables with high alignment loss, i.e., anomalies. To be used in addition to the SM anomaly map, the AM is first upsampled. Then it undergoes a morphological grey dilation which aims at emphasizing the markers. However, none of these markers correctly represent the anomaly since they are just upsampled pixels. Therefore, we propose to recover a more realistic shape for the anomaly by multiplying the AM with the SM. Figure 1 graphically summarizes all the steps of our approach which we call VQ-VAE SSIM+AM.

One of the advantages of this approach is that it does not rely solely on the reconstruction of the model. Indeed, traditional VAE approaches rely on the promise that anomalies, unseen as training will disappear at the output; and they are then isolated based on the principle of the residual image [START_REF] Baur | Autoencoders for unsupervised anomaly segmentation in brain mr images: a comparative study[END_REF]. However, because of the intrinsic blurriness of the reconstructions, this often stands out as a very complex task. Therefore, the AM, as a source of information to localize the anomalies, is useful insofar as it does not directly rely on the reconstructions.

III. EXPERIMENTS & RESULTS

A. Network architecture

The same VQ-VAE architecture is used in the following experiments. It is based on the original VQ-VAE architecture [START_REF] Van Den Oord | Neural discrete representation learning[END_REF]:

• The encoder consists in three convolutional layers (kernel size 4, stride 2 and padding 1), each followed by a ReLU activation and Batch Normalization. It is then followed by three residual layers (decomposed as a ReLU activation, a convolutional layer (kernel size 3, stride 1, padding 1), a ReLU activation and a convolutional layer (kernel size 1, stride 1, padding 0)). All the depth dimensions are 256, except the input images which have depth 1 or 3. • The latent space image has the width and height of the original image divided by 8 (when 3 convolutions described above are stacked in the encoder). The codebook size is set to M = 512 and each vector of the codebook has dimension D = 256. decoder where we consider x x x as the realization of a continuous Bernoulli random variable [START_REF] Loaiza | The continuous Bernoulli: fixing a pervasive error in variational autoencoders[END_REF]. We found that this provided much better results and reduced convergence issues while training the VQ-VAE, as compared to considering a Gaussian distribution for the stochastic decoder p θ θ θ (x x x|z z z).

The VQ-VAE model is tested against comparable approaches, i.e., approaches which are designed in a similar way. The approaches we selected from the literature are then solely based on an encoder-decoder architecture and inner metrics, without any additional modules and very limited preand post-processing.

Remark: In the following experiments, training the models does not make use, in any way, of labeled data. However, because we train the models only on normal data, devoid of anomalies, this is, strictly speaking, not an unsupervised context but rather a weakly supervised context.

B. MVTec dataset

The MVTec dataset [START_REF] Bergmann | MVTec AD-A comprehensive real-world dataset for unsupervised anomaly detection[END_REF] is a standard dataset for AD on images. The dataset provides non-anomalous and defective RGB images of manufactured objects from 15 different categories. Several defect types are available for each category. In this section, we resize the image to 256 × 256 pixels, leading to a 32 × 32 latent space. Following the literature, we give the results in terms of pixel-wise ROCAUC which is generated from the heatmap available after processing and the available ground truth. The full approach for AD described in Section II-C is called VQ-VAE SSIM+AM. We also have the VQ-VAE SSIM approach where the SM anomaly map is directly used to compute the ROCAUC score, without using the AM. We compare with the ROCAUC scores of a classical Autoencoder with SSIM (AE SSIM) [START_REF] Bergmann | MVTec AD-A comprehensive real-world dataset for unsupervised anomaly detection[END_REF], the state-of-the-art Visually Explained VAE (VEVAE) [START_REF] Liu | Towards visually explaining variational autoencoders[END_REF] and the state-of-the-art Fully Convolutional Data Description (FCDD) [START_REF] Liznerski | Explainable deep one-class classification[END_REF].

Table I shows the score for the models over all the categories of the dataset. The scores for the other methods are taken from their respective referenced paper. We can see that our VQ-VAE SSIM+AM approach performs similarly as the FCDD approach which represents the state-of-the-art result on MVTec for this family of approaches. Our proposed approach also gives better results than AE SSIM and VEVAE. This suggests that VQ-VAEs might be more robust baseline architectures than AEs and VAEs. VQ-VAE SSIM also performed worse than VQ-VAE SSIM+AM, which highlights the interest of using the additional information provided by the AM to improve the final anomaly map. We noticed that the worst results of the VQ-VAE approaches seem to be linked with relatively big defects being too well reconstructed, for example, a black spot over a background composed of black spots (in Tile) or a missing part of an object which reveals more background (in Transistor). In these cases, the metrics failed to localize the anomalies. On the other hand, the strength of the model seems to reside in its ability to detect even the smallest defects thanks to the sharpness of the reconstructions permitted by VQ-VAEs (holes in Hazelnut or small damages in Screw). Figure 2 provides some selected graphical illustrations of the experiment.

C. UCSD-Ped1 dataset

This second experiment addresses another standard dataset for AD on images and videos: the UCSD-Ped1 dataset [START_REF] Mahadevan | Anomaly detection in crowded scenes[END_REF]. The dataset is composed of black and white video sequences of pedestrians walking in a park. This represents 6, 400 images for training and 2, 000 images for testing. In this experiment, we resize the image to 128 × 128 as done in [START_REF] Liu | Towards visually explaining variational autoencoders[END_REF]. Following the literature, the metric used will be the pixel-wise ROCAUC. In the context of this experiment, localizing the anomalies consists in localizing all non-pedestrian moving objects in this park scenery (car, bikes, skateboards, etc.).

We compare our VQ-VAE-based approaches with a classical VAE architecture [START_REF] Baur | Autoencoders for unsupervised anomaly segmentation in brain mr images: a comparative study[END_REF] and the VEVAE [START_REF] Liu | Towards visually explaining variational autoencoders[END_REF] architecture whose results are available in the literature. Note that in our approach, because of the small resolution of the original images, the VQ-VAE encoder and decoder described in Section III-A are reduced to two convolutional layers. The latent space then has dimension 32 × 32. Moreover, we found out that much better results were obtained by performing a morphological grey dilation also on the SM anomaly map. This is reflected in the illustrations of Figure 3, where patches from the SSIM computation are emphasized.

Table II gives the ROCAUC for the models over all the testing dataset. The scores for the other models are both taken from [START_REF] Liu | Towards visually explaining variational autoencoders[END_REF]. We can see an improvement over the other models, which signifies that more accurate anomaly maps are produced by the VQ-VAE approaches. In the context of this experiment, it is not possible to favor one of our VQ-VAE versions.

Illustrations of the experiment are available in Figure 3.

D. CIFAR-10 dataset

This last experiment addresses the problem of image-wise AD on the CIFAR-10 dataset [START_REF] Krizhevsky | Learning multiple layers of features from tiny images[END_REF]. The dataset is composed of 60, 000 distributed between 50, 000 train and 10, 000 test images; all equally divided in 10 categories. The original 32 × 32 size of the images is used without resizing. We test all the models in a one-versus-rest way. More precisely, a model is trained on images from one category only and, at test time, we want to discriminate between the one class, the normal samples upon which the model was trained, and the rest class, the anomalous samples which can come from all the other categories. The metric used is then the image-wise ROCAUC.

We compare our VQ-VAE approaches with a vanilla autoencoder approach [START_REF] Makhzani | Winner-take-all autoencoders[END_REF] and the Deep Support Vector Data Description [START_REF] Ruff | Deep one-class classification[END_REF], a standard approach for image-wise AD.

To provide an anomaly score for a whole image in the VQ-VAE approaches, we take the average value over all the pixel-wise anomaly map. Note that the VQ-VAE encoder and decoder described in Section III-A are also reduced to two convolutional layers in this experiment. The latent space here has dimension 8 × 8.

Table III gives the scores for the models over all the categories of the dataset. Scores for the other models are both taken from [START_REF] Ruff | Deep one-class classification[END_REF]. We can see that our VQ-VAE approach has a slight advantage against the others which suggests that the provided anomaly map is also relevant for sample-wise AD. Figure 4 class (colors, scenery, background, etc.). This might reflect that the model extracts relevant features from the images.

IV. CONCLUSION

In this paper, we showed the potential of VQ-VAEs for AD. We highlighted for the first time that the inner metrics of VQ-VAE models are robust and efficient to detect anomalies in images. Indeed, after developing an intuitive approach to construct an anomaly map, we reported results competitive with several other state-of-the-art approaches for pixel-wise AD on the MVTec and UCSD-Ped1 datasets, as well as for image-wise AD on the CIFAR-10 dataset.

The results show that the inner metrics of VQ-VAEs outperform the inner metrics of VAEs, without introducing more complexity in the model. Our results also corroborate the increasing interest of the machine learning community for VQ-VAEs. In the near future, further study might be conducted to assess whether VQ-VAEs should replace VAEs as the standard architectures in AD workflows.

Fig. 1 :Fig. 2 :

 12 Fig.1: Illustration of the proposed workflow for improved AD with VQ-VAE (Sections II-B and II-C). The network architecture is described in Section III-A. This approach is called VQ-VAE SSIM+AM. It is possible to directly use the SM anomaly map for ROCAUC computations or anomaly segmentation. In this case the approach is called VQ-VAE SSIM.

Fig. 3 :

 3 Fig. 3: Selected illustrations of the detection of our model in the UCSD-Ped1 experiment.

Fig. 4 :

 4 Fig. 4: Selected illustrations from the CIFAR-10 experiment for the VQVAE SSIM+AM model: some of the most normal (a) and anomalous (b) samples from the Automobile (top), Deer (middle) and Cat (bottom) categories, when the model is trained on this category.

•

  The decoder is constructed as the reverse of the encoder. Moreover, when the image pixels are encoded in [0, 255]. We rescale the input images into the range [0, 1] and use a

	Category	AE SSIM [20]	VEVAE [14]	FCDD [27]	VQ-VAE SSIM	VQ-VAE SSIM+AM
	Carpet	0.87	0.78	0.96 0.96 0.96	0.92	0.94
	Grid	0.94	0.73	0.91	0.99 0.99 0.99	0.99 0.99 0.99
	Leather	0.78	0.95	0.98 0.98 0.98	0.98 0.98 0.98	0.98 0.98 0.98
	Tile	0.59	0.80	0.91 0.91 0.91	0.70	0.75
	Wood	0.73	0.77	0.88 0.88 0.88	0.82	0.84
	Bottle	0.93	0.87	0.97 0.97 0.97	0.94	0.95
	Cable	0.82	0.90 0.90 0.90	0.90 0.90 0.90	0.87	0.87
	Capsule	0.94 0.94 0.94	0.74	0.93	0.93	0.94 0.94 0.94
	Hazelnut	0.97	0.98	0.95	0.98	0.99 0.99 0.99
	Metal Nut	0.89	0.90	0.94 0.94 0.94	0.89	0.90
	Pill	0.91 0.91 0.91	0.83	0.81	0.86	0.90
	Screw	0.96	0.97	0.86	0.98 0.98 0.98	0.98 0.98 0.98
	Toothbrush	0.92	0.94	0.94	0.96	0.97 0.97 0.97
	Transistor	0.90	0.93 0.93 0.93	0.88	0.77	0.78
	Zipper	0.88	0.78	0.92	0.97	0.98 0.98 0.98
	Mean	0.86	0.86	0.92 0.92 0.92	0.90	0.92 0.92 0.92

TABLE I :

 I ROCAUC scores on the MVTec dataset.

  illustrates the experiment by highlighting the most normal and anomalous samples according to the VQ-VAE metric. It appears that the VQ-VAE is able to correctly award a high normality score to relatively diverse images inside a same

	Category	AE L2 [28]	DSVDD [29]	VQ-VAE SSIM	VQ-VAE SSIM+AM
	Airplane	0.59	0.62	0.71 0.71 0.71	0.69
	Automobile	0.57	0.66 0.66 0.66	0.63	0.65
	Bird	0.49	0.51	0.63	0.65 0.65 0.65
	Cat	0.58	0.59	0.62	0.63 0.63 0.63
	Deer	0.54	0.61	0.60	0.64 0.64 0.64
	Dog	0.62	0.66	0.67 0.67 0.67	0.67 0.67 0.67
	Frog	0.51	0.68 0.68 0.68	0.61	0.63
	Horse	0.59	0.67 0.67 0.67	0.63	0.63
	Ship	0.77 0.77 0.77	0.76	0.74	0.74
	Truck	0.67	0.73 0.73 0.73	0.64	0.65
	Mean	0.59	0.65	0.65	0.66 0.66 0.66

TABLE III :

 III ROCAUC scores on the CIFAR-10 dataset.

ACKNOWLEDGMENTS

This work was done as a part of the Game of Trawls project. We thank the European Maritime and Fisheries Fund (contract number 18/2216442) and France Filière Pêche (contract number 19/1000544) for funding. It was also supported by the SEMMACAPE project, which benefits from an ADEME (Agence de la transition écologique) grant under the "Sustainable Energies" call for research projects (2018-2019).