FractalNet: A biologically inspired neural network approach to fractal geometry

7
FractalNet: A biologically inspired neural network approach to fractal geometry Ronald Marsh * Department of Computer Science, University of North Dakota, Streibel Hall, Room 218 (box 9015), Grand Forks, ND 58201, USA Received 9 July 2002; received in revised form 2 January 2003 Abstract We present a multiply connected neural network to estimate the fractal dimension (D f ) using the Box-counting method. Traditional methods used to estimate D f are sequential. A neural network implementation would be com- putationally efficient and suggests a possible biological realization. Ó 2003 Elsevier Science B.V. All rights reserved. Keywords: Fractal geometry; Fractal analysis; Box-counting method 1. Introduction Benoit Mandelbrot (1983) introduced a new field of mathematics to the world. Mandelbrot named this new field fractal (from the Latin term ‘‘fractus’’) geometry. Mandelbrot claimed that fractal geometry would provide a useful tool for the explanation of a variety of naturally occurring phenomena. A fractal is an irregular geometric object with an infinite nesting of structure at all scales (self-similarity). Many examples of fractal objects can be found in nature, such as coastlines, fern trees, snowflakes, clouds, mountains, and bacteria. Some of the most important properties of fractals are self-similarity, chaos, and the non- integer fractal dimension (D f ), which gives a quantitative measure of self-similarity and scaling. Fractal analysis has been used to characterize a variety of naturally occurring complex objects as well as many artificial objects (e.g. Comis, 1998) and a number of applications using fractal geom- etry have been proposed. Fractal analysis has been successful in measuring textural images (e.g. Sar- kar and Chaudhuri, 1992) and surface roughness (e.g. Davies and Hall, 1999). Fractal analysis has proven useful in medicine as medical images typi- cally have a degree of randomness associated with the natural random nature of structure. Osman et al. (1998) analyzed the fractal dimension of trabecular bone to evaluate its potential structure. Other studies successfully used the fractal dimen- sion to detect micro-calcifications in mammo- grams (e.g. Caldwell et al., 1990), predict osseous changes in ankle fractures (e.g. Webber et al., 1993), diagnose small peripheral lung tumors * Tel.: +1-701-777-4013; fax: +1-701-777-3330. E-mail address: [email protected] (R. Marsh). 0167-8655/03/$ - see front matter Ó 2003 Elsevier Science B.V. All rights reserved. doi:10.1016/S0167-8655(03)00011-4 Pattern Recognition Letters 24 (2003) 1881–1887 www.elsevier.com/locate/patrec

Transcript of FractalNet: A biologically inspired neural network approach to fractal geometry

Page 1: FractalNet: A biologically inspired neural network approach to fractal geometry

FractalNet: A biologically inspired neural networkapproach to fractal geometry

Ronald Marsh *

Department of Computer Science, University of North Dakota, Streibel Hall, Room 218 (box 9015), Grand Forks, ND 58201, USA

Received 9 July 2002; received in revised form 2 January 2003

Abstract

We present a multiply connected neural network to estimate the fractal dimension (Df ) using the Box-counting

method. Traditional methods used to estimate Df are sequential. A neural network implementation would be com-

putationally efficient and suggests a possible biological realization.

� 2003 Elsevier Science B.V. All rights reserved.

Keywords: Fractal geometry; Fractal analysis; Box-counting method

1. Introduction

Benoit Mandelbrot (1983) introduced a new

field of mathematics to the world. Mandelbrot

named this new field fractal (from the Latin term‘‘fractus’’) geometry. Mandelbrot claimed that

fractal geometry would provide a useful tool for

the explanation of a variety of naturally occurring

phenomena. A fractal is an irregular geometric

object with an infinite nesting of structure at all

scales (self-similarity). Many examples of fractal

objects can be found in nature, such as coastlines,

fern trees, snowflakes, clouds, mountains, andbacteria. Some of the most important properties

of fractals are self-similarity, chaos, and the non-

integer fractal dimension (Df ), which gives a

quantitative measure of self-similarity and scaling.

Fractal analysis has been used to characterize a

variety of naturally occurring complex objects as

well as many artificial objects (e.g. Comis, 1998)and a number of applications using fractal geom-

etry have been proposed. Fractal analysis has been

successful in measuring textural images (e.g. Sar-

kar and Chaudhuri, 1992) and surface roughness

(e.g. Davies and Hall, 1999). Fractal analysis has

proven useful in medicine as medical images typi-

cally have a degree of randomness associated with

the natural random nature of structure. Osmanet al. (1998) analyzed the fractal dimension of

trabecular bone to evaluate its potential structure.

Other studies successfully used the fractal dimen-

sion to detect micro-calcifications in mammo-

grams (e.g. Caldwell et al., 1990), predict osseous

changes in ankle fractures (e.g. Webber et al.,

1993), diagnose small peripheral lung tumors

*Tel.: +1-701-777-4013; fax: +1-701-777-3330.

E-mail address: [email protected] (R. Marsh).

0167-8655/03/$ - see front matter � 2003 Elsevier Science B.V. All rights reserved.

doi:10.1016/S0167-8655(03)00011-4

Pattern Recognition Letters 24 (2003) 1881–1887

www.elsevier.com/locate/patrec

Page 2: FractalNet: A biologically inspired neural network approach to fractal geometry

(e.g. Mihara et al., 1998), distinguish breast tu-

mors in digitized mammograms (e.g. Pohlman

et al., 1996), and detect brain tumors in MR im-

ages (e.g. Jia, 1999). Studies have also shown that

the changes in the fractal dimension reflect alter-

ations of structural properties.Fractal geometry does not concern itself with

the explicit shape of objects. Instead, fractal geo-

metry identifies the value that quantifies the shape

of the object�s surface, the fractal dimension (Df )

of the object. For example, a line is commonly

thought of as 1-dimensional object, a plane as a 2-

dimensional object, and a cube as a 3-dimensional

object––objects whose dimensionality is integervalued. However, the surfaces of many objects

cannot be described with an integer value. These

objects are said to have a ‘‘fractional’’ dimension.

Consider the following example to illustrate the

concept of fractional dimension:

Consider a line (a 1-D object).Bend it.Bend it some more.Bend it infinitely many times.Eventually, the line is transformed into a plane (a2-D object).

Note that the 1-D line did not instantly become

a 2-D plane; there was a transition during which it

was 1.xx-D. Hence, fractal geometry can be con-

sidered an extension to classical geometry (e.g.

Voss, 1985).

The fractal theory developed by Mandelbrotand Van Ness (1968) was derived from the work

of mathematicians Hausdorff and Besikovich.

The Hausdorff–Besikovich dimension, DH, is de-

fined as:

DH ¼ lime!0þ

lnNe

ln 1=eð1Þ

where Ne is the number of elements of e diameter

required to cover the object. Mandelbrot defines a

fractal as a set for which the Hausdorff–Besikovich

dimension strictly exceeds the topological dimen-sion. When working with discrete data, one is

interested in a deterministic fractal and the asso-

ciated fractal dimension (Df ) which can be defined

as the ratio of the number of self-similar pieces (N )

with magnification factor (1=r) into which a figure

may be broken (e.g. Le M�eehaut�ee, 1990). Df is de-

fined as:

Df ¼lnNln 1=r

ð2Þ

Df may be a non-integer value, in contrast to

objects lying strictly in Euclidean space, which

have an integer value. However, Df can only be

directly calculated for a deterministic fractal. Ac-

cording to Falconer (1990) for any other object

(most physical objects and images) Df has to beestimated. There are a variety of applicable algo-

rithms for estimating Df , such as the Box-counting

algorithm, the pixel Dilation method (e.g. Smith

et al., 1989), the Calipher method (e.g. Rigaut

et al., 1983), and the Power Spectrum method

(e.g. Schepers et al., 1992).

1.1. A biological basis?

We were led to consider a neural network ap-

proach for calculating the fractal dimension by the

possible use of the Mellin transform by certain

biological visual processing systems. There is evi-

dence that the visual processing system of cats and

some species of primates uses a log-polar trans-

formation (e.g. Reitboeck and Altmann, 1984). Alog-polar transform followed by a Fourier trans-

form is a known method for scale and rotation

invariant pattern recognition (a Mellin transform).

Therefore, an obvious question to ask is: ‘‘Does

the biological visual processing system also employ

a Fourier transform?’’ That question has not yet

been answered. However, artificial neural net-

works have been developed which can perform aFourier transform (e.g. Culhane et al., 1989). The

evidence of the biological realization of the log-

polar transform and the development of the neural

network based Fourier transform, does open the

possibility that a Mellin transform is used by the

visual processing system for pattern recognition.

We now ask: ‘‘Does the biological visual pro-

cessing system employ more than one patternrecognition method and is that method fractal

geometry?’’ A neural network implementation

capable of estimating the fractal dimension does

open that possibility.

1882 R. Marsh / Pattern Recognition Letters 24 (2003) 1881–1887

Page 3: FractalNet: A biologically inspired neural network approach to fractal geometry

This paper presents a multiply connected neural

network designed to estimate the fractal dimension

(Df ) using the Box-counting method (BCM) as

proposed by Block et al. (1990). Calculation of Df

is becoming a common data processing tool, and

in general, the faster one can do it, the better.Traditional techniques are sequential. Not only do

they not operate on the entire data vector simul-

taneously, they must revisit the data vector several

times, performing the sequential processing each

time. Hence, as the vector length increases so does

the processing time. Traditional techniques have a

computational cost of OðN 2 lnðNÞÞ. A parallel (or

neural network) method would be more efficientcomputationally and would open the possibility

of a biological realization.

In this paper, we present a review of BCM in

Section 2, our neural network implementation in

Section 3, our simulation results in Section 4, and

our concluding remarks in Section 5.

2. Background

The neural network architecture presented

performs a parallel computation of Df using the

BCM. BCM is one of the most popular and sim-

plest methods for the fractal analysis of image

data. With BCM, we divide an image containing

the object of interest into N equal-size pieces. Wethen count the number of pieces that contain a

portion of the object (ni). The process is repeated

for a user-defined sequence of Ni equal-size pieces.

We provide an example of the BCM process

using a dyatic increase of N in Fig. 1.

All four of the pieces in Fig. 1a contain parts of

the letter A, five pieces contain parts of the letter A

in Fig. 1b, 12 pieces contain parts in Fig. 1c, and35 pieces in Fig. 1d contain parts of the letter A.

We tabulate and plot ni versus the respective

piece size on a ln-ln plot. Linear regression is used

to find the best fitting line through the resulting

curve. Df is the slope of this line. For the above

example, Df is 1.139.

However, BCM has its criticisms, especiallywhen applied to digital images (e.g. Buczkowski

et al., 1998). In particular: A digital image has a

finite set of points, therefore there is an upper

limit (image size) and lower limit (a pixel) to e, andthe number of pieces (Ne) must be integer valued.

Furthermore, there is no standard method for

implementing BCM. In our example, we used a

dyatic progression of N ð4; 16; 64; . . .Þ. Other im-plementations use a linear progression ð3; 5; 7; . . .Þ.Hence, BCM (and most other digitally imple-

mented methods) are only estimates of Df (dB).

3. Fractal neural network (FractalNet)

FractalNet consists of two sections, a datasampling section and a linear regression section. A

FractalNet designed for 8 1-D inputs is shown in

Fig. 2. We discuss both sections in more detail

below.

3.1. Data sampling section

The data sampling section is designed to samplethe data in a dyatic manner. Three types of nodes

are required: thresholding input nodes (black

squares), which binarize the input data, summing

nodes (gray circles), and Heaviside step function

nodes (white circles). The alternation and layering

of summing nodes and Heaviside step function

nodes combine to provide the parallel dyatic

sampling. Fig. 3 provides a more detailed look atthe resulting dyatic sampling. We assume that the

Fig. 1. (a–d) BCM algorithm example.

R. Marsh / Pattern Recognition Letters 24 (2003) 1881–1887 1883

Page 4: FractalNet: A biologically inspired neural network approach to fractal geometry

four inputs are from a gray scale source and that

the input nodes are set to threshold the data such

that any value >n ¼ 1 and any value 6 n ¼ 0

(where n ¼ 0 here). We assume that an input value

of 1 indicates a sample location that contains part

of the object of interest. We also assume that all

connection weights are þ1.

The middle layer contains alternating summingand Heaviside step function nodes. The output of

each summing node is the number of inputs in the

node�s input neighborhood that contain a portion

of the object. The (binary) output of each Heavi-

side step function node states whether or not the

node�s input neighborhood contains a portion ofthe object at all. The output layer contains two

summing nodes and one Heaviside step function

node. Output summing node A has inputs from

the two middle layer summing nodes and there-

fore ‘‘sees’’ each of the four original inputs as

four separate datum. Since three of the four

original inputs have a value of one, the output

value for A is 3. Output summing node B hasinputs from the two middle layer Heaviside step

function nodes and therefore ‘‘sees’’ the four

original inputs as if they were actually two inputs

(the input pairs in the dotted boxes). Since both

of the input node pairs contain portions of

the object, the output value for B is 2. Out-

put Heaviside step function node C has in-

puts from the two middle layer Heaviside stepfunction nodes and therefore ‘‘sees’’ the four

original inputs as if they were only one input

(note the double-lined box). Since the input

quad contains a portion of the object, the out-

put value for C is 1. As the data set grows,

the dyatic sampling pattern continues (see Sec-

tion 3.3).

Fig. 2. FractalNet for 8 1-D inputs.

Fig. 3. Dyatic sampling of FractalNet.

1884 R. Marsh / Pattern Recognition Letters 24 (2003) 1881–1887

Page 5: FractalNet: A biologically inspired neural network approach to fractal geometry

3.2. Linear regression section

In keeping with the all-neural network archi-

tecture, we developed a neural network to com-

pute the regression line (linear regression) of the

data generated by the sampling section (note that

the box size term ‘‘xi’’ is the independent variable).The purpose of the nodes is given by the equa-

tions/parameters next to each set of nodes (Fig. 2).

Note that some of the connections are inhibitory(have a weight of )1) and others are weighted (1/

number of inputs to the linear regression section––

1/3 in Fig. 2). All other connections have a weight

of þ1. Finally, note that this section, unlike the

data sampling section, has some temporal depen-

dencies. Specific nodes (x-bar and y-bar calculatingnodes) must complete their processing before other

nodes can perform their processing.

3.3. Scaling

Our second item of interest is how well Fractal-

Net scales. As long one wishes to continue with the

dyatic sampling rate, FractalNet can easily be

scaled. Each doubling of the data set size requiresone additional hidden layer in the data sampling

section and four additional nodes in the linear re-

gression section. For example, compare the Frac-

talNet for 8 inputs (Fig. 2) with the FractalNet

for 16 inputs (Fig. 4). Note that the connec-

tion weights (for the fractional weighted connec-

tions) must also be adjusted accordingly (1/4 in

Fig. 4).

3.4. Two-dimensional data

The third item of interest is the ability for

FractalNet to process 2-D data such as binary

image data. Again, only minor changes are re-

quired. Fig. 5 shows the data sampling section of a

FractalNet that has 16 inputs (assuming imagedata––each black square would correspond to an

individual pixel). The black hexagonal nodes are

the inputs to the linear regression section. Note

that the sample rate for the subnet shown in Fig. 5

is 16, 4, and 1. The numbers next to each node

Fig. 4. FracalNet for 16 inputs.

R. Marsh / Pattern Recognition Letters 24 (2003) 1881–1887 1885

Page 6: FractalNet: A biologically inspired neural network approach to fractal geometry

indicate the node�s value given the 16 input valuesshown.

4. Simulation and results

We implemented the BCM as proposed by

Block et al. (1990) and a realistic rendition (each of

the 1583 nodes and applicable connections in thenetwork were duplicated in code) of FractalNet to

process a 512� 512 image. Both algorithms were

implemented in C++ on a 333 Mhz. PC running

Linux. Obviously, our FractalNet simulation was

a serial implementation and not a parallel imple-

mentation.

Using four images of fractals, we compared the

results obtained with both of our implementationswith those obtained with the BCM option in the

HarFa software (Buchn�ıı�ccek et al., 2000; Ne�zz�aadalet al., 2001) and those published for the Modified

Box Counting Method (Buczkowski et al., 1998).

We selected image sizes and calculation parame-

ters to be as closely matched as possible. The re-

sults are shown in Table 1. We were not surprised

by the identical results obtained with the BCM and

FractalNet as FractalNet was designed to imple-

ment the same algorithm as the traditional BCM,

only able to do so as a neural net. We are also not

surprised that our methods (BCM and FractalNet)returned low estimates for Df as this is a known

characteristic of the BCM.

The computational-complexity of the BCM is

OðN 2 lnðNÞÞ. The time-complexity of BCM and

FractalNet, when implemented serially, are both

approximately T ðN 2 þPdlnðNÞe

i¼1 ½N=2i2Þ. Since our

implementations of the BCM and FractalNet were

serial, both have the same time-complexity andexhibited similar run times––approximately 37 ms

for a 512� 512 image on our machine. However,

when implemented parallelly the time-complexity

of FractalNet is significantly lower, approximately

T ðlnðNÞÞ.

5. Conclusion

This paper presents a multiply connected neural

network designed to estimate the fractal dimension

(Df ) using the BCM. Fractal analysis is a powerful

shape recognition tool and the BCM is one of the

most popular methods for estimating the fractal

dimension (Df ). Traditional BCM implementa-

tions are sequential. A parallel (or neural network)implementation would be more temporally effi-

cient and, more interestingly, would suggest a

possible biological realization. Our goal was to

develop a rendition of the BCM that was neural

network-based and not to improve upon the basic

BCM algorithm. While the neural network pre-

sented does generate an estimation (dB) of Df using

the BCM, it is not entirely biologically founded.

Table 1

Fractal dimension (Df ) comparison

Square Error (%) Sierpinski

carpet

Error (%) Sierpinski

gasket

Error (%) Vicsek

growth

Error (%)

Known 2.0000 1.8928 1.5849 1.4650

BCM 1.8510 8.05 1.8625 1.63 1.5350 3.25 1.3464 8.81

FractalNet 1.8510 8.05 1.8625 1.63 1.5350 3.25 1.3464 8.81

HarFa 1.8784 6.47 1.8960 )0.17 1.5491 2.31 1.3590 7.80

MBCM 1.9997 0.02 1.8814 0.61 1.5790 0.37 1.5089 )2.91

Fig. 5. FracalNet for 2-D (4� 4) data.

1886 R. Marsh / Pattern Recognition Letters 24 (2003) 1881–1887

Page 7: FractalNet: A biologically inspired neural network approach to fractal geometry

Several of the activation functions are not bio-

logically plausible. Additionally, our network re-

quires that the data either be binary or easily

segmented (into binary data). These concerns

are the focus of future work on FractalNet.

References

Block, A., Bloh, W., Schellnhuber, H.J., 1990. Efficient Box-

counting determination of generalized fractal dimensions.

Phys. Rev. A 42, 1869–1874.

Buchn�ıı�ccek, M., Ne�zz�aadal, M., Zme�sskal, O., 2000, Numeric

Calculation Of Fractal Dimension, 3rd Conference on

Prediction, Synergetic and more. . ., Faculty of Technology

Zlin, BUT Brno, 10–15.

Buczkowski, S., Kyriacos, S., Nekka, F., Cartilier, L., 1998.

The modified Box-counting method analysis of some

characteristic parameters. Pattern Recognition 31 (4), 411–

418.

Caldwell, C.B., Stapleton, S.J., Hodsworth, D.W., Jong, R.A.,

Weiser, W.J., Cooke, G., Yaffe, M.J., 1990. Characteriza-

tion of mammographic parenchymal pattern by fractal

dimension. Phys. Med. Biology 35 (2), 235–247.

Comis, D., 1998. Fractals––A bridge to the future for soil

science. Agricult. Res. Mag. 46 (4), 10–13.

Culhane, A.D., Peckerar, M.C., Marrian, C.R.K., 1989. A

neural network approach to discrete Hartley and Fourier

transforms. IEEE Trans. Circ. Systems 36 (5), 695–702.

Davies, S., Hall, P., 1999. Fractal analysis of surface roughness

by using spatial data. J. Roy. Statist. Soc. Ser. B, Statist.

Methodol. 61 (1), 3–29.

Falconer, K., 1990. Fractal Geometry Mathematical Founda-

tions and Applications. Wiley, New York.

Jia, W., 1999, A fractal analysis approach to identification of

tumor in brain MR images, MS thesis, Department of

Computer Science, North Dakota State University.

M�eehaut�ee, A., 1990. Fractal Geometries: Theory and Applica-

tions. CRC Press, London.

Mandelbrot, B.B., Van Ness, J.W., 1968. Fractional brownian

motions fractional noises and applications. SIAM Rev. 10

(40), 422–437.

Mandelbrot, B.B., 1983. The Fractal Geometry of Nature.

Freeman, San Francisco.

Mihara, N., Kuriyama, K., Kido, S., Kuroda, C., Johkoh, T.,

Naito, H., Nakamura, H., 1998. The usefulness of fractal

geometry for the diagnosis of small peripheral lung tumors.

Nippon Igaku Hoshasen Gakkai Zasshi 58 (4), 148–151.

Ne�zz�aadal, M., Zme�sskal, O., Buchn�ıı�ccek, M., 2001. The Box-

Counting: Critical Study, In: 4th Conference on Prediction,

Synergetic and more. . ., the Faculty of Management,

Institute of Information Technologies, Faculty of Technol-

ogy, Tomas Bata University in Zlin, 18.

Osman, D., Newitt, D., Gies, A., Budinger, T., Truong, V.,

Majumdar, S., 1998. Fractal based image analysis of human

trabecular bone using the box counting algorithm: impact of

resolution and relationship to standard measures of trabe-

cular bone structure. Fractal. 6 (3), 275–283.

Pohlman, S., Powell, K.A., Obuchowski, N.A., Chilcote, W.A.,

Grundfest-Broniatowski, S., 1996. Quantitative classifica-

tion of breast tumor in digitized mammograms. Med. Phys.

23 (8), 1337–1345.

Reitboeck, H.J., Altmann, J., 1984. A model for size- and

rotation-invariant pattern processing in the visual system.

Biological Cybernet. 51, 113–121.

Rigaut, J.P., Berggren, P., Robertson, B., 1983. Automated

techniques for the study of lung alveolar stereological

parameters with the IBAS image analyser on optical

microscopy sections. J. Microscopy 130 (1), 53–61.

Sarkar, N., Chaudhuri, B.B., 1992. An efficient approach to

estimate fractal dimension of textural images. Pattern

Recognition 23 (9), 1035–1041.

Schepers, H.E., Beek, J.H.G.M., Bassingtwaighte, J.B., 1992.

Four methods to estimate the fractal dimension from self-

affine signals. IEEE Eng. Med. Biology 11 (2), 57–71.

Smith, T.J., Marks, W.B., Lange, G.D., Sheriff, W.J., Neale,

E.A., 1989. A fractal analysis of cell images. J. Neurosci.

Meth. 27 (2), 173–180.

Voss, R., 1985. Random fractals: Characterization and mea-

surement. In: Pynn, R., Skjeltorp, A. (Eds.), Scaling

Phenomena in Disordered Systems. Plenum Press, New

York, pp. 49–70.

Webber, R.L., Underhill, T.E., Horton, R.A., Dixon, R.L.,

Pope Jr., T.L., 1993. Predicting osseous changes in ankle

fractures. IEEE Eng. Med. Biology Mag. 12 (1), 103–110.

R. Marsh / Pattern Recognition Letters 24 (2003) 1881–1887 1887